Skip to content

Commit 6daecd6

Browse files
committed
ci: update golangci-lint to v2.0.2
Update to the latest version, and migrate the config (using the migrate command). Also tweak the config for staticcheck; enabling all options, but disabling 2. Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 6fe149d commit 6daecd6

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

Diff for: .golangci.yml

+30-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,35 @@
1+
version: "2"
12
linters:
23
enable:
34
- errorlint
4-
- gofumpt
55
- unconvert
66
- unparam
7+
exclusions:
8+
generated: lax
9+
presets:
10+
- comments
11+
- common-false-positives
12+
- legacy
13+
- std-error-handling
14+
paths:
15+
- third_party$
16+
- builtin$
17+
- examples$
18+
settings:
19+
staticcheck:
20+
# Enable all options, with some exceptions.
21+
# For defaults, see https://golangci-lint.run/usage/linters/#staticcheck
22+
checks:
23+
- all
24+
- -QF1008 # Omit embedded fields from selector expression; https://staticcheck.dev/docs/checks/#QF1008
25+
- -ST1003 # Poorly chosen identifier; https://staticcheck.dev/docs/checks/#ST1003
26+
27+
formatters:
28+
enable:
29+
- gofumpt
30+
exclusions:
31+
generated: lax
32+
paths:
33+
- third_party$
34+
- builtin$
35+
- examples$

Diff for: Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ lint:
5555
$(BINDIR)/golangci-lint version
5656

5757
$(BINDIR)/golangci-lint: $(BINDIR)
58-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(BINDIR) v1.60.1
58+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(BINDIR) v2.0.2
5959

6060
$(BINDIR):
6161
mkdir -p $(BINDIR)

0 commit comments

Comments
 (0)