File tree Expand file tree Collapse file tree 3 files changed +24
-7
lines changed
Expand file tree Collapse file tree 3 files changed +24
-7
lines changed Original file line number Diff line number Diff line change @@ -151,9 +151,10 @@ linters-settings:
151151 for-loops : false # Report preallocation suggestions on for loops, false by default
152152 gocritic :
153153 # 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];
157158 # all checks list: https://github.com/go-critic/checkers
158159 enabled-checks :
159160 - rangeValCopy
Original file line number Diff line number Diff line change @@ -493,6 +493,7 @@ Global Flags:
493493 --cpu-profile-path string Path to CPU profile output file
494494 --mem-profile-path string Path to memory profile output file
495495 -v, --verbose verbose output
496+ --version Print version
496497
497498```
498499
@@ -667,9 +668,10 @@ linters-settings:
667668 for-loops: false # Report preallocation suggestions on for loops, false by default
668669 gocritic:
669670 # 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];
673675 # all checks list: https://github.com/go-critic/checkers
674676 enabled-checks:
675677 - rangeValCopy
Original file line number Diff line number Diff line change @@ -257,24 +257,38 @@ func (s GocriticSettings) IsCheckEnabled(name string) bool {
257257 return s .inferredEnabledChecks [strings .ToLower (name )]
258258}
259259
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
260262var defaultGocriticEnabledChecks = []string {
261263 "appendAssign" ,
264+ "appendCombine" ,
262265 "assignOp" ,
266+ "builtinShadow" ,
267+ "captLocal" ,
263268 "caseOrder" ,
269+ "defaultCaseOrder" ,
264270 "dupArg" ,
265271 "dupBranchBody" ,
266272 "dupCase" ,
273+ "elseif" ,
267274 "flagDeref" ,
268275 "ifElseChain" ,
276+ "importShadow" ,
277+ "indexAlloc" ,
278+ "paramTypeCombine" ,
279+ "rangeExprCopy" ,
280+ "rangeValCopy" ,
269281 "regexpMust" ,
270282 "singleCaseSwitch" ,
271283 "sloppyLen" ,
272284 "switchTrue" ,
273285 "typeSwitchVar" ,
286+ "typeUnparen" ,
274287 "underef" ,
275288 "unlambda" ,
276289 "unslice" ,
277- "defaultCaseOrder" ,
290+ "dupSubExpr" ,
291+ "hugeParam" ,
278292}
279293
280294var defaultLintersSettings = LintersSettings {
You can’t perform that action at this time.
0 commit comments