Repository navigation
deprecate: replace --tidy-review/--format-review with --pr-review - #377
Conversation
- add `--pr-review` to control posting PR reviews - make `--tidy-review`/`--format-review` aliases of `--pr-review` for backward compatibility resolves #375
|
Warning Review limit reached
More reviews will be available in 41 minutes and 53 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughTwo separate CLI flags ( ChangesPR Review Flag Unification
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #377 +/- ##
==========================================
- Coverage 92.43% 92.41% -0.02%
==========================================
Files 23 23
Lines 3646 3637 -9
==========================================
- Hits 3370 3361 -9
Misses 276 276 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
cpp-linter/tests/reviews.rs (1)
218-231: ⚡ Quick winAdd explicit tests for deprecated
--tidy-review/--format-reviewaliases.The suite now validates only
--pr-review, so backward-compatibility paths for legacy flags are untested. Adding a small pair of alias-driven cases would prevent regressions in the deprecation path.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@cpp-linter/tests/reviews.rs` around lines 218 - 231, The test suite in reviews.rs only validates the new --pr-review flag but does not test the deprecated --tidy-review and --format-review aliases, leaving backward-compatibility paths untested. Add two additional test cases that use the deprecated --tidy-review and --format-review flags respectively (either replacing or alongside --pr-review in the args vector construction) to ensure these legacy flags continue to work correctly and prevent regressions in the deprecation path.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@cpp-linter/src/cli/mod.rs`:
- Around line 509-521: The pr_review field in the CLI argument configuration has
removed the short form flags (-d and -m), breaking backward compatibility for
existing scripts and workflows. To fix this, add support for the deprecated
short form flags in the pr_review argument definition. Update the aliases
configuration or add an additional short-form mapping mechanism to maintain
backward compatibility with the legacy -d and -m short flags that were
previously supported, while keeping the existing long form aliases
(format-review, tidy-review) intact.
---
Nitpick comments:
In `@cpp-linter/tests/reviews.rs`:
- Around line 218-231: The test suite in reviews.rs only validates the new
--pr-review flag but does not test the deprecated --tidy-review and
--format-review aliases, leaving backward-compatibility paths untested. Add two
additional test cases that use the deprecated --tidy-review and --format-review
flags respectively (either replacing or alongside --pr-review in the args vector
construction) to ensure these legacy flags continue to work correctly and
prevent regressions in the deprecation path.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 2c11ffd3-6577-4a80-b007-ec7ffee8dc81
📒 Files selected for processing (6)
cpp-linter/src/clang_tools/clang_tidy.rscpp-linter/src/cli/mod.rscpp-linter/src/cli/structs.rscpp-linter/src/rest_client.rscpp-linter/src/run.rscpp-linter/tests/reviews.rs
💤 Files with no reviewable changes (1)
- cpp-linter/src/clang_tools/clang_tidy.rs
…ds (#464) Part of aligning the READMEs across the org (same layout as cpp-linter/cpp-linter-hooks#289). Every install command was run today. ## Install commands | Command | Today | Now | |---|---|---| | `cargo install cpp-linter --features bin` | fails: no version matches `*`. Any range picks `2.0.0-rc9` (semver sorts it after `rc.23`), which has no `bin` feature | `--version 2.0.0-rc.23` | | `cargo binstall cpp-linter` | fails the same way | `--version 2.0.0-rc.23` | | `pip install cpp-linter` | installs the Python package 1.14.1 | the README says so; TestPyPI needs `--pre` (fails without it on pip 26.2.1 and 25.2) | | `npm install @cpp-linter/cpp-linter` | fails: `latest` is the deprecated rc2 | `@cpp-linter/cpp-linter@next` (rc.21) | The `rc.23` pin has to be bumped by hand at each crate release, since `bump-n-release.nu` does not touch READMEs. ## README.md - **Header:** - The H1 is `cpp-linter-rs`. - Badges: v2 release candidate, ci (`run-dev-tests.yml`), coverage, part of cpp-linter. The five build badges are gone. - The checklist becomes one sentence with the same words and links. - A link line follows. - **Warning:** the website's wording, "in release candidates; use the Python package until 2.0 is released", instead of "experimental". - **Badges further down:** - TestPyPI and npm `next` stay, in the same colors. - crates.io, PyPI and docs.rs are gone; they showed rc9, 1.14.1 or the wrong version. - **Example:** it used the removed `--tidy-review`/`--format-review` links. It now uses `--pr-review` (#377), and all 7 images load. - **Sections:** `## Install` becomes `## Quick start`, with the content unchanged. "Have question or feedback?" becomes `## Contributing` and links CONTRIBUTING.md. ## Package READMEs - **All three:** a link line is added, and the `cli.html` links (404) now point to `/cli/`. - **`cpp-linter/README.md` (crates.io):** typos and "Github" spellings are fixed. The CHANGELOG badge is removed; restore it if you want it on crates.io. - **`bindings/python/README.md`:** the TestPyPI command gets `--pre`, and `cpp-linter -help` becomes `--help`. - **`bindings/node/README.md`:** the install command uses `@next`. ## docs/docs/index.md The `[tidy-review]` and `[format-review]` definitions become `[pr-review]`. Without this the docs home page would print `[--pr-review][pr-review]` as text. ## Checked - `readme_renderer` passes for the Python binding README. - pre-commit, including cspell, passes. - All links return 200 (npmjs.com answers scripts with 403). - The docs build runs on this PR. ## Outside this PR - **npm `latest`:** it still points to the deprecated rc2. An npm owner can run `npm dist-tag add @cpp-linter/cpp-linter@2.0.0-rc.21 latest`. - **crates.io:** it shows rc9's README until 2.0 is out, or until rc1 to rc15 are yanked. Yanking would also let a version range pick the newest rc. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated project guides with links to the website, documentation, getting-started resources, and discussions. * Added v2 release-candidate quick-start instructions for Rust, Node.js, and Python, including pre-release installation details and a note about the standard PyPI package. * Updated pull-request review guidance to use `--pr-review` and refreshed CLI documentation links. * Updated project descriptions and badge links, and removed select badges. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Brendan <2bndy5@gmail.com>
…avior (#503) <!-- claude-projects-attribution: {"github_login":"shenxianpeng"} --> ## Summary Docs/code consistency pass of the v2 docs against the clap definitions and current behavior. `docs/cli.yml` (version and permission badges, looked up by each option's long name): - `extra-args` never matched: the option is `--extra-arg`. Renamed the key. - `tidy-review` / `format-review` are now only aliases of `--pr-review` (#377), so `--pr-review` had no version or permission badge. Replaced both with a `pr-review` entry (`pull-requests: write`). - `--mod-sys` / `--no-mod-sys` had no entries; added them. `docs/docs/pr-review-caveats.md`: - The collapsed patch in the review summary only holds the suggestions that did not fit in the diff (`common_fs.rs`), and it is left out when it is too large for a comment (`clang_tools/mod.rs`). The docs said the full patch is always included. - Added that suggestions already posted in an earlier review are not repeated, and no new review is posted when all of them were (`rest_client.rs`). ## Related Issues None. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated CLI guidance for system-module options and the singular `extra-arg` setting. * Consolidated pull-request review configuration under `pr-review`, replacing the separate tidy and format review entries. * Clarified that previously posted suggestions aren’t repeated and that no new review is posted when all suggestions have already been shared. * Updated guidance for suggestions outside the pull-request diff: the summary comment includes a collapsible patch when it fits. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Xianpeng Shen <3353385+shenxianpeng@users.noreply.github.com>
--pr-reviewto control posting PR reviews--tidy-review/--format-reviewaliases of--pr-reviewfor backward compatibilityresolves #375
Summary by CodeRabbit
--pr-reviewflag, replacing separate review toggles for better user clarity and simpler command-line setup.--tidy-reviewand--format-reviewflags remain available as backward-compatible aliases to ensure existing workflows continue without interruption.