File tree 3 files changed +37
-11
lines changed
3 files changed +37
-11
lines changed Original file line number Diff line number Diff line change 27
27
- uses : actions/setup-go@v5
28
28
with :
29
29
go-version : " ${{ env.GO_VERSION }}"
30
- - uses : golangci/golangci-lint-action@v6
30
+ - uses : golangci/golangci-lint-action@v7
31
31
with :
32
- version : v1.64
32
+ version : v2.0
33
33
# Extra linters, only checking new code from a pull request.
34
34
- name : lint-extra
35
35
if : github.event_name == 'pull_request'
Original file line number Diff line number Diff line change 2
2
# github PRs only (see lint-extra in .github/workflows/validate.yml).
3
3
#
4
4
# For the default linter config, see .golangci.yml. This config should
5
- # only enable additional linters not enabled in the default config.
5
+ # only enable additional linters and/or linter settings not enabled
6
+ # in the default config.
7
+ version : " 2"
6
8
7
9
linters :
8
- disable-all : true
10
+ default : none
9
11
enable :
10
12
- godot
11
13
- revive
12
-
14
+ - staticcheck
15
+ settings :
16
+ staticcheck :
17
+ checks :
18
+ - all
19
+ - -QF1008 # https://staticcheck.dev/docs/checks/#QF1008 Omit embedded fields from selector expression.
20
+ exclusions :
21
+ generated : strict
Original file line number Diff line number Diff line change 1
1
# For documentation, see https://golangci-lint.run/usage/configuration/
2
+ version : " 2"
3
+
4
+ formatters :
5
+ enable :
6
+ - gofumpt
7
+ exclusions :
8
+ generated : strict
2
9
3
10
linters :
4
11
enable :
5
12
- errorlint
6
- - gofumpt
7
13
- nolintlint
8
14
- unconvert
9
15
- unparam
10
-
11
- linters-settings :
12
- govet :
13
- enable :
14
- - nilness
16
+ settings :
17
+ govet :
18
+ enable :
19
+ - nilness
20
+ staticcheck :
21
+ checks :
22
+ - all
23
+ - -ST1000 # https://staticcheck.dev/docs/checks/#ST1000 Incorrect or missing package comment.
24
+ - -ST1003 # https://staticcheck.dev/docs/checks/#ST1003 Poorly chosen identifier.
25
+ - -ST1005 # https://staticcheck.dev/docs/checks/#ST1005 Incorrectly formatted error string.
26
+ - -QF1008 # https://staticcheck.dev/docs/checks/#QF1008 Omit embedded fields from selector expression.
27
+ exclusions :
28
+ generated : strict
29
+ presets :
30
+ - comments
31
+ - std-error-handling
You can’t perform that action at this time.
0 commit comments