Skip to content

deprecate: replace --tidy-review/--format-review with --pr-review#377

Merged
2bndy5 merged 2 commits into
mainfrom
deprecate-review-args
Jun 20, 2026
Merged

deprecate: replace --tidy-review/--format-review with --pr-review#377
2bndy5 merged 2 commits into
mainfrom
deprecate-review-args

Conversation

@2bndy5

@2bndy5 2bndy5 commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator
  • add --pr-review to control posting PR reviews
  • make --tidy-review/--format-review aliases of --pr-review for backward compatibility

resolves #375

Summary by CodeRabbit

  • Refactor
    • Consolidated PR review configuration into a single unified --pr-review flag, replacing separate review toggles for better user clarity and simpler command-line setup.
    • Legacy --tidy-review and --format-review flags remain available as backward-compatible aliases to ensure existing workflows continue without interruption.

- add `--pr-review` to control posting PR reviews
- make `--tidy-review`/`--format-review` aliases of `--pr-review` for backward compatibility

resolves #375
@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@2bndy5, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 2edc645c-04cc-4af8-be04-5d5f03ada107

📥 Commits

Reviewing files that changed from the base of the PR and between abe9577 and d7814d9.

📒 Files selected for processing (1)
  • cpp-linter/src/cli/mod.rs
📝 Walkthrough

Walkthrough

Two separate CLI flags (--tidy-review/-d and --format-review/-m) controlling PR review posting are replaced by a single --pr-review/-P flag with backward-compatible aliases. The corresponding tidy_review and format_review fields are removed from ClangParams, FeedbackOptions, and FeedbackInput, replaced by a single pr_review: bool. Runtime consumers in run.rs and rest_client.rs are updated to reference the new field, and tests are adjusted accordingly.

Changes

PR Review Flag Unification

Layer / File(s) Summary
CLI flag and struct contract changes
cpp-linter/src/cli/mod.rs, cpp-linter/src/cli/structs.rs
FeedbackOptions replaces tidy_review/format_review with a single pr_review bool (-P/--pr-review) with aliases format-review and tidy-review. ClangParams removes both fields and their construction assignments. FeedbackInput replaces both fields with pr_review in its definition, From<&Cli> impl, and Default impl.
Runtime flag consumption
cpp-linter/src/run.rs, cpp-linter/src/rest_client.rs
run.rs switches the changed-files fetch condition to check cli.feedback_options.pr_review, makes clang_params immutable, and removes the AND-with-is_pr mutation of the now-deleted fields. rest_client.rs narrows the PR review trigger from tidy_review || format_review to pr_review.
Test updates
cpp-linter/tests/reviews.rs, cpp-linter/src/clang_tools/clang_tidy.rs
TestParams replaces tidy_review/format_review with pr_review (defaults to true), setup() condition and run_main arg wiring are updated to use --pr-review, the two tool-specific-only test cases are removed, and the use_extra_args test removes the deleted fields from its ClangParams literal.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: deprecating two separate CLI flags and consolidating them into a single unified flag.
Linked Issues check ✅ Passed All coding objectives from issue #375 are met: a new --pr-review flag was added, old flags are maintained as aliases for backward compatibility, and the unified logic replaces separate review controls.
Out of Scope Changes check ✅ Passed All changes are directly related to consolidating review control options. No unrelated modifications were introduced outside the scope of issue #375.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecov Bot commented Jun 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.41%. Comparing base (f352be2) to head (d7814d9).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@2bndy5 2bndy5 marked this pull request as ready for review June 20, 2026 18:47

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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)
cpp-linter/tests/reviews.rs (1)

218-231: ⚡ Quick win

Add explicit tests for deprecated --tidy-review / --format-review aliases.

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

📥 Commits

Reviewing files that changed from the base of the PR and between f352be2 and abe9577.

📒 Files selected for processing (6)
  • cpp-linter/src/clang_tools/clang_tidy.rs
  • cpp-linter/src/cli/mod.rs
  • cpp-linter/src/cli/structs.rs
  • cpp-linter/src/rest_client.rs
  • cpp-linter/src/run.rs
  • cpp-linter/tests/reviews.rs
💤 Files with no reviewable changes (1)
  • cpp-linter/src/clang_tools/clang_tidy.rs

Comment thread cpp-linter/src/cli/mod.rs
@2bndy5 2bndy5 merged commit fc75245 into main Jun 20, 2026
73 checks passed
@2bndy5 2bndy5 deleted the deprecate-review-args branch June 20, 2026 19:52
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.

deprecate separate review options

1 participant