chore: bump Go to 1.27 and golangci-lint to v2.13.2 - #50
Conversation
Raise the module Go version to 1.27 and update the Makefile linter pin to v2.13.2 (Go 1.27 support). Fixes kinbiko#49
Required for golangci-lint v2.13.x after the Makefile pin bump.
The official install.sh checksum lookup matches *.tar.gz.sbom.json on v2.13.x, so install the release tarball directly. Also satisfy staticcheck QF1008 and keep noisy test-only linters excluded.
kinbiko
left a comment
There was a problem hiding this comment.
This PR shows clear signs of AI being used. I STRONGLY discourage this if your goal is to learn. There's no urgency in this task.
| coverage: | ||
| go test -race -v -coverprofile=profile.cov -covermode=atomic ./... | ||
|
|
||
| # Download the release tarball directly. The upstream install.sh checksum |
There was a problem hiding this comment.
This is making things more complicated rather than taking advantage of new features in the Go language and toolchain.
You should be able to reduce the lint target down to a single, easy-to-read line of code. Hint: Read through the release notes of Go 1.24.
Challenge: achieve this win without polluting the SBOM of any of the users of this package (the fact that this package has 0 transitive dependencies is a selling-point that I want to maintain).
There was a problem hiding this comment.
Good call — lint is now a single go run ...@v2.13.2 line. That uses the Go 1.24 binary cache, pins the version, and leaves go.mod dependency-free (no tools.mod / tool directive).
There was a problem hiding this comment.
|
Terribly sorry -- I thought you were someone else that I had discussed this task with shortly before you raised the PR! |
|
Addressed the review feedback:
Ready for another look. |
Use golangci-lint via go tool with a dedicated tools.mod so the package go.mod stays dependency-free. Shrink .golangci.yml with default: all plus a short disable list.
Keep package go.mod dependency-free while pinning the linter via the Go 1.24 tool directive in a dedicated tools.mod.
Shrink .golangci.yml by using default: all instead of an explicit enable list, keeping the existing thresholds. Run golangci-lint with go run so the lint target is one line and go.mod stays dependency-free.
|
@kinbiko Friendly bump — |
kinbiko
left a comment
There was a problem hiding this comment.
Great stuff! Thanks for contributing!
| coverage: | ||
| go test -race -v -coverprofile=profile.cov -covermode=atomic ./... | ||
|
|
||
| # Download the release tarball directly. The upstream install.sh checksum |
There was a problem hiding this comment.
Summary
go.modto Go 1.27golangci-lintto v2.13.2 (Go 1.27 support landed in v2.13.0; latest patch is v2.13.2)install.shcurrently matches*.tar.gz.sbom.json).golangci.ymlto v2 and address new staticcheck QF1008 findingsCI workflow files still pin Go 1.22 / older actions. Updating
.github/workflows/go.ymlgo-versionto1.27(and action pins) is required to fully close #49, but this token cannot modify workflow files without the GitHub OAuthworkflowscope.Fixes #49
Checklist