chore(deps): update golangci-lint to v2.13.0 for Go 1.27 support - #705
chore(deps): update golangci-lint to v2.13.0 for Go 1.27 support#705wallrj-cyberark wants to merge 1 commit into
Conversation
golangci-lint v2.12.2 cannot analyse the Go 1.27 standard library, which broke lint in downstream repositories as soon as VENDORED_GO_VERSION was bumped to 1.27.0. - Built with Go 1.26, it fails to type-check the generic methods introduced in the Go 1.27 standard library. - Rebuilt with Go 1.27, staticcheck (honnef.co/go/tools v0.7.0) panics with 'unexpected expr: *ast.KeyValueExpr'. v2.13.0 ships honnef.co/go/tools v0.8.0-rc.1 and analyses the Go 1.27 standard library without error. Signed-off-by: Richard Wall <richard.wall@cyberark.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Closing in favour of Renovate: the For the record, the detail above still applies — golangci-lint v2.12.2 cannot analyse the Go 1.27 standard library, so lint is broken in downstream repositories until that upgrade lands. |
Motivation
37ea719 (#704) bumped
VENDORED_GO_VERSIONto 1.27.0. Lint then fails in every repository that vendors thetoolsmodule, because golangci-lint v2.12.2 cannot analyse the Go 1.27 standard library:When the binary is built with Go 1.26 (which is what happens whenever a cached
golangci-lint@v2.12.2binary is reused, since the download path is not keyed on the Go version), it fails to type-check the generic methods introduced in the Go 1.27 standard library:Rebuilding v2.12.2 with Go 1.27 gets past that, but staticcheck (honnef.co/go/tools v0.7.0) then panics while building its IR for the Go 1.27 standard library:
golangci-lint v2.13.0 ships honnef.co/go/tools v0.8.0-rc.1 and analyses the Go 1.27 standard library without error.
Renovate has this upgrade queued in the
Toolsgroup on the dependency dashboard (#487), held behind the stability gate, so this change simply brings it forward — lint is broken in the meantime.Testing
Verified in a downstream repository that vendors the
toolsandklonemodules, withVENDORED_GO_VERSION := 1.27.0:golangci-lintv2.12.2 built with Go 1.26.5:typecheckfailure shown above.golangci-lintv2.12.2 rebuilt with Go 1.27.0: staticcheck panic shown above.golangci-lintv2.13.0 built with Go 1.27.0:0 issues.