Skip to content

Commit 29a2959

Browse files
nhortonclaude
andcommitted
chore: split Makefile lint target into lint (check) and lint-fix (auto-fix)
Previously `make lint` ran `ruff format` and `ruff check --fix` — both in auto-fix mode — so it silently mutated files instead of reporting issues. CI, on the other hand, runs `ruff format --check` and `ruff check` in check-only mode, which is what actually fails a PR. That asymmetry meant a clean local `make lint` gave no guarantee that CI would pass: running it would just reformat files in-place, and the developer might miss the uncommitted changes. Splits into two targets: - `make lint` now mirrors CI (ruff format --check, ruff check, mypy). A clean run guarantees the CI Lint job will pass. - `make lint-fix` is the previous behavior (auto-fix formatter + linter) for convenient local cleanup. Caught while working on #350 — my local `ruff check` calls did not run the formatter at all, and even `make lint` would have only silently reformatted the files, leaving a surprise CI failure. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e5db75f commit 29a2959

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

Makefile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
1+
# `make lint` mirrors CI (.github/workflows/validate.yml) in check-only mode
2+
# so that a clean local run guarantees CI will pass. Use `make lint-fix` to
3+
# auto-fix formatter and linter issues locally.
4+
5+
.PHONY: lint lint-fix
6+
17
lint:
2-
@echo "## make lint output"
8+
@echo "## make lint output (check-only — matches CI)"
9+
uv run ruff format --check src/ tests/
10+
uv run ruff check src/ tests/
11+
uv run mypy src/
12+
13+
lint-fix:
14+
@echo "## make lint-fix output (auto-fix)"
315
uv run ruff format src/ tests/
416
uv run ruff check --fix src/ tests/
517
uv run mypy src/

0 commit comments

Comments
 (0)