Skip to content

Bump golangci-lint to v2.12.2 for go1.26 compatibility - #475

Open
steiler wants to merge 1 commit into
mainfrom
fix/golangci-lint-go126
Open

Bump golangci-lint to v2.12.2 for go1.26 compatibility#475
steiler wants to merge 1 commit into
mainfrom
fix/golangci-lint-go126

Conversation

@steiler

@steiler steiler commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The lint workflow pins golangci-lint to v2.4, which is built with go1.25. Once go.mod targets go1.26 (as in Bump the go-dependencies group across 1 directory with 20 updates #474), the lint job fails with can't load config: the Go language version (go1.25) used to build golangci-lint is lower than the targeted Go version (1.26.0).
  • Bump to v2.12.2, the latest release, which added go1.26 support.
  • Fix two new staticcheck QF1012 findings (WriteString(fmt.Sprintf(...))fmt.Fprintf(...)) surfaced by the newer linter.

Test plan

  • go build ./... succeeds
  • golangci-lint run ./... (v2.12.2) reports 0 issues

Made with Cursor

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>
@steiler
steiler requested a review from a team as a code owner August 3, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant