-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Update ruff CI version #6418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update ruff CI version #6418
Conversation
WalkthroughThe CI workflow is updated to replace manual Python setup and explicit Ruff installation with the dedicated Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/ci.yaml (1)
307-309: (Optional) Rename thelintjob to reflect it now runs clippy + ruff + prettier + cspell.
Currentlintname (“Check Rust code with clippy”) no longer matches the job contents, which can confuse CI triage.Also applies to: 318-320
📜 Review details
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/ci.yaml(1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
Repo: RustPython/RustPython PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T12:17:28.606Z
Learning: Applies to **/*.py : Use ruff for linting Python code
📚 Learning: 2025-11-29T12:17:28.606Z
Learnt from: CR
Repo: RustPython/RustPython PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T12:17:28.606Z
Learning: Applies to **/*.py : Use ruff for linting Python code
Applied to files:
.github/workflows/ci.yaml
📚 Learning: 2025-11-29T12:17:28.606Z
Learnt from: CR
Repo: RustPython/RustPython PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T12:17:28.606Z
Learning: Applies to **/*.rs : Always run clippy to lint Rust code (`cargo clippy`) before completing tasks and fix any warnings or lints introduced by changes
Applied to files:
.github/workflows/ci.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
- GitHub Check: Run snippets and cpython tests (windows-latest)
- GitHub Check: Run rust tests (macos-latest)
- GitHub Check: Run snippets and cpython tests (macos-latest)
- GitHub Check: Run snippets and cpython tests (ubuntu-latest)
- GitHub Check: Run rust tests (ubuntu-latest)
- GitHub Check: Run rust tests (windows-latest)
- GitHub Check: Run snippets and cpython tests on wasm-wasi
- GitHub Check: Check the WASM package and demo
- GitHub Check: Check Rust code with clippy
- GitHub Check: Ensure compilation on various targets
🔇 Additional comments (1)
.github/workflows/ci.yaml (1)
321-325: Change Ruff version from0.14.9to0.14.8.Ruff version 0.14.9 does not exist. The latest published release is 0.14.8 (released Dec 4, 2025). The astral-sh/ruff-action v3.5.1 correctly supports the
versioninput parameter, but the specified version is invalid and will cause the workflow to fail during installation.⛔ Skipped due to learnings
Learnt from: ShaharNaveh Repo: RustPython/RustPython PR: 5932 File: .github/workflows/comment-commands.yml:18-24 Timestamp: 2025-07-10T10:08:43.330Z Learning: In GitHub Actions workflows for the RustPython project, the maintainer ShaharNaveh prefers to keep workflows simple and doesn't mind if steps fail when the desired state is already achieved (e.g., user already assigned to an issue). Avoid suggesting complex error handling for edge cases they don't consider problematic.Learnt from: CR Repo: RustPython/RustPython PR: 0 File: .github/copilot-instructions.md:0-0 Timestamp: 2025-11-29T12:17:28.606Z Learning: Applies to **/*.py : Use ruff for linting Python code
| - run: ruff check --diff | ||
|
|
||
| - run: ruff format --check | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 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 1Repository: RustPython/RustPython
Length of output: 175
🏁 Script executed:
rg "ruff" .github/workflows/ci.yaml -nRepository: 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.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.