Skip to content

Commit d4884d5

Browse files
committed
linter: migrate .golangci.yml to v2
The migration was done via: golangci-lint migrate --skip-validation
1 parent 049be3e commit d4884d5

File tree

1 file changed

+30
-24
lines changed

1 file changed

+30
-24
lines changed

.golangci.yml

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
1+
version: "2"
12
run:
2-
# timeout for analysis
3-
timeout: 4m
4-
53
# Linting uses a lot of memory. Keep it under control by only running a single
64
# worker.
75
concurrency: 1
8-
9-
linters-settings:
10-
gofmt:
11-
# simplify code: gofmt with `-s` option, true by default
12-
simplify: true
13-
146
linters:
157

168
# Specify an enabled list of linters rather than a disabled list because
@@ -19,27 +11,41 @@ linters:
1911
- bodyclose
2012
- copyloopvar
2113
- dupl
22-
- errcheck
2314
- goconst
2415
- gocritic
2516
- gocyclo
26-
- gofmt
27-
- goimports
28-
- gosimple
29-
- govet
30-
- ineffassign
3117
- misspell
3218
- nakedret
3319
- prealloc
3420
- staticcheck
35-
- stylecheck
36-
- typecheck
3721
- unconvert
3822
- unparam
39-
- unused
40-
41-
issues:
42-
exclude-rules:
43-
- path: internal/test
44-
linters:
45-
- goconst
23+
exclusions:
24+
generated: lax
25+
presets:
26+
- comments
27+
- common-false-positives
28+
- legacy
29+
- std-error-handling
30+
rules:
31+
- linters:
32+
- goconst
33+
path: internal/test
34+
paths:
35+
- third_party$
36+
- builtin$
37+
- examples$
38+
formatters:
39+
enable:
40+
- gofmt
41+
- goimports
42+
settings:
43+
gofmt:
44+
# simplify code: gofmt with `-s` option, true by default
45+
simplify: true
46+
exclusions:
47+
generated: lax
48+
paths:
49+
- third_party$
50+
- builtin$
51+
- examples$

0 commit comments

Comments
 (0)