Skip to content

fix(cli): unblock Rust 1.95 Clippy on ripr plus - #2591

Closed
EffortlessSteven wants to merge 1 commit into
mainfrom
fix/main-clippy-useless-format
Closed

EffortlessSteven wants to merge 1 commit into
mainfrom
fix/main-clippy-useless-format

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Summary

Unblock current main after the merged #2587 CLI error update exposed a Rust
1.95 Clippy failure in the unchanged ripr plus parser path.

  • Replace the literal format! with the equivalent owned string.
  • Preserve the exact user-facing error text and behavior.

Refs #2587

Acceptance matrix

Acceptance item Evidence Status
Current main passes the Rust 1.95 Clippy gate cargo clippy -p ripr --lib --all-features -- -D warnings delivered
ripr plus missing-input error remains unchanged source-preserving one-line fix delivered

Proof

  • cargo fmt --all -- --check
  • cargo clippy -p ripr --lib --all-features -- -D warnings
  • git diff --check

This is a mainline unblock; it does not change the ripr plus contract.

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@EffortlessSteven, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 18 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

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 reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

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, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 79830119-81fc-400a-8853-0b0b31e66c03

📥 Commits

Reviewing files that changed from the base of the PR and between c83ec02 and 81dd62d.

📒 Files selected for processing (1)
  • crates/ripr/src/app/ripr_plus.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/main-clippy-useless-format

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.

@EffortlessSteven
EffortlessSteven enabled auto-merge (squash) July 28, 2026 15:07
@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Duplicate of #2590: same one-file Clippy repair. Keeping #2590 as the canonical PR because it was created first and has the corrected Steven Zimmerman author identity; closing this duplicate also avoids duplicate merges.

auto-merge was automatically disabled July 28, 2026 15:15

Pull request was closed

@EffortlessSteven
EffortlessSteven deleted the fix/main-clippy-useless-format branch July 28, 2026 15:15

@github-actions github-actions 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.

Decision

  • Needs reviewer attention before upstream: findings remain.

Confirmed findings

  • clippy::literal_format_with_no_arguments trigger likely indicates Rust 1.95 tightened detection; rewrite to .to_string() is the standard, minimal fix and matches PR body claim of source-preserving one-line fix.
  • No blocker/medium actionable issue isolated to right-side diff lines. Source-route scope check is bounded to ripr_plus.rs; sibling format!() sites in the same file or adjacent ripr CLI modules were not receipted-scanned. Treat as residual coverage gap, not a finding.
  • Error string could be a const &str or a thiserror variant for consistency with the rest of the crate's error style, but extraction is out of scope for a Clippy unblock.

Verification questions

  • Confirm diff is local to parse_options error construction; replaces format!(const_str) with const_str.to_string(). Public parse_options signature unchanged, so this is a no-op for callers.
  • Confirm test oracle is non-discriminating for the parse_options change in crates/ripr/src/app/ripr_plus.rs.
  • Confirm ref #2587 is referenced as the proximate cause, but no diff or link to #2587 is provided in this packet to confirm the Clippy trigger was the literal format! macro on a constant string. Reasonably inferred (Rust 1.95 clippy::unnecessary_format or similar), but not strictly evidenced in-packet.

Refuted

  • Possibly allocation-failure regression from format! → .to_string(); refuted because: No PR diff, seeded thread, or candidate raises allocation-failure analysis; literal was &'static str so no new heap allocation is introduced vs. prior format!.
  • Tests must distinguish old format! behavior from new .to_string() behavior; refuted because: Both produce identical String; no observable behavior delta exists to test. Lint is a compile-time constraint, not runtime semantics.
  • Allocation failure in .to_string() could panic where format! previously propagated cleanly; refuted because: Both paths allocate on the heap; .to_string() on a &'static str is equivalent in failure mode (abort on OOM). No behavioral regression.
  • Refutation attempt: 'exact user-facing error text and behavior' assertion — substituting format!() with .to_string() on a plain &str literal is byte-equivalent (no fmt args), so behavior preservation is sound.
  • Opposition attempted to find a regression path: no other call sites of format! were touched, the Err return type is still Result<_, String>, and the message is constructed unconditionally once before return.

Parked follow-ups

Evidence gaps

[review body truncated; see review artifacts]

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.

1 participant