[CI]: CI silently auto-fixes import ordering (and other safe fixes) instead of failing
Our [tool.ruff] sets fix = true, so ruff check . in CI applies safe autofixes on the fly.
For most rules this doesn't matter (they have no safe fix and still fail, which is the lint failures we all see). But for the auto-fixable ones, mainly import sorting (I) and quote/whitespace normalization, CI fixes them in its own checkout, exits 0, and the violation quietly lands on main un-fixed because nothing gets committed.
Fix: run ruff check --no-fix . in CI so those get reported instead of silently patched. Keeping fix = true for local dev is still fine.
Hi,
I’m picking up #168.
The issue is that [tool.ruff] fix = true in pyproject.toml makes the CI ruff check . auto-fix the checkout and exit with code 0.
I’m planning to add --no-fix only to the CI step and keep fix = true for local development.
I also checked ruff check --no-fix . and ruff format --check . on the current main, and both pass, so CI shouldn’t go red.