Skip to content

Commit 719389c

Browse files
committed
Update golangci-lint config to version 2 format.
1 parent 1593995 commit 719389c

1 file changed

Lines changed: 73 additions & 44 deletions

File tree

.golangci.toml

Lines changed: 73 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,80 @@
1+
version = '2'
2+
13
[run]
2-
timeout = "10m"
3-
tests = true
4+
tests = true
45

56
[linters]
6-
disable-all = true
7-
enable = [
8-
"asciicheck",
9-
"bidichk",
10-
"contextcheck",
11-
# "copyloopvar",
12-
"decorder",
13-
"dogsled",
14-
"dupl",
15-
"dupword",
16-
"errcheck",
17-
"errname",
18-
"errorlint",
19-
"forcetypeassert",
20-
"gocheckcompilerdirectives",
21-
"gocyclo",
22-
"godot",
23-
"gofumpt",
24-
"gosimple",
25-
"govet",
26-
"ineffassign",
27-
"misspell",
28-
"nakedret",
29-
"nilerr",
30-
"nilnil",
31-
"nolintlint",
32-
"prealloc",
33-
"predeclared",
34-
"staticcheck",
35-
"stylecheck",
36-
"typecheck",
37-
"unconvert",
38-
"unparam",
39-
"unused",
40-
"wastedassign",
41-
"whitespace",
42-
]
7+
default = 'none'
8+
enable = [
9+
'asciicheck',
10+
'bidichk',
11+
'contextcheck',
12+
'decorder',
13+
'dogsled',
14+
'dupl',
15+
'dupword',
16+
'errcheck',
17+
'errname',
18+
'errorlint',
19+
'forcetypeassert',
20+
'gocheckcompilerdirectives',
21+
'gocyclo',
22+
'godot',
23+
'govet',
24+
'ineffassign',
25+
'misspell',
26+
'nakedret',
27+
'nilerr',
28+
'nilnil',
29+
'nolintlint',
30+
'prealloc',
31+
'predeclared',
32+
'staticcheck',
33+
'unconvert',
34+
'unparam',
35+
'unused',
36+
'wastedassign',
37+
'whitespace'
38+
]
39+
40+
[linters.settings.staticcheck]
41+
checks = [
42+
'all',
43+
'-ST1001',
44+
'-ST1003',
45+
'-ST1005'
46+
]
47+
48+
[linters.exclusions]
49+
generated = 'lax'
50+
presets = [
51+
'comments',
52+
'common-false-positives',
53+
'legacy',
54+
'std-error-handling'
55+
]
56+
paths = [
57+
'third_party$',
58+
'builtin$',
59+
'examples$'
60+
]
4361

4462
[issues]
45-
fix = true
63+
fix = true
64+
65+
[formatters]
66+
enable = [
67+
'gofumpt'
68+
]
4669

47-
[linters-settings.gofumpt]
48-
extra-rules = true
70+
[formatters.settings]
71+
[formatters.settings.gofumpt]
72+
extra-rules = true
4973

50-
[linters-settings.stylecheck]
51-
checks = ["all", "-ST1001", "-ST1003", "-ST1005"]
74+
[formatters.exclusions]
75+
generated = 'lax'
76+
paths = [
77+
'third_party$',
78+
'builtin$',
79+
'examples$'
80+
]

0 commit comments

Comments
 (0)