1
1
run :
2
2
timeout : 10m
3
3
4
- skip-files :
5
- - " zz_generated\\ ..+\\ .go$"
6
-
7
4
output :
8
5
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
9
- format : colored-line-number
6
+ formats :
7
+ - format : colored-line-number
10
8
11
9
linters-settings :
12
10
errcheck :
@@ -18,14 +16,15 @@ linters-settings:
18
16
# default is false: such cases aren't reported by default.
19
17
check-blank : false
20
18
21
- # [deprecated] comma-separated list of pairs of the form pkg:regex
22
- # the regex is used to ignore names within pkg. (default "fmt:.*") .
23
- # see https://github.com/kisielk/errcheck#the-deprecated-method for details
24
- ignore : fmt:.*, io/ioutil:^Read.*
19
+ # List of functions to exclude from checking, where each entry is a single function to exclude.
20
+ # See https://github.com/kisielk/errcheck#excluding-functions for details .
21
+ exclude-functions :
22
+ - io/ioutil.ReadFile
25
23
26
24
govet :
27
25
# report about shadowed variables
28
- check-shadowing : false
26
+ disable :
27
+ - shadow
29
28
30
29
gofmt :
31
30
# simplify code: gofmt with `-s` option, true by default
@@ -45,10 +44,6 @@ linters-settings:
45
44
# minimal code complexity to report, 30 by default (but we recommend 10-20)
46
45
min-complexity : 10
47
46
48
- maligned :
49
- # print struct with more effective memory layout or not, false by default
50
- suggest-new : true
51
-
52
47
dupl :
53
48
# tokens count to trigger issue, 150 by default
54
49
threshold : 100
@@ -116,7 +111,7 @@ linters:
116
111
- misspell
117
112
- nakedret
118
113
- nolintlint
119
-
114
+
120
115
disable :
121
116
# These linters are all deprecated as of golangci-lint v1.49.0. We disable
122
117
# them explicitly to avoid the linter logging deprecation warnings.
@@ -135,6 +130,9 @@ linters:
135
130
issues :
136
131
# Excluding configuration per-path and per-linter
137
132
exclude-rules :
133
+ - path : " zz_generated\\ ..+\\ .go$"
134
+ linters : ["all"]
135
+
138
136
# Exclude some linters from running on tests files.
139
137
- path : _test(ing)?\.go
140
138
linters :
@@ -181,7 +179,7 @@ issues:
181
179
linters :
182
180
- gosec
183
181
- gas
184
-
182
+
185
183
# Some k8s dependencies do not have JSON tags on all fields in structs.
186
184
- path : k8s.io/
187
185
linters :
@@ -202,7 +200,7 @@ issues:
202
200
new : false
203
201
204
202
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
205
- max-per-linter : 0
203
+ max-issues- per-linter : 0
206
204
207
205
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
208
206
max-same-issues : 0
0 commit comments