Skip to content

Commit 8295516

Browse files
committed
fix golangci lint yaml to v2
1 parent ded2d6e commit 8295516

File tree

1 file changed

+42
-43
lines changed

1 file changed

+42
-43
lines changed

.golangci.yaml

Lines changed: 42 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,51 @@
1+
version: "2"
12
run:
2-
timeout: 5m
33
issues-exit-code: 1
44
tests: true
5-
skip-dirs:
6-
- local
7-
8-
issues:
9-
max-same-issues: 100
10-
exclude-rules:
11-
- path: _test\.go
12-
linters:
13-
- bodyclose
14-
- errcheck
15-
- gosec
16-
5+
output:
6+
formats:
7+
text:
8+
path: stdout
9+
print-linter-name: true
10+
print-issued-lines: true
11+
path-prefix: ""
1712
linters:
1813
enable:
1914
- bodyclose
20-
- exportloopref
21-
- gofumpt
22-
- goimports
23-
- gosec
24-
- gosimple
25-
- govet
26-
- ineffassign
15+
- copyloopvar
2716
- misspell
2817
- revive
29-
- staticcheck
30-
- typecheck
31-
- unused
3218
- whitespace
33-
34-
output:
35-
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
36-
format: colored-line-number
37-
# print lines of code with issue, default is true
38-
print-issued-lines: true
39-
# print linter name in the end of issue text, default is true
40-
print-linter-name: true
41-
# make issues output unique by line, default is true
42-
uniq-by-line: true
43-
# add a prefix to the output file references; default is no prefix
44-
path-prefix: ""
45-
# sorts results by: filepath, line and column
46-
sort-results: true
47-
48-
linters-settings:
49-
golint:
50-
min-confidence: 0.8
51-
52-
fix: true
19+
exclusions:
20+
generated: lax
21+
presets:
22+
- common-false-positives
23+
- legacy
24+
- std-error-handling
25+
rules:
26+
- linters:
27+
- revive
28+
path: example_test.go
29+
text: seems to be unused
30+
- linters:
31+
- revive
32+
text: package-comments
33+
paths:
34+
- local
35+
- third_party$
36+
- builtin$
37+
- examples$
38+
issues:
39+
max-same-issues: 100
40+
fix: true
41+
formatters:
42+
enable:
43+
- gofumpt
44+
- goimports
45+
exclusions:
46+
generated: lax
47+
paths:
48+
- local
49+
- third_party$
50+
- builtin$
51+
- examples$

0 commit comments

Comments
 (0)