Skip to content

Commit de44574

Browse files
authored
Merge pull request #125 from saschagrunert/lint
Update golangci-lint config and fix reports
2 parents 3122958 + f6fed87 commit de44574

29 files changed

+343
-99
lines changed

.golangci.yml

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,6 @@ run:
33
concurrency: 6
44
timeout: 5m
55
issues:
6-
exclude-rules:
7-
# counterfeiter fakes are usually named 'fake_<something>.go'
8-
- path: fake_.*\.go
9-
linters:
10-
- gocritic
11-
- golint
12-
- dupl
13-
146
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
157
max-issues-per-linter: 0
168

@@ -29,10 +21,13 @@ linters:
2921
- decorder
3022
- dogsled
3123
- dupl
24+
- dupword
3225
- durationcheck
3326
- errcheck
3427
- errchkjson
3528
- errname
29+
- errorlint
30+
- exptostd
3631
- fatcontext
3732
- gci
3833
- ginkgolinter
@@ -55,6 +50,7 @@ linters:
5550
- gosmopolitan
5651
- govet
5752
- grouper
53+
- iface
5854
- importas
5955
- ineffassign
6056
- intrange
@@ -64,6 +60,8 @@ linters:
6460
- misspell
6561
- musttag
6662
- nakedret
63+
- nilnesserr
64+
- nlreturn
6765
- nolintlint
6866
- nosprintfhostport
6967
- perfsprint
@@ -72,6 +70,7 @@ linters:
7270
- promlinter
7371
- protogetter
7472
- reassign
73+
- recvcheck
7574
- revive
7675
- rowserrcheck
7776
- sloglint
@@ -88,14 +87,14 @@ linters:
8887
- unparam
8988
- unused
9089
- usestdlibvars
90+
- usetesting
9191
- whitespace
92+
- wsl
9293
- zerologlint
9394
# - containedctx
9495
# - cyclop
9596
# - depguard
96-
# - dupword
9797
# - err113
98-
# - errorlint
9998
# - exhaustive
10099
# - exhaustruct
101100
# - forbidigo
@@ -113,7 +112,6 @@ linters:
113112
# - nestif
114113
# - nilerr
115114
# - nilnil
116-
# - nlreturn
117115
# - noctx
118116
# - nonamedreturns
119117
# - paralleltest
@@ -124,7 +122,6 @@ linters:
124122
# - varnamelen
125123
# - wastedassign
126124
# - wrapcheck
127-
# - wsl
128125
linters-settings:
129126
gci:
130127
sections:
@@ -140,9 +137,6 @@ linters-settings:
140137
- BUG
141138
- FIXME
142139
- HACK
143-
errcheck:
144-
check-type-assertions: true
145-
check-blank: true
146140
gocritic:
147141
enabled-checks:
148142
- appendCombine
@@ -185,6 +179,7 @@ linters-settings:
185179
- preferStringWriter
186180
- preferWriteByte
187181
- ptrToRefParam
182+
- rangeAppendAll
188183
- rangeExprCopy
189184
- rangeValCopy
190185
- redundantSprint
@@ -216,16 +211,3 @@ linters-settings:
216211
- weakCond
217212
- yodaStyleExpr
218213
# - whyNoLint
219-
nolintlint:
220-
# Enable to ensure that nolint directives are all used. Default is true.
221-
allow-unused: false
222-
# Disable to ensure that nolint directives don't have a leading space. Default is true.
223-
# TODO(lint): Enforce machine-readable `nolint` directives
224-
allow-leading-space: true
225-
# Exclude following linters from requiring an explanation. Default is [].
226-
allow-no-explanation: []
227-
# Enable to require an explanation of nonzero length after each nolint directive. Default is false.
228-
# TODO(lint): Enforce explanations for `nolint` directives
229-
require-explanation: false
230-
# Enable to require nolint directives to mention the specific linter being suppressed. Default is false.
231-
require-specific: true

0 commit comments

Comments
 (0)