Skip to content

Commit 9787127

Browse files
committed
Bump golangci-lint to v2.4
Signed-off-by: Markus Lehtonen <[email protected]>
1 parent 1a50ff5 commit 9787127

2 files changed

Lines changed: 33 additions & 32 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ jobs:
8888
run: |
8989
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
9090
91-
- uses: golangci/golangci-lint-action@v6
91+
- uses: golangci/golangci-lint-action@v8
9292
with:
93-
version: v1.64.8
93+
version: v2.4
9494

9595
tests:
9696
name: Tests

.golangci.yml

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,45 @@
1+
version: "2"
2+
13
linters:
24
enable:
35
- staticcheck
46
- unconvert
5-
- gofmt
6-
- goimports
77
- ineffassign
8-
- vet
8+
- govet
99
- unused
1010
- misspell
1111
- revive
1212
disable:
1313
- errcheck
14+
exclusions:
15+
rules:
16+
# We have protoc-generated ttRPC/gRPC code. When adding extra functions
17+
# for generated types we want to consistently violate golint's semantic
18+
# function name spelling rules, instead of inconsistently doing so only
19+
# from automatically generated files. These rules are for that.
20+
- path: pkg/adaptation/result.go
21+
linters:
22+
- golint
23+
- revive
24+
text: "should be claim"
25+
# Differ copies pods and containers with Mutexes for diffing. Should be harmless.
26+
- path: plugins/differ/nri-differ.go
27+
linters:
28+
- govet
29+
text: "copylocks: .*protobuf/internal/impl.MessageState.*"
30+
# We dot-import ginkgo and gomega in some tests. Silence any related errors.
31+
- path: 'pkg/adaptation|pkg/runtime-tools/generate|pkg/net/multiplex'
32+
linters:
33+
- revive
34+
text: "dot-imports:"
35+
- linters:
36+
- revive
37+
text: "package-comments:"
1438

15-
issues:
16-
include:
17-
- EXC0002
18-
exclude-rules:
19-
# We have protoc-generated ttRPC/gRPC code. When adding extra functions
20-
# for generated types we want to consistently violate golint's semantic
21-
# function name spelling rules, instead of inconsistently doing so only
22-
# from automatically generated files. These rules are for that.
23-
- path: pkg/adaptation/result.go
24-
linters:
25-
- golint
26-
- revive
27-
text: "should be claim"
28-
# Ignore naming violation in the test suite as well.
29-
- path: pkg/adaptation/adaptation_suite_test.go
30-
linters:
31-
- golint
32-
- revive
33-
text: "should be strip"
34-
# Differ copies pods and containers with Mutexes for diffing. Should be harmless.
35-
- path: plugins/differ/nri-differ.go
36-
linters:
37-
- govet
38-
text: "copylocks: .*protobuf/internal/impl.MessageState.*"
39-
# We dot-import ginkgo and gomega in some tests. Silence any related errors.
40-
- path: 'pkg/adaptation|pkg/runtime-tools/generate|pkg/net/multiplex'
41-
text: "dot-imports:"
39+
formatters:
40+
enable:
41+
- gofmt
42+
- goimports
4243

4344
run:
4445
timeout: 2m

0 commit comments

Comments
 (0)