Repository navigation
chore: align local lint and format checks with CI - #121
Merged
Merged
Conversation
- Pin golangci-lint once in the Makefile (v2.14.0, matching CI) and run it via go run, so it's built with the repo's Go toolchain. A stale Homebrew golangci-lint (built with Go 1.25) broke the pre-commit hook. - CI's lint job now runs make check-fmt and make lint, the same targets as the pre-commit hook. CI never checked gofmt before. - fmt, check-fmt, and check-fmt-staged all use gofmt -s. - One-time gofmt -s over the 13 files that had drifted (formatting only).
eshaffer321
force-pushed
the
chore/align-local-ci-checks
branch
from
November 19, 2026 18:46
01a1c7d to
a113c7f
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #121 +/- ##
=======================================
Coverage 67.03% 67.03%
=======================================
Files 53 53
Lines 7480 7480
=======================================
Hits 5014 5014
Misses 2108 2108
Partials 358 358
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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.
Why
Local checks and CI had drifted:
make lintand the pre-commit hook used whatever was on PATH. A Homebrew v2.5.0 build (Go 1.25) refuses to lint this Go 1.26 module, so the hook failed.install-toolsstill pinned v2.4.0.What
GOLANGCI_LINT_VERSION=v2.14.0once, andmake lintruns it withgo run, so it's built with the repo's own Go toolchain and can never be older thango.mod.make check-fmtandmake lint, the same targets the pre-commit hook uses. Bumping the linter is now a one-line Makefile change.fmt,check-fmt, andcheck-fmt-stagedall usegofmt -s.gofmt -s -wacross the repo (formatting only, 13 files).docs/testing.mdpoint tomake lint.Testing
make check-fmt,make lint(0 issues), andgo test -race ./...all pass. The pre-commit hook passed using the pinned linter with no PATH workaround.