1- run :
2- # The default runtime timeout is 1m, which doesn't work well on Github Actions.
3- timeout : 10m
4-
5- # NOTE: This file is populated by the lint-install tool. Local adjustments may be overwritten.
6- linters-settings :
7- cyclop :
8- # NOTE: This is a very high transitional threshold
9- max-complexity : 37
10- package-average : 34.0
11- skip-tests : true
12-
13- gocognit :
14- # NOTE: This is a very high transitional threshold
15- min-complexity : 98
16-
17- dupl :
18- threshold : 200
19-
20- goconst :
21- min-len : 4
22- min-occurrences : 5
23- ignore-tests : true
24-
25- gosec :
26- excludes :
27- - G107 # Potential HTTP request made with variable url
28- - G204 # Subprocess launched with function call as argument or cmd arguments
29- - G404 # Use of weak random number generator (math/rand instead of crypto/rand
30-
31- errorlint :
32- # these are still common in Go: for instance, exit errors.
33- asserts : false
34- # Forcing %w in error wrapping forces authors to make errors part of their package APIs. The decision to make
35- # an error part of a package API should be a concious decision by the author.
36- # Also see Hyrums Law.
37- errorf : false
38-
39- exhaustive :
40- default-signifies-exhaustive : true
41-
42- nestif :
43- min-complexity : 8
44-
45- nolintlint :
46- require-explanation : true
47- allow-unused : false
48- require-specific : true
49-
50- revive :
51- ignore-generated-header : true
52- severity : warning
53- rules :
54- - name : atomic
55- - name : blank-imports
56- - name : bool-literal-in-expr
57- - name : confusing-naming
58- - name : constant-logical-expr
59- - name : context-as-argument
60- - name : context-keys-type
61- - name : deep-exit
62- - name : defer
63- - name : range-val-in-closure
64- - name : range-val-address
65- - name : dot-imports
66- - name : error-naming
67- - name : error-return
68- - name : error-strings
69- - name : errorf
70- - name : exported
71- - name : identical-branches
72- - name : if-return
73- - name : import-shadowing
74- - name : increment-decrement
75- - name : indent-error-flow
76- - name : indent-error-flow
77- - name : package-comments
78- - name : range
79- - name : receiver-naming
80- - name : redefines-builtin-id
81- - name : superfluous-else
82- - name : struct-tag
83- - name : time-naming
84- - name : unexported-naming
85- - name : unexported-return
86- - name : unnecessary-stmt
87- - name : unreachable-code
88- - name : unused-parameter
89- - name : var-declaration
90- - name : var-naming
91- - name : unconditional-recursion
92- - name : waitgroup-by-value
93-
94- output :
95- sort-results : true
96-
1+ version : " 2"
972linters :
98- disable-all : true
3+ default : none
994 enable :
1005 - asciicheck
1016 - bodyclose
@@ -113,13 +18,9 @@ linters:
11318 - goconst
11419 - gocritic
11520 - godot
116- - gofmt
117- - gofumpt
118- - gosec
11921 - goheader
120- - goimports
12122 - goprintffuncname
122- - gosimple
23+ - gosec
12324 - govet
12425 - importas
12526 - ineffassign
@@ -132,72 +33,139 @@ linters:
13233 - nolintlint
13334 - prealloc
13435 - predeclared
135- # disabling for the initial iteration of the linting tool
136- # - promlinter
13736 - revive
138- # - rowserrcheck - disabled because of generics, https://github.com/golangci/golangci-lint/issues/2649
139- # - sqlclosecheck - disabled because of generics, https://github.com/golangci/golangci-lint/issues/2649
14037 - staticcheck
141- # - structcheck - disabled because of generics, https://github.com/golangci/golangci-lint/issues/2649
142- - stylecheck
14338 - thelper
14439 - tparallel
145- - typecheck
14640 - unconvert
14741 - unparam
14842 - unused
149- # - wastedassign - disabled because of generics, https://github.com/golangci/golangci-lint/issues/2649
15043 - whitespace
151-
152- # Disabled linters, due to being misaligned with Go practices
153- # - exhaustivestruct
154- # - gochecknoglobals
155- # - gochecknoinits
156- # - goconst
157- # - godox
158- # - goerr113
159- # - gomnd
160- # - lll
161- # - nlreturn
162- # - testpackage
163- # - wsl
164- # Disabled linters, due to not being relevant to our code base:
165- # - maligned
166- # - prealloc "For most programs usage of prealloc will be a premature optimization."
167- # Disabled linters due to bad error messages or bugs
168- # - tagliatelle
169-
44+ settings :
45+ cyclop :
46+ # NOTE: This is a very high transitional threshold
47+ max-complexity : 37
48+ package-average : 34
49+ dupl :
50+ threshold : 200
51+ errorlint :
52+ # Forcing %w in error wrapping forces authors to make errors part of their package APIs. The decision to make
53+ # an error part of a package API should be a concious decision by the author.
54+ # Also see Hyrums Law.
55+ errorf : false
56+ # these are still common in Go: for instance, exit errors.
57+ asserts : false
58+ exhaustive :
59+ default-signifies-exhaustive : true
60+ gocognit :
61+ # NOTE: This is a very high transitional threshold
62+ min-complexity : 98
63+ goconst :
64+ min-len : 4
65+ min-occurrences : 5
66+ gosec :
67+ excludes :
68+ - G107 # Potential HTTP request made with variable url
69+ - G204 # Subprocess launched with function call as argument or cmd arguments
70+ - G404 # Use of weak random number generator (math/rand instead of crypto/rand
71+ nestif :
72+ min-complexity : 8
73+ nolintlint :
74+ require-explanation : true
75+ require-specific : true
76+ allow-unused : false
77+ revive :
78+ severity : warning
79+ rules :
80+ - name : atomic
81+ - name : blank-imports
82+ - name : bool-literal-in-expr
83+ - name : confusing-naming
84+ - name : constant-logical-expr
85+ - name : context-as-argument
86+ - name : context-keys-type
87+ - name : deep-exit
88+ - name : defer
89+ - name : range-val-in-closure
90+ - name : range-val-address
91+ - name : dot-imports
92+ - name : error-naming
93+ - name : error-return
94+ - name : error-strings
95+ - name : errorf
96+ - name : exported
97+ - name : identical-branches
98+ - name : if-return
99+ - name : import-shadowing
100+ - name : increment-decrement
101+ - name : indent-error-flow
102+ - name : indent-error-flow
103+ - name : package-comments
104+ - name : range
105+ - name : receiver-naming
106+ - name : redefines-builtin-id
107+ - name : superfluous-else
108+ - name : struct-tag
109+ - name : time-naming
110+ - name : unexported-naming
111+ - name : unexported-return
112+ - name : unnecessary-stmt
113+ - name : unreachable-code
114+ - name : unused-parameter
115+ - name : var-declaration
116+ - name : var-naming
117+ - name : unconditional-recursion
118+ - name : waitgroup-by-value
119+ exclusions :
120+ generated : lax
121+ presets :
122+ - comments
123+ - common-false-positives
124+ - legacy
125+ - std-error-handling
126+ rules :
127+ - linters :
128+ - dupl
129+ - errcheck
130+ - forcetypeassert
131+ - gocyclo
132+ - gosec
133+ - noctx
134+ path : _test\.go
135+ - linters :
136+ - noctx
137+ path : .*cmd.*
138+ - linters :
139+ - noctx
140+ path : main\.go
141+ - path : .*cmd.*
142+ text : deep-exit
143+ - path : main\.go
144+ text : deep-exit
145+ - linters :
146+ # This check is of questionable value
147+ - tparallel
148+ text : call t.Parallel on the top level as well as its subtests
149+ - linters :
150+ - cyclop
151+ - goconst
152+ path : (.+)_test\.go
153+ paths :
154+ - third_party$
155+ - builtin$
156+ - examples$
170157issues :
171- # Excluding configuration per-path, per-linter, per-text and per-source
172- exclude-rules :
173- - path : _test\.go
174- linters :
175- - dupl
176- - errcheck
177- - forcetypeassert
178- - gocyclo
179- - gosec
180- - noctx
181-
182- - path : .*cmd.*
183- linters :
184- - noctx
185-
186- - path : main\.go
187- linters :
188- - noctx
189-
190- - path : .*cmd.*
191- text : " deep-exit"
192-
193- - path : main\.go
194- text : " deep-exit"
195-
196- # This check is of questionable value
197- - linters :
198- - tparallel
199- text : " call t.Parallel on the top level as well as its subtests"
200-
201158 # Don't hide lint issues just because there are many of them
202- max-same-issues : 0
203159 max-issues-per-linter : 0
160+ max-same-issues : 0
161+ formatters :
162+ enable :
163+ - gofmt
164+ - gofumpt
165+ - goimports
166+ exclusions :
167+ generated : lax
168+ paths :
169+ - third_party$
170+ - builtin$
171+ - examples$
0 commit comments