Skip to content

Commit 9c673b2

Browse files
committed
ci: Upgrade to golangci-lint v2.4.0
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
1 parent 30dc9b4 commit 9c673b2

File tree

3 files changed

+66
-27
lines changed

3 files changed

+66
-27
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ jobs:
5353
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
5454
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
5555
56-
- uses: golangci/golangci-lint-action@v3
56+
- uses: golangci/golangci-lint-action@v8.0.0
5757
with:
58-
version: v1.62.2
58+
version: v2.4.0
5959
working-directory: src/github.com/containerd/imgcrypt
6060
args: --timeout 120s
6161

.golangci.bck.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
linters:
2+
enable:
3+
- depguard
4+
- staticcheck
5+
- unconvert
6+
- gofmt
7+
- goimports
8+
- govet
9+
- revive
10+
- ineffassign
11+
- unused
12+
- misspell
13+
14+
issue:
15+
exclude-dirs:
16+
- cmd/ctr/commands/run
17+
- cmd/ctr/commands/images
18+
- cmd\\ctr\\commands\\run
19+
- cmd\\ctr\\commands\\images
20+
exclude-files:
21+
- cmd/ctr/commands/commands.go
22+
- cmd\\ctr\\commands\\commands.go
23+
24+
linters-settings:
25+
depguard:
26+
rules:
27+
main:
28+
files:
29+
- $all
30+
deny:
31+
- pkg: "io/ioutil"

.golangci.yml

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,39 @@
1+
version: "2"
12
linters:
23
enable:
34
- depguard
4-
- staticcheck
5+
- misspell
6+
- revive
57
- unconvert
8+
settings:
9+
depguard:
10+
rules:
11+
main:
12+
files:
13+
- $all
14+
deny:
15+
- pkg: io/ioutil
16+
exclusions:
17+
generated: lax
18+
presets:
19+
- comments
20+
- common-false-positives
21+
- legacy
22+
- std-error-handling
23+
paths:
24+
- cmd/ctr/commands/run
25+
- cmd/ctr/commands/images
26+
- cmd\\ctr\\commands\\run
27+
- cmd\\ctr\\commands\\images
28+
- cmd/ctr/commands/commands.go
29+
- cmd\\ctr\\commands\\commands.go
30+
formatters:
31+
enable:
632
- gofmt
733
- goimports
8-
- govet
9-
- revive
10-
- ineffassign
11-
- unused
12-
- misspell
13-
14-
issue:
15-
exclude-dirs:
16-
- cmd/ctr/commands/run
17-
- cmd/ctr/commands/images
18-
- cmd\\ctr\\commands\\run
19-
- cmd\\ctr\\commands\\images
20-
exclude-files:
21-
- cmd/ctr/commands/commands.go
22-
- cmd\\ctr\\commands\\commands.go
23-
24-
linters-settings:
25-
depguard:
26-
rules:
27-
main:
28-
files:
29-
- $all
30-
deny:
31-
- pkg: "io/ioutil"
34+
exclusions:
35+
generated: lax
36+
paths:
37+
- third_party$
38+
- builtin$
39+
- examples$

0 commit comments

Comments
 (0)