11---
22run :
33 concurrency : 6
4- deadline : 5m
4+ timeout : 5m
55issues :
66 exclude-rules :
77 # counterfeiter fakes are usually named 'fake_<something>.go'
@@ -10,22 +10,31 @@ issues:
1010 - gocritic
1111 - golint
1212 - dupl
13+
14+ # Maximum issues count per one linter. Set to 0 to disable. Default is 50.
15+ max-issues-per-linter : 0
16+
17+ # Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
18+ max-same-issues : 0
1319linters :
1420 disable-all : true
1521 enable :
1622 - asasalint
1723 - asciicheck
1824 - bidichk
1925 - bodyclose
20- - containedctx
2126 - contextcheck
2227 - decorder
2328 - dogsled
2429 - dupl
2530 - durationcheck
2631 - errcheck
2732 - errchkjson
33+ - errname
2834 - execinquery
35+ - ginkgolinter
36+ - gocheckcompilerdirectives
37+ - gochecksumtype
2938 - goconst
3039 - gocritic
3140 - gocyclo
@@ -37,37 +46,47 @@ linters:
3746 - gomoddirectives
3847 - gomodguard
3948 - goprintffuncname
49+ - gosec
4050 - gosimple
51+ - gosmopolitan
4152 - govet
4253 - grouper
4354 - importas
4455 - ineffassign
45- - interfacebloat
46- - ireturn
47- - logrlint
48- - maintidx
56+ - loggercheck
4957 - makezero
58+ - mirror
5059 - misspell
60+ - musttag
5161 - nakedret
52- - nilnil
62+ - nolintlint
5363 - nosprintfhostport
64+ - perfsprint
5465 - prealloc
5566 - predeclared
5667 - promlinter
68+ - protogetter
5769 - reassign
70+ - revive
5871 - rowserrcheck
72+ - sloglint
5973 - sqlclosecheck
6074 - staticcheck
6175 - stylecheck
76+ - tagalign
6277 - tenv
78+ - testableexamples
6379 - typecheck
6480 - unconvert
6581 - unparam
6682 - unused
6783 - usestdlibvars
6884 - whitespace
85+ - zerologlint
86+ # - containedctx
6987 # - cyclop
70- # - errname
88+ # - depguard
89+ # - dupword
7190 # - errorlint
7291 # - exhaustive
7392 # - exhaustruct
@@ -82,16 +101,19 @@ linters:
82101 # - godot
83102 # - goerr113
84103 # - gomnd
85- # - gosec
104+ # - inamedparam
105+ # - interfacebloat
106+ # - ireturn
86107 # - lll
108+ # - maintidx
87109 # - nestif
88110 # - nilerr
111+ # - nilnil
89112 # - nlreturn
90113 # - noctx
91- # - nolintlint
92114 # - nonamedreturns
93115 # - paralleltest
94- # - revive
116+ # - testifylint
95117 # - tagliatelle
96118 # - testpackage
97119 # - thelper
@@ -101,6 +123,8 @@ linters:
101123 # - wrapcheck
102124 # - wsl
103125linters-settings :
126+ gocyclo :
127+ min-complexity : 40
104128 godox :
105129 keywords :
106130 - BUG
@@ -111,114 +135,119 @@ linters-settings:
111135 check-blank : true
112136 gocritic :
113137 enabled-checks :
114- # Diagnostic
115138 - appendAssign
139+ - appendCombine
116140 - argOrder
141+ - assignOp
117142 - badCall
118143 - badCond
119144 - badLock
120145 - badRegexp
121146 - badSorting
147+ - boolExprSimplify
148+ - builtinShadow
122149 - builtinShadowDecl
150+ - captLocal
123151 - caseOrder
124152 - codegenComment
153+ - commentFormatting
125154 - commentedOutCode
155+ - commentedOutImport
156+ - defaultCaseOrder
126157 - deferInLoop
158+ - deferUnlambda
127159 - deprecatedComment
160+ - docStub
128161 - dupArg
129162 - dupBranchBody
130163 - dupCase
164+ - dupImport
131165 - dupSubExpr
132166 - dynamicFmtString
167+ - elseif
133168 - emptyDecl
169+ - emptyFallthrough
170+ - emptyStringTest
171+ - equalFold
134172 - evalOrder
135173 - exitAfterDefer
174+ - exposedSyncMutex
136175 - externalErrorReassign
137176 - filepathJoin
138177 - flagDeref
139178 - flagName
179+ - hexLiteral
180+ - httpNoBody
181+ - hugeParam
182+ - ifElseChain
183+ - importShadow
184+ - indexAlloc
185+ - initClause
140186 - mapKey
187+ - methodExprCall
188+ - nestingReduce
189+ - newDeref
141190 - nilValReturn
191+ - octalLiteral
142192 - offBy1
143- - regexpPattern
144- - returnAfterHttpError
145- - sloppyReassign
146- - sloppyTypeAssert
147- - sortSlice
148- - sprintfQuotedString
149- - sqlQuery
150- - syncMapLoadAndDelete
151- - truncateCmp
152- - unnecessaryDefer
153- - weakCond
154-
155- # Performance
156- - appendCombine
157- - equalFold
158- - hugeParam
159- - indexAlloc
193+ - paramTypeCombine
160194 - preferDecodeRune
195+ - preferFilepathJoin
161196 - preferFprint
162197 - preferStringWriter
163198 - preferWriteByte
199+ - ptrToRefParam
164200 - rangeExprCopy
165201 - rangeValCopy
166- - sliceClear
167- - stringXbytes
168-
169- # Style
170- - assignOp
171- - boolExprSimplify
172- - captLocal
173- - commentFormatting
174- - commentedOutImport
175- - defaultCaseOrder
176- - deferUnlambda
177- - docStub
178- - dupImport
179- - elseif
180- - emptyFallthrough
181- - emptyStringTest
182- - exposedSyncMutex
183- - hexLiteral
184- - httpNoBody
185- - ifElseChain
186- - methodExprCall
187- - newDeref
188- - octalLiteral
189- - preferFilepathJoin
190202 - redundantSprint
191203 - regexpMust
204+ - regexpPattern
192205 - regexpSimplify
206+ - returnAfterHttpError
193207 - ruleguard
194208 - singleCaseSwitch
209+ - sliceClear
195210 - sloppyLen
211+ - sloppyReassign
212+ - sloppyTypeAssert
213+ - sortSlice
214+ - sprintfQuotedString
215+ - sqlQuery
196216 - stringConcatSimplify
217+ - stringXbytes
197218 - stringsCompare
198219 - switchTrue
220+ - syncMapLoadAndDelete
199221 - timeCmpSimplify
200222 - timeExprSimplify
201- - todoCommentWithoutDetail
202223 - tooManyResultsChecker
224+ - truncateCmp
203225 - typeAssertChain
204226 - typeDefFirst
205227 - typeSwitchVar
228+ - typeUnparen
229+ - uncheckedInlineErr
206230 - underef
207231 - unlabelStmt
208232 - unlambda
233+ - unnamedResult
234+ - unnecessaryBlock
235+ - unnecessaryDefer
209236 - unslice
210237 - valSwap
238+ - weakCond
211239 - wrapperFunc
212240 - yodaStyleExpr
213- # - whyNoLint
214-
215- # Opinionated
216- - builtinShadow
217- - importShadow
218- - initClause
219- - nestingReduce
220- - paramTypeCombine
221- - ptrToRefParam
222- - typeUnparen
223- - unnamedResult
224- - unnecessaryBlock
241+ nolintlint :
242+ # Enable to ensure that nolint directives are all used. Default is true.
243+ allow-unused : false
244+ # Disable to ensure that nolint directives don't have a leading space. Default is true.
245+ # TODO(lint): Enforce machine-readable `nolint` directives
246+ allow-leading-space : true
247+ # Exclude following linters from requiring an explanation. Default is [].
248+ allow-no-explanation : []
249+ # Enable to require an explanation of nonzero length after each nolint directive. Default is false.
250+ # TODO(lint): Enforce explanations for `nolint` directives
251+ require-explanation : false
252+ # Enable to require nolint directives to mention the specific linter being suppressed. Default is false.
253+ require-specific : true
0 commit comments