← Back to Pull requests

add more clippy lints #160

Merged
marcoieni merged 5 files (73 lines) on Nov 18, 2026 08:53 UTC
View on GitHub
marcoieni marcoieni commented on Nov 17, 2026 09:01 UTC
Author

No description provided by author.

Diff: 73 lines (+64 / -9) across 5 files Reviewer: hashcatHitman Review duration: 1431m
All Vouch review confidence checks passed
Residual risk 0.02 = Change Risk (0.35) × (1 − Review Confidence (0.93)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.35 · 73 lines diff across 5 files
0.35
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.96 · 1 substantive comment(s)
0.96
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
93%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.258
Real PR Conversation Timeline
4 items
hashcatHitman hashcatHitman commented on code on Nov 17, 2026 16:04 UTC
Code Review
Cargo.toml:1
@@ -20,3 +20,31 @@ base64 = "0.23.1"
 
 [dev-dependencies]
 insta = "1.48.0"
+
+[lints.clippy]
+# `priority` gives the clippy pedantic group a lower priority than individual lints.
+# Useful to override pedantic lints.
+pedantic = { level = "warn", priority = -1 }
+
+# Restriction lints
+as_underscore = "warn"
+exit = "warn"
+filetype_is_file = "warn"
+float_cmp_const = "warn"
+get_unwrap = "warn"
+if_then_some_else_none = "warn"
+let_underscore_must_use = "warn"
+lossy_float_literal = "warn"
+map_err_ignore = "warn"
+map_with_unused_argument_over_ranges = "warn"
+mem_forget = "warn"
+rc_buffer = "warn"
+rest_pat_in_fully_bound_structs = "warn"
+unneeded_field_pattern = "warn"

I prefer to use rest_pattern_accessible_field. It is a little more verbose, but explicitly matching every field makes adding new fields a compile-time error, which forces you to explicitly decide how to handle the new field, rather than letting you silently forget to.

hashcatHitman hashcatHitman approved these changes on Nov 17, 2026 16:06 UTC
Approved Reviewer

Looks good to me, though I have a small personal preference nit I've left as a comment for your consideration.

ubiratansoares ubiratansoares approved these changes on Nov 17, 2026 17:10 UTC
Approved Reviewer

LGTM, no strong opinion on @hashcatHitman nit :)

Reviewers
Assignees
marcoieni marcoieni
Labels
risk: low confidence: 93.4% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 34.6% (LOW) · Higher = larger blast radius
34.6%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 93.4% · Lower = rushed or shallow review
93.4%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 2.3% · Safe to merge
2.3%