Skip to content

ci: run ruff check with --no-fix so autofixable violations fail - #224

Merged
krisztianfekete merged 1 commit into
agentevals-dev:mainfrom
rangarajan19:ci/ruff-check-no-fix
Sep 23, 2026
Merged

krisztianfekete merged 1 commit into
agentevals-dev:mainfrom
rangarajan19:ci/ruff-check-no-fix

Conversation

@rangarajan19

Copy link
Copy Markdown
Contributor

I changed the CI Ruff check to run with --no-fix.

The reason is that pyproject.toml has fix = true, so ruff check . in CI was silently fixing violations and exiting with code 0 instead of reporting them.

Before, a file with unsorted imports could pass CI because Ruff fixed it automatically. Now, the same issue is reported as I001 and CI fails as expected.

I also verified that the current repo passes both ruff check --no-fix . and ruff format --check ., so CI will remain green.

AI was used to help with this change, as required by CONTRIBUTING.md.

Closes #168.

pyproject.toml sets `fix = true` under [tool.ruff], so `ruff check .` in
CI applied safe autofixes (import sorting, whitespace) to its own
checkout and exited 0. The violations were never reported and nothing was
committed, so they landed on main unfixed.

Pass --no-fix in CI so these are reported and fail the job. `fix = true`
stays in pyproject.toml for local development.

Refs agentevals-dev#168
@rangarajan19

Copy link
Copy Markdown
Contributor Author

Hi, the fix is correct or do I have to change something here

@krisztianfekete
krisztianfekete merged commit df4fa11 into agentevals-dev:main Sep 23, 2026
7 checks passed
@rangarajan19
rangarajan19 deleted the ci/ruff-check-no-fix branch September 23, 2026 16:05
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.

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

2 participants