Skip to content

Commit 1268d38

Browse files
authored
ci: migrate to golangci-lint v2 (#57)
1 parent 2e44bd9 commit 1268d38

File tree

3 files changed

+50
-39
lines changed

3 files changed

+50
-39
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ jobs:
2323
runs-on: ubuntu-24.04
2424
steps:
2525
- uses: actions/checkout@v4
26-
- uses: golangci/golangci-lint-action@v6
26+
- uses: golangci/golangci-lint-action@v7
2727
with:
28-
version: v1.64.8
28+
version: v2.0.2
2929
args: --config .github/workflows/scripts/golangci.yaml
3030
run-tests:
3131
timeout-minutes: 5
Lines changed: 47 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,49 @@
1-
run:
2-
timeout: 5m
1+
version: "2"
32
linters:
43
enable:
5-
- asasalint
6-
- asciicheck
7-
- bidichk
8-
- bodyclose
9-
- dogsled
10-
- dupword
11-
- durationcheck
12-
- errcheck
13-
- errname
14-
- errorlint
15-
- exhaustive
16-
- gocritic
17-
- gofmt
18-
- gosimple
19-
- govet
20-
- ineffassign
21-
- makezero
22-
- misspell
23-
- musttag
24-
- nilnil
25-
- noctx
26-
- perfsprint
27-
- prealloc
28-
- predeclared
29-
- reassign
30-
- revive
31-
- rowserrcheck
32-
- staticcheck
33-
- sqlclosecheck
34-
- tagalign
35-
- unused
36-
- usetesting
37-
- whitespace
38-
4+
- asasalint
5+
- asciicheck
6+
- bidichk
7+
- bodyclose
8+
- dogsled
9+
- dupword
10+
- durationcheck
11+
- errname
12+
- errorlint
13+
- exhaustive
14+
- gocritic
15+
- makezero
16+
- misspell
17+
- musttag
18+
- nilnil
19+
- noctx
20+
- perfsprint
21+
- prealloc
22+
- predeclared
23+
- reassign
24+
- revive
25+
- rowserrcheck
26+
- sqlclosecheck
27+
- tagalign
28+
- usetesting
29+
- whitespace
30+
exclusions:
31+
generated: lax
32+
presets:
33+
- comments
34+
- common-false-positives
35+
- legacy
36+
- std-error-handling
37+
paths:
38+
- third_party$
39+
- builtin$
40+
- examples$
41+
formatters:
42+
enable:
43+
- gofmt
44+
exclusions:
45+
generated: lax
46+
paths:
47+
- third_party$
48+
- builtin$
49+
- examples$

Justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ lint: vet
3838
# locally install build dependencies
3939
[group('build')]
4040
init:
41-
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.8
41+
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.0.2
4242

4343
# show host system information
4444
[group('build')]

0 commit comments

Comments
 (0)