ci: bump golangci-lint to v2.5.0 (Go 1.25-built binary)

The v2.1.6 release binary is built with Go 1.24, and golangci-lint
refuses to load a config targeting a newer toolchain than itself
('Go language version (go1.24) used to build golangci-lint is lower
than the targeted Go version (1.25.0)'). go.mod is on 1.25, so the
binary needs to be too.

Locally this didn't bite because 'go install …@v2.1.6' compiled
v2.1.6 against the local Go 1.25 toolchain; CI uses the prebuilt
release tarball which carries the build-time Go version.

v2.5.0 is the first v2.x line built with Go 1.25 — pin in lockstep
with go.mod going forward.
This commit is contained in:
2026-05-03 21:29:02 +01:00
parent 174bdae750
commit d9c8da139c
+6 -4
View File
@@ -36,10 +36,12 @@ jobs:
cache: true
- uses: golangci/golangci-lint-action@v7
with:
# v1.61 was built against Go 1.23 and refuses to load a
# config that targets a newer toolchain — go.mod is on 1.25.
# Bumping to a v2.x release built against current Go.
version: v2.1.6
# Must be built against the same Go release as go.mod targets,
# otherwise the linter refuses to load with "Go language
# version used to build golangci-lint is lower than the
# targeted Go version". v2.5.0 is the first v2.x line built
# with Go 1.25; bump in lockstep with go.mod.
version: v2.5.0
args: --timeout=5m
build: