Skip to content

chore: bump Go to 1.27 and golangci-lint to v2.13.2 - #50

Merged
kinbiko merged 8 commits into
kinbiko:mainfrom
MrBeldum:chore/bump-go-1.27
Sep 12, 2026
Merged

kinbiko merged 8 commits into
kinbiko:mainfrom
MrBeldum:chore/bump-go-1.27

Conversation

@MrBeldum

@MrBeldum MrBeldum commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Bump go.mod to Go 1.27
  • Bump Makefile golangci-lint to v2.13.2 (Go 1.27 support landed in v2.13.0; latest patch is v2.13.2)
  • Install the linter from GitHub release tarballs so checksums verify (upstream install.sh currently matches *.tar.gz.sbom.json)
  • Migrate .golangci.yml to v2 and address new staticcheck QF1008 findings

CI workflow files still pin Go 1.22 / older actions. Updating .github/workflows/go.yml go-version to 1.27 (and action pins) is required to fully close #49, but this token cannot modify workflow files without the GitHub OAuth workflow scope.

Fixes #49

Checklist

  • I have done a self-review of the PR.

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
@MrBeldum
MrBeldum requested a review from kinbiko as a code owner September 4, 2026 16:45
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 kinbiko left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .golangci.yml Outdated
Comment thread Makefile Outdated
coverage:
go test -race -v -coverprofile=profile.cov -covermode=atomic ./...

# Download the release tarball directly. The upstream install.sh checksum

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the one hand I was hoping for a solution that dependabot can track, but I do really like the simplicity of this solution as well -- I think I'll accept this solution, but maybe I'll ask my mentee @sbcrvl who raised #51 to do a dependabot-supported solution in a future PR.

@kinbiko

kinbiko commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Terribly sorry -- I thought you were someone else that I had discussed this task with shortly before you raised the PR!

@MrBeldum

Copy link
Copy Markdown
Contributor Author

Addressed the review feedback:

  • .golangci.yml: cut to under 100 lines by using default: all plus the same disable/settings/exclusions intent as before (no weaker rules).
  • Makefile: lint is now a single go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@… run ./... line, using the Go toolchain instead of a custom download/checksum script.

Ready for another look.

MrBeldum and others added 3 commits September 11, 2026 22:08
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.
@MrBeldum

Copy link
Copy Markdown
Contributor Author

@kinbiko Friendly bump — .golangci.yml is now under 90 lines via default: all, and lint is a single go run …@v2.13.2 line with no go.mod pollution. Happy to adjust further if you want a different shape.

@kinbiko kinbiko left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff! Thanks for contributing!

Comment thread Makefile Outdated
coverage:
go test -race -v -coverprofile=profile.cov -covermode=atomic ./...

# Download the release tarball directly. The upstream install.sh checksum

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the one hand I was hoping for a solution that dependabot can track, but I do really like the simplicity of this solution as well -- I think I'll accept this solution, but maybe I'll ask my mentee @sbcrvl who raised #51 to do a dependabot-supported solution in a future PR.

@kinbiko
kinbiko merged commit ad3b7bc into kinbiko:main Sep 12, 2026
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.

[Chore] Bump versions of Go and dependencies.

2 participants