1+ # Copyright 2023 The Authors (see AUTHORS file)
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+
115run :
216 # default: '1m'
317 timeout : ' 5m'
418
519 # default: []
6- build-tags : []
20+ build-tags :
21+ - ' all'
22+
23+ # default: []
24+ exclude-dirs :
25+ - ' third_party'
26+
27+ # default: true
28+ skip-dirs-use-default : false
729
830 # default: ''
931 modules-download-mode : ' readonly'
@@ -13,107 +35,103 @@ run:
1335
1436linters :
1537 enable :
16- - ' asasalint'
17- - ' asciicheck'
18- - ' bidichk'
19- - ' bodyclose'
20- - ' containedctx'
21- - ' contextcheck'
22- - ' cyclop'
23- - ' decorder'
24- - ' depguard'
25- - ' dogsled'
26- - ' dupl'
27- - ' dupword'
28- - ' durationcheck'
29- - ' errcheck'
30- - ' errchkjson'
31- - ' errname'
32- - ' errorlint'
33- - ' execinquery'
34- - ' exhaustive'
35- - ' exhaustruct'
36- - ' exportloopref'
37- - ' forbidigo'
38- - ' forcetypeassert'
39- - ' funlen'
40- - ' gci'
41- - ' gochecknoglobals'
42- - ' gochecknoinits'
43- - ' gocognit'
44- - ' goconst'
45- - ' gocritic'
46- - ' gocyclo'
47- - ' godot'
48- - ' godox'
49- - ' goerr113'
50- - ' gofumpt'
51- - ' goheader'
52- - ' goimports'
53- - ' gomnd'
54- - ' gomoddirectives'
55- - ' gomodguard'
56- - ' goprintffuncname'
57- - ' gosec'
58- - ' gosimple'
59- - ' govet'
60- - ' grouper'
61- - ' importas'
62- - ' ineffassign'
63- - ' interfacebloat'
64- - ' ireturn'
65- - ' lll'
66- - ' loggercheck'
67- - ' maintidx'
68- - ' makezero'
69- - ' misspell'
70- - ' nakedret'
71- - ' nestif'
72- - ' nilerr'
73- - ' nilnil'
74- - ' nlreturn'
75- - ' noctx'
76- - ' nolintlint'
77- - ' nonamedreturns'
78- - ' nosprintfhostport'
79- - ' paralleltest'
80- - ' prealloc'
81- - ' predeclared'
82- - ' promlinter'
83- - ' reassign'
84- - ' revive'
85- - ' rowserrcheck'
86- - ' sqlclosecheck'
87- - ' staticcheck'
88- - ' stylecheck'
89- - ' tagliatelle'
90- - ' tenv'
91- - ' testableexamples'
92- - ' testpackage'
93- - ' thelper'
94- - ' tparallel'
95- - ' typecheck'
96- - ' unconvert'
97- - ' unparam'
98- - ' unused'
99- - ' usestdlibvars'
100- - ' varnamelen'
101- - ' wastedassign'
102- - ' whitespace'
103- - ' wrapcheck'
104- - ' wsl'
38+ - ' asasalint'
39+ - ' asciicheck'
40+ - ' bidichk'
41+ - ' bodyclose'
42+ - ' containedctx'
43+ - ' dupword'
44+ - ' durationcheck'
45+ - ' errcheck'
46+ - ' errchkjson'
47+ - ' errname'
48+ - ' errorlint'
49+ - ' execinquery'
50+ - ' exhaustive'
51+ - ' exportloopref'
52+ - ' forcetypeassert'
53+ - ' gci'
54+ - ' gocheckcompilerdirectives'
55+ - ' godot'
56+ - ' gofmt'
57+ - ' gofumpt'
58+ - ' goheader'
59+ - ' goimports'
60+ - ' goprintffuncname'
61+ - ' gosec'
62+ - ' gosimple'
63+ - ' govet'
64+ - ' importas'
65+ - ' ineffassign'
66+ - ' loggercheck'
67+ - ' makezero'
68+ - ' mirror'
69+ - ' misspell'
70+ - ' nilerr'
71+ - ' noctx'
72+ - ' nolintlint'
73+ - ' nosprintfhostport'
74+ - ' paralleltest'
75+ - ' prealloc'
76+ - ' predeclared'
77+ - ' protogetter'
78+ - ' rowserrcheck'
79+ - ' sloglint'
80+ - ' spancheck'
81+ - ' sqlclosecheck'
82+ - ' staticcheck'
83+ - ' stylecheck'
84+ - ' tenv'
85+ - ' thelper'
86+ - ' typecheck'
87+ - ' unconvert'
88+ - ' unused'
89+ - ' wastedassign'
90+ - ' whitespace'
91+ - ' wrapcheck'
10592
10693issues :
10794 # default: []
10895 exclude :
109- - ' ^SA3000:' # staticcheck: not required in Go 11.4+
96+ - ' ^G102:' # gosec: we have to bind to all ifaces in Cloud Run services
97+
98+ # default: []
99+ exclude-rules :
100+ # Exclude test files from certain linters
101+ - path : ' _test.go'
102+ linters :
103+ - ' wrapcheck'
110104
111105 # default: 50
112106 max-issues-per-linter : 0
113107
114108 # default: 3
115109 max-same-issues : 0
116110
111+ gci :
112+ sections :
113+ - ' standard'
114+ - ' default'
115+ - ' blank'
116+ - ' dot'
117+
118+ skip-generated : true
119+ custom-order : true
120+
121+ gofumpt :
122+ # default: false
123+ extra-rules : true
124+
125+ sloglint :
126+ # default: false
127+ context-only : true
128+ # default: false
129+ static-msg : false
130+ # default: '' (snake, kebab, camel, pascal)
131+ key-naming-case : ' snake'
132+ # default: false
133+ args-on-sep-lines : true
134+
117135severity :
118136 # default: ''
119- default-severity : error
137+ default-severity : ' error'
0 commit comments