Bump golangci-lint to v2.12.2 for go1.26 compatibility - #475
Open
steiler wants to merge 1 commit into
Open
Conversation
The pinned golangci-lint v2.4 was built with go1.25 and fails with "the Go language version (go1.25) used to build golangci-lint is lower than the targeted Go version" once go.mod targets go1.26 (see PR #474). v2.12.2 adds go1.26 support. Also fixes two new staticcheck QF1012 findings surfaced by the updated linter. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
golangci-linttov2.4, which is built with go1.25. Oncego.modtargetsgo1.26(as in Bump the go-dependencies group across 1 directory with 20 updates #474), the lint job fails withcan't load config: the Go language version (go1.25) used to build golangci-lint is lower than the targeted Go version (1.26.0).v2.12.2, the latest release, which added go1.26 support.staticcheckQF1012findings (WriteString(fmt.Sprintf(...))→fmt.Fprintf(...)) surfaced by the newer linter.Test plan
go build ./...succeedsgolangci-lint run ./...(v2.12.2) reports 0 issuesMade with Cursor