Skip to content

chore: align local lint and format checks with CI - #121

Merged
eshaffer321 merged 1 commit into
mainfrom
chore/align-local-ci-checks
Nov 19, 2026
Merged

eshaffer321 merged 1 commit into
mainfrom
chore/align-local-ci-checks

Conversation

@eshaffer321

Copy link
Copy Markdown
Owner

Why

Local checks and CI had drifted:

  • golangci-lint: CI pinned v2.14.0, but make lint and 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-tools still pinned v2.4.0.
  • gofmt: CI never checked formatting, so 13 files had drifted, and the staged-only pre-commit check rejected anyone who touched one of them.

What

  • The Makefile pins GOLANGCI_LINT_VERSION=v2.14.0 once, and make lint runs it with go run, so it's built with the repo's own Go toolchain and can never be older than go.mod.
  • CI's lint job runs make check-fmt and make lint, the same targets the pre-commit hook uses. Bumping the linter is now a one-line Makefile change.
  • fmt, check-fmt, and check-fmt-staged all use gofmt -s.
  • One-time gofmt -s -w across the repo (formatting only, 13 files).
  • README and docs/testing.md point to make lint.

Testing

make check-fmt, make lint (0 issues), and go test -race ./... all pass. The pre-commit hook passed using the pinned linter with no PATH workaround.

- 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
eshaffer321 force-pushed the chore/align-local-ci-checks branch from 01a1c7d to a113c7f Compare November 19, 2026 18:46
@codecov

codecov Bot commented Nov 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.03%. Comparing base (fa72e4d) to head (a113c7f).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #121   +/-   ##
=======================================
  Coverage   67.03%   67.03%           
=======================================
  Files          53       53           
  Lines        7480     7480           
=======================================
  Hits         5014     5014           
  Misses       2108     2108           
  Partials      358      358           
Flag Coverage Δ
unittests 67.03% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
internal/adapters/clients/anthropic/client.go 85.91% <ø> (ø)
internal/api/handlers/transactions.go 0.00% <ø> (ø)
internal/api/server.go 61.64% <ø> (ø)
internal/application/service/sync_service.go 35.05% <ø> (ø)
internal/domain/splitter/splitter.go 90.00% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@eshaffer321
eshaffer321 merged commit 03ee327 into main Nov 19, 2026
14 checks passed
@eshaffer321
eshaffer321 deleted the chore/align-local-ci-checks branch November 19, 2026 18:49
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