Skip to content

Commit f424318

Browse files
panjf2000Copilot
andauthored
ci: bump golangci-lint to v2.12.2 to fix Go 1.26 toolchain panic (#761)
The pinned golangci-lint v2.1.6 (built with Go 1.24) panics when analyzing code with the Go 1.26 toolchain installed by setup-go, since go/types refuses to type-check files requiring a newer Go version than the one golangci-lint itself was built with: panic: file requires newer Go version go1.26 (application built with go1.24) Bumped all 4 workflow files that pin golangci-lint (test.yml, test_gc_opt.yml, test_poll_opt.yml, test_poll_opt_gc_opt.yml) to v2.12.2, which is built with Go 1.26.2. Verified locally: golangci-lint v2.12.2 run with the same linters/args as CI (-E gocritic -E misspell -E revive -E godot, with/without --timeout 5m) reports 0 issues on the repo. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent fd7ce4b commit f424318

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
- name: Setup and run golangci-lint
5050
uses: golangci/golangci-lint-action@v7
5151
with:
52-
version: v2.1.6
52+
version: v2.12.2
5353
args: -v -E gocritic -E misspell -E revive -E godot --timeout 5m
5454
test:
5555
needs: lint

.github/workflows/test_gc_opt.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
- name: Setup and run golangci-lint
5050
uses: golangci/golangci-lint-action@v7
5151
with:
52-
version: v2.1.6
52+
version: v2.12.2
5353
args: -v -E gocritic -E misspell -E revive -E godot --timeout 5m
5454
test:
5555
needs: lint

.github/workflows/test_poll_opt.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
- name: Setup and run golangci-lint
4949
uses: golangci/golangci-lint-action@v7
5050
with:
51-
version: v2.1.6
51+
version: v2.12.2
5252
args: -v -E gocritic -E misspell -E revive -E godot
5353
test:
5454
needs: lint

.github/workflows/test_poll_opt_gc_opt.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
- name: Setup and run golangci-lint
4949
uses: golangci/golangci-lint-action@v7
5050
with:
51-
version: v2.1.6
51+
version: v2.12.2
5252
args: -v -E gocritic -E misspell -E revive -E godot
5353
test:
5454
needs: lint

0 commit comments

Comments
 (0)