Skip to content

Commit 913f174

Browse files
committed
Bump golangci-lint to v2.4
Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
1 parent 1a50ff5 commit 913f174

File tree

2 files changed

+32
-32
lines changed

2 files changed

+32
-32
lines changed

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

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:"
38+
formatters:
39+
enable:
40+
- gofmt
41+
- goimports
4242

4343
run:
4444
timeout: 2m

0 commit comments

Comments
 (0)