Skip to content

Commit 5ca9bf0

Browse files
committed
golangci-lint migrate
1 parent 534b114 commit 5ca9bf0

File tree

1 file changed

+33
-8
lines changed

1 file changed

+33
-8
lines changed

.golangci.yml

Lines changed: 33 additions & 8 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
@@ -22,4 +17,34 @@ linters:
2217
- unconvert
2318
- unparam
2419
- unused
25-
- usetesting
20+
- usetesting
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+
- '-QF1004' # "could use strings.ReplaceAll instead" -- https://staticcheck.dev/docs/checks/#QF1004
37+
- '-ST1016' # example: "methods on the same type should have the same receiver name (seen 2x "r", 2x "s")" -- https://staticcheck.dev/docs/checks/#ST1016
38+
39+
issues:
40+
max-issues-per-linter: 0
41+
max-same-issues: 0
42+
formatters:
43+
enable:
44+
- gofmt
45+
exclusions:
46+
generated: lax
47+
paths:
48+
- third_party$
49+
- builtin$
50+
- examples$

0 commit comments

Comments
 (0)