Skip to content

Commit dd50073

Browse files
committed
golangci-lint migrate
1 parent 3d3136b commit dd50073

File tree

1 file changed

+33
-11
lines changed

1 file changed

+33
-11
lines changed

.golangci.yml

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
1-
issues:
2-
max-issues-per-linter: 0
3-
max-same-issues: 0
4-
1+
version: "2"
52
linters:
6-
disable-all: true
3+
default: none
74
enable:
85
- copyloopvar
96
- durationcheck
107
- errcheck
118
- forcetypeassert
12-
- gofmt
13-
- gosimple
149
- govet
1510
- ineffassign
1611
- makezero
@@ -23,7 +18,34 @@ linters:
2318
- unparam
2419
- unused
2520
- usetesting
26-
27-
run:
28-
# Prevent false positive timeouts in CI
29-
timeout: 5m
21+
exclusions:
22+
generated: lax
23+
presets:
24+
- comments
25+
- common-false-positives
26+
- legacy
27+
- std-error-handling
28+
paths:
29+
- third_party$
30+
- builtin$
31+
- examples$
32+
settings:
33+
staticcheck:
34+
checks:
35+
- all
36+
- '-QF1008' # could remove embedded field from selector -- https://staticcheck.io/docs/checks#QF1008
37+
- '-ST1003' # struct field Id should be ID -- https://staticcheck.io/docs/checks#ST1003
38+
- '-ST1005' # error strings should not be capitalized -- https://staticcheck.io/docs/checks#ST1005
39+
- '-ST1016' # methods on the same type should have the same receiver name -- https://staticcheck.io/docs/checks#ST1016
40+
issues:
41+
max-issues-per-linter: 0
42+
max-same-issues: 0
43+
formatters:
44+
enable:
45+
- gofmt
46+
exclusions:
47+
generated: lax
48+
paths:
49+
- third_party$
50+
- builtin$
51+
- examples$

0 commit comments

Comments
 (0)