Joey Armstrong | 7a9af44 | 2024-01-03 19:26:36 -0500 | [diff] [blame] | 1 | # Copyright 2020-2024 Open Networking Foundation (ONF) and the ONF Contributors |
Kent Hagerman | 812b257 | 2020-01-28 11:57:51 -0500 | [diff] [blame] | 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
Akash Reddy Kankanala | 929cc00 | 2025-04-08 15:05:21 +0530 | [diff] [blame^] | 15 | linters-settings: |
| 16 | govet: |
| 17 | enable: |
| 18 | - shadow |
| 19 | - fieldalignment |
| 20 | gocyclo: |
| 21 | min-complexity: 40 |
| 22 | misspell: |
| 23 | locale: US |
| 24 | ignore-words: |
| 25 | - cancelled |
| 26 | - artefacts |
| 27 | |
Kent Hagerman | 812b257 | 2020-01-28 11:57:51 -0500 | [diff] [blame] | 28 | run: |
Kent Hagerman | dcd4dcc | 2020-02-25 17:56:17 -0500 | [diff] [blame] | 29 | modules-download-mode: vendor |
| 30 | |
| 31 | linters: |
| 32 | enable: |
Kent Hagerman | dcd4dcc | 2020-02-25 17:56:17 -0500 | [diff] [blame] | 33 | #- gochecknoglobals |
| 34 | #- gochecknoinits |
Andrey Pozolotin | 34dd63f | 2021-05-31 21:26:40 +0300 | [diff] [blame] | 35 | - gocritic |
| 36 | - gofmt |
| 37 | - gosec |
| 38 | - errcheck |
Akash Reddy Kankanala | 929cc00 | 2025-04-08 15:05:21 +0530 | [diff] [blame^] | 39 | - gocyclo |
| 40 | - govet |
| 41 | - ineffassign |
| 42 | - misspell |
| 43 | - gosec |
| 44 | - goimports |
| 45 | - gosimple |
| 46 | - staticcheck |
| 47 | - unused |
| 48 | - unparam |
| 49 | |
| 50 | issues: |
| 51 | exclude-use-default: false #we should decide ourselves about false positives |
| 52 | exclude-rules: |
| 53 | - path: ".*_test.go" |
| 54 | linters: |
| 55 | - errcheck |
| 56 | - gocritic |
| 57 | - gosec |
| 58 | - govet |
| 59 | - fieldalignment |
| 60 | - unparam |
| 61 | - linters: |
| 62 | - gocritic |
| 63 | text: "ifElseChain:" #it should be up to a developer to decide which operator to use |
| 64 | exclude: |
| 65 | - SA1019 |
| 66 | - 'G115: integer overflow conversion' |