Skip to content

Commit aa2ed7b

Browse files
committed
chore: clean up and sort golangci-lint configuration
Signed-off-by: Matthieu MOREL <[email protected]>
1 parent 96a5ad6 commit aa2ed7b

File tree

1 file changed

+20
-28
lines changed

1 file changed

+20
-28
lines changed

.golangci.yml

+20-28
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,20 @@
1-
version: "2"
1+
formatters:
2+
enable:
3+
- gofmt
4+
- gofumpt
5+
- goimports
6+
exclusions:
7+
generated: strict
8+
paths:
9+
- ^.*\.(pb|y)\.go$
10+
settings:
11+
gofumpt:
12+
extra-rules: true
13+
goimports:
14+
local-prefixes:
15+
- github.com/prometheus/client_golang
216
issues:
317
max-same-issues: 0
4-
518
linters:
619
enable:
720
- copyloopvar
@@ -17,7 +30,9 @@ linters:
1730
- usestdlibvars
1831
- wastedassign
1932
exclusions:
20-
generated: lax
33+
generated: strict
34+
paths:
35+
- ^.*\.(pb|y)\.go$
2136
presets:
2237
- comments
2338
- common-false-positives
@@ -30,11 +45,7 @@ linters:
3045
- structcheck
3146
- nolintlint
3247
path: _test.go
33-
paths:
34-
- ^.*\.(pb|y)\.go$
35-
- third_party$
36-
- builtin$
37-
- examples$
48+
warn-unused: true
3849
settings:
3950
depguard:
4051
rules:
@@ -65,26 +76,7 @@ linters:
6576
strconcat: true
6677
revive:
6778
rules:
68-
6979
- name: unused-parameter
7080
severity: warning
7181
disabled: true
72-
73-
formatters:
74-
enable:
75-
- gofmt
76-
- gofumpt
77-
- goimports
78-
settings:
79-
gofumpt:
80-
extra-rules: true
81-
goimports:
82-
local-prefixes:
83-
- github.com/prometheus/client_golang
84-
exclusions:
85-
generated: lax
86-
paths:
87-
- ^.*\.(pb|y)\.go$
88-
- third_party$
89-
- builtin$
90-
- examples$
82+
version: "2"

0 commit comments

Comments
 (0)