Repository navigation
ci: let golangci-lint track the Go toolchain - #19
Merged
Merged
Conversation
The lint job takes go-version: stable but pinned golangci-lint to v2.11.4, so once Go 1.27 became stable the linter could no longer read the standard library's export data and every stdlib import failed to typecheck. Nothing had run it since August, so it broke quietly. Float the version, as the oasdiff repo does, and settle what the newer linters then report: reflect.Ptr becomes reflect.Pointer in fields.go, and goconst leaves test files alone. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017e285CvofYf6joqC98gTXz
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.
The lint job takes
go-version: stablebut pinned golangci-lint tov2.11.4. Once Go 1.27 became stable, that linter could no longer read the standard library's export data, so every stdlib import failed to typecheck:All 9 reported issues were that one message. The last lint run here was in August, so it had been broken since 1.27 went stable and the next PR simply surfaced it.
Pinning the linter while floating the toolchain is the unstable half of each choice, so this floats the version, matching the oasdiff repo, whose lint is green on the same runner today. Two findings from the newer linters come with it:
reflect.Ptr->reflect.Pointerinfields.go, which govet'sinlinecheck asks for (identical constant, legacy name).goconstno longer reads test files. A literal repeated across table-driven cases reads better than a constant the reader has to look up.golangci-lint runis clean locally on 2.15.0, and vet, gofmt and the suite pass.🤖 Generated with Claude Code
https://claude.ai/code/session_017e285CvofYf6joqC98gTXz