policy: activate Clippy 1.94/1.95 ratchets#505
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (8)
✨ 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 |
EffortlessSteven
left a comment
There was a problem hiding this comment.
Self-review checklist (PR 4 — Clippy 1.94/1.95 ratchets)
Scope correctness
- All 8 lints were measured clean before activation (no suppression added, no baseline reset, no policy weakening)
disallowed_fieldscorrectly held on HOLD (requires field-policy in clippy.toml before activation)manual_pop_ifcorrectly deferred to MSRV 1.96 (the lint does not exist in Rust 1.95; activating it would emit an "unknown lint" warning)
Code changes
- All
duration_suboptimal_unitsfixes use Clippy's exact suggested replacements (from_hours/from_mins); arithmetic was pre-computed for clarity (e.g.10 * 24 = 240,30 * 24 = 720) - The
from_hours(720)used for both thevalidity_days(30)and(10+20)×24cases in builder_patterns.rs is correct — both evaluate to 720 hours - No
#[allow]or#[expect]suppressions introduced; all warnings resolved at source
Policy file
policy/clippy-lints.tomlnow has[[active_clippy]]entries mirroring every entry in[workspace.lints.clippy]— the policy mirror is consistent with Cargo.tomlmanual_pop_ifentry updated:activate_when_msrv = "1.96"with note explaining the deferral
Gate
cargo xtask gate --checkpasses: fmt + cargo check + clippy + test-compile + public-surface + docs-sync all green
Generated by Claude Code
Promote 8 planned Clippy lints to active in [workspace.lints.clippy]: - same_length_and_capacity = "deny" (catch raw-parts bugs) - manual_ilog2 / decimal_bitwise_operands / needless_type_cast = "warn" - manual_checked_ops / manual_take / duration_suboptimal_units = "warn" - unnecessary_trailing_comma = "warn" Fix all resulting warnings across the workspace: - Replace Duration::from_secs(N*3600) with from_hours/from_mins - Move planned entries to [[active_clippy]] in policy/clippy-lints.toml - Keep disallowed_fields on hold; defer manual_pop_if to MSRV 1.96 https://claude.ai/code/session_01UtGUK2qnkGRFFVNoSqaUYB
40405a4 to
a78fb4f
Compare
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Summary
[[planned]]to active in[workspace.lints.clippy], all measured clean against the workspace before activationduration_suboptimal_unitswarnings by replacingDuration::from_secs(N*3600/86400)withfrom_hours/from_minsequivalentspolicy/clippy-lints.tomlto move entries to[[active_clippy]]sections; keepsdisallowed_fieldson HOLD and defersmanual_pop_ifto MSRV 1.96 (not present in Rust 1.95)Activated lints:
same_length_and_capacitymanual_ilog2decimal_bitwise_operandsneedless_type_castmanual_checked_opsmanual_takeduration_suboptimal_unitsunnecessary_trailing_commaTest plan
cargo clippy --workspace --all-targets --all-features --locked -- -D warningspasses cleancargo xtask gate --checkpasses (fmt + check + clippy + test-compile + public-surface + docs-sync)prjob passes on GitHub Actionshttps://claude.ai/code/session_01UtGUK2qnkGRFFVNoSqaUYB
Generated by Claude Code