Skip to content

Commit 62de6f3

Browse files
authored
fix: clean up golangci lint configuration (#6797)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
1 parent b1e159b commit 62de6f3

File tree

1 file changed

+41
-51
lines changed

1 file changed

+41
-51
lines changed

.golangci.yaml

+41-51
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,19 @@
11
linters-settings:
2+
dupl:
3+
threshold: 100
24
errcheck:
35
check-type-assertions: true
46
check-blank: true
5-
govet:
6-
check-shadowing: false
7-
gofmt:
8-
simplify: false
9-
rewrite-rules:
10-
- pattern: 'interface{}'
11-
replacement: 'any'
12-
revive:
13-
ignore-generated-header: true
14-
gocyclo:
15-
min-complexity: 20
16-
dupl:
17-
threshold: 100
18-
goconst:
19-
min-len: 3
20-
min-occurrences: 3
21-
misspell:
22-
locale: US
23-
ignore-words:
24-
- licence
25-
- optimise
26-
gosec:
27-
excludes:
28-
- G101
29-
- G114
30-
- G204
31-
- G304
32-
- G402
337
gci:
348
sections:
359
- standard
3610
- default
3711
- prefix(github.com/aquasecurity/)
3812
- blank
3913
- dot
40-
gomodguard:
41-
blocked:
42-
modules:
43-
- github.com/hashicorp/go-version:
44-
recommendations:
45-
- github.com/aquasecurity/go-version
46-
reason: "`aquasecurity/go-version` is designed for our use-cases"
47-
- github.com/Masterminds/semver:
48-
recommendations:
49-
- github.com/aquasecurity/go-version
50-
reason: "`aquasecurity/go-version` is designed for our use-cases"
14+
goconst:
15+
min-len: 3
16+
min-occurrences: 3
5117
gocritic:
5218
disabled-checks:
5319
- appendAssign
@@ -70,6 +36,42 @@ linters-settings:
7036
ruleguard:
7137
failOn: all
7238
rules: '${configDir}/misc/lint/rules.go'
39+
gocyclo:
40+
min-complexity: 20
41+
gofmt:
42+
simplify: false
43+
rewrite-rules:
44+
- pattern: 'interface{}'
45+
replacement: 'any'
46+
gomodguard:
47+
blocked:
48+
modules:
49+
- github.com/hashicorp/go-version:
50+
recommendations:
51+
- github.com/aquasecurity/go-version
52+
reason: "`aquasecurity/go-version` is designed for our use-cases"
53+
- github.com/Masterminds/semver:
54+
recommendations:
55+
- github.com/aquasecurity/go-version
56+
reason: "`aquasecurity/go-version` is designed for our use-cases"
57+
gosec:
58+
excludes:
59+
- G101
60+
- G114
61+
- G204
62+
- G304
63+
- G402
64+
govet:
65+
check-shadowing: false
66+
misspell:
67+
locale: US
68+
ignore-words:
69+
- behaviour
70+
- licence
71+
- optimise
72+
- simmilar
73+
revive:
74+
ignore-generated-header: true
7375
testifylint:
7476
enable-all: true
7577
disable:
@@ -111,7 +113,6 @@ issues:
111113
linters:
112114
- goconst
113115
- gosec
114-
- misspell
115116
- unused
116117
- path: ".*_test.go$"
117118
linters:
@@ -129,16 +130,5 @@ issues:
129130
linters:
130131
- gocritic
131132
text: "importShadow:"
132-
- linters:
133-
- errcheck
134-
text: "Close` is not checked"
135-
- linters:
136-
- errcheck
137-
text: "os.*` is not checked"
138-
- linters:
139-
- golint
140-
text: "a blank import should be only in a main or test package"
141-
exclude:
142-
- "should have a package comment, unless it's in another file for this package"
143133
exclude-use-default: false
144134
max-same-issues: 0

0 commit comments

Comments
 (0)