Unify lint CI job by ShaharNaveh · Pull Request #7505 · RustPython/RustPython
Note
Reviews paused
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.
Use the following commands to manage reviews:
@coderabbitai resumeto resume automatic reviews.@coderabbitai reviewto trigger a single review.
Use the checkboxes below for quick actions:
-
▶️ Resume reviews - 🔍 Trigger review
📝 Walkthrough
Walkthrough
Adds Dependabot pre-commit updates, introduces a repository-level .pre-commit-config.yaml, refactors CI workflows (consolidates/removes lint/format jobs and steps in .github/workflows/ci.yaml, deletes pr-format.yaml), and enhances scripts/check_redundant_patches.py with glob args, deduplication, and CI-style diagnostics.
Changes
| Cohort / File(s) | Summary |
|---|---|
Dependabot \.github/dependabot.yml |
Added updates entry for the pre-commit ecosystem scoped to / with interval: weekly and default-days: 7. |
CI workflows \.github/workflows/ci.yaml, \.github/workflows/pr-format.yaml |
Reworked ci.yaml: added Linux-only cargo doc --locked, reorganized lint job to remove many previous format/lint steps and introduce cargo shear (via cargo-binstall), actionlint, zizmor, prek with cache keyed to .pre-commit-config.yaml, adjusted Rust components and added clippy installs/runs in several jobs, removed standalone cargo-shear/security-lint jobs; deleted pr-format.yaml. |
Pre-commit config .pre-commit-config.yaml |
New pre-commit pipeline (fail_fast: false): merge-conflict check, Ruff format/check (I rules) with fixes, local hooks for cargo fmt and opcode metadata generation (serialized), cspell CLI with extra dictionaries, and Prettier limited to wasm/. |
Scripts scripts/check_redundant_patches.py |
Added CLI arg parsing (build_argparser()), iter_files() to expand/deduplicate glob patterns, IS_GH_CI flag to emit GitHub Actions ::error annotations, changed main() to main(patterns: list[str]), and adjusted invocation from __main__. |
Sequence Diagram(s)
sequenceDiagram
participant Dev as Developer
participant GH as GitHub Actions
participant CI as CI Jobs
participant PC as Pre-commit Hooks
participant RD as Reviewdog
Dev->>GH: Push PR / commit
GH->>CI: Trigger workflows (ci.yaml)
CI->>PC: Run pre-commit pipeline (`.pre-commit-config.yaml`)
PC-->>CI: Return hook results (pass/fail)
CI->>CI: Run cargo/doc/clippy/shear/actionlint/zizmor/prek steps
CI-->>GH: Report job status
GH->>RD: On lint/format failure, run reviewdog suggester
RD-->>Dev: Post inline suggestions/comments
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
- Fix pr-format CI to fail on formatting changes #7411 — Related changes to formatting/PR-format CI workflows (overlaps removal/adjustment of
pr-format.yaml). - Add
cargo shearCI step #7461 — Related adjustments around integratingcargo-shearinto CI. - Add CI step for checking redundant test patches #7126 — Related: adds CI step invoking
scripts/check_redundant_patches.py(script and CI interaction).
Suggested labels
skip:ci
Suggested reviewers
- youknowone
- moreal
Poem
🐰 I hopped through hooks and tidy trees,
Ruff brushed my whiskers, Prettier pleased,
Shear snipped edges, actionlint gave a peep,
CI hummed on, reviewdog watched my leap,
A small rabbit cheers the pipeline sweep.
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. | Write docstrings for the functions missing them to satisfy the coverage threshold. |
✅ Passed checks (2 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title 'Unify lint CI job' directly and accurately summarizes the main objective of the pull request, which consolidates multiple CI lint steps into a single unified job. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
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 @coderabbitai help to get the list of available commands and usage tips.