Skip to content

Commit 8a8a688

Browse files
committed
Migrate golangci-lint config to v2
picking knative#2781 Signed-off-by: Matej Vašek <[email protected]>
1 parent 6157fd1 commit 8a8a688

File tree

1 file changed

+32
-26
lines changed

1 file changed

+32
-26
lines changed

.golangci.yaml

Lines changed: 32 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,37 @@
1-
#
2-
# golangci-lint
3-
#
4-
# For defaults, see:
5-
# https://github.com/golangci/golangci-lint/blob/master/.golangci.example.yml
6-
#
7-
#
8-
#
9-
run:
10-
timeout: 5m
11-
1+
version: "2"
122
linters:
133
enable:
144
- unconvert
155
- prealloc
166
- bodyclose
17-
18-
issues:
19-
exclude-rules:
20-
- linters:
21-
- staticcheck
22-
# Error Text:
23-
# "SA9004: only the first constant in this group has an explicit type"
24-
# Efect:
25-
# Allows short-hand first constant type declarations:
26-
# Example:
27-
# const (
28-
# Name Type = "value"
29-
# Name2 = "value2"
30-
# )
31-
text: "SA9004:"
7+
exclusions:
8+
generated: lax
9+
presets:
10+
- comments
11+
- common-false-positives
12+
- legacy
13+
- std-error-handling
14+
rules:
15+
- linters:
16+
- staticcheck
17+
# Error Text:
18+
# "SA9004: only the first constant in this group has an explicit type"
19+
# Efect:
20+
# Allows short-hand first constant type declarations:
21+
# Example:
22+
# const (
23+
# Name Type = "value"
24+
# Name2 = "value2"
25+
# )
26+
text: 'SA9004:'
27+
paths:
28+
- third_party$
29+
- builtin$
30+
- examples$
31+
formatters:
32+
exclusions:
33+
generated: lax
34+
paths:
35+
- third_party$
36+
- builtin$
37+
- examples$

0 commit comments

Comments
 (0)