| 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. |
| mgouda | 2f7349d | 2025-10-29 10:06:00 +0530 | [diff] [blame] | 14 | version: "2" |
| 15 | |
| 16 | linters: |
| 17 | enable: |
| 18 | #- gochecknoglobals |
| 19 | #- gochecknoinits |
| 20 | - gocritic |
| 21 | - gosec |
| 22 | - errcheck |
| 23 | - gocyclo |
| 24 | - govet |
| 25 | - ineffassign |
| 26 | - misspell |
| 27 | - gosec |
| 28 | - staticcheck |
| 29 | - unused |
| 30 | - unparam |
| 31 | exclusions: |
| 32 | rules: |
| 33 | - path: ".*_test.go" |
| 34 | linters: |
| 35 | - gocritic |
| 36 | - gosec |
| 37 | - govet |
| 38 | - fieldalignment |
| 39 | - unparam |
| 40 | - staticcheck |
| 41 | |
| 42 | - text: "ifElseChain:" |
| 43 | linters: |
| 44 | - gocritic |
| 45 | - text: "G115: integer overflow conversion" |
| 46 | linters: |
| 47 | - gosec |
| 48 | - text: "SA1019" |
| 49 | linters: |
| 50 | - staticcheck |
| 51 | - text: "QF1008: could remove embedded field" |
| 52 | linters: |
| 53 | - staticcheck |
| Kent Hagerman | 812b257 | 2020-01-28 11:57:51 -0500 | [diff] [blame] | 54 | |
| Akash Reddy Kankanala | 929cc00 | 2025-04-08 15:05:21 +0530 | [diff] [blame] | 55 | linters-settings: |
| 56 | govet: |
| 57 | enable: |
| 58 | - shadow |
| 59 | - fieldalignment |
| 60 | gocyclo: |
| 61 | min-complexity: 40 |
| 62 | misspell: |
| 63 | locale: US |
| 64 | ignore-words: |
| 65 | - cancelled |
| 66 | - artefacts |
| 67 | |
| mgouda | 2f7349d | 2025-10-29 10:06:00 +0530 | [diff] [blame] | 68 | formatters: |
| 69 | enable: |
| 70 | - gofmt |
| 71 | - goimports |
| 72 | |
| Kent Hagerman | 812b257 | 2020-01-28 11:57:51 -0500 | [diff] [blame] | 73 | run: |
| Kent Hagerman | dcd4dcc | 2020-02-25 17:56:17 -0500 | [diff] [blame] | 74 | modules-download-mode: vendor |