◐ Shell
clean mode source ↗

Update ruff CI version by ShaharNaveh · Pull Request #6418 · RustPython/RustPython

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

ruff check --diff flag behavior documentation

💡 Result:

Summary of documented behavior:

  • --diff prevents writing fixes, prints unified diffs for changed files, and implies --fix-only. It exits with status 0 when there are no diffs. [1]

Related notes / known issue:

  • There is a reported GitHub issue that using --diff can yield exit code 0 (and no output) even when violations exist but no diffs are produced (interaction with exit codes / fix-only behavior). [2]

Sources:

  • Ruff CLI docs (--diff description). [1]
  • GitHub issue discussing --diff exit-code behavior. [2]

🏁 Script executed:

# Examine the workflow file around the flagged lines
cd /root/repo
cat -n .github/workflows/ci.yaml | sed -n '310,345p'

Repository: RustPython/RustPython

Length of output: 1686


🏁 Script executed:

rg "ruff check" .github/workflows/ -A 1 -B 1

Repository: RustPython/RustPython

Length of output: 175


🏁 Script executed:

rg "ruff" .github/workflows/ci.yaml -n

Repository: RustPython/RustPython

Length of output: 257


ruff check --diff only checks fixable violations; add a full lint check to catch all violations.

ruff check --diff implies --fix-only, which means it only reports violations that can be automatically fixed. This will not catch style issues or violations that require manual fixes, allowing existing violations to persist indefinitely in CI. Either remove --diff to perform a full lint check, or add a separate ruff check (without --diff) step to ensure the entire codebase meets all linting rules.

🤖 Prompt for AI Agents
.github/workflows/ci.yaml around lines 326 to 329: the workflow currently runs
"ruff check --diff" which only reports fixable (auto-fixable) violations; update
the CI to run a full lint check by either removing the --diff flag (use "ruff
check") or adding an additional step that runs "ruff check" (without --diff) in
addition to the existing diff check so all lint violations, including
non-fixable ones, fail CI.