Skip to content

Commit 1621b1f

Browse files
.github: Bump golangci/golangci-lint-action from 6 to 7 (#24)
* .github: Bump golangci/golangci-lint-action from 6 to 7 Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 6 to 7. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](golangci/golangci-lint-action@v6...v7) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * update golangci-lint version * fix linter warning --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Lovro Mažgon <[email protected]>
1 parent 41a333b commit 1621b1f

File tree

3 files changed

+40
-30
lines changed

3 files changed

+40
-30
lines changed

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ jobs:
2828
go-version-file: 'go.mod'
2929

3030
- name: golangci-lint
31-
uses: golangci/golangci-lint-action@v6
31+
uses: golangci/golangci-lint-action@v7
3232
with:
33-
version: v1.52.2
33+
version: v2.0.2
3434
working-directory: ${{ matrix.workdir }}
3535

.golangci.yml

Lines changed: 37 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,63 @@
1-
linters-settings:
2-
gofmt:
3-
simplify: false
4-
govet:
5-
check-shadowing: false
6-
nolintlint:
7-
allow-unused: false # report any unused nolint directives
8-
require-explanation: true # require an explanation for nolint directives
9-
require-specific: true # require nolint directives to mention the specific linter being suppressed
10-
gocyclo:
11-
min-complexity: 20
12-
goconst:
13-
ignore-tests: true
14-
goheader:
15-
template-path: '.golangci.goheader.template'
16-
values:
17-
regexp:
18-
copyright-year: 20[2-9]\d
19-
1+
version: "2"
202
linters:
21-
disable-all: true
3+
default: none
224
enable:
235
- bodyclose
246
- dogsled
257
- durationcheck
268
- errcheck
279
- errname
28-
- exportloopref
2910
- goconst
3011
- gocritic
3112
- gocyclo
32-
- gofmt
3313
- goheader
34-
- goimports
35-
- revive
3614
- gomoddirectives
3715
- gomodguard
3816
- goprintffuncname
3917
- gosec
40-
- gosimple
4118
- govet
4219
- ineffassign
4320
- makezero
4421
- noctx
4522
- nolintlint
4623
- predeclared
24+
- revive
4725
- staticcheck
48-
- stylecheck
49-
- typecheck
5026
- unconvert
5127
- unused
5228
- wastedassign
5329
- whitespace
30+
settings:
31+
gocyclo:
32+
min-complexity: 20
33+
goheader:
34+
values:
35+
regexp:
36+
copyright-year: 20[2-9]\d
37+
template-path: .golangci.goheader.template
38+
nolintlint:
39+
require-explanation: true
40+
require-specific: true
41+
allow-unused: false
42+
exclusions:
43+
generated: lax
44+
presets:
45+
- comments
46+
- common-false-positives
47+
- legacy
48+
- std-error-handling
49+
rules:
50+
- linters:
51+
- goconst
52+
path: (.+)_test\.go
53+
paths:
54+
- examples/.*
55+
formatters:
56+
enable:
57+
- gofmt
58+
- goimports
59+
settings:
60+
gofmt:
61+
simplify: false
62+
exclusions:
63+
generated: lax

bwgrpc/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func startTestServer(t *testing.T, lis net.Listener, resp *testproto.TestRespons
8383
mockServer.EXPECT().
8484
TestRPC(gomock.Any(), gomock.Any()).
8585
DoAndReturn(
86-
func(ctx context.Context, request *testproto.TestRequest) (*testproto.TestResponse, error) {
86+
func(context.Context, *testproto.TestRequest) (*testproto.TestResponse, error) {
8787
return resp, nil
8888
},
8989
)

0 commit comments

Comments
 (0)