blob: 92569b7eba8c8bf257331027d562bc7a690e8552 [file] [log] [blame]
Joey Armstrong7a9af442024-01-03 19:26:36 -05001# Copyright 2020-2024 Open Networking Foundation (ONF) and the ONF Contributors
Kent Hagerman812b2572020-01-28 11:57:51 -05002#
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 Kankanala929cc002025-04-08 15:05:21 +053015linters-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 Hagerman812b2572020-01-28 11:57:51 -050028run:
Kent Hagermandcd4dcc2020-02-25 17:56:17 -050029 modules-download-mode: vendor
30
31linters:
32 enable:
Kent Hagermandcd4dcc2020-02-25 17:56:17 -050033 #- gochecknoglobals
34 #- gochecknoinits
Andrey Pozolotin34dd63f2021-05-31 21:26:40 +030035 - gocritic
36 - gofmt
37 - gosec
38 - errcheck
Akash Reddy Kankanala929cc002025-04-08 15:05:21 +053039 - gocyclo
40 - govet
41 - ineffassign
42 - misspell
43 - gosec
44 - goimports
45 - gosimple
46 - staticcheck
47 - unused
48 - unparam
49
50issues:
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'