Skip to content

Commit 26087e8

Browse files
committed
migrate .golangci.yml to v2
1 parent 8c2a846 commit 26087e8

File tree

1 file changed

+25
-13
lines changed

1 file changed

+25
-13
lines changed

.golangci.yml

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,30 @@
1+
version: "2"
12
linters:
23
enable:
34
- gocyclo
45
- misspell
56
- revive
6-
7-
linters-settings:
8-
gocyclo:
9-
# minimal code complexity to report, 30 by default (but we recommend 10-20)
10-
min-complexity: 15
11-
12-
issues:
13-
# List of regexps of issue texts to exclude, empty list by default.
14-
# But independently from this option we use default exclude patterns,
15-
# it can be disabled by `exclude-use-default: false`. To list all
16-
# excluded by default patterns execute `golangci-lint run --help`
17-
exclude:
18-
- SA5008 # ignore staticcheck for go-flags
7+
settings:
8+
gocyclo:
9+
min-complexity: 15
10+
exclusions:
11+
generated: lax
12+
presets:
13+
- comments
14+
- common-false-positives
15+
- legacy
16+
- std-error-handling
17+
rules:
18+
- path: (.+)\.go$
19+
text: SA5008 # ignore staticcheck for go-flags
20+
paths:
21+
- third_party$
22+
- builtin$
23+
- examples$
24+
formatters:
25+
exclusions:
26+
generated: lax
27+
paths:
28+
- third_party$
29+
- builtin$
30+
- examples$

0 commit comments

Comments
 (0)