Skip to content

Commit 0935ce1

Browse files
committed
fix #132: support go-critic linter
1 parent 89b7e42 commit 0935ce1

File tree

313 files changed

+38765
-9811
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

313 files changed

+38765
-9811
lines changed

.golangci.example.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,22 @@ linters-settings:
130130
simple: true
131131
range-loops: true # Report preallocation suggestions on range loops, true by default
132132
for-loops: false # Report preallocation suggestions on for loops, false by default
133-
133+
gocritic:
134+
# which checks should be enabled; can't be combined with 'disabled-checks';
135+
# default are: [appendAssign assignOp caseOrder dupArg dupBranchBody dupCase flagDeref
136+
# ifElseChain regexpMust singleCaseSwitch sloppyLen switchTrue typeSwitchVar underef
137+
# unlambda unslice rangeValCopy defaultCaseOrder];
138+
# all checks list: https://github.com/go-critic/checkers
139+
enabled-checks:
140+
- rangeValCopy
141+
# which checks should be disabled; can't be combined with 'enabled-checks'; default is empty
142+
disabled-checks:
143+
- regexpMust
144+
settings: # settings passed to gocritic
145+
captLocal: # must be valid enabled check name
146+
checkLocals: true
147+
rangeValCopy:
148+
sizeThreshold: 32
134149

135150
linters:
136151
enable:

0 commit comments

Comments
 (0)