fix(clippy): stop passing targets the aspect cannot lint #1010
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 338 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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.349
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #1010"
general
weight: 0.35
dzbarsky
Follow-up to the discussion in #879, this PR makes the lint failure loud along the lines @dzbarsky suggested there.
A Rust target that was not built with the
rules_rustthatrules_rsprovides carries aCrateInfothis module cannot read. Today the aspect takes the no-op branch for it, writes an empty report and exit code 0. The end result is thatclippy_teston it passes with clippy never having run.Two changes:
required_providers, so Bazel does not apply it to those targets at all. It has to be the any of the two[[CrateInfo], [TestCrateInfo]](rust_static_libraryandrust_shared_libraryadvertise only the test provider hence the second requirement).lint_testwould fail on'OutputGroupInfo' value with no field or method 'rules_lint_human'. It now says which test and which src have no report, and lists the reasons an aspect skips a target.Changes are visible to end-users: yes
clippy.bzldocstringclippy_testthat was passing without running clippy now fails analysis. A custom rule listed inrule_kindsthat returnsCrateInfowithout declaring it inprovidesis no longer visited.rules_rustfromrules_rsare skipped by the aspect, and alint_teston one fails with a message naming the target, instead of passing with nothing linted.Test plan
//lint/test:lint_test_no_report_test, an analysis test withexpect_failure. Against main'slint_test.bzlit fails with the oldOutputGroupInfoerror.examples/rust:bazel test --@aspect_rules_lint//lint:fail_on_violation=false //...passes 16 of 16, sorust_binary,rust_libraryandrust_testare all still visited (thebad_*fixtures still report exit code 1).rules_rust0.74.0), with both modules overridden to this branch.//apps/rust_app:rust_app.lintpasses on 2.9.0 +aspect_rules_lint_rust0.0.3 and on main, and on this branch fails with: