Public report of rust-lang/rust-clippy, published 14 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 14 November 2026, 15:30 UTC · Survey ID cd_59b70066504442db87478a05746f5f24
rust-lang/rust-clippy
Measured 14 November 2026, 15:30 UTC, at code version ab650f4
CAI scoreStrong
CriticalWeakAdequateStrongExemplary
Down 2 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 155,493 lines of product code in 10 projects, tests not counted · Estimated rebuild effort: about 2.2 person-years · Weakest lens: Production Readiness, 59
Findings by how serious they are
0 critical1034 serious29 minor
14 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
14 November 2026, 15:30 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
40of 40 dimensions measured by tools.
1049of 1063 findings point to an exact file and line, so you can open each one in the code. The other 14 concern the repository as a whole, such as missing documentation.
40dimensions across 5 lenses, read from 155,493 lines of product code in 10 projects.
rust-lang/rust-clippy meets our standard for a preview release. It scores 65 out of 100 and is rated Strong, and it has no critical findings.
Production Readiness, at 59, is the weakest lens and counts most in the score. The best first step is recording design decisions, worth about 5 points. Adopting a logging library would lift Production Readiness itself, also worth about 5. Raising Production Readiness to 62 would lift the score to about 66.
Most of the 1,034 serious findings are in Code Health.
The product code is 155,493 lines, about €310,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Production Readiness rose from 59 to 62, the lowest score rated Strong, the score would rise from 65 to about 66.
Code composition: what the lines of code are
Product code 58%Tests 42%
New since the last survey: 174 findings
These 174 critical or serious findings weren't in the previous survey, on 27 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
Code Duplication · Edited copy of a member (65 corresponding lines) clippy_lints_internal/src/repeated_is_diagnostic_item.rs
Code Duplication · Edited copy of a member (81 corresponding lines) clippy_utils/src/ast_utils/mod.rs
Code Duplication · Edited copy of a member (34 corresponding lines) clippy_lints/src/manual_retain.rs
Code Duplication · Edited copy of a member (33 corresponding lines) clippy_utils/src/visitors.rs
Code Duplication · Edited copy of a member (46 corresponding lines) clippy_dev/src/deprecate_lint.rs
Code Duplication · Edited copy of a member (25 corresponding lines) clippy_lints/src/operators/assign_op_pattern.rs
Code Duplication · Edited copy of a member (27 corresponding lines) clippy_utils/src/consts.rs
Code Duplication · Edited copy of a member (39 corresponding lines) clippy_utils/src/visitors.rs
Code Duplication · Edited copy of a member (29 corresponding lines) clippy_lints/src/manual_pop_if.rs
Code Duplication · Edited copy of a member (36 corresponding lines) clippy_utils/src/ty/mod.rs
Code Duplication · Edited copy of a member (35 corresponding lines) clippy_lints/src/functions/must_use.rs
Code Duplication · Edited copy of a member (34 corresponding lines) clippy_lints/src/non_copy_const.rs
Code Duplication · Edited copy of a member (36 corresponding lines) clippy_lints/src/doc/include_in_doc_without_cfg.rs
Code Duplication · Edited copy of a member (32 corresponding lines) clippy_config/src/types.rs
Code Duplication · Edited copy of a member (30 corresponding lines) clippy_utils/src/ty/mod.rs
Code Duplication · Edited copy of a member (20 corresponding lines) clippy_lints/src/empty_with_brackets.rs
Code Duplication · Edited copy of a member (24 corresponding lines) clippy_dev/src/utils.rs
Code Duplication · Edited copy of a member (21 corresponding lines) clippy_dev/src/utils.rs
Code Duplication · Edited copy of a member (35 corresponding lines) clippy_lints/src/derive/derive_ord_xor_partial_ord.rs
Code Duplication · Edited copy of a member (20 corresponding lines) clippy_utils/src/consts.rs
Code Duplication · Edited copies of one member (3 members, 24+ corresponding lines) clippy_utils/src/res.rs
Code Duplication · Edited copy of a member (35 corresponding lines) clippy_lints/src/manual_clamp.rs
Code Duplication · Edited copy of a member (25 corresponding lines) clippy_lints/src/reserve_after_initialization.rs
Code Duplication · Edited copy of a member (30 corresponding lines) clippy_lints/src/undocumented_unsafe_blocks.rs
Code Duplication · Edited copy of a member (20 corresponding lines) clippy_lints/src/pathbuf_init_then_push.rs
Code Duplication · Edited copy of a member (13 corresponding lines) clippy_utils/src/ty/mod.rs
Code Duplication · Edited copy of a member (25 corresponding lines) clippy_lints/src/casts/needless_type_cast.rs
Code Duplication · Edited copy of a member (20 corresponding lines) clippy_config/src/types.rs
Code Duplication · Edited copy of a member (15 corresponding lines) clippy_utils/src/mir/possible_borrower.rs
Code Duplication · Edited copy of a member (11 corresponding lines) clippy_lints/src/functions/result.rs
Code Duplication · Edited copy of a member (18 corresponding lines) clippy_lints/src/pathbuf_init_then_push.rs
Code Duplication · Edited copy of a member (15 corresponding lines) clippy_utils/src/str_utils.rs
Code Duplication · Edited copy of a member (25 corresponding lines) clippy_lints/src/casts/cast_sign_loss.rs
Code Duplication · Edited copy of a member (15 corresponding lines) clippy_lints/src/extra_unused_type_parameters.rs
Code Duplication · Edited copy of a member (14 corresponding lines) clippy_dev/src/edit_lints.rs
Code Duplication · Edited copy of a member (17 corresponding lines) clippy_lints/src/missing_doc.rs
Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) clippy_lints/src/pathbuf_init_then_push.rs
Code Duplication · Edited copy of a member (12 corresponding lines) clippy_lints/src/methods/map_unwrap_or.rs
Code Duplication · Edited copy of a member (10 corresponding lines) clippy_lints/src/loops/mut_range_bound.rs
Code Duplication · Edited copy of a member (26 corresponding lines) clippy_lints/src/non_std_lazy_statics.rs
Code Duplication · Edited copy of a member (15 corresponding lines) clippy_lints/src/operators/arithmetic_side_effects.rs
Code Duplication · Edited copy of a member (20 corresponding lines) clippy_lints/src/lifetimes.rs
Code Duplication · Edited copy of a member (8 corresponding lines) clippy_utils/src/ty/type_certainty/certainty.rs
Code Duplication · Edited copy of a member (13 corresponding lines) clippy_utils/src/lib.rs
Code Duplication · Edited copy of a member (34 corresponding lines) clippy_lints/src/semicolon_block.rs
Code Duplication · Edited copy of a member (22 corresponding lines) clippy_lints/src/casts/fn_to_numeric_cast.rs
Code Duplication · Edited copy of a member (15 corresponding lines) clippy_lints/src/bit_width.rs
Code Duplication · Edited copy of a member (11 corresponding lines) clippy_dev/src/utils.rs
Code Duplication · Edited copy of a member (30 corresponding lines) clippy_lints/src/matches/manual_filter.rs
Code Duplication · Edited copy of a member (14 corresponding lines) clippy_lints/src/returns/let_and_return.rs
Code Duplication · Edited copy of a member (14 corresponding lines) clippy_lints/src/matches/needless_match.rs
Code Duplication · Edited copy of a member (11 corresponding lines) clippy_lints/src/loops/manual_memcpy.rs
Code Duplication · Edited copy of a member (10 corresponding lines) clippy_lints/src/casts/cast_sign_loss.rs
Code Duplication · Edited copy of a member (16 corresponding lines) clippy_lints/src/missing_doc.rs
Code Duplication · Edited copy of a member (14 corresponding lines) clippy_lints/src/non_expressive_names.rs
Code Duplication · Edited copy of a member (9 corresponding lines) clippy_lints/src/operators/manual_isolate_lowest_one.rs
Code Duplication · Edited copy of a member (7 corresponding lines) clippy_utils/src/sugg.rs
Code Duplication · Edited copy of a member (12 corresponding lines) clippy_lints_internal/src/repeated_is_diagnostic_item.rs
Code Duplication · Edited copy of a member (26 corresponding lines) clippy_lints/src/casts/cast_sign_loss.rs
Code Duplication · Edited copy of a member (7 corresponding lines) clippy_lints/src/min_ident_chars.rs
Code Duplication · Edited copy of a member (9 corresponding lines) clippy_lints/src/methods/map_unwrap_or.rs
Code Duplication · Edited copy of a member (20 corresponding lines) clippy_lints_internal/src/collapsible_span_lint_calls.rs
Code Duplication · Edited copy of a member (10 corresponding lines) clippy_lints/src/methods/bind_instead_of_map.rs
Code Duplication · Edited copy of a member (10 corresponding lines) clippy_utils/src/ty/mod.rs
Code Duplication · Edited copy of a member (10 corresponding lines) clippy_lints/src/matches/try_err.rs
Code Duplication · Edited copy of a member (13 corresponding lines) clippy_lints/src/arbitrary_source_item_ordering.rs
Code Duplication · Edited copy of a member (6 corresponding lines) clippy_lints/src/await_holding_invalid.rs
Code Duplication · Edited copy of a member (14 corresponding lines) clippy_lints/src/implicit_return.rs
Code Duplication · Edited copies of one member (3 members, 16+ corresponding lines) clippy_lints/src/needless_pass_by_ref_mut.rs
Code Duplication · Edited copy of a member (8 corresponding lines) clippy_lints/src/single_component_path_imports.rs
Code Duplication · Edited copy of a member (16 corresponding lines) clippy_dev/src/parse/cursor.rs
Code Duplication · Edited copy of a member (5 corresponding lines) clippy_lints/src/empty_line_after.rs
Code Duplication · Edited copy of a member (16 corresponding lines) clippy_lints/src/methods/manual_saturating_arithmetic.rs
Code Duplication · Edited copy of a member (15 corresponding lines) clippy_utils/src/higher.rs
Code Duplication · Edited copy of a member (11 corresponding lines) clippy_utils/src/lib.rs
Code Duplication · Edited copy of a member (10 corresponding lines) clippy_lints/src/manual_strip.rs
Code Duplication · Edited copy of a member (10 corresponding lines) clippy_lints/src/methods/is_empty.rs
Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) clippy_config/src/metadata.rs
Code Duplication · Edited copy of a member (6 corresponding lines) clippy_lints/src/methods/unnecessary_to_owned.rs
Code Duplication · Edited copy of a member (11 corresponding lines) clippy_lints/src/methods/range_zip_with_len.rs
Code Duplication · Edited copy of a member (10 corresponding lines) clippy_lints/src/question_mark.rs
Code Duplication · Edited copy of a member (12 corresponding lines) clippy_lints/src/question_mark.rs
Code Duplication · Edited copy of a member (10 corresponding lines) clippy_utils/src/lib.rs
Code Duplication · Edited copy of a member (6 corresponding lines) clippy_lints/src/methods/err_expect.rs
Code Duplication · Edited copy of a member (9 corresponding lines) clippy_lints/src/methods/or_then_unwrap.rs
Code Duplication · Edited copy of a member (10 corresponding lines) clippy_utils/src/lib.rs
Code Duplication · Edited copy of a member (7 corresponding lines) clippy_lints/src/derivable_impls.rs
Code Duplication · Edited copy of a member (9 corresponding lines) clippy_lints/src/loops/explicit_into_iter_loop.rs
Code Duplication · Edited copy of a member (3 corresponding lines) clippy_lints/src/methods/single_char_add_str.rs
Code Duplication · Edited copy of a member (7 corresponding lines) clippy_lints/src/casts/cast_possible_truncation.rs
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 99 findings
These 99 critical or serious findings were in the previous survey, on 27 October 2026, and are gone from this one.
€100,000 to €520,000, for 1,736 to 5,507 hours of work, about 2.2 person-years for 1 to 5 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.9 at a score of 65. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Large: 155,493 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with Cargo.toml.
Raises the score by about 5 points · Low effort · ADR Quality
2
Adopt `tracing` with `tracing-subscriber` (JSON output) and log at meaningful points in the binaries you run.
Raises the score by about 5 points · Medium effort · Observability
3
Record your significant design decisions.
Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €310,000 to build again, about 2.2 person-years of work. Its weakest lens is Production Readiness, at 59 (Adequate). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 1 No ADRs found finding(s) in ADR Quality. Of all the actions in this report, it raises the score most for the work it takes: about 5 points for low effort, because it clears the 1 ADR Quality findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.1 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 5% to 11% on every change. The history of the code shows how much it changes: about 57,373 lines over the last 90 days, which is about 232,679 lines a year. At that pace, the extra work comes to an estimated 28.2 to 169.2 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
755 modules, with 446 dependencies between them. 2 loops run through 5 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 715 more are left out to keep it readable.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
clippy_dev.diag uses clippy_dev.utils, so a change to clippy_dev.utils can break clippy_dev.diag, while a change to clippy_dev.diag can't break clippy_dev.utils.
Position
Below the diagonal: clippy_dev.diag uses a module listed above it, which is the healthy direction.
clippy_dev.new_lint uses clippy_dev.utils, so a change to clippy_dev.utils can break clippy_dev.new_lint, while a change to clippy_dev.new_lint can't break clippy_dev.utils.
Position
Below the diagonal: clippy_dev.new_lint uses a module listed above it, which is the healthy direction.
clippy_lints.format_args uses clippy_utils.macros, so a change to clippy_utils.macros can break clippy_lints.format_args, while a change to clippy_lints.format_args can't break clippy_utils.macros.
Position
Below the diagonal: clippy_lints.format_args uses a module listed above it, which is the healthy direction.
clippy_lints.format_args uses clippy_utils.msrvs, so a change to clippy_utils.msrvs can break clippy_lints.format_args, while a change to clippy_lints.format_args can't break clippy_utils.msrvs.
Position
Below the diagonal: clippy_lints.format_args uses a module listed above it, which is the healthy direction.
clippy_lints.methods uses clippy_utils.macros, so a change to clippy_utils.macros can break clippy_lints.methods, while a change to clippy_lints.methods can't break clippy_utils.macros.
Position
Below the diagonal: clippy_lints.methods uses a module listed above it, which is the healthy direction.
clippy_lints.methods uses clippy_utils.msrvs, so a change to clippy_utils.msrvs can break clippy_lints.methods, while a change to clippy_lints.methods can't break clippy_utils.msrvs.
Position
Below the diagonal: clippy_lints.methods uses a module listed above it, which is the healthy direction.
clippy_lints.tuple_array_conversions uses clippy_utils.msrvs, so a change to clippy_utils.msrvs can break clippy_lints.tuple_array_conversions, while a change to clippy_lints.tuple_array_conversions can't break clippy_utils.msrvs.
Position
Below the diagonal: clippy_lints.tuple_array_conversions uses a module listed above it, which is the healthy direction.
clippy_lints.tuple_array_conversions uses clippy_utils.visitors, so a change to clippy_utils.visitors can break clippy_lints.tuple_array_conversions, while a change to clippy_lints.tuple_array_conversions can't break clippy_utils.visitors.
Position
Below the diagonal: clippy_lints.tuple_array_conversions uses a module listed above it, which is the healthy direction.
clippy_utils.check_proc_macro uses clippy_utils.macros, so a change to clippy_utils.macros can break clippy_utils.check_proc_macro, while a change to clippy_utils.check_proc_macro can't break clippy_utils.macros.
Position
Below the diagonal: clippy_utils.check_proc_macro uses a module listed above it, which is the healthy direction.
clippy_dev.parse uses clippy_dev.utils, so a change to clippy_dev.utils can break clippy_dev.parse, while a change to clippy_dev.parse can't break clippy_dev.utils.
Position
Below the diagonal: clippy_dev.parse uses a module listed above it, which is the healthy direction.
clippy_dev.parse uses clippy_dev.diag, so a change to clippy_dev.diag can break clippy_dev.parse, while a change to clippy_dev.parse can't break clippy_dev.diag.
Position
Below the diagonal: clippy_dev.parse uses a module listed above it, which is the healthy direction.
clippy_dev.parse uses clippy_dev.new_lint, so a change to clippy_dev.new_lint can break clippy_dev.parse, while a change to clippy_dev.parse can't break clippy_dev.new_lint.
Position
Below the diagonal: clippy_dev.parse uses a module listed above it, which is the healthy direction.
clippy_lints.manual_float_methods uses clippy_lints.attrs.duplicated_attributes, so a change to clippy_lints.attrs.duplicated_attributes can break clippy_lints.manual_float_methods, while a change to clippy_lints.manual_float_methods can't break clippy_lints.attrs.duplicated_attributes.
Position
Below the diagonal: clippy_lints.manual_float_methods uses a module listed above it, which is the healthy direction.
clippy_lints.manual_float_methods uses clippy_utils.msrvs, so a change to clippy_utils.msrvs can break clippy_lints.manual_float_methods, while a change to clippy_lints.manual_float_methods can't break clippy_utils.msrvs.
Position
Below the diagonal: clippy_lints.manual_float_methods uses a module listed above it, which is the healthy direction.
clippy_lints.manual_float_methods uses clippy_utils.check_proc_macro, so a change to clippy_utils.check_proc_macro can break clippy_lints.manual_float_methods, while a change to clippy_lints.manual_float_methods can't break clippy_utils.check_proc_macro.
Position
Below the diagonal: clippy_lints.manual_float_methods uses a module listed above it, which is the healthy direction.
clippy_lints.matches.manual_utils uses clippy_utils.sugg, so a change to clippy_utils.sugg can break clippy_lints.matches.manual_utils, while a change to clippy_lints.matches.manual_utils can't break clippy_utils.sugg.
Position
Below the diagonal: clippy_lints.matches.manual_utils uses a module listed above it, which is the healthy direction.
clippy_lints.matches.manual_utils uses clippy_utils.check_proc_macro, so a change to clippy_utils.check_proc_macro can break clippy_lints.matches.manual_utils, while a change to clippy_lints.matches.manual_utils can't break clippy_utils.check_proc_macro.
Position
Below the diagonal: clippy_lints.matches.manual_utils uses a module listed above it, which is the healthy direction.
clippy_lints.matches.redundant_pattern_match uses clippy_lints.attrs.duplicated_attributes, so a change to clippy_lints.attrs.duplicated_attributes can break clippy_lints.matches.redundant_pattern_match, while a change to clippy_lints.matches.redundant_pattern_match can't break clippy_lints.attrs.duplicated_attributes.
Position
Below the diagonal: clippy_lints.matches.redundant_pattern_match uses a module listed above it, which is the healthy direction.
clippy_lints.matches.redundant_pattern_match uses clippy_utils.macros, so a change to clippy_utils.macros can break clippy_lints.matches.redundant_pattern_match, while a change to clippy_lints.matches.redundant_pattern_match can't break clippy_utils.macros.
Position
Below the diagonal: clippy_lints.matches.redundant_pattern_match uses a module listed above it, which is the healthy direction.
clippy_lints.matches.redundant_pattern_match uses clippy_utils.check_proc_macro, so a change to clippy_utils.check_proc_macro can break clippy_lints.matches.redundant_pattern_match, while a change to clippy_lints.matches.redundant_pattern_match can't break clippy_utils.check_proc_macro.
Position
Below the diagonal: clippy_lints.matches.redundant_pattern_match uses a module listed above it, which is the healthy direction.
clippy_utils uses clippy_utils.msrvs, so a change to clippy_utils.msrvs can break clippy_utils, while a change to clippy_utils can't break clippy_utils.msrvs.
Position
Below the diagonal: clippy_utils uses a module listed above it, which is the healthy direction.
clippy_utils uses clippy_utils.check_proc_macro, so a change to clippy_utils.check_proc_macro can break clippy_utils, while a change to clippy_utils can't break clippy_utils.check_proc_macro.
Position
Below the diagonal: clippy_utils uses a module listed above it, which is the healthy direction.
clippy_utils.higher uses clippy_utils.check_proc_macro, so a change to clippy_utils.check_proc_macro can break clippy_utils.higher, while a change to clippy_utils.higher can't break clippy_utils.check_proc_macro.
Position
Below the diagonal: clippy_utils.higher uses a module listed above it, which is the healthy direction.
clippy_utils.hir_utils uses clippy_utils.check_proc_macro, so a change to clippy_utils.check_proc_macro can break clippy_utils.hir_utils, while a change to clippy_utils.hir_utils can't break clippy_utils.check_proc_macro.
Position
Below the diagonal: clippy_utils.hir_utils uses a module listed above it, which is the healthy direction.
clippy_config.de uses clippy_utils.higher, so a change to clippy_utils.higher can break clippy_config.de, while a change to clippy_config.de can't break clippy_utils.higher.
Position
Below the diagonal: clippy_config.de uses a module listed above it, which is the healthy direction.
clippy_dev.deprecate_lint uses clippy_dev.utils, so a change to clippy_dev.utils can break clippy_dev.deprecate_lint, while a change to clippy_dev.deprecate_lint can't break clippy_dev.utils.
Position
Below the diagonal: clippy_dev.deprecate_lint uses a module listed above it, which is the healthy direction.
clippy_dev.deprecate_lint uses clippy_dev.parse, so a change to clippy_dev.parse can break clippy_dev.deprecate_lint, while a change to clippy_dev.deprecate_lint can't break clippy_dev.parse.
Position
Below the diagonal: clippy_dev.deprecate_lint uses a module listed above it, which is the healthy direction.
clippy_dev.edit_lints uses clippy_dev.utils, so a change to clippy_dev.utils can break clippy_dev.edit_lints, while a change to clippy_dev.edit_lints can't break clippy_dev.utils.
Position
Below the diagonal: clippy_dev.edit_lints uses a module listed above it, which is the healthy direction.
clippy_dev.edit_lints uses clippy_dev.parse, so a change to clippy_dev.parse can break clippy_dev.edit_lints, while a change to clippy_dev.edit_lints can't break clippy_dev.parse.
Position
Below the diagonal: clippy_dev.edit_lints uses a module listed above it, which is the healthy direction.
clippy_lints.dereference uses clippy_utils.check_proc_macro, so a change to clippy_utils.check_proc_macro can break clippy_lints.dereference, while a change to clippy_lints.dereference can't break clippy_utils.check_proc_macro.
Position
Below the diagonal: clippy_lints.dereference uses a module listed above it, which is the healthy direction.
clippy_lints.dereference uses clippy_lints.matches.redundant_pattern_match, so a change to clippy_lints.matches.redundant_pattern_match can break clippy_lints.dereference, while a change to clippy_lints.dereference can't break clippy_lints.matches.redundant_pattern_match.
Position
Below the diagonal: clippy_lints.dereference uses a module listed above it, which is the healthy direction.
clippy_lints.dereference uses clippy_utils, so a change to clippy_utils can break clippy_lints.dereference, while a change to clippy_lints.dereference can't break clippy_utils.
Position
Below the diagonal: clippy_lints.dereference uses a module listed above it, which is the healthy direction.
clippy_lints.disallowed_macros uses clippy_utils.check_proc_macro, so a change to clippy_utils.check_proc_macro can break clippy_lints.disallowed_macros, while a change to clippy_lints.disallowed_macros can't break clippy_utils.check_proc_macro.
Position
Below the diagonal: clippy_lints.disallowed_macros uses a module listed above it, which is the healthy direction.
clippy_lints.disallowed_macros uses clippy_lints.matches.redundant_pattern_match, so a change to clippy_lints.matches.redundant_pattern_match can break clippy_lints.disallowed_macros, while a change to clippy_lints.disallowed_macros can't break clippy_lints.matches.redundant_pattern_match.
Position
Below the diagonal: clippy_lints.disallowed_macros uses a module listed above it, which is the healthy direction.
clippy_lints.doc uses clippy_utils.higher, so a change to clippy_utils.higher can break clippy_lints.doc, while a change to clippy_lints.doc can't break clippy_utils.higher.
Position
Below the diagonal: clippy_lints.doc uses a module listed above it, which is the healthy direction.
clippy_lints.empty_with_brackets uses clippy_utils.check_proc_macro, so a change to clippy_utils.check_proc_macro can break clippy_lints.empty_with_brackets, while a change to clippy_lints.empty_with_brackets can't break clippy_utils.check_proc_macro.
Position
Below the diagonal: clippy_lints.empty_with_brackets uses a module listed above it, which is the healthy direction.
clippy_lints.empty_with_brackets uses clippy_lints.manual_float_methods, so a change to clippy_lints.manual_float_methods can break clippy_lints.empty_with_brackets, while a change to clippy_lints.empty_with_brackets can't break clippy_lints.manual_float_methods.
Position
Below the diagonal: clippy_lints.empty_with_brackets uses a module listed above it, which is the healthy direction.
clippy_lints.empty_with_brackets uses clippy_lints.matches.redundant_pattern_match, so a change to clippy_lints.matches.redundant_pattern_match can break clippy_lints.empty_with_brackets, while a change to clippy_lints.empty_with_brackets can't break clippy_lints.matches.redundant_pattern_match.
Position
Below the diagonal: clippy_lints.empty_with_brackets uses a module listed above it, which is the healthy direction.
clippy_lints.min_ident_chars uses clippy_utils.check_proc_macro, so a change to clippy_utils.check_proc_macro can break clippy_lints.min_ident_chars, while a change to clippy_lints.min_ident_chars can't break clippy_utils.check_proc_macro.
Position
Below the diagonal: clippy_lints.min_ident_chars uses a module listed above it, which is the healthy direction.
clippy_lints.min_ident_chars uses clippy_lints.manual_float_methods, so a change to clippy_lints.manual_float_methods can break clippy_lints.min_ident_chars, while a change to clippy_lints.min_ident_chars can't break clippy_lints.manual_float_methods.
Position
Below the diagonal: clippy_lints.min_ident_chars uses a module listed above it, which is the healthy direction.
clippy_lints.min_ident_chars uses clippy_lints.matches.redundant_pattern_match, so a change to clippy_lints.matches.redundant_pattern_match can break clippy_lints.min_ident_chars, while a change to clippy_lints.min_ident_chars can't break clippy_lints.matches.redundant_pattern_match.
Position
Below the diagonal: clippy_lints.min_ident_chars uses a module listed above it, which is the healthy direction.
clippy_lints.ranges uses clippy_utils.consts, so a change to clippy_utils.consts can break clippy_lints.ranges, while a change to clippy_lints.ranges can't break clippy_utils.consts.
Position
Below the diagonal: clippy_lints.ranges uses a module listed above it, which is the healthy direction.
clippy_lints.ranges uses clippy_utils.msrvs, so a change to clippy_utils.msrvs can break clippy_lints.ranges, while a change to clippy_lints.ranges can't break clippy_utils.msrvs.
Position
Below the diagonal: clippy_lints.ranges uses a module listed above it, which is the healthy direction.
clippy_lints.ranges uses clippy_utils.higher, so a change to clippy_utils.higher can break clippy_lints.ranges, while a change to clippy_lints.ranges can't break clippy_utils.higher.
Position
Below the diagonal: clippy_lints.ranges uses a module listed above it, which is the healthy direction.
clippy_lints.use_self uses clippy_utils.msrvs, so a change to clippy_utils.msrvs can break clippy_lints.use_self, while a change to clippy_lints.use_self can't break clippy_utils.msrvs.
Position
Below the diagonal: clippy_lints.use_self uses a module listed above it, which is the healthy direction.
clippy_lints.use_self uses clippy_utils.check_proc_macro, so a change to clippy_utils.check_proc_macro can break clippy_lints.use_self, while a change to clippy_lints.use_self can't break clippy_utils.check_proc_macro.
Position
Below the diagonal: clippy_lints.use_self uses a module listed above it, which is the healthy direction.
clippy_lints.use_self uses clippy_lints.matches.redundant_pattern_match, so a change to clippy_lints.matches.redundant_pattern_match can break clippy_lints.use_self, while a change to clippy_lints.use_self can't break clippy_lints.matches.redundant_pattern_match.
Position
Below the diagonal: clippy_lints.use_self uses a module listed above it, which is the healthy direction.
46 pairs of types, where a type in clippy_config.types uses a type in clippy_config.de. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
clippy_config.types uses clippy_config.de, so a change to clippy_config.de can break clippy_config.types, while a change to clippy_config.types can't break clippy_config.de.
Position
Below the diagonal: clippy_config.types uses a module listed above it, which is the healthy direction.
clippy_lints.only_used_in_recursion uses clippy_lints.empty_with_brackets, so a change to clippy_lints.empty_with_brackets can break clippy_lints.only_used_in_recursion, while a change to clippy_lints.only_used_in_recursion can't break clippy_lints.empty_with_brackets.
Position
Below the diagonal: clippy_lints.only_used_in_recursion uses a module listed above it, which is the healthy direction.
clippy_lints.functions uses clippy_utils.msrvs, so a change to clippy_utils.msrvs can break clippy_lints.functions, while a change to clippy_lints.functions can't break clippy_utils.msrvs.
Position
Below the diagonal: clippy_lints.functions uses a module listed above it, which is the healthy direction.
clippy_lints.functions uses clippy_lints.matches.redundant_pattern_match, so a change to clippy_lints.matches.redundant_pattern_match can break clippy_lints.functions, while a change to clippy_lints.functions can't break clippy_lints.matches.redundant_pattern_match.
Position
Below the diagonal: clippy_lints.functions uses a module listed above it, which is the healthy direction.
clippy_lints.functions uses clippy_lints.only_used_in_recursion, so a change to clippy_lints.only_used_in_recursion can break clippy_lints.functions, while a change to clippy_lints.functions can't break clippy_lints.only_used_in_recursion.
Position
Below the diagonal: clippy_lints.functions uses a module listed above it, which is the healthy direction.
clippy_lints.question_mark uses clippy_utils.msrvs, so a change to clippy_utils.msrvs can break clippy_lints.question_mark, while a change to clippy_lints.question_mark can't break clippy_utils.msrvs.
Position
Below the diagonal: clippy_lints.question_mark uses a module listed above it, which is the healthy direction.
clippy_lints.question_mark uses clippy_utils.check_proc_macro, so a change to clippy_utils.check_proc_macro can break clippy_lints.question_mark, while a change to clippy_lints.question_mark can't break clippy_utils.check_proc_macro.
Position
Below the diagonal: clippy_lints.question_mark uses a module listed above it, which is the healthy direction.
clippy_lints.question_mark uses clippy_config.types, so a change to clippy_config.types can break clippy_lints.question_mark, while a change to clippy_lints.question_mark can't break clippy_config.types.
Position
Below the diagonal: clippy_lints.question_mark uses a module listed above it, which is the healthy direction.
clippy_lints.unwrap uses clippy_utils.msrvs, so a change to clippy_utils.msrvs can break clippy_lints.unwrap, while a change to clippy_lints.unwrap can't break clippy_utils.msrvs.
Position
Below the diagonal: clippy_lints.unwrap uses a module listed above it, which is the healthy direction.
clippy_lints.unwrap uses clippy_lints.only_used_in_recursion, so a change to clippy_lints.only_used_in_recursion can break clippy_lints.unwrap, while a change to clippy_lints.unwrap can't break clippy_lints.only_used_in_recursion.
Position
Below the diagonal: clippy_lints.unwrap uses a module listed above it, which is the healthy direction.
clippy_lints.non_expressive_names uses clippy_utils.check_proc_macro, so a change to clippy_utils.check_proc_macro can break clippy_lints.non_expressive_names, while a change to clippy_lints.non_expressive_names can't break clippy_utils.check_proc_macro.
Position
Below the diagonal: clippy_lints.non_expressive_names uses a module listed above it, which is the healthy direction.
clippy_lints.non_expressive_names uses clippy_lints.matches.redundant_pattern_match, so a change to clippy_lints.matches.redundant_pattern_match can break clippy_lints.non_expressive_names, while a change to clippy_lints.non_expressive_names can't break clippy_lints.matches.redundant_pattern_match.
Position
Below the diagonal: clippy_lints.non_expressive_names uses a module listed above it, which is the healthy direction.
clippy_lints.non_expressive_names uses clippy_lints.unwrap, so a change to clippy_lints.unwrap can break clippy_lints.non_expressive_names, while a change to clippy_lints.non_expressive_names can't break clippy_lints.unwrap.
Position
Below the diagonal: clippy_lints.non_expressive_names uses a module listed above it, which is the healthy direction.
clippy_lints.unnested_or_patterns uses clippy_utils.msrvs, so a change to clippy_utils.msrvs can break clippy_lints.unnested_or_patterns, while a change to clippy_lints.unnested_or_patterns can't break clippy_utils.msrvs.
Position
Below the diagonal: clippy_lints.unnested_or_patterns uses a module listed above it, which is the healthy direction.
clippy_lints.unnested_or_patterns uses clippy_utils.check_proc_macro, so a change to clippy_utils.check_proc_macro can break clippy_lints.unnested_or_patterns, while a change to clippy_lints.unnested_or_patterns can't break clippy_utils.check_proc_macro.
Position
Below the diagonal: clippy_lints.unnested_or_patterns uses a module listed above it, which is the healthy direction.
clippy_lints.unnested_or_patterns uses clippy_lints.only_used_in_recursion, so a change to clippy_lints.only_used_in_recursion can break clippy_lints.unnested_or_patterns, while a change to clippy_lints.unnested_or_patterns can't break clippy_lints.only_used_in_recursion.
Position
Below the diagonal: clippy_lints.unnested_or_patterns uses a module listed above it, which is the healthy direction.
clippy_lints.unnested_or_patterns uses clippy_lints.unwrap, so a change to clippy_lints.unwrap can break clippy_lints.unnested_or_patterns, while a change to clippy_lints.unnested_or_patterns can't break clippy_lints.unwrap.
Position
Below the diagonal: clippy_lints.unnested_or_patterns uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 74% · Adequate · gated by D1, D2 ·
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A03:2025 — Software Supply Chain Failures
7
Medium
Roadmap
Top priorities: Resolve the 1 No ADRs found finding(s) in ADR Quality — start with Cargo.toml; Adopt `tracing` with `tracing-subscriber` (JSON output) and log at meaningful points in the binaries you run; Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with Cargo.toml.
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Bring the 12 bodies over 60 down to 60 or less in Cognitive Complexity — start with Methods::check_methods (cognitive 166), clippy_lints::doc::check_doc (cognitive 127), Dereferencing::check_expr (cognitive 91).
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 0
A definite problem that already costs you something and drags the score down: a
missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here
tends to cause failures elsewhere.
Serious — 1034
Likely wrong, but not failing yet. It degrades
the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to
carry for two years either.
Minor — 29
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 14
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 40 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 40 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 1049 of 1063 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: the Rust half could not be measured — the Cargo suite in repository root did not build, so it was never run. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.rs) and this repository declares a Cargo test suite (repository root, 96 test files), but it was not re-run: no test result was produced. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
D12 Dependency Hygiene — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — 41 direct Cargo declaration(s) were read, but the outdated signal needs crates.io, and no committed Cargo.lock resolves them to versions, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
D27 Navigability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
D44 Platform End-of-Life — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a Dockerfile) is simply not read here yet.
AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Python, Rust is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Python, Rust is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X5 Nullable reference types — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax and MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, and Kotlin source only, and no C# was loaded, no TypeScript was found, and this repository's Python, Rust is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
162 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was Methods::check_methods at 191. A further 17 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being PrintVisitor::pat at 24 — they are counted neither in the figure above nor in this dimension's score. 4 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: clippy_dev/src/parse/cursor.rs (Pat::desc at 22), clippy_config/src/types.rs (SourceItemOrderingModuleItemKind::from_str at 18), clippy_utils/src/higher.rs (clippy_utils::higher::binop at 18), clippy_lints/src/multiple_unsafe_ops_per_block.rs (UnsafeExprCollector::visit_expr at 16). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 53 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 1 body over 120 down to 120 or less in Cyclomatic Complexity — start with Methods::check_methods (cyclomatic 191). — Refactoring it lifts Cyclomatic Complexity from 3.6 to about 4.4/10.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 85 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 12 bodies over 60 down to 60 or less in Cognitive Complexity — start with Methods::check_methods (cognitive 166), clippy_lints::doc::check_doc (cognitive 127), Dereferencing::check_expr (cognitive 91). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 12 together lifts Cognitive Complexity from 2.0 to about 3.9/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.7 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 21 FileTooLong finding(s) in God Classes — start with mod.rs (4), lib.rs (2), hir_utils.rs. — One of this dimension's main actionable groups (21 warning-level).
Resolve the 19 FunctionTooLong finding(s) in God Classes — start with mod.rs (2), lib.rs, eta_reduction.rs. — One of this dimension's main actionable groups (19 warning-level).
Resolve the 11 MethodTooLong finding(s) in God Classes — start with mod.rs (2), dereference.rs (2), hir_utils.rs (2). — One of this dimension's main actionable groups (11 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
129 duplicated block group(s) detected. 3.3 % of the production lines (5,103 of 155,493) are in a reported copy. A further 94 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.
Edited copy of a member (10 corresponding lines) · ×10clippy_lints/src/loops/mut_range_bound.rs:85
+ 73 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 16 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with fmt.rs, manual_let_else.rs, iter_filter.rs. — One of this dimension's main actionable groups (16 warning-level).
Resolve the 13 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with edit_lints.rs, booleans.rs, empty_with_brackets.rs. — One of this dimension's main actionable groups (13 warning-level).
Resolve the 12 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with consts.rs (2), await_holding_invalid.rs, extra_unused_type_parameters.rs. — One of this dimension's main actionable groups (12 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling7.6 / 10Strong✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
10 production modules (Cargo), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 3 module(s) off the main sequence, with abstractness counted on 9 of the 10 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
Off the main sequence: declare_clippy_lint · ×3
What to do
Resolve the 3 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 1 Low cohesion finding(s) in Cohesion (LCOM4) — start with trait_bounds.rs. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 191 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository commits no Cargo.lock, so its graph was resolved here: its manifests' `[dependencies]` and `[build-dependencies]` closed over the crates.io index, each crate at the newest release its requirement admits (what a fresh `cargo generate-lockfile` picks, not a graph the repository has pinned). Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. This repository publishes itself under MIT OR Apache-2.0, which is its own choice and is not judged here.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Top hotspots: clippy_lints/src/methods/mod.rs (24×191=4584); clippy_utils/src/hir_utils.rs (13×59=767); clippy_utils/src/ast_utils/mod.rs (9×63=567) Repeated repair below the complexity floor: clippy_lints/src/unconditional_recursion.rs (4 of 7 changes were fixes); clippy_lints/src/non_canonical_impls.rs (4 of 6 changes were fixes); clippy_lints/src/macro_metavars_in_unsafe.rs (4 of 6 changes were fixes)
Resolve the 30 Hotspot finding(s) in Churn × Complexity Hotspots — start with mod.rs (4), hir_utils.rs, lib.rs. — One of this dimension's main actionable groups (30 warning-level).
Resolve the 26 Repeated repair finding(s) in Churn × Complexity Hotspots — start with unconditional_recursion.rs, non_canonical_impls.rs, macro_metavars_in_unsafe.rs. — One of this dimension's main actionable groups (26 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.9 / 10Exemplary✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
5 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is clippy_dev/src/parse.rs. Counted over 599 of the 820 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
245 deducted task-comment markers across 155493 LoC (0.2/KLoC) → score 9.7. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
Resolve the 122 FixmeComment finding(s) in Explicit Debt — start with consts.rs (8), mod.rs (4), non_copy_const.rs (4). — One of this dimension's main actionable groups (122 warning-level).
Resolve the 117 TodoComment finding(s) in Explicit Debt — start with format_push_string_unfixable.rs (8), panicking_macros.rs (5), lib.rs (5). — One of this dimension's main actionable groups (117 warning-level).
Resolve the 4 HackComment finding(s) in Explicit Debt — start with proc_macro_attr.rs, qualify_min_const_fn.rs, eta_reduction.rs. — One of this dimension's main actionable groups (4 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
1 of 1 documentation facets pass in full. 11 document(s) read across 1 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with Cargo.toml. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.
1 of 10 build units (Cargo) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
semgrep found no security issues. semgrep hit a parse error in 5 file(s) — `clippy_config/src/types.rs` (line 127), `clippy_dev/src/parse/cursor.rs` (line 458, line 475), `clippy_dev/src/utils.rs` (line 85, line 95, line 106, …), `clippy_utils/src/sym.rs` (line 27), `util/gh-pages/index_template.html` (line 247) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Resolve the 2 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
4 of 599 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is clippy_utils/src/numeric_literal.rs. Counted over 599 of the 820 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 1 Change coupling finding(s) in Change Coupling — start with collapsible_if.rs. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Do you agree with this assessment?
P2 · Observability2.0 / 10Weak✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
No logging call was found in the 835 Python, JavaScript/TypeScript, Rust production file(s) this check read across 13 module(s). Each was searched for its ecosystem's logging libraries (Python: logging, structlog, loguru; JavaScript/TypeScript: pino, winston, bunyan, log4js, loglevel, consola, the NestJS Logger; Rust: the log and tracing crates (info!/warn!/error!, #[instrument]), slog, env_logger) and for a call on a receiver named `log`/`logger` (or ending in `Logger`/`_logger`) with a level verb. It cannot see logging through a repo-local wrapper named otherwise, or in source it did not read — this is 'no logging found by this walk', not a verdict that nothing here logs. If it is right, production issues will be hard to diagnose.
What to do
Adopt `tracing` with `tracing-subscriber` (JSON output) and log at meaningful points in the binaries you run.
Add a health-check endpoint (a /health route on your axum/actix router) so orchestrators and load balancers can probe liveness/readiness.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
`.github/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — .github/package.json:2
What to do
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Unscored — 2 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 12 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 74 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AX1 Captive dependencies — Not applicable: this repository's Python imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one.
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AXB1 Runtime evidence locked — no reproducible boot — This repository has nothing the runtime tiers could boot or serve — no markup, no UI framework or web-server dependency, no UI component source, no native UI project and no API definition — nothing here is a surface to boot — so runtime a11y/egress/header evidence has no subject here. Not applicable: this is neither a gap in the scan nor a finding about your code.
C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no data at rest for these controls to protect.
C2 Access Controls — No access-control surface detected in the analyzed source — this repository starts no server another machine can reach (no actix-web HttpServer, axum::serve, Rocket launch, warp::serve, poem or salvo Server, tonic Server::builder, hyper or tiny_http server outside examples and tests, none bound beyond loopback). Access control is therefore N/A here — a crate is authorized by the application that serves it, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound.
C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over.
D10 Test Quality — ~111345 lines of test source are present (.rs) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D11 Test Reliability — Test reliability not included — the .rs suite was found but not re-run
D12 Dependency Hygiene — Not scored — 41 direct Cargo declaration(s) were read, but the outdated signal needs crates.io, and no committed Cargo.lock resolves them to versions, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D21 Naming Consistency — D21 withholds its sibling member alignment rows: 1 candidate(s) found and not reported.
D22 Internal API Consistency — API consistency is measured on C# only; the exposed Rust surface was not measured.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only; comments in this repository's .py, .rs source were not judged.
D25 ADR Conformance — no ADRs to check
D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rs), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not measured — Rust suite
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (34 value object(s))
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript, Python, Rust source, so there is no service whose uptime a failing dependency could take down
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `#[bench]`, criterion's `bench_function`/`bench_with_input`, `#[divan::bench]` or `#[library_benchmark]` in any `.rs` file, or criterion, divan, iai or a `[[bench]]` target in a Cargo.toml, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
PF3 Async & latency hygiene — Not applicable: this repository declares no async functions, so there is no asynchronous code for a blocking call to stall.
S1 Web-Security Posture — No web surface: 828 Rust file(s) were read for weak hashes and ciphers, key material fixed in the source, disabled TLS certificate validation and obsolete TLS versions, and none was found. This repository serves no HTTP of its own — no HTTP-server crate (actix-web, axum, Rocket, warp, poem, tide, salvo, tonic, a hyper server, …) among its Cargo manifests' run-time dependencies, and no server started in its production source — so HTTPS enforcement, HSTS, cookie flags and input validation are N/A here, as they are for a C# library or worker. If this codebase starts serving HTTP, the dimension reactivates automatically.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X1 Async correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X12 Unreachable branch — X12 reached only 0% of this repository's production lines — rust (155,452 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X16 Unfloored truncation loop — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X2 Cancellation propagation — no C# was loaded; this repository's Python and Rust were read, and no request in it can be cancelled by a caller — a Python request takes no token: asyncio cancels the task and trio or anyio the scope that made it, from outside the call, and requests, httpx, aiohttp and gRPC take a timeout, not a cancellation; a Rust request takes no token: a future is cancelled by dropping it, from outside the call (select!, a timeout, an aborted task), and reqwest, hyper and tonic take none
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — X24 reached only 0% of this repository's production lines — rust (155,452 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X27 Collection changed while being enumerated — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X29 Per-element action decided by a fixed element — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X3 Exception handling — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Rust was read, and it logs through none: the `log` crate's macros take one finished message (as log4net does in C#; its `kv` values are an opt-in its backends mostly drop), `println!`/`eprintln!` are not loggers, or it makes no log call outside its tests and examples at all. Calls through `tracing` (`tracing::info!`, or `info!` imported from it) would be judged.
X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
clippy_lints::doc::check_doc (cognitive 127) clippy_lints/src/doc/mod.rs:1133— clippy_lints::doc::check_doc has cognitive complexity 127 (threshold 15). Drivers by points: if/else 33 (85 pts), boolean chains 22, match/switch 4 (14 pts), loops 2 (6 pts) (nesting depth added 66). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
clippy_lints::loops::needless_range_loop::check (cognitive 73) clippy_lints/src/loops/needless_range_loop.rs:25— clippy_lints::loops::needless_range_loop::check has cognitive complexity 73 (threshold 15). Drivers by points: if/else 26 (61 pts), boolean chains 7, match/switch 1 (5 pts) (nesting depth added 39). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
clippy_lints::methods::manual_inspect::check (cognitive 68) clippy_lints/src/methods/manual_inspect.rs:19— clippy_lints::methods::manual_inspect::check has cognitive complexity 68 (threshold 15). Drivers by points: if/else 15 (34 pts), match/switch 5 (19 pts), boolean chains 9, loops 2 (6 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clippy_lints::eta_reduction::check_closure (cognitive 65) clippy_lints/src/eta_reduction.rs:90— clippy_lints::eta_reduction::check_closure has cognitive complexity 65 (threshold 15). Drivers by points: if/else 19 (38 pts), match/switch 6 (19 pts), boolean chains 8 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clippy_lints::loops::explicit_iter_loop::is_ref_iterable (cognitive 58) clippy_lints/src/loops/explicit_iter_loop.rs:107— clippy_lints::loops::explicit_iter_loop::is_ref_iterable has cognitive complexity 58 (threshold 15). Drivers by points: if/else 21 (45 pts), boolean chains 11, match/switch 1 (2 pts) (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
clippy_lints::write::literal::check (cognitive 54) clippy_lints/src/write/literal.rs:16— clippy_lints::write::literal::check has cognitive complexity 54 (threshold 15). Drivers by points: if/else 12 (24 pts), match/switch 6 (23 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clippy_lints::lifetimes::check_fn_inner (cognitive 52) clippy_lints/src/lifetimes.rs:208— clippy_lints::lifetimes::check_fn_inner has cognitive complexity 52 (threshold 15). Drivers by points: if/else 10 (29 pts), loops 4 (12 pts), match/switch 1 (6 pts), boolean chains 5 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clippy_lints::operators::op_ref::check (cognitive 51) clippy_lints/src/operators/op_ref.rs:15— clippy_lints::operators::op_ref::check has cognitive complexity 51 (threshold 15). Drivers by points: if/else 11 (29 pts), boolean chains 19, match/switch 2 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clippy_lints::methods::map_clone::check (cognitive 48) clippy_lints/src/methods/map_clone.rs:45— clippy_lints::methods::map_clone::check has cognitive complexity 48 (threshold 15). Drivers by points: if/else 8 (34 pts), match/switch 3 (9 pts), boolean chains 5 (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
clippy_lints::methods::unnecessary_to_owned::can_change_type (cognitive 48) clippy_lints/src/methods/unnecessary_to_owned.rs:563— clippy_lints::methods::unnecessary_to_owned::can_change_type has cognitive complexity 48 (threshold 15). Drivers by points: if/else 11 (42 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
clippy_lints::methods::unwrap_expect_used::check (cognitive 48) clippy_lints/src/methods/unwrap_expect_used.rs:40— clippy_lints::methods::unwrap_expect_used::check has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (37 pts), boolean chains 6, loops 2 (4 pts), match/switch 1 (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
clippy_lints::operators::assign_op_pattern::check (cognitive 47) clippy_lints/src/operators/assign_op_pattern.rs:19— clippy_lints::operators::assign_op_pattern::check has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (37 pts), boolean chains 6, match/switch 1 (4 pts) (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
clippy_lints::ranges::check_possible_range_contains (cognitive 45) clippy_lints/src/ranges.rs:208— clippy_lints::ranges::check_possible_range_contains has cognitive complexity 45 (threshold 15). Drivers by points: if/else 20 (40 pts), boolean chains 4, match/switch 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clippy_lints::casts::unnecessary_cast::check (cognitive 44) clippy_lints/src/casts/unnecessary_cast.rs:21— clippy_lints::casts::unnecessary_cast::check has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 15, match/switch 3 (6 pts) (nesting depth added 11). Of this number, 43 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clippy_lints::attrs::useless_attribute::check (cognitive 43) clippy_lints/src/attrs/useless_attribute.rs:10— clippy_lints::attrs::useless_attribute::check has cognitive complexity 43 (threshold 15). Drivers by points: if/else 7 (30 pts), boolean chains 5, loops 2 (4 pts), match/switch 1 (4 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clippy_lints::methods::iter_overeager_cloned::check (cognitive 43) clippy_lints/src/methods/iter_overeager_cloned.rs:37— clippy_lints::methods::iter_overeager_cloned::check has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (34 pts), match/switch 3 (7 pts), boolean chains 2 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clippy_lints::methods::needless_collect::check (cognitive 43) clippy_lints/src/methods/needless_collect.rs:28— clippy_lints::methods::needless_collect::check has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 6, match/switch 2 (4 pts), loops 1 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clippy_lints::implicit_saturating_sub::check_with_condition (cognitive 40) clippy_lints/src/implicit_saturating_sub.rs:304— clippy_lints::implicit_saturating_sub::check_with_condition has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (31 pts), boolean chains 7, match/switch 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clippy_lints::methods::search_is_some::check (cognitive 39) clippy_lints/src/methods/search_is_some.rs:19— clippy_lints::methods::search_is_some::check has cognitive complexity 39 (threshold 15). Drivers by points: if/else 20 (34 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clippy_lints::transmute::transmute_undefined_repr::check (cognitive 39) clippy_lints/src/transmute/transmute_undefined_repr.rs:9— clippy_lints::transmute::transmute_undefined_repr::check has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (32 pts), boolean chains 4, match/switch 1 (2 pts), loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clippy_lints::matches::manual_utils::check_with (cognitive 38) clippy_lints/src/matches/manual_utils.rs:20— clippy_lints::matches::manual_utils::check_with has cognitive complexity 38 (threshold 15). Drivers by points: if/else 18 (24 pts), boolean chains 7, match/switch 4 (7 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clippy_lints::methods::unnecessary_to_owned::check (cognitive 38) clippy_lints/src/methods/unnecessary_to_owned.rs:29— clippy_lints::methods::unnecessary_to_owned::check has cognitive complexity 38 (threshold 15). Drivers by points: if/else 18 (32 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clippy_lints::loops::while_let_on_iterator::needs_mutable_borrow (cognitive 37) clippy_lints/src/loops/while_let_on_iterator.rs:238— clippy_lints::loops::while_let_on_iterator::needs_mutable_borrow has cognitive complexity 37 (threshold 15). Drivers by points: if/else 26 (36 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clippy_lints::unit_types::let_unit_value::check (cognitive 37) clippy_lints/src/unit_types/let_unit_value.rs:19— clippy_lints::unit_types::let_unit_value::check has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 7, match/switch 1 (4 pts) (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
clippy_lints::matches::match_wild_err_arm::check (cognitive 36) clippy_lints/src/matches/match_wild_err_arm.rs:12— clippy_lints::matches::match_wild_err_arm::check has cognitive complexity 36 (threshold 15). Drivers by points: if/else 7 (26 pts), loops 2 (8 pts), boolean chains 2 (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
FixmeComment tests/compile-test.rs:236— // FIXME(#160895): While the new solver is enabled by default on nightly,
FixmeComment tests/compile-test.rs:349— // FIXME(#160895): While the new solver is enabled by default on nightly,
FixmeComment tests/compile-test.rs:370— // FIXME: for some reason the modules are linted in a different order for this test — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/ui-toml/toml_disallowed_methods/conf_disallowed_methods.rs:47— // FIXME(f16_f128): add a clamp test once the function is available — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/ui-toml/absolute_paths/absolute_paths.rs:50— // FIXME: macro calls should be checked. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/ui-toml/absolute_paths/absolute_paths.rs:56— // FIXME: derive macro paths should be checked. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/ui-cargo/module_style/fail_mod_remap/src/main.rs:1— // FIXME: find a way to add rustflags to ui-cargo tests — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/ui-cargo/cargo_rust_version/fail_file_attr/src/main.rs:1— // FIXME: this should produce a warning, because the attribute says 1.58 and the cargo.toml file — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/ui/await_holding_lock.rs:181— // FIXME: FP, because the `MutexGuard` is dropped before crossing the await point. This is — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/ui/cast.rs:18— // FIXME(f16_f128): add tests once const casting is available for these types — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/ui/cast_lossless_float.rs:3— // FIXME(f16_f128): add tests for these types once const casting is available — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/ui/cast_nan_to_int.rs:1— // FIXME(f16_f128): add tests when constants are available — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/ui/cast_size.rs:21— // FIXME(f16_f128): enable f16 and f128 conversions once const eval supports them — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/ui/double_ended_iterator_last.rs:136— // FIXME: suggestions on `move` closures will change the behavior of the iterator (rust-lang/rust-clippy#17646).
FixmeComment tests/ui/double_ended_iterator_last.rs:137— // FIXME: this problem is documented in "Known issues" section (rust-lang/rust-clippy#17829).
FixmeComment tests/ui/float_cmp.rs:1— // FIXME(f16_f128): const casting is not yet supported for these types. Add when available. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/ui/floating_point_exp.rs:1— // FIXME(f16_f128): add tests when exp is available — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/ui/floating_point_log.rs:4— // FIXME(f16_f128): add tests for these types once math functions are available — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/ui/floating_point_powf.rs:4— // FIXME(f16_f128): add tests for these types when `powf` is available — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/ui/let_if_seq.rs:41— // FIXME: we could extend the lint to include such cases: — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/ui/manual_abs_diff.rs:63— // FIXME: bunch of patterns that should be linted — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/ui/manual_filter_map.rs:2— // FIXME suggestion may have redundant closure — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/ui/manual_find_map.rs:2— // FIXME suggestion may have redundant closure — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/ui/manual_float_methods.rs:5— // FIXME(f16_f128): add tests for these types once constants are available — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/ui/manual_range_patterns.rs:86— // FIXME: Reduce to 'A'..='Z' | '[' | '\\' | ']' | '^' | '_' | '`' | 'a'..='z' — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/ui/assert_is_empty.rs:198— // TODO: turn into an MSRV aware lint after const traits are stable and `PartialEq` is const stable — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/ui/collection_is_never_read.rs:9— // TODO: Expand `collection_is_never_read` beyond collections? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/ui/collection_is_never_read.rs:39— // TODO: Warn here, but this requires more extensive data flow analysis. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/ui/collection_is_never_read.rs:46— // TODO: Warn here, but this requires more extensive data flow analysis. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/ui/equatable_if_let_const_cmp.rs:18— // TODO: detect this and suggest `=` — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/ui/excessive_precision.rs:38— // // TODO add inferred type tests for f32 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/ui/format_push_string.rs:22— // TODO: recognize the already imported `fmt::Write`, and don't add a note suggesting to import it — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/ui/format_push_string_no_std.rs:12— // TODO: recognize the already imported `fmt::Write`, and don't suggest importing it again — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/ui/format_push_string_unfixable.rs:38— // TODO: suggest importing `std::fmt::Write`; — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/ui/format_push_string_unfixable.rs:91— // TODO: suggest importing `std::fmt::Write`; — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/ui/format_push_string_unfixable.rs:46— // TODO: suggest importing the first time, but not again — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/ui/format_push_string_unfixable.rs:59— // TODO: suggest importing the first time, but not again — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/ui/format_push_string_unfixable.rs:99— // TODO: suggest importing the first time, but not again — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/ui/format_push_string_unfixable.rs:112— // TODO: suggest importing the first time, but not again — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/ui/format_push_string_unfixable.rs:74— // TODO: suggest importing, but only for `bar` — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/ui/format_push_string_unfixable.rs:127— // TODO: suggest importing, but only for `bar` — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/ui/let_and_return.rs:276— // TODO: stuff — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/ui/let_and_return.rs:286— // TODO: Fill `stuff` — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/ui/manual_ignore_case_cmp.rs:47— // TODO:: these are rare, and might not be worth supporting — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/ui/manual_let_else_match.rs:60— // TODO also support unused bindings aka _v — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/ui/manual_ok_or.rs:52— // TODO patterns not covered yet — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/ui/manual_rotate.rs:1— // TODO(@Jarcho): Check why this doesn't trigger after rustfix — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/ui/missing_spin_loop.rs:31— // TODO: also match on loop+match or while let — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/ui/mut_from_ref.rs:95— //TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/ui/nonnull_unchecked_on_box_ptr.rs:154— // TODO? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
clippy_lints::doc::check_doc (cyclomatic 72) clippy_lints/src/doc/mod.rs:1133— clippy_lints::doc::check_doc has cyclomatic complexity 72 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
clippy_lints::operators::op_ref::check (cyclomatic 47) clippy_lints/src/operators/op_ref.rs:15— clippy_lints::operators::op_ref::check has cyclomatic complexity 47 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
clippy_lints::methods::manual_inspect::check (cyclomatic 40) clippy_lints/src/methods/manual_inspect.rs:19— clippy_lints::methods::manual_inspect::check has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
clippy_lints::casts::unnecessary_cast::check (cyclomatic 36) clippy_lints/src/casts/unnecessary_cast.rs:21— clippy_lints::casts::unnecessary_cast::check has cyclomatic complexity 36 (threshold 15). Of this number, 35 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
clippy_lints::eta_reduction::check_closure (cyclomatic 35) clippy_lints/src/eta_reduction.rs:90— clippy_lints::eta_reduction::check_closure has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
clippy_lints::loops::never_loop::never_loop_expr (cyclomatic 33) clippy_lints/src/loops/never_loop.rs:293— clippy_lints::loops::never_loop::never_loop_expr has cyclomatic complexity 33 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
clippy_lints::loops::explicit_iter_loop::is_ref_iterable (cyclomatic 31) clippy_lints/src/loops/explicit_iter_loop.rs:107— clippy_lints::loops::explicit_iter_loop::is_ref_iterable has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
clippy_lints::matches::manual_utils::check_with (cyclomatic 30) clippy_lints/src/matches/manual_utils.rs:20— clippy_lints::matches::manual_utils::check_with has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
clippy_lints::transmute::transmute_undefined_repr::check (cyclomatic 29) clippy_lints/src/transmute/transmute_undefined_repr.rs:9— clippy_lints::transmute::transmute_undefined_repr::check has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
clippy_lints::write::literal::check (cyclomatic 29) clippy_lints/src/write/literal.rs:16— clippy_lints::write::literal::check has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
clippy_lints::loops::needless_range_loop::check (cyclomatic 28) clippy_lints/src/loops/needless_range_loop.rs:25— clippy_lints::loops::needless_range_loop::check has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
clippy_lints::matches::match_wild_enum::check (cyclomatic 28) clippy_lints/src/matches/match_wild_enum.rs:15— clippy_lints::matches::match_wild_enum::check has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
clippy_lints::methods::unnecessary_literal_unwrap::check (cyclomatic 27) clippy_lints/src/methods/unnecessary_literal_unwrap.rs:27— clippy_lints::methods::unnecessary_literal_unwrap::check has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
clippy_lints::casts::unnecessary_cast::walk_receiver_path_step (cyclomatic 26) clippy_lints/src/casts/unnecessary_cast.rs:537— clippy_lints::casts::unnecessary_cast::walk_receiver_path_step has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
clippy_lints::operators::invalid_upcast_comparisons::upcast_comparison_bounds_err (cyclomatic 26) clippy_lints/src/operators/invalid_upcast_comparisons.rs:67— clippy_lints::operators::invalid_upcast_comparisons::upcast_comparison_bounds_err has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
clippy_lints::methods::unnecessary_sort_by::mirrored_exprs (cyclomatic 25) clippy_lints/src/methods/unnecessary_sort_by.rs:32— clippy_lints::methods::unnecessary_sort_by::mirrored_exprs has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
clippy_lints::methods::unwrap_expect_used::check (cyclomatic 25) clippy_lints/src/methods/unwrap_expect_used.rs:40— clippy_lints::methods::unwrap_expect_used::check has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
clippy_lints::lifetimes::could_use_elision (cyclomatic 24) clippy_lints/src/lifetimes.rs:293— clippy_lints::lifetimes::could_use_elision has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
clippy_lints::option_if_let_else::try_get_option_occurrence (cyclomatic 24) clippy_lints/src/option_if_let_else.rs:120— clippy_lints::option_if_let_else::try_get_option_occurrence has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
clippy_lints::matches::collapsible_match::check_arm (cyclomatic 23) clippy_lints/src/matches/collapsible_match.rs:75— clippy_lints::matches::collapsible_match::check_arm has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
clippy_lints::methods::needless_collect::check (cyclomatic 23) clippy_lints/src/methods/needless_collect.rs:28— clippy_lints::methods::needless_collect::check has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
clippy_lints::operators::bit_mask::check (cyclomatic 23) clippy_lints/src/operators/bit_mask.rs:13— clippy_lints::operators::bit_mask::check has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
clippy_lints::time_subtraction::const_eval_duration (cyclomatic 23) clippy_lints/src/time_subtraction.rs:220— clippy_lints::time_subtraction::const_eval_duration has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
clippy_lints::functions::misnamed_getters::check_fn (cyclomatic 22) clippy_lints/src/functions/misnamed_getters.rs:14— clippy_lints::functions::misnamed_getters::check_fn has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
clippy_lints::implicit_saturating_sub::check_with_condition (cyclomatic 22) clippy_lints/src/implicit_saturating_sub.rs:304— clippy_lints::implicit_saturating_sub::check_with_condition has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Hotspot: clippy_lints/src/methods/mod.rs clippy_lints/src/methods/mod.rs:5437— clippy_lints/src/methods/mod.rs changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 191 in Methods::check_methods at line 5437. 4 of those changes were fix/bug commits, and the other 20 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/methods/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: clippy_utils/src/hir_utils.rs clippy_utils/src/hir_utils.rs:1181— clippy_utils/src/hir_utils.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 59 in SpanlessHash::hash_expr at line 1181. 3 of those changes were fix/bug commits, and the other 10 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_utils/src/hir_utils.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: clippy_utils/src/ast_utils/mod.rs clippy_utils/src/ast_utils/mod.rs:145— clippy_utils/src/ast_utils/mod.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 63 in clippy_utils::ast_utils::eq_expr at line 145. 1 of those changes was a fix/bug commit, and the other 8 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_utils/src/ast_utils/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: clippy_utils/src/lib.rs clippy_utils/src/lib.rs:2698— clippy_utils/src/lib.rs changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in clippy_utils::expr_use_sites at line 2698. 4 of those changes were fix/bug commits, and the other 19 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_utils/src/lib.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: clippy_lints/src/useless_conversion.rs clippy_lints/src/useless_conversion.rs:160— clippy_lints/src/useless_conversion.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in UselessConversion::check_expr at line 160. 3 of those changes were fix/bug commits, and the other 6 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/useless_conversion.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: clippy_lints/src/lifetimes.rs clippy_lints/src/lifetimes.rs:293— clippy_lints/src/lifetimes.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in clippy_lints::lifetimes::could_use_elision at line 293. 5 of those changes were fix/bug commits, and the other 6 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/lifetimes.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: clippy_lints/src/eta_reduction.rs clippy_lints/src/eta_reduction.rs:90— clippy_lints/src/eta_reduction.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in clippy_lints::eta_reduction::check_closure at line 90. 4 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/eta_reduction.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: clippy_lints/src/attrs/mod.rs clippy_lints/src/attrs/mod.rs:663— clippy_lints/src/attrs/mod.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in PostExpansionEarlyAttributes::check_attribute at line 663. 2 of those changes were fix/bug commits, and the other 10 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/attrs/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: clippy_lints/src/returns/needless_return.rs clippy_lints/src/returns/needless_return.rs:119— clippy_lints/src/returns/needless_return.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in clippy_lints::returns::needless_return::check_final_expr at line 119. 3 of those changes were fix/bug commits, and the other 8 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/returns/needless_return.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: clippy_utils/src/eager_or_lazy.rs clippy_utils/src/eager_or_lazy.rs:261— clippy_utils/src/eager_or_lazy.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in ExprEagernessVisitor::visit_expr at line 261. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_utils/src/eager_or_lazy.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: clippy_lints/src/arbitrary_source_item_ordering.rs clippy_lints/src/arbitrary_source_item_ordering.rs:489— clippy_lints/src/arbitrary_source_item_ordering.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in ArbitrarySourceItemOrdering::check_mod at line 489. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/arbitrary_source_item_ordering.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: clippy_lints/src/matches/mod.rs clippy_lints/src/matches/mod.rs:1055— clippy_lints/src/matches/mod.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in Matches::check_expr at line 1055. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/matches/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: clippy_lints/src/non_copy_const.rs clippy_lints/src/non_copy_const.rs:568— clippy_lints/src/non_copy_const.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in NonCopyConst::is_non_freeze_init_borrowed at line 568. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/non_copy_const.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: clippy_lints/src/needless_borrows_for_generic_args.rs clippy_lints/src/needless_borrows_for_generic_args.rs:167— clippy_lints/src/needless_borrows_for_generic_args.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in clippy_lints::needless_borrows_for_generic_args::needless_borrow_count at line 167. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/needless_borrows_for_generic_args.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: clippy_lints/src/methods/manual_inspect.rs clippy_lints/src/methods/manual_inspect.rs:19— clippy_lints/src/methods/manual_inspect.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in clippy_lints::methods::manual_inspect::check at line 19. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/methods/manual_inspect.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: clippy_dev/src/edit_lints.rs clippy_dev/src/edit_lints.rs:375— clippy_dev/src/edit_lints.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in clippy_dev::edit_lints::rename_update_fn at line 375. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_dev/src/edit_lints.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: clippy_lints/src/matches/collapsible_match.rs clippy_lints/src/matches/collapsible_match.rs:75— clippy_lints/src/matches/collapsible_match.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in clippy_lints::matches::collapsible_match::check_arm at line 75. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/matches/collapsible_match.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: clippy_dev/src/main.rs clippy_dev/src/main.rs:11— clippy_dev/src/main.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in clippy_dev::main at line 11. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_dev/src/main.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: clippy_lints/src/large_unopt_stack_frames.rs clippy_lints/src/large_unopt_stack_frames.rs:164— clippy_lints/src/large_unopt_stack_frames.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in LargeUnoptStackFrames::check_fn at line 164. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/large_unopt_stack_frames.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: clippy_lints/src/ranges.rs clippy_lints/src/ranges.rs:368— clippy_lints/src/ranges.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in clippy_lints::ranges::can_switch_ranges at line 368. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/ranges.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: clippy_lints/src/matches/single_match.rs clippy_lints/src/matches/single_match.rs:83— clippy_lints/src/matches/single_match.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in clippy_lints::matches::single_match::report_single_pattern at line 83. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/matches/single_match.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: clippy_lints/src/methods/unnecessary_map_or.rs clippy_lints/src/methods/unnecessary_map_or.rs:124— clippy_lints/src/methods/unnecessary_map_or.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in clippy_lints::methods::unnecessary_map_or::check at line 124. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/methods/unnecessary_map_or.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: clippy_lints/src/ptr/ptr_arg.rs clippy_lints/src/ptr/ptr_arg.rs:199— clippy_lints/src/ptr/ptr_arg.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in clippy_lints::ptr::ptr_arg::check_fn_args at line 199. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/ptr/ptr_arg.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: clippy_lints/src/methods/map_clone.rs clippy_lints/src/methods/map_clone.rs:45— clippy_lints/src/methods/map_clone.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in clippy_lints::methods::map_clone::check at line 45. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/methods/map_clone.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: clippy_lints/src/format.rs clippy_lints/src/format.rs:55— clippy_lints/src/format.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in UselessFormat::check_expr at line 55. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/format.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: clippy_lints/src/unconditional_recursion.rs clippy_lints/src/unconditional_recursion.rs:177— clippy_lints/src/unconditional_recursion.rs changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is clippy_lints::unconditional_recursion::check_partial_eq at line 177), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Revert "Remove indirection for `Expr` in `Body`"”; “Fix clippy”; “fix `default_impl_for_type` not caching in the no `Default` case”; “Fix clippy/rustdoc”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/unconditional_recursion.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: clippy_lints/src/non_canonical_impls.rs clippy_lints/src/non_canonical_impls.rs:150— clippy_lints/src/non_canonical_impls.rs changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is NonCanonicalImpls::check_item at line 150), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Revert "Remove indirection for `Expr` in `Body`"”; “Fix clippy”; “fix deprecated rustc_hir::attrs imports”; “Fix clippy/rustdoc”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/non_canonical_impls.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: clippy_lints/src/macro_metavars_in_unsafe.rs clippy_lints/src/macro_metavars_in_unsafe.rs:165— clippy_lints/src/macro_metavars_in_unsafe.rs changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is BodyVisitor::visit_expr at line 165), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Revert "Remove indirection for `Expr` in `Body`"”; “Fix clippy”; “fix deprecated rustc_hir::attrs imports”; “Fix clippy/rustdoc”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/macro_metavars_in_unsafe.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: clippy_lints/src/multiple_unsafe_ops_per_block.rs clippy_lints/src/multiple_unsafe_ops_per_block.rs:129— clippy_lints/src/multiple_unsafe_ops_per_block.rs changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is UnsafeExprCollector::visit_raw_addr_of at line 129), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Revert "Remove indirection for `Expr` in `Body`"”; “Fix clippy”; “fix: false positive in multiple_unsafe_ops_per_block with write to union field”; “Fix clippy/rustdoc”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/multiple_unsafe_ops_per_block.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: clippy_lints/src/collection_is_never_read.rs clippy_lints/src/collection_is_never_read.rs:77— clippy_lints/src/collection_is_never_read.rs changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is clippy_lints::collection_is_never_read::has_no_read_access at line 77), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Revert "Remove indirection for `Expr` in `Body`"”; “Fix clippy”; “fix deprecated rustc_hir::attrs imports”; “Fix clippy/rustdoc”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/collection_is_never_read.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: clippy_lints/src/manual_pop_if.rs clippy_lints/src/manual_pop_if.rs:241— clippy_lints/src/manual_pop_if.rs changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is clippy_lints::manual_pop_if::check_if_let_pattern at line 241), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Revert "Remove indirection for `Expr` in `Body`"”; “Fix clippy”; “fix deprecated rustc_hir::attrs imports”; “Fix clippy/rustdoc”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/manual_pop_if.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: clippy_lints/src/significant_drop_tightening.rs clippy_lints/src/significant_drop_tightening.rs:265— clippy_lints/src/significant_drop_tightening.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is StmtsChecker::visit_expr at line 265), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Revert "Remove indirection for `Expr` in `Body`"”; “Fix clippy”; “Fix clippy/rustdoc”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/significant_drop_tightening.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: clippy_lints/src/redundant_closure_call.rs clippy_lints/src/redundant_closure_call.rs:82— clippy_lints/src/redundant_closure_call.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is clippy_lints::redundant_closure_call::find_innermost_closure at line 82), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Revert "Remove indirection for `Expr` in `Body`"”; “Fix clippy”; “Fix clippy/rustdoc”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/redundant_closure_call.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: clippy_lints/src/suspicious_trait_impl.rs clippy_lints/src/suspicious_trait_impl.rs:74— clippy_lints/src/suspicious_trait_impl.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is clippy_lints::suspicious_trait_impl::check_expr_inner at line 74), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Revert "Remove indirection for `Expr` in `Body`"”; “Fix clippy”; “Fix clippy/rustdoc”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/suspicious_trait_impl.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: clippy_lints/src/missing_inline.rs clippy_lints/src/missing_inline.rs:67— clippy_lints/src/missing_inline.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is clippy_lints::missing_inline::check at line 67), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix deprecated rustc_hir::attrs imports”; “Fix tools”; “Fix clippy/rustdoc”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/missing_inline.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: clippy_lints/src/attrs/inline_always.rs clippy_lints/src/attrs/inline_always.rs:10— clippy_lints/src/attrs/inline_always.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is clippy_lints::attrs::inline_always::check at line 10), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Revert "Remove indirection for `Expr` in `Body`"”; “Fix clippy”; “fix deprecated rustc_hir::attrs imports”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/attrs/inline_always.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: clippy_lints/src/matches/manual_filter.rs clippy_lints/src/matches/manual_filter.rs:21— clippy_lints/src/matches/manual_filter.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is clippy_lints::matches::manual_filter::get_cond_expr at line 21), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Revert "Remove indirection for `Expr` in `Body`"”; “Fix clippy”; “ fix: [`manual_filter`] don't lint when the condition needs `&mut` access”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/matches/manual_filter.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: clippy_lints/src/methods/bind_instead_of_map.rs clippy_lints/src/methods/bind_instead_of_map.rs:157— clippy_lints/src/methods/bind_instead_of_map.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is BindInsteadOfMap::check at line 157), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Revert "Remove indirection for `Expr` in `Body`"”; “Fix clippy”; “fix deprecated rustc_hir::attrs imports”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/methods/bind_instead_of_map.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: clippy_lints/src/methods/format_collect.rs clippy_lints/src/methods/format_collect.rs:20— clippy_lints/src/methods/format_collect.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is clippy_lints::methods::format_collect::check at line 20), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Revert "Remove indirection for `Expr` in `Body`"”; “Fix clippy”; “fix deprecated rustc_hir::attrs imports”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/methods/format_collect.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: clippy_lints/src/methods/option_map_or_none.rs clippy_lints/src/methods/option_map_or_none.rs:33— clippy_lints/src/methods/option_map_or_none.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is clippy_lints::methods::option_map_or_none::check at line 33), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Revert "Remove indirection for `Expr` in `Body`"”; “Fix clippy”; “fix deprecated rustc_hir::attrs imports”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/methods/option_map_or_none.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: clippy_lints/src/methods/result_map_or_else_none.rs clippy_lints/src/methods/result_map_or_else_none.rs:14— clippy_lints/src/methods/result_map_or_else_none.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is clippy_lints::methods::result_map_or_else_none::check at line 14), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Revert "Remove indirection for `Expr` in `Body`"”; “Fix clippy”; “fix deprecated rustc_hir::attrs imports”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/methods/result_map_or_else_none.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: clippy_lints/src/missing_asserts_for_indexing.rs clippy_lints/src/missing_asserts_for_indexing.rs:348— clippy_lints/src/missing_asserts_for_indexing.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is clippy_lints::missing_asserts_for_indexing::report_indexes at line 348), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Revert "Remove indirection for `Expr` in `Body`"”; “Fix clippy”; “Fix clippy/rustdoc”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/missing_asserts_for_indexing.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: clippy_lints/src/returns/needless_return_with_question_mark.rs clippy_lints/src/returns/needless_return_with_question_mark.rs:12— clippy_lints/src/returns/needless_return_with_question_mark.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is clippy_lints::returns::needless_return_with_question_mark::check_stmt at line 12), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Revert "Remove indirection for `Expr` in `Body`"”; “Fix clippy”; “fix deprecated rustc_hir::attrs imports”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/returns/needless_return_with_question_mark.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: clippy_lints/src/unnecessary_literal_bound.rs clippy_lints/src/unnecessary_literal_bound.rs:57— clippy_lints/src/unnecessary_literal_bound.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is clippy_lints::unnecessary_literal_bound::extract_anonymous_ref at line 57), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Revert "Remove indirection for `Expr` in `Body`"”; “Fix clippy”; “Fix clippy/rustdoc”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/unnecessary_literal_bound.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: clippy_lints/src/incompatible_msrv.rs clippy_lints/src/incompatible_msrv.rs:168— clippy_lints/src/incompatible_msrv.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is IncompatibleMsrv::emit_lint_if_under_msrv at line 168), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix clippy imports”; “fix deprecated rustc_hir::attrs imports”; “Fix clippy/rustdoc”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/incompatible_msrv.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: clippy_lints/src/casts/mod.rs clippy_lints/src/casts/mod.rs:890— clippy_lints/src/casts/mod.rs changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is Casts::check_expr at line 890), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Revert "Remove indirection for `Expr` in `Body`"”; “Fix clippy”; “Fix clippy/rustdoc”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/casts/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: clippy_lints/src/from_over_into.rs clippy_lints/src/from_over_into.rs:180— clippy_lints/src/from_over_into.rs changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is clippy_lints::from_over_into::convert_to_from at line 180), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Revert "Remove indirection for `Expr` in `Body`"”; “Fix clippy”; “Fix clippy/rustdoc”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/from_over_into.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: clippy_lints/src/infinite_iter.rs clippy_lints/src/infinite_iter.rs:145— clippy_lints/src/infinite_iter.rs changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is clippy_lints::infinite_iter::is_infinite at line 145), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Revert "Remove indirection for `Expr` in `Body`"”; “Fix clippy”; “Fix clippy/rustdoc”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/infinite_iter.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: clippy_lints/src/manual_noop_waker.rs clippy_lints/src/manual_noop_waker.rs:52— clippy_lints/src/manual_noop_waker.rs changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is ManualNoopWaker::check_item at line 52), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Revert "Remove indirection for `Expr` in `Body`"”; “Fix clippy”; “Fix clippy/rustdoc”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/manual_noop_waker.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: clippy_lints/src/panic_in_result_fn.rs clippy_lints/src/panic_in_result_fn.rs:64— clippy_lints/src/panic_in_result_fn.rs changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is clippy_lints::panic_in_result_fn::lint_impl_body at line 64), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Revert "Remove indirection for `Expr` in `Body`"”; “Fix clippy”; “Fix clippy/rustdoc”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:34:03 +00:00' --until='2026-11-14 14:34:03 +00:00' --full-history --no-merges -- clippy_lints/src/panic_in_result_fn.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
FileTooLong: src/lib.rs clippy_utils/src/lib.rs— FileTooLong — 2153 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 149 free functions. The bar is 500 significant lines; this is 1653 over it, 4.31× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: methods/mod.rs clippy_lints/src/methods/mod.rs— FileTooLong — 1866 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 1366 over it, 3.73× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/hir_utils.rs clippy_utils/src/hir_utils.rs— FileTooLong — 1196 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 696 over it, 2.39× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: ty/mod.rs clippy_utils/src/ty/mod.rs— FileTooLong — 995 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 55 free functions. The bar is 500 significant lines; this is 495 over it, 1.99× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/lib.rs clippy_lints/src/lib.rs— FileTooLong — 829 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 329 over it, 1.66× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/consts.rs clippy_utils/src/consts.rs— FileTooLong — 827 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 327 over it, 1.65× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/dereference.rs clippy_lints/src/dereference.rs— FileTooLong — 780 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 63% of them inside a single declaration: Dereferencing (3 blocks, 154-1303). The bar is 500 significant lines; this is 280 over it, 1.56× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: ast_utils/mod.rs clippy_utils/src/ast_utils/mod.rs— FileTooLong — 754 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 61 free functions. The bar is 500 significant lines; this is 254 over it, 1.51× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/sugg.rs clippy_utils/src/sugg.rs— FileTooLong — 623 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 123 over it, 1.25× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/types.rs clippy_config/src/types.rs— FileTooLong — 616 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 116 over it, 1.23× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: doc/mod.rs clippy_lints/src/doc/mod.rs— FileTooLong — 606 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 106 over it, 1.21× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: utils/author.rs clippy_lints/src/utils/author.rs— FileTooLong — 599 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 82% of them inside a single declaration: PrintVisitor (2 blocks, 215-874). The bar is 500 significant lines; this is 99 over it, 1.20× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/utils.rs clippy_dev/src/utils.rs— FileTooLong — 587 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 87 over it, 1.17× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/undocumented_unsafe_blocks.rs clippy_lints/src/undocumented_unsafe_blocks.rs— FileTooLong — 581 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 81 over it, 1.16× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/lifetimes.rs clippy_lints/src/lifetimes.rs— FileTooLong — 575 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 75 over it, 1.15× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: methods/needless_collect.rs clippy_lints/src/methods/needless_collect.rs— FileTooLong — 575 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 75 over it, 1.15× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/visitors.rs clippy_utils/src/visitors.rs— FileTooLong — 570 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 70 over it, 1.14× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/conf.rs clippy_config/src/conf.rs— FileTooLong — 562 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 62 over it, 1.12× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/non_copy_const.rs clippy_lints/src/non_copy_const.rs— FileTooLong — 559 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 75% of them inside a single declaration: NonCopyConst (3 blocks, 256-891). The bar is 500 significant lines; this is 59 over it, 1.12× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: methods/unnecessary_to_owned.rs clippy_lints/src/methods/unnecessary_to_owned.rs— FileTooLong — 552 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 52 over it, 1.10× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/manual_clamp.rs clippy_lints/src/manual_clamp.rs— FileTooLong — 508 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 8 over it, 1.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
clippy_utils::is_never_expr (cognitive 64) clippy_utils/src/lib.rs:3021— clippy_utils::is_never_expr has cognitive complexity 64 (threshold 15). Drivers by points: if/else 25 (44 pts), loops 4 (11 pts), boolean chains 5, match/switch 2 (4 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clippy_utils::capture_local_usage (cognitive 33) clippy_utils/src/lib.rs:859— clippy_utils::capture_local_usage has cognitive complexity 33 (threshold 15). Drivers by points: match/switch 6 (18 pts), if/else 4 (8 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 19). Of this number, 32 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
clippy_utils::mir::reachable_while_storage_live (cognitive 29) clippy_utils/src/mir/mod.rs:70— clippy_utils::mir::reachable_while_storage_live has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 4 (7 pts), boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clippy_utils::paths::local_item_child_by_name (cognitive 28) clippy_utils/src/paths.rs:287— clippy_utils::paths::local_item_child_by_name has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (20 pts), match/switch 3 (6 pts), boolean chains 2 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
clippy_utils::ast_utils::eq_expr (cognitive 27) clippy_utils/src/ast_utils/mod.rs:145— clippy_utils::ast_utils::eq_expr has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 25, if/else 1, match/switch 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
clippy_utils::is_default_equivalent_call (cognitive 26) clippy_utils/src/lib.rs:600— clippy_utils::is_default_equivalent_call has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 8, match/switch 1 (3 pts), loops 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
clippy_utils::ty::type_certainty::path_segment_certainty (cognitive 25) clippy_utils/src/ty/type_certainty/mod.rs:218— clippy_utils::ty::type_certainty::path_segment_certainty has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (20 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
clippy_utils::ty::contains_ty_adt_constructor_opaque::contains_ty_adt_constructor_opaque_inner (cognitive 23) clippy_utils/src/ty/mod.rs:95— clippy_utils::ty::contains_ty_adt_constructor_opaque::contains_ty_adt_constructor_opaque_inner has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 2 (5 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
clippy_utils::is_body_identity_function (cognitive 22) clippy_utils/src/lib.rs:1823— clippy_utils::is_body_identity_function has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, loops 2, match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clippy_utils::can_move_expr_to_closure (cognitive 21) clippy_utils/src/lib.rs:954— clippy_utils::can_move_expr_to_closure has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 4 (13 pts), if/else 3 (6 pts), loops 1 (2 pts) (nesting depth added 13). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
clippy_utils::expr_use_sites (cognitive 20) clippy_utils/src/lib.rs:2698— clippy_utils::expr_use_sites has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (17 pts), match/switch 2 (3 pts) (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
clippy_utils::eager_or_lazy::fn_eagerness (cognitive 19) clippy_utils/src/eager_or_lazy.rs:52— clippy_utils::eager_or_lazy::fn_eagerness has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (9 pts), match/switch 3 (6 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
clippy_utils::qualify_min_const_fn::check_terminator (cognitive 18) clippy_utils/src/qualify_min_const_fn.rs:340— clippy_utils::qualify_min_const_fn::check_terminator has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 2 (4 pts), loops 1 (3 pts) (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
clippy_utils::ty::type_certainty::expr_type_certainty (cognitive 18) clippy_utils/src/ty/type_certainty/mod.rs:32— clippy_utils::ty::type_certainty::expr_type_certainty has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clippy_utils::maybe_get_relative_path (cognitive 17) clippy_utils/src/lib.rs:3322— clippy_utils::maybe_get_relative_path has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clippy_utils::ast_utils::eq_item_kind (cognitive 17) clippy_utils/src/ast_utils/mod.rs:308— clippy_utils::ast_utils::eq_item_kind has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 14, match/switch 2 (3 pts) (nesting depth added 1). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
clippy_utils::qualify_min_const_fn::check_ty (cognitive 17) clippy_utils/src/qualify_min_const_fn.rs:82— clippy_utils::qualify_min_const_fn::check_ty has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 3 (8 pts), if/else 1 (5 pts), loops 2 (4 pts) (nesting depth added 11). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
clippy_utils::visitors::for_each_unconsumed_temporary::helper (cognitive 17) clippy_utils/src/visitors.rs:679— clippy_utils::visitors::for_each_unconsumed_temporary::helper has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (8 pts), if/else 3 (5 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
clippy_utils::str_utils::camel_case_start_from_idx (cognitive 16) clippy_utils/src/str_utils.rs:100— clippy_utils::str_utils::camel_case_start_from_idx has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FunctionTooLong: clippy_lints::doc::check_doc clippy_lints/src/doc/mod.rs:1133— FunctionTooLong — clippy_lints::doc::check_doc runs 184 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 84 over it, 1.84× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: clippy_utils::ast_utils::eq_item_kind clippy_utils/src/ast_utils/mod.rs:308— FunctionTooLong — clippy_utils::ast_utils::eq_item_kind runs 167 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 67 over it, 1.67× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: clippy_utils::is_never_expr clippy_utils/src/lib.rs:3021— FunctionTooLong — clippy_utils::is_never_expr runs 152 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 52 over it, 1.52× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: clippy_lints::eta_reduction::check_closure clippy_lints/src/eta_reduction.rs:90— FunctionTooLong — clippy_lints::eta_reduction::check_closure runs 137 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 37 over it, 1.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: clippy_lints::loops::never_loop::never_loop_expr clippy_lints/src/loops/never_loop.rs:293— FunctionTooLong — clippy_lints::loops::never_loop::never_loop_expr runs 133 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 33 over it, 1.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: clippy_lints::methods::manual_inspect::check clippy_lints/src/methods/manual_inspect.rs:19— FunctionTooLong — clippy_lints::methods::manual_inspect::check runs 131 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 31 over it, 1.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: clippy_dev::fmt::fmt_conf clippy_dev/src/fmt.rs:66— FunctionTooLong — clippy_dev::fmt::fmt_conf runs 127 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 27 over it, 1.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: clippy_lints::casts::unnecessary_cast::check clippy_lints/src/casts/unnecessary_cast.rs:21— FunctionTooLong — clippy_lints::casts::unnecessary_cast::check runs 122 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: clippy_lints::loops::needless_range_loop::check clippy_lints/src/loops/needless_range_loop.rs:25— FunctionTooLong — clippy_lints::loops::needless_range_loop::check runs 117 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: clippy_lints::operators::op_ref::check clippy_lints/src/operators/op_ref.rs:15— FunctionTooLong — clippy_lints::operators::op_ref::check runs 117 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: clippy_lints::matches::collapsible_match::check_arm clippy_lints/src/matches/collapsible_match.rs:75— FunctionTooLong — clippy_lints::matches::collapsible_match::check_arm runs 114 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: clippy_lints::matches::match_wild_enum::check clippy_lints/src/matches/match_wild_enum.rs:15— FunctionTooLong — clippy_lints::matches::match_wild_enum::check runs 114 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: clippy_lints::loops::explicit_iter_loop::is_ref_iterable clippy_lints/src/loops/explicit_iter_loop.rs:107— FunctionTooLong — clippy_lints::loops::explicit_iter_loop::is_ref_iterable runs 112 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 12 over it, 1.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: clippy_lints::transmute::transmute_undefined_repr::check clippy_lints/src/transmute/transmute_undefined_repr.rs:9— FunctionTooLong — clippy_lints::transmute::transmute_undefined_repr::check runs 111 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 11 over it, 1.11× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: clippy_lints::matches::match_same_arms::check clippy_lints/src/matches/match_same_arms.rs:21— FunctionTooLong — clippy_lints::matches::match_same_arms::check runs 106 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: clippy_lints::ifs::branches_sharing_code::scan_block_for_eq clippy_lints/src/ifs/branches_sharing_code.rs:319— FunctionTooLong — clippy_lints::ifs::branches_sharing_code::scan_block_for_eq runs 105 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: clippy_lints::methods::needless_collect::check clippy_lints/src/methods/needless_collect.rs:28— FunctionTooLong — clippy_lints::methods::needless_collect::check runs 104 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: clippy_lints::matches::match_single_binding::check clippy_lints/src/matches/match_single_binding.rs:24— FunctionTooLong — clippy_lints::matches::match_single_binding::check runs 103 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: clippy_lints::needless_borrows_for_generic_args::needless_borrow_count clippy_lints/src/needless_borrows_for_generic_args.rs:167— FunctionTooLong — clippy_lints::needless_borrows_for_generic_args::needless_borrow_count runs 103 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Duplicated block (8 lines × 2) clippy_dev/src/fmt.rs:144— clippy_dev/src/fmt.rs:144-151 | clippy_dev/src/fmt.rs:156-163 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) clippy_lints/src/manual_let_else.rs:311— clippy_lints/src/manual_let_else.rs:311-318 | clippy_lints/src/manual_let_else.rs:323-330 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `clippy_lints/src/manual_let_else.rs:319` calls `sess`, `source_map`, `span_to_snippet` and `clippy_lints/src/manual_let_else.rs:331` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) clippy_lints/src/methods/iter_filter.rs:65— clippy_lints/src/methods/iter_filter.rs:65-72 | clippy_lints/src/methods/iter_filter.rs:80-87 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/methods/iter_filter.rs:65` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) clippy_lints/src/methods/map_unwrap_or.rs:163— clippy_lints/src/methods/map_unwrap_or.rs:163-170 | clippy_lints/src/option_if_let_else.rs:271-278 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (8 lines × 2) clippy_lints/src/methods/mod.rs:6016— clippy_lints/src/methods/mod.rs:6016-6023 | clippy_lints/src/methods/mod.rs:6039-6046 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/methods/mod.rs:6016` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) clippy_lints/src/operators/op_ref.rs:98— clippy_lints/src/operators/op_ref.rs:98-106 | clippy_lints/src/operators/op_ref.rs:160-167 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/operators/op_ref.rs:98` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) clippy_lints/src/undocumented_may_panic_call.rs:174— clippy_lints/src/undocumented_may_panic_call.rs:174-181 | clippy_lints/src/undocumented_unsafe_blocks.rs:807-814 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/undocumented_may_panic_call.rs:174` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) clippy_utils/src/eager_or_lazy.rs:169— clippy_utils/src/eager_or_lazy.rs:169-176 | clippy_utils/src/eager_or_lazy.rs:178-185 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) clippy_lints/src/loops/mut_range_bound.rs:89— clippy_lints/src/loops/mut_range_bound.rs:89-96 | clippy_lints/src/loops/mut_range_bound.rs:100-107 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/loops/mut_range_bound.rs:89` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) clippy_lints/src/floating_point_arithmetic/radians.rs:49— clippy_lints/src/floating_point_arithmetic/radians.rs:49-56 | clippy_lints/src/floating_point_arithmetic/radians.rs:75-82 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/floating_point_arithmetic/radians.rs:49` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) clippy_lints/src/operators/identity_op.rs:47— clippy_lints/src/operators/identity_op.rs:47-54 | clippy_lints/src/operators/identity_op.rs:60-67 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (8 lines × 2) clippy_lints/src/bool_comparison.rs:170— clippy_lints/src/bool_comparison.rs:170-177 | clippy_lints/src/needless_bool.rs:347-354 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) clippy_lints/src/methods/unnecessary_fold.rs:264— clippy_lints/src/methods/unnecessary_fold.rs:264-271 | clippy_lints/src/methods/unnecessary_fold.rs:274-281 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/methods/unnecessary_fold.rs:264` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `clippy_lints/src/methods/unnecessary_fold.rs:273` calls `check_fold_with_method` and `clippy_lints/src/methods/unnecessary_fold.rs:263` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) clippy_dev/src/utils.rs:176— clippy_dev/src/utils.rs:176-183 | clippy_dev/src/utils.rs:188-195 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (8 lines × 2) clippy_dev/src/deprecate_lint.rs:22— clippy_dev/src/deprecate_lint.rs:22-29 | clippy_dev/src/deprecate_lint.rs:69-76 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_dev/src/deprecate_lint.rs:22` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (8 lines × 2) clippy_lints/src/floating_point_arithmetic/expm1.rs:39— clippy_lints/src/floating_point_arithmetic/expm1.rs:39-46 | clippy_lints/src/floating_point_arithmetic/log_base.rs:37-44 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/floating_point_arithmetic/expm1.rs:39` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) clippy_dev/src/edit_lints.rs:36— clippy_dev/src/edit_lints.rs:36-44 | clippy_dev/src/edit_lints.rs:70-78 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_dev/src/edit_lints.rs:36` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (9 lines × 2) clippy_lints/src/booleans.rs:170— clippy_lints/src/booleans.rs:170-178 | clippy_lints/src/booleans.rs:180-188 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) clippy_lints/src/empty_with_brackets.rs:306— clippy_lints/src/empty_with_brackets.rs:306-314 | clippy_lints/src/empty_with_brackets.rs:327-335 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/empty_with_brackets.rs:306` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) clippy_lints/src/lifetimes.rs:729— clippy_lints/src/lifetimes.rs:729-737 | clippy_lints/src/lifetimes.rs:750-758 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/lifetimes.rs:729` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) clippy_lints/src/macro_use.rs:176— clippy_lints/src/macro_use.rs:176-184 | clippy_lints/src/macro_use.rs:188-196 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) clippy_lints/src/matches/match_same_arms.rs:289— clippy_lints/src/matches/match_same_arms.rs:289-297 | clippy_lints/src/matches/match_same_arms.rs:313-321 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/matches/match_same_arms.rs:289` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) clippy_lints/src/misc.rs:185— clippy_lints/src/misc.rs:185-193 | clippy_lints/src/misc.rs:196-204 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) clippy_lints/src/missing_asserts_for_indexing.rs:242— clippy_lints/src/missing_asserts_for_indexing.rs:242-250 | clippy_lints/src/missing_asserts_for_indexing.rs:305-313 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/missing_asserts_for_indexing.rs:242` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) clippy_utils/src/ty/mod.rs:850— clippy_utils/src/ty/mod.rs:850-858 | clippy_utils/src/ty/mod.rs:891-899 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_utils/src/ty/mod.rs:850` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 2) clippy_lints/src/undocumented_unsafe_blocks.rs:150— clippy_lints/src/undocumented_unsafe_blocks.rs:150-158 | clippy_lints/src/undocumented_unsafe_blocks.rs:178-186 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/undocumented_unsafe_blocks.rs:150` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) clippy_utils/src/lib.rs:272— clippy_utils/src/lib.rs:272-280 | clippy_utils/src/lib.rs:287-295 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) clippy_dev/src/parse.rs:362— clippy_dev/src/parse.rs:362-370 | clippy_dev/src/parse.rs:389-397 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_dev/src/parse.rs:362` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) clippy_lints/src/assertions_on_constants.rs:86— clippy_lints/src/assertions_on_constants.rs:86-94 | clippy_lints/src/manual_take.rs:108-116 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) clippy_lints/src/await_holding_invalid.rs:295— clippy_lints/src/await_holding_invalid.rs:295-299 | clippy_lints/src/entry.rs:763-767 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (5 lines × 2) clippy_lints/src/extra_unused_type_parameters.rs:265— clippy_lints/src/extra_unused_type_parameters.rs:265-269 | clippy_lints/src/extra_unused_type_parameters.rs:281-285 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/extra_unused_type_parameters.rs:265` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `item` to `&'tcx Item<'tcx>` in one and `&'tcx ImplItem<'tcx>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (5 lines × 2) clippy_lints/src/methods/unnecessary_sort_by.rs:178— clippy_lints/src/methods/unnecessary_sort_by.rs:178-182 | clippy_lints/src/methods/unnecessary_sort_by.rs:206-210 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (5 lines × 2) clippy_lints/src/min_ident_chars.rs:147— clippy_lints/src/min_ident_chars.rs:147-151 | clippy_lints/src/missing_doc.rs:158-162 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `clippy_lints/src/min_ident_chars.rs:146` calls `Mod` and `clippy_lints/src/missing_doc.rs:157` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) clippy_lints/src/ranges.rs:231— clippy_lints/src/ranges.rs:231-235 | clippy_lints/src/ranges.rs:267-271 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `clippy_lints/src/ranges.rs:228` calls `partial_cmp`, `typeck_results`, `expr_ty` and `clippy_lints/src/ranges.rs:264` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) clippy_lints_internal/src/repeated_is_diagnostic_item.rs:439— clippy_lints_internal/src/repeated_is_diagnostic_item.rs:439-443 | clippy_lints_internal/src/repeated_is_diagnostic_item.rs:492-496 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints_internal/src/repeated_is_diagnostic_item.rs:439` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) clippy_utils/src/consts.rs:336— clippy_utils/src/consts.rs:336-340 | clippy_utils/src/consts.rs:390-394 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) clippy_utils/src/consts.rs:1112— clippy_utils/src/consts.rs:1112-1116 | clippy_utils/src/consts.rs:1126-1130 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_utils/src/consts.rs:1112` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) clippy_utils/src/mir/possible_borrower.rs:44— clippy_utils/src/mir/possible_borrower.rs:44-48 | clippy_utils/src/mir/possible_origin.rs:26-30 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_utils/src/mir/possible_borrower.rs:44` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `cx` to `&'a LateContext<'tcx>` in one and `&LateContext<'tcx>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (5 lines × 2) clippy_dev/src/edit_lints.rs:228— clippy_dev/src/edit_lints.rs:228-232 | clippy_dev/src/edit_lints.rs:244-248 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) clippy_lints/src/manual_pop_if.rs:209— clippy_lints/src/manual_pop_if.rs:209-213 | clippy_lints/src/manual_pop_if.rs:368-372 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `clippy_lints/src/manual_pop_if.rs:373` calls `typeck_results`, `expr_ty`, `is_bool` and `clippy_lints/src/manual_pop_if.rs:214` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) clippy_lints/src/needless_nonzero_get.rs:88— clippy_lints/src/needless_nonzero_get.rs:88-92 | clippy_lints/src/needless_nonzero_get.rs:99-103 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
clippy_utils::ast_utils::eq_expr (cyclomatic 63) clippy_utils/src/ast_utils/mod.rs:145— clippy_utils::ast_utils::eq_expr has cyclomatic complexity 63 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
clippy_utils::is_never_expr (cyclomatic 42) clippy_utils/src/lib.rs:3021— clippy_utils::is_never_expr has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
clippy_utils::ast_utils::eq_item_kind (cyclomatic 32) clippy_utils/src/ast_utils/mod.rs:308— clippy_utils::ast_utils::eq_item_kind has cyclomatic complexity 32 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
clippy_utils::is_default_equivalent_call (cyclomatic 24) clippy_utils/src/lib.rs:600— clippy_utils::is_default_equivalent_call has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
clippy_utils::capture_local_usage (cyclomatic 22) clippy_utils/src/lib.rs:859— clippy_utils::capture_local_usage has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
clippy_utils::visitors::for_each_unconsumed_temporary::helper (cyclomatic 22) clippy_utils/src/visitors.rs:679— clippy_utils::visitors::for_each_unconsumed_temporary::helper has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
clippy_utils::paths::local_item_child_by_name (cyclomatic 21) clippy_utils/src/paths.rs:287— clippy_utils::paths::local_item_child_by_name has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: clippy_utils::paths::find_primitive_impls (cyclomatic 22) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
clippy_utils::ty::type_certainty::expr_type_certainty (cyclomatic 20) clippy_utils/src/ty/type_certainty/mod.rs:32— clippy_utils::ty::type_certainty::expr_type_certainty has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
clippy_utils::expr_use_sites (cyclomatic 18) clippy_utils/src/lib.rs:2698— clippy_utils::expr_use_sites has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
clippy_utils::consts::mir_to_const (cyclomatic 17) clippy_utils/src/consts.rs:1161— clippy_utils::consts::mir_to_const has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
clippy_utils::qualify_min_const_fn::check_rvalue (cyclomatic 16) clippy_utils/src/qualify_min_const_fn.rs:136— clippy_utils::qualify_min_const_fn::check_rvalue has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MethodTooLong: Methods.check_methods clippy_lints/src/methods/mod.rs:5437— MethodTooLong — check_methods runs 536 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 436 over it, 5.36× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Dereferencing.check_expr clippy_lints/src/dereference.rs:242— MethodTooLong — check_expr runs 251 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 151 over it, 2.51× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PrintVisitor.expr clippy_lints/src/utils/author.rs:435— MethodTooLong — expr runs 225 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 125 over it, 2.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: UselessConversion.check_expr clippy_lints/src/useless_conversion.rs:160— MethodTooLong — check_expr runs 206 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 106 over it, 2.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SpanlessHash.hash_expr clippy_utils/src/hir_utils.rs:1181— MethodTooLong — hash_expr runs 160 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 60 over it, 1.60× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Dereferencing.report clippy_lints/src/dereference.rs:1098— MethodTooLong — report runs 143 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 43 over it, 1.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: HirEqInterExpr.eq_expr clippy_utils/src/hir_utils.rs:504— MethodTooLong — eq_expr runs 141 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 41 over it, 1.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TupleArrayConversions.check_expr clippy_lints/src/tuple_array_conversions.rs:64— MethodTooLong — check_expr runs 127 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 27 over it, 1.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Matches.check_expr clippy_lints/src/matches/mod.rs:1055— MethodTooLong — check_expr runs 125 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 25 over it, 1.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Crate.run_clippy_lints lintcheck/src/main.rs:68— MethodTooLong — run_clippy_lints runs 108 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 8 over it, 1.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ConstEvalCtxt.fetch_path clippy_utils/src/consts.rs:817— MethodTooLong — fetch_path runs 107 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 7 over it, 1.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Duplicated block (10 lines × 2) clippy_dev/src/utils.rs:483— clippy_dev/src/utils.rs:483-492 | clippy_dev/src/utils.rs:513-522 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_dev/src/utils.rs:483` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) clippy_lints/src/functions/must_use.rs:334— clippy_lints/src/functions/must_use.rs:334-343 | clippy_lints/src/functions/must_use.rs:347-356 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/functions/must_use.rs:334` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) clippy_lints/src/operators/manual_div_ceil.rs:30— clippy_lints/src/operators/manual_div_ceil.rs:30-39 | clippy_lints/src/operators/manual_div_ceil.rs:41-50 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) clippy_lints/src/ranges.rs:244— clippy_lints/src/ranges.rs:244-253 | clippy_lints/src/ranges.rs:279-288 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/ranges.rs:244` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) clippy_utils/src/mir/mod.rs:125— clippy_utils/src/mir/mod.rs:125-134 | clippy_utils/src/mir/mod.rs:140-149 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) clippy_utils/src/ty/mod.rs:642— clippy_utils/src/ty/mod.rs:642-651 | clippy_utils/src/ty/mod.rs:656-666 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_utils/src/ty/mod.rs:642` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) clippy_lints/src/methods/map_unwrap_or.rs:192— clippy_lints/src/methods/map_unwrap_or.rs:192-201 | clippy_lints/src/option_if_let_else.rs:297-306 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/methods/map_unwrap_or.rs:192` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `expr` to `&'tcx rustc_hir::Expr<'_>` in one and `&'tcx Expr<'_>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (10 lines × 2) clippy_lints/src/manual_pop_if.rs:252— clippy_lints/src/manual_pop_if.rs:252-261 | clippy_lints/src/manual_pop_if.rs:318-327 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/manual_pop_if.rs:252` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) clippy_utils/src/visitors.rs:624— clippy_utils/src/visitors.rs:624-633 | clippy_utils/src/visitors.rs:811-820 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_utils/src/visitors.rs:624` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (10 lines × 2) clippy_utils/src/usage.rs:208— clippy_utils/src/usage.rs:208-217 | clippy_utils/src/visitors.rs:317-326 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (10 lines × 2) clippy_lints/src/operators/arithmetic_side_effects.rs:311— clippy_lints/src/operators/arithmetic_side_effects.rs:311-320 | clippy_lints/src/operators/numeric_arithmetic.rs:89-99 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×10
Edited copy of a member (10 corresponding lines) clippy_lints/src/loops/mut_range_bound.rs:85— clippy_lints/src/loops/mut_range_bound.rs:85-96 | clippy_lints/src/loops/mut_range_bound.rs:98-107 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) clippy_lints/src/casts/cast_sign_loss.rs:112— clippy_lints/src/casts/cast_sign_loss.rs:112-121 | clippy_lints/src/casts/cast_sign_loss.rs:127-136 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) clippy_lints/src/methods/bind_instead_of_map.rs:63— clippy_lints/src/methods/bind_instead_of_map.rs:63-72 | clippy_lints/src/methods/bind_instead_of_map.rs:74-84 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) clippy_utils/src/ty/mod.rs:510— clippy_utils/src/ty/mod.rs:510-519 | clippy_utils/src/ty/mod.rs:523-534 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) clippy_lints/src/matches/try_err.rs:93— clippy_lints/src/matches/try_err.rs:93-102 | clippy_lints/src/matches/try_err.rs:105-115 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) clippy_lints/src/manual_strip.rs:155— clippy_lints/src/manual_strip.rs:155-164 | clippy_lints_internal/src/symbols.rs:196-205 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) clippy_lints/src/methods/is_empty.rs:49— clippy_lints/src/methods/is_empty.rs:49-59 | clippy_utils/src/lib.rs:169-178 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) clippy_lints/src/question_mark.rs:608— clippy_lints/src/question_mark.rs:608-618 | clippy_lints/src/unused_io_amount.rs:275-284 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) clippy_utils/src/lib.rs:1145— clippy_utils/src/lib.rs:1145-1154 | clippy_utils/src/visitors.rs:850-859 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) clippy_utils/src/lib.rs:3450— clippy_utils/src/lib.rs:3450-3459 | clippy_utils/src/visitors.rs:790-799 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (6 lines × 2) clippy_lints/src/booleans.rs:160— clippy_lints/src/booleans.rs:160-165 | clippy_lints/src/booleans.rs:180-185 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) clippy_lints/src/methods/unnecessary_first_then_check.rs:28— clippy_lints/src/methods/unnecessary_first_then_check.rs:28-34 | clippy_lints/src/methods/unnecessary_get_then_check.rs:39-44 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/methods/unnecessary_first_then_check.rs:28` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (6 lines × 2) clippy_utils/src/consts.rs:1066— clippy_utils/src/consts.rs:1066-1071 | clippy_utils/src/consts.rs:1094-1099 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_utils/src/consts.rs:1066` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) clippy_utils/src/visitors.rs:119— clippy_utils/src/visitors.rs:119-124 | clippy_utils/src/visitors.rs:165-170 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `clippy_utils/src/visitors.rs:173` calls `visit_anon_const`, `Continue` and `clippy_utils/src/visitors.rs:127` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) clippy_lints/src/casts/cast_slice_from_raw_parts.rs:46— clippy_lints/src/casts/cast_slice_from_raw_parts.rs:46-51 | clippy_lints/src/casts/cast_slice_from_raw_parts.rs:84-89 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/casts/cast_slice_from_raw_parts.rs:46` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) clippy_utils/src/consts.rs:314— clippy_utils/src/consts.rs:314-319 | clippy_utils/src/consts.rs:367-372 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_utils/src/consts.rs:314` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) clippy_utils/src/consts.rs:344— clippy_utils/src/consts.rs:344-349 | clippy_utils/src/consts.rs:400-405 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_utils/src/consts.rs:344` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) clippy_lints/src/methods/ptr_offset_by_literal.rs:132— clippy_lints/src/methods/ptr_offset_by_literal.rs:132-137 | clippy_lints/src/methods/ptr_offset_with_cast.rs:76-81 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) clippy_config/src/metadata.rs:24— clippy_config/src/metadata.rs:24-30 | clippy_config/src/metadata.rs:46-51 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_config/src/metadata.rs:24` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13 lines × 2) clippy_lints/src/arbitrary_source_item_ordering.rs:410— clippy_lints/src/arbitrary_source_item_ordering.rs:410-422 | clippy_lints/src/arbitrary_source_item_ordering.rs:426-438 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/arbitrary_source_item_ordering.rs:410` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) clippy_lints/src/casts/needless_type_cast.rs:66— clippy_lints/src/casts/needless_type_cast.rs:66-78 | clippy_lints/src/casts/needless_type_cast.rs:97-109 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/casts/needless_type_cast.rs:66` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (13 lines × 2) clippy_lints/src/missing_doc.rs:200— clippy_lints/src/missing_doc.rs:200-212 | clippy_lints/src/missing_doc.rs:221-233 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/missing_doc.rs:200` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `item` to `&'tcx TraitItem<'_>` in one and `&'tcx ImplItem<'_>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (13 lines × 2) clippy_lints/src/needless_pass_by_ref_mut.rs:473— clippy_lints/src/needless_pass_by_ref_mut.rs:473-485 | clippy_lints/src/needless_pass_by_ref_mut.rs:516-528 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) clippy_utils/src/res.rs:140— clippy_utils/src/res.rs:140-152 | clippy_utils/src/res.rs:236-248 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_utils/src/res.rs:140` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) clippy_lints/src/matches/redundant_guards.rs:30— clippy_lints/src/matches/redundant_guards.rs:30-42 | clippy_lints/src/matches/redundant_guards.rs:49-61 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/matches/redundant_guards.rs:30` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) clippy_lints/src/tuple_array_conversions.rs:91— clippy_lints/src/tuple_array_conversions.rs:91-103 | clippy_lints/src/tuple_array_conversions.rs:137-149 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/tuple_array_conversions.rs:91` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) clippy_lints/src/mem_replace.rs:199— clippy_lints/src/mem_replace.rs:199-211 | clippy_lints/src/mem_replace.rs:222-234 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) clippy_dev/src/edit_lints.rs:84— clippy_dev/src/edit_lints.rs:84-90 | clippy_dev/src/edit_lints.rs:156-162 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) clippy_lints/src/floating_point_arithmetic/mul_add.rs:67— clippy_lints/src/floating_point_arithmetic/mul_add.rs:67-73 | clippy_lints/src/floating_point_arithmetic/powi.rs:19-25 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) clippy_lints/src/vec_init_then_push.rs:160— clippy_lints/src/vec_init_then_push.rs:160-166 | clippy_lints/src/vec_init_then_push.rs:183-189 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/vec_init_then_push.rs:160` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) clippy_utils/src/ty/mod.rs:1080— clippy_utils/src/ty/mod.rs:1080-1086 | clippy_utils/src/ty/mod.rs:1090-1096 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_utils/src/ty/mod.rs:1080` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) clippy_lints/src/functions/result.rs:58— clippy_lints/src/functions/result.rs:58-64 | clippy_lints/src/functions/result.rs:78-84 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/functions/result.rs:58` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) clippy_utils/src/visitors.rs:450— clippy_utils/src/visitors.rs:450-456 | clippy_utils/src/visitors.rs:465-471 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_utils/src/visitors.rs:450` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) clippy_lints/src/methods/bind_instead_of_map.rs:64— clippy_lints/src/methods/bind_instead_of_map.rs:64-70 | clippy_lints/src/methods/bind_instead_of_map.rs:75-81 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/methods/bind_instead_of_map.rs:64` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
ClassTooLong: Methods clippy_lints/src/methods/mod.rs:5250— ClassTooLong — 663 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 2 methods, 4 blocks, lines 5250-6181. The bar is 400 significant lines; this is 263 over it, 1.66× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: HirEqInterExpr clippy_utils/src/hir_utils.rs:153— ClassTooLong — 592 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 32 methods, 2 blocks, lines 153-1028. The bar is 400 significant lines; this is 192 over it, 1.48× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Dereferencing clippy_lints/src/dereference.rs:154— ClassTooLong — 494 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 3 methods, 3 blocks, lines 154-1303. The bar is 400 significant lines; this is 94 over it, 1.24× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: PrintVisitor clippy_lints/src/utils/author.rs:215— ClassTooLong — 491 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 19 methods, 2 blocks, lines 215-874. The bar is 400 significant lines; this is 91 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: NonCopyConst clippy_lints/src/non_copy_const.rs:256— ClassTooLong — 419 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 7 methods, 3 blocks, lines 256-891. The bar is 400 significant lines; this is 19 over it, 1.05× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ConstEvalCtxt clippy_utils/src/consts.rs:559— ClassTooLong — 408 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 20 methods, 2 blocks, lines 559-1144. The bar is 400 significant lines; this is 8 over it, 1.02× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×6
Edited copy of a member (20 corresponding lines) clippy_lints/src/empty_with_brackets.rs:292— clippy_lints/src/empty_with_brackets.rs:292-314 | clippy_lints/src/empty_with_brackets.rs:316-335 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) clippy_utils/src/consts.rs:310— clippy_utils/src/consts.rs:310-329 | clippy_utils/src/consts.rs:363-382 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) clippy_lints/src/pathbuf_init_then_push.rs:153— clippy_lints/src/pathbuf_init_then_push.rs:153-172 | clippy_lints/src/vec_init_then_push.rs:177-198 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) clippy_config/src/types.rs:103— clippy_config/src/types.rs:103-122 | clippy_config/src/types.rs:336-362 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) clippy_lints/src/lifetimes.rs:720— clippy_lints/src/lifetimes.rs:720-742 | clippy_lints/src/lifetimes.rs:744-763 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) clippy_lints_internal/src/collapsible_span_lint_calls.rs:216— clippy_lints_internal/src/collapsible_span_lint_calls.rs:216-235 | clippy_lints_internal/src/collapsible_span_lint_calls.rs:244-263 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×6
Edited copy of a member (15 corresponding lines) clippy_utils/src/mir/possible_borrower.rs:43— clippy_utils/src/mir/possible_borrower.rs:43-63 | clippy_utils/src/mir/possible_origin.rs:25-39 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) clippy_utils/src/str_utils.rs:213— clippy_utils/src/str_utils.rs:213-227 | clippy_utils/src/str_utils.rs:239-258 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) clippy_lints/src/extra_unused_type_parameters.rs:258— clippy_lints/src/extra_unused_type_parameters.rs:258-274 | clippy_lints/src/extra_unused_type_parameters.rs:276-290 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) clippy_lints/src/operators/arithmetic_side_effects.rs:295— clippy_lints/src/operators/arithmetic_side_effects.rs:295-309 | clippy_lints/src/operators/numeric_arithmetic.rs:70-87 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) clippy_lints/src/bit_width.rs:146— clippy_lints/src/bit_width.rs:146-160 | clippy_lints/src/bit_width.rs:162-184 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) clippy_utils/src/higher.rs:306— clippy_utils/src/higher.rs:306-320 | clippy_utils/src/higher.rs:324-341 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (11 lines × 2) clippy_config/src/types.rs:162— clippy_config/src/types.rs:162-172 | clippy_config/src/types.rs:197-207 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_config/src/types.rs:162` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) clippy_lints/src/methods/mod.rs:5616— clippy_lints/src/methods/mod.rs:5616-5626 | clippy_lints/src/methods/mod.rs:5634-5644 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) clippy_lints/src/mut_mut.rs:59— clippy_lints/src/mut_mut.rs:59-69 | clippy_lints/src/mut_mut.rs:115-125 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/mut_mut.rs:59` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) clippy_lints/src/unconditional_recursion.rs:133— clippy_lints/src/unconditional_recursion.rs:133-143 | clippy_lints/src/unconditional_recursion.rs:238-248 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/unconditional_recursion.rs:133` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (11 lines × 2) clippy_lints/src/operators/op_ref.rs:113— clippy_lints/src/operators/op_ref.rs:113-123 | clippy_lints/src/operators/op_ref.rs:146-156 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) clippy_lints/src/arbitrary_source_item_ordering.rs:204— clippy_lints/src/arbitrary_source_item_ordering.rs:204-214 | clippy_lints/src/arbitrary_source_item_ordering.rs:267-277 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/arbitrary_source_item_ordering.rs:204` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `before_item` to `ImplItemId` in one and `TraitItemId` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×5
Edited copy of a member (11 corresponding lines) clippy_lints/src/functions/result.rs:54— clippy_lints/src/functions/result.rs:54-64 | clippy_lints/src/functions/result.rs:72-84 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) clippy_dev/src/utils.rs:623— clippy_dev/src/utils.rs:623-633 | clippy_dev/src/utils.rs:636-646 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) clippy_lints/src/loops/manual_memcpy.rs:262— clippy_lints/src/loops/manual_memcpy.rs:262-272 | clippy_lints/src/loops/manual_memcpy.rs:288-298 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) clippy_utils/src/lib.rs:2258— clippy_utils/src/lib.rs:2258-2268 | clippy_utils/src/lib.rs:2284-2294 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) clippy_lints/src/methods/range_zip_with_len.rs:69— clippy_lints/src/methods/range_zip_with_len.rs:69-80 | clippy_utils/src/lib.rs:1198-1208 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×5
Edited copy of a member (14 corresponding lines) clippy_dev/src/edit_lints.rs:226— clippy_dev/src/edit_lints.rs:226-240 | clippy_dev/src/edit_lints.rs:242-255 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) clippy_lints/src/returns/let_and_return.rs:70— clippy_lints/src/returns/let_and_return.rs:70-89 | clippy_utils/src/lib.rs:3433-3446 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) clippy_lints/src/matches/needless_match.rs:17— clippy_lints/src/matches/needless_match.rs:17-30 | clippy_lints/src/matches/needless_match.rs:51-67 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) clippy_lints/src/non_expressive_names.rs:401— clippy_lints/src/non_expressive_names.rs:401-414 | clippy_lints/src/non_expressive_names.rs:416-429 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) clippy_lints/src/implicit_return.rs:45— clippy_lints/src/implicit_return.rs:45-58 | clippy_lints/src/implicit_return.rs:60-78 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (14 lines × 2) clippy_lints/src/doc/include_in_doc_without_cfg.rs:14— clippy_lints/src/doc/include_in_doc_without_cfg.rs:14-27 | clippy_lints/src/large_include_file.rs:94-107 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (14 lines × 2) clippy_lints/src/methods/ptr_offset_by_literal.rs:20— clippy_lints/src/methods/ptr_offset_by_literal.rs:20-33 | clippy_lints/src/methods/ptr_offset_with_cast.rs:21-34 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/methods/ptr_offset_by_literal.rs:20` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (14 lines × 2) clippy_lints/src/floating_point_arithmetic/custom_abs.rs:19— clippy_lints/src/floating_point_arithmetic/custom_abs.rs:19-32 | clippy_lints/src/floating_point_arithmetic/custom_abs.rs:36-49 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (14 lines × 2) clippy_lints/src/matches/redundant_pattern_match.rs:516— clippy_lints/src/matches/redundant_pattern_match.rs:516-529 | clippy_lints/src/matches/redundant_pattern_match.rs:542-555 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/matches/redundant_pattern_match.rs:516` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) clippy_lints_internal/src/collapsible_span_lint_calls.rs:217— clippy_lints_internal/src/collapsible_span_lint_calls.rs:217-231 | clippy_lints_internal/src/collapsible_span_lint_calls.rs:245-258 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints_internal/src/collapsible_span_lint_calls.rs:217` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
HirEqInterExpr::eq_expr (cyclomatic 69) clippy_utils/src/hir_utils.rs:504— HirEqInterExpr::eq_expr has cyclomatic complexity 69 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
HirEqInterExpr::eq_block (cyclomatic 23) clippy_utils/src/hir_utils.rs:394— HirEqInterExpr::eq_block has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HirEqInterExpr::eq_pat (cyclomatic 18) clippy_utils/src/hir_utils.rs:796— HirEqInterExpr::eq_pat has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: clippy_utils::hir_utils::has_ambiguous_literal_in_expr (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
HirEqInterExpr::check_ctxt (cyclomatic 17) clippy_utils/src/hir_utils.rs:929— HirEqInterExpr::check_ctxt has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: clippy_utils::hir_utils::has_ambiguous_literal_in_expr (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
HackComment tests/ui/auxiliary/proc_macro_attr.rs:131— // HACK: Syn uses `Span` from the proc_macro2 crate, and does not seem to reexport it. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment clippy_utils/src/qualify_min_const_fn.rs:404— // HACK: This is to "unstabilize" the `transmute` intrinsic — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment clippy_lints/src/eta_reduction.rs:185— // HACK: Given a closure in `T.method(|| f())`, where `fn f() -> U where U: 'static`, `T.method(f)` — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment clippy_lints/src/unused_trait_names.rs:90— // HACK: `ident.span` points at either the final segment of the import path, — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×4
Edited copy of a member (25 corresponding lines) clippy_lints/src/operators/assign_op_pattern.rs:130— clippy_lints/src/operators/assign_op_pattern.rs:130-154 | clippy_lints/src/operators/assign_op_pattern.rs:156-180 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) clippy_lints/src/reserve_after_initialization.rs:72— clippy_lints/src/reserve_after_initialization.rs:72-97 | clippy_lints/src/reserve_after_initialization.rs:99-123 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) clippy_lints/src/casts/needless_type_cast.rs:60— clippy_lints/src/casts/needless_type_cast.rs:60-84 | clippy_lints/src/casts/needless_type_cast.rs:90-115 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) clippy_lints/src/casts/cast_sign_loss.rs:290— clippy_lints/src/casts/cast_sign_loss.rs:290-329 | clippy_lints/src/casts/cast_sign_loss.rs:339-363 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×4
Edited copy of a member (9 corresponding lines) clippy_lints/src/operators/manual_isolate_lowest_one.rs:149— clippy_lints/src/operators/manual_isolate_lowest_one.rs:149-157 | clippy_lints/src/operators/manual_isolate_lowest_one.rs:159-167 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) clippy_lints/src/methods/map_unwrap_or.rs:162— clippy_lints/src/methods/map_unwrap_or.rs:162-170 | clippy_lints/src/option_if_let_else.rs:270-278 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) clippy_lints/src/methods/or_then_unwrap.rs:64— clippy_lints/src/methods/or_then_unwrap.rs:64-72 | clippy_utils/src/lib.rs:306-314 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) clippy_lints/src/loops/explicit_into_iter_loop.rs:34— clippy_lints/src/loops/explicit_into_iter_loop.rs:34-42 | clippy_lints/src/loops/explicit_iter_loop.rs:92-101 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×4
Edited copy of a member (7 corresponding lines) clippy_utils/src/sugg.rs:47— clippy_utils/src/sugg.rs:47-53 | clippy_utils/src/sugg.rs:395-401 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) clippy_lints/src/min_ident_chars.rs:97— clippy_lints/src/min_ident_chars.rs:97-106 | clippy_lints/src/min_ident_chars.rs:108-114 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) clippy_lints/src/derivable_impls.rs:71— clippy_lints/src/derivable_impls.rs:71-77 | clippy_utils/src/hir_utils.rs:1729-1735 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) clippy_lints/src/casts/cast_possible_truncation.rs:17— clippy_lints/src/casts/cast_possible_truncation.rs:17-23 | clippy_utils/src/consts.rs:1226-1232 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
SpanlessHash::hash_expr (cyclomatic 59) clippy_utils/src/hir_utils.rs:1181— SpanlessHash::hash_expr has cyclomatic complexity 59 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
SpanlessHash::hash_pat (cyclomatic 24) clippy_utils/src/hir_utils.rs:1461— SpanlessHash::hash_pat has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
SpanlessHash::hash_tykind (cyclomatic 17) clippy_utils/src/hir_utils.rs:1601— SpanlessHash::hash_tykind has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: clippy_utils::hir_utils::has_ambiguous_literal_in_expr (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
clippy_dev::main (cyclomatic 26) clippy_dev/src/main.rs:11— clippy_dev::main has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
clippy_dev::fmt::fmt_conf (cyclomatic 22) clippy_dev/src/fmt.rs:66— clippy_dev::fmt::fmt_conf has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
clippy_dev::edit_lints::rename_update_fn (cyclomatic 20) clippy_dev/src/edit_lints.rs:375— clippy_dev::edit_lints::rename_update_fn has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HirEqInterExpr::eq_expr (cognitive 37) clippy_utils/src/hir_utils.rs:504— HirEqInterExpr::eq_expr has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 29, if/else 2 (4 pts), match/switch 3 (4 pts) (nesting depth added 3). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
HirEqInterExpr::check_ctxt (cognitive 29) clippy_utils/src/hir_utils.rs:929— HirEqInterExpr::check_ctxt has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 7, loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HirEqInterExpr::eq_block (cognitive 27) clippy_utils/src/hir_utils.rs:394— HirEqInterExpr::eq_block has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 5, match/switch 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clippy_config::de::create_value_list_msg (cognitive 32) clippy_config/src/de.rs:69— clippy_config::de::create_value_list_msg has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 3 (9 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clippy_config::conf::load_conf_file (cognitive 26) clippy_config/src/conf.rs:889— clippy_config::conf::load_conf_file has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (17 pts), match/switch 2 (6 pts), loops 2 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clippy_config::types::create_disallowed_map (cognitive 18) clippy_config/src/types.rs:233— clippy_config::types::create_disallowed_map has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clippy_dev::edit_lints::rename_update_fn (cognitive 32) clippy_dev/src/edit_lints.rs:375— clippy_dev::edit_lints::rename_update_fn has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (21 pts), boolean chains 5, match/switch 2 (5 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clippy_dev::main (cognitive 24) clippy_dev/src/main.rs:11— clippy_dev::main has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 6 (11 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clippy_dev::deprecate_lint::remove_lint_declaration (cognitive 17) clippy_dev/src/deprecate_lint.rs:116— clippy_dev::deprecate_lint::remove_lint_declaration has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 6). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 2 function items inside it that branch (remove_impl_lint_pass, remove_test_assets). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D4 · Code Duplication· Edited copy of a member (34 corresponding lines) · ×3
Edited copy of a member (34 corresponding lines) clippy_lints/src/manual_retain.rs:123— clippy_lints/src/manual_retain.rs:123-173 | clippy_lints/src/manual_retain.rs:181-214 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (34 corresponding lines) clippy_lints/src/non_copy_const.rs:715— clippy_lints/src/non_copy_const.rs:715-755 | clippy_lints/src/non_copy_const.rs:757-790 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (34 corresponding lines) clippy_lints/src/semicolon_block.rs:83— clippy_lints/src/semicolon_block.rs:83-117 | clippy_lints/src/semicolon_block.rs:119-152 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (35 corresponding lines) · ×3
Edited copy of a member (35 corresponding lines) clippy_lints/src/functions/must_use.rs:64— clippy_lints/src/functions/must_use.rs:64-98 | clippy_lints/src/functions/must_use.rs:100-138 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (35 corresponding lines) clippy_lints/src/derive/derive_ord_xor_partial_ord.rs:18— clippy_lints/src/derive/derive_ord_xor_partial_ord.rs:18-54 | clippy_lints/src/derive/derived_hash_with_manual_eq.rs:17-51 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (35 corresponding lines) clippy_lints/src/manual_clamp.rs:264— clippy_lints/src/manual_clamp.rs:264-298 | clippy_lints/src/manual_clamp.rs:564-601 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (30 corresponding lines) · ×3
Edited copy of a member (30 corresponding lines) clippy_utils/src/ty/mod.rs:1233— clippy_utils/src/ty/mod.rs:1233-1262 | clippy_utils/src/ty/mod.rs:1396-1427 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (30 corresponding lines) clippy_lints/src/undocumented_unsafe_blocks.rs:699— clippy_lints/src/undocumented_unsafe_blocks.rs:699-728 | clippy_lints/src/undocumented_unsafe_blocks.rs:763-795 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (30 corresponding lines) clippy_lints/src/matches/manual_filter.rs:204— clippy_lints/src/matches/manual_filter.rs:204-233 | clippy_lints/src/matches/manual_map.rs:44-75 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×3
Edited copy of a member (13 corresponding lines) clippy_utils/src/ty/mod.rs:698— clippy_utils/src/ty/mod.rs:698-710 | clippy_utils/src/ty/mod.rs:715-733 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) clippy_utils/src/lib.rs:271— clippy_utils/src/lib.rs:271-283 | clippy_utils/src/lib.rs:286-298 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) clippy_lints/src/arbitrary_source_item_ordering.rs:202— clippy_lints/src/arbitrary_source_item_ordering.rs:202-214 | clippy_lints/src/arbitrary_source_item_ordering.rs:265-277 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×3
Edited copy of a member (12 corresponding lines) clippy_lints/src/methods/map_unwrap_or.rs:186— clippy_lints/src/methods/map_unwrap_or.rs:186-201 | clippy_lints/src/option_if_let_else.rs:295-306 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) clippy_lints_internal/src/repeated_is_diagnostic_item.rs:507— clippy_lints_internal/src/repeated_is_diagnostic_item.rs:507-518 | clippy_lints_internal/src/repeated_is_diagnostic_item.rs:523-537 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) clippy_lints/src/question_mark.rs:348— clippy_lints/src/question_mark.rs:348-359 | clippy_utils/src/lib.rs:357-368 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×3
Edited copy of a member (16 corresponding lines) clippy_lints/src/missing_doc.rs:247— clippy_lints/src/missing_doc.rs:247-264 | clippy_lints/src/missing_doc.rs:266-281 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) clippy_dev/src/parse/cursor.rs:293— clippy_dev/src/parse/cursor.rs:293-308 | clippy_dev/src/parse/cursor.rs:313-328 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) clippy_lints/src/methods/manual_saturating_arithmetic.rs:21— clippy_lints/src/methods/manual_saturating_arithmetic.rs:21-36 | clippy_lints/src/methods/manual_saturating_arithmetic.rs:43-58 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×3
Edited copy of a member (6 corresponding lines) clippy_lints/src/await_holding_invalid.rs:294— clippy_lints/src/await_holding_invalid.rs:294-299 | clippy_lints/src/entry.rs:762-767 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) clippy_lints/src/methods/unnecessary_to_owned.rs:723— clippy_lints/src/methods/unnecessary_to_owned.rs:723-735 | clippy_utils/src/ty/mod.rs:1509-1514 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) clippy_lints/src/methods/err_expect.rs:39— clippy_lints/src/methods/err_expect.rs:39-44 | clippy_lints/src/methods/ok_expect.rs:38-43 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (3 corresponding lines) · ×3
Edited copy of a member (3 corresponding lines) clippy_lints/src/methods/single_char_add_str.rs:74— clippy_lints/src/methods/single_char_add_str.rs:74-76 | clippy_lints/src/useless_vec.rs:306-308 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) clippy_lints/src/manual_checked_ops.rs:169— clippy_lints/src/manual_checked_ops.rs:169-171 | clippy_lints/src/operators/float_cmp.rs:181-183 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) clippy_lints/src/eta_reduction.rs:384— clippy_lints/src/eta_reduction.rs:384-387 | clippy_lints/src/methods/unnecessary_to_owned.rs:670-672 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (19 lines × 2) clippy_dev/src/deprecate_lint.rs:38— clippy_dev/src/deprecate_lint.rs:38-56 | clippy_dev/src/deprecate_lint.rs:90-108 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_dev/src/deprecate_lint.rs:38` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (19 lines × 2) clippy_utils/src/ast_utils/mod.rs:313— clippy_utils/src/ast_utils/mod.rs:313-331 | clippy_utils/src/ast_utils/mod.rs:517-535 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_utils/src/ast_utils/mod.rs:313` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `clippy_utils/src/ast_utils/mod.rs:311` calls `ExternCrate`, `eq_id`, `Use` and `clippy_utils/src/ast_utils/mod.rs:516` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (19 lines × 2) clippy_utils/src/ast_utils/mod.rs:576— clippy_utils/src/ast_utils/mod.rs:576-594 | clippy_utils/src/ast_utils/mod.rs:662-680 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_utils/src/ast_utils/mod.rs:576` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) clippy_lints/src/casts/cast_possible_wrap.rs:99— clippy_lints/src/casts/cast_possible_wrap.rs:99-115 | clippy_lints/src/casts/cast_sign_loss.rs:57-73 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (17 lines × 2) clippy_lints/src/disallowed_items.rs:318— clippy_lints/src/disallowed_items.rs:318-334 | clippy_lints/src/disallowed_items.rs:341-357 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/disallowed_items.rs:318` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) clippy_lints/src/needless_continue.rs:493— clippy_lints/src/needless_continue.rs:493-509 | clippy_lints/src/needless_continue.rs:527-543 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/needless_continue.rs:493` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) clippy_lints/src/casts/ptr_as_ptr.rs:47— clippy_lints/src/casts/ptr_as_ptr.rs:47-61 | clippy_lints/src/casts/ref_as_ptr.rs:42-56 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (15 lines × 2) clippy_lints_internal/src/repeated_is_diagnostic_item.rs:422— clippy_lints_internal/src/repeated_is_diagnostic_item.rs:422-436 | clippy_lints_internal/src/repeated_is_diagnostic_item.rs:475-489 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints_internal/src/repeated_is_diagnostic_item.rs:422` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) clippy_lints/src/doc/mod.rs:1186— clippy_lints/src/doc/mod.rs:1186-1200 | clippy_lints/src/doc/mod.rs:1230-1244 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) clippy_lints/src/implicit_saturating_sub.rs:363— clippy_lints/src/implicit_saturating_sub.rs:363-374 | clippy_lints/src/implicit_saturating_sub.rs:378-389 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/implicit_saturating_sub.rs:363` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) clippy_lints/src/matches/match_like_matches.rs:41— clippy_lints/src/matches/match_like_matches.rs:41-52 | clippy_lints/src/matches/match_like_matches.rs:173-184 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/matches/match_like_matches.rs:41` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) clippy_lints/src/types/mod.rs:619— clippy_lints/src/types/mod.rs:619-630 | clippy_lints/src/types/mod.rs:633-644 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/types/mod.rs:619` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Off the main sequence: declare_clippy_lint — declare_clippy_lint: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Off the main sequence: rustc_tools_util — rustc_tools_util: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: clippy_utils — clippy_utils: abstractness 0.27, instability 0.00, distance 0.73 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
ConstEvalCtxt::binop (cyclomatic 70) clippy_utils/src/consts.rs:1026— ConstEvalCtxt::binop has cyclomatic complexity 70 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ConstEvalCtxt::expr (cyclomatic 29) clippy_utils/src/consts.rs:667— ConstEvalCtxt::expr has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Dereferencing::check_expr (cyclomatic 60) clippy_lints/src/dereference.rs:242— Dereferencing::check_expr has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Dereferencing::report (cyclomatic 40) clippy_lints/src/dereference.rs:1098— Dereferencing::report has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PrintVisitor::expr (cyclomatic 46) clippy_lints/src/utils/author.rs:435— PrintVisitor::expr has cyclomatic complexity 46 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
PrintVisitor::lit (cyclomatic 25) clippy_lints/src/utils/author.rs:349— PrintVisitor::lit has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ArbitrarySourceItemOrdering::check_item (cyclomatic 23) clippy_lints/src/arbitrary_source_item_ordering.rs:396— ArbitrarySourceItemOrdering::check_item has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ArbitrarySourceItemOrdering::check_mod (cyclomatic 18) clippy_lints/src/arbitrary_source_item_ordering.rs:489— ArbitrarySourceItemOrdering::check_mod has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
VarVisitor::visit_expr (cyclomatic 23) clippy_lints/src/loops/needless_range_loop.rs:369— VarVisitor::visit_expr has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
VarVisitor::check (cyclomatic 16) clippy_lints/src/loops/needless_range_loop.rs:260— VarVisitor::check has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ExprEagernessVisitor::visit_expr (cyclomatic 23) clippy_utils/src/eager_or_lazy.rs:261— ExprEagernessVisitor::visit_expr has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ExprEagernessVisitor::visit_binary (cyclomatic 20) clippy_utils/src/eager_or_lazy.rs:165— ExprEagernessVisitor::visit_binary has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
XxxComment clippy_lints/src/len_without_is_empty.rs:281— // XXX: we might want to relax this to allow `&self` and `&mut self` — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
XxxComment clippy_lints/src/unnecessary_self_imports.rs:121— // XXX: rewrite as a generator returning `SelfImport`s, if those ever get stabilized — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
Dereferencing::check_expr (cognitive 91) clippy_lints/src/dereference.rs:242— Dereferencing::check_expr has cognitive complexity 91 (threshold 15). Drivers by points: if/else 32 (61 pts), boolean chains 17, match/switch 4 (10 pts), loops 1 (3 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Dereferencing::report (cognitive 66) clippy_lints/src/dereference.rs:1098— Dereferencing::report has cognitive complexity 66 (threshold 15). Drivers by points: if/else 23 (40 pts), boolean chains 13, match/switch 6 (13 pts) (nesting depth added 24). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SpanlessHash::hash_expr (cognitive 47) clippy_utils/src/hir_utils.rs:1181— SpanlessHash::hash_expr has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (30 pts), loops 5 (10 pts), match/switch 3 (7 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SpanlessHash::hash_pat (cognitive 23) clippy_utils/src/hir_utils.rs:1461— SpanlessHash::hash_pat has cognitive complexity 23 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 5 (10 pts), match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ArbitrarySourceItemOrdering::check_item (cognitive 37) clippy_lints/src/arbitrary_source_item_ordering.rs:396— ArbitrarySourceItemOrdering::check_item has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 3 (6 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArbitrarySourceItemOrdering::check_mod (cognitive 32) clippy_lints/src/arbitrary_source_item_ordering.rs:489— ArbitrarySourceItemOrdering::check_mod has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 3, match/switch 1 (3 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NonCopyConst::is_non_freeze_val_borrowed (cognitive 34) clippy_lints/src/non_copy_const.rs:487— NonCopyConst::is_non_freeze_val_borrowed has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 2 (5 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NonCopyConst::is_non_freeze_init_borrowed (cognitive 33) clippy_lints/src/non_copy_const.rs:568— NonCopyConst::is_non_freeze_init_borrowed has cognitive complexity 33 (threshold 15). Drivers by points: match/switch 5 (15 pts), if/else 5 (11 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 17). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
NeedlessLateInit::check_if_or_match (cognitive 30) clippy_lints/src/needless_late_init.rs:81— NeedlessLateInit::check_if_or_match has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (25 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NeedlessLateInit::check_block_post (cognitive 26) clippy_lints/src/needless_late_init.rs:446— NeedlessLateInit::check_block_post has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 3 (8 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExprEagernessVisitor::visit_binary (cognitive 28) clippy_utils/src/eager_or_lazy.rs:165— ExprEagernessVisitor::visit_binary has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 5 (8 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExprEagernessVisitor::visit_expr (cognitive 18) clippy_utils/src/eager_or_lazy.rs:261— ExprEagernessVisitor::visit_expr has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 3 (6 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VarVisitor::visit_expr (cognitive 27) clippy_lints/src/loops/needless_range_loop.rs:369— VarVisitor::visit_expr has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 8, loops 2 (4 pts), match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VarVisitor::check (cognitive 25) clippy_lints/src/loops/needless_range_loop.rs:260— VarVisitor::check has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (20 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NeedlessPassByRefMut::check_fn (cognitive 22) clippy_lints/src/needless_pass_by_ref_mut.rs:123— NeedlessPassByRefMut::check_fn has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, loops 2 (3 pts), match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NeedlessPassByRefMut::check_crate_post (cognitive 18) clippy_lints/src/needless_pass_by_ref_mut.rs:258— NeedlessPassByRefMut::check_crate_post has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (15 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SimilarNamesNameVisitor::check_ident (cognitive 22) clippy_lints/src/non_expressive_names.rs:222— SimilarNamesNameVisitor::check_ident has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 5, match/switch 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SimilarNamesNameVisitor::equal_length_strs_not_similar (cognitive 17) clippy_lints/src/non_expressive_names.rs:298— SimilarNamesNameVisitor::equal_length_strs_not_similar has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ItemNameRepetitions::check_name_repetition (cognitive 20) clippy_lints/src/item_name_repetitions.rs:482— ItemNameRepetitions::check_name_repetition has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 5 (nesting depth added 8). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ItemNameRepetitions::check_struct_name_repetition (cognitive 16) clippy_lints/src/item_name_repetitions.rs:424— ItemNameRepetitions::check_struct_name_repetition has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConstEvalCtxt::binop (cognitive 20) clippy_utils/src/consts.rs:1026— ConstEvalCtxt::binop has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 7 (14 pts), boolean chains 3, if/else 1 (3 pts) (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ConstEvalCtxt::expr (cognitive 18) clippy_utils/src/consts.rs:667— ConstEvalCtxt::expr has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 5 (9 pts), if/else 4 (7 pts), boolean chains 2 (nesting depth added 7). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
lintcheck::lintcheck (cognitive 20) lintcheck/src/main.rs:316— lintcheck::lintcheck has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (15 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
lintcheck::json::diff (cognitive 18) lintcheck/src/json.rs:126— lintcheck::json::diff has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3 (4 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Edited copy of a member (36 corresponding lines) · ×2
Edited copy of a member (36 corresponding lines) clippy_utils/src/ty/mod.rs:837— clippy_utils/src/ty/mod.rs:837-872 | clippy_utils/src/ty/mod.rs:874-913 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (36 corresponding lines) clippy_lints/src/doc/include_in_doc_without_cfg.rs:9— clippy_lints/src/doc/include_in_doc_without_cfg.rs:9-44 | clippy_lints/src/large_include_file.rs:87-125 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×2
Edited copy of a member (26 corresponding lines) clippy_lints/src/non_std_lazy_statics.rs:261— clippy_lints/src/non_std_lazy_statics.rs:261-286 | clippy_utils/src/lib.rs:2124-2151 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) clippy_lints/src/casts/cast_sign_loss.rs:218— clippy_lints/src/casts/cast_sign_loss.rs:218-243 | clippy_lints/src/casts/cast_sign_loss.rs:249-278 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×2
Edited copy of a member (8 corresponding lines) clippy_utils/src/ty/type_certainty/certainty.rs:46— clippy_utils/src/ty/type_certainty/certainty.rs:46-53 | clippy_utils/src/ty/type_certainty/certainty.rs:60-77 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) clippy_lints/src/single_component_path_imports.rs:104— clippy_lints/src/single_component_path_imports.rs:104-112 | clippy_lints/src/single_component_path_imports.rs:114-121 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (5 corresponding lines) · ×2
Edited copy of a member (5 corresponding lines) clippy_lints/src/empty_line_after.rs:544— clippy_lints/src/empty_line_after.rs:544-548 | clippy_lints/src/empty_line_after.rs:550-554 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) clippy_lints/src/incompatible_msrv.rs:270— clippy_lints/src/incompatible_msrv.rs:270-274 | clippy_lints/src/methods/is_empty.rs:41-45 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (17–18 lines × 2) clippy_lints/src/loops/while_let_on_iterator.rs:213— clippy_lints/src/loops/while_let_on_iterator.rs:213-230 | clippy_lints/src/loops/while_let_on_iterator.rs:254-270 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (17–18 lines × 2) clippy_lints/src/undocumented_unsafe_blocks.rs:257— clippy_lints/src/undocumented_unsafe_blocks.rs:257-274 | clippy_lints/src/undocumented_unsafe_blocks.rs:280-296 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/undocumented_unsafe_blocks.rs:257` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–13 lines × 2) clippy_lints/src/equatable_if_let.rs:78— clippy_lints/src/equatable_if_let.rs:78-90 | clippy_lints/src/pattern_type_mismatch.rs:176-185 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/equatable_if_let.rs:78` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–13 lines × 2) clippy_lints/src/methods/option_zip_none.rs:61— clippy_lints/src/methods/option_zip_none.rs:61-70 | clippy_lints/src/methods/option_zip_none.rs:75-87 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/methods/option_zip_none.rs:61` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–10 lines × 2) clippy_lints/src/doc/markdown.rs:133— clippy_lints/src/doc/markdown.rs:133-141 | clippy_lints/src/doc/markdown.rs:163-172 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9–10 lines × 2) clippy_lints/src/non_copy_const.rs:768— clippy_lints/src/non_copy_const.rs:768-777 | clippy_lints/src/non_copy_const.rs:829-837 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/non_copy_const.rs:768` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `item` to `&'tcx TraitItem<'_>` in one and `&'tcx ImplItem<'_>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Methods::check_methods (cyclomatic 191) clippy_lints/src/methods/mod.rs:5437— Methods::check_methods has cyclomatic complexity 191 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
UselessConversion::check_expr (cyclomatic 44) clippy_lints/src/useless_conversion.rs:160— UselessConversion::check_expr has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NormalizedPat::from_pat (cyclomatic 37) clippy_lints/src/matches/match_same_arms.rs:263— NormalizedPat::from_pat has cyclomatic complexity 37 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Matches::check_expr (cyclomatic 33) clippy_lints/src/matches/mod.rs:1055— Matches::check_expr has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
IndexingSlicing::check_expr (cyclomatic 27) clippy_lints/src/indexing_slicing.rs:111— IndexingSlicing::check_expr has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TupleArrayConversions::check_expr (cyclomatic 26) clippy_lints/src/tuple_array_conversions.rs:64— TupleArrayConversions::check_expr has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
Types::check_ty (cyclomatic 26) clippy_lints/src/types/mod.rs:575— Types::check_ty has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
IterFunctionVisitor::visit_expr (cyclomatic 25) clippy_lints/src/methods/needless_collect.rs:516— IterFunctionVisitor::visit_expr has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NonCopyConst::is_non_freeze_init_borrowed (cyclomatic 24) clippy_lints/src/non_copy_const.rs:568— NonCopyConst::is_non_freeze_init_borrowed has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
DerefDelegate::borrow (cyclomatic 24) clippy_utils/src/sugg.rs:937— DerefDelegate::borrow has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MissingConstForFn::check_fn (cyclomatic 23) clippy_lints/src/missing_const_for_fn.rs:89— MissingConstForFn::check_fn has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PatState::add_pat (cyclomatic 22) clippy_lints/src/matches/single_match.rs:355— PatState::add_pat has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Hir2Qmm::run (cyclomatic 21) clippy_lints/src/booleans.rs:261— Hir2Qmm::run has cyclomatic complexity 21 (threshold 15). Of this number, 15 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
PeekableVisitor::visit_expr (cyclomatic 21) clippy_lints/src/unused_peekable.rs:118— PeekableVisitor::visit_expr has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
clippy::driver::main (cyclomatic 21) src/driver.rs:196— clippy::driver::main has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
NumericFallbackVisitor::visit_expr (cyclomatic 20) clippy_lints/src/default_numeric_fallback.rs:128— NumericFallbackVisitor::visit_expr has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FloatLiteral::check_expr (cyclomatic 20) clippy_lints/src/float_literal.rs:78— FloatLiteral::check_expr has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
OnlyUsedInRecursion::check_expr (cyclomatic 20) clippy_lints/src/only_used_in_recursion.rs:367— OnlyUsedInRecursion::check_expr has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
PassByRefOrValue::check_poly_fn (cyclomatic 20) clippy_lints/src/pass_by_ref_or_value.rs:128— PassByRefOrValue::check_poly_fn has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SingleComponentPathImports::track_uses (cyclomatic 20) clippy_lints/src/single_component_path_imports.rs:171— SingleComponentPathImports::track_uses has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
VecPushSearcher::display_err (cyclomatic 20) clippy_lints/src/vec_init_then_push.rs:64— VecPushSearcher::display_err has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
WaitFinder::visit_expr (cyclomatic 20) clippy_lints/src/zombie_processes.rs:161— WaitFinder::visit_expr has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NeedlessPassByRefMut::check_fn (cyclomatic 19) clippy_lints/src/needless_pass_by_ref_mut.rs:123— NeedlessPassByRefMut::check_fn has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PostExpansionEarlyAttributes::check_attribute (cyclomatic 18) clippy_lints/src/attrs/mod.rs:663— PostExpansionEarlyAttributes::check_attribute has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Default::check_block (cyclomatic 18) clippy_lints/src/default.rs:111— Default::check_block has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
InsertSearcher::visit_expr (cyclomatic 18) clippy_lints/src/entry.rs:491— InsertSearcher::visit_expr has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
UselessFormat::check_expr (cyclomatic 18) clippy_lints/src/format.rs:55— UselessFormat::check_expr has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Loops::check_expr (cyclomatic 18) clippy_lints/src/loops/mod.rs:859— Loops::check_expr has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
InitializeVisitor::visit_expr (cyclomatic 18) clippy_lints/src/loops/utils.rs:173— InitializeVisitor::visit_expr has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ManualOptionAsSlice::check_expr (cyclomatic 18) clippy_lints/src/manual_option_as_slice.rs:55— ManualOptionAsSlice::check_expr has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
OffendingFilterExpr::check_map_call (cyclomatic 18) clippy_lints/src/methods/filter_map.rs:109— OffendingFilterExpr::check_map_call has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
NewWithoutDefault::check_item (cyclomatic 18) clippy_lints/src/new_without_default.rs:61— NewWithoutDefault::check_item has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SimilarNamesNameVisitor::check_ident (cyclomatic 18) clippy_lints/src/non_expressive_names.rs:222— SimilarNamesNameVisitor::check_ident has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Args::parse (cyclomatic 18) src/main.rs:82— Args::parse has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
NonminimalBoolVisitor::bool_expr (cyclomatic 17) clippy_lints/src/booleans.rs:537— NonminimalBoolVisitor::bool_expr has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Documentation::check_attributes (cyclomatic 17) clippy_lints/src/doc/mod.rs:759— Documentation::check_attributes has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
LenZero::check_expr (cyclomatic 17) clippy_lints/src/len_zero.rs:103— LenZero::check_expr has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
NeedlessLateInit::check_if_or_match (cyclomatic 17) clippy_lints/src/needless_late_init.rs:81— NeedlessLateInit::check_if_or_match has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Constant::partial_cmp (cyclomatic 17) clippy_utils/src/consts.rs:218— Constant::partial_cmp has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
LargeUnoptStackFrames::check_fn (cyclomatic 16) clippy_lints/src/large_unopt_stack_frames.rs:164— LargeUnoptStackFrames::check_fn has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NoEffect::check_no_effect (cyclomatic 16) clippy_lints/src/no_effect.rs:121— NoEffect::check_no_effect has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PanicUnimplemented::check_expr (cyclomatic 16) clippy_lints/src/panic_unimplemented.rs:107— PanicUnimplemented::check_expr has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
QuestionMark::check_manual_let_else (cyclomatic 16) clippy_lints/src/manual_let_else.rs:52— QuestionMark::check_manual_let_else has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
UnnecessaryWraps::check_fn (cyclomatic 16) clippy_lints/src/unnecessary_wraps.rs:77— UnnecessaryWraps::check_fn has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WildcardImports::check_use_tree (cyclomatic 16) clippy_lints/src/wildcard_imports.rs:140— WildcardImports::check_use_tree has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CrateWithSource::download_and_extract (cyclomatic 16) lintcheck/src/input.rs:182— CrateWithSource::download_and_extract has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Crate::run_clippy_lints (cyclomatic 16) lintcheck/src/main.rs:68— Crate::run_clippy_lints has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Methods::check_methods (cognitive 166) clippy_lints/src/methods/mod.rs:5437— Methods::check_methods has cognitive complexity 166 (threshold 15). Drivers by points: if/else 36 (101 pts), match/switch 19 (59 pts), boolean chains 6 (nesting depth added 105). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UselessConversion::check_expr (cognitive 83) clippy_lints/src/useless_conversion.rs:160— UselessConversion::check_expr has cognitive complexity 83 (threshold 15). Drivers by points: if/else 25 (63 pts), boolean chains 15, match/switch 2 (5 pts) (nesting depth added 41). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
IndexingSlicing::check_expr (cognitive 68) clippy_lints/src/indexing_slicing.rs:111— IndexingSlicing::check_expr has cognitive complexity 68 (threshold 15). Drivers by points: if/else 18 (58 pts), boolean chains 7, match/switch 1 (3 pts) (nesting depth added 42). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
DerefDelegate::borrow (cognitive 67) clippy_utils/src/sugg.rs:937— DerefDelegate::borrow has cognitive complexity 67 (threshold 15). Drivers by points: if/else 15 (47 pts), match/switch 3 (11 pts), loops 1 (5 pts), boolean chains 4 (nesting depth added 44). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Matches::check_expr (cognitive 63) clippy_lints/src/matches/mod.rs:1055— Matches::check_expr has cognitive complexity 63 (threshold 15). Drivers by points: if/else 22 (51 pts), boolean chains 8, loops 1 (2 pts), match/switch 1 (2 pts) (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
SingleComponentPathImports::track_uses (cognitive 49) clippy_lints/src/single_component_path_imports.rs:171— SingleComponentPathImports::track_uses has cognitive complexity 49 (threshold 15). Drivers by points: if/else 12 (38 pts), loops 2 (8 pts), boolean chains 2, match/switch 1 (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
NewWithoutDefault::check_item (cognitive 47) clippy_lints/src/new_without_default.rs:61— NewWithoutDefault::check_item has cognitive complexity 47 (threshold 15). Drivers by points: if/else 11 (32 pts), loops 4 (12 pts), boolean chains 3 (nesting depth added 29). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Default::check_block (cognitive 44) clippy_lints/src/default.rs:111— Default::check_block has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (35 pts), boolean chains 5, loops 2 (3 pts), match/switch 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IterFunctionVisitor::visit_expr (cognitive 43) clippy_lints/src/methods/needless_collect.rs:516— IterFunctionVisitor::visit_expr has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (29 pts), match/switch 2 (9 pts), boolean chains 5 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
InitializeVisitor::visit_expr (cognitive 39) clippy_lints/src/loops/utils.rs:173— InitializeVisitor::visit_expr has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (30 pts), match/switch 2 (8 pts), boolean chains 1 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Types::check_ty (cognitive 39) clippy_lints/src/types/mod.rs:575— Types::check_ty has cognitive complexity 39 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 4 (12 pts), match/switch 5 (9 pts), boolean chains 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StmtsChecker::visit_expr (cognitive 38) clippy_lints/src/significant_drop_tightening.rs:265— StmtsChecker::visit_expr has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (33 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PeekableVisitor::visit_expr (cognitive 38) clippy_lints/src/unused_peekable.rs:118— PeekableVisitor::visit_expr has cognitive complexity 38 (threshold 15). Drivers by points: if/else 7 (22 pts), match/switch 3 (11 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PassByRefOrValue::check_poly_fn (cognitive 37) clippy_lints/src/pass_by_ref_or_value.rs:128— PassByRefOrValue::check_poly_fn has cognitive complexity 37 (threshold 15). Drivers by points: if/else 7 (19 pts), match/switch 4 (11 pts), boolean chains 6, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NonminimalBoolVisitor::bool_expr (cognitive 36) clippy_lints/src/booleans.rs:537— NonminimalBoolVisitor::bool_expr has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 3 (7 pts), boolean chains 4, match/switch 1 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NumericFallbackVisitor::visit_expr (cognitive 36) clippy_lints/src/default_numeric_fallback.rs:128— NumericFallbackVisitor::visit_expr has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 4 (12 pts), boolean chains 2, match/switch 1 (nesting depth added 20). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
UselessFormat::check_expr (cognitive 35) clippy_lints/src/format.rs:55— UselessFormat::check_expr has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (22 pts), match/switch 3 (9 pts), boolean chains 4 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NormalizedPat::from_pat (cognitive 34) clippy_lints/src/matches/match_same_arms.rs:263— NormalizedPat::from_pat has cognitive complexity 34 (threshold 15). Drivers by points: match/switch 13 (29 pts), if/else 3 (5 pts) (nesting depth added 18). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
NoEffect::check_no_effect (cognitive 33) clippy_lints/src/no_effect.rs:121— NoEffect::check_no_effect has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (26 pts), boolean chains 4, loops 1 (3 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
WildcardImports::check_use_tree (cognitive 31) clippy_lints/src/wildcard_imports.rs:140— WildcardImports::check_use_tree has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 2, loops 1 (2 pts), match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MultipleInherentImpl::check_crate_post (cognitive 30) clippy_lints/src/inherent_impl.rs:71— MultipleInherentImpl::check_crate_post has cognitive complexity 30 (threshold 15). Drivers by points: if/else 4 (13 pts), match/switch 3 (11 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FloatLiteral::check_expr (cognitive 28) clippy_lints/src/float_literal.rs:78— FloatLiteral::check_expr has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 5, match/switch 2 (4 pts) (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
FormatArgsExpr::check_templates (cognitive 28) clippy_lints/src/format_args.rs:430— FormatArgsExpr::check_templates has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (19 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MacroUseImports::check_crate_post (cognitive 28) clippy_lints/src/macro_use.rs:136— MacroUseImports::check_crate_post has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TupleArrayConversions::check_expr (cognitive 28) clippy_lints/src/tuple_array_conversions.rs:64— TupleArrayConversions::check_expr has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 10, match/switch 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OffendingFilterExpr::check_map_call (cognitive 27) clippy_lints/src/methods/filter_map.rs:109— OffendingFilterExpr::check_map_call has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 4 (8 pts), boolean chains 7 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
WaitFinder::visit_expr (cognitive 27) clippy_lints/src/zombie_processes.rs:161— WaitFinder::visit_expr has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (18 pts), match/switch 3 (7 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
QuestionMark::check_manual_let_else (cognitive 26) clippy_lints/src/manual_let_else.rs:52— QuestionMark::check_manual_let_else has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SuggestContext::recurse (cognitive 25) clippy_lints/src/booleans.rs:337— SuggestContext::recurse has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 2 (4 pts), match/switch 2 (3 pts) (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
LargeUnoptStackFrames::check_fn (cognitive 25) clippy_lints/src/large_unopt_stack_frames.rs:164— LargeUnoptStackFrames::check_fn has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OnlyUsedInRecursion::check_expr (cognitive 25) clippy_lints/src/only_used_in_recursion.rs:367— OnlyUsedInRecursion::check_expr has cognitive complexity 25 (threshold 15). Drivers by points: if/else 3 (11 pts), match/switch 2 (7 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UnnecessaryWraps::check_fn (cognitive 25) clippy_lints/src/unnecessary_wraps.rs:77— UnnecessaryWraps::check_fn has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UselessVec::check_expr (cognitive 25) clippy_lints/src/useless_vec.rs:173— UselessVec::check_expr has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 2 (5 pts), boolean chains 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AlmostStandardFormulation::check_item (cognitive 25) clippy_lints_internal/src/almost_standard_lint_formulation.rs:49— AlmostStandardFormulation::check_item has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (8 pts), boolean chains 2 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Loops::check_expr (cognitive 24) clippy_lints/src/loops/mod.rs:859— Loops::check_expr has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MissingConstForFn::check_fn (cognitive 24) clippy_lints/src/missing_const_for_fn.rs:89— MissingConstForFn::check_fn has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 7, match/switch 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
LegacyNumericConstants::check_use_tree (cognitive 23) clippy_lints/src/legacy_numeric_constants.rs:47— LegacyNumericConstants::check_use_tree has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 3, loops 1 (2 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NonCanonicalImpls::check_item (cognitive 23) clippy_lints/src/non_canonical_impls.rs:150— NonCanonicalImpls::check_item has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, loops 1 (4 pts), match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NonSendFieldInSendTy::check_item (cognitive 23) clippy_lints/src/non_send_fields_in_send_ty.rs:72— NonSendFieldInSendTy::check_item has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (8 pts), match/switch 1 (4 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UnwrappableVariablesVisitor::visit_expr (cognitive 23) clippy_lints/src/unwrap.rs:429— UnwrappableVariablesVisitor::visit_expr has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DisallowedItems::check_pat (cognitive 22) clippy_lints/src/disallowed_items.rs:309— DisallowedItems::check_pat has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LargeEnumVariant::check_item (cognitive 22) clippy_lints/src/large_enum_variant.rs:75— LargeEnumVariant::check_item has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 2 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
CrateWithSource::download_and_extract (cognitive 22) lintcheck/src/input.rs:182— CrateWithSource::download_and_extract has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (3 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 10). Of this number, 19 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clippy::driver::main (cognitive 22) src/driver.rs:196— clippy::driver::main has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 10, if/else 9, match/switch 2 (3 pts) (nesting depth added 1). Of this number, 19 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
PostExpansionEarlyAttributes::check_attribute (cognitive 21) clippy_lints/src/attrs/mod.rs:663— PostExpansionEarlyAttributes::check_attribute has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 7, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Casts::check_expr (cognitive 21) clippy_lints/src/casts/mod.rs:890— Casts::check_expr has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InsertSearcher::visit_expr (cognitive 21) clippy_lints/src/entry.rs:491— InsertSearcher::visit_expr has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 1 (3 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ToDigitIsSome::check_expr (cognitive 21) clippy_lints/src/to_digit_is_some.rs:50— ToDigitIsSome::check_expr has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PossibleBorrowerVisitor::visit_terminator (cognitive 21) clippy_utils/src/mir/possible_borrower.rs:89— PossibleBorrowerVisitor::visit_terminator has cognitive complexity 21 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 4 (8 pts), match/switch 1 (3 pts) (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ManualStrip::check_expr (cognitive 20) clippy_lints/src/manual_strip.rs:70— ManualStrip::check_expr has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 2 (5 pts), boolean chains 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TraitBounds::check_trait_item (cognitive 20) clippy_lints/src/trait_bounds.rs:126— TraitBounds::check_trait_item has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LintWithoutLintPass::check_item (cognitive 20) clippy_lints_internal/src/lint_without_lint_pass.rs:105— LintWithoutLintPass::check_item has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Crate::run_clippy_lints (cognitive 20) lintcheck/src/main.rs:68— Crate::run_clippy_lints has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15 (16 pts), loops 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ParseCxImpl::parse_lint_src_file (cognitive 19) clippy_dev/src/parse.rs:230— ParseCxImpl::parse_lint_src_file has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Hir2Qmm::run (cognitive 19) clippy_lints/src/booleans.rs:261— Hir2Qmm::run has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 4 (9 pts), if/else 6 (8 pts), boolean chains 1, loops 1 (nesting depth added 7). Of this number, 18 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
IfThenSomeElseNone::check_expr (cognitive 19) clippy_lints/src/if_then_some_else_none.rs:65— IfThenSomeElseNone::check_expr has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IncrementVisitor::visit_expr (cognitive 19) clippy_lints/src/loops/utils.rs:60— IncrementVisitor::visit_expr has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ModStyle::check_item (cognitive 19) clippy_lints/src/module_style.rs:138— ModStyle::check_item has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EmptyLineAfter::check_gaps (cognitive 18) clippy_lints/src/empty_line_after.rs:341— EmptyLineAfter::check_gaps has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (8 pts), match/switch 3 (4 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PanicUnimplemented::check_expr (cognitive 18) clippy_lints/src/panic_unimplemented.rs:107— PanicUnimplemented::check_expr has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 7, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VecPushSearcher::display_err (cognitive 18) clippy_lints/src/vec_init_then_push.rs:64— VecPushSearcher::display_err has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 4, loops 1 (2 pts), match/switch 2 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SourceItemOrderingModuleItemGroupings::deserialize (cognitive 17) clippy_config/src/types.rs:552— SourceItemOrderingModuleItemGroupings::deserialize has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 2, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PatState::add_struct_pats (cognitive 17) clippy_lints/src/matches/single_match.rs:304— PatState::add_struct_pats has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MinIdentChars::check_impl_item (cognitive 17) clippy_lints/src/min_ident_chars.rs:193— MinIdentChars::check_impl_item has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PrintVisitor::expr (cognitive 17) clippy_lints/src/utils/author.rs:435— PrintVisitor::expr has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 6 (12 pts), if/else 4 (5 pts) (nesting depth added 7). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Documentation::check_attributes (cognitive 16) clippy_lints/src/doc/mod.rs:759— Documentation::check_attributes has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 4 (8 pts), if/else 3 (5 pts), boolean chains 3 (nesting depth added 6). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
FromStrRadix10::check_expr (cognitive 16) clippy_lints/src/from_str_radix_10.rs:61— FromStrRadix10::check_expr has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InconsistentStructConstructor::check_expr (cognitive 16) clippy_lints/src/inconsistent_struct_constructor.rs:84— InconsistentStructConstructor::check_expr has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LoopVisitor::visit_expr (cognitive 16) clippy_lints/src/loops/infinite_loop.rs:164— LoopVisitor::visit_expr has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
MutMut::check_expr (cognitive 16) clippy_lints/src/mut_mut.rs:48— MutMut::check_expr has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 4, loops 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RawStrings::check_raw_string (cognitive 16) clippy_lints/src/raw_strings.rs:107— RawStrings::check_raw_string has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 3 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReadVecVisitor::visit_expr (cognitive 16) clippy_lints/src/read_zero_byte_vec.rs:153— ReadVecVisitor::visit_expr has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NumericLiteral::split_digit_parts (cognitive 16) clippy_utils/src/numeric_literal.rs:117— NumericLiteral::split_digit_parts has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 1 (3 pts), loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TooManyMethods: HirEqInterExpr clippy_utils/src/hir_utils.rs:153— TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyFunctions: clippy_utils::source clippy_utils/src/source.rs:240— TooManyFunctions — 31 free functions. The bar is 30 free functions; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Change coupling: collapsible_if.rs ↔ needless_return.rs clippy_lints/src/collapsible_if.rs:1— `clippy_lints/src/collapsible_if.rs` and `clippy_lints/src/returns/needless_return.rs` change together 64% of the time (9 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `0a9ad277` use Lintname in lint machinery; `6a262ff0` factor out lint name; `91bf9e8e` Remove `rest` in `LintCheck` — run `git show` on any of them.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (4 members, 50+ identical tokens) clippy_lints/src/arbitrary_source_item_ordering.rs:281— clippy_lints/src/arbitrary_source_item_ordering.rs:281-305 | clippy_lints/src/arbitrary_source_item_ordering.rs:311-339 | clippy_lints/src/arbitrary_source_item_ordering.rs:345-392 | clippy_lints/src/arbitrary_source_item_ordering.rs:396-487 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Edited copy of a member (65 corresponding lines) · ×1
Edited copy of a member (65 corresponding lines) clippy_lints_internal/src/repeated_is_diagnostic_item.rs:266— clippy_lints_internal/src/repeated_is_diagnostic_item.rs:266-330 | clippy_lints_internal/src/repeated_is_diagnostic_item.rs:332-396 — These two members are one piece of code written twice and then edited apart: 65 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (81 corresponding lines) · ×1
Edited copy of a member (81 corresponding lines) clippy_utils/src/ast_utils/mod.rs:514— clippy_utils/src/ast_utils/mod.rs:514-594 | clippy_utils/src/ast_utils/mod.rs:596-680 — These two members are one piece of code written twice and then edited apart: 81 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (33 corresponding lines) · ×1
Edited copy of a member (33 corresponding lines) clippy_utils/src/visitors.rs:111— clippy_utils/src/visitors.rs:111-143 | clippy_utils/src/visitors.rs:151-193 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (46 corresponding lines) · ×1
Edited copy of a member (46 corresponding lines) clippy_dev/src/deprecate_lint.rs:17— clippy_dev/src/deprecate_lint.rs:17-62 | clippy_dev/src/deprecate_lint.rs:64-114 — These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (27 corresponding lines) · ×1
Edited copy of a member (27 corresponding lines) clippy_utils/src/consts.rs:333— clippy_utils/src/consts.rs:333-359 | clippy_utils/src/consts.rs:386-415 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (39 corresponding lines) · ×1
Edited copy of a member (39 corresponding lines) clippy_utils/src/visitors.rs:618— clippy_utils/src/visitors.rs:618-667 | clippy_utils/src/visitors.rs:807-845 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (29 corresponding lines) · ×1
Edited copy of a member (29 corresponding lines) clippy_lints/src/manual_pop_if.rs:203— clippy_lints/src/manual_pop_if.rs:203-231 | clippy_lints/src/manual_pop_if.rs:359-391 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (32 corresponding lines) · ×1
Edited copy of a member (32 corresponding lines) clippy_config/src/types.rs:161— clippy_config/src/types.rs:161-192 | clippy_config/src/types.rs:196-228 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×1
Edited copy of a member (24 corresponding lines) clippy_dev/src/utils.rs:469— clippy_dev/src/utils.rs:469-492 | clippy_dev/src/utils.rs:495-522 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×1
Edited copy of a member (21 corresponding lines) clippy_dev/src/utils.rs:657— clippy_dev/src/utils.rs:657-677 | clippy_dev/src/utils.rs:682-703 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 24+ corresponding lines) · ×1
Edited copies of one member (3 members, 24+ corresponding lines) clippy_utils/src/res.rs:129— clippy_utils/src/res.rs:129-152 | clippy_utils/src/res.rs:180-206 | clippy_utils/src/res.rs:214-248 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×1
Edited copy of a member (18 corresponding lines) clippy_lints/src/pathbuf_init_then_push.rs:134— clippy_lints/src/pathbuf_init_then_push.rs:134-151 | clippy_lints/src/vec_init_then_push.rs:157-175 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×1
Edited copy of a member (17 corresponding lines) clippy_lints/src/missing_doc.rs:196— clippy_lints/src/missing_doc.rs:196-212 | clippy_lints/src/missing_doc.rs:214-233 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 12+ corresponding lines) · ×1
Edited copies of one member (3 members, 12+ corresponding lines) clippy_lints/src/pathbuf_init_then_push.rs:174— clippy_lints/src/pathbuf_init_then_push.rs:174-185 | clippy_lints/src/reserve_after_initialization.rs:125-142 | clippy_lints/src/vec_init_then_push.rs:200-218 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×1
Edited copy of a member (22 corresponding lines) clippy_lints/src/casts/fn_to_numeric_cast.rs:10— clippy_lints/src/casts/fn_to_numeric_cast.rs:10-32 | clippy_lints/src/casts/fn_to_numeric_cast_with_truncation.rs:10-31 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 16+ corresponding lines) · ×1
Edited copies of one member (3 members, 16+ corresponding lines) clippy_lints/src/needless_pass_by_ref_mut.rs:454— clippy_lints/src/needless_pass_by_ref_mut.rs:454-470 | clippy_lints/src/needless_pass_by_ref_mut.rs:472-487 | clippy_lints/src/needless_pass_by_ref_mut.rs:514-529 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 9+ corresponding lines) · ×1
Edited copies of one member (3 members, 9+ corresponding lines) clippy_config/src/metadata.rs:45— clippy_config/src/metadata.rs:45-57 | clippy_dev/src/utils.rs:175-183 | clippy_dev/src/utils.rs:187-195 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Duplicated block (38–39 lines × 2) clippy_utils/src/ast_utils/mod.rs:333— clippy_utils/src/ast_utils/mod.rs:333-371 | clippy_utils/src/ast_utils/mod.rs:599-636 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_utils/src/ast_utils/mod.rs:333` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (29–30 lines × 3) clippy_utils/src/ast_utils/mod.rs:358— clippy_utils/src/ast_utils/mod.rs:358-386 | clippy_utils/src/ast_utils/mod.rs:537-566 | clippy_utils/src/ast_utils/mod.rs:623-652 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_utils/src/ast_utils/mod.rs:537` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (27–28 lines × 2) clippy_lints/src/legacy_numeric_constants.rs:212— clippy_lints/src/legacy_numeric_constants.rs:212-238 | clippy_utils/src/consts.rs:830-857 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (24 lines × 2) clippy_lints_internal/src/repeated_is_diagnostic_item.rs:295— clippy_lints_internal/src/repeated_is_diagnostic_item.rs:295-318 | clippy_lints_internal/src/repeated_is_diagnostic_item.rs:361-384 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints_internal/src/repeated_is_diagnostic_item.rs:295` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (20–23 lines × 2) clippy_lints/src/reserve_after_initialization.rs:75— clippy_lints/src/reserve_after_initialization.rs:75-97 | clippy_lints/src/reserve_after_initialization.rs:104-123 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/reserve_after_initialization.rs:75` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (22 lines × 2) clippy_lints_internal/src/repeated_is_diagnostic_item.rs:267— clippy_lints_internal/src/repeated_is_diagnostic_item.rs:267-288 | clippy_lints_internal/src/repeated_is_diagnostic_item.rs:333-354 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints_internal/src/repeated_is_diagnostic_item.rs:267` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18–19 lines × 2) clippy_lints/src/methods/clone_on_copy.rs:100— clippy_lints/src/methods/clone_on_copy.rs:100-117 | clippy_lints/src/methods/clone_on_copy.rs:156-174 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/methods/clone_on_copy.rs:100` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) clippy_lints/src/manual_pop_if.rs:214— clippy_lints/src/manual_pop_if.rs:214-231 | clippy_lints/src/manual_pop_if.rs:374-391 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/manual_pop_if.rs:214` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `clippy_lints/src/manual_pop_if.rs:373` calls `typeck_results`, `expr_ty`, `is_bool` and `clippy_lints/src/manual_pop_if.rs:213` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (16 lines × 2) clippy_utils/src/ty/mod.rs:1234— clippy_utils/src/ty/mod.rs:1234-1249 | clippy_utils/src/ty/mod.rs:1397-1412 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_utils/src/ty/mod.rs:1234` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `ty` to `Ty<'_>` in one and `Ty<'tcx>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (14 lines × 3) clippy_lints/src/functions/must_use.rs:36— clippy_lints/src/functions/must_use.rs:36-49 | clippy_lints/src/functions/must_use.rs:72-85 | clippy_lints/src/functions/must_use.rs:109-122 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/functions/must_use.rs:36` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `item` to `&'tcx hir::Item<'_>` in one and `&'tcx hir::ImplItem<'_>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `clippy_lints/src/functions/must_use.rs:70` calls `hir_attrs`, `hir_id` and `clippy_lints/src/functions/must_use.rs:35` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7–14 lines × 2) clippy_lints/src/assigning_clones.rs:225— clippy_lints/src/assigning_clones.rs:225-238 | clippy_lints/src/assigning_clones.rs:260-266 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/assigning_clones.rs:225` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10–14 lines × 2) clippy_lints/src/operators/op_ref.rs:76— clippy_lints/src/operators/op_ref.rs:76-85 | clippy_lints/src/operators/op_ref.rs:124-137 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/operators/op_ref.rs:76` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12–14 lines × 2) clippy_lints/src/undocumented_unsafe_blocks.rs:127— clippy_lints/src/undocumented_unsafe_blocks.rs:127-140 | clippy_lints/src/undocumented_unsafe_blocks.rs:361-372 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/undocumented_unsafe_blocks.rs:127` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `cx` to `&LateContext<'tcx>` in one and `&LateContext<'_>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (11–12 lines × 2) clippy_lints/src/arbitrary_source_item_ordering.rs:312— clippy_lints/src/arbitrary_source_item_ordering.rs:312-322 | clippy_lints/src/arbitrary_source_item_ordering.rs:346-357 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/arbitrary_source_item_ordering.rs:312` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–12 lines × 2) clippy_lints/src/manual_pop_if.rs:275— clippy_lints/src/manual_pop_if.rs:275-286 | clippy_lints/src/manual_pop_if.rs:328-337 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/manual_pop_if.rs:275` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 4) clippy_lints_internal/src/repeated_is_diagnostic_item.rs:283— clippy_lints_internal/src/repeated_is_diagnostic_item.rs:283-292 | clippy_lints_internal/src/repeated_is_diagnostic_item.rs:313-322 | clippy_lints_internal/src/repeated_is_diagnostic_item.rs:349-358 | clippy_lints_internal/src/repeated_is_diagnostic_item.rs:379-388 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints_internal/src/repeated_is_diagnostic_item.rs:283` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20 lines × 2) clippy_lints/src/operators/assign_op_pattern.rs:135— clippy_lints/src/operators/assign_op_pattern.rs:135-154 | clippy_lints/src/operators/assign_op_pattern.rs:161-180 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/operators/assign_op_pattern.rs:135` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 3) clippy_dev/src/edit_lints.rs:25— clippy_dev/src/edit_lints.rs:25-33 | clippy_dev/src/edit_lints.rs:59-67 | clippy_dev/src/edit_lints.rs:110-118 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_dev/src/edit_lints.rs:25` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) clippy_lints/src/arbitrary_source_item_ordering.rs:286— clippy_lints/src/arbitrary_source_item_ordering.rs:286-295 | clippy_lints/src/arbitrary_source_item_ordering.rs:357-366 | clippy_lints/src/arbitrary_source_item_ordering.rs:453-462 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/arbitrary_source_item_ordering.rs:286` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `cx` to `&LateContext<'_>` in one and `&LateContext<'tcx>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (8 lines × 3) clippy_lints/src/arbitrary_source_item_ordering.rs:282— clippy_lints/src/arbitrary_source_item_ordering.rs:282-289 | clippy_lints/src/arbitrary_source_item_ordering.rs:318-325 | clippy_lints/src/arbitrary_source_item_ordering.rs:353-360 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/arbitrary_source_item_ordering.rs:282` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 4) clippy_lints/src/arbitrary_source_item_ordering.rs:285— clippy_lints/src/arbitrary_source_item_ordering.rs:285-291 | clippy_lints/src/arbitrary_source_item_ordering.rs:321-327 | clippy_lints/src/arbitrary_source_item_ordering.rs:356-362 | clippy_lints/src/arbitrary_source_item_ordering.rs:452-458 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/arbitrary_source_item_ordering.rs:285` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `cx` to `&LateContext<'_>` in one and `&LateContext<'tcx>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7 lines × 3) clippy_lints/src/missing_doc.rs:167— clippy_lints/src/missing_doc.rs:167-173 | clippy_lints/src/missing_doc.rs:201-207 | clippy_lints/src/missing_doc.rs:222-228 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/missing_doc.rs:167` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `item` to `&'tcx Item<'_>` in one and `&'tcx TraitItem<'_>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6–7 lines × 2) clippy_lints/src/loops/manual_slice_fill.rs:75— clippy_lints/src/loops/manual_slice_fill.rs:75-81 | clippy_lints/src/loops/manual_slice_fill.rs:92-97 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (3–5 lines × 3) clippy_lints/src/manual_retain.rs:89— clippy_lints/src/manual_retain.rs:89-93 | clippy_lints/src/manual_retain.rs:136-140 | clippy_lints/src/manual_retain.rs:193-195 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `clippy_lints/src/manual_retain.rs:89` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Low cohesion: TraitBounds (LCOM4 4) clippy_lints/src/trait_bounds.rs:94— TraitBounds's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
No structured logging — No logging call was found in the 835 Python, JavaScript/TypeScript, Rust production file(s) this check read across 13 module(s). Each was searched for its ecosystem's logging libraries (Python: logging, structlog, loguru; JavaScript/TypeScript: pino, winston, bunyan, log4js, loglevel, consola, the NestJS Logger; Rust: the log and tracing crates (info!/warn!/error!, #[instrument]), slog, env_logger) and for a call on a receiver named `log`/`logger` (or ending in `Logger`/`_logger`) with a level verb. It cannot see logging through a repo-local wrapper named otherwise, or in source it did not read — this is 'no logging found by this walk', not a verdict that nothing here logs. If it is right, production issues will be hard to diagnose.
Duplicated predicate clippy_lints/src/floating_point_arithmetic/log_base.rs:22— `F32(f32_consts::E) == value || F64(f64_consts::E) == value` appears character-identically in 2 files — clippy_lints/src/floating_point_arithmetic/log_base.rs, clippy_lints/src/floating_point_arithmetic/powf.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate clippy_lints/src/matches/manual_filter.rs:169— `arms && first_arm.guard.is_none() && second_arm.guard.is_none()` appears character-identically in 2 files — clippy_lints/src/matches/manual_filter.rs, clippy_lints/src/option_if_let_else.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate clippy_lints/src/extra_unused_type_parameters.rs:169— `explicit_params.get(idx + 1) && end != Some(next.def_id)` appears character-identically in 2 files — clippy_lints/src/extra_unused_type_parameters.rs, clippy_lints/src/lifetimes.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate clippy_lints/src/len_zero.rs:151— `expr.kind && !expr.span.from_expansion()` appears character-identically in 2 files — clippy_lints/src/len_zero.rs, clippy_lints/src/single_range_in_vec_init.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate clippy_lints/src/pathbuf_init_then_push.rs:177— `expr.kind && self_arg.res_local_id() == Some(searcher.local_id) && name.ident.name == sym::push` appears character-identically in 2 files — clippy_lints/src/pathbuf_init_then_push.rs, clippy_lints/src/vec_init_then_push.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate clippy_lints/src/needless_pass_by_ref_mut.rs:148— `header.abi != ExternAbi::Rust || requires_exact_signature(attrs)` appears character-identically in 2 files — clippy_lints/src/needless_pass_by_ref_mut.rs, clippy_lints/src/needless_pass_by_value.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate clippy_lints/src/pass_by_ref_or_value.rs:129— `self.avoid_breaking_exported_api && cx.effective_visibilities.is_exported(def_id)` appears character-identically in 3 files — clippy_lints/src/pass_by_ref_or_value.rs, clippy_lints/src/unnecessary_box_returns.rs, clippy_lints/src/unnecessary_wraps.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate clippy_lints/src/needless_pass_by_ref_mut.rs:136— `self.avoid_breaking_exported_api && cx.effective_visibilities.is_exported(fn_def_id)` appears character-identically in 2 files — clippy_lints/src/needless_pass_by_ref_mut.rs, clippy_lints/src/single_call_fn.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate clippy_lints/src/operators/arithmetic_side_effects.rs:302— `self.const_span && span.contains(body_span)` appears character-identically in 2 files — clippy_lints/src/operators/arithmetic_side_effects.rs, clippy_lints/src/operators/numeric_arithmetic.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate clippy_lints/src/assert_is_empty.rs:243— `ty.is_str() || ty.is_lang_item(cx, LangItem::String)` appears character-identically in 3 files — clippy_lints/src/assert_is_empty.rs, clippy_lints/src/methods/manual_str_repeat.rs, clippy_lints/src/methods/no_effect_replace.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate clippy_lints/src/matches/significant_drop_in_scrutinee.rs:185— `ty.ty_adt_def() && get_clippy_attr(self.cx.tcx, adt.did(), sym::has_significant_drop).is_some()` appears character-identically in 2 files — clippy_lints/src/matches/significant_drop_in_scrutinee.rs, clippy_lints/src/significant_drop_tightening.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate clippy_lints/src/casts/cast_possible_wrap.rs:99— `utils::is_signedness_cast(cast_from, cast_to) && msrv.meets(cx, msrvs::INTEGER_SIGN_CAST)` appears character-identically in 2 files — clippy_lints/src/casts/cast_possible_wrap.rs, clippy_lints/src/casts/cast_sign_loss.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Orphaned file clippy_utils/src/numeric_literal.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file clippy_lints/src/rc_clone_in_vec_init.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file clippy_lints/src/reserve_after_initialization.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file clippy_lints/src/unit_types/mod.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 4 significant file(s) lose their only recent owner: clippy_dev/src/parse.rs, clippy_dev/src/edit_lints.rs, clippy_dev/src/parse/cursor.rs, clippy_lints/src/disallowed_items.rs. Pair on, review, or document these before any departure.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 1 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (5 single-owned of 599 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 599 of the 820 production source files in this repository met that bar). They are anonymized user #2 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: clippy_lints/src/methods/filter_next.rs.
No ADRs found Cargo.toml:13— No ADRs found. The recognised ADR directories in this tree were read — `book/src/development/proposals` — and none of their files is a decision record (a README, index or template page does not count). What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `Cargo.toml` makes this repository a deployable product (line 13).
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 1 of 10 project(s) overshoot their size bounds, lowering Project Cohesion to 8.0/10. The most over is `clippy_lints` (125281 LoC, 787 module-visible types across 22 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 4 of 599 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 599 of the 820 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: clippy_utils/src/numeric_literal.rs, clippy_lints/src/rc_clone_in_vec_init.rs, clippy_lints/src/reserve_after_initialization.rs, clippy_lints/src/unit_types/mod.rs. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M2 · Architecture documentation· No architecture diagram/doc · ×1
No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
No dependency-update automation .github/package.json:2— `.github/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
Silent fallback default on Err lintcheck/src/main.rs:46— `target_dir` turns every `Err` into `"target".to_owned()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1daae-0c3a-7bfe-b3b5-4ec5facfbac6 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Warnings: 1034 · Recommendations: 29 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 14-11-2026 @ 15:30 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.