Skip to content

Commit a7032e7

Browse files
ci(golangci-lint): bump action v6 → v8 + migrate config to v2 (Go 1.25)
Action v6 resolved to golangci-lint v1.64.8 (built with Go 1.24), which fails to load configs targeting Go 1.25. Action v8 ships golangci-lint v2.x which is Go 1.25-compatible. Config migrated to v2 format: removed gosimple (folded into staticcheck), moved exclude-rules under linters.exclusions, added version: "2" header. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 30710d2 commit a7032e7

2 files changed

Lines changed: 17 additions & 17 deletions

File tree

.github/workflows/golangci-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
pull_request:
77
branches: [master, main]
88
schedule:
9-
- cron: '23 6 * * 1'
9+
- cron: "23 6 * * 1"
1010

1111
permissions:
1212
contents: read
@@ -31,7 +31,7 @@ jobs:
3131
- uses: actions/setup-go@v5
3232
with:
3333
go-version-file: common/go.mod
34-
- uses: golangci/golangci-lint-action@v6
34+
- uses: golangci/golangci-lint-action@v8
3535
with:
3636
version: latest
3737
working-directory: common

.golangci.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
# golangci-lint config — start conservative, expand once baseline is clean
1+
# golangci-lint v2 config — start conservative, expand once baseline is clean
2+
version: "2"
3+
24
run:
35
timeout: 5m
46
tests: true
57

68
linters:
9+
# Default linter set is govet+errcheck+ineffassign+staticcheck+unused.
10+
# We explicitly add misspell + gocyclo on top. gosimple folded into staticcheck in v2.
711
enable:
812
- errcheck # checks unchecked errors
9-
- gosimple # simplification suggestions
1013
- govet # standard vet
1114
- ineffassign # ineffective assignments
12-
- staticcheck # bug detection
15+
- staticcheck # bug detection (subsumes gosimple in v2)
1316
- unused # unused code
1417
- misspell # spelling
1518
- gocyclo # cyclomatic complexity
16-
disable:
17-
- gosec # security covered by govulncheck + CodeQL already
18-
- dupl # too noisy on fresh codebases
19-
20-
linters-settings:
21-
gocyclo:
22-
min-complexity: 20 # generous default
19+
settings:
20+
gocyclo:
21+
min-complexity: 20
22+
exclusions:
23+
rules:
24+
- path: _test\.go
25+
linters:
26+
- errcheck
27+
- gocyclo
2328

2429
issues:
25-
exclude-rules:
26-
- path: _test\.go
27-
linters:
28-
- errcheck # tests routinely ignore err
29-
- gocyclo
3030
max-issues-per-linter: 0
3131
max-same-issues: 0

0 commit comments

Comments
 (0)