File tree 3 files changed +24
-7
lines changed 3 files changed +24
-7
lines changed Original file line number Diff line number Diff line change @@ -151,9 +151,10 @@ linters-settings:
151
151
for-loops : false # Report preallocation suggestions on for loops, false by default
152
152
gocritic :
153
153
# which checks should be enabled; can't be combined with 'disabled-checks';
154
- # default are: [appendAssign assignOp caseOrder dupArg dupBranchBody dupCase flagDeref
155
- # ifElseChain regexpMust singleCaseSwitch sloppyLen switchTrue typeSwitchVar underef
156
- # unlambda unslice rangeValCopy defaultCaseOrder];
154
+ # default are: [appendAssign appendCombine assignOp builtinShadow captLocal caseOrder defaultCaseOrder
155
+ # dupArg dupBranchBody dupCase elseif flagDeref ifElseChain importShadow indexAlloc paramTypeCombine
156
+ # rangeExprCopy rangeValCopy regexpMust singleCaseSwitch sloppyLen switchTrue typeSwitchVar typeUnparen
157
+ # underef unlambda unslice dupSubExpr hugeParam];
157
158
# all checks list: https://github.com/go-critic/checkers
158
159
enabled-checks :
159
160
- rangeValCopy
Original file line number Diff line number Diff line change @@ -493,6 +493,7 @@ Global Flags:
493
493
--cpu-profile-path string Path to CPU profile output file
494
494
--mem-profile-path string Path to memory profile output file
495
495
-v, --verbose verbose output
496
+ --version Print version
496
497
497
498
```
498
499
@@ -667,9 +668,10 @@ linters-settings:
667
668
for-loops: false # Report preallocation suggestions on for loops, false by default
668
669
gocritic:
669
670
# which checks should be enabled; can't be combined with 'disabled-checks';
670
- # default are: [appendAssign assignOp caseOrder dupArg dupBranchBody dupCase flagDeref
671
- # ifElseChain regexpMust singleCaseSwitch sloppyLen switchTrue typeSwitchVar underef
672
- # unlambda unslice rangeValCopy defaultCaseOrder];
671
+ # default are: [appendAssign appendCombine assignOp builtinShadow captLocal caseOrder defaultCaseOrder
672
+ # dupArg dupBranchBody dupCase elseif flagDeref ifElseChain importShadow indexAlloc paramTypeCombine
673
+ # rangeExprCopy rangeValCopy regexpMust singleCaseSwitch sloppyLen switchTrue typeSwitchVar typeUnparen
674
+ # underef unlambda unslice dupSubExpr hugeParam];
673
675
# all checks list: https://github.com/go-critic/checkers
674
676
enabled-checks:
675
677
- rangeValCopy
Original file line number Diff line number Diff line change @@ -257,24 +257,38 @@ func (s GocriticSettings) IsCheckEnabled(name string) bool {
257
257
return s .inferredEnabledChecks [strings .ToLower (name )]
258
258
}
259
259
260
+ // Its a good idea to keep this list in sync with the gocritic stable checks list in:
261
+ // https://github.com/go-critic/go-critic/blob/master/checkers/checkers_test.go#L63
260
262
var defaultGocriticEnabledChecks = []string {
261
263
"appendAssign" ,
264
+ "appendCombine" ,
262
265
"assignOp" ,
266
+ "builtinShadow" ,
267
+ "captLocal" ,
263
268
"caseOrder" ,
269
+ "defaultCaseOrder" ,
264
270
"dupArg" ,
265
271
"dupBranchBody" ,
266
272
"dupCase" ,
273
+ "elseif" ,
267
274
"flagDeref" ,
268
275
"ifElseChain" ,
276
+ "importShadow" ,
277
+ "indexAlloc" ,
278
+ "paramTypeCombine" ,
279
+ "rangeExprCopy" ,
280
+ "rangeValCopy" ,
269
281
"regexpMust" ,
270
282
"singleCaseSwitch" ,
271
283
"sloppyLen" ,
272
284
"switchTrue" ,
273
285
"typeSwitchVar" ,
286
+ "typeUnparen" ,
274
287
"underef" ,
275
288
"unlambda" ,
276
289
"unslice" ,
277
- "defaultCaseOrder" ,
290
+ "dupSubExpr" ,
291
+ "hugeParam" ,
278
292
}
279
293
280
294
var defaultLintersSettings = LintersSettings {
You can’t perform that action at this time.
0 commit comments