agentevals icon indicating copy to clipboard operation
agentevals copied to clipboard

[CI]: CI silently auto-fixes import ordering (and other safe fixes) instead of failing

Open krisztianfekete opened this issue 4 months ago • 1 comments

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.

krisztianfekete avatar Jul 10 '26 10:07 krisztianfekete

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.

rangarajan19 avatar Sep 21 '26 15:09 rangarajan19