Repository navigation
feat: add --fix flag to autofix lint and formatting issues - #140
Conversation
|
Claude finished @dclong's task in 2m 4s —— View job Review of PR #140 —
|
| Tool | check flag | fix flag | Correct? |
|---|---|---|---|
| pyproject-fmt | --check |
(write) | ✅ |
| ruff format | --check |
(write) | ✅ |
| ruff check | (report) | --fix |
✅ |
| cargo fmt | -- --check |
(write) | ✅ |
| rustfmt | --check |
(write) | ✅ |
| golangci-lint fmt | -d (diff) |
(write) | ✅ |
| golangci-lint run | (report) | --fix |
✅ |
| shfmt | -d (diff) |
-w (write) |
✅ |
| fish_indent | -c (check) |
-w (write) |
✅ |
| stylua | --check |
(write) | ✅ |
| mdformat | --check |
(write) | ✅ |
| codespell | (report) | -w (write) |
✅ |
shellcheck / selene / fish -n / lychee |
no autofix — correctly left unchanged in --fix mode, with comments explaining why |
✅ |
No correctness bugs found. build_checks, lint_repo, and main/parse_args all thread fix through correctly, and Check.fatal semantics (e.g. lychee staying non-fatal) are preserved.
Test coverage (tests/test_lint_repo.py) is thorough: every builder has a _fix_mode test asserting the exact fixed command, plus tests confirming fix threads through build_checks, lint_repo, parse_args, and main. This matches the project's existing test style.
CI status: all test_code and lint_code jobs (including lint-python-project, lint-markdown, and Python 3.12.7/3.13/3.14 on Ubuntu/macOS) passed on this PR's branch, confirming formatting/type/lint compliance.
Minor, non-blocking notes
_cmd()(github_rest_api/scripts/lint_repo.py:106) is a small, well-documented helper — no issue, just noting it's the only new piece of shared logic.- The module docstring and per-flag help text were updated consistently and clearly explain the three configurable behaviors (
--fix,--on-missing-tool,--fail-fast).
Nothing here rises to a blocking issue — this is a clean, well-tested addition that mirrors the existing code style closely.
AUTO_MERGE_APPROVED
Summary
--fixflag to autofix lint and formatting issuesChanged files
Modified
github_rest_api/scripts/lint_repo.py(+153/-41)tests/test_lint_repo.py(+136/-0)Commits
--fixflag to autofix lint and formatting issues