Public report of bevyengine/bevy, published 25 October 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 report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). Watchdog 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, 25 October 2026, 22:01 UTC · Survey ID cd_13ad936914c44f288280d97cf5dfaae1

bevyengine/bevy

Measured 25 October 2026, 21:55 UTC, at code version fd9e760

Regression: 1 dimension fell since the last survey

A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.

CAI score 54out of 100 At risk No change 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 very large codebase: 515,744 lines of product code in 87 projects, tests not counted · Estimated rebuild effort: about 4.2 person-years · Weakest lens: Security and Compliance, 34

Findings by how serious they are

94 critical 1666 serious 169 minor

24 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks 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

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
25 October 2026, 21:55 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 Watchdog. It is open to any tool that implements it, and today Watchdog is the only one that does.

A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.

The score is deterministic, which means the same code always gets the same score. Watchdog works 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 ▸

55of 55 dimensions measured by tools.
1881of 1929 findings point to an exact file and line, so you can open each one in the code. The other 48 concern the repository as a whole, such as missing documentation.
55dimensions across 7 lenses, read from 515,744 lines of product code in 87 projects.
Chapters

Executive summary

bevyengine/bevy is rated At risk because critical security findings are open, most of them in the build pipeline. Its score is held back because we found no access checks on the code's endpoints or handlers and it has pipeline tools referenced by a changeable name. It scores 54 out of 100, which the At risk rating leaves unchanged. We judged it as a preview release, against a lower bar.

Security and Compliance, at 34, is the weakest lens and counts most in the score. The best first step is adding access checks, worth about 14 points. Fixing the 51 pipeline tools referenced by a changeable name comes next, worth about 5 points. Raising Security and Compliance to 68 would lift the score to about 68.

Fifty-one pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Twenty known security holes in the packages the code depends on can be used by attackers, and nine pipeline steps install packages that can change without warning. Pinning each tool to an exact version, updating the vulnerable packages and pinning what the pipeline installs would close these risks. Correcting the flagged pipeline settings would fix the three weaknesses in the build pipeline's configuration, and fixing the weaknesses the scanner points to would deal with the two security weaknesses in the code. The seven parts of the code nobody has worked on for a long time need someone to learn and document them before anyone changes them.

The product code is 515,744 lines, about €620,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 for The 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.
Security and Compliance 34 · counts for 46%Code Health 60 · counts for 25%Production Readiness 72 · counts for 14%Maturity 81 · counts for 8%Performance 91 · counts for 4%Architecture 96 · counts for 2%Event Sourcing 100 · counts for 1%

If Security and Compliance rose from 34 to 68, the lowest score rated Strong, the score would rise from 54 to about 68.

Code composition: what the lines of code are
Product code 83%Tests 17%
New since the last survey: 54 findings

These 54 critical or serious findings weren't in the previous survey, on 11 October 2026.

  • Cyclomatic Complexity · bevy_ui::layout::update_uinode_geometry_recursive (cyclomatic 33) crates/bevy_ui/src/layout/mod.rs
  • Cyclomatic Complexity · bevy_gltf::loader::extensions::khr_meshopt_compression::decode_view (cyclomatic 30) crates/bevy_gltf/src/loader/extensions/khr_meshopt_compression.rs
  • Cyclomatic Complexity · bevy_ui::layout::clipping::update_clipping (cyclomatic 20) crates/bevy_ui/src/layout/clipping.rs
  • Cyclomatic Complexity · bevy_gltf::loader::extensions::ext_mesh_gpu_instancing::instance_transforms (cyclomatic 19) crates/bevy_gltf/src/loader/extensions/ext_mesh_gpu_instancing.rs
  • Cyclomatic Complexity · bevy_ui::layout::layout_tree::sync_layout_tree (cyclomatic 19) crates/bevy_ui/src/layout/layout_tree.rs
  • Cyclomatic Complexity · JsonSchemaBevyType::from (cyclomatic 16) crates/bevy_remote/src/schemas/json_schema.rs
  • Cyclomatic Complexity · bevy_remote::builtin_methods::process_remote_query_request (cyclomatic 16) crates/bevy_remote/src/builtin_methods.rs
  • Cyclomatic Complexity · bevy_ui::layout::ui_layout_system (cyclomatic 16) crates/bevy_ui/src/layout/mod.rs
  • Cognitive Complexity · bevy_ui::layout::update_uinode_geometry_recursive (cognitive 65) crates/bevy_ui/src/layout/mod.rs
  • Cognitive Complexity · bevy_ui::layout::update_ui_roots (cognitive 28) crates/bevy_ui/src/layout/mod.rs
  • Cognitive Complexity · bevy_gltf::loader::extensions::ext_mesh_gpu_instancing::instance_transforms (cognitive 21) crates/bevy_gltf/src/loader/extensions/ext_mesh_gpu_instancing.rs
  • Cognitive Complexity · bevy_remote::builtin_methods::process_remote_query_request (cognitive 19) crates/bevy_remote/src/builtin_methods.rs
  • Cognitive Complexity · bevy_ui::layout::layout_tree::sync_layout_tree (cognitive 19) crates/bevy_ui/src/layout/layout_tree.rs
  • Cognitive Complexity · bevy_gltf::loader::spawn_primitives (cognitive 17) crates/bevy_gltf/src/loader/mod.rs
  • Cognitive Complexity · bevy_bsn::lex::lex_string::string_body (cognitive 16) crates/bevy_bsn/src/lex.rs
  • Cognitive Complexity · bevy_ui::stack::ui_stack_system (cognitive 16) crates/bevy_ui/src/stack.rs
  • God Classes · FunctionTooLong: bevy_ui::layout::update_uinode_geometry_recursive crates/bevy_ui/src/layout/mod.rs
  • God Classes · FileTooLong: layout/layout_tree.rs crates/bevy_ui/src/layout/layout_tree.rs
  • God Classes · MethodTooLong: FeathersNumberInput.scene crates/bevy_feathers/src/controls/number_input.rs
  • God Classes · FileTooLong: layout/mod.rs crates/bevy_ui/src/layout/mod.rs
  • God Classes · FunctionTooLong: bevy_gltf::loader::extensions::khr_meshopt_compression::decode_view crates/bevy_gltf/src/loader/extensions/khr_meshopt_compression.rs
  • God Classes · FunctionTooLong: bevy_ui::layout::layout_tree::sync_layout_tree crates/bevy_ui/src/layout/layout_tree.rs
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) crates/bevy_pbr/src/material.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) crates/bevy_ecs/src/query/state.rs
  • Code Duplication · Duplicated block (38 lines × 2) crates/bevy_ecs/src/query/iter.rs
  • Code Duplication · Duplicated block (19–27 lines × 2) crates/bevy_ecs/src/query/iter.rs
  • Code Duplication · Duplicated block (15 lines × 2) crates/bevy_pbr/src/atmosphere/resources.rs
  • Code Duplication · Duplicated block (7 lines × 3) crates/bevy_ecs/src/query/state.rs
  • Code Duplication · Duplicated block (5–6 lines × 4) crates/bevy_ecs/src/query/state.rs
  • Code Duplication · Duplicated block (5 lines × 2) crates/bevy_image/src/image.rs
  • Code Duplication · Duplicated block (5 lines × 2) crates/bevy_image/src/image.rs
  • Coupling · Off the main sequence: bevy_bsn
  • Secret Scanning · REDACTED
  • Churn × Complexity Hotspots · Hotspot: crates/bevy_remote/src/schemas/json_schema.rs crates/bevy_remote/src/schemas/json_schema.rs
  • Churn × Complexity Hotspots · Hotspot: crates/bevy_inspector/src/details_panel.rs crates/bevy_inspector/src/details_panel.rs
  • Explicit Debt · TodoComment crates/bevy_text/src/text_access.rs
  • Explicit Debt · TodoComment crates/bevy_bsn/src/lex.rs
  • Explicit Debt · TodoComment crates/bevy_bsn/src/span.rs
  • Boundary Type-Coupling · Cross-context type ArchetypeId (bevy_ecs → bevy_asset) crates/bevy_asset/src/asset_changed.rs
  • Boundary Type-Coupling · Cross-context type TableId (bevy_ecs → bevy_asset) crates/bevy_asset/src/asset_changed.rs
  • Boundary Type-Coupling · Cross-context type TableId (bevy_ecs → bevy_asset) crates/bevy_asset/src/asset_changed.rs
  • Boundary Type-Coupling · Cross-context type Entity (bevy_ecs → bevy_asset) crates/bevy_asset/src/asset_changed.rs
  • Boundary Type-Coupling · Cross-context type Entity (bevy_ecs → bevy_winit) crates/bevy_winit/src/winit_monitors.rs
  • Boundary Type-Coupling · Cross-context type Entity (bevy_ecs → bevy_winit) crates/bevy_winit/src/winit_windows.rs
  • Boundary Type-Coupling · Cross-context type Entity (bevy_ecs → bevy_winit) crates/bevy_winit/src/winit_windows.rs
  • Boundary Type-Coupling · Cross-context type Entity (bevy_ecs → bevy_winit) crates/bevy_winit/src/winit_windows.rs
  • Boundary Type-Coupling · Cross-context type Entity (bevy_ecs → bevy_winit) crates/bevy_winit/src/winit_windows.rs
  • Boundary Type-Coupling · Cross-context type Entity (bevy_ecs → bevy_winit) crates/bevy_winit/src/converters.rs
  • Boundary Type-Coupling · Cross-context type Entity (bevy_ecs → bevy_winit) crates/bevy_winit/src/converters.rs
  • Knowledge Freshness · Orphaned knowledge crates/bevy_shape/src/bounding/bounded2d/primitive_impls.rs
  • Knowledge Freshness · Orphaned knowledge crates/bevy_math/src/rotation2d.rs
  • Knowledge Freshness · Orphaned knowledge crates/bevy_shape/src/bounding/bounded3d/primitive_impls.rs
  • Knowledge Freshness · Orphaned knowledge crates/bevy_shape/src/sampling/shape_sampling.rs
  • Knowledge Freshness · Orphaned knowledge crates/bevy_math/src/isometry.rs

Watchdog compares 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: 20 findings

These 20 critical or serious findings were in the previous survey, on 11 October 2026, and are gone from this one.

  • Cyclomatic Complexity · bevy_ui::layout::ui_layout_system::update_uinode_geometry_recursive (cyclomatic 25) crates/bevy_ui/src/layout/mod.rs
  • Cognitive Complexity · bevy_ui::layout::ui_layout_system::update_uinode_geometry_recursive (cognitive 47) crates/bevy_ui/src/layout/mod.rs
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) crates/bevy_pbr/src/material.rs
  • Code Duplication · Duplicated block (36 lines × 2) crates/bevy_ecs/src/query/iter.rs
  • Code Duplication · Duplicated block (15–23 lines × 2) crates/bevy_ecs/src/query/iter.rs
  • Code Duplication · Duplicated block (15 lines × 2) crates/bevy_pbr/src/atmosphere/resources.rs
  • Code Duplication · Duplicated block (12 lines × 2) crates/bevy_feathers/src/controls/number_input.rs
  • Code Duplication · Duplicated block (5 lines × 4) crates/bevy_image/src/image.rs
  • Coupling · Unstable project bevy-settings
  • Churn × Complexity Hotspots · Hotspot: crates/bevy_pbr/src/prepass/mod.rs crates/bevy_pbr/src/prepass/mod.rs
  • Churn × Complexity Hotspots · Hotspot: crates/bevy_text/src/text.rs crates/bevy_text/src/text.rs
  • Churn × Complexity Hotspots · Hotspot: crates/bevy_core_pipeline/src/schedule.rs crates/bevy_core_pipeline/src/schedule.rs
  • Churn × Complexity Hotspots · Hotspot: crates/bevy_image/src/image_texture_conversion.rs crates/bevy_image/src/image_texture_conversion.rs
  • Churn × Complexity Hotspots · Hotspot: crates/bevy_text/src/font.rs crates/bevy_text/src/font.rs
  • Churn × Complexity Hotspots · Repeated repair: crates/bevy_ui/src/layout/ui_surface.rs crates/bevy_ui/src/layout/ui_surface.rs
  • Explicit Debt · TodoComment crates/bevy_feathers/src/controls/color_input.rs
  • Explicit Debt · TodoComment crates/bevy_text/src/text_access.rs
  • Explicit Debt · TodoComment crates/bevy_text/src/text_access.rs
  • Explicit Debt · TodoComment crates/bevy_ui/src/layout/ui_surface.rs
  • Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
Rebuild cost: about €620,000 · Estimate
Cost to rebuild€200,000 to €1,000,000, for 3,408 to 10,812 hours of work, about 4.2 person-years for 2 to 9 engineers
Difficulty of the problemStandard, 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.8 at a score of 54. 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.
SizeVery large: 515,744 lines of product code

How the estimate is made: Watchdog prices 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
Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do.
Raises the score by about 14 points · Medium effort · Access Controls
2
Resolve the 51 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (24), REDACTED (9), REDACTED (6).
Raises the score by about 5 points · Medium effort · Static Analysis (SAST)
3
Resolve the 17 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (17).
Raises the score by about 5 points · Medium effort · Dependency Vulnerabilities

Diagnosis: what the measurements show together

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 €620,000 to build again, about 4.2 person-years of work. Its weakest lens is Security and Compliance, at 34 (Weak). Security and Compliance is about how well the product is protected, and how it handles personal data. Because the weakest lens counts most in the score, work on Security and Compliance also moves the score most.
Based on: the rebuild estimate · the Security and Compliance grade · how much each lens counts
What to do: Start with the Security and Compliance actions in Top priorities.
If you do one thing first · First action
Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do. Of all the actions in this report, it raises the score most for the work it takes: about 14 points for medium effort. 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 7.5 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 2% to 5% on every change. The history of the code shows how much it changes: about 160,407 lines over the last 90 days, which is about 650,540 lines a year. At that pace, the extra work comes to an estimated 32.5 to 216.8 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 Watchdog's 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; 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 — a layering smell or cycle. A clean layered graph has none.

arch bevy_app bevy_app bevy_derive bevy_derive bevy_app->bevy_derive bevy_ecs bevy_ecs bevy_app->bevy_ecs bevy_platform bevy_platform bevy_app->bevy_platform bevy_reflect bevy_reflect bevy_app->bevy_reflect bevy_utils bevy_utils bevy_app->bevy_utils bevy_asset bevy_asset bevy_asset->bevy_app bevy_asset->bevy_ecs bevy_asset->bevy_platform bevy_asset->bevy_reflect bevy_asset->bevy_utils bevy_camera bevy_camera bevy_camera->bevy_app bevy_camera->bevy_asset bevy_color bevy_color bevy_camera->bevy_color bevy_camera->bevy_derive bevy_camera->bevy_ecs bevy_image bevy_image bevy_camera->bevy_image bevy_math bevy_math bevy_camera->bevy_math bevy_camera->bevy_reflect bevy_transform bevy_transform bevy_camera->bevy_transform bevy_camera->bevy_utils bevy_color->bevy_math bevy_color->bevy_reflect bevy_core_pipeline bevy_core_pipeline bevy_core_pipeline->bevy_app bevy_core_pipeline->bevy_asset bevy_core_pipeline->bevy_camera bevy_core_pipeline->bevy_color bevy_core_pipeline->bevy_derive bevy_core_pipeline->bevy_ecs bevy_core_pipeline->bevy_image bevy_core_pipeline->bevy_math bevy_core_pipeline->bevy_platform bevy_core_pipeline->bevy_reflect bevy_render bevy_render bevy_core_pipeline->bevy_render bevy_core_pipeline->bevy_transform bevy_core_pipeline->bevy_utils bevy_dev_tools bevy_dev_tools bevy_dev_tools->bevy_app bevy_dev_tools->bevy_asset bevy_dev_tools->bevy_camera bevy_dev_tools->bevy_color bevy_dev_tools->bevy_core_pipeline bevy_dev_tools->bevy_ecs bevy_dev_tools->bevy_image bevy_dev_tools->bevy_math bevy_pbr bevy_pbr bevy_dev_tools->bevy_pbr bevy_dev_tools->bevy_platform bevy_dev_tools->bevy_reflect bevy_dev_tools->bevy_render bevy_dev_tools->bevy_transform bevy_ui bevy_ui bevy_dev_tools->bevy_ui bevy_ui_render bevy_ui_render bevy_dev_tools->bevy_ui_render bevy_dev_tools->bevy_utils bevy_ecs->bevy_platform bevy_ecs->bevy_reflect bevy_ecs->bevy_utils bevy_feathers bevy_feathers bevy_feathers->bevy_app bevy_feathers->bevy_asset bevy_feathers->bevy_camera bevy_feathers->bevy_color bevy_feathers->bevy_derive bevy_feathers->bevy_ecs bevy_feathers->bevy_math bevy_feathers->bevy_platform bevy_feathers->bevy_reflect bevy_feathers->bevy_render bevy_feathers->bevy_ui bevy_feathers->bevy_ui_render bevy_image->bevy_app bevy_image->bevy_asset bevy_image->bevy_color bevy_image->bevy_ecs bevy_image->bevy_math bevy_image->bevy_platform bevy_image->bevy_reflect bevy_image->bevy_utils bevy_internal bevy_internal bevy_internal->bevy_app bevy_internal->bevy_asset bevy_internal->bevy_camera bevy_internal->bevy_color bevy_internal->bevy_core_pipeline bevy_internal->bevy_derive bevy_internal->bevy_dev_tools bevy_internal->bevy_ecs bevy_internal->bevy_feathers bevy_internal->bevy_image bevy_internal->bevy_math bevy_internal->bevy_pbr bevy_internal->bevy_platform bevy_internal->bevy_reflect bevy_internal->bevy_render bevy_internal->bevy_transform bevy_internal->bevy_ui bevy_internal->bevy_ui_render bevy_internal->bevy_utils bevy_math->bevy_reflect bevy_pbr->bevy_app bevy_pbr->bevy_asset bevy_pbr->bevy_camera bevy_pbr->bevy_color bevy_pbr->bevy_core_pipeline bevy_pbr->bevy_derive bevy_pbr->bevy_ecs bevy_pbr->bevy_image bevy_pbr->bevy_math bevy_pbr->bevy_platform bevy_pbr->bevy_reflect bevy_pbr->bevy_render bevy_pbr->bevy_transform bevy_pbr->bevy_utils bevy_reflect->bevy_platform bevy_reflect->bevy_utils bevy_render->bevy_app bevy_render->bevy_asset bevy_render->bevy_camera bevy_render->bevy_color bevy_render->bevy_derive bevy_render->bevy_ecs bevy_render->bevy_image bevy_render->bevy_math bevy_render->bevy_platform bevy_render->bevy_reflect bevy_render->bevy_transform bevy_render->bevy_utils bevy_transform->bevy_app bevy_transform->bevy_ecs bevy_transform->bevy_math bevy_transform->bevy_reflect bevy_transform->bevy_utils bevy_ui->bevy_app bevy_ui->bevy_asset bevy_ui->bevy_camera bevy_ui->bevy_color bevy_ui->bevy_derive bevy_ui->bevy_ecs bevy_ui->bevy_image bevy_ui->bevy_math bevy_ui->bevy_platform bevy_ui->bevy_reflect bevy_ui->bevy_transform bevy_ui->bevy_utils bevy_ui_render->bevy_app bevy_ui_render->bevy_asset bevy_ui_render->bevy_camera bevy_ui_render->bevy_color bevy_ui_render->bevy_core_pipeline bevy_ui_render->bevy_derive bevy_ui_render->bevy_ecs bevy_ui_render->bevy_image bevy_ui_render->bevy_math bevy_ui_render->bevy_platform bevy_ui_render->bevy_reflect bevy_ui_render->bevy_render bevy_ui_render->bevy_transform bevy_ui_render->bevy_ui bevy_ui_render->bevy_utils bevy_utils->bevy_platform __more__ +67 more projects

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.

1182 modules, with 6867 dependencies between them. 6 loops run through 395 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 1142 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.
uses →1 bevy_reflect.impls.glam2 build_templated_pages3 bevy_app.plugin4 bevy_color.linear_rgba5 bevy_ecs.system.commands6 bevy_render.render_resource.texture7 bevy_color.color8 bevy_ecs.world.unsafe_world_cell9 bevy_ecs.system.query10 bevy_ui.ui_node11 bevy_ecs.entity12 bevy_ecs.lifecycle13 bevy_ecs.component.info14 bevy_ecs.change_detection.params15 bevy_ecs.world.deferred_world16 bevy_input.keyboard17 bevy_ecs.system.system_param18 bevy_ecs.system.function_system19 bevy_reflect.impls.core.result20 bevy_ecs.change_detection.tick21 bevy_ecs.observer.system_param22 bevy_material.descriptor23 bevy_platform.collections.hash_map24 bevy_ecs.archetype25 bevy_extract.extract_param26 bevy_platform.collections.hash_set27 bevy_render.render_resource.pipeline_specializer28 bevy_render.renderer.render_device29 bevy_render.render_resource.bind_group30 bevy_pbr.material31 bevy_pbr.render.mesh32 bevy_reflect.impls.core.option33 bevy_mesh.mesh34 bevy_reflect.type_registry35 bevy_bsn.types36 bevy_asset.id37 bevy_asset.handle38 bevy_ecs.world39 bevy_app.app40 bevy_render.renderer.render_context
1 bevy_reflect.impls.glam
2 build_templated_pages
3 bevy_app.plugin2
4 bevy_color.linear_rgba211
5 bevy_ecs.system.commands41211
6 bevy_render.render_resource.texture82
7 bevy_color.color11
8 bevy_ecs.world.unsafe_world_cell18145124221
9 bevy_ecs.system.query25184454
10 bevy_ui.ui_node1061312
11 bevy_ecs.entity42242765214
12 bevy_ecs.lifecycle1181311111
13 bevy_ecs.component.info222131121
14 bevy_ecs.change_detection.params86246492146
15 bevy_ecs.world.deferred_world1111112111111
16 bevy_input.keyboard11
17 bevy_ecs.system.system_param4121913121213
18 bevy_ecs.system.function_system313343
19 bevy_reflect.impls.core.result112211
20 bevy_ecs.change_detection.tick1
21 bevy_ecs.observer.system_param111
22 bevy_material.descriptor15
23 bevy_platform.collections.hash_map111
24 bevy_ecs.archetype2452122112
25 bevy_extract.extract_param1122111
26 bevy_platform.collections.hash_set1111
27 bevy_render.render_resource.pipeline_specializer6253
28 bevy_render.renderer.render_device12111
29 bevy_render.render_resource.bind_group21111
30 bevy_pbr.material1212114111322111151212
31 bevy_pbr.render.mesh7111211113112218621
32 bevy_reflect.impls.core.option1611121112111
33 bevy_mesh.mesh3211
34 bevy_reflect.type_registry15112
35 bevy_bsn.types2812
36 bevy_asset.id33125
37 bevy_asset.handle323
38 bevy_ecs.world1132332113111
39 bevy_app.app211
40 bevy_render.renderer.render_context212131421121
Uses a module listed above itPart of a loopThe module itself
1 bevy_reflect.impls.glam2 build_templated_pages3 bevy_app.plugin4 bevy_color.linear_rgba5 bevy_ecs.system.commands6 bevy_render.render_resource.texture7 bevy_color.color8 bevy_ecs.world.unsafe_world_cell9 bevy_ecs.system.query10 bevy_ui.ui_node11 bevy_ecs.entity12 bevy_ecs.lifecycle13 bevy_ecs.component.info14 bevy_ecs.change_detection.params15 bevy_ecs.world.deferred_world16 bevy_input.keyboard17 bevy_ecs.system.system_param18 bevy_ecs.system.function_system19 bevy_reflect.impls.core.result20 bevy_ecs.change_detection.tick21 bevy_ecs.observer.system_param22 bevy_material.descriptor23 bevy_platform.collections.hash_map24 bevy_ecs.archetype25 bevy_extract.extract_param26 bevy_platform.collections.hash_set27 bevy_render.render_resource.pipeline_specializer28 bevy_render.renderer.render_device29 bevy_render.render_resource.bind_group30 bevy_pbr.material31 bevy_pbr.render.mesh32 bevy_reflect.impls.core.option33 bevy_mesh.mesh34 bevy_reflect.type_registry35 bevy_bsn.types36 bevy_asset.id37 bevy_asset.handle38 bevy_ecs.world39 bevy_app.app40 bevy_render.renderer.render_contextbevy_reflect.impls.glam1build_templated_pages2bevy_app.plugin3bevy_color.linear_rgba4bevy_ecs.system.commands5bevy_render.render_resource.texture6bevy_color.color7bevy_ecs.world.unsafe_world_cell8bevy_ecs.system.query9bevy_ui.ui_node10bevy_ecs.entity11bevy_ecs.lifecycle12bevy_ecs.component.info13bevy_ecs.change_detection.params14bevy_ecs.world.deferred_world15bevy_input.keyboard16bevy_ecs.system.system_param17bevy_ecs.system.function_system18bevy_reflect.impls.core.result19bevy_ecs.change_detection.tick20bevy_ecs.observer.system_param21bevy_material.descriptor22bevy_platform.collections.hash_map23bevy_ecs.archetype24bevy_extract.extract_param25bevy_platform.collections.hash_set26bevy_render.render_resource.pipeline_specializer27bevy_render.renderer.render_device28bevy_render.render_resource.bind_group29bevy_pbr.material30bevy_pbr.render.mesh31bevy_reflect.impls.core.option32bevy_mesh.mesh33bevy_reflect.type_registry34bevy_bsn.types35bevy_asset.id36bevy_asset.handle37bevy_ecs.world38bevy_app.app39bevy_render.renderer.render_context40221141211821118145124221251844541061312422427652141181311111222131121862464921461111112111111114121913121213313343112211111115111245212211211221111111625312111211111212114111322111151212711121111311221862116111211121113211151122812331253231132332113111211212131421121+1142 more modules (most-connected shown)

At a glance — Code Health · 60% · Adequate · gated by X4 ·

At a glance — Architecture · 96% · Exemplary ·

At a glance — Maturity · 81% · Strong ·

At a glance — Readiness · 72% · Strong ·

At a glance — Security · 34% · Weak · gated by D29, D30, D36, C2 ·

At a glance — Event Sourcing · 100% · Exemplary ·

At a glance — Performance · 91% · Exemplary ·

Security & Compliance — OWASP Top-10 mapping

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 categoryFindingsSeverity
A05:2025 — Injection68High / Critical
A03:2025 — Software Supply Chain Failures30High / Critical
A07:2025 — Authentication Failures1High / Critical

Roadmap

First, enforce strict access controls by implementing a global authentication guard with explicit public opt-outs and named role permissions. Next, immediately resolve the 51 static analysis issues in CI workflows and the 17 high-severity dependency vulnerabilities to secure the build and runtime environment. Simultaneously, configure essential security response headers on all server responses to harden the web posture. Finally, refactor the logging system to use structured formats, eliminating interpolated messages to improve observability and debugging.

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do.+14.3 ptsMediumAccess Controls
Resolve the 51 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (24), REDACTED (9), REDACTED (6).+4.9 ptsMediumStatic Analysis (SAST)
Resolve the 17 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (17).+4.8 ptsMediumDependency Vulnerabilities
Set security response headers on what the server sends — actix-web's `DefaultHeaders::new().add((header::X_CONTENT_TYPE_OPTIONS, "nosniff"))`, tower-http's `SetResponseHeaderLayer::overriding(…)` on an axum router, or keep Rocket's default `Shield` — with `Content-Security-Policy`, `X-Content-Type-Options` and a frame policy on every response.+4.5 ptsMediumWeb-Security Posture
Interpolated log message defeats structured logging+4.4 ptsMediumStructured logging
Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with REDACTED.+2.2 ptsLowSecret Scanning
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3).+1.3 ptsLowStatic Analysis (SAST)
Resolve the 9 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (4), REDACTED (3), REDACTED.+1.3 ptsLowStatic Analysis (SAST)

File quality

Per-file score 0–10 — a quality signature. Of 471 files carrying findings, judged against the Preview bar: 0% slop · 24% mixed · 76% near-clean.

FileScoreBandWorst signal
REDACTED0.0SlopSecret Scanning: Leaked secret: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.5MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
crates/bevy_winit/src/converters.rs5.1MixedGod Classes: FunctionTooLong: bevy_winit::converters::convert_logical_key
crates/bevy_pbr/src/render/mesh.rs5.5MixedCyclomatic Complexity: MeshPipeline::specialize (cyclomatic 72)
crates/bevy_asset/src/io/memory.rs5.5MixedCode Duplication: Duplicated block (9 lines × 2)
crates/bevy_shape/src/bounding/bounded2d/mod.rs5.5MixedCode Duplication: Duplicated block (14 lines × 2)
crates/bevy_sprite_render/src/text2d/mod.rs5.6MixedCyclomatic Complexity: bevy_sprite_render::text2d::extract_text2d_sprite (cyclomatic 20)
crates/bevy_pbr/src/render/mesh_bindings.rs5.6MixedCode Duplication: Members sharing a duplicated core (4 members, 50+ identical tokens)
crates/bevy_render/src/render_resource/storage_buffer.rs5.7MixedCode Duplication: Members sharing a duplicated core (4 members, 50+ identical tokens)
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
crates/bevy_core_pipeline/src/deferred/node.rs5.9MixedCognitive Complexity: bevy_core_pipeline::deferred::node::run_deferred_prepass_system (cognitive 16)

How the grades work

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 — 94

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 — 1666

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 — 169

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved — 24

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

Watchdog 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. 55 of 55 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); none rely on LLM judgement. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

Every figure here is one of three 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; ◐ Advisory — an LLM prose judgement. 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; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.

What we checked — 55 dimensions across the health lenses
D1D2D3D4D5D6D9D13D14D15D16D17D19D20D23D26D28D29D30D34D35D36D37D43D44AX10AX3AX4AX8AX9C2ES1ES2M1M2M3M4P1P10P2P3P4P6PF1PF3S1X1X14X15X21X27X28X29X30X4

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
  1. 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, 1881 of 1929 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.)
  2. Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
  3. 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.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Watchdog duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivySecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3✓ deterministic
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurement—◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a17510-38a3-7d5c-88e5-c17e4471b9f9.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

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 — Watchdog 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 JavaScript/TypeScript half could not be measured — the JavaScript/TypeScript suite(s) run through a browser-driven runner the coverage collector does not drive — .github/start-mobile-example/ (@wdio/cli), .github/start-wasm-example/ (@playwright/test) — a gap in the analyzer, not something this repository is missing. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo. In the meantime, commit (or publish into the working tree) the lcov/Cobertura report your CI produces and the real number is read on the next scan. You can widen what we reach: optional: commit the lcov/Cobertura report your CI produces, and the real number is read on the next scan.
  • D11 Test Reliability — not measured this run — Watchdog 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, 384 test files), but it was not re-run: its build outgrew the 7 GB scratch ceiling (7.414 GB measured) and was stopped; its suite was not run. 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 — Watchdog 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 — 3 Maven/Gradle manifest(s) were read, stating a version for 5 dependency(ies) and leaving 0 to a parent or an imported BOM, but no build resolved the dependency graph, so the outdated signal was not established. NOT a finding that these dependencies are current or healthy.
  • D19 Documentation Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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 — Watchdog 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. D21's deterministic naming 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. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
  • D22 Internal API Consistency — not measured this run — Watchdog 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 — Watchdog 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 the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D27 Navigability — not measured this run — Watchdog 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.
  • AX6 Interface segregation — not measured this run — Watchdog 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.
  • AXB1 Runtime evidence locked — no reproducible boot — not measured this run — Watchdog 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. Subject: 1 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates. The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. Watchdog then boots it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
  • GD1 Unfinished & placeholder code — not measured this run — Watchdog 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 no C#, F#, JavaScript/TypeScript, Dart, Ruby or Scala was found, and this repository's 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.
  • IC1 Incompleteness & stubs — not measured this run — Watchdog 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 no C#, JavaScript/TypeScript, Java, Dart, Ruby or Scala was found, and this repository's 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.
  • M4 Documentation accuracy — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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). 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 — Watchdog 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 JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, 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.
  • X13 Undrained process stream — not measured this run — Watchdog 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 JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, 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.
  • X16 Unfloored truncation loop — not measured this run — Watchdog 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 JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala or Kotlin was found in this repository, 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.
  • X17 Uncapped recursion over a caller-supplied document — not measured this run — Watchdog 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 JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, 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.
  • X18 Disposal-pattern correctness — not measured this run — Watchdog 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 JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala or PHP was found in this repository, 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.
  • X19 Unrestored process-global state — not measured this run — Watchdog 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 JavaScript/TypeScript, Java, Kotlin, Python, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Python, Dart, Ruby, Scala or PHP was found in this repository, 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.
  • X22 Contradicted release guard — not measured this run — Watchdog 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 Java, TypeScript/JavaScript, Python, Dart, Ruby, Scala, Kotlin and PHP source only, and no C# was loaded, and this repository's 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.
  • X23 Unguarded diagnostic materialisation — not measured this run — Watchdog 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 JavaScript/TypeScript, Java, F#, Python, Dart, Ruby, Scala, Kotlin and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, F#, Python, Dart, Ruby, Scala, Kotlin or PHP was found in this repository, 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.
  • X24 Document value interpolated into markup unescaped — not measured this run — Watchdog 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 JavaScript/TypeScript, Java, Scala, Ruby and Python source only, and no C# was loaded and no JavaScript/TypeScript, Java, Scala, Ruby or Python was found in this repository, 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.
  • X25 Inert configuration knob — not measured this run — Watchdog 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 JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Erlang, Python, Dart and Ruby source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Erlang, Python, Dart or Ruby was found in this repository, 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.
  • X3 Exception handling — not measured this run — Watchdog 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 PHP, Java, Kotlin, Python, Ruby, Scala, Dart, Swift, Erlang, Go and JavaScript/TypeScript source only, and no C# was loaded and no PHP, Java, Kotlin, Python, Ruby, Scala, Dart, Swift, Erlang, Go, JavaScript or TypeScript was found in this repository, 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.
  • X4 Structured logging — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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. 270 further occurrence(s) are not listed individually; the score already reflects all 310.
  • X5 Nullable reference types — not measured this run — Watchdog 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 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

Watchdog assesses the repository exactly as committed, and only the repository. By design it does 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.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • 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 is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D23 Boundary Type-Coupling: Boundary leakage is detected from type references across detected contexts — leaks that flow through primitives, serialization or shared infrastructure may not surface as a typed reference.
  • 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.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • 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: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • 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.

Dimensions

D1 · Cyclomatic Complexity5.5 / 10Adequate✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 5.5 / 10 · rule-coverage 100% · ceiling Prevented

137 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was bevy_image::ktx2::ktx2_dfd_header_to_texture_format at 162. A further 32 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 bevy_winit::converters::convert_logical_key at 310 — they are counted neither in the figure above nor in this dimension's score. 12 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: crates/bevy_winit/src/converters.rs (bevy_winit::converters::convert_logical_key at 310), crates/bevy_image/src/ctt_format.rs (bevy_image::ctt_format::wgpu_to_ctt_texture_format at 117), crates/bevy_mesh/src/vertex.rs (VertexAttributeValues::push_from at 90), crates/bevy_mesh/src/mesh.rs (Mesh::try_duplicate_vertices at 47), crates/bevy_curve/src/easing.rs (EaseFunction::eval at 39), and 7 more not listed here. 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.

bevy_pbr::render::light::prepare_lights (cyclomatic 71) · ×16crates/bevy_pbr/src/render/light.rs:1038
bevy_ui_render::prepare_uinodes (cyclomatic 29) · ×9crates/bevy_ui_render/src/lib.rs:2275
bevy_feathers::controls::toggle_switch::set_switch_styles (cyclomatic 44) · ×8crates/bevy_feathers/src/controls/toggle_switch.rs:221
bevy_ui_widgets::text_input::on_focused_keyboard_input (cyclomatic 58) · ×7crates/bevy_ui_widgets/src/text_input.rs:118
bevy_ui::focus::ui_focus_system (cyclomatic 34) · ×7crates/bevy_ui/src/focus.rs:167

+ 61 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 1 body over 120 down to 120 or less in Cyclomatic Complexity — start with bevy_image::ktx2::ktx2_dfd_header_to_texture_format (cyclomatic 162). — Refactoring it lifts Cyclomatic Complexity from 5.5 to about 5.8/10.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.

D2 · Cognitive Complexity5.0 / 10Adequate✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 5.0 / 10 · rule-coverage 100% · ceiling Prevented

309 method(s) exceeded the cognitive complexity threshold of 15; the worst was bevy_light::cluster::assign::assign_objects_to_clusters at 254.

bevy_pbr::render::light::prepare_lights (cognitive 133) · ×30crates/bevy_pbr/src/render/light.rs:1038
bevy_feathers::controls::toggle_switch::set_switch_styles (cognitive 63) · ×20crates/bevy_feathers/src/controls/toggle_switch.rs:221
bevy_ui_render::prepare_uinodes (cognitive 105) · ×19crates/bevy_ui_render/src/lib.rs:2275
bevy_render::batching::gpu_preprocessing::batch_and_prepare_sorted_render_phase (cognitive 61) · ×19crates/bevy_render/src/batching/gpu_preprocessing.rs:1850
bevy_ui_widgets::menu::menu_on_key_event (cognitive 47) · ×15crates/bevy_ui_widgets/src/menu.rs:222

+ 117 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 5 bodies over 120 down to 120 or less in Cognitive Complexity — start with bevy_light::cluster::assign::assign_objects_to_clusters (cognitive 254), GltfLoader::load_gltf (cognitive 246), bevy_image::ktx2::ktx2_dfd_header_to_texture_format (cognitive 216). — 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 5 together lifts Cognitive Complexity from 5.0 to about 5.8/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.

D3 · God Classes8.4 / 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.

Maturity: Documented → Verified → Prevented · effective 8.4 / 10 · rule-coverage 100% · ceiling Prevented

282 god class(es) detected.

FileTooLong: render/mesh.rs · ×101crates/bevy_pbr/src/render/mesh.rs
FunctionTooLong: bevy_render_macros::as_bind_group::derive_as_bind_group · ×90crates/bevy_render/macros/src/as_bind_group.rs:63
MethodTooLong: GltfLoader.load_gltf · ×40crates/bevy_gltf/src/loader/mod.rs:302
TooManyMethods: World · ×26crates/bevy_ecs/src/world/mod.rs:96
ClassTooLong: World · ×20crates/bevy_ecs/src/world/mod.rs:96

+ 1 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 101 FileTooLong finding(s) in God Classes — start with mod.rs (16), lib.rs (4), mesh.rs (3). — One of this dimension's main actionable groups (101 warning-level).
  2. Resolve the 90 FunctionTooLong finding(s) in God Classes — start with mod.rs (11), lib.rs (10), gpu_preprocess.rs (5). — One of this dimension's main actionable groups (90 warning-level).
  3. Resolve the 40 MethodTooLong finding(s) in God Classes — start with mod.rs (6), mesh.rs (3), lib.rs (2). — One of this dimension's main actionable groups (40 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.

D4 · Code Duplication9.5 / 10Stronggated by 549 serious findings✓ Tool-verified

What it measures: Copy-pasted code that should be shared instead.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.

Maturity: Documented → Verified → Prevented · effective 9.5 / 10 · rule-coverage 100% · ceiling Verified

528 duplicated block group(s) detected. A further 21 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 3 of the 549 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.

Duplicated block (8 lines × 2) · ×52crates/bevy_asset/src/io/file/file_asset.rs:176
Duplicated block (9 lines × 2) · ×37crates/bevy_anti_alias/src/dlss/node.rs:51
Duplicated block (10 lines × 2) · ×35crates/bevy_color/src/okcolor_convert.rs:92
Duplicated block (13 lines × 2) · ×31crates/bevy_curve/src/cubic_splines/mod.rs:189
Duplicated block (7 lines × 2) · ×31crates/bevy_asset/src/io/file/file_asset.rs:128

+ 134 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 52 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with lcha.rs (5), mod.rs (5), laba.rs (3). — One of this dimension's main actionable groups (52 warning-level).
  2. Resolve the 37 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with mesh.rs (4), node.rs (3), mod.rs (3). — One of this dimension's main actionable groups (37 warning-level).
  3. Resolve the 35 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with mod.rs (4), dim2.rs (2), gpu_preprocess.rs (2). — One of this dimension's main actionable groups (35 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.

D5 · Coupling6.9 / 10Adequate✓ 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.

Maturity: Documented → Verified → Prevented · effective 6.9 / 10 · rule-coverage 100% · ceiling Prevented

87 production modules (Cargo), 0 dependency cycle(s), 18 unstable depended-on module(s). Read from the build's own module declarations; 11 module(s) off the main sequence, with abstractness counted on 66 of the 87 (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: bevy_macro_utils · ×11
Unstable project bevy_animation
Unstable project bevy_anti_alias
Unstable project bevy_camera_controller
Unstable project bevy_dev_tools

+ 14 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 11 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (11 warning-level).
  2. Resolve the 1 Unstable project bevy_animation finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Unstable project bevy_anti_alias finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
  4. Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.

D6 · Cohesion (LCOM4)9.9 / 10Stronggated by 8 serious findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Verified

8 of 935 classes have LCOM4 above 3.

Low cohesion: Entity (LCOM4 10) · ×8crates/bevy_ecs/src/entity/mod.rs:447

What to do

  1. Resolve the 8 Low cohesion finding(s) in Cohesion (LCOM4) — start with mod.rs, gizmos.rs, unique_slice.rs. — One of this dimension's main actionable groups (8 warning-level).
  2. Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.

D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.

Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

3254 test methods: 3210 unit, 44 integration, 0 BDD, 0 e2e. The Rust suite contributes 3254 `#[test]` function(s) across 384 file(s) declaring at least one; its unit/integration split is Cargo's own — 6 of those file(s) are integration-test targets under a crate's tests/ directory, and the rest are #[test] functions compiled into the crate they test.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D13 · Secret Scanning5.0 / 10Adequate✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 5.0 / 10 · rule-coverage 100% · ceiling Prevented

1 secret(s) detected.

REDACTED

What to do

  1. Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Enforce Secret Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 of 844 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.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.8 / 10Stronggated by 45 serious findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.8 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: crates/bevy_pbr/src/render/light.rs (13×71=923); crates/bevy_pbr/src/render/mesh.rs (12×72=864); crates/bevy_gltf/src/loader/mod.rs (6×97=582) Repeated repair below the complexity floor: crates/bevy_asset/src/lib.rs (3 of 5 changes were fixes)

Hotspot: crates/bevy_pbr/src/render/light.rs · ×44crates/bevy_pbr/src/render/light.rs:1038
Repeated repair: crates/bevy_asset/src/lib.rscrates/bevy_asset/src/lib.rs:355

What to do

  1. Resolve the 44 Hotspot finding(s) in Churn × Complexity Hotspots — start with mod.rs (6), material.rs (2), lib.rs (2). — One of this dimension's main actionable groups (44 warning-level).
  2. Resolve the 1 Repeated repair finding(s) in Churn × Complexity Hotspots — start with lib.rs. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.

D16 · Bus Factor9.6 / 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.

Maturity: Documented → Verified → Prevented · effective 9.6 / 10 · rule-coverage 100% · ceiling Documented

39 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is crates/bevy_ecs/src/entity/unique_vec.rs. Counted over 1021 of the 1290 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 · ×3
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.

D17 · Explicit Debt9.9 / 10Stronggated by 258 serious findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Prevented

258 deducted task-comment markers across 515744 LoC (0.0/KLoC) → score 9.9. 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.

TodoComment · ×229tools/example-showcase/src/main.rs:882
FixmeComment · ×25crates/bevy_ui/src/lib.rs:272
HackComment · ×4examples/asset/compressed_image_saver.rs:106

What to do

  1. Resolve the 229 TodoComment finding(s) in Explicit Debt — start with mod.rs (40), lib.rs (17), resource_manager.rs (7). — One of this dimension's main actionable groups (229 warning-level).
  2. Resolve the 25 FixmeComment finding(s) in Explicit Debt — start with mesh.rs (5), image.rs (3), lib.rs (2). — One of this dimension's main actionable groups (25 warning-level).
  3. Resolve the 4 HackComment finding(s) in Explicit Debt — start with compressed_image_saver.rs, pccm.rs, reflect.rs. — One of this dimension's main actionable groups (4 warning-level).
  4. Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.

D19 · Documentation Quality10.0 / 10Exemplary○ Nothing flagged

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

1 of 1 documentation facets pass in full. 67 document(s) read across 1 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

What it measures: Whether architecture decisions are recorded well (context, decision, consequences).

Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

No architecture decision records were found.

No ADRs found

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality. — 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.

D23 · Boundary Type-Coupling9.9 / 10Stronggated by 21 serious findings✓ Tool-verified

What it measures: Whether domain types (IDs, enums, value objects) leak across bounded-context boundaries.

Method: Cross-context domain-type leakage via Roslyn structural classification (strongly-typed IDs / value objects) over every public surface. Exhaustive, deterministic, type-level aggregate-boundary check.

Coverage: Bounded contexts derived from NAMESPACE prefix (or graph-inferred where available); cross-boundary domain-type leakage then checked exhaustively over every public member of every type.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Verified

21 domain type(s) cross context boundaries across 3 contexts.

Cross-context type Entity (bevy_ecs → bevy_winit) · ×7crates/bevy_winit/src/winit_monitors.rs:30
Cross-context type Context (bevy_ecs → bevy_asset) · ×6crates/bevy_asset/src/io/memory.rs:262
Cross-context type UnsafeWorldCell (bevy_ecs → bevy_asset) · ×3crates/bevy_asset/src/asset_changed.rs:167
Cross-context type TableId (bevy_ecs → bevy_asset) · ×2crates/bevy_asset/src/asset_changed.rs:213
Cross-context type ArchetypeId (bevy_ecs → bevy_asset)crates/bevy_asset/src/asset_changed.rs:213

+ 2 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 7 Cross-context type Entity (bevy_ecs → bevy_winit) finding(s) in Boundary Type-Coupling — start with winit_windows.rs (4), converters.rs (2), winit_monitors.rs. — One of this dimension's main actionable groups (7 warning-level).
  2. Resolve the 6 Cross-context type Context (bevy_ecs → bevy_asset) finding(s) in Boundary Type-Coupling — start with mod.rs (4), memory.rs, processor_gated.rs. — One of this dimension's main actionable groups (6 warning-level).
  3. Resolve the 3 Cross-context type UnsafeWorldCell (bevy_ecs → bevy_asset) finding(s) in Boundary Type-Coupling — start with asset_changed.rs (2), reflect.rs. — One of this dimension's main actionable groups (3 warning-level).
  4. Enforce Boundary Type-Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

Detailed fixes: d23_recommendation.md · top locations in Appendix A, every location in findings.md.

D26 · Project Cohesion8.0 / 10Strong✓ Tool-verified

What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.

Method: Project size overshoot penalties (LoC / public-type count / namespace count, 2-of-3 flag) weighted by log magnitude. Exhaustive across projects, deterministic, LLM-independent.

Maturity: Documented → Verified → Prevented · effective 8.0 / 10 · rule-coverage 100% · ceiling Documented

9 of 87 build units (Cargo) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

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

D28 · Secrets (history)10.0 / 10Exemplary○ Nothing flagged

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

gitleaks scanned the full history AND the current working tree and found no secrets.

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)0.0 / 10Critical✓ Tool-verified

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

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

68 finding(s): 0 critical, 66 high, 2 medium, 0 low. semgrep hit a parse error in 16 file(s) — `crates/bevy_ecs/src/entity/mod.rs` (line 343), `crates/bevy_ecs/src/observer/mod.rs` (line 1844), `crates/bevy_ecs/src/query/state.rs` (line 144, lines 145–146, line 1320, …), `crates/bevy_ecs/src/system/builder.rs` (line 283, line 347, line 472), `crates/bevy_ecs/src/system/function_system.rs` (line 337, line 692, line 757, …), … (+11 more) — 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. Separately, one or more rules could not re-parse an embedded snippet in 2 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 1 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 51 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (24), REDACTED (9), REDACTED (6). — One of this dimension's main actionable groups (51 issue-level).
  2. Resolve the 9 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (4), REDACTED (3), REDACTED. — One of this dimension's main actionable groups (9 issue-level).
  3. Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3). — One of this dimension's main actionable groups (3 issue-level).

Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.

D30 · Dependency Vulnerabilities0.0 / 10Critical✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

23 finding(s): 2 critical, 18 high, 1 medium, 2 low.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 17 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (17). — One of this dimension's main actionable groups (17 issue-level).
  2. Resolve the 2 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
  3. Resolve the 1 High vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).

Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.

D34 · Knowledge Freshness9.1 / 10Adequategated by 7 critical findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.1 / 10 · rule-coverage 100% · ceiling Documented

95 of 1021 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is crates/bevy_shape/src/bounding/bounded2d/primitive_impls.rs. Counted over 1021 of the 1290 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned knowledge · ×7crates/bevy_shape/src/bounding/bounded2d/primitive_impls.rs:1
Orphaned file · ×88crates/bevy_math/src/compass.rs:1
Further orphaned files (smaller)

What to do

  1. Resolve the 7 Orphaned knowledge finding(s) in Knowledge Freshness — start with primitive_impls.rs (2), hash_set.rs, rotation2d.rs. — One of this dimension's main actionable groups (7 issue-level).
  2. Resolve the 88 Orphaned file finding(s) in Knowledge Freshness — start with mod.rs (4), specializer.rs (2), processor.rs (2). — One of this dimension's main actionable groups (88 recommendation-level).
  3. Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.

D35 · Change Coupling9.5 / 10Stronggated by 21 serious findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.5 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: main_opaque_pass_3d_node.rs↔main_transparent_pass_3d_node.rs 92%; mod.rs↔mod.rs 89%; multi_threaded.rs↔single_threaded.rs 89%

Change coupling: mod.rs ↔ mod.rs · ×15crates/bevy_shape/src/bounding/bounded2d/mod.rs:1
Change-coupling hub: main_transparent_pass_3d_node.rs → main_transparent_pass_2d_node.rs, main_opaque_pass_3d_node.rs, node.rs, node.rs, node.rs · ×4crates/bevy_core_pipeline/src/core_3d/main_transparent_pass_3d_node.rs
Change coupling clique: directional_light.rs, point_light.rs, spot_light.rs · ×2crates/bevy_light/src/directional_light.rs

What to do

  1. Resolve the 15 Change coupling finding(s) in Change Coupling — start with mod.rs (7), main_opaque_pass_3d_node.rs (2), multi_threaded.rs. — One of this dimension's main actionable groups (15 warning-level).
  2. Resolve the 4 Change-coupling hub finding(s) in Change Coupling — start with main_transparent_pass_3d_node.rs, node.rs, mod.rs. — One of this dimension's main actionable groups (4 warning-level).
  3. Resolve the 2 Change coupling clique finding(s) in Change Coupling — start with directional_light.rs, node.rs. — One of this dimension's main actionable groups (2 warning-level).

Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.

D36 · Supply-chain Provenance & Signing2.5 / 10Weak✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 2.5 / 10 · rule-coverage 100% · ceiling Documented

1/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 2 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. 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).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  3. 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.

D37 · Vulnerability-disclosure Policy10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.

Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

A vulnerability-disclosure policy (SECURITY.md) is published with a reporting contact.

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

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. Scored 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. SCORED, not informational.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.

Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 2 platform declaration(s) and 5 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

R = React/JS · M = Maturity · P = Readiness.

AX10 · Code composition10.0 / 10Exemplary✓ Tool-verified

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.

What to do

  • The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

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.

AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

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.

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.

AX9 · CQS / query purity10.0 / 10Exemplary✓ Tool-verified

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.

C2 · Access Controls0.0 / 10Critical✓ Tool-verified

Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.

Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.

  • This repository serves requests — a server (.serve_connection) (crates/bevy_remote/src/http.rs:295) — and no route guard, auth-gate middleware, global guard or imperative check that refuses a caller (401/403, an Unauthorized/Forbidden error) was found: its endpoints may be unprotected. — crates/bevy_remote/src/http.rs:295

What to do

  • Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do.
ES1 · Fold determinism10.0 / 10Exemplary✓ Tool-verified

Other · Event Sourcing — Whether the recovery-replay fold is deterministic — state derived purely from each event's own fields, no clock/random/IO on the replay path.

Method: Roslyn syntax scan (event-sourcing gated): Apply/When folds checked for forbidden tokens (DateTime.Now, Guid.NewGuid, Random, IO), stripped of comments/strings. Deterministic, hard fact per fold.

ES2 · Immutable events10.0 / 10Exemplary✓ Tool-verified

Other · Event Sourcing — Whether domain events stay immutable (private fields, set once) rather than carrying mutable state.

Method: Roslyn scan (event-sourcing gated): persisted events checked for public setters; immutability verified per property/field. Deterministic, hard fact.

M1 · Documentation (README)9.2 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.

Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.

What to do

  • Add a README to the 41 of 104 project(s) that lack one — worth up to 0.8 pts.
M2 · Architecture documentation5.0 / 10Adequate✓ Tool-verified

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.

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.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

M4 · Documentation accuracy10.0 / 10Exemplary○ Nothing flagged

Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).

Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.

P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

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.

P10 · Library API & versioning6.0 / 10Adequate✓ Tool-verified

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

  • 3579/4852 types (74%) declared in the published library are public. For a library, every public type is a stability contract — keep implementation types off the surface and expose only the intended API.

What to do

  • Keep implementation types off the public surface (Rust: `pub(crate)`, or keep the module private) so internals can change without breaking consumers.
P2 · Observability6.9 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

  • Only 44/45 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `crates/bevy_color/crates/gen_tests`.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
P3 · Security & performance tooling9.0 / 10Exemplary✓ Tool-verified

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.

What to do

  • Dependabot is configured but does not watch `npm`, `gradle` — add those `package-ecosystem` entries to .github/dependabot.yml so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback7.0 / 10Strong✓ Tool-verified

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.

P6 · Release Hygiene8.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

  • The changelog this check read carries 0 versioned entries, against a bar of 3. Counted as either the distinct `x.y.z` versions it names (a link's target is not counted) or its version-shaped section headings (`## [1.2.0]`, `## V14.x.x`, `## Updates in 8.0.x`), whichever is the larger — so a log sectioned by minor series counts its sections, not its individual patch numbers. Entries recorded somewhere this check does not read — release notes generated at tag time from a generator config it did not recognise, or a log kept outside the repository — are not counted here, and this row is about what is re-findable in the tree rather than about how often you release.

What to do

  • Keep the changelog current — add a versioned entry (Keep-a-Changelog ## [x.y.z]) for each release so the history isn't a stub.
PF1 · Benchmark discipline8.5 / 10Exemplary✓ Tool-verified

Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.

Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.

PF3 · Async & latency hygiene10.0 / 10Exemplary✓ Tool-verified

Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.

Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from the language model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

S1 · Web-Security Posture6.0 / 10Adequate✓ Tool-verified

Other · Security — Read from this repository's Rust source: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS (certificate validation, protocol version) — facts about code that hold whether or not it serves anything itself. This repository serves HTTP itself (`.serve_connection(` (crates/bevy_remote/src/http.rs:295)), so its Rust source was also read for the server controls: TLS served or HSTS set, security response headers, cookie flags and inbound validation — each credited where its Rust spelling appears in production source, not proven on every route. A Rocket 0.5 application is credited the headers Rocket's default `Shield` sends unless it attaches its own, and its cookie jar's SameSite=Strict default; a session middleware its default cookie flags.

Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.

  • None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is set on a response this repository's Rust server sends — defense in depth, even when a proxy could set them. (−2.0 on this card.) The server: `.serve_connection(` (crates/bevy_remote/src/http.rs:295).
  • No handler of this repository's Rust server answers 400, 413 or 422 (`StatusCode::BAD_REQUEST`, `HttpResponse::BadRequest()`, `Status::BadRequest`, tonic `Status::invalid_argument`), and nothing declares validation — no `validator`/`garde` derive, no body limit (`DefaultBodyLimit::max`, `RequestBodyLimitLayer`, `JsonConfig::default().limit(…)`, Rocket `Limits`) — nothing shows inbound requests being checked, and refused, before a handler acts on them. A check that answers its failure with 200 and an error body is not seen. (−2.0 on this card.) The server: `.serve_connection(` (crates/bevy_remote/src/http.rs:295).

What to do

  • Set security response headers on what the server sends — actix-web's `DefaultHeaders::new().add((header::X_CONTENT_TYPE_OPTIONS, "nosniff"))`, tower-http's `SetResponseHeaderLayer::overriding(…)` on an axum router, or keep Rocket's default `Shield` — with `Content-Security-Policy`, `X-Content-Type-Options` and a frame policy on every response.
  • Validate what the server reads from a request — path, query, headers, body size and shape — and answer what fails with 400 (413 for an oversized body) before a handler acts on it: derive `validator::Validate` (or `garde::Validate`) on the request types and reject with `StatusCode::BAD_REQUEST`, and cap bodies with `DefaultBodyLimit::max`/`RequestBodyLimitLayer` or actix's `JsonConfig::default().limit(…)`.
X1 · Async correctness7.9 / 10Strong✓ Tool-verified

Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.

Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.

  • This `async` body is polled on an executor's worker thread, and `std::thread::sleep` blocks that thread: for the whole delay no other task scheduled on it makes progress — the Rust form of blocking on a task. Use `tokio::time::sleep(…).await` (or the runtime's own timer), which suspends only this task. Where the blocking work is not a sleep but a synchronous call that cannot be made async, move it off the executor with `tokio::task::spawn_blocking(…).await`. — crates/bevy_remote/src/client.rs:310

What to do

  • Blocking `thread::sleep` inside an `async` body
X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

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.

X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.

Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.

X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

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.

X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `for` loop leaves the `RefCell` it is walking alone — safe Rust rejects a body that changes the collection its loop borrows at compile time, except through interior mutability: a `RefCell` borrowed in the loop's header stays borrowed until the loop ends, so a `borrow_mut()` of it inside the body panics with `already borrowed: BorrowMutError` and the remaining elements are never seen.

Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.

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.

X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.

Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.

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.

X4 · Structured logging2.5 / 10Weak✓ Tool-verified

Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.

Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.

  • `info!` at line 27 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_winit/src/game_mode.rs:27
  • `error!` at line 29 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_winit/src/game_mode.rs:29
  • `info!` at line 70 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_winit/src/game_mode.rs:70
  • `error!` at line 73 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_winit/src/game_mode.rs:73
  • `warn!` at line 229 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_winit/src/state.rs:229
  • `warn!` at line 234 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_winit/src/state.rs:234
  • `info!` at line 67 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_winit/src/system.rs:67
  • `info!` at line 235 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_winit/src/system.rs:235
  • `info!` at line 266 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_winit/src/system.rs:266
  • `error!` at line 424 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_winit/src/system.rs:424
  • `warn!` at line 493 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_winit/src/system.rs:493
  • `warn!` at line 500 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_winit/src/system.rs:500
  • `warn!` at line 613 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_winit/src/system.rs:613
  • `warn!` at line 629 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_winit/src/system.rs:629
  • `warn!` at line 321 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_winit/src/winit_windows.rs:321
  • `warn!` at line 393 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_winit/src/winit_windows.rs:393
  • `warn!` at line 398 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_winit/src/winit_windows.rs:398
  • `error!` at line 459 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_winit/src/winit_windows.rs:459
  • `warn!` at line 514 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_winit/src/winit_windows.rs:514
  • `warn!` at line 149 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_winit/src/cursor/mod.rs:149
  • `warn!` at line 169 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_winit/src/cursor/mod.rs:169
  • `warn!` at line 182 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_winit/src/cursor/mod.rs:182
  • `error!` at line 71 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_ui_render/src/render_pass.rs:71
  • `info!` at line 16 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_ui/src/layout/debug.rs:16
  • `warn!` at line 20 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_transform/src/systems.rs:20
  • `warn!` at line 1637 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_text/src/text.rs:1637
  • `warn!` at line 1650 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_text/src/text.rs:1650
  • `warn!` at line 1656 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_text/src/text.rs:1656
  • `warn!` at line 1670 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_text/src/text.rs:1670
  • `warn!` at line 1680 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_text/src/text.rs:1680
  • `warn!` at line 1686 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_text/src/text.rs:1686
  • `warn!` at line 139 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_sprite_render/src/tilemap_chunk/mod.rs:139
  • `warn!` at line 148 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_sprite_render/src/tilemap_chunk/mod.rs:148
  • `warn!` at line 154 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_sprite_render/src/tilemap_chunk/mod.rs:154
  • `warn!` at line 215 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_sprite_render/src/tilemap_chunk/mod.rs:215
  • `warn!` at line 230 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_sprite_render/src/tilemap_chunk/mod.rs:230
  • `warn!` at line 237 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_sprite_render/src/tilemap_chunk/mod.rs:237
  • `warn!` at line 244 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_sprite_render/src/tilemap_chunk/mod.rs:244
  • `error!` at line 959 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_sprite_render/src/mesh2d/material.rs:959
  • `error!` at line 393 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/bevy_sprite_render/src/mesh2d/wireframe2d.rs:393

What to do

  • Interpolated log message defeats structured logging

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.

LensScoreRatingImpact
Code Health60%Adequate — gated by X4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture96%ExemplarySolid.
Maturity81%StrongSolid.
Readiness72%StrongSolid.
Security34%Weak — gated by D29, D30, D36, C2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Event Sourcing100%ExemplaryStrongest area.
Performance91%ExemplarySolid.
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 — 18 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 3 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 — 64 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 — Frontend below the scale floor (2 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC2 Forms & labels — Frontend below the scale floor (2 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC3 Page structure — Frontend below the scale floor (2 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC4 Keyboard semantics — Frontend below the scale floor (2 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC5 ARIA correctness — Frontend below the scale floor (2 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC6 Visual & motion safety — Frontend below the scale floor (2 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC7 A11y enforcement — Frontend below the scale floor (2 DOM element(s) < 25) — too little surface to assess accessibility.
  • AX1 Captive dependencies — Not applicable: this repository's Kotlin 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 class in this Kotlin code is a Spring, JSR-330 or CDI singleton bean. 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.
  • 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 — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • 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.
  • 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 — ~107815 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 — 3 Maven/Gradle manifest(s) were read, stating a version for 5 dependency(ies) and leaving 0 to a parent or an imported BOM, but no build resolved the dependency graph, so the outdated signal was not established. 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 — Naming consistency is measured on C# only; Kotlin, Rust, html not measured.
  • D22 Internal API Consistency — API consistency is measured on C# only; the exposed Rust surface was not measured.
  • D24 Comment Value — D24 reads C# and Visual Basic comments only — this repository's production source is .kt, .rs, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • 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.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • 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.
  • 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 — JavaScript/TypeScript suite
  • DM1 Domain Modelling — applicable but not scored (3 signals for this style, 3 needed — the count is met but a required primary signal is absent): 48 aggregate root(s) (types guarding their own state behind command methods — this language has no AggregateRoot base to inherit); 706 value object(s); 4 domain event(s); its domain events are published by services or handlers — no domain entity raises one; no aggregate is declared and no domain structure surrounds the state-guarding types: not claimed as DDD
  • 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
  • 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 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 — no coverage report found on disk — produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • PF2 Allocation hygiene — Not applicable: Rust spells out every heap allocation and makes borrowed slices (&[T], &str) its ordinary parameter types, so the allocation-aware style this card rewards elsewhere is the language's baseline rather than a rung to climb.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X12 Unreachable branch — 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
  • X13 Undrained process stream — 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
  • X16 Unfloored truncation loop — 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
  • X17 Uncapped recursion over a caller-supplied document — 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
  • X18 Disposal-pattern correctness — 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
  • X19 Unrestored process-global state — 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
  • X2 Cancellation propagation — no C# was loaded; this repository's Rust was read, and no request in it can be cancelled by a caller — 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 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
  • X23 Unguarded diagnostic materialisation — 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
  • X24 Document value interpolated into markup unescaped — 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
  • X25 Inert configuration knob — 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
  • X26 Unsynchronised callback handoff — Not applicable: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. Rust's compiler refuses the unsynchronised version: a collection shared between a callback's thread and the waiting body must be `Sync`, which a `Vec`, `VecDeque` or `HashMap` is only behind a `Mutex`/`RwLock`, so the race this check looks for cannot be written in safe Rust. Not a gap in the analyzer and not a finding about your code.
  • X3 Exception handling — 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
  • 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.
  • 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.

Critical — 94 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 26 more in this group — see findings.md.
D30 · Dependency Vulnerabilities · High CVE · ×17
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D34 · Knowledge Freshness · Orphaned knowledge · ×7
  • Orphaned knowledge crates/bevy_shape/src/bounding/bounded2d/primitive_impls.rs:1 — No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
  • Orphaned knowledge crates/bevy_platform/src/collections/hash_set.rs:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge crates/bevy_math/src/rotation2d.rs:1 — No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
  • Orphaned knowledge crates/bevy_shape/src/bounding/bounded3d/primitive_impls.rs:1 — No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
  • Orphaned knowledge crates/bevy_shape/src/sampling/shape_sampling.rs:1 — No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
  • Orphaned knowledge crates/bevy_curve/src/derivatives/adaptor_impls.rs:1 — No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
  • Orphaned knowledge crates/bevy_math/src/isometry.rs:1 — No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Critical CVE · ×2
  • REDACTED
  • REDACTED
D13 · Secret Scanning · Leaked secret · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · High vulnerability · ×1
  • REDACTED
Serious — 1666 finding(s)
D17 · Explicit Debt · TodoComment · ×229
  • TodoComment tools/example-showcase/src/main.rs:882 — // TODO: be able to differentiate between WebGL2, WebGPU, both, or neither (for examples that could run on Wasm without a renderer) — 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/window/minimizing.rs:6 — // TODO: Combine this with `resizing` once multiple_windows is simpler than — 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/window/resizing.rs:7 — // TODO: Add a check for platforms other than X11 for 0xk and kx0, despite those currently unsupported on CI. — 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/window/resizing.rs:60 — // TODO: Debug and fix this if feasible — 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 examples/large_scenes/mipmap_generator/src/lib.rs:53 — // TODO: low_quality normals should probably use BC5 or BC7 as they looks quite bad at BC1 — 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 examples/large_scenes/mipmap_generator/src/lib.rs:454 — // TODO Is this an issue? A bit difficult to work around since it's &['static] — 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 examples/large_scenes/bevy_city/src/assets.rs:275 — // TODO generate color variations — 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 examples/camera/pan_orbit_camera_custom_input_plugin.rs:307 — // TODO: add pinch zoom support — 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 examples/3d/lighting.rs:260 — // TODO: Clamp values to a reasonable range — 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 crates/bevy_world_serialization/src/dynamic_world.rs:220 — // TODO: move to AssetSaver when it is implemented — 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 crates/bevy_world_serialization/src/lib.rs:214 — // TODO: multiple updates to avoid debounced asset events. See comment on WorldInstanceSpawner::debounced_world_asset_events — 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 crates/bevy_world_serialization/src/lib.rs:359 — // TODO: multiple updates to avoid debounced asset events. See comment on WorldInstanceSpawner::debounced_world_asset_events — 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 crates/bevy_world_serialization/src/serde.rs:197 — // TODO: Make this configurable. — 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 crates/bevy_world_serialization/src/world_asset_spawner.rs:88 — // TODO: temp fix for https://github.com/bevyengine/bevy/issues/12756 effect on world assets
  • TodoComment crates/bevy_world_serialization/src/world_asset_spawner.rs:97 — // TODO: temp fix for https://github.com/bevyengine/bevy/issues/12756 effect on dynamic worlds
  • TodoComment crates/bevy_world_serialization/src/world_asset_spawner.rs:532 — // TODO: triggering this for PLACEHOLDER is suboptimal, but this scene system is on — 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 crates/bevy_winit/src/state.rs:473 — // TODO: This is a workaround for https://github.com/bevyengine/bevy/issues/17488
  • TodoComment crates/bevy_winit/src/winit_windows.rs:408 — // TODO: When Winit 0.31 releases this function can be removed and replaced with — 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 crates/bevy_ui_widgets/src/dialog.rs:184 — // TODO: multiple windows? dragging between them, etc — 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 crates/bevy_ui_widgets/src/menu.rs:198 — // TODO: Change this logic when we support submenus. Don't want to send multiple close — 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 crates/bevy_ui_widgets/src/observe.rs:1 — // TODO: This probably doesn't belong in bevy_ui_widgets, but I am not sure where it should go. — 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 crates/bevy_ui_widgets/src/scrollbar.rs:31 — // TODO: Move this to a more central place. — 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 crates/bevy_ui_widgets/src/text_input.rs:588 — // TODO: support multiple windows and track which one has focus — 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 crates/bevy_ui_render/src/lib.rs:1363 — // TODO: Consider computing this value at runtime based on the maximum z-value. — 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 crates/bevy_ui_render/src/lib.rs:1367 — // TODO: Evaluate if we still need this. — 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.
  • + 204 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×101
  • FileTooLong: render/mesh.rs crates/bevy_pbr/src/render/mesh.rs — FileTooLong — 3033 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 2533 over it, 6.07× 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: query/fetch.rs crates/bevy_ecs/src/query/fetch.rs — FileTooLong — 2423 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 1923 over it, 4.85× 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: render/light.rs crates/bevy_pbr/src/render/light.rs — FileTooLong — 2196 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 1696 over it, 4.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: render/gpu_preprocess.rs crates/bevy_pbr/src/render/gpu_preprocess.rs — FileTooLong — 2120 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 1620 over it, 4.24× 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 crates/bevy_ui_render/src/lib.rs — FileTooLong — 1838 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 1338 over it, 3.68× 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/ui_node.rs crates/bevy_ui/src/ui_node.rs — FileTooLong — 1751 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 1251 over it, 3.50× 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: batching/gpu_preprocessing.rs crates/bevy_render/src/batching/gpu_preprocessing.rs — FileTooLong — 1612 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 1112 over it, 3.22× 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/material_bind_groups.rs crates/bevy_render/src/material_bind_groups.rs — FileTooLong — 1569 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 1069 over it, 3.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/image.rs crates/bevy_image/src/image.rs — FileTooLong — 1537 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 1037 over it, 3.07× 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: loader/mod.rs crates/bevy_gltf/src/loader/mod.rs — FileTooLong — 1532 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 1032 over it, 3.06× 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/details_panel.rs crates/bevy_inspector/src/details_panel.rs — FileTooLong — 1480 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 72 free functions. The bar is 500 significant lines; this is 980 over it, 2.96× 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/mesh.rs crates/bevy_mesh/src/mesh.rs — FileTooLong — 1442 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: Mesh (3 blocks, 230-3027). The bar is 500 significant lines; this is 942 over it, 2.88× 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: query/iter.rs crates/bevy_ecs/src/query/iter.rs — FileTooLong — 1386 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 886 over it, 2.77× 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: world/mod.rs crates/bevy_ecs/src/world/mod.rs — FileTooLong — 1369 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 95% of them inside a single declaration: World (7 blocks, 96-4060). The bar is 500 significant lines; this is 869 over it, 2.74× 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: server/mod.rs crates/bevy_asset/src/server/mod.rs — FileTooLong — 1365 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 68% of them inside a single declaration: AssetServer (3 blocks, 66-2368). The bar is 500 significant lines; this is 865 over it, 2.73× 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: controls/number_input.rs crates/bevy_feathers/src/controls/number_input.rs — FileTooLong — 1295 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 34 free functions. The bar is 500 significant lines; this is 795 over it, 2.59× 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/builtin_methods.rs crates/bevy_remote/src/builtin_methods.rs — FileTooLong — 1281 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 47 free functions. The bar is 500 significant lines; this is 781 over it, 2.56× 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: system/system_param.rs crates/bevy_ecs/src/system/system_param.rs — FileTooLong — 1264 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 764 over it, 2.53× 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/wireframe.rs crates/bevy_pbr/src/wireframe.rs — FileTooLong — 1154 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 654 over it, 2.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: src/as_bind_group.rs crates/bevy_render/macros/src/as_bind_group.rs — FileTooLong — 1151 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 651 over it, 2.30× 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/material.rs crates/bevy_pbr/src/material.rs — FileTooLong — 1130 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 630 over it, 2.26× 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: render_phase/mod.rs crates/bevy_render/src/render_phase/mod.rs — FileTooLong — 1113 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 613 over it, 2.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: prepass/mod.rs crates/bevy_pbr/src/prepass/mod.rs — FileTooLong — 1108 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 608 over it, 2.22× 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: processor/mod.rs crates/bevy_asset/src/processor/mod.rs — FileTooLong — 1101 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 68% of them inside a single declaration: AssetProcessor (2 blocks, 98-1338). The bar is 500 significant lines; this is 601 over it, 2.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/ktx2.rs crates/bevy_image/src/ktx2.rs — FileTooLong — 1064 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 564 over it, 2.13× 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.
  • + 76 more in this group — see findings.md.
D3 · God Classes · FunctionTooLong · ×90
  • FunctionTooLong: bevy_render_macros::as_bind_group::derive_as_bind_group crates/bevy_render/macros/src/as_bind_group.rs:63 — FunctionTooLong — bevy_render_macros::as_bind_group::derive_as_bind_group runs 677 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 577 over it, 6.77× 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: bevy_image::ktx2::ktx2_dfd_header_to_texture_format crates/bevy_image/src/ktx2.rs:478 — FunctionTooLong — bevy_image::ktx2::ktx2_dfd_header_to_texture_format runs 489 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 389 over it, 4.89× 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: bevy_ecs_macros::query_data::derive_query_data_impl crates/bevy_ecs/macros/src/query_data.rs:126 — FunctionTooLong — bevy_ecs_macros::query_data::derive_query_data_impl runs 395 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 295 over it, 3.95× 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: bevy_pbr::meshlet::resource_manager::prepare_meshlet_view_bind_groups crates/bevy_pbr/src/meshlet/resource_manager.rs:795 — FunctionTooLong — bevy_pbr::meshlet::resource_manager::prepare_meshlet_view_bind_groups runs 375 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 275 over it, 3.75× 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: bevy_pbr::meshlet::pipelines::init_meshlet_pipelines crates/bevy_pbr/src/meshlet/pipelines.rs:43 — FunctionTooLong — bevy_pbr::meshlet::pipelines::init_meshlet_pipelines runs 336 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 236 over it, 3.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.
  • FunctionTooLong: bevy_picking::events::pointer_events crates/bevy_picking/src/events.rs:816 — FunctionTooLong — bevy_picking::events::pointer_events runs 334 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 234 over it, 3.34× 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: bevy_feathers::controls::color_input::color_input_popup crates/bevy_feathers/src/controls/color_input.rs:353 — FunctionTooLong — bevy_feathers::controls::color_input::color_input_popup runs 328 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 228 over it, 3.28× 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: bevy_winit::converters::convert_logical_key crates/bevy_winit/src/converters.rs:307 — FunctionTooLong — bevy_winit::converters::convert_logical_key runs 320 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 220 over it, 3.20× 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: bevy_feathers::dark_theme::create_dark_theme crates/bevy_feathers/src/dark_theme.rs:13 — FunctionTooLong — bevy_feathers::dark_theme::create_dark_theme runs 269 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 169 over it, 2.69× 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: bevy_pbr::cluster::gpu::cluster_on_gpu crates/bevy_pbr/src/cluster/gpu.rs:819 — FunctionTooLong — bevy_pbr::cluster::gpu::cluster_on_gpu runs 262 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 162 over it, 2.62× 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: bevy_image::ktx2::ktx2_format_to_texture_format crates/bevy_image/src/ktx2.rs:1205 — FunctionTooLong — bevy_image::ktx2::ktx2_format_to_texture_format runs 258 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 158 over it, 2.58× 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: bevy_pbr::meshlet::visibility_buffer_raster_node::meshlet_visibility_buffer_raster crates/bevy_pbr/src/meshlet/visibility_buffer_raster_node.rs:21 — FunctionTooLong — bevy_pbr::meshlet::visibility_buffer_raster_node::meshlet_visibility_buffer_raster runs 252 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 152 over it, 2.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: bevy_render::batching::gpu_preprocessing::batch_and_prepare_binned_render_phase crates/bevy_render/src/batching/gpu_preprocessing.rs:2079 — FunctionTooLong — bevy_render::batching::gpu_preprocessing::batch_and_prepare_binned_render_phase runs 229 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 129 over it, 2.29× 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: bevy_solari::realtime::node::solari_lighting crates/bevy_solari/src/realtime/node.rs:86 — FunctionTooLong — bevy_solari::realtime::node::solari_lighting runs 229 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 129 over it, 2.29× 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: bevy_sprite_render::text2d::extract_text2d_sprite crates/bevy_sprite_render/src/text2d/mod.rs:24 — FunctionTooLong — bevy_sprite_render::text2d::extract_text2d_sprite runs 229 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 129 over it, 2.29× 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: bevy_pbr::meshlet::resource_manager::prepare_meshlet_per_frame_resources crates/bevy_pbr/src/meshlet/resource_manager.rs:508 — FunctionTooLong — bevy_pbr::meshlet::resource_manager::prepare_meshlet_per_frame_resources runs 226 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 126 over it, 2.26× 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: bevy_ui_render::prepare_uinodes crates/bevy_ui_render/src/lib.rs:2275 — FunctionTooLong — bevy_ui_render::prepare_uinodes runs 218 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 118 over it, 2.18× 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: bevy_gltf::loader::load_node crates/bevy_gltf/src/loader/mod.rs:1610 — FunctionTooLong — bevy_gltf::loader::load_node runs 213 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 113 over it, 2.13× 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: bevy_solari::realtime::node::init_solari_lighting_pipelines crates/bevy_solari/src/realtime/node.rs:401 — FunctionTooLong — bevy_solari::realtime::node::init_solari_lighting_pipelines runs 210 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 110 over it, 2.10× 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: bevy_ui::layout::update_uinode_geometry_recursive crates/bevy_ui/src/layout/mod.rs:548 — FunctionTooLong — bevy_ui::layout::update_uinode_geometry_recursive runs 207 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 107 over it, 2.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.
  • FunctionTooLong: bevy_render::camera::extract_cameras crates/bevy_render/src/camera.rs:482 — FunctionTooLong — bevy_render::camera::extract_cameras runs 202 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 102 over it, 2.02× 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: bevy_winit::converters::convert_physical_key_code crates/bevy_winit/src/converters.rs:101 — FunctionTooLong — bevy_winit::converters::convert_physical_key_code runs 200 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 100 over it, 2.00× 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: bevy_gltf::loader::load_material crates/bevy_gltf/src/loader/mod.rs:1357 — FunctionTooLong — bevy_gltf::loader::load_material runs 198 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 98 over it, 1.98× 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: bevy_image::ktx2::ktx2_buffer_to_image crates/bevy_image/src/ktx2.rs:30 — FunctionTooLong — bevy_image::ktx2::ktx2_buffer_to_image runs 198 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 98 over it, 1.98× 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: bevy_pbr::material::queue_material_meshes crates/bevy_pbr/src/material.rs:1193 — FunctionTooLong — bevy_pbr::material::queue_material_meshes runs 197 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 97 over it, 1.97× 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.
  • + 65 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×52
  • Duplicated block (8 lines × 2) crates/bevy_asset/src/io/file/file_asset.rs:176 — crates/bevy_asset/src/io/file/file_asset.rs:176-183 | crates/bevy_asset/src/io/file/file_asset.rs:187-194 — 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) crates/bevy_asset/src/io/file/file_asset.rs:214 — crates/bevy_asset/src/io/file/file_asset.rs:214-221 | crates/bevy_asset/src/io/file/file_asset.rs:230-237 — 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) crates/bevy_asset/src/io/file/sync_file_asset.rs:186 — crates/bevy_asset/src/io/file/sync_file_asset.rs:186-193 | crates/bevy_asset/src/io/file/sync_file_asset.rs:197-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.
  • Duplicated block (8 lines × 2) crates/bevy_asset/src/io/file/sync_file_asset.rs:252 — crates/bevy_asset/src/io/file/sync_file_asset.rs:252-259 | crates/bevy_asset/src/io/file/sync_file_asset.rs:268-275 — 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) crates/bevy_color/src/hsla.rs:117 — crates/bevy_color/src/hsla.rs:117-124 | crates/bevy_color/src/okhsla.rs:124-131 — before extracting anything, compare `crates/bevy_color/src/hsla.rs` and `crates/bevy_color/src/okhsla.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) crates/bevy_color/src/hsva.rs:88 — crates/bevy_color/src/hsva.rs:88-95 | crates/bevy_color/src/okhsva.rs:93-100 — 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) crates/bevy_color/src/hwba.rs:91 — crates/bevy_color/src/hwba.rs:91-98 | crates/bevy_color/src/okhwba.rs:88-95 — 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) crates/bevy_color/src/laba.rs:99 — crates/bevy_color/src/laba.rs:99-106 | crates/bevy_color/src/oklaba.rs:100-107 — before extracting anything, compare `crates/bevy_color/src/laba.rs` and `crates/bevy_color/src/oklaba.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) crates/bevy_color/src/lcha.rs:121 — crates/bevy_color/src/lcha.rs:121-128 | crates/bevy_color/src/oklcha.rs:116-123 — before extracting anything, compare `crates/bevy_color/src/lcha.rs` and `crates/bevy_color/src/oklcha.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) crates/bevy_color/src/linear_rgba.rs:218 — crates/bevy_color/src/linear_rgba.rs:218-225 | crates/bevy_color/src/srgba.rs:265-272 — before extracting anything, compare `crates/bevy_color/src/linear_rgba.rs` and `crates/bevy_color/src/srgba.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) crates/bevy_core_pipeline/src/core_2d/main_opaque_pass_2d_node.rs:32 — crates/bevy_core_pipeline/src/core_2d/main_opaque_pass_2d_node.rs:32-39 | crates/bevy_core_pipeline/src/core_3d/main_opaque_pass_3d_node.rs:49-58 — `crates/bevy_core_pipeline/src/core_2d/main_opaque_pass_2d_node.rs` and `crates/bevy_core_pipeline/src/core_3d/main_opaque_pass_3d_node.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 30 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (8 lines × 2) crates/bevy_core_pipeline/src/core_2d/main_transparent_pass_2d_node.rs:74 — crates/bevy_core_pipeline/src/core_2d/main_transparent_pass_2d_node.rs:74-81 | crates/bevy_core_pipeline/src/core_3d/main_transparent_pass_3d_node.rs:99-106 — 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 (8 lines × 2) crates/bevy_curve/src/adaptors.rs:651 — crates/bevy_curve/src/adaptors.rs:651-658 | crates/bevy_curve/src/adaptors.rs:710-717 — 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) crates/bevy_derive/src/derefs.rs:14 — crates/bevy_derive/src/derefs.rs:14-21 | crates/bevy_derive/src/derefs.rs:37-44 — 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) crates/bevy_ecs/src/change_detection/params.rs:1547 — crates/bevy_ecs/src/change_detection/params.rs:1547-1554 | crates/bevy_ecs/src/change_detection/params.rs:1560-1567 — 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) crates/bevy_feathers/src/controls/number_input.rs:1264 — crates/bevy_feathers/src/controls/number_input.rs:1264-1271 | crates/bevy_feathers/src/controls/slider.rs:301-308 — 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) crates/bevy_mesh/src/primitives/dim3/capsule.rs:237 — crates/bevy_mesh/src/primitives/dim3/capsule.rs:237-244 | crates/bevy_mesh/src/primitives/dim3/capsule.rs:247-254 — 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) crates/bevy_pbr/src/meshlet/material_pipeline_prepare.rs:182 — crates/bevy_pbr/src/meshlet/material_pipeline_prepare.rs:182-189 | crates/bevy_pbr/src/meshlet/material_pipeline_prepare.rs:358-365 — 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) crates/bevy_pbr/src/prepass/mod.rs:455 — crates/bevy_pbr/src/prepass/mod.rs:455-462 | crates/bevy_pbr/src/render/mesh.rs:3610-3617 — before extracting anything, compare `crates/bevy_pbr/src/prepass/mod.rs` and `crates/bevy_pbr/src/render/mesh.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) crates/bevy_pbr/src/wireframe.rs:1104 — crates/bevy_pbr/src/wireframe.rs:1104-1111 | crates/bevy_pbr/src/wireframe.rs:1132-1139 — 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) crates/bevy_reflect/src/array.rs:406 — crates/bevy_reflect/src/array.rs:406-413 | crates/bevy_reflect/src/list.rs:436-443 — before extracting anything, compare `crates/bevy_reflect/src/array.rs` and `crates/bevy_reflect/src/list.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) crates/bevy_reflect/src/path/access.rs:102 — crates/bevy_reflect/src/path/access.rs:102-109 | crates/bevy_reflect/src/path/access.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) crates/bevy_render/src/render_resource/buffer_vec.rs:615 — crates/bevy_render/src/render_resource/buffer_vec.rs:615-622 | crates/bevy_render/src/render_resource/buffer_vec.rs:799-807 — 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) crates/bevy_render/src/render_resource/uniform_buffer.rs:135 — crates/bevy_render/src/render_resource/uniform_buffer.rs:135-142 | crates/bevy_render/src/render_resource/uniform_buffer.rs:334-341 — 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) crates/bevy_shape/src/ray.rs:47 — crates/bevy_shape/src/ray.rs:47-54 | crates/bevy_shape/src/ray.rs:104-111 — 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.
  • + 27 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×44
  • Hotspot: crates/bevy_pbr/src/render/light.rs crates/bevy_pbr/src/render/light.rs:1038 — crates/bevy_pbr/src/render/light.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 71 in bevy_pbr::render::light::prepare_lights at line 1038. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 22:58:17 +00:00' --until='2026-10-24 22:58:17 +00:00' --full-history --no-merges -- crates/bevy_pbr/src/render/light.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: crates/bevy_pbr/src/render/mesh.rs crates/bevy_pbr/src/render/mesh.rs:3389 — crates/bevy_pbr/src/render/mesh.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 72 in MeshPipeline::specialize at line 3389. 3 of those changes were fix/bug commits, and the other 9 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 22:58:17 +00:00' --until='2026-10-24 22:58:17 +00:00' --full-history --no-merges -- crates/bevy_pbr/src/render/mesh.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: crates/bevy_gltf/src/loader/mod.rs crates/bevy_gltf/src/loader/mod.rs:302 — crates/bevy_gltf/src/loader/mod.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 97 in GltfLoader::load_gltf at line 302. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 22:58:17 +00:00' --until='2026-10-24 22:58:17 +00:00' --full-history --no-merges -- crates/bevy_gltf/src/loader/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: crates/bevy_ui_widgets/src/text_input.rs crates/bevy_ui_widgets/src/text_input.rs:118 — crates/bevy_ui_widgets/src/text_input.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in bevy_ui_widgets::text_input::on_focused_keyboard_input at line 118. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 22:58:17 +00:00' --until='2026-10-24 22:58:17 +00:00' --full-history --no-merges -- crates/bevy_ui_widgets/src/text_input.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: crates/bevy_ui/src/layout/mod.rs crates/bevy_ui/src/layout/mod.rs:548 — crates/bevy_ui/src/layout/mod.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in bevy_ui::layout::update_uinode_geometry_recursive at line 548. 5 of those changes were fix/bug commits, and the other 7 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 22:58:17 +00:00' --until='2026-10-24 22:58:17 +00:00' --full-history --no-merges -- crates/bevy_ui/src/layout/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: crates/bevy_light/src/cluster/assign.rs crates/bevy_light/src/cluster/assign.rs:137 — crates/bevy_light/src/cluster/assign.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 73 in bevy_light::cluster::assign::assign_objects_to_clusters at line 137. 1 of those changes was a fix/bug commit, and the other 3 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 22:58:17 +00:00' --until='2026-10-24 22:58:17 +00:00' --full-history --no-merges -- crates/bevy_light/src/cluster/assign.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: crates/bevy_pbr/src/material.rs crates/bevy_pbr/src/material.rs:1193 — crates/bevy_pbr/src/material.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in bevy_pbr::material::queue_material_meshes at line 1193. 1 of those changes was a fix/bug commit, and the other 11 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 22:58:17 +00:00' --until='2026-10-24 22:58:17 +00:00' --full-history --no-merges -- crates/bevy_pbr/src/material.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: crates/bevy_winit/src/state.rs crates/bevy_winit/src/state.rs:207 — crates/bevy_winit/src/state.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in WinitAppRunnerState::window_event at line 207. 1 of those changes was a fix/bug commit, and the other 5 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 22:58:17 +00:00' --until='2026-10-24 22:58:17 +00:00' --full-history --no-merges -- crates/bevy_winit/src/state.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: crates/bevy_sprite_render/src/mesh2d/material.rs crates/bevy_sprite_render/src/mesh2d/material.rs:814 — crates/bevy_sprite_render/src/mesh2d/material.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in bevy_sprite_render::mesh2d::material::specialize_material2d_meshes at line 814. 5 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 22:58:17 +00:00' --until='2026-10-24 22:58:17 +00:00' --full-history --no-merges -- crates/bevy_sprite_render/src/mesh2d/material.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: crates/bevy_render/src/camera.rs crates/bevy_render/src/camera.rs:482 — crates/bevy_render/src/camera.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in bevy_render::camera::extract_cameras at line 482. 4 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 22:58:17 +00:00' --until='2026-10-24 22:58:17 +00:00' --full-history --no-merges -- crates/bevy_render/src/camera.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: crates/bevy_pbr/src/render/mesh_view_bindings.rs crates/bevy_pbr/src/render/mesh_view_bindings.rs:648 — crates/bevy_pbr/src/render/mesh_view_bindings.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in bevy_pbr::render::mesh_view_bindings::prepare_mesh_view_bind_groups at line 648. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 22:58:17 +00:00' --until='2026-10-24 22:58:17 +00:00' --full-history --no-merges -- crates/bevy_pbr/src/render/mesh_view_bindings.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: crates/bevy_ecs/macros/src/lib.rs crates/bevy_ecs/macros/src/lib.rs:285 — crates/bevy_ecs/macros/src/lib.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in bevy_ecs_macros::derive_system_param_impl at line 285. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 22:58:17 +00:00' --until='2026-10-24 22:58:17 +00:00' --full-history --no-merges -- crates/bevy_ecs/macros/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: crates/bevy_pbr/src/deferred/mod.rs crates/bevy_pbr/src/deferred/mod.rs:205 — crates/bevy_pbr/src/deferred/mod.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in DeferredLightingLayout::specialize at line 205. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 22:58:17 +00:00' --until='2026-10-24 22:58:17 +00:00' --full-history --no-merges -- crates/bevy_pbr/src/deferred/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: crates/bevy_ui_render/src/lib.rs crates/bevy_ui_render/src/lib.rs:1081 — crates/bevy_ui_render/src/lib.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in bevy_ui_render::extract_uinode_borders at line 1081. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 22:58:17 +00:00' --until='2026-10-24 22:58:17 +00:00' --full-history --no-merges -- crates/bevy_ui_render/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: crates/bevy_ui/src/widget/text_input_layout.rs crates/bevy_ui/src/widget/text_input_layout.rs:310 — crates/bevy_ui/src/widget/text_input_layout.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in bevy_ui::widget::text_input_layout::update_editable_text_layout at line 310. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 22:58:17 +00:00' --until='2026-10-24 22:58:17 +00:00' --full-history --no-merges -- crates/bevy_ui/src/widget/text_input_layout.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: REDACTED REDACTED:99 — REDACTED changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in SpriteMeshMaterial::as_bind_group_shader_type at line 99. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 22:58:17 +00:00' --until='2026-10-24 22:58:17 +00:00' --full-history --no-merges -- REDACTED`: 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: crates/bevy_ui/src/focus.rs crates/bevy_ui/src/focus.rs:167 — crates/bevy_ui/src/focus.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in bevy_ui::focus::ui_focus_system 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 22:58:17 +00:00' --until='2026-10-24 22:58:17 +00:00' --full-history --no-merges -- crates/bevy_ui/src/focus.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: crates/bevy_text/src/pipeline.rs crates/bevy_text/src/pipeline.rs:71 — crates/bevy_text/src/pipeline.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in TextPipeline::update_buffer at line 71. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 22:58:17 +00:00' --until='2026-10-24 22:58:17 +00:00' --full-history --no-merges -- crates/bevy_text/src/pipeline.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: crates/bevy_render/macros/src/as_bind_group.rs crates/bevy_render/macros/src/as_bind_group.rs:63 — crates/bevy_render/macros/src/as_bind_group.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 65 in bevy_render_macros::as_bind_group::derive_as_bind_group at line 63. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 22:58:17 +00:00' --until='2026-10-24 22:58:17 +00:00' --full-history --no-merges -- crates/bevy_render/macros/src/as_bind_group.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: crates/bevy_feathers/src/controls/menu.rs crates/bevy_feathers/src/controls/menu.rs:176 — crates/bevy_feathers/src/controls/menu.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in bevy_feathers::controls::menu::on_lazy_menu_event at line 176. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 22:58:17 +00:00' --until='2026-10-24 22:58:17 +00:00' --full-history --no-merges -- crates/bevy_feathers/src/controls/menu.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: crates/bevy_pbr/src/pbr_material.rs crates/bevy_pbr/src/pbr_material.rs:1082 — crates/bevy_pbr/src/pbr_material.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in StandardMaterial::as_bind_group_shader_type at line 1082. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 22:58:17 +00:00' --until='2026-10-24 22:58:17 +00:00' --full-history --no-merges -- crates/bevy_pbr/src/pbr_material.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: crates/bevy_ecs/src/schedule/schedule.rs crates/bevy_ecs/src/schedule/schedule.rs:908 — crates/bevy_ecs/src/schedule/schedule.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in ScheduleGraph::process_configs at line 908. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 22:58:17 +00:00' --until='2026-10-24 22:58:17 +00:00' --full-history --no-merges -- crates/bevy_ecs/src/schedule/schedule.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: crates/bevy_pbr/src/wireframe.rs crates/bevy_pbr/src/wireframe.rs:1442 — crates/bevy_pbr/src/wireframe.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in bevy_pbr::wireframe::specialize_wireframes at line 1442. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 22:58:17 +00:00' --until='2026-10-24 22:58:17 +00:00' --full-history --no-merges -- crates/bevy_pbr/src/wireframe.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: crates/bevy_scene/macros/src/bsn/codegen.rs crates/bevy_scene/macros/src/bsn/codegen.rs:277 — crates/bevy_scene/macros/src/bsn/codegen.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in BsnEntry::try_to_tokens at line 277. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 22:58:17 +00:00' --until='2026-10-24 22:58:17 +00:00' --full-history --no-merges -- crates/bevy_scene/macros/src/bsn/codegen.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: crates/bevy_solari/src/scene/binder/assets.rs crates/bevy_solari/src/scene/binder/assets.rs:134 — crates/bevy_solari/src/scene/binder/assets.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in AssetState::update_material at line 134. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 22:58:17 +00:00' --until='2026-10-24 22:58:17 +00:00' --full-history --no-merges -- crates/bevy_solari/src/scene/binder/assets.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.
  • + 19 more in this group — see findings.md.
D3 · God Classes · MethodTooLong · ×40
  • MethodTooLong: GltfLoader.load_gltf crates/bevy_gltf/src/loader/mod.rs:302 — MethodTooLong — load_gltf runs 651 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 551 over it, 6.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: ResourceManager.new crates/bevy_pbr/src/meshlet/resource_manager.rs:74 — MethodTooLong — new runs 282 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 182 over it, 2.82× 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: MeshPipeline.specialize crates/bevy_pbr/src/render/mesh.rs:3389 — MethodTooLong — specialize runs 269 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 169 over it, 2.69× 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: Capsule3dMeshBuilder.build crates/bevy_mesh/src/primitives/dim3/capsule.rs:98 — MethodTooLong — build runs 214 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 114 over it, 2.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.
  • MethodTooLong: PrepassPipeline.specialize crates/bevy_pbr/src/prepass/mod.rs:405 — MethodTooLong — specialize runs 212 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 112 over it, 2.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.
  • MethodTooLong: WinitWindows.create_window crates/bevy_winit/src/winit_windows.rs:56 — MethodTooLong — create_window runs 196 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 96 over it, 1.96× 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: PbrPlugin.build crates/bevy_pbr/src/lib.rs:182 — MethodTooLong — build runs 191 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 91 over it, 1.91× 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: PanOrbitCamera.update_transform_and_projection crates/bevy_camera_controller/src/pan_orbit_camera/controller/component.rs:362 — MethodTooLong — update_transform_and_projection runs 164 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 64 over it, 1.64× 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: WinitAppRunnerState.window_event crates/bevy_winit/src/state.rs:207 — MethodTooLong — window_event runs 161 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 61 over it, 1.61× 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: TextEdit.apply crates/bevy_text/src/text_edit.rs:276 — MethodTooLong — apply runs 158 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 58 over it, 1.58× 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: VertexAttributeValues.push_from crates/bevy_mesh/src/vertex.rs:741 — MethodTooLong — push_from runs 155 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 55 over it, 1.55× 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: ExtrusionBuilder.build crates/bevy_mesh/src/primitives/extrusion.rs:178 — MethodTooLong — build runs 154 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 54 over it, 1.54× 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: AssetServer.load_internal crates/bevy_asset/src/server/mod.rs:540 — MethodTooLong — load_internal runs 149 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 49 over it, 1.49× 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: DeriveComponent.impl_component crates/bevy_ecs/macro_logic/src/component.rs:182 — MethodTooLong — impl_component runs 149 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 49 over it, 1.49× 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: JsonSchemaBevyType.from crates/bevy_remote/src/schemas/json_schema.rs:91 — MethodTooLong — from runs 149 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 49 over it, 1.49× 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: SpriteMeshMaterial.as_bind_group_shader_type REDACTED:99 — MethodTooLong — as_bind_group_shader_type 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: AssetProcessor.process_asset_internal crates/bevy_asset/src/processor/mod.rs:1031 — MethodTooLong — process_asset_internal runs 140 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 40 over it, 1.40× 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: WinitAppRunnerState.redraw_requested crates/bevy_winit/src/state.rs:520 — MethodTooLong — redraw_requested runs 134 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 34 over it, 1.34× 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: Mesh2dPipeline.specialize crates/bevy_sprite_render/src/mesh2d/mesh.rs:720 — MethodTooLong — specialize runs 132 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 32 over it, 1.32× 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: DrawMesh.render crates/bevy_pbr/src/render/mesh.rs:4666 — MethodTooLong — render 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.
  • MethodTooLong: BundleInserter.before_insert crates/bevy_ecs/src/bundle/insert.rs:137 — MethodTooLong — before_insert runs 126 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 26 over it, 1.26× 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: ShaderCache.get crates/bevy_shader/src/shader_cache.rs:178 — MethodTooLong — get runs 124 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 24 over it, 1.24× 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: BundleRemover.remove crates/bevy_ecs/src/bundle/remove.rs:148 — MethodTooLong — remove 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.
  • MethodTooLong: ScheduleData.from_schedule crates/bevy_dev_tools/src/schedule_data/serde.rs:358 — MethodTooLong — from_schedule runs 120 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 20 over it, 1.20× 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: FeathersNumberInput.scene crates/bevy_feathers/src/controls/number_input.rs:152 — MethodTooLong — scene runs 120 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 20 over it, 1.20× 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.
  • + 15 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×37
  • Duplicated block (9 lines × 2) crates/bevy_anti_alias/src/dlss/node.rs:51 — crates/bevy_anti_alias/src/dlss/node.rs:51-59 | crates/bevy_anti_alias/src/dlss/node.rs:121-129 — 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) crates/bevy_asset/src/io/file/file_asset.rs:143 — crates/bevy_asset/src/io/file/file_asset.rs:143-151 | crates/bevy_asset/src/io/file/sync_file_asset.rs:152-161 — 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 (9 lines × 2) crates/bevy_asset/src/io/memory.rs:199 — crates/bevy_asset/src/io/memory.rs:199-207 | crates/bevy_asset/src/io/memory.rs:216-224 — 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) crates/bevy_asset/src/server/mod.rs:1178 — crates/bevy_asset/src/server/mod.rs:1178-1186 | crates/bevy_asset/src/server/mod.rs:1203-1211 — 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) crates/bevy_ecs/macros/src/event.rs:35 — crates/bevy_ecs/macros/src/event.rs:35-43 | crates/bevy_ecs/macros/src/event.rs:102-110 — 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) crates/bevy_ecs/macros/src/query_data.rs:62 — crates/bevy_ecs/macros/src/query_data.rs:62-70 | crates/bevy_ecs/macros/src/world_query.rs:29-37 — 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 (9 lines × 2) crates/bevy_ecs/src/query/filter.rs:998 — crates/bevy_ecs/src/query/filter.rs:998-1006 | crates/bevy_ecs/src/query/filter.rs:1258-1266 — 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) crates/bevy_feathers/src/controls/color_slider.rs:271 — crates/bevy_feathers/src/controls/color_slider.rs:271-279 | crates/bevy_feathers/src/controls/color_slider.rs:282-290 — 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) crates/bevy_input/src/gamepad.rs:1609 — crates/bevy_input/src/gamepad.rs:1609-1617 | crates/bevy_input/src/gamepad.rs:1630-1638 — 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) crates/bevy_mesh/src/lib.rs:118 — crates/bevy_mesh/src/lib.rs:118-126 | crates/bevy_pbr/src/render/mesh.rs:3271-3279 — 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 (9 lines × 2) crates/bevy_mesh/src/mesh.rs:2369 — crates/bevy_mesh/src/mesh.rs:2369-2378 | crates/bevy_mesh/src/mesh.rs:2576-2584 — 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) crates/bevy_mesh/src/mesh.rs:2689 — crates/bevy_mesh/src/mesh.rs:2689-2697 | crates/bevy_mesh/src/mesh.rs:2700-2708 — 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) crates/bevy_pbr/src/atmosphere/resources.rs:715 — crates/bevy_pbr/src/atmosphere/resources.rs:715-723 | crates/bevy_pbr/src/atmosphere/resources.rs:737-745 — 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) crates/bevy_pbr/src/deferred/mod.rs:304 — crates/bevy_pbr/src/deferred/mod.rs:304-312 | crates/bevy_pbr/src/render/mesh.rs:3687-3695 — before extracting anything, compare `crates/bevy_pbr/src/deferred/mod.rs` and `crates/bevy_pbr/src/render/mesh.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) crates/bevy_pbr/src/render/light.rs:521 — crates/bevy_pbr/src/render/light.rs:521-529 | crates/bevy_pbr/src/render/light.rs:826-834 — 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) crates/bevy_picking/src/mesh_picking/ray_cast/intersections.rs:127 — crates/bevy_picking/src/mesh_picking/ray_cast/intersections.rs:127-135 | crates/bevy_picking/src/mesh_picking/ray_cast/intersections.rs:146-154 — 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) crates/bevy_reflect/src/display.rs:122 — crates/bevy_reflect/src/display.rs:122-130 | crates/bevy_reflect/src/display.rs:302-310 — 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) crates/bevy_reflect/src/display.rs:148 — crates/bevy_reflect/src/display.rs:148-156 | crates/bevy_reflect/src/display.rs:172-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.
  • Duplicated block (9 lines × 2) crates/bevy_reflect/src/info/type_info.rs:147 — crates/bevy_reflect/src/info/type_info.rs:147-155 | crates/bevy_reflect/src/kind.rs:98-106 — 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 (9 lines × 2) crates/bevy_render/macros/src/as_bind_group.rs:272 — crates/bevy_render/macros/src/as_bind_group.rs:272-280 | crates/bevy_render/macros/src/as_bind_group.rs:298-306 — 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) crates/bevy_render/macros/src/as_bind_group.rs:586 — crates/bevy_render/macros/src/as_bind_group.rs:586-594 | crates/bevy_render/macros/src/as_bind_group.rs:633-641 — 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) crates/bevy_render/macros/src/as_bind_group.rs:860 — crates/bevy_render/macros/src/as_bind_group.rs:860-868 | crates/bevy_render/macros/src/as_bind_group.rs:907-915 — 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) crates/bevy_sprite_render/src/mesh2d/mesh.rs:782 — crates/bevy_sprite_render/src/mesh2d/mesh.rs:782-790 | crates/bevy_sprite_render/src/render/mod.rs:192-200 — before extracting anything, compare `crates/bevy_sprite_render/src/mesh2d/mesh.rs` and `crates/bevy_sprite_render/src/render/mod.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) crates/bevy_sprite_render/src/mesh2d/mesh.rs:1039 — crates/bevy_sprite_render/src/mesh2d/mesh.rs:1039-1047 | crates/bevy_sprite_render/src/mesh2d/mesh.rs:1093-1101 — 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) crates/bevy_ui/src/geometry.rs:409 — crates/bevy_ui/src/geometry.rs:409-417 | crates/bevy_ui/src/geometry.rs:443-451 — 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.
  • + 12 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×35
  • Duplicated block (10 lines × 2) crates/bevy_color/src/okcolor_convert.rs:92 — crates/bevy_color/src/okcolor_convert.rs:92-101 | crates/bevy_color/src/okcolor_convert.rs:171-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.
  • Duplicated block (10 lines × 2) crates/bevy_curve/src/cubic_splines/mod.rs:1365 — crates/bevy_curve/src/cubic_splines/mod.rs:1365-1374 | crates/bevy_curve/src/cubic_splines/mod.rs:1393-1402 — 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) crates/bevy_ecs/macros/src/template.rs:157 — crates/bevy_ecs/macros/src/template.rs:157-166 | crates/bevy_ecs/macros/src/template.rs:168-178 — 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) crates/bevy_ecs/src/entity/unique_vec.rs:947 — crates/bevy_ecs/src/entity/unique_vec.rs:947-956 | crates/bevy_ecs/src/entity/unique_vec.rs:974-983 — 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) crates/bevy_ecs/src/schedule/schedule.rs:1158 — crates/bevy_ecs/src/schedule/schedule.rs:1158-1167 | crates/bevy_ecs/src/schedule/schedule.rs:1173-1182 — 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) crates/bevy_feathers/src/controls/color_input.rs:856 — crates/bevy_feathers/src/controls/color_input.rs:856-865 | crates/bevy_feathers/src/controls/color_input.rs:874-883 — 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) crates/bevy_feathers/src/controls/number_input.rs:234 — crates/bevy_feathers/src/controls/number_input.rs:234-243 | crates/bevy_feathers/src/controls/slider.rs:94-103 — 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) crates/bevy_mesh/src/components.rs:135 — crates/bevy_mesh/src/components.rs:135-144 | crates/bevy_mesh/src/components.rs:164-173 — 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) crates/bevy_mesh/src/primitives/dim2.rs:712 — crates/bevy_mesh/src/primitives/dim2.rs:712-721 | crates/bevy_mesh/src/primitives/dim3/polyline3d.rs:17-26 — 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 (10 lines × 2) crates/bevy_pbr/src/meshlet/resource_manager.rs:207 — crates/bevy_pbr/src/meshlet/resource_manager.rs:207-216 | crates/bevy_pbr/src/meshlet/resource_manager.rs:229-238 — 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) crates/bevy_pbr/src/render/gpu_preprocess.rs:2499 — crates/bevy_pbr/src/render/gpu_preprocess.rs:2499-2508 | crates/bevy_pbr/src/render/gpu_preprocess.rs:2742-2751 — 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) crates/bevy_pbr/src/render/gpu_preprocess.rs:2622 — crates/bevy_pbr/src/render/gpu_preprocess.rs:2622-2631 | crates/bevy_pbr/src/render/gpu_preprocess.rs:2851-2860 — 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) crates/bevy_pbr/src/render/mesh.rs:3751 — crates/bevy_pbr/src/render/mesh.rs:3751-3760 | crates/bevy_sprite_render/src/mesh2d/mesh.rs:855-864 — before extracting anything, compare `crates/bevy_pbr/src/render/mesh.rs` and `crates/bevy_sprite_render/src/mesh2d/mesh.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) crates/bevy_pbr/src/wireframe.rs:336 — crates/bevy_pbr/src/wireframe.rs:336-345 | crates/bevy_sprite_render/src/mesh2d/wireframe2d.rs:298-307 — before extracting anything, compare `crates/bevy_pbr/src/wireframe.rs` and `crates/bevy_sprite_render/src/mesh2d/wireframe2d.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 111 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) crates/bevy_reflect/src/path/access.rs:137 — crates/bevy_reflect/src/path/access.rs:137-146 | crates/bevy_reflect/src/path/access.rs:205-214 — 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) crates/bevy_reflect/src/serde/de/struct_utils.rs:173 — crates/bevy_reflect/src/serde/de/struct_utils.rs:173-182 | crates/bevy_reflect/src/serde/de/tuple_utils.rs:98-107 — 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) crates/bevy_render/src/render_resource/storage_buffer.rs:140 — crates/bevy_render/src/render_resource/storage_buffer.rs:140-149 | crates/bevy_render/src/render_resource/storage_buffer.rs:265-274 — 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) crates/bevy_scene/macros/src/bsn/codegen.rs:124 — crates/bevy_scene/macros/src/bsn/codegen.rs:124-133 | crates/bevy_scene/macros/src/bsn/codegen.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 (10 lines × 2) crates/bevy_shape/src/dim2.rs:1609 — crates/bevy_shape/src/dim2.rs:1609-1618 | crates/bevy_shape/src/dim3.rs:666-675 — before extracting anything, compare `crates/bevy_shape/src/dim2.rs` and `crates/bevy_shape/src/dim3.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) crates/bevy_ui_render/src/box_shadow.rs:278 — crates/bevy_ui_render/src/box_shadow.rs:278-287 | crates/bevy_ui_render/src/ui_texture_slice_pipeline.rs:287-296 — before extracting anything, compare `crates/bevy_ui_render/src/box_shadow.rs` and `crates/bevy_ui_render/src/ui_texture_slice_pipeline.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) crates/bevy_ui_render/src/lib.rs:953 — crates/bevy_ui_render/src/lib.rs:953-962 | crates/bevy_ui_render/src/ui_texture_slice_pipeline.rs:305-314 — before extracting anything, compare `crates/bevy_ui_render/src/lib.rs` and `crates/bevy_ui_render/src/ui_texture_slice_pipeline.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) crates/bevy_ui_render/src/lib.rs:1884 — crates/bevy_ui_render/src/lib.rs:1884-1893 | crates/bevy_ui_render/src/lib.rs:1915-1924 — 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) crates/bevy_world_serialization/src/dynamic_world.rs:117 — crates/bevy_world_serialization/src/dynamic_world.rs:117-126 | crates/bevy_world_serialization/src/dynamic_world.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 (10 lines × 2) crates/bevy_ecs/src/entity/index_map.rs:537 — crates/bevy_ecs/src/entity/index_map.rs:537-546 | crates/bevy_ecs/src/entity/unique_slice.rs:503-512 — 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) crates/bevy_math/src/rects/irect.rs:304 — crates/bevy_math/src/rects/irect.rs:304-313 | crates/bevy_math/src/rects/urect.rs:301-310 — 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.
  • + 10 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×31
  • Duplicated block (13 lines × 2) crates/bevy_curve/src/cubic_splines/mod.rs:189 — crates/bevy_curve/src/cubic_splines/mod.rs:189-201 | crates/bevy_curve/src/cubic_splines/mod.rs:216-228 — 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) crates/bevy_curve/src/cubic_splines/mod.rs:867 — crates/bevy_curve/src/cubic_splines/mod.rs:867-879 | crates/bevy_curve/src/cubic_splines/mod.rs:893-905 — 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) crates/bevy_ecs/src/message/iterators.rs:55 — crates/bevy_ecs/src/message/iterators.rs:55-67 | crates/bevy_ecs/src/message/iterators.rs:162-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.
  • Duplicated block (13 lines × 2) crates/bevy_feathers/src/controls/menu.rs:124 — crates/bevy_feathers/src/controls/menu.rs:124-136 | crates/bevy_feathers/src/controls/menu.rs:238-250 — 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) crates/bevy_feathers/src/controls/menu.rs:464 — crates/bevy_feathers/src/controls/menu.rs:464-476 | crates/bevy_feathers/src/controls/menu.rs:534-546 — 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) crates/bevy_gizmos/src/gizmos.rs:642 — crates/bevy_gizmos/src/gizmos.rs:642-654 | crates/bevy_gizmos/src/gizmos.rs:694-706 — 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) crates/bevy_gizmos_render/src/pipeline_3d.rs:291 — crates/bevy_gizmos_render/src/pipeline_3d.rs:291-303 | crates/bevy_gizmos_render/src/pipeline_3d.rs:378-390 — 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) crates/bevy_gizmos_render/src/transform_gizmo_render.rs:247 — crates/bevy_gizmos_render/src/transform_gizmo_render.rs:247-259 | crates/bevy_gizmos_render/src/transform_gizmo_render.rs:318-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.
  • Duplicated block (13 lines × 2) crates/bevy_mesh/src/lib.rs:97 — crates/bevy_mesh/src/lib.rs:97-109 | crates/bevy_pbr/src/render/mesh.rs:3249-3261 — 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 (13 lines × 2) crates/bevy_pbr/src/light_probe/generate.rs:790 — crates/bevy_pbr/src/light_probe/generate.rs:790-802 | crates/bevy_pbr/src/light_probe/generate.rs:813-825 — 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) crates/bevy_pbr/src/material.rs:1340 — crates/bevy_pbr/src/material.rs:1340-1352 | crates/bevy_pbr/src/material.rs:1448-1460 — 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) crates/bevy_pbr/src/render/gpu_preprocess.rs:1107 — crates/bevy_pbr/src/render/gpu_preprocess.rs:1107-1119 | crates/bevy_pbr/src/render/gpu_preprocess.rs:1122-1134 — 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) crates/bevy_pbr/src/wireframe.rs:816 — crates/bevy_pbr/src/wireframe.rs:816-828 | crates/bevy_sprite_render/src/mesh2d/wireframe2d.rs:367-379 — before extracting anything, compare `crates/bevy_pbr/src/wireframe.rs` and `crates/bevy_sprite_render/src/mesh2d/wireframe2d.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 111 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) crates/bevy_platform/src/sync/mutex.rs:94 — crates/bevy_platform/src/sync/mutex.rs:94-106 | crates/bevy_platform/src/sync/rwlock.rs:98-110 — 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 (13 lines × 2) crates/bevy_reflect/src/func/info.rs:434 — crates/bevy_reflect/src/func/info.rs:434-446 | crates/bevy_reflect/src/func/info.rs:512-524 — 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) crates/bevy_render/macros/src/as_bind_group.rs:843 — crates/bevy_render/macros/src/as_bind_group.rs:843-855 | crates/bevy_render/macros/src/as_bind_group.rs:891-903 — 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) crates/bevy_render/src/texture/texture_attachment.rs:299 — crates/bevy_render/src/texture/texture_attachment.rs:299-311 | crates/bevy_render/src/texture/texture_attachment.rs:330-342 — 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) crates/bevy_shape/src/bounding/raycast2d.rs:84 — crates/bevy_shape/src/bounding/raycast2d.rs:84-96 | crates/bevy_shape/src/bounding/raycast3d.rs:81-93 — 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 (13 lines × 2) crates/bevy_state/src/state_scoped.rs:405 — crates/bevy_state/src/state_scoped.rs:405-417 | crates/bevy_state/src/state_scoped.rs:481-493 — 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) crates/bevy_state/src/state_scoped.rs:401 — crates/bevy_state/src/state_scoped.rs:401-413 | crates/bevy_state/src/state_scoped.rs:642-654 — 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) crates/bevy_state/src/state_scoped.rs:477 — crates/bevy_state/src/state_scoped.rs:477-489 | crates/bevy_state/src/state_scoped.rs:718-730 — 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) crates/bevy_state/src/state_scoped.rs:646 — crates/bevy_state/src/state_scoped.rs:646-658 | crates/bevy_state/src/state_scoped.rs:722-734 — 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) crates/bevy_tasks/src/task_pool.rs:77 — crates/bevy_tasks/src/task_pool.rs:77-89 | crates/bevy_tasks/src/task_pool.rs:100-112 — 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) crates/bevy_ui_render/src/debug_overlay.rs:89 — crates/bevy_ui_render/src/debug_overlay.rs:89-101 | crates/bevy_ui_render/src/debug_overlay.rs:157-169 — 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) crates/bevy_ui_render/src/gradient.rs:910 — crates/bevy_ui_render/src/gradient.rs:910-922 | crates/bevy_ui_render/src/lib.rs:2463-2475 — before extracting anything, compare `crates/bevy_ui_render/src/gradient.rs` and `crates/bevy_ui_render/src/lib.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • + 6 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×31
  • Duplicated block (7 lines × 2) crates/bevy_asset/src/io/file/file_asset.rs:128 — crates/bevy_asset/src/io/file/file_asset.rs:128-134 | crates/bevy_asset/src/io/file/sync_file_asset.rs:137-143 — 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 (7 lines × 2) crates/bevy_core_pipeline/src/core_2d/main_opaque_pass_2d_node.rs:42 — crates/bevy_core_pipeline/src/core_2d/main_opaque_pass_2d_node.rs:42-48 | crates/bevy_core_pipeline/src/core_3d/main_opaque_pass_3d_node.rs:61-67 — `crates/bevy_core_pipeline/src/core_2d/main_opaque_pass_2d_node.rs` and `crates/bevy_core_pipeline/src/core_3d/main_opaque_pass_3d_node.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 30 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (7 lines × 2) crates/bevy_core_pipeline/src/core_2d/mod.rs:414 — crates/bevy_core_pipeline/src/core_2d/mod.rs:414-421 | crates/bevy_core_pipeline/src/core_3d/mod.rs:531-537 — 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 (7 lines × 2) crates/bevy_curve/src/cores.rs:198 — crates/bevy_curve/src/cores.rs:198-204 | crates/bevy_curve/src/cores.rs:408-414 — 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) crates/bevy_ecs/macros/src/query_data.rs:233 — crates/bevy_ecs/macros/src/query_data.rs:233-239 | crates/bevy_ecs/macros/src/query_filter.rs:36-42 — 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 (7 lines × 2) crates/bevy_ecs/macros/src/resource.rs:29 — crates/bevy_ecs/macros/src/resource.rs:29-37 | crates/bevy_scene/macros/src/scene_component.rs:50-56 — 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 (7 lines × 2) crates/bevy_ecs/src/query/state.rs:1801 — crates/bevy_ecs/src/query/state.rs:1801-1807 | crates/bevy_ecs/src/query/state.rs:1970-1976 — 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) crates/bevy_ecs/src/storage/table/column.rs:73 — crates/bevy_ecs/src/storage/table/column.rs:73-79 | crates/bevy_ecs/src/storage/table/column.rs:129-135 — 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) crates/bevy_light/src/cluster/assign.rs:444 — crates/bevy_light/src/cluster/assign.rs:444-450 | crates/bevy_light/src/cluster/assign.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.
  • Duplicated block (7 lines × 2) crates/bevy_math/src/sampling/standard.rs:67 — crates/bevy_math/src/sampling/standard.rs:67-73 | crates/bevy_shape/src/sampling/shape_sampling.rs:206-212 — 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 (7 lines × 2) crates/bevy_mesh/src/primitives/extrusion.rs:333 — crates/bevy_mesh/src/primitives/extrusion.rs:333-339 | crates/bevy_mesh/src/primitives/extrusion.rs:357-363 — 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) crates/bevy_pbr/src/deferred/mod.rs:57 — crates/bevy_pbr/src/deferred/mod.rs:57-63 | crates/bevy_pbr/src/deferred/mod.rs:80-86 — 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) crates/bevy_pbr/src/render/fog.rs:79 — crates/bevy_pbr/src/render/fog.rs:79-85 | crates/bevy_pbr/src/render/fog.rs:88-94 — 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) crates/bevy_render/macros/src/specializer.rs:315 — crates/bevy_render/macros/src/specializer.rs:315-321 | crates/bevy_render/macros/src/specializer.rs:352-358 — 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) crates/bevy_render/macros/src/specializer.rs:323 — crates/bevy_render/macros/src/specializer.rs:323-329 | crates/bevy_render/macros/src/specializer.rs:360-366 — 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) crates/bevy_render/src/diagnostic/internal.rs:527 — crates/bevy_render/src/diagnostic/internal.rs:527-533 | crates/bevy_render/src/diagnostic/internal.rs:603-609 — 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) crates/bevy_state/macros/src/states.rs:11 — crates/bevy_state/macros/src/states.rs:11-17 | crates/bevy_state/macros/src/states.rs:89-95 — 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) crates/bevy_state/src/app.rs:168 — crates/bevy_state/src/app.rs:168-174 | crates/bevy_state/src/app.rs:198-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.
  • Duplicated block (7 lines × 2) crates/bevy_ui/src/accessibility.rs:38 — crates/bevy_ui/src/accessibility.rs:38-44 | crates/bevy_ui/src/accessibility.rs:170-176 — 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) crates/bevy_asset/src/io/file/file_asset.rs:165 — crates/bevy_asset/src/io/file/file_asset.rs:165-171 | crates/bevy_asset/src/io/file/sync_file_asset.rs:175-181 — 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 (7 lines × 2) crates/bevy_camera_controller/src/pan_orbit_camera/extensions/dolly_zoom.rs:167 — crates/bevy_camera_controller/src/pan_orbit_camera/extensions/dolly_zoom.rs:167-173 | crates/bevy_camera_controller/src/pan_orbit_camera/extensions/look_to.rs:167-173 — 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 (7 lines × 2) crates/bevy_core_pipeline/src/core_3d/mod.rs:448 — crates/bevy_core_pipeline/src/core_3d/mod.rs:448-454 | crates/bevy_pbr/src/transmission/phase.rs:102-108 — 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 (7 lines × 2) crates/bevy_pbr/src/render/mesh.rs:3221 — crates/bevy_pbr/src/render/mesh.rs:3221-3227 | crates/bevy_sprite_render/src/mesh2d/mesh.rs:669-675 — before extracting anything, compare `crates/bevy_pbr/src/render/mesh.rs` and `crates/bevy_sprite_render/src/mesh2d/mesh.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) crates/bevy_reflect/src/array.rs:536 — crates/bevy_reflect/src/array.rs:536-542 | crates/bevy_reflect/src/list.rs:559-565 — before extracting anything, compare `crates/bevy_reflect/src/array.rs` and `crates/bevy_reflect/src/list.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) crates/bevy_reflect/src/map.rs:424 — crates/bevy_reflect/src/map.rs:424-430 | crates/bevy_reflect/src/structs.rs:565-571 — 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.
  • + 6 more in this group — see findings.md.
D2 · Cognitive Complexity · bevy_pbr · ×30
  • bevy_pbr::render::light::prepare_lights (cognitive 133) crates/bevy_pbr/src/render/light.rs:1038 — bevy_pbr::render::light::prepare_lights has cognitive complexity 133 (threshold 15). Drivers by points: if/else 42 (89 pts), loops 16 (27 pts), boolean chains 15, match/switch 1 (2 pts) (nesting depth added 59). 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.
  • bevy_pbr::prepass::specialize_prepass_material_meshes (cognitive 102) crates/bevy_pbr/src/prepass/mod.rs:1013 — bevy_pbr::prepass::specialize_prepass_material_meshes has cognitive complexity 102 (threshold 15). Drivers by points: if/else 30 (77 pts), loops 5 (10 pts), match/switch 4 (10 pts), boolean chains 5 (nesting depth added 58). 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.
  • bevy_pbr::render::light::extract_lights (cognitive 79) crates/bevy_pbr/src/render/light.rs:320 — bevy_pbr::render::light::extract_lights has cognitive complexity 79 (threshold 15). Drivers by points: if/else 18 (44 pts), loops 10 (21 pts), match/switch 6 (11 pts), boolean chains 3 (nesting depth added 42). 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.
  • bevy_pbr::render::gpu_preprocess::early_gpu_preprocess (cognitive 66) crates/bevy_pbr/src/render/gpu_preprocess.rs:790 — bevy_pbr::render::gpu_preprocess::early_gpu_preprocess has cognitive complexity 66 (threshold 15). Drivers by points: if/else 19 (60 pts), loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 44). 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.
  • bevy_pbr::material::specialize_material_meshes (cognitive 61) crates/bevy_pbr/src/material.rs:992 — bevy_pbr::material::specialize_material_meshes has cognitive complexity 61 (threshold 15). Drivers by points: if/else 18 (50 pts), loops 4 (8 pts), match/switch 1 (2 pts), boolean chains 1 (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.
  • bevy_pbr::material::queue_material_meshes (cognitive 61) crates/bevy_pbr/src/material.rs:1193 — bevy_pbr::material::queue_material_meshes has cognitive complexity 61 (threshold 15). Drivers by points: if/else 16 (49 pts), match/switch 2 (7 pts), loops 3 (5 pts) (nesting depth added 40). 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.
  • bevy_pbr::render::light::specialize_shadows (cognitive 61) crates/bevy_pbr/src/render/light.rs:2437 — bevy_pbr::render::light::specialize_shadows has cognitive complexity 61 (threshold 15). Drivers by points: if/else 19 (46 pts), loops 4 (8 pts), match/switch 2 (5 pts), boolean chains 2 (nesting depth added 34). 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.
  • bevy_pbr::render::mesh_view_bindings::prepare_mesh_view_bind_groups (cognitive 58) crates/bevy_pbr/src/render/mesh_view_bindings.rs:648 — bevy_pbr::render::mesh_view_bindings::prepare_mesh_view_bind_groups has cognitive complexity 58 (threshold 15). Drivers by points: if/else 16 (44 pts), loops 2 (6 pts), match/switch 2 (6 pts), boolean chains 2 (nesting depth added 36). 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.
  • bevy_pbr::wireframe::specialize_wireframes (cognitive 58) crates/bevy_pbr/src/wireframe.rs:1442 — bevy_pbr::wireframe::specialize_wireframes has cognitive complexity 58 (threshold 15). Drivers by points: if/else 16 (42 pts), match/switch 2 (8 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 35). 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.
  • bevy_pbr::meshlet::material_pipeline_prepare::prepare_material_meshlet_meshes_main_opaque_pass (cognitive 56) crates/bevy_pbr/src/meshlet/material_pipeline_prepare.rs:37 — bevy_pbr::meshlet::material_pipeline_prepare::prepare_material_meshlet_meshes_main_opaque_pass has cognitive complexity 56 (threshold 15). Drivers by points: if/else 20 (42 pts), match/switch 3 (9 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 29). 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.
  • bevy_pbr::meshlet::material_pipeline_prepare::prepare_material_meshlet_meshes_prepass (cognitive 56) crates/bevy_pbr/src/meshlet/material_pipeline_prepare.rs:282 — bevy_pbr::meshlet::material_pipeline_prepare::prepare_material_meshlet_meshes_prepass has cognitive complexity 56 (threshold 15). Drivers by points: if/else 20 (50 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 31). 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.
  • bevy_pbr::prepass::queue_prepass_material_meshes (cognitive 55) crates/bevy_pbr/src/prepass/mod.rs:1315 — bevy_pbr::prepass::queue_prepass_material_meshes has cognitive complexity 55 (threshold 15). Drivers by points: if/else 18 (43 pts), match/switch 2 (6 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 31). 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.
  • bevy_pbr::render::light::queue_shadows (cognitive 38) crates/bevy_pbr/src/render/light.rs:2670 — bevy_pbr::render::light::queue_shadows has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (33 pts), loops 3 (5 pts) (nesting depth added 23). 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.
  • bevy_pbr::render::mesh::collect_meshes_for_gpu_building (cognitive 37) crates/bevy_pbr/src/render/mesh.rs:2494 — bevy_pbr::render::mesh::collect_meshes_for_gpu_building has cognitive complexity 37 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 7 (13 pts), match/switch 3 (7 pts), boolean chains 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.
  • bevy_pbr::wireframe::queue_wireframes (cognitive 36) crates/bevy_pbr/src/wireframe.rs:1627 — bevy_pbr::wireframe::queue_wireframes has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (30 pts), loops 3 (5 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.
  • bevy_pbr::render::mesh::check_views_need_specialization (cognitive 35) crates/bevy_pbr/src/render/mesh.rs:361 — bevy_pbr::render::mesh::check_views_need_specialization has cognitive complexity 35 (threshold 15). Drivers by points: if/else 19 (28 pts), match/switch 2 (5 pts), boolean chains 1, loops 1 (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.
  • bevy_pbr::render::gpu_preprocess::run_build_indirect_parameters (cognitive 34) crates/bevy_pbr/src/render/gpu_preprocess.rs:1219 — bevy_pbr::render::gpu_preprocess::run_build_indirect_parameters has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (27 pts), loops 3 (7 pts) (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.
  • bevy_pbr::cluster::extract_clusters_for_cpu_clustering (cognitive 33) crates/bevy_pbr/src/cluster/mod.rs:394 — bevy_pbr::cluster::extract_clusters_for_cpu_clustering has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (24 pts), loops 3 (6 pts), match/switch 1 (2 pts), boolean chains 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.
  • bevy_pbr::render::mesh::collect_gpu_culled_meshes_for_subview (cognitive 27) crates/bevy_pbr/src/render/mesh.rs:2328 — bevy_pbr::render::mesh::collect_gpu_culled_meshes_for_subview has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 4 (8 pts), match/switch 1 (3 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.
  • bevy_pbr::cluster::prepare_clusters_for_cpu_clustering (cognitive 25) crates/bevy_pbr/src/cluster/mod.rs:478 — bevy_pbr::cluster::prepare_clusters_for_cpu_clustering has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 3 (11 pts), if/else 3 (10 pts), loops 2 (3 pts), boolean chains 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.
  • bevy_pbr::render::gpu_preprocess::unpack_bins (cognitive 23) crates/bevy_pbr/src/render/gpu_preprocess.rs:714 — bevy_pbr::render::gpu_preprocess::unpack_bins has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 3 (9 pts), boolean chains 1 (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.
  • bevy_pbr::render::mesh_view_bindings::layout_entries (cognitive 23) crates/bevy_pbr/src/render/mesh_view_bindings.rs:272 — bevy_pbr::render::mesh_view_bindings::layout_entries has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17 (20 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 4). 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.
  • bevy_pbr::transmission::node::main_transmissive_pass_3d (cognitive 23) crates/bevy_pbr/src/transmission/node.rs:19 — bevy_pbr::transmission::node::main_transmissive_pass_3d has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 1 (3 pts) (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.
  • bevy_pbr::render::gpu_preprocess::prepare_preprocess_bind_groups (cognitive 22) crates/bevy_pbr/src/render/gpu_preprocess.rs:2188 — bevy_pbr::render::gpu_preprocess::prepare_preprocess_bind_groups has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (4 pts), match/switch 1 (3 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.
  • bevy_pbr::render::gpu_preprocess::allocate_uniforms (cognitive 21) crates/bevy_pbr/src/render/gpu_preprocess.rs:589 — bevy_pbr::render::gpu_preprocess::allocate_uniforms has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3 (6 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.
  • + 5 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×26
  • TooManyMethods: World crates/bevy_ecs/src/world/mod.rs:96 — TooManyMethods — 185 methods, declared across 5 files: world/mod.rs (157), observer/mod.rs (12), system/system_registry.rs (11), world/reflect.rs (3), +1 more file(s). The bar is 30 methods; this is 155 over it, 6.17× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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.
  • TooManyMethods: EntityWorldMut crates/bevy_ecs/src/world/entity_access/world_mut.rs:54 — TooManyMethods — 133 methods, declared across 4 files: entity_access/world_mut.rs (102), relationship/related_methods.rs (14), src/hierarchy.rs (11), reflect/entity_commands.rs (6). The bar is 30 methods; this is 103 over it, 4.43× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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.
  • TooManyMethods: Mesh crates/bevy_mesh/src/mesh.rs:230 — TooManyMethods — 128 methods. The bar is 30 methods; this is 98 over it, 4.27× 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.
  • TooManyMethods: Query crates/bevy_ecs/src/system/query.rs:488 — TooManyMethods — 71 methods, declared across 2 files: system/query.rs (63), relationship/relationship_query.rs (8). The bar is 30 methods; this is 41 over it, 2.37× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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.
  • TooManyMethods: QueryState crates/bevy_ecs/src/query/state.rs:85 — TooManyMethods — 67 methods. The bar is 30 methods; this is 37 over it, 2.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.
  • TooManyMethods: AssetServer crates/bevy_asset/src/server/mod.rs:66 — TooManyMethods — 65 methods. The bar is 30 methods; this is 35 over it, 2.17× 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.
  • TooManyMethods: UniqueEntityEquivalentSlice crates/bevy_ecs/src/entity/unique_slice.rs:40 — TooManyMethods — 64 methods. The bar is 30 methods; this is 34 over it, 2.13× 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.
  • TooManyMethods: EntityCommands crates/bevy_ecs/src/system/commands/mod.rs:1297 — TooManyMethods — 63 methods, declared across 3 files: commands/mod.rs (39), relationship/related_methods.rs (13), src/hierarchy.rs (11). The bar is 30 methods; this is 33 over it, 2.10× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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.
  • TooManyMethods: App crates/bevy_app/src/app.rs:85 — TooManyMethods — 60 methods. The bar is 30 methods; this is 30 over it, 2.00× 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.
  • TooManyMethods: GizmoBuffer crates/bevy_gizmos/src/gizmos.rs:280 — TooManyMethods — 58 methods, declared across 9 files: src/gizmos.rs (25), src/arcs.rs (8), src/circles.rs (5), src/arrows.rs (4), +5 more file(s). The bar is 30 methods; this is 28 over it, 1.93× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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.
  • TooManyMethods: EntityEquivalentIndexSet crates/bevy_ecs/src/entity/index_set.rs:32 — TooManyMethods — 53 methods. The bar is 30 methods; this is 23 over it, 1.77× 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.
  • TooManyMethods: Time crates/bevy_time/src/time.rs:194 — TooManyMethods — 53 methods, declared across 4 files: src/time.rs (18), src/virt.rs (15), src/fixed.rs (13), src/real.rs (7). The bar is 30 methods; this is 23 over it, 1.77× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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.
  • TooManyMethods: UnsafeWorldCell crates/bevy_ecs/src/world/unsafe_world_cell.rs:85 — TooManyMethods — 45 methods, declared across 2 files: world/unsafe_world_cell.rs (44), world/deferred_world.rs (1). The bar is 30 methods; this is 15 over it, 1.50× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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.
  • TooManyMethods: Transform crates/bevy_transform/src/components/transform.rs:86 — TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.43× 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.
  • TooManyMethods: UniqueEntityEquivalentVec crates/bevy_ecs/src/entity/unique_vec.rs:43 — TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× 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.
  • TooManyMethods: HashMap crates/bevy_platform/src/collections/hash_map.rs:49 — TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× 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.
  • TooManyMethods: SubApp crates/bevy_app/src/sub_app.rs:66 — TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× 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.
  • TooManyMethods: Commands crates/bevy_ecs/src/system/commands/mod.rs:106 — TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× 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.
  • TooManyMethods: EntityMut crates/bevy_ecs/src/world/entity_access/entity_mut.rs:45 — TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× 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.
  • TooManyMethods: Color crates/bevy_color/src/color.rs:57 — TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.20× 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.
  • TooManyMethods: Image crates/bevy_image/src/image.rs:641 — TooManyMethods — 36 methods, declared across 3 files: src/image.rs (32), src/image_texture_conversion.rs (3), src/equirectangular.rs (1). The bar is 30 methods; this is 6 over it, 1.20× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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.
  • TooManyMethods: HashSet crates/bevy_platform/src/collections/hash_set.rs:43 — TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.20× 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.
  • TooManyMethods: Archetype crates/bevy_ecs/src/archetype.rs:388 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× 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.
  • TooManyMethods: AlignedVec crates/bevy_platform/src/collections/aligned_vec.rs:26 — 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.
  • TooManyMethods: AssetProcessor crates/bevy_asset/src/processor/mod.rs:98 — TooManyMethods — 31 methods. The bar is 30 methods; 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.
  • + 1 more in this group — see findings.md.
D17 · Explicit Debt · FixmeComment · ×25
  • FixmeComment crates/bevy_ui/src/lib.rs:272 — // FIXME: Add an archetype invariant for this https://github.com/bevyengine/bevy/issues/1481.
  • FixmeComment crates/bevy_light/src/lib.rs:200 — // FIXME: Add an archetype invariant for this https://github.com/bevyengine/bevy/issues/1481.
  • FixmeComment crates/bevy_transform/src/commands.rs:47 — // FIXME: Replace this closure with a `try` block. See: https://github.com/rust-lang/rust/issues/31436.
  • FixmeComment crates/bevy_transform/src/commands.rs:70 — // FIXME: Replace this closure with a `try` block. See: https://github.com/rust-lang/rust/issues/31436.
  • FixmeComment crates/bevy_sprite_render/src/mesh2d/mesh.rs:617 — // FIXME: make normals optional? — 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 crates/bevy_render/src/material_bind_groups.rs:2417 — // FIXME: This is slow as it takes all the allocations, meaning that — 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 crates/bevy_render/src/render_resource/sparse_buffer_vec.rs:381 — // FIXME: This degrades performance in the exact scenarios we need 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.
  • FixmeComment crates/bevy_mesh/src/mesh.rs:1750 — /// FIXME: This should handle more cases since this is called as a part of gltf — 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 crates/bevy_mesh/src/mesh.rs:1765 — /// FIXME: This should handle more cases since this is called as a part of gltf — 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 crates/bevy_mesh/src/mesh.rs:1962 — // FIXME: This should handle more cases since this is called as a part of gltf — 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 crates/bevy_mesh/src/mesh.rs:2013 — // FIXME: This should handle more cases since this is called as a part of gltf — 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 crates/bevy_image/src/basis.rs:30 — // FIXME: Use external metadata to transcode to more appropriate formats for 1- or 2-component sources — 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 crates/bevy_image/src/dds.rs:194 — // FIXME: Map to argb format and user has to know to ignore the alpha channel? — 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 crates/bevy_image/src/dds.rs:196 — // FIXME: Map to argb format and user has to know to ignore the alpha channel? — 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 crates/bevy_image/src/image.rs:370 — // FIXME: https://github.com/rust-lang/rust/issues/129031
  • FixmeComment crates/bevy_image/src/image.rs:425 — // FIXME: https://github.com/rust-lang/rust/issues/129031
  • FixmeComment crates/bevy_image/src/image.rs:550 — // FIXME: https://github.com/rust-lang/rust/issues/129031
  • FixmeComment crates/bevy_image/src/saver.rs:67 — // FIXME: https://github.com/rust-lang/rust/issues/129031
  • FixmeComment crates/bevy_image/src/ktx2.rs:1028 — // FIXME: Red and green channels can be swapped for ATI2n/3Dc — 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 crates/bevy_ecs/src/reflect/bundle.rs:173 — // FIXME: once we have unique reflect, use `TypePath`. — 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 crates/bevy_ecs/src/reflect/bundle.rs:218 — // FIXME: once we have unique reflect, use `TypePath`. — 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 crates/bevy_ecs/src/reflect/mod.rs:159 — // FIXME: once we have unique reflect, use `TypePath`. — 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 crates/bevy_ecs/src/entity/entity_set.rs:178 — // FIXME: When subtrait item shadowing stabilizes, this should be renamed and shadow `Iterator::collect` — 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 crates/bevy_ecs/src/entity/entity_set.rs:337 — // FIXME: When subtrait item shadowing stabilizes, this should be renamed and shadow `FromIterator::from_iter` — 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 benches/benches/bevy_ecs/scheduling/schedule.rs:112 — // FIXME: Running the game clutters up the benchmarks, so ideally we'd be — 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.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×25
  • Duplicated block (5 lines × 2) crates/bevy_animation/src/gltf_curves.rs:67 — crates/bevy_animation/src/gltf_curves.rs:67-71 | crates/bevy_animation/src/gltf_curves.rs:128-132 — 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) crates/bevy_color/src/okcolor_convert.rs:382 — crates/bevy_color/src/okcolor_convert.rs:382-386 | crates/bevy_color/src/okcolor_convert.rs:508-512 — 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) crates/bevy_image/src/image.rs:1922 — crates/bevy_image/src/image.rs:1922-1926 | crates/bevy_image/src/image.rs:1934-1938 — 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) crates/bevy_image/src/image.rs:1928 — crates/bevy_image/src/image.rs:1928-1932 | crates/bevy_image/src/image.rs:1940-1944 — 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) crates/bevy_image/src/image.rs:2065 — crates/bevy_image/src/image.rs:2065-2069 | crates/bevy_image/src/image.rs:2079-2083 — 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) crates/bevy_image/src/image.rs:2072 — crates/bevy_image/src/image.rs:2072-2076 | crates/bevy_image/src/image.rs:2086-2090 — 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) crates/bevy_mesh/src/primitives/dim2.rs:177 — crates/bevy_mesh/src/primitives/dim2.rs:177-181 | crates/bevy_mesh/src/primitives/dim2.rs:315-319 — 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) crates/bevy_pbr/src/meshlet/from_mesh.rs:339 — crates/bevy_pbr/src/meshlet/from_mesh.rs:339-343 | crates/bevy_pbr/src/meshlet/from_mesh.rs:461-465 — 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) crates/bevy_pbr/src/wireframe.rs:1102 — crates/bevy_pbr/src/wireframe.rs:1102-1106 | crates/bevy_pbr/src/wireframe.rs:1208-1212 — 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) crates/bevy_pbr/src/wireframe.rs:1182 — crates/bevy_pbr/src/wireframe.rs:1182-1186 | crates/bevy_pbr/src/wireframe.rs:1208-1212 — 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) crates/bevy_picking/src/events.rs:1199 — crates/bevy_picking/src/events.rs:1199-1203 | crates/bevy_picking/src/events.rs:1239-1243 — 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) crates/bevy_remote/src/builtin_methods.rs:1682 — crates/bevy_remote/src/builtin_methods.rs:1682-1686 | crates/bevy_remote/src/builtin_methods.rs:1720-1724 — 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) crates/bevy_scene/macros/src/bsn/codegen.rs:119 — crates/bevy_scene/macros/src/bsn/codegen.rs:119-123 | crates/bevy_scene/macros/src/bsn/codegen.rs:158-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 (5 lines × 2) crates/bevy_shape/src/bounding/bounded2d/mod.rs:171 — crates/bevy_shape/src/bounding/bounded2d/mod.rs:171-175 | crates/bevy_shape/src/bounding/bounded3d/mod.rs:197-201 — `crates/bevy_shape/src/bounding/bounded2d/mod.rs` and `crates/bevy_shape/src/bounding/bounded3d/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 8 separate duplicated blocks between them, totalling at least 53 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (5 lines × 2) crates/bevy_text/src/font_atlas.rs:220 — crates/bevy_text/src/font_atlas.rs:220-224 | crates/bevy_text/src/font_atlas.rs:229-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.
  • Duplicated block (5 lines × 2) crates/bevy_asset/src/loader.rs:665 — crates/bevy_asset/src/loader.rs:665-669 | crates/bevy_asset/src/saver.rs:222-226 — 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) crates/bevy_inspector/src/details_panel.rs:389 — crates/bevy_inspector/src/details_panel.rs:389-393 | crates/bevy_inspector/src/entity_tree.rs:110-114 — 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) crates/bevy_shape/src/bounding/bounded2d/mod.rs:602 — crates/bevy_shape/src/bounding/bounded2d/mod.rs:602-606 | crates/bevy_shape/src/bounding/bounded3d/mod.rs:654-658 — `crates/bevy_shape/src/bounding/bounded2d/mod.rs` and `crates/bevy_shape/src/bounding/bounded3d/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 8 separate duplicated blocks between them, totalling at least 53 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (5 lines × 2) crates/bevy_shape/src/bounding/bounded2d/mod.rs:622 — crates/bevy_shape/src/bounding/bounded2d/mod.rs:622-626 | crates/bevy_shape/src/bounding/bounded3d/mod.rs:674-678 — `crates/bevy_shape/src/bounding/bounded2d/mod.rs` and `crates/bevy_shape/src/bounding/bounded3d/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 8 separate duplicated blocks between them, totalling at least 53 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (5 lines × 2) crates/bevy_shape/src/bounding/raycast2d.rs:136 — crates/bevy_shape/src/bounding/raycast2d.rs:136-140 | crates/bevy_shape/src/bounding/raycast3d.rs:140-144 — 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) crates/bevy_reflect/src/func/dynamic_function.rs:279 — crates/bevy_reflect/src/func/dynamic_function.rs:279-283 | crates/bevy_reflect/src/func/dynamic_function_mut.rs:236-240 — 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) crates/bevy_shape/src/bounding/bounded2d/mod.rs:242 — crates/bevy_shape/src/bounding/bounded2d/mod.rs:242-246 | crates/bevy_shape/src/bounding/bounded3d/mod.rs:268-272 — `crates/bevy_shape/src/bounding/bounded2d/mod.rs` and `crates/bevy_shape/src/bounding/bounded3d/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 8 separate duplicated blocks between them, totalling at least 53 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (5 lines × 2) crates/bevy_shape/src/bounding/raycast2d.rs:174 — crates/bevy_shape/src/bounding/raycast2d.rs:174-178 | crates/bevy_shape/src/bounding/raycast3d.rs:185-189 — 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) crates/bevy_app/src/sub_app.rs:459 — crates/bevy_app/src/sub_app.rs:459-463 | crates/bevy_app/src/sub_app.rs:476-480 — 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) crates/bevy_render/src/render_resource/storage_buffer.rs:259 — crates/bevy_render/src/render_resource/storage_buffer.rs:259-263 | crates/bevy_render/src/render_resource/uniform_buffer.rs:328-332 — 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 · Duplicated block (11 lines × 2) · ×24
  • Duplicated block (11 lines × 2) crates/bevy_asset/src/loader_builders.rs:67 — crates/bevy_asset/src/loader_builders.rs:67-77 | crates/bevy_asset/src/server/mod.rs:1741-1751 — 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 (11 lines × 2) crates/bevy_curve/src/lib.rs:913 — crates/bevy_curve/src/lib.rs:913-923 | crates/bevy_curve/src/lib.rs:954-964 — 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) crates/bevy_feathers/src/focus.rs:59 — crates/bevy_feathers/src/focus.rs:59-69 | crates/bevy_feathers/src/focus.rs:74-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.
  • Duplicated block (11 lines × 2) crates/bevy_gizmos_render/src/pipeline_2d.rs:109 — crates/bevy_gizmos_render/src/pipeline_2d.rs:109-119 | crates/bevy_gizmos_render/src/pipeline_2d.rs:191-201 — 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) crates/bevy_inspector/src/details_panel.rs:1935 — crates/bevy_inspector/src/details_panel.rs:1935-1945 | crates/bevy_inspector/src/details_panel.rs:1984-1994 — 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) crates/bevy_mesh/src/primitives/dim3/cone.rs:162 — crates/bevy_mesh/src/primitives/dim3/cone.rs:162-172 | crates/bevy_mesh/src/primitives/dim3/cylinder.rs:195-205 — 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 (11 lines × 2) crates/bevy_pbr/src/meshlet/from_mesh.rs:315 — crates/bevy_pbr/src/meshlet/from_mesh.rs:315-326 | crates/bevy_pbr/src/meshlet/from_mesh.rs:429-439 — 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) crates/bevy_pbr/src/render/mesh.rs:4704 — crates/bevy_pbr/src/render/mesh.rs:4704-4718 | crates/bevy_sprite_render/src/mesh2d/mesh.rs:1106-1116 — before extracting anything, compare `crates/bevy_pbr/src/render/mesh.rs` and `crates/bevy_sprite_render/src/mesh2d/mesh.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) crates/bevy_picking/src/events.rs:889 — crates/bevy_picking/src/events.rs:889-899 | crates/bevy_picking/src/events.rs:998-1008 — 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) crates/bevy_picking/src/events.rs:1054 — crates/bevy_picking/src/events.rs:1054-1064 | crates/bevy_picking/src/events.rs:1086-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.
  • Duplicated block (11 lines × 2) crates/bevy_render/src/render_resource/buffer_vec.rs:158 — crates/bevy_render/src/render_resource/buffer_vec.rs:158-168 | crates/bevy_render/src/render_resource/buffer_vec.rs:387-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.
  • Duplicated block (11 lines × 2) crates/bevy_scene/macros/src/bsn/codegen.rs:509 — crates/bevy_scene/macros/src/bsn/codegen.rs:509-519 | crates/bevy_scene/macros/src/bsn/codegen.rs:655-665 — 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) REDACTED:138 — REDACTED:138-148 | REDACTED:152-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 (11 lines × 2) crates/bevy_ui_render/src/box_shadow.rs:485 — crates/bevy_ui_render/src/box_shadow.rs:485-495 | crates/bevy_ui_render/src/gradient.rs:854-864 — before extracting anything, compare `crates/bevy_ui_render/src/box_shadow.rs` and `crates/bevy_ui_render/src/gradient.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) crates/bevy_ui_render/src/lib.rs:1025 — crates/bevy_ui_render/src/lib.rs:1025-1035 | crates/bevy_ui_render/src/lib.rs:1596-1606 — 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) crates/bevy_color/src/hsla.rs:95 — crates/bevy_color/src/hsla.rs:95-105 | crates/bevy_color/src/okhsla.rs:102-112 — before extracting anything, compare `crates/bevy_color/src/hsla.rs` and `crates/bevy_color/src/okhsla.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) crates/bevy_color/src/lcha.rs:99 — crates/bevy_color/src/lcha.rs:99-109 | crates/bevy_color/src/oklcha.rs:94-104 — before extracting anything, compare `crates/bevy_color/src/lcha.rs` and `crates/bevy_color/src/oklcha.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) crates/bevy_ecs/src/world/deferred_world.rs:435 — crates/bevy_ecs/src/world/deferred_world.rs:435-445 | crates/bevy_ecs/src/world/mod.rs:1042-1052 — 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 (11 lines × 2) crates/bevy_color/src/hsva.rs:182 — crates/bevy_color/src/hsva.rs:182-192 | crates/bevy_color/src/okhwba.rs:216-226 — 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 (11 lines × 2) crates/bevy_core_pipeline/src/core_2d/main_opaque_pass_2d_node.rs:50 — crates/bevy_core_pipeline/src/core_2d/main_opaque_pass_2d_node.rs:50-60 | crates/bevy_core_pipeline/src/core_2d/main_transparent_pass_2d_node.rs:56-66 — 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 (11 lines × 2) crates/bevy_asset/src/io/processor_gated.rs:54 — crates/bevy_asset/src/io/processor_gated.rs:54-64 | crates/bevy_asset/src/io/processor_gated.rs:77-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.
  • Duplicated block (11 lines × 2) crates/bevy_reflect/src/serde/ser/structs.rs:34 — crates/bevy_reflect/src/serde/ser/structs.rs:34-44 | crates/bevy_reflect/src/serde/ser/tuple_structs.rs:34-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.
  • Duplicated block (11 lines × 2) crates/bevy_solari/src/pathtracer/mod.rs:46 — crates/bevy_solari/src/pathtracer/mod.rs:46-56 | crates/bevy_solari/src/scene/mod.rs:52-62 — 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 (11 lines × 2) crates/bevy_solari/src/realtime/node.rs:418 — crates/bevy_solari/src/realtime/node.rs:418-428 | crates/bevy_solari/src/realtime/node.rs:437-447 — 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.
D2 · Cognitive Complexity · bevy_feathers · ×20
  • bevy_feathers::controls::toggle_switch::set_switch_styles (cognitive 63) crates/bevy_feathers/src/controls/toggle_switch.rs:221 — bevy_feathers::controls::toggle_switch::set_switch_styles has cognitive complexity 63 (threshold 15). Drivers by points: if/else 45 (53 pts), boolean chains 8, match/switch 2 (nesting depth added 8). 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.
  • bevy_feathers::controls::tabs::update_tab_fillets (cognitive 43) crates/bevy_feathers/src/controls/tabs.rs:570 — bevy_feathers::controls::tabs::update_tab_fillets has cognitive complexity 43 (threshold 15). Drivers by points: if/else 5 (20 pts), match/switch 3 (11 pts), boolean chains 6, loops 3 (6 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.
  • bevy_feathers::controls::radio::set_radio_styles (cognitive 39) crates/bevy_feathers/src/controls/radio.rs:259 — bevy_feathers::controls::radio::set_radio_styles has cognitive complexity 39 (threshold 15). Drivers by points: if/else 27 (31 pts), boolean chains 5, match/switch 3 (nesting depth added 4). 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.
  • bevy_feathers::controls::checkbox::set_checkbox_styles (cognitive 36) crates/bevy_feathers/src/controls/checkbox.rs:267 — bevy_feathers::controls::checkbox::set_checkbox_styles has cognitive complexity 36 (threshold 15). Drivers by points: if/else 24 (28 pts), boolean chains 4, match/switch 4 (nesting depth added 4). 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.
  • bevy_feathers::controls::menu::on_menu_event (cognitive 34) crates/bevy_feathers/src/controls/menu.rs:68 — bevy_feathers::controls::menu::on_menu_event has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 4 (8 pts), match/switch 1 (nesting depth added 19). 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.
  • bevy_feathers::controls::scrollbar::update_scrollbar_visibility (cognitive 30) crates/bevy_feathers/src/controls/scrollbar.rs:117 — bevy_feathers::controls::scrollbar::update_scrollbar_visibility has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (23 pts), match/switch 2 (5 pts), boolean chains 1, 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.
  • bevy_feathers::controls::color_wheel::update_wheel_color (cognitive 29) crates/bevy_feathers/src/controls/color_wheel.rs:244 — bevy_feathers::controls::color_wheel::update_wheel_color has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 4, loops 1 (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.
  • bevy_feathers::controls::menu::on_lazy_menu_event (cognitive 28) crates/bevy_feathers/src/controls/menu.rs:176 — bevy_feathers::controls::menu::on_lazy_menu_event has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 3 (6 pts), match/switch 1 (nesting depth added 15). 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.
  • bevy_feathers::controls::tabs::update_tab_styles (cognitive 24) crates/bevy_feathers/src/controls/tabs.rs:393 — bevy_feathers::controls::tabs::update_tab_styles has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 5 (10 pts), if/else 6 (9 pts), boolean chains 3, loops 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.
  • bevy_feathers::controls::select::focus_select_popup (cognitive 23) crates/bevy_feathers/src/controls/select.rs:236 — bevy_feathers::controls::select::focus_select_popup has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 3 (7 pts), boolean chains 1 (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.
  • bevy_feathers::controls::split_pane::update_split_pane_handle_styles (cognitive 20) crates/bevy_feathers/src/controls/split_pane.rs:140 — bevy_feathers::controls::split_pane::update_split_pane_handle_styles has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (9 pts), match/switch 3 (6 pts), loops 2 (3 pts), boolean chains 2 (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.
  • bevy_feathers::controls::tabs::update_insertion_indicators (cognitive 20) crates/bevy_feathers/src/controls/tabs.rs:715 — bevy_feathers::controls::tabs::update_insertion_indicators has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (4 pts), match/switch 1 (3 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.
  • bevy_feathers::controls::color_input::set_pane_visible (cognitive 19) crates/bevy_feathers/src/controls/color_input.rs:1038 — bevy_feathers::controls::color_input::set_pane_visible has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 1 (nesting depth added 2). 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.
  • bevy_feathers::controls::tabs::arrange_tab_lists (cognitive 19) crates/bevy_feathers/src/controls/tabs.rs:496 — bevy_feathers::controls::tabs::arrange_tab_lists has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), boolean chains 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.
  • bevy_feathers::controls::number_input::scrubber_on_release (cognitive 18) crates/bevy_feathers/src/controls/number_input.rs:912 — bevy_feathers::controls::number_input::scrubber_on_release has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (17 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.
  • bevy_feathers::controls::number_input::update_chevron_visibility (cognitive 17) crates/bevy_feathers/src/controls/number_input.rs:1468 — bevy_feathers::controls::number_input::update_chevron_visibility has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, loops 1 (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.
  • bevy_feathers::controls::select::sync_select_width (cognitive 17) crates/bevy_feathers/src/controls/select.rs:272 — bevy_feathers::controls::select::sync_select_width has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 2 (3 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.
  • bevy_feathers::focus::manage_focus_indicators (cognitive 17) crates/bevy_feathers/src/focus.rs:38 — bevy_feathers::focus::manage_focus_indicators has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (5 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.
  • bevy_feathers::controls::color_plane::update_plane_thumb_position (cognitive 16) crates/bevy_feathers/src/controls/color_plane.rs:229 — bevy_feathers::controls::color_plane::update_plane_thumb_position has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 1, 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.
  • bevy_feathers::controls::tabs::spawn_tab_drag_proxy (cognitive 16) crates/bevy_feathers/src/controls/tabs.rs:835 — bevy_feathers::controls::tabs::spawn_tab_drag_proxy has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 2 (3 pts), match/switch 2, boolean chains 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.
D3 · God Classes · ClassTooLong · ×20
  • ClassTooLong: World crates/bevy_ecs/src/world/mod.rs:96 — ClassTooLong — 1302 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 185 methods, 7 blocks, lines 96-4060. The bar is 400 significant lines; this is 902 over it, 3.26× 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: Mesh crates/bevy_mesh/src/mesh.rs:230 — ClassTooLong — 1185 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 128 methods, 3 blocks, lines 230-3027. The bar is 400 significant lines; this is 785 over it, 2.96× 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: EntityWorldMut crates/bevy_ecs/src/world/entity_access/world_mut.rs:54 — ClassTooLong — 932 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 133 methods, 2 blocks, lines 54-2375. The bar is 400 significant lines; this is 532 over it, 2.33× 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: AssetServer crates/bevy_asset/src/server/mod.rs:66 — ClassTooLong — 924 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 65 methods, 3 blocks, lines 66-2368. The bar is 400 significant lines; this is 524 over it, 2.31× 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: QueryState crates/bevy_ecs/src/query/state.rs:85 — ClassTooLong — 843 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 67 methods, 7 blocks, lines 85-2155. The bar is 400 significant lines; this is 443 over it, 2.11× 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: AssetProcessor crates/bevy_asset/src/processor/mod.rs:98 — ClassTooLong — 745 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 31 methods, 2 blocks, lines 98-1338. The bar is 400 significant lines; this is 345 over it, 1.86× 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: MaterialBindlessSlab crates/bevy_render/src/material_bind_groups.rs:121 — ClassTooLong — 701 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 18 methods, 3 blocks, lines 121-2329. The bar is 400 significant lines; this is 301 over it, 1.75× 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: GltfLoader crates/bevy_gltf/src/loader/mod.rs:199 — ClassTooLong — 675 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 1 methods, 3 blocks, lines 199-1285. The bar is 400 significant lines; this is 275 over it, 1.69× 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: Image crates/bevy_image/src/image.rs:641 — ClassTooLong — 670 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 36 methods, 3 blocks, lines 641-2196. The bar is 400 significant lines; this is 270 over it, 1.68× 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: ScheduleGraph crates/bevy_ecs/src/schedule/schedule.rs:787 — ClassTooLong — 615 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 31 methods, 3 blocks, lines 787-1876. The bar is 400 significant lines; this is 215 over it, 1.54× 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: WinitAppRunnerState crates/bevy_winit/src/state.rs:53 — ClassTooLong — 520 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 10 methods, 4 blocks, lines 53-927. The bar is 400 significant lines; this is 120 over it, 1.30× 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: VertexAttributeValues crates/bevy_mesh/src/vertex.rs:321 — ClassTooLong — 516 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 13 methods, 2 blocks, lines 321-1013. The bar is 400 significant lines; this is 116 over it, 1.29× 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: Query crates/bevy_ecs/src/system/query.rs:488 — ClassTooLong — 510 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 71 methods, 8 blocks, lines 488-2958. The bar is 400 significant lines; this is 110 over it, 1.28× 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: StandardMaterial crates/bevy_pbr/src/pbr_material.rs:27 — 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), 4 methods, 8 blocks, lines 27-1624. 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: PipelineCache crates/bevy_render/src/render_resource/pipeline_cache.rs:219 — ClassTooLong — 478 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 24 methods, 2 blocks, lines 219-991. The bar is 400 significant lines; this is 78 over it, 1.20× 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: AssetInfos crates/bevy_asset/src/server/info.rs:122 — ClassTooLong — 457 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 22 methods, 3 blocks, lines 122-830. The bar is 400 significant lines; this is 57 over it, 1.14× 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: MeshPipeline crates/bevy_pbr/src/render/mesh.rs:2756 — ClassTooLong — 427 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 1 methods, 5 blocks, lines 2756-3801. The bar is 400 significant lines; this is 27 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.
  • ClassTooLong: Color crates/bevy_color/src/color.rs:57 — ClassTooLong — 421 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 36 methods, 10 blocks, lines 57-1206. The bar is 400 significant lines; this is 21 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: PreprocessBindGroupBuilder crates/bevy_pbr/src/render/gpu_preprocess.rs:2362 — ClassTooLong — 410 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 9 methods, 2 blocks, lines 2362-3101. The bar is 400 significant lines; this is 10 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.
  • ClassTooLong: UniqueEntityEquivalentSlice crates/bevy_ecs/src/entity/unique_slice.rs:40 — ClassTooLong — 402 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 64 methods, 37 blocks, lines 47-1500. The bar is 400 significant lines; this is 2 over it, 1.01× 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.
D2 · Cognitive Complexity · bevy_ui_render · ×19
  • bevy_ui_render::prepare_uinodes (cognitive 105) crates/bevy_ui_render/src/lib.rs:2275 — bevy_ui_render::prepare_uinodes has cognitive complexity 105 (threshold 15). Drivers by points: if/else 16 (57 pts), loops 8 (33 pts), match/switch 3 (11 pts), boolean chains 4 (nesting depth added 74). 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.
  • bevy_ui_render::gradient::prepare_gradient (cognitive 91) crates/bevy_ui_render/src/gradient.rs:835 — bevy_ui_render::gradient::prepare_gradient has cognitive complexity 91 (threshold 15). Drivers by points: if/else 14 (62 pts), loops 5 (22 pts), match/switch 1 (5 pts), boolean chains 2 (nesting depth added 69). 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.
  • bevy_ui_render::ui_texture_slice_pipeline::prepare_ui_slices (cognitive 68) crates/bevy_ui_render/src/ui_texture_slice_pipeline.rs:475 — bevy_ui_render::ui_texture_slice_pipeline::prepare_ui_slices has cognitive complexity 68 (threshold 15). Drivers by points: if/else 14 (47 pts), loops 5 (16 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 45). 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.
  • bevy_ui_render::text::extract_text_cursor (cognitive 50) crates/bevy_ui_render/src/text.rs:37 — bevy_ui_render::text::extract_text_cursor has cognitive complexity 50 (threshold 15). Drivers by points: if/else 13 (41 pts), boolean chains 5, loops 2 (4 pts) (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.
  • bevy_ui_render::gradient::extract_gradients (cognitive 39) crates/bevy_ui_render/src/gradient.rs:343 — bevy_ui_render::gradient::extract_gradients has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 6 (11 pts), match/switch 1 (4 pts) (nesting depth added 23). 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.
  • bevy_ui_render::ui_material_pipeline::prepare_uimaterial_nodes (cognitive 32) crates/bevy_ui_render/src/ui_material_pipeline.rs:494 — bevy_ui_render::ui_material_pipeline::prepare_uimaterial_nodes has cognitive complexity 32 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 4 (16 pts) (nesting depth added 23). 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.
  • bevy_ui_render::extract_uinode_borders (cognitive 31) crates/bevy_ui_render/src/lib.rs:1081 — bevy_ui_render::extract_uinode_borders has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 4 (14 pts), boolean chains 2, loops 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.
  • bevy_ui_render::box_shadow::extract_shadows (cognitive 28) crates/bevy_ui_render/src/box_shadow.rs:210 — bevy_ui_render::box_shadow::extract_shadows has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 5 (8 pts), match/switch 1 (3 pts), boolean chains 1 (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.
  • bevy_ui_render::extract_text_shadows (cognitive 26) crates/bevy_ui_render/src/lib.rs:1771 — bevy_ui_render::extract_text_shadows has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 3 (5 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.
  • bevy_ui_render::debug_overlay::extract_debug_overlay (cognitive 24) crates/bevy_ui_render/src/debug_overlay.rs:172 — bevy_ui_render::debug_overlay::extract_debug_overlay has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 1, loops 1 (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.
  • bevy_ui_render::extract_text_decorations (cognitive 23) crates/bevy_ui_render/src/lib.rs:1949 — bevy_ui_render::extract_text_decorations has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 2 (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.
  • bevy_ui_render::ui_texture_slice_pipeline::extract_ui_texture_slices (cognitive 23) crates/bevy_ui_render/src/ui_texture_slice_pipeline.rs:219 — bevy_ui_render::ui_texture_slice_pipeline::extract_ui_texture_slices has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 4 (6 pts), match/switch 3 (6 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.
  • bevy_ui_render::extract_uinode_changes (cognitive 22) crates/bevy_ui_render/src/lib.rs:439 — bevy_ui_render::extract_uinode_changes has cognitive complexity 22 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 5 (7 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 9). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to one function item inside it that branches (process_changed_entity). 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.
  • bevy_ui_render::extract_uinode_images (cognitive 22) crates/bevy_ui_render/src/lib.rs:916 — bevy_ui_render::extract_uinode_images has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 3 (5 pts), boolean chains 2, loops 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.
  • bevy_ui_render::extract_text_sections (cognitive 22) crates/bevy_ui_render/src/lib.rs:1628 — bevy_ui_render::extract_text_sections has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 4, loops 2 (3 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.
  • bevy_ui_render::box_shadow::prepare_shadows (cognitive 22) crates/bevy_ui_render/src/box_shadow.rs:466 — bevy_ui_render::box_shadow::prepare_shadows has cognitive complexity 22 (threshold 15). Drivers by points: loops 4 (13 pts), if/else 3 (9 pts) (nesting depth added 15). 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.
  • bevy_ui_render::ui_material_pipeline::extract_ui_material_nodes (cognitive 21) crates/bevy_ui_render/src/ui_material_pipeline.rs:329 — bevy_ui_render::ui_material_pipeline::extract_ui_material_nodes has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 4 (6 pts), boolean chains 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.
  • bevy_ui_render::extract_ui_camera_view (cognitive 20) crates/bevy_ui_render/src/lib.rs:1406 — bevy_ui_render::extract_ui_camera_view has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 1 (3 pts), loops 2, 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.
  • bevy_ui_render::extract_uinode_background_colors (cognitive 18) crates/bevy_ui_render/src/lib.rs:720 — bevy_ui_render::extract_uinode_background_colors has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), match/switch 2 (5 pts), boolean chains 3, loops 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.
D2 · Cognitive Complexity · bevy_render · ×19
  • bevy_render::batching::gpu_preprocessing::batch_and_prepare_sorted_render_phase (cognitive 61) crates/bevy_render/src/batching/gpu_preprocessing.rs:1850 — bevy_render::batching::gpu_preprocessing::batch_and_prepare_sorted_render_phase has cognitive complexity 61 (threshold 15). Drivers by points: if/else 15 (44 pts), match/switch 4 (14 pts), loops 2 (3 pts) (nesting depth added 40). 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.
  • bevy_render::batching::gpu_preprocessing::batch_and_prepare_binned_render_phase (cognitive 61) crates/bevy_render/src/batching/gpu_preprocessing.rs:2079 — bevy_render::batching::gpu_preprocessing::batch_and_prepare_binned_render_phase has cognitive complexity 61 (threshold 15). Drivers by points: if/else 13 (29 pts), match/switch 4 (18 pts), loops 7 (14 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.
  • bevy_render::camera::extract_cameras (cognitive 51) crates/bevy_render/src/camera.rs:482 — bevy_render::camera::extract_cameras has cognitive complexity 51 (threshold 15). Drivers by points: if/else 15 (31 pts), loops 4 (9 pts), match/switch 2 (8 pts), boolean chains 3 (nesting depth added 27). 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.
  • bevy_render::batching::no_gpu_preprocessing::batch_and_prepare_binned_render_phase (cognitive 31) crates/bevy_render/src/batching/no_gpu_preprocessing.rs:108 — bevy_render::batching::no_gpu_preprocessing::batch_and_prepare_binned_render_phase has cognitive complexity 31 (threshold 15). Drivers by points: if/else 4 (16 pts), loops 5 (11 pts), match/switch 1 (3 pts), boolean chains 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.
  • bevy_render::batching::gpu_preprocessing::write_binned_instance_buffers (cognitive 30) crates/bevy_render/src/batching/gpu_preprocessing.rs:2840 — bevy_render::batching::gpu_preprocessing::write_binned_instance_buffers has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 3 (5 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.
  • bevy_render::camera::camera_system (cognitive 29) crates/bevy_render/src/camera.rs:355 — bevy_render::camera::camera_system has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (19 pts), match/switch 2 (5 pts), boolean chains 4, loops 1 (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.
  • bevy_render::view::window::screenshot::save_to_disk (cognitive 28) crates/bevy_render/src/view/window/screenshot.rs:145 — bevy_render::view::window::screenshot::save_to_disk has cognitive complexity 28 (threshold 15). Drivers by points: match/switch 5 (13 pts), if/else 3 (10 pts), loops 1 (5 pts) (nesting depth added 19). 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.
  • bevy_render::render_asset::extract_render_asset (cognitive 26) crates/bevy_render/src/render_asset.rs:293 — bevy_render::render_asset::extract_render_asset has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (16 pts), match/switch 2 (8 pts), loops 2 (nesting depth added 16). 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.
  • bevy_render::render_asset::prepare_assets (cognitive 24) crates/bevy_render/src/render_asset.rs:393 — bevy_render::render_asset::prepare_assets has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 2 (4 pts), loops 3, boolean chains 2 (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.
  • bevy_render::view::window::create_surfaces (cognitive 24) crates/bevy_render/src/view/window/mod.rs:368 — bevy_render::view::window::create_surfaces has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 2 (6 pts), loops 2 (4 pts), boolean chains 2 (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.
  • bevy_render::erased_render_asset::prepare_erased_assets (cognitive 23) crates/bevy_render/src/erased_render_asset.rs:372 — bevy_render::erased_render_asset::prepare_erased_assets has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3, match/switch 2 (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.
  • bevy_render::render_phase::remove_entity_from_bin (cognitive 21) crates/bevy_render/src/render_phase/mod.rs:1454 — bevy_render::render_phase::remove_entity_from_bin has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (20 pts), match/switch 1 (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.
  • bevy_render::view::window::extract_windows (cognitive 21) crates/bevy_render/src/view/window/mod.rs:119 — bevy_render::view::window::extract_windows has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 4, 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.
  • bevy_render::batching::gpu_preprocessing::write_batched_instance_buffers (cognitive 20) crates/bevy_render/src/batching/gpu_preprocessing.rs:2723 — bevy_render::batching::gpu_preprocessing::write_batched_instance_buffers has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (14 pts), loops 2 (3 pts), match/switch 1 (3 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.
  • bevy_render::erased_render_asset::extract_erased_render_asset (cognitive 20) crates/bevy_render/src/erased_render_asset.rs:280 — bevy_render::erased_render_asset::extract_erased_render_asset has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2, match/switch 1 (2 pts) (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.
  • bevy_render::gpu_component_array_buffer::update_components (cognitive 20) crates/bevy_render/src/gpu_component_array_buffer.rs:130 — bevy_render::gpu_component_array_buffer::update_components has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2, loops 2, 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.
  • bevy_render::view::window::screenshot::submit_screenshot_commands (cognitive 18) crates/bevy_render/src/view/window/screenshot.rs:558 — bevy_render::view::window::screenshot::submit_screenshot_commands has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (15 pts), match/switch 1 (2 pts), loops 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.
  • bevy_render::view::prepare_view_targets (cognitive 17) crates/bevy_render/src/view/mod.rs:1390 — bevy_render::view::prepare_view_targets has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 4 (8 pts), if/else 4 (7 pts), boolean chains 1, loops 1 (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.
  • bevy_render::view::window::prepare_windows (cognitive 16) crates/bevy_render/src/view/window/mod.rs:258 — bevy_render::view::window::prepare_windows has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), match/switch 2 (5 pts), boolean chains 4, 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.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×19
  • Duplicated block (12 lines × 2) crates/bevy_asset/src/io/file/sync_file_asset.rs:103 — crates/bevy_asset/src/io/file/sync_file_asset.rs:103-114 | crates/bevy_asset/src/io/file/sync_file_asset.rs:118-129 — 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) crates/bevy_asset/src/path.rs:374 — crates/bevy_asset/src/path.rs:374-385 | crates/bevy_asset/src/path.rs:411-422 — 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) crates/bevy_core_pipeline/src/core_3d/mod.rs:839 — crates/bevy_core_pipeline/src/core_3d/mod.rs:839-850 | crates/bevy_core_pipeline/src/core_3d/mod.rs:860-871 — 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) crates/bevy_ecs/macros/src/query_data.rs:494 — crates/bevy_ecs/macros/src/query_data.rs:494-505 | crates/bevy_ecs/macros/src/query_data.rs:579-590 — 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) crates/bevy_ecs/src/query/state.rs:312 — crates/bevy_ecs/src/query/state.rs:312-323 | crates/bevy_ecs/src/query/state.rs:355-366 — 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) crates/bevy_pbr/src/light_probe/generate.rs:568 — crates/bevy_pbr/src/light_probe/generate.rs:568-579 | crates/bevy_pbr/src/light_probe/generate.rs:584-595 — 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) crates/bevy_pbr/src/material.rs:323 — crates/bevy_pbr/src/material.rs:323-334 | crates/bevy_sprite_render/src/mesh2d/material.rs:1442-1453 — before extracting anything, compare `crates/bevy_pbr/src/material.rs` and `crates/bevy_sprite_render/src/mesh2d/material.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) crates/bevy_pbr/src/meshlet/material_pipeline_prepare.rs:191 — crates/bevy_pbr/src/meshlet/material_pipeline_prepare.rs:191-202 | crates/bevy_pbr/src/meshlet/material_pipeline_prepare.rs:367-378 — 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) crates/bevy_pbr/src/prepass/mod.rs:1140 — crates/bevy_pbr/src/prepass/mod.rs:1140-1151 | crates/bevy_pbr/src/render/light.rs:2560-2571 — before extracting anything, compare `crates/bevy_pbr/src/prepass/mod.rs` and `crates/bevy_pbr/src/render/light.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 110 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) crates/bevy_pbr/src/render/gpu_preprocess.rs:1030 — crates/bevy_pbr/src/render/gpu_preprocess.rs:1030-1044 | crates/bevy_render/src/render_resource/sparse_buffer_vec.rs:206-217 — 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 (12 lines × 2) crates/bevy_reflect/src/map.rs:489 — crates/bevy_reflect/src/map.rs:489-500 | crates/bevy_reflect/src/set.rs:418-429 — 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 (12 lines × 2) crates/bevy_reflect/src/structs.rs:615 — crates/bevy_reflect/src/structs.rs:615-626 | crates/bevy_reflect/src/tuple_struct.rs:453-464 — 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 (12 lines × 2) crates/bevy_render/src/erased_render_asset.rs:286 — crates/bevy_render/src/erased_render_asset.rs:286-297 | crates/bevy_render/src/render_asset.rs:299-310 — before extracting anything, compare `crates/bevy_render/src/erased_render_asset.rs` and `crates/bevy_render/src/render_asset.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) crates/bevy_render/src/render_phase/mod.rs:1497 — crates/bevy_render/src/render_phase/mod.rs:1497-1508 | crates/bevy_render/src/render_phase/mod.rs:1511-1522 — 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) crates/bevy_sprite_render/src/text2d/mod.rs:272 — crates/bevy_sprite_render/src/text2d/mod.rs:272-283 | crates/bevy_sprite_render/src/text2d/mod.rs:296-307 — 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) crates/bevy_ecs/src/world/deferred_world.rs:469 — crates/bevy_ecs/src/world/deferred_world.rs:469-480 | crates/bevy_ecs/src/world/mod.rs:2328-2339 — 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 (12 lines × 2) crates/bevy_pbr/src/render/gpu_preprocess.rs:639 — crates/bevy_pbr/src/render/gpu_preprocess.rs:639-651 | crates/bevy_pbr/src/render/gpu_preprocess.rs:815-826 — 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) crates/bevy_pbr/src/meshlet/resource_manager.rs:871 — crates/bevy_pbr/src/meshlet/resource_manager.rs:871-882 | crates/bevy_pbr/src/meshlet/resource_manager.rs:908-919 — 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) crates/bevy_ui_render/src/lib.rs:2309 — crates/bevy_ui_render/src/lib.rs:2309-2320 | crates/bevy_ui_render/src/ui_texture_slice_pipeline.rs:509-520 — before extracting anything, compare `crates/bevy_ui_render/src/lib.rs` and `crates/bevy_ui_render/src/ui_texture_slice_pipeline.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D1 · Cyclomatic Complexity · bevy_pbr · ×16
  • bevy_pbr::render::light::prepare_lights (cyclomatic 71) crates/bevy_pbr/src/render/light.rs:1038 — bevy_pbr::render::light::prepare_lights has cyclomatic complexity 71 (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.
  • bevy_pbr::prepass::specialize_prepass_material_meshes (cyclomatic 44) crates/bevy_pbr/src/prepass/mod.rs:1013 — bevy_pbr::prepass::specialize_prepass_material_meshes 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.
  • bevy_pbr::render::light::extract_lights (cyclomatic 38) crates/bevy_pbr/src/render/light.rs:320 — bevy_pbr::render::light::extract_lights has cyclomatic complexity 38 (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.
  • bevy_pbr::meshlet::material_pipeline_prepare::prepare_material_meshlet_meshes_main_opaque_pass (cyclomatic 29) crates/bevy_pbr/src/meshlet/material_pipeline_prepare.rs:37 — bevy_pbr::meshlet::material_pipeline_prepare::prepare_material_meshlet_meshes_main_opaque_pass 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.
  • bevy_pbr::prepass::queue_prepass_material_meshes (cyclomatic 26) crates/bevy_pbr/src/prepass/mod.rs:1315 — bevy_pbr::prepass::queue_prepass_material_meshes has cyclomatic complexity 26 (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.
  • bevy_pbr::render::light::specialize_shadows (cyclomatic 26) crates/bevy_pbr/src/render/light.rs:2437 — bevy_pbr::render::light::specialize_shadows has cyclomatic complexity 26 (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.
  • bevy_pbr::render::mesh::check_views_need_specialization (cyclomatic 26) crates/bevy_pbr/src/render/mesh.rs:361 — bevy_pbr::render::mesh::check_views_need_specialization has cyclomatic complexity 26 (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.
  • bevy_pbr::material::specialize_material_meshes (cyclomatic 24) crates/bevy_pbr/src/material.rs:992 — bevy_pbr::material::specialize_material_meshes 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.
  • bevy_pbr::material::queue_material_meshes (cyclomatic 24) crates/bevy_pbr/src/material.rs:1193 — bevy_pbr::material::queue_material_meshes 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.
  • bevy_pbr::render::mesh_view_bindings::prepare_mesh_view_bind_groups (cyclomatic 24) crates/bevy_pbr/src/render/mesh_view_bindings.rs:648 — bevy_pbr::render::mesh_view_bindings::prepare_mesh_view_bind_groups 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.
  • bevy_pbr::render::gpu_preprocess::early_gpu_preprocess (cyclomatic 22) crates/bevy_pbr/src/render/gpu_preprocess.rs:790 — bevy_pbr::render::gpu_preprocess::early_gpu_preprocess 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.
  • bevy_pbr::wireframe::specialize_wireframes (cyclomatic 22) crates/bevy_pbr/src/wireframe.rs:1442 — bevy_pbr::wireframe::specialize_wireframes 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.
  • bevy_pbr::meshlet::material_pipeline_prepare::prepare_material_meshlet_meshes_prepass (cyclomatic 21) crates/bevy_pbr/src/meshlet/material_pipeline_prepare.rs:282 — bevy_pbr::meshlet::material_pipeline_prepare::prepare_material_meshlet_meshes_prepass 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.
  • bevy_pbr::render::mesh_view_bindings::layout_entries (cyclomatic 20) crates/bevy_pbr/src/render/mesh_view_bindings.rs:272 — bevy_pbr::render::mesh_view_bindings::layout_entries has cyclomatic complexity 20 (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.
  • bevy_pbr::render::mesh::collect_meshes_for_gpu_building (cyclomatic 19) crates/bevy_pbr/src/render/mesh.rs:2494 — bevy_pbr::render::mesh::collect_meshes_for_gpu_building has cyclomatic complexity 19 (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.
  • bevy_pbr::render::gpu_preprocess::run_build_indirect_parameters (cyclomatic 17) crates/bevy_pbr/src/render/gpu_preprocess.rs:1219 — bevy_pbr::render::gpu_preprocess::run_build_indirect_parameters 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.
D2 · Cognitive Complexity · bevy_ui_widgets · ×15
  • bevy_ui_widgets::menu::menu_on_key_event (cognitive 47) crates/bevy_ui_widgets/src/menu.rs:222 — bevy_ui_widgets::menu::menu_on_key_event has cognitive complexity 47 (threshold 15). Drivers by points: if/else 16 (38 pts), match/switch 2 (7 pts), boolean chains 2 (nesting depth added 27). 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.
  • bevy_ui_widgets::list::listbox_on_key_input (cognitive 45) crates/bevy_ui_widgets/src/list.rs:77 — bevy_ui_widgets::list::listbox_on_key_input has cognitive complexity 45 (threshold 15). Drivers by points: if/else 13 (37 pts), match/switch 2 (6 pts), boolean chains 2 (nesting depth added 28). 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.
  • bevy_ui_widgets::popover::position_popover (cognitive 43) crates/bevy_ui_widgets/src/popover.rs:103 — bevy_ui_widgets::popover::position_popover has cognitive complexity 43 (threshold 15). Drivers by points: if/else 8 (23 pts), match/switch 5 (12 pts), loops 3 (8 pts) (nesting depth added 27). 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.
  • bevy_ui_widgets::scrollbar::update_scrollbar_thumb (cognitive 36) crates/bevy_ui_widgets/src/scrollbar.rs:297 — bevy_ui_widgets::scrollbar::update_scrollbar_thumb has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (29 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 19). Of this number, 27 points are the body's own statements and 9 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.
  • bevy_ui_widgets::tree::update_tree_view_derived_state (cognitive 32) crates/bevy_ui_widgets/src/tree.rs:567 — bevy_ui_widgets::tree::update_tree_view_derived_state has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 8, 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.
  • bevy_ui_widgets::text_input::on_focused_keyboard_input (cognitive 29) crates/bevy_ui_widgets/src/text_input.rs:118 — bevy_ui_widgets::text_input::on_focused_keyboard_input has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 17, if/else 9 (11 pts), match/switch 1 (nesting depth added 2). 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.
  • bevy_ui_widgets::list::listbox_on_row_click (cognitive 27) crates/bevy_ui_widgets/src/list.rs:205 — bevy_ui_widgets::list::listbox_on_row_click has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (18 pts), match/switch 2 (5 pts), loops 1 (3 pts), boolean chains 1 (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.
  • bevy_ui_widgets::radio::radio_group_on_key_input (cognitive 27) crates/bevy_ui_widgets/src/radio.rs:68 — bevy_ui_widgets::radio::radio_group_on_key_input has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (19 pts), match/switch 2 (6 pts), boolean chains 2 (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.
  • bevy_ui_widgets::slider::slider_on_pointer_down (cognitive 25) crates/bevy_ui_widgets/src/slider.rs:266 — bevy_ui_widgets::slider::slider_on_pointer_down has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (23 pts), 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.
  • bevy_ui_widgets::list::listbox_update_selection (cognitive 23) crates/bevy_ui_widgets/src/list.rs:391 — bevy_ui_widgets::list::listbox_update_selection has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 2 (3 pts), 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.
  • bevy_ui_widgets::tabs::update_tablist_derived_state (cognitive 23) crates/bevy_ui_widgets/src/tabs.rs:812 — bevy_ui_widgets::tabs::update_tablist_derived_state has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 5, loops 2 (3 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.
  • bevy_ui_widgets::drag_proxy::update_drag_proxies (cognitive 17) crates/bevy_ui_widgets/src/drag_proxy.rs:75 — bevy_ui_widgets::drag_proxy::update_drag_proxies has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2, loops 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.
  • bevy_ui_widgets::scrollarea::on_scroll_into_view (cognitive 17) crates/bevy_ui_widgets/src/scrollarea.rs:53 — bevy_ui_widgets::scrollarea::on_scroll_into_view has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (17 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.
  • bevy_ui_widgets::tabs::tab_on_key_input (cognitive 17) crates/bevy_ui_widgets/src/tabs.rs:371 — bevy_ui_widgets::tabs::tab_on_key_input has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 2, match/switch 2 (nesting depth added 2). 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.
  • bevy_ui_widgets::tree::tree_item_on_key_input (cognitive 16) crates/bevy_ui_widgets/src/tree.rs:348 — bevy_ui_widgets::tree::tree_item_on_key_input has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, match/switch 4 (5 pts), boolean chains 4 (nesting depth added 1). 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.
D35 · Change Coupling · Change coupling · ×15
  • Change coupling: mod.rs ↔ mod.rs crates/bevy_shape/src/bounding/bounded2d/mod.rs:1 — `crates/bevy_shape/src/bounding/bounded2d/mod.rs` and `crates/bevy_shape/src/bounding/bounded3d/mod.rs` change together 89% of the time (17 of the 19 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 17 shared commits counted here, the most recent 3 are `b849c821` Add const to bevy_math functions where applicable (#24752) (at that commit the files were still `crates/bevy_math/src/bounding/bounded2d/mod.rs` and `crates/bevy_math/src/bounding/bounded3d/mod.rs`); `e713c7b6` Change `bevy_math` to use `inline` instead of `inline(always)` (#20887) (at that commit the files were still `crates/bevy_math/src/bounding/bounded2d/mod.rs` and `crates/bevy_math/src/bounding/bounded3d/mod.rs`); `48d5c708` Fix aabb area calculation (#20675) (at that commit the files were still `crates/bevy_math/src/bounding/bounded2d/mod.rs` and `crates/bevy_math/src/bounding/bounded3d/mod.rs`) — run `git show` on any of them.
  • Change coupling: multi_threaded.rs ↔ single_threaded.rs crates/bevy_ecs/src/schedule/executor/multi_threaded.rs:1 — `crates/bevy_ecs/src/schedule/executor/multi_threaded.rs` and `crates/bevy_ecs/src/schedule/executor/single_threaded.rs` change together 89% of the time (24 of the 27 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 between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 24 shared commits counted here, the most recent 3 are `a31a24fa` Add a tracing span around apply_deferred in the schedule executors (#…; `8998eafa` panic handling cleanup (#25597); `18d106d2` Pass panics to the fallback error handler (#24240) — run `git show` on any of them.
  • Change coupling: mesh.rs ↔ fallback_image.rs crates/bevy_pbr/src/render/mesh.rs:1 — `crates/bevy_pbr/src/render/mesh.rs` and `crates/bevy_render/src/texture/fallback_image.rs` change together 75% of the time (12 of the 16 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 12 shared commits counted here, the most recent 3 are `27fd2c4f` Reuse gpu textures when possible (#22552); `5f7e43c9` Retain asset without data for RENDER_WORLD-only assets (#21732); `2e9ef698` Fix non-srgb `RenderTarget::Image` (#22090) — run `git show` on any of them.
  • Change coupling: main_opaque_pass_3d_node.rs ↔ node.rs crates/bevy_core_pipeline/src/core_3d/main_opaque_pass_3d_node.rs:1 — `crates/bevy_core_pipeline/src/core_3d/main_opaque_pass_3d_node.rs` and `crates/bevy_core_pipeline/src/prepass/node.rs` change together 73% of the time (11 of the 15 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 11 shared commits counted here, the most recent 3 are `493a2f47` Handle optional depth and stencil views of view depth and prepass dep…; `64cf83d5` Use bevy_log instead of tracing in bevy_core_pipeline (#22920); `b378e0ad` MainPassResolutionOverride changes (#20403) — run `git show` on any of them.
  • Change coupling: mod.rs ↔ mod.rs crates/bevy_core_pipeline/src/core_2d/mod.rs:1 — `crates/bevy_core_pipeline/src/core_2d/mod.rs` and `crates/bevy_core_pipeline/src/core_3d/mod.rs` change together 71% of the time (29 of the 41 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 29 shared commits counted here, the most recent 3 are `493a2f47` Handle optional depth and stencil views of view depth and prepass dep…; `369a7604` Add StartMainPassPostProcessing node for ordering (#20939); `e742730e` Yeet re-exports (#20485) — run `git show` on any of them.
  • Change coupling: storage_buffer.rs ↔ uniform_buffer.rs crates/bevy_render/src/render_resource/storage_buffer.rs:1 — `crates/bevy_render/src/render_resource/storage_buffer.rs` and `crates/bevy_render/src/render_resource/uniform_buffer.rs` change together 62% of the time (8 of the 13 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 between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `f3cb87b8` render buffer debug label type prepopulation (#22698); `a22ecede` Only create changed buffer if it already exists (#13242); `2089a287` Add BufferVec, an higher-performance alternative to StorageBuffer, an… — run `git show` on any of them.
  • Change coupling: primitive_impls.rs ↔ primitive_impls.rs crates/bevy_shape/src/bounding/bounded2d/primitive_impls.rs:1 — `crates/bevy_shape/src/bounding/bounded2d/primitive_impls.rs` and `crates/bevy_shape/src/bounding/bounded3d/primitive_impls.rs` change together 61% of the time (11 of the 18 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 11 shared commits counted here, the most recent 3 are `7fa4f740` Make math primitives runtime constructable, meshable (#20250) (at that commit the files were still `crates/bevy_math/src/bounding/bounded2d/primitive_impls.rs` and `crates/bevy_math/src/bounding/bounded3d/primitive_impls.rs`); `9f6d628c` Improve `Segment2d`/`Segment3d` API and docs (#18206) (at that commit the files were still `crates/bevy_math/src/bounding/bounded2d/primitive_impls.rs` and `crates/bevy_math/src/bounding/bounded3d/primitive_impls.rs`); `7c8da1c0` Reworked Segment types into their cartesian forms (#17404) (at that commit the files were still `crates/bevy_math/src/bounding/bounded2d/primitive_impls.rs` and `crates/bevy_math/src/bounding/bounded3d/primitive_impls.rs`) — run `git show` on any of them.
  • Change coupling: mod.rs ↔ picking_backend.rs crates/bevy_picking/src/mesh_picking/mod.rs:1 — `crates/bevy_picking/src/mesh_picking/mod.rs` and `crates/bevy_sprite/src/picking_backend.rs` change together 60% of the time (6 of the 10 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 6 shared commits counted here, the most recent 3 are `65e289f5` Unify picking backends (#17348); `49659700` bevy: Replace unnecessary tuple type registrations (#18369); `7935c7e9` Update picking docs to include position space (#17859) — run `git show` on any of them.
  • Change coupling: mod.rs ↔ lib.rs crates/bevy_sprite_render/src/text2d/mod.rs:1 — `crates/bevy_sprite_render/src/text2d/mod.rs` and `crates/bevy_ui_render/src/lib.rs` change together 56% of the time (9 of the 16 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 `6b6f6fd8` Easy `Entity::PLACEHOLDER` to `Option<Entity>` conversions (#25119); `463da0f4` `bevy_text`: use `u32`s for line and section indices (#24274); `e48ae43e` Replace the tuple used for text run metadata with a named struct (#23… — run `git show` on any of them.
  • Change coupling: node.rs ↔ node.rs crates/bevy_core_pipeline/src/prepass/node.rs:1 — `crates/bevy_core_pipeline/src/prepass/node.rs` and `crates/bevy_pbr/src/transmission/node.rs` change together 55% of the time (6 of the 11 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 6 shared commits counted here, the most recent 3 are `493a2f47` Handle optional depth and stencil views of view depth and prepass dep…; `b378e0ad` MainPassResolutionOverride changes (#20403) (at that commit the file was still `crates/bevy_core_pipeline/src/core_3d/main_transmissive_pass_3d_node.rs`); `a0b90cd6` Resolution override (#19817) (at that commit the file was still `crates/bevy_core_pipeline/src/core_3d/main_transmissive_pass_3d_node.rs`) — run `git show` on any of them.
  • Change coupling: main_opaque_pass_3d_node.rs ↔ node.rs crates/bevy_core_pipeline/src/core_3d/main_opaque_pass_3d_node.rs:1 — `crates/bevy_core_pipeline/src/core_3d/main_opaque_pass_3d_node.rs` and `crates/bevy_pbr/src/transmission/node.rs` change together 55% of the time (6 of the 11 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 6 shared commits counted here, the most recent 3 are `493a2f47` Handle optional depth and stencil views of view depth and prepass dep…; `b378e0ad` MainPassResolutionOverride changes (#20403) (at that commit the file was still `crates/bevy_core_pipeline/src/core_3d/main_transmissive_pass_3d_node.rs`); `a0b90cd6` Resolution override (#19817) (at that commit the file was still `crates/bevy_core_pipeline/src/core_3d/main_transmissive_pass_3d_node.rs`) — run `git show` on any of them.
  • Change coupling: mod.rs ↔ msaa_writeback.rs crates/bevy_post_process/src/bloom/mod.rs:1 — `crates/bevy_post_process/src/bloom/mod.rs` and `crates/bevy_post_process/src/msaa_writeback.rs` change together 50% of the time (9 of the 18 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 `f95f42b4` Allow calling `add_render_graph_node` on `World`. (#19912) (at that commit the files were still `crates/bevy_core_pipeline/src/bloom/mod.rs` and `crates/bevy_core_pipeline/src/msaa_writeback.rs`); `64e1a783` Clean up 2d render phases (#12982) (at that commit the files were still `crates/bevy_core_pipeline/src/bloom/mod.rs` and `crates/bevy_core_pipeline/src/msaa_writeback.rs`); `8ec65525` Port `bevy_core_pipeline` to `LinearRgba` (#12116) (at that commit the files were still `crates/bevy_core_pipeline/src/bloom/mod.rs` and `crates/bevy_core_pipeline/src/msaa_writeback.rs`) — run `git show` on any of them.
  • Change coupling: mod.rs ↔ dark_theme.rs crates/bevy_feathers/src/controls/mod.rs:1 — `crates/bevy_feathers/src/controls/mod.rs` and `crates/bevy_feathers/src/dark_theme.rs` change together 50% of the time (8 of the 16 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 8 shared commits counted here, the most recent 3 are `ca359f26` Add feathers styling for tabs (#25987); `fc3f3b2f` Add feathers styling for the split pane (#25970); `6588a8e7` Modal dialog box for feathers (#24559) — run `git show` on any of them.
  • Change coupling: mod.rs ↔ tokens.rs crates/bevy_feathers/src/controls/mod.rs:1 — `crates/bevy_feathers/src/controls/mod.rs` and `crates/bevy_feathers/src/tokens.rs` change together 50% of the time (8 of the 16 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 8 shared commits counted here, the most recent 3 are `ca359f26` Add feathers styling for tabs (#25987); `fc3f3b2f` Add feathers styling for the split pane (#25970); `6588a8e7` Modal dialog box for feathers (#24559) — run `git show` on any of them.
  • Change coupling: globals.rs ↔ mod.rs crates/bevy_render/src/globals.rs:1 — `crates/bevy_render/src/globals.rs` and `crates/bevy_render/src/view/mod.rs` change together 50% of the time (5 of the 10 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 5 shared commits counted here, the most recent 3 are `90c5c123` Fix doc paths to not use deprecated re-exports (#20496); `8db7b6e1` Remove Shader weak_handles from bevy_render. (#19362); `40f82b86` Reflect default in some types on `bevy_render` (#12580) — run `git show` on any of them.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×15
  • Duplicated block (6 lines × 2) crates/bevy_ecs/src/query/iter.rs:1937 — crates/bevy_ecs/src/query/iter.rs:1937-1942 | crates/bevy_ecs/src/query/iter.rs:1980-1985 — 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 (6 lines × 2) crates/bevy_reflect/src/path/access.rs:115 — crates/bevy_reflect/src/path/access.rs:115-120 | crates/bevy_reflect/src/path/access.rs:191-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 (6 lines × 2) crates/bevy_render/macros/src/as_bind_group.rs:215 — crates/bevy_render/macros/src/as_bind_group.rs:215-220 | crates/bevy_render/macros/src/as_bind_group.rs:266-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.
  • Duplicated block (6 lines × 2) crates/bevy_render/macros/src/as_bind_group.rs:580 — crates/bevy_render/macros/src/as_bind_group.rs:580-585 | crates/bevy_render/macros/src/as_bind_group.rs:626-632 — 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 (6 lines × 2) crates/bevy_render/src/diagnostic/internal.rs:540 — crates/bevy_render/src/diagnostic/internal.rs:540-546 | crates/bevy_render/src/diagnostic/internal.rs:682-687 — 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 (6 lines × 2) crates/bevy_render/src/render_phase/mod.rs:1114 — crates/bevy_render/src/render_phase/mod.rs:1114-1119 | crates/bevy_render/src/render_phase/mod.rs:1134-1139 — 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 (6 lines × 2) crates/bevy_ui/src/layout/convert.rs:29 — crates/bevy_ui/src/layout/convert.rs:29-34 | crates/bevy_ui/src/layout/convert.rs:52-57 — 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 (6 lines × 2) crates/bevy_color/src/linear_rgba.rs:252 — crates/bevy_color/src/linear_rgba.rs:252-257 | crates/bevy_color/src/srgba.rs:294-299 — before extracting anything, compare `crates/bevy_color/src/linear_rgba.rs` and `crates/bevy_color/src/srgba.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) crates/bevy_ecs/src/world/entity_access/world_mut.rs:2319 — crates/bevy_ecs/src/world/entity_access/world_mut.rs:2319-2324 | crates/bevy_ecs/src/world/unsafe_world_cell.rs:1265-1270 — 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 (6 lines × 2) crates/bevy_shape/src/bounding/bounded2d/mod.rs:260 — crates/bevy_shape/src/bounding/bounded2d/mod.rs:260-265 | crates/bevy_shape/src/bounding/bounded3d/mod.rs:284-289 — `crates/bevy_shape/src/bounding/bounded2d/mod.rs` and `crates/bevy_shape/src/bounding/bounded3d/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 8 separate duplicated blocks between them, totalling at least 53 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (6 lines × 2) crates/bevy_render/src/diagnostic/erased_render_asset_diagnostic_plugin.rs:67 — crates/bevy_render/src/diagnostic/erased_render_asset_diagnostic_plugin.rs:67-72 | crates/bevy_render/src/diagnostic/render_asset_diagnostic_plugin.rs:63-68 — 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) tools/ci/src/commands/doc.rs:14 — tools/ci/src/commands/doc.rs:14-19 | tools/ci/src/commands/lints.rs:14-19 — 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) crates/bevy_ecs/src/relationship/mod.rs:170 — crates/bevy_ecs/src/relationship/mod.rs:170-175 | crates/bevy_ecs/src/relationship/mod.rs:207-212 — 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 (6 lines × 2) crates/bevy_app/src/app.rs:262 — crates/bevy_app/src/app.rs:262-267 | crates/bevy_app/src/app.rs:282-287 — 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 (6 lines × 2) tools/example-showcase/src/main.rs:324 — tools/example-showcase/src/main.rs:324-329 | tools/example-showcase/src/main.rs:703-710 — 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.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×14
  • Duplicated block (15 lines × 2) crates/bevy_animation/src/animatable.rs:183 — crates/bevy_animation/src/animatable.rs:183-197 | crates/bevy_animation/src/animatable.rs:211-225 — 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 (15 lines × 2) crates/bevy_ecs/src/bundle/remove.rs:261 — crates/bevy_ecs/src/bundle/remove.rs:261-275 | crates/bevy_ecs/src/bundle/remove.rs:322-336 — 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 (15 lines × 2) crates/bevy_feathers/src/controls/checkbox.rs:161 — crates/bevy_feathers/src/controls/checkbox.rs:161-175 | crates/bevy_feathers/src/controls/radio.rs:155-169 — before extracting anything, compare `crates/bevy_feathers/src/controls/checkbox.rs` and `crates/bevy_feathers/src/controls/radio.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) crates/bevy_mesh/src/primitives/dim2.rs:200 — crates/bevy_mesh/src/primitives/dim2.rs:200-214 | crates/bevy_mesh/src/primitives/dim2.rs:347-361 — 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 (15 lines × 2) crates/bevy_pbr/src/atmosphere/resources.rs:695 — crates/bevy_pbr/src/atmosphere/resources.rs:695-709 | crates/bevy_pbr/src/atmosphere/resources.rs:718-732 — 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 (15 lines × 2) crates/bevy_pbr/src/meshlet/resource_manager.rs:966 — crates/bevy_pbr/src/meshlet/resource_manager.rs:966-980 | crates/bevy_pbr/src/meshlet/resource_manager.rs:998-1012 — 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 (15 lines × 2) crates/bevy_pbr/src/render/gpu_preprocess.rs:2981 — crates/bevy_pbr/src/render/gpu_preprocess.rs:2981-2995 | crates/bevy_pbr/src/render/gpu_preprocess.rs:3040-3054 — 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 (15 lines × 2) crates/bevy_pbr/src/wireframe.rs:830 — crates/bevy_pbr/src/wireframe.rs:830-844 | crates/bevy_sprite_render/src/mesh2d/wireframe2d.rs:381-395 — before extracting anything, compare `crates/bevy_pbr/src/wireframe.rs` and `crates/bevy_sprite_render/src/mesh2d/wireframe2d.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 111 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) crates/bevy_reflect/derive/src/impls/structs.rs:137 — crates/bevy_reflect/derive/src/impls/structs.rs:137-151 | crates/bevy_reflect/derive/src/impls/tuple_structs.rs:97-111 — before extracting anything, compare `crates/bevy_reflect/derive/src/impls/structs.rs` and `crates/bevy_reflect/derive/src/impls/tuple_structs.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) crates/bevy_sprite_render/src/mesh2d/material.rs:1128 — crates/bevy_sprite_render/src/mesh2d/material.rs:1128-1142 | crates/bevy_sprite_render/src/mesh2d/material.rs:1151-1165 — 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 (15 lines × 2) crates/bevy_sprite_render/src/text2d/mod.rs:185 — crates/bevy_sprite_render/src/text2d/mod.rs:185-199 | crates/bevy_sprite_render/src/text2d/mod.rs:299-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.
  • Duplicated block (15 lines × 2) tools/build-templated-pages/src/examples.rs:41 — tools/build-templated-pages/src/examples.rs:41-55 | tools/example-showcase/src/main.rs:783-797 — 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 (15 lines × 2) crates/bevy_solari/src/pathtracer/mod.rs:88 — crates/bevy_solari/src/pathtracer/mod.rs:88-102 | crates/bevy_solari/src/realtime/mod.rs:280-294 — 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 (15 lines × 2) crates/bevy_pbr/src/render/light.rs:1483 — crates/bevy_pbr/src/render/light.rs:1483-1497 | crates/bevy_pbr/src/render/light.rs:1539-1553 — 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.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×13
  • Duplicated block (8 lines × 4) crates/bevy_color/src/hsla.rs:228 — crates/bevy_color/src/hsla.rs:228-235 | crates/bevy_color/src/hsla.rs:246-253 | crates/bevy_color/src/okhsla.rs:235-242 | crates/bevy_color/src/okhsla.rs:253-260 — before extracting anything, compare `crates/bevy_color/src/hsla.rs` and `crates/bevy_color/src/okhsla.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 4) crates/bevy_color/src/hsla.rs:237 — crates/bevy_color/src/hsla.rs:237-244 | crates/bevy_color/src/hsla.rs:255-262 | crates/bevy_color/src/okhsla.rs:244-251 | crates/bevy_color/src/okhsla.rs:262-269 — before extracting anything, compare `crates/bevy_color/src/hsla.rs` and `crates/bevy_color/src/okhsla.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 4) crates/bevy_color/src/hsva.rs:212 — crates/bevy_color/src/hsva.rs:212-219 | crates/bevy_color/src/hsva.rs:230-237 | crates/bevy_color/src/okhsva.rs:179-186 | crates/bevy_color/src/okhsva.rs:197-204 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (8 lines × 4) crates/bevy_color/src/hsva.rs:221 — crates/bevy_color/src/hsva.rs:221-228 | crates/bevy_color/src/hsva.rs:239-246 | crates/bevy_color/src/okhsva.rs:188-195 | crates/bevy_color/src/okhsva.rs:206-213 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (8 lines × 4) crates/bevy_color/src/hwba.rs:157 — crates/bevy_color/src/hwba.rs:157-164 | crates/bevy_color/src/hwba.rs:175-182 | crates/bevy_color/src/okhwba.rs:154-161 | crates/bevy_color/src/okhwba.rs:172-179 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (8 lines × 4) crates/bevy_color/src/hwba.rs:166 — crates/bevy_color/src/hwba.rs:166-173 | crates/bevy_color/src/hwba.rs:184-191 | crates/bevy_color/src/okhwba.rs:163-170 | crates/bevy_color/src/okhwba.rs:181-188 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (8 lines × 4) crates/bevy_color/src/laba.rs:177 — crates/bevy_color/src/laba.rs:177-184 | crates/bevy_color/src/laba.rs:195-202 | crates/bevy_color/src/oklaba.rs:187-194 | crates/bevy_color/src/oklaba.rs:205-212 — before extracting anything, compare `crates/bevy_color/src/laba.rs` and `crates/bevy_color/src/oklaba.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 4) crates/bevy_color/src/laba.rs:186 — crates/bevy_color/src/laba.rs:186-193 | crates/bevy_color/src/laba.rs:204-211 | crates/bevy_color/src/oklaba.rs:196-203 | crates/bevy_color/src/oklaba.rs:214-221 — before extracting anything, compare `crates/bevy_color/src/laba.rs` and `crates/bevy_color/src/oklaba.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 4) crates/bevy_color/src/lcha.rs:216 — crates/bevy_color/src/lcha.rs:216-223 | crates/bevy_color/src/lcha.rs:234-241 | crates/bevy_color/src/oklcha.rs:220-227 | crates/bevy_color/src/oklcha.rs:238-245 — before extracting anything, compare `crates/bevy_color/src/lcha.rs` and `crates/bevy_color/src/oklcha.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 4) crates/bevy_color/src/lcha.rs:225 — crates/bevy_color/src/lcha.rs:225-232 | crates/bevy_color/src/lcha.rs:243-250 | crates/bevy_color/src/oklcha.rs:229-236 | crates/bevy_color/src/oklcha.rs:247-254 — before extracting anything, compare `crates/bevy_color/src/lcha.rs` and `crates/bevy_color/src/oklcha.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 4) crates/bevy_color/src/linear_rgba.rs:277 — crates/bevy_color/src/linear_rgba.rs:277-284 | crates/bevy_color/src/linear_rgba.rs:295-302 | crates/bevy_color/src/srgba.rs:324-331 | crates/bevy_color/src/srgba.rs:342-349 — before extracting anything, compare `crates/bevy_color/src/linear_rgba.rs` and `crates/bevy_color/src/srgba.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 4) crates/bevy_color/src/linear_rgba.rs:286 — crates/bevy_color/src/linear_rgba.rs:286-293 | crates/bevy_color/src/linear_rgba.rs:304-311 | crates/bevy_color/src/srgba.rs:333-340 | crates/bevy_color/src/srgba.rs:351-358 — before extracting anything, compare `crates/bevy_color/src/linear_rgba.rs` and `crates/bevy_color/src/srgba.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 4) crates/bevy_pbr/src/atmosphere/node.rs:62 — crates/bevy_pbr/src/atmosphere/node.rs:62-70 | crates/bevy_pbr/src/render/gpu_preprocess.rs:724-731 | crates/bevy_pbr/src/render/gpu_preprocess.rs:808-816 | crates/bevy_pbr/src/render/gpu_preprocess.rs:1039-1047 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
D2 · Cognitive Complexity · bevy_ui · ×12
  • bevy_ui::widget::text_input_layout::update_editable_text_layout (cognitive 85) crates/bevy_ui/src/widget/text_input_layout.rs:310 — bevy_ui::widget::text_input_layout::update_editable_text_layout has cognitive complexity 85 (threshold 15). Drivers by points: if/else 13 (50 pts), loops 6 (24 pts), boolean chains 6, match/switch 1 (5 pts) (nesting depth added 59). 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.
  • bevy_ui::focus::ui_focus_system (cognitive 71) crates/bevy_ui/src/focus.rs:167 — bevy_ui::focus::ui_focus_system has cognitive complexity 71 (threshold 15). Drivers by points: if/else 21 (55 pts), loops 6 (8 pts), boolean chains 6, match/switch 1 (2 pts) (nesting depth added 37). 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.
  • bevy_ui::layout::update_uinode_geometry_recursive (cognitive 65) crates/bevy_ui/src/layout/mod.rs:548 — bevy_ui::layout::update_uinode_geometry_recursive has cognitive complexity 65 (threshold 15). Drivers by points: if/else 27 (52 pts), loops 2 (7 pts), boolean chains 6 (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.
  • bevy_ui::picking_backend::ui_picking (cognitive 47) crates/bevy_ui/src/picking_backend.rs:102 — bevy_ui::picking_backend::ui_picking has cognitive complexity 47 (threshold 15). Drivers by points: if/else 12 (29 pts), loops 7 (12 pts), boolean chains 6 (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.
  • bevy_ui::layout::update_ui_roots (cognitive 28) crates/bevy_ui/src/layout/mod.rs:160 — bevy_ui::layout::update_ui_roots has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 4 (7 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.
  • bevy_ui::layout::clipping::update_clipping (cognitive 24) crates/bevy_ui/src/layout/clipping.rs:52 — bevy_ui::layout::clipping::update_clipping has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 6, loops 1 (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.
  • bevy_ui::widget::text_input_layout::update_editable_text_styles (cognitive 20) crates/bevy_ui/src/widget/text_input_layout.rs:198 — bevy_ui::widget::text_input_layout::update_editable_text_styles has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, match/switch 1 (3 pts), loops 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.
  • bevy_ui::layout::layout_tree::sync_layout_tree (cognitive 19) crates/bevy_ui/src/layout/layout_tree.rs:444 — bevy_ui::layout::layout_tree::sync_layout_tree has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 8, loops 1 (nesting depth added 1). 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.
  • bevy_ui::layout::ui_layout_system (cognitive 18) crates/bevy_ui/src/layout/mod.rs:352 — bevy_ui::layout::ui_layout_system has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, loops 2 (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.
  • bevy_ui::widget::text_input_layout::update_editable_text_content_size (cognitive 18) crates/bevy_ui/src/widget/text_input_layout.rs:82 — bevy_ui::widget::text_input_layout::update_editable_text_content_size has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 2 (4 pts), boolean chains 3, 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.
  • bevy_ui::stack::ui_stack_system (cognitive 16) crates/bevy_ui/src/stack.rs:50 — bevy_ui::stack::ui_stack_system has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 6, boolean chains 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.
  • bevy_ui::widget::viewport::viewport_picking (cognitive 16) crates/bevy_ui/src/widget/viewport.rs:71 — bevy_ui::widget::viewport::viewport_picking has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 4 (6 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.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×12
  • Duplicated block (14 lines × 2) crates/bevy_anti_alias/src/contrast_adaptive_sharpening/node.rs:70 — crates/bevy_anti_alias/src/contrast_adaptive_sharpening/node.rs:70-83 | crates/bevy_anti_alias/src/fxaa/node.rs:49-62 — 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) crates/bevy_feathers/src/controls/checkbox.rs:218 — crates/bevy_feathers/src/controls/checkbox.rs:218-231 | crates/bevy_feathers/src/controls/radio.rs:211-224 — before extracting anything, compare `crates/bevy_feathers/src/controls/checkbox.rs` and `crates/bevy_feathers/src/controls/radio.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 2) crates/bevy_feathers/src/controls/color_wheel.rs:536 — crates/bevy_feathers/src/controls/color_wheel.rs:536-549 | crates/bevy_feathers/src/controls/color_wheel.rs:581-594 — 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 (14 lines × 2) crates/bevy_pbr/src/atmosphere/resources.rs:59 — crates/bevy_pbr/src/atmosphere/resources.rs:59-72 | crates/bevy_pbr/src/atmosphere/resources.rs:115-128 — 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 (14 lines × 2) crates/bevy_pbr/src/light_probe/generate.rs:198 — crates/bevy_pbr/src/light_probe/generate.rs:198-211 | crates/bevy_pbr/src/light_probe/generate.rs:217-230 — 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 (14 lines × 2) crates/bevy_post_process/src/bloom/mod.rs:163 — crates/bevy_post_process/src/bloom/mod.rs:163-176 | crates/bevy_post_process/src/bloom/mod.rs:188-201 — 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 (14 lines × 2) crates/bevy_render/src/view/window/screenshot.rs:352 — crates/bevy_render/src/view/window/screenshot.rs:352-365 | crates/bevy_render/src/view/window/screenshot.rs:396-409 — 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 (14 lines × 2) crates/bevy_settings/src/lib.rs:595 — crates/bevy_settings/src/lib.rs:595-608 | crates/bevy_settings/src/lib.rs:615-628 — 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 (14 lines × 2) crates/bevy_shape/src/bounding/bounded2d/mod.rs:571 — crates/bevy_shape/src/bounding/bounded2d/mod.rs:571-584 | crates/bevy_shape/src/bounding/bounded3d/mod.rs:613-626 — `crates/bevy_shape/src/bounding/bounded2d/mod.rs` and `crates/bevy_shape/src/bounding/bounded3d/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 8 separate duplicated blocks between them, totalling at least 53 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (14 lines × 2) crates/bevy_ui_render/src/lib.rs:1900 — crates/bevy_ui_render/src/lib.rs:1900-1913 | crates/bevy_ui_render/src/lib.rs:2081-2094 — 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 (14 lines × 2) crates/bevy_ui_render/src/pipeline.rs:25 — crates/bevy_ui_render/src/pipeline.rs:25-38 | crates/bevy_ui_render/src/ui_texture_slice_pipeline.rs:117-130 — before extracting anything, compare `crates/bevy_ui_render/src/pipeline.rs` and `crates/bevy_ui_render/src/ui_texture_slice_pipeline.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 2) crates/bevy_pbr/src/atmosphere/node.rs:57 — crates/bevy_pbr/src/atmosphere/node.rs:57-70 | crates/bevy_pbr/src/render/gpu_preprocess.rs:1034-1047 — 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.
D5 · Coupling · Off the main sequence · ×11
  • Off the main sequence: bevy_macro_utils — bevy_macro_utils: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 13 project(s), so it's rigid to change.
  • Off the main sequence: bevy_platform — bevy_platform: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 43 project(s), so it's rigid to change.
  • Off the main sequence: bevy_bsn — bevy_bsn: abstractness 0.06, instability 0.00, distance 0.94 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: bevy_log — bevy_log: abstractness 0.00, instability 0.17, distance 0.83 — zone of pain — concrete and depended on by 20 project(s), so it's rigid to change.
  • Off the main sequence: bevy_app — bevy_app: abstractness 0.09, instability 0.12, distance 0.79 — zone of pain — concrete and depended on by 45 project(s), so it's rigid to change.
  • Off the main sequence: bevy_shader — bevy_shader: abstractness 0.00, instability 0.24, distance 0.76 — zone of pain — concrete and depended on by 13 project(s), so it's rigid to change.
  • Off the main sequence: bevy_utils — bevy_utils: abstractness 0.23, instability 0.03, distance 0.74 — zone of pain — concrete and depended on by 32 project(s), so it's rigid to change.
  • Off the main sequence: bevy_tasks — bevy_tasks: abstractness 0.19, instability 0.07, distance 0.73 — zone of pain — concrete and depended on by 13 project(s), so it's rigid to change.
  • Off the main sequence: bevy_input — bevy_input: abstractness 0.00, instability 0.28, distance 0.72 — zone of pain — concrete and depended on by 13 project(s), so it's rigid to change.
  • Off the main sequence: bevy_reflect — bevy_reflect: abstractness 0.22, instability 0.07, distance 0.71 — zone of pain — concrete and depended on by 50 project(s), so it's rigid to change.
  • Off the main sequence: bevy_time — bevy_time: abstractness 0.07, instability 0.22, distance 0.71 — zone of pain — concrete and depended on by 14 project(s), so it's rigid to change.
D1 · Cyclomatic Complexity · bevy_ui_render · ×9
  • bevy_ui_render::prepare_uinodes (cyclomatic 29) crates/bevy_ui_render/src/lib.rs:2275 — bevy_ui_render::prepare_uinodes 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.
  • bevy_ui_render::box_shadow::extract_shadows (cyclomatic 22) crates/bevy_ui_render/src/box_shadow.rs:210 — bevy_ui_render::box_shadow::extract_shadows 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.
  • bevy_ui_render::gradient::prepare_gradient (cyclomatic 21) crates/bevy_ui_render/src/gradient.rs:835 — bevy_ui_render::gradient::prepare_gradient 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.
  • bevy_ui_render::text::extract_text_cursor (cyclomatic 20) crates/bevy_ui_render/src/text.rs:37 — bevy_ui_render::text::extract_text_cursor 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.
  • bevy_ui_render::ui_texture_slice_pipeline::prepare_ui_slices (cyclomatic 20) crates/bevy_ui_render/src/ui_texture_slice_pipeline.rs:475 — bevy_ui_render::ui_texture_slice_pipeline::prepare_ui_slices 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.
  • bevy_ui_render::extract_uinode_borders (cyclomatic 18) crates/bevy_ui_render/src/lib.rs:1081 — bevy_ui_render::extract_uinode_borders 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.
  • bevy_ui_render::ui_texture_slice_pipeline::extract_ui_texture_slices (cyclomatic 18) crates/bevy_ui_render/src/ui_texture_slice_pipeline.rs:219 — bevy_ui_render::ui_texture_slice_pipeline::extract_ui_texture_slices 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.
  • bevy_ui_render::gradient::extract_gradients (cyclomatic 17) crates/bevy_ui_render/src/gradient.rs:343 — bevy_ui_render::gradient::extract_gradients 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.
  • bevy_ui_render::extract_uinode_images (cyclomatic 16) crates/bevy_ui_render/src/lib.rs:916 — bevy_ui_render::extract_uinode_images 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.
D2 · Cognitive Complexity · bevy_image · ×9
  • bevy_image::ktx2::ktx2_dfd_header_to_texture_format (cognitive 216) crates/bevy_image/src/ktx2.rs:478 — bevy_image::ktx2::ktx2_dfd_header_to_texture_format has cognitive complexity 216 (threshold 15). Drivers by points: if/else 67 (158 pts), match/switch 23 (50 pts), boolean chains 8 (nesting depth added 118). 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.
  • bevy_image::ktx2::ktx2_buffer_to_image (cognitive 78) crates/bevy_image/src/ktx2.rs:30 — bevy_image::ktx2::ktx2_buffer_to_image has cognitive complexity 78 (threshold 15). Drivers by points: loops 12 (45 pts), if/else 19 (26 pts), match/switch 3 (5 pts), boolean chains 2 (nesting depth added 42). 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.
  • bevy_image::ktx2::ktx2_format_to_texture_format (cognitive 74) crates/bevy_image/src/ktx2.rs:1205 — bevy_image::ktx2::ktx2_format_to_texture_format has cognitive complexity 74 (threshold 15). Drivers by points: if/else 48 (73 pts), match/switch 1 (nesting depth added 25). 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.
  • bevy_image::dds::dds_format_to_texture_format (cognitive 51) crates/bevy_image/src/dds.rs:134 — bevy_image::dds::dds_format_to_texture_format has cognitive complexity 51 (threshold 15). Drivers by points: if/else 25 (47 pts), match/switch 2 (4 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.
  • bevy_image::ktx2::get_transcoded_formats (cognitive 30) crates/bevy_image/src/ktx2.rs:310 — bevy_image::ktx2::get_transcoded_formats has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18 (29 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.
  • bevy_image::dds::dds_buffer_to_image (cognitive 23) crates/bevy_image/src/dds.rs:20 — bevy_image::dds::dds_buffer_to_image has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (16 pts), match/switch 3 (4 pts), boolean chains 3 (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.
  • bevy_image::compressed_image_saver::ctt_helpers::choose_ctt_compressed_format (cognitive 20) crates/bevy_image/src/compressed_image_saver/ctt_helpers.rs:68 — bevy_image::compressed_image_saver::ctt_helpers::choose_ctt_compressed_format has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (17 pts), match/switch 2 (3 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.
  • bevy_image::basis::basis_buffer_to_image (cognitive 16) crates/bevy_image/src/basis.rs:8 — bevy_image::basis::basis_buffer_to_image has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 3, loops 2 (3 pts), match/switch 1 (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.
  • bevy_image::basis::get_transcoded_formats (cognitive 16) crates/bevy_image/src/basis.rs:122 — bevy_image::basis::get_transcoded_formats has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (16 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.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×9
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/bevy_asset/src/transformer.rs:118 — crates/bevy_asset/src/transformer.rs:118-128 | crates/bevy_asset/src/transformer.rs:148-158 | crates/bevy_asset/src/transformer.rs:289-299 | crates/bevy_asset/src/transformer.rs:319-329 — 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.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/bevy_ecs/src/query/state.rs:286 — crates/bevy_ecs/src/query/state.rs:286-327 | crates/bevy_ecs/src/query/state.rs:330-373 | crates/bevy_ecs/src/query/state.rs:749-819 | crates/bevy_ecs/src/query/state.rs:864-967 — 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.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/bevy_pbr/src/render/gpu_preprocess.rs:2498 — crates/bevy_pbr/src/render/gpu_preprocess.rs:2498-2611 | crates/bevy_pbr/src/render/gpu_preprocess.rs:2621-2732 | crates/bevy_pbr/src/render/gpu_preprocess.rs:2741-2841 | crates/bevy_pbr/src/render/gpu_preprocess.rs:2850-2950 — 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.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/bevy_pbr/src/render/mesh_bindings.rs:313 — crates/bevy_pbr/src/render/mesh_bindings.rs:313-334 | crates/bevy_pbr/src/render/mesh_bindings.rs:338-361 | crates/bevy_pbr/src/render/mesh_bindings.rs:365-389 | crates/bevy_pbr/src/render/mesh_bindings.rs:393-421 — 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.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/bevy_pbr/src/render/mesh_bindings.rs:567 — crates/bevy_pbr/src/render/mesh_bindings.rs:567-586 | crates/bevy_pbr/src/render/mesh_bindings.rs:605-625 | crates/bevy_pbr/src/render/mesh_bindings.rs:638-658 | crates/bevy_pbr/src/render/mesh_bindings.rs:679-701 — 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.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/bevy_render/src/render_resource/storage_buffer.rs:131 — crates/bevy_render/src/render_resource/storage_buffer.rs:131-149 | crates/bevy_render/src/render_resource/storage_buffer.rs:258-274 | crates/bevy_render/src/render_resource/uniform_buffer.rs:129-142 | crates/bevy_render/src/render_resource/uniform_buffer.rs:327-341 — 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.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/bevy_shape/src/dim2.rs:1722 — crates/bevy_shape/src/dim2.rs:1722-1737 | crates/bevy_shape/src/dim2.rs:1741-1756 | crates/bevy_shape/src/dim3.rs:1303-1318 | crates/bevy_shape/src/dim3.rs:1322-1337 — 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.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/bevy_state/src/state_scoped.rs:397 — crates/bevy_state/src/state_scoped.rs:397-417 | crates/bevy_state/src/state_scoped.rs:473-493 | crates/bevy_state/src/state_scoped.rs:638-658 | crates/bevy_state/src/state_scoped.rs:714-734 — 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.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/bevy_ui_render/src/box_shadow.rs:618 — crates/bevy_ui_render/src/box_shadow.rs:618-637 | crates/bevy_ui_render/src/gradient.rs:1042-1061 | crates/bevy_ui_render/src/render_pass.rs:221-243 | crates/bevy_ui_render/src/ui_texture_slice_pipeline.rs:755-774 — 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 · Duplicated block (16 lines × 2) · ×9
  • Duplicated block (16 lines × 2) crates/bevy_ecs/src/message/iterators.rs:222 — crates/bevy_ecs/src/message/iterators.rs:222-237 | crates/bevy_ecs/src/message/mut_iterators.rs:226-241 — 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 (16 lines × 2) crates/bevy_feathers/src/controls/slider.rs:154 — crates/bevy_feathers/src/controls/slider.rs:154-169 | crates/bevy_feathers/src/controls/slider.rs:238-253 — 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 (16 lines × 2) crates/bevy_pbr/src/meshlet/material_pipeline_prepare.rs:248 — crates/bevy_pbr/src/meshlet/material_pipeline_prepare.rs:248-263 | crates/bevy_pbr/src/meshlet/material_pipeline_prepare.rs:440-455 — 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 (16 lines × 2) crates/bevy_pbr/src/meshlet/resource_manager.rs:290 — crates/bevy_pbr/src/meshlet/resource_manager.rs:290-305 | crates/bevy_pbr/src/meshlet/resource_manager.rs:317-332 — 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 (16 lines × 2) crates/bevy_pbr/src/prepass/mod.rs:746 — crates/bevy_pbr/src/prepass/mod.rs:746-762 | crates/bevy_render/src/view/mod.rs:1188-1203 — 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 (16 lines × 2) crates/bevy_pbr/src/render/mesh.rs:3452 — crates/bevy_pbr/src/render/mesh.rs:3452-3467 | crates/bevy_sprite_render/src/mesh2d/mesh.rs:764-779 — before extracting anything, compare `crates/bevy_pbr/src/render/mesh.rs` and `crates/bevy_sprite_render/src/mesh2d/mesh.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) crates/bevy_reflect/src/display.rs:189 — crates/bevy_reflect/src/display.rs:189-204 | crates/bevy_reflect/src/display.rs:213-228 — 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 (16 lines × 2) crates/bevy_pbr/src/render/mesh.rs:4733 — crates/bevy_pbr/src/render/mesh.rs:4733-4750 | crates/bevy_pbr/src/render/mesh.rs:4803-4818 — 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 (16 lines × 2) crates/bevy_core_pipeline/src/core_3d/mod.rs:927 — crates/bevy_core_pipeline/src/core_3d/mod.rs:927-942 | crates/bevy_core_pipeline/src/core_3d/mod.rs:949-964 — 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.
D1 · Cyclomatic Complexity · bevy_feathers · ×8
  • bevy_feathers::controls::toggle_switch::set_switch_styles (cyclomatic 44) crates/bevy_feathers/src/controls/toggle_switch.rs:221 — bevy_feathers::controls::toggle_switch::set_switch_styles has cyclomatic complexity 44 (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.
  • bevy_feathers::controls::radio::set_radio_styles (cyclomatic 29) crates/bevy_feathers/src/controls/radio.rs:259 — bevy_feathers::controls::radio::set_radio_styles has cyclomatic complexity 29 (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.
  • bevy_feathers::controls::checkbox::set_checkbox_styles (cyclomatic 27) crates/bevy_feathers/src/controls/checkbox.rs:267 — bevy_feathers::controls::checkbox::set_checkbox_styles has cyclomatic complexity 27 (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.
  • bevy_feathers::controls::tabs::update_tab_styles (cyclomatic 21) crates/bevy_feathers/src/controls/tabs.rs:393 — bevy_feathers::controls::tabs::update_tab_styles has cyclomatic complexity 21 (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.
  • bevy_feathers::controls::tabs::update_tab_fillets (cyclomatic 18) crates/bevy_feathers/src/controls/tabs.rs:570 — bevy_feathers::controls::tabs::update_tab_fillets 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.
  • bevy_feathers::controls::color_wheel::update_wheel_color (cyclomatic 17) crates/bevy_feathers/src/controls/color_wheel.rs:244 — bevy_feathers::controls::color_wheel::update_wheel_color 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.
  • bevy_feathers::controls::menu::on_menu_event (cyclomatic 17) crates/bevy_feathers/src/controls/menu.rs:68 — bevy_feathers::controls::menu::on_menu_event 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.
  • bevy_feathers::controls::menu::on_lazy_menu_event (cyclomatic 16) crates/bevy_feathers/src/controls/menu.rs:176 — bevy_feathers::controls::menu::on_lazy_menu_event 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.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×8
  • Duplicated block (21 lines × 2) crates/bevy_core_pipeline/src/deferred/node.rs:203 — crates/bevy_core_pipeline/src/deferred/node.rs:203-223 | crates/bevy_core_pipeline/src/prepass/node.rs:184-204 — 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 (21 lines × 2) crates/bevy_core_pipeline/src/mip_generation/experimental/depth.rs:101 — crates/bevy_core_pipeline/src/mip_generation/experimental/depth.rs:101-121 | crates/bevy_core_pipeline/src/mip_generation/experimental/depth.rs:177-197 — 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 (21 lines × 2) crates/bevy_feathers/src/controls/checkbox.rs:337 — crates/bevy_feathers/src/controls/checkbox.rs:337-357 | crates/bevy_feathers/src/controls/toggle_switch.rs:330-350 — before extracting anything, compare `crates/bevy_feathers/src/controls/checkbox.rs` and `crates/bevy_feathers/src/controls/toggle_switch.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (21 lines × 2) crates/bevy_feathers/src/controls/number_input.rs:597 — crates/bevy_feathers/src/controls/number_input.rs:597-617 | crates/bevy_feathers/src/controls/number_input.rs:635-655 — 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 (21 lines × 2) crates/bevy_gizmos_render/src/pipeline_2d.rs:147 — crates/bevy_gizmos_render/src/pipeline_2d.rs:147-167 | crates/bevy_gizmos_render/src/pipeline_2d.rs:233-253 — 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 (21 lines × 2) crates/bevy_pbr/src/render/gpu_preprocess.rs:2507 — crates/bevy_pbr/src/render/gpu_preprocess.rs:2507-2527 | crates/bevy_pbr/src/render/gpu_preprocess.rs:2630-2650 — 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 (21 lines × 2) crates/bevy_pbr/src/wireframe.rs:1664 — crates/bevy_pbr/src/wireframe.rs:1664-1684 | crates/bevy_sprite_render/src/mesh2d/wireframe2d.rs:873-893 — before extracting anything, compare `crates/bevy_pbr/src/wireframe.rs` and `crates/bevy_sprite_render/src/mesh2d/wireframe2d.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 111 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (21 lines × 2) crates/bevy_render/src/erased_render_asset.rs:448 — crates/bevy_render/src/erased_render_asset.rs:448-468 | crates/bevy_render/src/render_asset.rs:470-490 — before extracting anything, compare `crates/bevy_render/src/erased_render_asset.rs` and `crates/bevy_render/src/render_asset.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×8
  • Duplicated block (17 lines × 2) crates/bevy_anti_alias/src/smaa/mod.rs:497 — crates/bevy_anti_alias/src/smaa/mod.rs:497-513 | crates/bevy_anti_alias/src/smaa/mod.rs:554-570 — 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 lines × 2) crates/bevy_asset/src/server/loaders.rs:49 — crates/bevy_asset/src/server/loaders.rs:49-65 | crates/bevy_asset/src/server/loaders.rs:115-131 — 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 lines × 2) crates/bevy_ecs/macros/src/query_data.rs:681 — crates/bevy_ecs/macros/src/query_data.rs:681-697 | crates/bevy_ecs/macros/src/query_filter.rs:138-154 — 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) crates/bevy_feathers/src/controls/checkbox.rs:363 — crates/bevy_feathers/src/controls/checkbox.rs:363-379 | crates/bevy_feathers/src/controls/radio.rs:353-369 — before extracting anything, compare `crates/bevy_feathers/src/controls/checkbox.rs` and `crates/bevy_feathers/src/controls/radio.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 2) crates/bevy_pbr/src/medium.rs:145 — crates/bevy_pbr/src/medium.rs:145-161 | crates/bevy_pbr/src/medium.rs:180-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 (17 lines × 2) crates/bevy_pbr/src/prepass/mod.rs:686 — crates/bevy_pbr/src/prepass/mod.rs:686-702 | crates/bevy_sprite_render/src/render/mod.rs:302-318 — 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 (17 lines × 2) crates/bevy_remote/src/lib.rs:1317 — crates/bevy_remote/src/lib.rs:1317-1333 | crates/bevy_remote/src/lib.rs:1432-1448 — 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 lines × 2) crates/bevy_ui_render/src/lib.rs:1931 — crates/bevy_ui_render/src/lib.rs:1931-1947 | crates/bevy_ui_render/src/lib.rs:2117-2133 — 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.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×8
  • Duplicated block (9 lines × 3) crates/bevy_feathers/src/controls/checkbox.rs:342 — crates/bevy_feathers/src/controls/checkbox.rs:342-358 | crates/bevy_feathers/src/controls/tabs.rs:464-472 | crates/bevy_feathers/src/controls/toggle_switch.rs:335-351 — before extracting anything, compare `crates/bevy_feathers/src/controls/checkbox.rs` and `crates/bevy_feathers/src/controls/toggle_switch.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) crates/bevy_mesh/src/primitives/dim2.rs:924 — crates/bevy_mesh/src/primitives/dim2.rs:924-932 | crates/bevy_mesh/src/primitives/dim2.rs:1081-1089 | crates/bevy_mesh/src/primitives/dim3/tetrahedron.rs:43-51 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (9 lines × 3) crates/bevy_pbr/src/deferred/mod.rs:331 — crates/bevy_pbr/src/deferred/mod.rs:331-339 | crates/bevy_pbr/src/render/mesh.rs:3481-3489 | crates/bevy_pbr/src/ssr/mod.rs:510-518 — before extracting anything, compare `crates/bevy_pbr/src/deferred/mod.rs` and `crates/bevy_pbr/src/render/mesh.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) crates/bevy_reflect/derive/src/impls/enums.rs:173 — crates/bevy_reflect/derive/src/impls/enums.rs:173-181 | crates/bevy_reflect/derive/src/impls/structs.rs:141-149 | crates/bevy_reflect/derive/src/impls/tuple_structs.rs:101-109 — before extracting anything, compare `crates/bevy_reflect/derive/src/impls/enums.rs` and `crates/bevy_reflect/derive/src/impls/structs.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) crates/bevy_render/src/erased_render_asset.rs:389 — crates/bevy_render/src/erased_render_asset.rs:389-401 | crates/bevy_render/src/erased_render_asset.rs:432-440 | crates/bevy_render/src/render_asset.rs:454-462 — before extracting anything, compare `crates/bevy_render/src/erased_render_asset.rs` and `crates/bevy_render/src/render_asset.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) crates/bevy_ui_render/src/lib.rs:1885 — crates/bevy_ui_render/src/lib.rs:1885-1893 | crates/bevy_ui_render/src/lib.rs:1916-1924 | crates/bevy_ui_render/src/lib.rs:2031-2039 — 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.
  • Duplicated block (9 lines × 3) crates/bevy_pbr/src/meshlet/resource_manager.rs:645 — crates/bevy_pbr/src/meshlet/resource_manager.rs:645-653 | crates/bevy_pbr/src/meshlet/resource_manager.rs:657-666 | crates/bevy_pbr/src/meshlet/resource_manager.rs:670-678 — 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.
  • Duplicated block (9 lines × 3) crates/bevy_anti_alias/src/smaa/mod.rs:480 — crates/bevy_anti_alias/src/smaa/mod.rs:480-488 | crates/bevy_anti_alias/src/smaa/mod.rs:537-545 | crates/bevy_anti_alias/src/smaa/mod.rs:585-593 — 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.
D6 · Cohesion (LCOM4) · Low cohesion · ×8
  • Low cohesion: Entity (LCOM4 10) crates/bevy_ecs/src/entity/mod.rs:447 — Entity's methods fall into 10 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 10 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.
  • Low cohesion: GizmoBuffer (LCOM4 7) crates/bevy_gizmos/src/gizmos.rs:280 — GizmoBuffer's methods fall into 7 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 7 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.
  • Low cohesion: UniqueEntityEquivalentSlice (LCOM4 6) crates/bevy_ecs/src/entity/unique_slice.rs:40 — UniqueEntityEquivalentSlice's methods fall into 6 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 6 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.
  • Low cohesion: Frustum (LCOM4 5) crates/bevy_camera/src/primitives.rs:247 — Frustum's methods fall into 5 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 5 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.
  • Low cohesion: MeshLayouts (LCOM4 5) crates/bevy_pbr/src/render/mesh_bindings.rs:207 — MeshLayouts's methods fall into 5 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 5 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.
  • Low cohesion: SubApp (LCOM4 4) crates/bevy_app/src/sub_app.rs:66 — SubApp'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.
  • Low cohesion: Dir (LCOM4 4) crates/bevy_asset/src/io/memory.rs:41 — Dir'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.
  • Low cohesion: EnvironmentMapLight (LCOM4 4) crates/bevy_light/src/probe.rs:116 — EnvironmentMapLight'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.
D1 · Cyclomatic Complexity · bevy_ui_widgets · ×7
  • bevy_ui_widgets::text_input::on_focused_keyboard_input (cyclomatic 58) crates/bevy_ui_widgets/src/text_input.rs:118 — bevy_ui_widgets::text_input::on_focused_keyboard_input has cyclomatic complexity 58 (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.
  • bevy_ui_widgets::tree::tree_item_on_key_input (cyclomatic 28) crates/bevy_ui_widgets/src/tree.rs:348 — bevy_ui_widgets::tree::tree_item_on_key_input 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.
  • bevy_ui_widgets::tabs::tab_on_key_input (cyclomatic 25) crates/bevy_ui_widgets/src/tabs.rs:371 — bevy_ui_widgets::tabs::tab_on_key_input has cyclomatic complexity 25 (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.
  • bevy_ui_widgets::menu::menu_on_key_event (cyclomatic 22) crates/bevy_ui_widgets/src/menu.rs:222 — bevy_ui_widgets::menu::menu_on_key_event 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.
  • bevy_ui_widgets::popover::position_popover (cyclomatic 20) crates/bevy_ui_widgets/src/popover.rs:103 — bevy_ui_widgets::popover::position_popover 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.
  • bevy_ui_widgets::tree::update_tree_view_derived_state (cyclomatic 20) crates/bevy_ui_widgets/src/tree.rs:567 — bevy_ui_widgets::tree::update_tree_view_derived_state 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.
  • bevy_ui_widgets::list::listbox_on_key_input (cyclomatic 19) crates/bevy_ui_widgets/src/list.rs:77 — bevy_ui_widgets::list::listbox_on_key_input 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.
D1 · Cyclomatic Complexity · bevy_ui · ×7
  • bevy_ui::focus::ui_focus_system (cyclomatic 34) crates/bevy_ui/src/focus.rs:167 — bevy_ui::focus::ui_focus_system has cyclomatic complexity 34 (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.
  • bevy_ui::layout::update_uinode_geometry_recursive (cyclomatic 33) crates/bevy_ui/src/layout/mod.rs:548 — bevy_ui::layout::update_uinode_geometry_recursive 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.
  • bevy_ui::widget::text_input_layout::update_editable_text_layout (cyclomatic 26) crates/bevy_ui/src/widget/text_input_layout.rs:310 — bevy_ui::widget::text_input_layout::update_editable_text_layout has cyclomatic complexity 26 (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.
  • bevy_ui::picking_backend::ui_picking (cyclomatic 25) crates/bevy_ui/src/picking_backend.rs:102 — bevy_ui::picking_backend::ui_picking 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.
  • bevy_ui::layout::clipping::update_clipping (cyclomatic 20) crates/bevy_ui/src/layout/clipping.rs:52 — bevy_ui::layout::clipping::update_clipping has cyclomatic complexity 20 (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.
  • bevy_ui::layout::layout_tree::sync_layout_tree (cyclomatic 19) crates/bevy_ui/src/layout/layout_tree.rs:444 — bevy_ui::layout::layout_tree::sync_layout_tree has cyclomatic complexity 19 (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.
  • bevy_ui::layout::ui_layout_system (cyclomatic 16) crates/bevy_ui/src/layout/mod.rs:352 — bevy_ui::layout::ui_layout_system 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.
D2 · Cognitive Complexity · bevy_sprite_render · ×7
  • bevy_sprite_render::text2d::extract_text2d_sprite (cognitive 52) crates/bevy_sprite_render/src/text2d/mod.rs:24 — bevy_sprite_render::text2d::extract_text2d_sprite has cognitive complexity 52 (threshold 15). Drivers by points: if/else 12 (38 pts), loops 6 (13 pts), boolean chains 1 (nesting depth added 33). 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.
  • bevy_sprite_render::mesh2d::material::queue_material2d_meshes (cognitive 51) crates/bevy_sprite_render/src/mesh2d/material.rs:990 — bevy_sprite_render::mesh2d::material::queue_material2d_meshes has cognitive complexity 51 (threshold 15). Drivers by points: if/else 16 (43 pts), loops 3 (5 pts), match/switch 1 (3 pts) (nesting depth added 31). 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.
  • bevy_sprite_render::mesh2d::material::specialize_material2d_meshes (cognitive 37) crates/bevy_sprite_render/src/mesh2d/material.rs:814 — bevy_sprite_render::mesh2d::material::specialize_material2d_meshes has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 4 (7 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.
  • bevy_sprite_render::render::prepare_sprite_image_bind_groups (cognitive 34) crates/bevy_sprite_render/src/render/mod.rs:555 — bevy_sprite_render::render::prepare_sprite_image_bind_groups has cognitive complexity 34 (threshold 15). Drivers by points: if/else 6 (21 pts), loops 4 (8 pts), match/switch 2 (5 pts) (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.
  • bevy_sprite_render::mesh2d::wireframe2d::specialize_wireframes (cognitive 30) crates/bevy_sprite_render/src/mesh2d/wireframe2d.rs:740 — bevy_sprite_render::mesh2d::wireframe2d::specialize_wireframes has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 3 (6 pts), match/switch 1 (3 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.
  • bevy_sprite_render::mesh2d::wireframe2d::queue_wireframes (cognitive 27) crates/bevy_sprite_render/src/mesh2d/wireframe2d.rs:839 — bevy_sprite_render::mesh2d::wireframe2d::queue_wireframes has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 3 (5 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.
  • bevy_sprite_render::render::queue_sprites (cognitive 16) crates/bevy_sprite_render/src/render/mod.rs:438 — bevy_sprite_render::render::queue_sprites has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 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.
D23 · Boundary Type-Coupling · Cross-context type Entity (bevy_ecs → bevy_winit) · ×7
  • Cross-context type Entity (bevy_ecs → bevy_winit) crates/bevy_winit/src/winit_monitors.rs:30 — Entity (context bevy_ecs) is exposed in bevy_winit's public surface via WinitMonitors.find_entity — couples the contexts.
  • Cross-context type Entity (bevy_ecs → bevy_winit) crates/bevy_winit/src/winit_windows.rs:56 — Entity (context bevy_ecs) is exposed in bevy_winit's public surface via WinitWindows.create_window — couples the contexts.
  • Cross-context type Entity (bevy_ecs → bevy_winit) crates/bevy_winit/src/winit_windows.rs:337 — Entity (context bevy_ecs) is exposed in bevy_winit's public surface via WinitWindows.get_window — couples the contexts.
  • Cross-context type Entity (bevy_ecs → bevy_winit) crates/bevy_winit/src/winit_windows.rs:346 — Entity (context bevy_ecs) is exposed in bevy_winit's public surface via WinitWindows.get_window_entity — couples the contexts.
  • Cross-context type Entity (bevy_ecs → bevy_winit) crates/bevy_winit/src/winit_windows.rs:353 — Entity (context bevy_ecs) is exposed in bevy_winit's public surface via WinitWindows.remove_window — couples the contexts.
  • Cross-context type Entity (bevy_ecs → bevy_winit) crates/bevy_winit/src/converters.rs:18 — Entity (context bevy_ecs) is exposed in bevy_winit's public surface via converters$module.convert_keyboard_input — couples the contexts.
  • Cross-context type Entity (bevy_ecs → bevy_winit) crates/bevy_winit/src/converters.rs:63 — Entity (context bevy_ecs) is exposed in bevy_winit's public surface via converters$module.convert_touch_input — couples the contexts.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×7
  • Duplicated block (19 lines × 2) crates/bevy_ecs/macro_logic/src/component.rs:734 — crates/bevy_ecs/macro_logic/src/component.rs:734-752 | crates/bevy_ecs/macro_logic/src/component.rs:764-782 — 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 (19 lines × 2) crates/bevy_pbr/src/meshlet/material_pipeline_prepare.rs:117 — crates/bevy_pbr/src/meshlet/material_pipeline_prepare.rs:117-135 | crates/bevy_pbr/src/render/mesh.rs:465-483 — before extracting anything, compare `crates/bevy_pbr/src/meshlet/material_pipeline_prepare.rs` and `crates/bevy_pbr/src/render/mesh.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) crates/bevy_pbr/src/prepass/mod.rs:1439 — crates/bevy_pbr/src/prepass/mod.rs:1439-1457 | crates/bevy_pbr/src/prepass/mod.rs:1487-1505 — 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 (19 lines × 2) crates/bevy_pbr/src/render/gpu_preprocess.rs:2750 — crates/bevy_pbr/src/render/gpu_preprocess.rs:2750-2768 | crates/bevy_pbr/src/render/gpu_preprocess.rs:2859-2877 — 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 (19 lines × 2) crates/bevy_pbr/src/render/mesh.rs:4684 — crates/bevy_pbr/src/render/mesh.rs:4684-4702 | crates/bevy_pbr/src/wireframe.rs:587-605 — 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 (19 lines × 2) REDACTED:529 — REDACTED:529-547 | REDACTED:1019-1037 — 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 (19 lines × 2) crates/bevy_ui_render/src/lib.rs:2056 — crates/bevy_ui_render/src/lib.rs:2056-2074 | crates/bevy_ui_render/src/lib.rs:2092-2110 — 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.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×7
  • Duplicated block (8 lines × 3) crates/bevy_asset/src/io/memory.rs:92 — crates/bevy_asset/src/io/memory.rs:92-99 | crates/bevy_asset/src/io/memory.rs:133-140 | crates/bevy_asset/src/io/memory.rs:168-175 — 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.
  • Duplicated block (8 lines × 3) crates/bevy_reflect/derive/src/impls/func/from_arg.rs:6 — crates/bevy_reflect/derive/src/impls/func/from_arg.rs:6-13 | crates/bevy_reflect/derive/src/impls/func/get_ownership.rs:7-14 | crates/bevy_reflect/derive/src/impls/func/into_return.rs:7-14 — 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 all 3 call sites, so a change lands once.
  • Duplicated block (8 lines × 3) crates/bevy_render/macros/src/as_bind_group.rs:221 — crates/bevy_render/macros/src/as_bind_group.rs:221-229 | crates/bevy_render/macros/src/as_bind_group.rs:860-868 | crates/bevy_render/macros/src/as_bind_group.rs:907-914 — 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.
  • Duplicated block (8 lines × 3) crates/bevy_app/src/main_schedule.rs:240 — crates/bevy_app/src/main_schedule.rs:240-247 | crates/bevy_app/src/main_schedule.rs:371-378 | crates/bevy_render/src/lib.rs:297-304 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (8 lines × 3) crates/bevy_app/src/main_schedule.rs:250 — crates/bevy_app/src/main_schedule.rs:250-257 | crates/bevy_app/src/main_schedule.rs:381-388 | crates/bevy_render/src/lib.rs:307-314 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (8 lines × 3) crates/bevy_core_pipeline/src/core_3d/main_transparent_pass_3d_node.rs:73 — crates/bevy_core_pipeline/src/core_3d/main_transparent_pass_3d_node.rs:73-86 | crates/bevy_pbr/src/wireframe.rs:828-835 | crates/bevy_sprite_render/src/mesh2d/wireframe2d.rs:379-386 — before extracting anything, compare `crates/bevy_pbr/src/wireframe.rs` and `crates/bevy_sprite_render/src/mesh2d/wireframe2d.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 111 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 3) crates/bevy_pbr/src/meshlet/resource_manager.rs:627 — crates/bevy_pbr/src/meshlet/resource_manager.rs:627-634 | crates/bevy_pbr/src/meshlet/resource_manager.rs:689-696 | crates/bevy_pbr/src/meshlet/resource_manager.rs:701-709 — 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.
D1 · Cyclomatic Complexity · bevy_image · ×6
  • bevy_image::ktx2::ktx2_dfd_header_to_texture_format (cyclomatic 162) crates/bevy_image/src/ktx2.rs:478 — bevy_image::ktx2::ktx2_dfd_header_to_texture_format has cyclomatic complexity 162 (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.
  • bevy_image::ktx2::ktx2_format_to_texture_format (cyclomatic 115) crates/bevy_image/src/ktx2.rs:1205 — bevy_image::ktx2::ktx2_format_to_texture_format has cyclomatic complexity 115 (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.
  • bevy_image::dds::dds_format_to_texture_format (cyclomatic 87) crates/bevy_image/src/dds.rs:134 — bevy_image::dds::dds_format_to_texture_format has cyclomatic complexity 87 (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.
  • bevy_image::ktx2::ktx2_buffer_to_image (cyclomatic 37) crates/bevy_image/src/ktx2.rs:30 — bevy_image::ktx2::ktx2_buffer_to_image has cyclomatic complexity 37 (threshold 15). 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.
  • bevy_image::compressed_image_saver::ctt_helpers::choose_ctt_compressed_format (cyclomatic 17) crates/bevy_image/src/compressed_image_saver/ctt_helpers.rs:68 — bevy_image::compressed_image_saver::ctt_helpers::choose_ctt_compressed_format 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.
  • bevy_image::dds::dds_buffer_to_image (cyclomatic 17) crates/bevy_image/src/dds.rs:20 — bevy_image::dds::dds_buffer_to_image has cyclomatic complexity 17 (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.
D2 · Cognitive Complexity · bevy_picking · ×6
  • bevy_picking::events::pointer_events (cognitive 109) crates/bevy_picking/src/events.rs:816 — bevy_picking::events::pointer_events has cognitive complexity 109 (threshold 15). Drivers by points: loops 22 (71 pts), if/else 11 (35 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 74). 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.
  • bevy_picking::hover::build_hover_map (cognitive 21) crates/bevy_picking/src/hover.rs:265 — bevy_picking::hover::build_hover_map has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 2 (4 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.
  • bevy_picking::input::mouse_pick_events (cognitive 21) crates/bevy_picking/src/input.rs:121 — bevy_picking::input::mouse_pick_events has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 6 (17 pts), if/else 1 (3 pts), loops 1 (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.
  • bevy_picking::mesh_picking::ray_cast::intersections::ray_mesh_intersection (cognitive 21) crates/bevy_picking/src/mesh_picking/ray_cast/intersections.rs:81 — bevy_picking::mesh_picking::ray_cast::intersections::ray_mesh_intersection has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 5 (8 pts), boolean chains 2 (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.
  • bevy_picking::hover::update_interactions (cognitive 19) crates/bevy_picking/src/hover.rs:315 — bevy_picking::hover::update_interactions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 5 (8 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.
  • bevy_picking::input::touch_pick_events (cognitive 18) crates/bevy_picking/src/input.rs:209 — bevy_picking::input::touch_pick_events has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (11 pts), match/switch 2 (6 pts), loops 1 (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.
D2 · Cognitive Complexity · bevy_ecs_macros · ×6
  • bevy_ecs_macros::query_data::derive_query_data_impl (cognitive 38) crates/bevy_ecs/macros/src/query_data.rs:126 — bevy_ecs_macros::query_data::derive_query_data_impl has cognitive complexity 38 (threshold 15). Drivers by points: if/else 30 (35 pts), boolean chains 1, loops 1, 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.
  • bevy_ecs_macros::template::struct_impl (cognitive 33) crates/bevy_ecs/macros/src/template.rs:311 — bevy_ecs_macros::template::struct_impl has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (28 pts), loops 2 (3 pts), 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.
  • bevy_ecs_macros::template::derive_from_template (cognitive 31) crates/bevy_ecs/macros/src/template.rs:13 — bevy_ecs_macros::template::derive_from_template has cognitive complexity 31 (threshold 15). Drivers by points: if/else 5 (17 pts), match/switch 5 (11 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 19). 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.
  • bevy_ecs_macros::derive_system_param_impl (cognitive 29) crates/bevy_ecs/macros/src/lib.rs:285 — bevy_ecs_macros::derive_system_param_impl has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 5, match/switch 3, 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.
  • bevy_ecs_macros::derive_bundle (cognitive 23) crates/bevy_ecs/macros/src/lib.rs:59 — bevy_ecs_macros::derive_bundle has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 4 (5 pts), match/switch 2 (3 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.
  • bevy_ecs_macros::event::derive_entity_event (cognitive 16) crates/bevy_ecs/macros/src/event.rs:61 — bevy_ecs_macros::event::derive_entity_event has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 2 (3 pts), boolean chains 1, loops 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.
D23 · Boundary Type-Coupling · Cross-context type Context (bevy_ecs → bevy_asset) · ×6
  • Cross-context type Context (bevy_ecs → bevy_asset) crates/bevy_asset/src/io/memory.rs:262 — Context (context bevy_ecs) is exposed in bevy_asset's public surface via DirStream.poll_next — couples the contexts.
  • Cross-context type Context (bevy_ecs → bevy_asset) crates/bevy_asset/src/io/mod.rs:627 — Context (context bevy_ecs) is exposed in bevy_asset's public surface via VecReader.poll_read — couples the contexts.
  • Cross-context type Context (bevy_ecs → bevy_asset) crates/bevy_asset/src/io/mod.rs:639 — Context (context bevy_ecs) is exposed in bevy_asset's public surface via VecReader.poll_seek — couples the contexts.
  • Cross-context type Context (bevy_ecs → bevy_asset) crates/bevy_asset/src/io/mod.rs:680 — Context (context bevy_ecs) is exposed in bevy_asset's public surface via SliceReader.poll_read — couples the contexts.
  • Cross-context type Context (bevy_ecs → bevy_asset) crates/bevy_asset/src/io/mod.rs:690 — Context (context bevy_ecs) is exposed in bevy_asset's public surface via SliceReader.poll_seek — couples the contexts.
  • Cross-context type Context (bevy_ecs → bevy_asset) crates/bevy_asset/src/io/processor_gated.rs:137 — Context (context bevy_ecs) is exposed in bevy_asset's public surface via TransactionLockedReader.poll_read — couples the contexts.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×6
  • Duplicated block (18 lines × 2) crates/bevy_asset/src/io/file/file_asset.rs:79 — crates/bevy_asset/src/io/file/file_asset.rs:79-96 | crates/bevy_asset/src/io/file/file_asset.rs:103-120 — 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 (18 lines × 2) crates/bevy_ecs/src/world/unsafe_world_cell.rs:1200 — crates/bevy_ecs/src/world/unsafe_world_cell.rs:1200-1217 | crates/bevy_ecs/src/world/unsafe_world_cell.rs:1245-1262 — 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 (18 lines × 2) crates/bevy_pbr/src/meshlet/resource_manager.rs:894 — crates/bevy_pbr/src/meshlet/resource_manager.rs:894-911 | crates/bevy_pbr/src/meshlet/resource_manager.rs:931-948 — 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 (18 lines × 2) crates/bevy_pbr/src/wireframe.rs:1482 — crates/bevy_pbr/src/wireframe.rs:1482-1499 | crates/bevy_sprite_render/src/mesh2d/wireframe2d.rs:775-792 — before extracting anything, compare `crates/bevy_pbr/src/wireframe.rs` and `crates/bevy_sprite_render/src/mesh2d/wireframe2d.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 111 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (18 lines × 2) crates/bevy_render/src/erased_render_asset.rs:394 — crates/bevy_render/src/erased_render_asset.rs:394-411 | crates/bevy_render/src/erased_render_asset.rs:433-450 — 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 (18 lines × 2) crates/bevy_render/src/render_phase/mod.rs:1216 — crates/bevy_render/src/render_phase/mod.rs:1216-1233 | crates/bevy_render/src/render_phase/mod.rs:1240-1257 — 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.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×6
  • Duplicated block (12 lines × 3) crates/bevy_ecs/src/query/par_iter.rs:100 — crates/bevy_ecs/src/query/par_iter.rs:100-111 | crates/bevy_ecs/src/query/par_iter.rs:460-471 | crates/bevy_ecs/src/query/par_iter.rs:626-637 — 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.
  • Duplicated block (12 lines × 3) crates/bevy_mesh/src/primitives/dim2.rs:206 — crates/bevy_mesh/src/primitives/dim2.rs:206-217 | crates/bevy_mesh/src/primitives/dim2.rs:353-364 | crates/bevy_mesh/src/primitives/dim2.rs:615-626 — 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.
  • Duplicated block (12 lines × 3) crates/bevy_mesh/src/primitives/dim3/capsule.rs:339 — crates/bevy_mesh/src/primitives/dim3/capsule.rs:339-350 | crates/bevy_mesh/src/primitives/dim3/capsule.rs:353-364 | crates/bevy_mesh/src/primitives/dim3/capsule.rs:384-395 — 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.
  • Duplicated block (12 lines × 3) crates/bevy_pbr/src/atmosphere/resources.rs:391 — crates/bevy_pbr/src/atmosphere/resources.rs:391-402 | crates/bevy_pbr/src/atmosphere/resources.rs:405-416 | crates/bevy_pbr/src/atmosphere/resources.rs:419-430 — 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.
  • Duplicated block (12 lines × 3) crates/bevy_pbr/src/meshlet/material_shade_nodes.rs:70 — crates/bevy_pbr/src/meshlet/material_shade_nodes.rs:70-81 | crates/bevy_pbr/src/meshlet/material_shade_nodes.rs:175-186 | crates/bevy_pbr/src/meshlet/material_shade_nodes.rs:297-308 — 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.
  • Duplicated block (12 lines × 3) crates/bevy_sprite_render/src/render/mod.rs:275 — crates/bevy_sprite_render/src/render/mod.rs:275-286 | crates/bevy_ui_render/src/gradient.rs:201-212 | crates/bevy_ui_render/src/pipeline.rs:85-96 — before extracting anything, compare `crates/bevy_ui_render/src/gradient.rs` and `crates/bevy_ui_render/src/pipeline.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×6
  • Duplicated block (7 lines × 3) crates/bevy_core_pipeline/src/mip_generation/mod.rs:707 — crates/bevy_core_pipeline/src/mip_generation/mod.rs:707-713 | crates/bevy_core_pipeline/src/mip_generation/mod.rs:736-742 | crates/bevy_core_pipeline/src/mip_generation/mod.rs:751-757 — 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.
  • Duplicated block (7 lines × 3) crates/bevy_ecs/src/query/state.rs:321 — crates/bevy_ecs/src/query/state.rs:321-327 | crates/bevy_ecs/src/query/state.rs:813-819 | crates/bevy_ecs/src/query/state.rs:961-967 — 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.
  • Duplicated block (7 lines × 3) crates/bevy_pbr/src/light_probe/generate.rs:790 — crates/bevy_pbr/src/light_probe/generate.rs:790-796 | crates/bevy_pbr/src/light_probe/generate.rs:813-819 | crates/bevy_pbr/src/light_probe/generate.rs:836-842 — 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.
  • Duplicated block (7 lines × 3) crates/bevy_reflect/derive/src/impls/enums.rs:56 — crates/bevy_reflect/derive/src/impls/enums.rs:56-62 | crates/bevy_reflect/derive/src/impls/structs.rs:46-52 | crates/bevy_reflect/derive/src/impls/tuple_structs.rs:36-42 — before extracting anything, compare `crates/bevy_reflect/derive/src/impls/enums.rs` and `crates/bevy_reflect/derive/src/impls/structs.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 3) crates/bevy_core_pipeline/src/core_2d/main_opaque_pass_2d_node.rs:40 — crates/bevy_core_pipeline/src/core_2d/main_opaque_pass_2d_node.rs:40-46 | crates/bevy_core_pipeline/src/core_2d/main_transparent_pass_2d_node.rs:39-51 | crates/bevy_core_pipeline/src/core_3d/main_opaque_pass_3d_node.rs:59-65 — `crates/bevy_core_pipeline/src/core_2d/main_opaque_pass_2d_node.rs` and `crates/bevy_core_pipeline/src/core_3d/main_opaque_pass_3d_node.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 30 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (7 lines × 3) crates/bevy_ecs/fuzz/fuzz_targets/hierarchy.rs:46 — crates/bevy_ecs/fuzz/fuzz_targets/hierarchy.rs:46-52 | crates/bevy_ecs/fuzz/fuzz_targets/observers.rs:104-110 | crates/bevy_ecs/fuzz/fuzz_targets/query_system.rs:91-97 — 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 all 3 call sites, so a change lands once.
D1 · Cyclomatic Complexity · bevy_render · ×5
  • bevy_render::batching::gpu_preprocessing::batch_and_prepare_binned_render_phase (cyclomatic 25) crates/bevy_render/src/batching/gpu_preprocessing.rs:2079 — bevy_render::batching::gpu_preprocessing::batch_and_prepare_binned_render_phase 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.
  • bevy_render::batching::gpu_preprocessing::batch_and_prepare_sorted_render_phase (cyclomatic 21) crates/bevy_render/src/batching/gpu_preprocessing.rs:1850 — bevy_render::batching::gpu_preprocessing::batch_and_prepare_sorted_render_phase 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.
  • bevy_render::camera::extract_cameras (cyclomatic 20) crates/bevy_render/src/camera.rs:482 — bevy_render::camera::extract_cameras 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.
  • bevy_render::erased_render_asset::prepare_erased_assets (cyclomatic 16) crates/bevy_render/src/erased_render_asset.rs:372 — bevy_render::erased_render_asset::prepare_erased_assets 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.
  • bevy_render::render_asset::prepare_assets (cyclomatic 16) crates/bevy_render/src/render_asset.rs:393 — bevy_render::render_asset::prepare_assets 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.
D2 · Cognitive Complexity · bevy_light · ×5
  • bevy_light::cluster::assign::assign_objects_to_clusters (cognitive 254) crates/bevy_light/src/cluster/assign.rs:137 — bevy_light::cluster::assign::assign_objects_to_clusters has cognitive complexity 254 (threshold 15). Drivers by points: if/else 46 (137 pts), loops 17 (86 pts), match/switch 6 (20 pts), boolean chains 11 (nesting depth added 174). 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.
  • bevy_light::check_point_light_mesh_visibility (cognitive 104) crates/bevy_light/src/lib.rs:517 — bevy_light::check_point_light_mesh_visibility has cognitive complexity 104 (threshold 15). Drivers by points: if/else 19 (72 pts), loops 7 (26 pts), boolean chains 6 (nesting depth added 72). 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.
  • bevy_light::check_dir_light_mesh_visibility (cognitive 60) crates/bevy_light/src/lib.rs:342 — bevy_light::check_dir_light_mesh_visibility has cognitive complexity 60 (threshold 15). Drivers by points: loops 12 (30 pts), if/else 8 (24 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 36). 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.
  • bevy_light::gizmos::draw_all_lights (cognitive 33) crates/bevy_light/src/gizmos.rs:269 — bevy_light::gizmos::draw_all_lights has cognitive complexity 33 (threshold 15). Drivers by points: loops 16 (32 pts), match/switch 1 (nesting depth added 16). 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.
  • bevy_light::atmosphere::extract_chromatic_phase_textures (cognitive 26) crates/bevy_light/src/atmosphere.rs:550 — bevy_light::atmosphere::extract_chromatic_phase_textures has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 3 (6 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.
D2 · Cognitive Complexity · bevy_gizmos_render · ×5
  • bevy_gizmos_render::pipeline_2d::queue_line_and_joint_gizmos_2d (cognitive 21) crates/bevy_gizmos_render/src/pipeline_2d.rs:279 — bevy_gizmos_render::pipeline_2d::queue_line_and_joint_gizmos_2d has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (3 pts), boolean chains 1 (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.
  • bevy_gizmos_render::extract_gizmo_data (cognitive 19) crates/bevy_gizmos_render/src/lib.rs:143 — bevy_gizmos_render::extract_gizmo_data has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (18 pts), 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.
  • bevy_gizmos_render::pipeline_3d::queue_line_gizmos_3d (cognitive 19) crates/bevy_gizmos_render/src/pipeline_3d.rs:276 — bevy_gizmos_render::pipeline_3d::queue_line_gizmos_3d has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (3 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.
  • bevy_gizmos_render::pipeline_3d::queue_line_joint_gizmos_3d (cognitive 17) crates/bevy_gizmos_render/src/pipeline_3d.rs:363 — bevy_gizmos_render::pipeline_3d::queue_line_joint_gizmos_3d has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 pts), boolean chains 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.
  • bevy_gizmos_render::transform_gizmo_render::update_gizmo_meshes (cognitive 16) crates/bevy_gizmos_render/src/transform_gizmo_render.rs:372 — bevy_gizmos_render::transform_gizmo_render::update_gizmo_meshes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 2, loops 1 (nesting depth added 2). 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.
D3 · God Classes · TooManyFields · ×5
  • TooManyFields: StandardMaterial crates/bevy_pbr/src/pbr_material.rs:27 — TooManyFields — 60 stored fields beside 4 methods. The bar is 30 stored fields; this is 30 over it, 2.00× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: GltfMaterial crates/bevy_gltf/src/material.rs:14 — TooManyFields — 46 stored fields. The bar is 30 stored fields; this is 16 over it, 1.53× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: Node crates/bevy_ui/src/ui_node.rs:491 — TooManyFields — 42 stored fields. The bar is 30 stored fields; this is 12 over it, 1.40× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: Window crates/bevy_window/src/window.rs:164 — TooManyFields — 40 stored fields beside 15 methods. The bar is 30 stored fields; this is 10 over it, 1.33× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: MeshletViewResources crates/bevy_pbr/src/meshlet/resource_manager.rs:453 — TooManyFields — 31 stored fields. The bar is 30 stored fields; this is 1 over it, 1.03× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×5
  • Duplicated block (11 lines × 3) crates/bevy_pbr/src/decal/clustered.rs:357 — crates/bevy_pbr/src/decal/clustered.rs:357-367 | crates/bevy_pbr/src/decal/clustered.rs:387-397 | crates/bevy_pbr/src/decal/clustered.rs:417-427 — 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.
  • Duplicated block (11 lines × 3) crates/bevy_pbr/src/prepass/mod.rs:476 — crates/bevy_pbr/src/prepass/mod.rs:476-486 | crates/bevy_pbr/src/render/mesh.rs:3402-3412 | crates/bevy_sprite_render/src/mesh2d/mesh.rs:728-738 — before extracting anything, compare `crates/bevy_pbr/src/prepass/mod.rs` and `crates/bevy_pbr/src/render/mesh.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 3) crates/bevy_ui_render/src/lib.rs:2492 — crates/bevy_ui_render/src/lib.rs:2492-2502 | crates/bevy_ui_render/src/lib.rs:2563-2573 | crates/bevy_ui_render/src/ui_texture_slice_pipeline.rs:666-676 — before extracting anything, compare `crates/bevy_ui_render/src/lib.rs` and `crates/bevy_ui_render/src/ui_texture_slice_pipeline.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 3) crates/bevy_anti_alias/src/taa/mod.rs:182 — crates/bevy_anti_alias/src/taa/mod.rs:182-193 | crates/bevy_pbr/src/ssr/mod.rs:287-298 | crates/bevy_post_process/src/motion_blur/mod.rs:241-251 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times.
  • Duplicated block (11 lines × 3) crates/bevy_anti_alias/src/contrast_adaptive_sharpening/node.rs:76 — crates/bevy_anti_alias/src/contrast_adaptive_sharpening/node.rs:76-86 | crates/bevy_anti_alias/src/fxaa/node.rs:55-65 | crates/bevy_core_pipeline/src/tonemapping/node.rs:116-126 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times.
D1 · Cyclomatic Complexity · bevy_light · ×4
  • bevy_light::cluster::assign::assign_objects_to_clusters (cyclomatic 73) crates/bevy_light/src/cluster/assign.rs:137 — bevy_light::cluster::assign::assign_objects_to_clusters has cyclomatic complexity 73 (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.
  • bevy_light::check_point_light_mesh_visibility (cyclomatic 31) crates/bevy_light/src/lib.rs:517 — bevy_light::check_point_light_mesh_visibility 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.
  • bevy_light::check_dir_light_mesh_visibility (cyclomatic 24) crates/bevy_light/src/lib.rs:342 — bevy_light::check_dir_light_mesh_visibility has cyclomatic complexity 24 (threshold 15). 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.
  • bevy_light::gizmos::draw_all_lights (cyclomatic 20) crates/bevy_light/src/gizmos.rs:269 — bevy_light::gizmos::draw_all_lights has cyclomatic complexity 20 (threshold 15). 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.
D1 · Cyclomatic Complexity · bevy_gltf · ×4
  • bevy_gltf::loader::load_node (cyclomatic 38) crates/bevy_gltf/src/loader/mod.rs:1610 — bevy_gltf::loader::load_node has cyclomatic complexity 38 (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.
  • bevy_gltf::loader::extensions::khr_meshopt_compression::decode_view (cyclomatic 30) crates/bevy_gltf/src/loader/extensions/khr_meshopt_compression.rs:98 — bevy_gltf::loader::extensions::khr_meshopt_compression::decode_view has cyclomatic complexity 30 (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.
  • bevy_gltf::loader::extensions::ext_mesh_gpu_instancing::instance_transforms (cyclomatic 19) crates/bevy_gltf/src/loader/extensions/ext_mesh_gpu_instancing.rs:37 — bevy_gltf::loader::extensions::ext_mesh_gpu_instancing::instance_transforms has cyclomatic complexity 19 (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.
  • bevy_gltf::vertex_attributes::convert_attribute (cyclomatic 18) crates/bevy_gltf/src/vertex_attributes.rs:353 — bevy_gltf::vertex_attributes::convert_attribute 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: VertexAttributeIter::from_accessor (cyclomatic 21) 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.
D17 · Explicit Debt · HackComment · ×4
  • HackComment examples/asset/compressed_image_saver.rs:106 — // HACK: this function isn't relevant to asset processing in general. — 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 examples/3d/pccm.rs:149 — // HACK: slightly larger than 10.0 to avoid z-fighting from the outer cube — 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 crates/bevy_ecs/src/world/reflect.rs:165 — // HACK: Only required for the `None`-case/`else`-branch, but it borrows `self`, which will — 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 crates/bevy_asset/src/io/android.rs:83 — // HACK: `AssetManager` does not provide a way to check if 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.
D2 · Cognitive Complexity · AssetProcessor · ×4
  • AssetProcessor::validate_transaction_log_and_recover (cognitive 70) crates/bevy_asset/src/processor/mod.rs:1245 — AssetProcessor::validate_transaction_log_and_recover has cognitive complexity 70 (threshold 15). Drivers by points: if/else 10 (45 pts), match/switch 5 (19 pts), loops 2 (6 pts) (nesting depth added 53). 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.
  • AssetProcessor::initialize (cognitive 37) crates/bevy_asset/src/processor/mod.rs:838 — AssetProcessor::initialize has cognitive complexity 37 (threshold 15). Drivers by points: loops 7 (16 pts), if/else 7 (14 pts), match/switch 2 (6 pts), boolean chains 1 (nesting depth added 20). Of this number, 30 points are the body's own statements and 7 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.
  • AssetProcessor::handle_asset_source_event (cognitive 20) crates/bevy_asset/src/processor/mod.rs:487 — AssetProcessor::handle_asset_source_event has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 3 (6 pts) (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.
  • AssetProcessor::process_asset_internal (cognitive 20) crates/bevy_asset/src/processor/mod.rs:1031 — AssetProcessor::process_asset_internal has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 3 (6 pts), loops 1 (2 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.
D2 · Cognitive Complexity · bevy_ecs · ×4
  • bevy_ecs::query::access_iter::has_conflicts_large (cognitive 34) crates/bevy_ecs/src/query/access_iter.rs:64 — bevy_ecs::query::access_iter::has_conflicts_large has cognitive complexity 34 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 3 (8 pts), match/switch 2 (7 pts) (nesting depth added 23). 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.
  • bevy_ecs::observer::entity_cloning::component_clone_observed_by (cognitive 25) crates/bevy_ecs/src/observer/entity_cloning.rs:27 — bevy_ecs::observer::entity_cloning::component_clone_observed_by has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 3 (7 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.
  • bevy_ecs::component::clone::component_clone_via_reflect (cognitive 17) crates/bevy_ecs/src/component/clone.rs:85 — bevy_ecs::component::clone::component_clone_via_reflect has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (16 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.
  • bevy_ecs::world::entity_fetch::check_duplicate_entities (cognitive 16) crates/bevy_ecs/src/world/entity_fetch.rs:433 — bevy_ecs::world::entity_fetch::check_duplicate_entities has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (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.
D2 · Cognitive Complexity · bevy_core_pipeline · ×4
  • bevy_core_pipeline::core_3d::extract_camera_prepass_phase (cognitive 31) crates/bevy_core_pipeline/src/core_3d/mod.rs:541 — bevy_core_pipeline::core_3d::extract_camera_prepass_phase has cognitive complexity 31 (threshold 15). Drivers by points: if/else 19 (29 pts), boolean chains 1, loops 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.
  • bevy_core_pipeline::schedule::camera_driver (cognitive 28) crates/bevy_core_pipeline/src/schedule.rs:136 — bevy_core_pipeline::schedule::camera_driver has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 4, match/switch 1 (2 pts), loops 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.
  • bevy_core_pipeline::upscaling::prepare_view_upscaling_pipelines (cognitive 21) crates/bevy_core_pipeline/src/upscaling/mod.rs:50 — bevy_core_pipeline::upscaling::prepare_view_upscaling_pipelines has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 2 (7 pts), loops 1 (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.
  • bevy_core_pipeline::deferred::node::run_deferred_prepass_system (cognitive 16) crates/bevy_core_pipeline/src/deferred/node.rs:109 — bevy_core_pipeline::deferred::node::run_deferred_prepass_system has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 1 (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.
D2 · Cognitive Complexity · bevy_remote · ×4
  • bevy_remote::builtin_methods::process_remote_get_components_watching_request (cognitive 24) crates/bevy_remote/src/builtin_methods.rs:783 — bevy_remote::builtin_methods::process_remote_get_components_watching_request has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (3 pts), boolean chains 2, match/switch 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.
  • bevy_remote::builtin_methods::process_remote_query_request (cognitive 19) crates/bevy_remote/src/builtin_methods.rs:978 — bevy_remote::builtin_methods::process_remote_query_request has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 6, match/switch 3 (4 pts), boolean chains 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.
  • bevy_remote::builtin_methods::process_remote_list_components_watching_request (cognitive 19) crates/bevy_remote/src/builtin_methods.rs:1630 — bevy_remote::builtin_methods::process_remote_list_components_watching_request has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (4 pts), boolean chains 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.
  • bevy_remote::builtin_methods::serialize_components (cognitive 17) crates/bevy_remote/src/builtin_methods.rs:1217 — bevy_remote::builtin_methods::serialize_components has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (15 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.
D35 · Change Coupling · Change-coupling hub · ×4
  • Change-coupling hub: main_transparent_pass_3d_node.rs → main_transparent_pass_2d_node.rs, main_opaque_pass_3d_node.rs, node.rs, node.rs, node.rs crates/bevy_core_pipeline/src/core_3d/main_transparent_pass_3d_node.rs — `crates/bevy_core_pipeline/src/core_3d/main_transparent_pass_3d_node.rs` changes together with 5 other files — `crates/bevy_core_pipeline/src/core_2d/main_transparent_pass_2d_node.rs`, `crates/bevy_core_pipeline/src/core_3d/main_opaque_pass_3d_node.rs`, `crates/bevy_core_pipeline/src/deferred/node.rs`, `crates/bevy_core_pipeline/src/prepass/node.rs`, `crates/bevy_pbr/src/transmission/node.rs` — none of which declares a dependency on it: one file is the hub of 5 separate couplings, not 5 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 5.
  • Change-coupling hub: node.rs → main_opaque_pass_3d_node.rs, node.rs, light.rs, node.rs crates/bevy_core_pipeline/src/deferred/node.rs — `crates/bevy_core_pipeline/src/deferred/node.rs` changes together with 4 other files — `crates/bevy_core_pipeline/src/core_3d/main_opaque_pass_3d_node.rs`, `crates/bevy_core_pipeline/src/prepass/node.rs`, `crates/bevy_pbr/src/render/light.rs`, `crates/bevy_pbr/src/transmission/node.rs` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
  • Change-coupling hub: mod.rs → mod.rs, copy_lighting_id.rs, mod.rs, mod.rs crates/bevy_anti_alias/src/taa/mod.rs — `crates/bevy_anti_alias/src/taa/mod.rs` changes together with 4 other files — `crates/bevy_anti_alias/src/contrast_adaptive_sharpening/mod.rs`, `crates/bevy_core_pipeline/src/deferred/copy_lighting_id.rs`, `crates/bevy_pbr/src/ssao/mod.rs`, `crates/bevy_post_process/src/motion_blur/mod.rs` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
  • Change-coupling hub: no_gpu_preprocessing.rs → material.rs, mod.rs, light.rs crates/bevy_render/src/batching/no_gpu_preprocessing.rs — `crates/bevy_render/src/batching/no_gpu_preprocessing.rs` changes together with 3 other files — `crates/bevy_pbr/src/material.rs`, `crates/bevy_pbr/src/prepass/mod.rs`, `crates/bevy_pbr/src/render/light.rs` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
D4 · Code Duplication · Duplicated block (32 lines × 2) · ×4
  • Duplicated block (32 lines × 2) crates/bevy_ecs/macros/src/query_data.rs:263 — crates/bevy_ecs/macros/src/query_data.rs:263-294 | crates/bevy_ecs/macros/src/query_data.rs:335-366 — 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 (32 lines × 2) crates/bevy_pbr/src/meshlet/material_shade_nodes.rs:132 — crates/bevy_pbr/src/meshlet/material_shade_nodes.rs:132-163 | crates/bevy_pbr/src/meshlet/material_shade_nodes.rs:249-280 — 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 (32 lines × 2) crates/bevy_pbr/src/meshlet/material_shade_nodes.rs:189 — crates/bevy_pbr/src/meshlet/material_shade_nodes.rs:189-220 | crates/bevy_pbr/src/meshlet/material_shade_nodes.rs:311-342 — 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 (32 lines × 2) crates/bevy_pbr/src/prepass/mod.rs:1228 — crates/bevy_pbr/src/prepass/mod.rs:1228-1259 | crates/bevy_pbr/src/render/light.rs:2599-2630 — before extracting anything, compare `crates/bevy_pbr/src/prepass/mod.rs` and `crates/bevy_pbr/src/render/light.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 110 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×4
  • Duplicated block (12–13 lines × 2) crates/bevy_camera/src/visibility/mod.rs:577 — crates/bevy_camera/src/visibility/mod.rs:577-588 | crates/bevy_sprite/src/lib.rs:148-160 — 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 (12–13 lines × 2) crates/bevy_ecs/src/component/clone.rs:99 — crates/bevy_ecs/src/component/clone.rs:99-111 | crates/bevy_ecs/src/component/clone.rs:116-127 — 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–13 lines × 2) crates/bevy_mesh/src/primitives/dim3/capsule.rs:334 — crates/bevy_mesh/src/primitives/dim3/capsule.rs:334-346 | crates/bevy_mesh/src/primitives/dim3/capsule.rs:380-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.
  • Duplicated block (12–13 lines × 2) crates/bevy_pbr/src/material.rs:633 — crates/bevy_pbr/src/material.rs:633-644 | crates/bevy_sprite_render/src/mesh2d/material.rs:604-616 — before extracting anything, compare `crates/bevy_pbr/src/material.rs` and `crates/bevy_sprite_render/src/mesh2d/material.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×4
  • Duplicated block (11–12 lines × 2) crates/bevy_asset/src/server/mod.rs:1450 — crates/bevy_asset/src/server/mod.rs:1450-1461 | crates/bevy_asset/src/server/mod.rs:1465-1475 — 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–12 lines × 2) crates/bevy_ecs/src/message/mut_iterators.rs:59 — crates/bevy_ecs/src/message/mut_iterators.rs:59-70 | crates/bevy_ecs/src/message/mut_iterators.rs:165-175 — 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–12 lines × 2) crates/bevy_solari/src/realtime/prepare.rs:253 — crates/bevy_solari/src/realtime/prepare.rs:253-263 | crates/bevy_solari/src/realtime/prepare.rs:265-276 — 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–12 lines × 2) crates/bevy_ui_render/src/lib.rs:2248 — crates/bevy_ui_render/src/lib.rs:2248-2259 | crates/bevy_ui_render/src/ui_texture_slice_pipeline.rs:455-465 — before extracting anything, compare `crates/bevy_ui_render/src/lib.rs` and `crates/bevy_ui_render/src/ui_texture_slice_pipeline.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×4
  • Duplicated block (6 lines × 3) crates/bevy_mesh/src/primitives/extrusion.rs:332 — crates/bevy_mesh/src/primitives/extrusion.rs:332-337 | crates/bevy_mesh/src/primitives/extrusion.rs:356-361 | crates/bevy_mesh/src/primitives/extrusion.rs:384-389 — 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.
  • Duplicated block (6 lines × 3) crates/bevy_render/macros/src/as_bind_group.rs:537 — crates/bevy_render/macros/src/as_bind_group.rs:537-544 | crates/bevy_render/macros/src/as_bind_group.rs:853-859 | crates/bevy_render/macros/src/as_bind_group.rs:901-906 — 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.
  • Duplicated block (6 lines × 3) crates/bevy_pbr/src/render/mesh.rs:3231 — crates/bevy_pbr/src/render/mesh.rs:3231-3236 | crates/bevy_sprite_render/src/mesh2d/mesh.rs:679-684 | crates/bevy_sprite_render/src/render/mod.rs:151-156 — before extracting anything, compare `crates/bevy_pbr/src/render/mesh.rs` and `crates/bevy_sprite_render/src/mesh2d/mesh.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) crates/bevy_curve/src/derivatives/mod.rs:83 — crates/bevy_curve/src/derivatives/mod.rs:83-88 | crates/bevy_curve/src/derivatives/mod.rs:130-135 | crates/bevy_curve/src/lib.rs:376-381 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×4
  • Duplicated block (6 lines × 4) crates/bevy_math/src/rects/irect.rs:258 — crates/bevy_math/src/rects/irect.rs:258-263 | crates/bevy_math/src/rects/urect.rs:255-260 | crates/bevy_shape/src/bounding/bounded2d/mod.rs:140-145 | crates/bevy_shape/src/bounding/bounded3d/mod.rs:166-171 — `crates/bevy_shape/src/bounding/bounded2d/mod.rs` and `crates/bevy_shape/src/bounding/bounded3d/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 8 separate duplicated blocks between them, totalling at least 53 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (6 lines × 4) crates/bevy_pbr/src/meshlet/resource_manager.rs:643 — crates/bevy_pbr/src/meshlet/resource_manager.rs:643-648 | crates/bevy_pbr/src/meshlet/resource_manager.rs:655-661 | crates/bevy_pbr/src/meshlet/resource_manager.rs:668-673 | crates/bevy_pbr/src/meshlet/resource_manager.rs:680-686 — 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.
  • Duplicated block (6 lines × 4) crates/bevy_pbr/src/meshlet/resource_manager.rs:629 — crates/bevy_pbr/src/meshlet/resource_manager.rs:629-635 | crates/bevy_pbr/src/meshlet/resource_manager.rs:692-697 | crates/bevy_pbr/src/meshlet/resource_manager.rs:704-710 | crates/bevy_pbr/src/meshlet/resource_manager.rs:711-717 — 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.
  • Duplicated block (6 lines × 4) crates/bevy_pbr/src/meshlet/resource_manager.rs:637 — crates/bevy_pbr/src/meshlet/resource_manager.rs:637-642 | crates/bevy_pbr/src/meshlet/resource_manager.rs:649-654 | crates/bevy_pbr/src/meshlet/resource_manager.rs:662-667 | crates/bevy_pbr/src/meshlet/resource_manager.rs:674-679 — 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.
D1 · Cyclomatic Complexity · bevy_ecs_macros · ×3
  • bevy_ecs_macros::query_data::derive_query_data_impl (cyclomatic 22) crates/bevy_ecs/macros/src/query_data.rs:126 — bevy_ecs_macros::query_data::derive_query_data_impl has cyclomatic complexity 22 (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.
  • bevy_ecs_macros::derive_system_param_impl (cyclomatic 21) crates/bevy_ecs/macros/src/lib.rs:285 — bevy_ecs_macros::derive_system_param_impl 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.
  • bevy_ecs_macros::template::derive_from_template (cyclomatic 16) crates/bevy_ecs/macros/src/template.rs:13 — bevy_ecs_macros::template::derive_from_template 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.
D1 · Cyclomatic Complexity · bevy_sprite_render · ×3
  • bevy_sprite_render::mesh2d::material::queue_material2d_meshes (cyclomatic 21) crates/bevy_sprite_render/src/mesh2d/material.rs:990 — bevy_sprite_render::mesh2d::material::queue_material2d_meshes 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.
  • bevy_sprite_render::text2d::extract_text2d_sprite (cyclomatic 20) crates/bevy_sprite_render/src/text2d/mod.rs:24 — bevy_sprite_render::text2d::extract_text2d_sprite 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.
  • bevy_sprite_render::mesh2d::material::specialize_material2d_meshes (cyclomatic 18) crates/bevy_sprite_render/src/mesh2d/material.rs:814 — bevy_sprite_render::mesh2d::material::specialize_material2d_meshes 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.
D1 · Cyclomatic Complexity · AssetProcessor · ×3
  • AssetProcessor::handle_asset_source_event (cyclomatic 17) crates/bevy_asset/src/processor/mod.rs:487 — AssetProcessor::handle_asset_source_event 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.
  • AssetProcessor::initialize (cyclomatic 17) crates/bevy_asset/src/processor/mod.rs:838 — AssetProcessor::initialize has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to one function item inside it that branches. 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.
  • AssetProcessor::validate_transaction_log_and_recover (cyclomatic 17) crates/bevy_asset/src/processor/mod.rs:1245 — AssetProcessor::validate_transaction_log_and_recover 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.
D2 · Cognitive Complexity · World · ×3
  • World::unregister_observer (cognitive 85) crates/bevy_ecs/src/observer/mod.rs:392 — World::unregister_observer has cognitive complexity 85 (threshold 15). Drivers by points: if/else 17 (63 pts), loops 6 (19 pts), boolean chains 3 (nesting depth added 59). 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.
  • World::register_observer (cognitive 27) crates/bevy_ecs/src/observer/mod.rs:331 — World::register_observer has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 5 (13 pts), boolean chains 1 (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.
  • World::try_insert_batch_with_caller (cognitive 20) crates/bevy_ecs/src/world/mod.rs:2725 — World::try_insert_batch_with_caller has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2 (3 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.
D2 · Cognitive Complexity · bevy_gltf · ×3
  • bevy_gltf::loader::load_node (cognitive 71) crates/bevy_gltf/src/loader/mod.rs:1610 — bevy_gltf::loader::load_node has cognitive complexity 71 (threshold 15). Drivers by points: if/else 24 (47 pts), loops 6 (14 pts), boolean chains 6, match/switch 2 (4 pts) (nesting depth added 33). 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.
  • bevy_gltf::loader::extensions::ext_mesh_gpu_instancing::instance_transforms (cognitive 21) crates/bevy_gltf/src/loader/extensions/ext_mesh_gpu_instancing.rs:37 — bevy_gltf::loader::extensions::ext_mesh_gpu_instancing::instance_transforms has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 4 (7 pts), match/switch 3 (5 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.
  • bevy_gltf::loader::spawn_primitives (cognitive 17) crates/bevy_gltf/src/loader/mod.rs:1997 — bevy_gltf::loader::spawn_primitives has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 2 (3 pts), match/switch 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.
D2 · Cognitive Complexity · bevy_animation · ×3
  • bevy_animation::animate_targets (cognitive 64) crates/bevy_animation/src/lib.rs:1098 — bevy_animation::animate_targets has cognitive complexity 64 (threshold 15). Drivers by points: if/else 18 (45 pts), loops 5 (15 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 38). 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.
  • bevy_animation::graph::thread_animation_graphs (cognitive 28) crates/bevy_animation/src/graph.rs:916 — bevy_animation::graph::thread_animation_graphs has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 3 (7 pts), loops 3 (5 pts), boolean chains 2 (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.
  • bevy_animation::trigger_untargeted_animation_events (cognitive 20) crates/bevy_animation/src/lib.rs:1005 — bevy_animation::trigger_untargeted_animation_events has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (6 pts), match/switch 1 (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.
D2 · Cognitive Complexity · bevy_settings · ×3
  • bevy_settings::load_properties (cognitive 60) crates/bevy_settings/src/lib.rs:641 — bevy_settings::load_properties has cognitive complexity 60 (threshold 15). Drivers by points: if/else 14 (45 pts), boolean chains 7, loops 2 (7 pts), match/switch 1 (nesting depth added 36). 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.
  • bevy_settings::apply_settings_to_world (cognitive 27) crates/bevy_settings/src/lib.rs:569 — bevy_settings::apply_settings_to_world has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 2, loops 1 (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.
  • bevy_settings::resources_to_toml (cognitive 19) crates/bevy_settings/src/lib.rs:417 — bevy_settings::resources_to_toml has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (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.
D2 · Cognitive Complexity · WinitAppRunnerState · ×3
  • WinitAppRunnerState::redraw_requested (cognitive 39) crates/bevy_winit/src/state.rs:520 — WinitAppRunnerState::redraw_requested has cognitive complexity 39 (threshold 15). Drivers by points: if/else 20 (32 pts), boolean chains 4, 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.
  • WinitAppRunnerState::reconcile_pending_modifiers (cognitive 24) crates/bevy_winit/src/state.rs:803 — WinitAppRunnerState::reconcile_pending_modifiers has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (7 pts), boolean chains 4 (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.
  • WinitAppRunnerState::window_event (cognitive 22) crates/bevy_winit/src/state.rs:207 — WinitAppRunnerState::window_event has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (15 pts), match/switch 3 (5 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · bevy_reflect · ×3
  • bevy_reflect::enums::helpers::enum_partial_eq (cognitive 28) crates/bevy_reflect/src/enums/helpers.rs:33 — bevy_reflect::enums::helpers::enum_partial_eq has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 2 (4 pts), match/switch 1 (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.
  • bevy_reflect::enums::helpers::enum_partial_cmp (cognitive 17) crates/bevy_reflect/src/enums/helpers.rs:98 — bevy_reflect::enums::helpers::enum_partial_cmp has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 2 (5 pts), loops 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.
  • bevy_reflect::structs::partial_cmp_by_field_names (cognitive 16) crates/bevy_reflect/src/structs.rs:662 — bevy_reflect::structs::partial_cmp_by_field_names has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), match/switch 2 (5 pts), loops 3 (4 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.
D23 · Boundary Type-Coupling · Cross-context type UnsafeWorldCell (bevy_ecs → bevy_asset) · ×3
  • Cross-context type UnsafeWorldCell (bevy_ecs → bevy_asset) crates/bevy_asset/src/asset_changed.rs:167 — UnsafeWorldCell (context bevy_ecs) is exposed in bevy_asset's public surface via AssetChanged.init_fetch — couples the contexts.
  • Cross-context type UnsafeWorldCell (bevy_ecs → bevy_asset) crates/bevy_asset/src/asset_changed.rs:296 — UnsafeWorldCell (context bevy_ecs) is exposed in bevy_asset's public surface via AssetChanged.update_archetypes — couples the contexts.
  • Cross-context type UnsafeWorldCell (bevy_ecs → bevy_asset) crates/bevy_asset/src/reflect.rs:117 — UnsafeWorldCell (context bevy_ecs) is exposed in bevy_asset's public surface via ReflectAsset.get_unchecked_mut — couples the contexts.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×3
  • Duplicated block (23 lines × 2) crates/bevy_feathers/src/controls/button.rs:256 — crates/bevy_feathers/src/controls/button.rs:256-278 | crates/bevy_feathers/src/controls/listview.rs:235-257 — 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 (23 lines × 2) crates/bevy_pbr/src/render/gpu_preprocess.rs:2819 — crates/bevy_pbr/src/render/gpu_preprocess.rs:2819-2841 | crates/bevy_pbr/src/render/gpu_preprocess.rs:2928-2950 — 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 (23 lines × 2) crates/bevy_render/src/erased_render_asset.rs:379 — crates/bevy_render/src/erased_render_asset.rs:379-401 | crates/bevy_render/src/render_asset.rs:400-422 — before extracting anything, compare `crates/bevy_render/src/erased_render_asset.rs` and `crates/bevy_render/src/render_asset.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×3
  • Duplicated block (20 lines × 2) crates/bevy_gizmos/src/primitives/dim2.rs:140 — crates/bevy_gizmos/src/primitives/dim2.rs:140-159 | crates/bevy_gizmos/src/primitives/dim2.rs:183-202 — 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 (20 lines × 2) crates/bevy_pbr/src/wireframe.rs:1038 — crates/bevy_pbr/src/wireframe.rs:1038-1057 | crates/bevy_sprite_render/src/mesh2d/wireframe2d.rs:523-542 — before extracting anything, compare `crates/bevy_pbr/src/wireframe.rs` and `crates/bevy_sprite_render/src/mesh2d/wireframe2d.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 111 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (20 lines × 2) crates/bevy_shape/src/dim2.rs:1523 — crates/bevy_shape/src/dim2.rs:1523-1542 | crates/bevy_shape/src/dim3.rs:582-601 — before extracting anything, compare `crates/bevy_shape/src/dim2.rs` and `crates/bevy_shape/src/dim3.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×3
  • Duplicated block (15–16 lines × 2) crates/bevy_pbr/src/wireframe.rs:1245 — crates/bevy_pbr/src/wireframe.rs:1245-1259 | crates/bevy_pbr/src/wireframe.rs:1282-1297 — 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 (15–16 lines × 2) crates/bevy_reflect/src/array.rs:501 — crates/bevy_reflect/src/array.rs:501-516 | crates/bevy_reflect/src/list.rs:525-539 — before extracting anything, compare `crates/bevy_reflect/src/array.rs` and `crates/bevy_reflect/src/list.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (15–16 lines × 2) crates/bevy_sprite_render/src/text2d/mod.rs:167 — crates/bevy_sprite_render/src/text2d/mod.rs:167-181 | crates/bevy_sprite_render/src/text2d/mod.rs:275-290 — 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.
D4 · Code Duplication · Duplicated block (15 lines × 4) · ×3
  • Duplicated block (15 lines × 4) crates/bevy_pbr/src/render/gpu_preprocess.rs:2514 — crates/bevy_pbr/src/render/gpu_preprocess.rs:2514-2528 | crates/bevy_pbr/src/render/gpu_preprocess.rs:2637-2651 | crates/bevy_pbr/src/render/gpu_preprocess.rs:2755-2769 | crates/bevy_pbr/src/render/gpu_preprocess.rs:2864-2878 — 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.
  • Duplicated block (15 lines × 4) crates/bevy_ui_render/src/box_shadow.rs:165 — crates/bevy_ui_render/src/box_shadow.rs:165-179 | crates/bevy_ui_render/src/gradient.rs:205-219 | crates/bevy_ui_render/src/pipeline.rs:89-103 | crates/bevy_ui_render/src/ui_texture_slice_pipeline.rs:172-186 — before extracting anything, compare `crates/bevy_ui_render/src/box_shadow.rs` and `crates/bevy_ui_render/src/gradient.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 4) crates/bevy_pbr/src/render/mesh_bindings.rs:568 — crates/bevy_pbr/src/render/mesh_bindings.rs:568-582 | crates/bevy_pbr/src/render/mesh_bindings.rs:606-621 | crates/bevy_pbr/src/render/mesh_bindings.rs:639-654 | crates/bevy_pbr/src/render/mesh_bindings.rs:680-697 — 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.
D4 · Code Duplication · Duplicated block (9–11 lines × 2) · ×3
  • Duplicated block (9–11 lines × 2) crates/bevy_image/src/image.rs:1444 — crates/bevy_image/src/image.rs:1444-1452 | crates/bevy_image/src/image.rs:1484-1494 — 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–11 lines × 2) crates/bevy_pbr/src/prepass/mod.rs:574 — crates/bevy_pbr/src/prepass/mod.rs:574-582 | crates/bevy_pbr/src/render/mesh.rs:3590-3600 — before extracting anything, compare `crates/bevy_pbr/src/prepass/mod.rs` and `crates/bevy_pbr/src/render/mesh.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9–11 lines × 2) crates/bevy_state/macros/src/states.rs:17 — crates/bevy_state/macros/src/states.rs:17-25 | crates/bevy_state/macros/src/states.rs:103-113 — 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.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×3
  • Duplicated block (10 lines × 3) crates/bevy_ui_render/src/box_shadow.rs:420 — crates/bevy_ui_render/src/box_shadow.rs:420-429 | crates/bevy_ui_render/src/gradient.rs:722-731 | crates/bevy_ui_render/src/lib.rs:2223-2232 — before extracting anything, compare `crates/bevy_ui_render/src/box_shadow.rs` and `crates/bevy_ui_render/src/gradient.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 3) crates/bevy_ecs/src/entity/index_map.rs:523 — crates/bevy_ecs/src/entity/index_map.rs:523-532 | crates/bevy_ecs/src/entity/index_set.rs:769-778 | crates/bevy_ecs/src/entity/unique_slice.rs:489-498 — 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 all 3 call sites, so a change lands once.
  • Duplicated block (10 lines × 3) crates/bevy_pbr/src/atmosphere/resources.rs:679 — crates/bevy_pbr/src/atmosphere/resources.rs:679-688 | crates/bevy_pbr/src/atmosphere/resources.rs:698-707 | crates/bevy_pbr/src/atmosphere/resources.rs:721-730 — 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.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×3
  • Duplicated block (7 lines × 4) crates/bevy_render/src/render_resource/storage_buffer.rs:140 — crates/bevy_render/src/render_resource/storage_buffer.rs:140-146 | crates/bevy_render/src/render_resource/storage_buffer.rs:265-271 | crates/bevy_render/src/render_resource/uniform_buffer.rs:135-141 | crates/bevy_render/src/render_resource/uniform_buffer.rs:334-340 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (7 lines × 4) crates/bevy_ui_render/src/box_shadow.rs:99 — crates/bevy_ui_render/src/box_shadow.rs:99-105 | crates/bevy_ui_render/src/gradient.rs:87-93 | crates/bevy_ui_render/src/lib.rs:2164-2170 | crates/bevy_ui_render/src/ui_texture_slice_pipeline.rs:92-98 — before extracting anything, compare `crates/bevy_ui_render/src/box_shadow.rs` and `crates/bevy_ui_render/src/gradient.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 4) crates/bevy_ui_render/src/box_shadow.rs:596 — crates/bevy_ui_render/src/box_shadow.rs:596-602 | crates/bevy_ui_render/src/gradient.rs:1020-1026 | crates/bevy_ui_render/src/render_pass.rs:176-182 | crates/bevy_ui_render/src/ui_texture_slice_pipeline.rs:711-717 — before extracting anything, compare `crates/bevy_ui_render/src/box_shadow.rs` and `crates/bevy_ui_render/src/gradient.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×3
  • Duplicated block (5 lines × 3) crates/bevy_curve/src/cubic_splines/mod.rs:1350 — crates/bevy_curve/src/cubic_splines/mod.rs:1350-1354 | crates/bevy_curve/src/cubic_splines/mod.rs:1365-1369 | crates/bevy_curve/src/cubic_splines/mod.rs:1393-1397 — 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.
  • Duplicated block (5 lines × 3) crates/bevy_pbr/src/render/light.rs:520 — crates/bevy_pbr/src/render/light.rs:520-525 | crates/bevy_pbr/src/render/light.rs:650-654 | crates/bevy_pbr/src/render/light.rs:825-830 — 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.
  • Duplicated block (5 lines × 3) crates/bevy_shape/src/bounding/bounded3d/extrusion.rs:96 — crates/bevy_shape/src/bounding/bounded3d/extrusion.rs:96-100 | crates/bevy_shape/src/bounding/bounded3d/extrusion.rs:106-110 | crates/bevy_shape/src/bounding/bounded3d/extrusion.rs:126-130 — 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.
D1 · Cyclomatic Complexity · bevy_gizmos · ×2
  • bevy_gizmos::transform_gizmo::transform_gizmo_drag (cyclomatic 46) crates/bevy_gizmos/src/transform_gizmo.rs:408 — bevy_gizmos::transform_gizmo::transform_gizmo_drag has cyclomatic complexity 46 (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.
  • bevy_gizmos::transform_gizmo::transform_gizmo_hover (cyclomatic 19) crates/bevy_gizmos/src/transform_gizmo.rs:288 — bevy_gizmos::transform_gizmo::transform_gizmo_hover 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.
D1 · Cyclomatic Complexity · WinitAppRunnerState · ×2
  • WinitAppRunnerState::window_event (cyclomatic 41) crates/bevy_winit/src/state.rs:207 — WinitAppRunnerState::window_event has cyclomatic complexity 41 (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.
  • WinitAppRunnerState::redraw_requested (cyclomatic 24) crates/bevy_winit/src/state.rs:520 — WinitAppRunnerState::redraw_requested 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.
D1 · Cyclomatic Complexity · bevy_camera_controller · ×2
  • bevy_camera_controller::free_camera::run_freecamera_controller (cyclomatic 39) crates/bevy_camera_controller/src/free_camera.rs:264 — bevy_camera_controller::free_camera::run_freecamera_controller has cyclomatic complexity 39 (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.
  • bevy_camera_controller::pan_camera::run_pancamera_controller (cyclomatic 21) crates/bevy_camera_controller/src/pan_camera.rs:218 — bevy_camera_controller::pan_camera::run_pancamera_controller 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.
D1 · Cyclomatic Complexity · bevy_asset · ×2
  • bevy_asset::io::file::file_watcher::new_asset_event_debouncer (cyclomatic 33) crates/bevy_asset/src/io/file/file_watcher.rs:82 — bevy_asset::io::file::file_watcher::new_asset_event_debouncer 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.
  • bevy_asset::server::handle_internal_asset_events (cyclomatic 24) crates/bevy_asset/src/server/mod.rs:1890 — bevy_asset::server::handle_internal_asset_events has cyclomatic complexity 24 (threshold 15). Of this number, 22 points are the body's own statements and 2 belong to one function item inside it that branches. 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.
D1 · Cyclomatic Complexity · DeriveComponent · ×2
  • DeriveComponent::parse (cyclomatic 26) crates/bevy_ecs/macro_logic/src/component.rs:60 — DeriveComponent::parse has cyclomatic complexity 26 (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.
  • DeriveComponent::impl_component (cyclomatic 19) crates/bevy_ecs/macro_logic/src/component.rs:182 — DeriveComponent::impl_component has cyclomatic complexity 19 (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.
D1 · Cyclomatic Complexity · bevy_sprite · ×2
  • bevy_sprite::picking_backend::sprite_picking (cyclomatic 21) crates/bevy_sprite/src/picking_backend.rs:92 — bevy_sprite::picking_backend::sprite_picking has cyclomatic complexity 21 (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.
  • bevy_sprite::text2d::update_text2d_layout (cyclomatic 16) crates/bevy_sprite/src/text2d.rs:167 — bevy_sprite::text2d::update_text2d_layout 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.
D1 · Cyclomatic Complexity · ScheduleGraph · ×2
  • ScheduleGraph::process_configs (cyclomatic 18) crates/bevy_ecs/src/schedule/schedule.rs:908 — ScheduleGraph::process_configs 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.
  • ScheduleGraph::build_schedule (cyclomatic 16) crates/bevy_ecs/src/schedule/schedule.rs:1276 — ScheduleGraph::build_schedule has cyclomatic complexity 16 (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.
D1 · Cyclomatic Complexity · bevy_scene · ×2
  • bevy_scene::spawn::spawn_queued (cyclomatic 18) crates/bevy_scene/src/spawn.rs:690 — bevy_scene::spawn::spawn_queued 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.
  • bevy_scene::spawn::resolve_scene_patches (cyclomatic 17) crates/bevy_scene/src/spawn.rs:589 — bevy_scene::spawn::resolve_scene_patches 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.
D2 · Cognitive Complexity · bevy_render_macros · ×2
  • bevy_render_macros::as_bind_group::derive_as_bind_group (cognitive 139) crates/bevy_render/macros/src/as_bind_group.rs:63 — bevy_render_macros::as_bind_group::derive_as_bind_group has cognitive complexity 139 (threshold 15). Drivers by points: if/else 35 (95 pts), match/switch 15 (34 pts), loops 6 (8 pts), boolean chains 2 (nesting depth added 81). 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.
  • bevy_render_macros::specializer::get_field_info (cognitive 17) crates/bevy_render/macros/src/specializer.rs:123 — bevy_render_macros::specializer::get_field_info has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (3 pts), match/switch 1 (3 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.
D2 · Cognitive Complexity · bevy_gizmos · ×2
  • bevy_gizmos::transform_gizmo::transform_gizmo_drag (cognitive 109) crates/bevy_gizmos/src/transform_gizmo.rs:408 — bevy_gizmos::transform_gizmo::transform_gizmo_drag has cognitive complexity 109 (threshold 15). Drivers by points: if/else 33 (82 pts), match/switch 9 (23 pts), boolean chains 4 (nesting depth added 63). 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.
  • bevy_gizmos::transform_gizmo::transform_gizmo_hover (cognitive 31) crates/bevy_gizmos/src/transform_gizmo.rs:288 — bevy_gizmos::transform_gizmo::transform_gizmo_hover has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16 (25 pts), match/switch 2 (3 pts), boolean chains 2, loops 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.
D2 · Cognitive Complexity · bevy_winit · ×2
  • bevy_winit::system::changed_windows (cognitive 103) crates/bevy_winit/src/system.rs:316 — bevy_winit::system::changed_windows has cognitive complexity 103 (threshold 15). Drivers by points: if/else 43 (83 pts), boolean chains 10, match/switch 3 (9 pts), loops 1 (nesting depth added 46). 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.
  • bevy_winit::cursor::update_cursors (cognitive 32) crates/bevy_winit/src/cursor/mod.rs:111 — bevy_winit::cursor::update_cursors has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (23 pts), match/switch 2 (6 pts), boolean chains 2, loops 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.
D2 · Cognitive Complexity · bevy_asset · ×2
  • bevy_asset::io::file::file_watcher::new_asset_event_debouncer (cognitive 86) crates/bevy_asset/src/io/file/file_watcher.rs:82 — bevy_asset::io::file::file_watcher::new_asset_event_debouncer has cognitive complexity 86 (threshold 15). Drivers by points: if/else 24 (75 pts), match/switch 3 (9 pts), loops 1 (2 pts) (nesting depth added 58). 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.
  • bevy_asset::server::handle_internal_asset_events (cognitive 38) crates/bevy_asset/src/server/mod.rs:1890 — bevy_asset::server::handle_internal_asset_events has cognitive complexity 38 (threshold 15). Drivers by points: loops 10 (21 pts), if/else 6 (12 pts), match/switch 3 (5 pts) (nesting depth added 19). Of this number, 35 points are the body's own statements and 3 belong to one function item inside it that branches. 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.
D2 · Cognitive Complexity · bevy_dev_tools · ×2
  • bevy_dev_tools::render_debug::update_overlay (cognitive 70) crates/bevy_dev_tools/src/render_debug.rs:170 — bevy_dev_tools::render_debug::update_overlay has cognitive complexity 70 (threshold 15). Drivers by points: if/else 17 (48 pts), loops 4 (11 pts), boolean chains 6, 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.
  • bevy_dev_tools::infinite_grid::queue_infinite_grids (cognitive 26) crates/bevy_dev_tools/src/infinite_grid.rs:368 — bevy_dev_tools::infinite_grid::queue_infinite_grids has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 3 (5 pts), boolean chains 1 (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.
D2 · Cognitive Complexity · bevy_transform · ×2
  • bevy_transform::systems::mark_dirty_trees (cognitive 66) crates/bevy_transform/src/systems.rs:111 — bevy_transform::systems::mark_dirty_trees has cognitive complexity 66 (threshold 15). Drivers by points: if/else 13 (39 pts), loops 11 (19 pts), match/switch 1 (5 pts), boolean chains 3 (nesting depth added 38). 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.
  • bevy_transform::systems::parallel::propagation_worker (cognitive 17) crates/bevy_transform/src/systems.rs:585 — bevy_transform::systems::parallel::propagation_worker has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (5 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.
D2 · Cognitive Complexity · bevy_camera_controller · ×2
  • bevy_camera_controller::free_camera::run_freecamera_controller (cognitive 63) crates/bevy_camera_controller/src/free_camera.rs:264 — bevy_camera_controller::free_camera::run_freecamera_controller has cognitive complexity 63 (threshold 15). Drivers by points: if/else 36 (48 pts), loops 4 (10 pts), boolean chains 3, match/switch 1 (2 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.
  • bevy_camera_controller::pan_camera::run_pancamera_controller (cognitive 28) crates/bevy_camera_controller/src/pan_camera.rs:218 — bevy_camera_controller::pan_camera::run_pancamera_controller has cognitive complexity 28 (threshold 15). Drivers by points: if/else 20 (28 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.
D2 · Cognitive Complexity · BsnEntry · ×2
  • BsnEntry::parse (cognitive 55) crates/bevy_scene/macros/src/bsn/parse.rs:104 — BsnEntry::parse has cognitive complexity 55 (threshold 15). Drivers by points: if/else 25 (52 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 28). 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.
  • BsnEntry::try_to_tokens (cognitive 21) crates/bevy_scene/macros/src/bsn/codegen.rs:277 — BsnEntry::try_to_tokens has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (20 pts), match/switch 1 (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.
D2 · Cognitive Complexity · ScheduleGraph · ×2
  • ScheduleGraph::process_configs (cognitive 51) crates/bevy_ecs/src/schedule/schedule.rs:908 — ScheduleGraph::process_configs has cognitive complexity 51 (threshold 15). Drivers by points: if/else 11 (29 pts), loops 4 (17 pts), boolean chains 4, match/switch 1 (nesting depth added 31). 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.
  • ScheduleGraph::build_schedule (cognitive 20) crates/bevy_ecs/src/schedule/schedule.rs:1276 — ScheduleGraph::build_schedule has cognitive complexity 20 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 5, match/switch 2 (4 pts), boolean chains 2 (nesting depth added 6). 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.
D2 · Cognitive Complexity · bevy_scene · ×2
  • bevy_scene::spawn::spawn_queued (cognitive 43) crates/bevy_scene/src/spawn.rs:690 — bevy_scene::spawn::spawn_queued has cognitive complexity 43 (threshold 15). Drivers by points: if/else 8 (26 pts), loops 6 (14 pts), boolean chains 3 (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.
  • bevy_scene::spawn::resolve_scene_patches (cognitive 29) crates/bevy_scene/src/spawn.rs:589 — bevy_scene::spawn::resolve_scene_patches has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (15 pts), match/switch 3 (8 pts), boolean chains 4, loops 2 (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.
D2 · Cognitive Complexity · DeriveComponent · ×2
  • DeriveComponent::parse (cognitive 39) crates/bevy_ecs/macro_logic/src/component.rs:60 — DeriveComponent::parse has cognitive complexity 39 (threshold 15). Drivers by points: if/else 20 (28 pts), loops 2 (4 pts), match/switch 1 (4 pts), boolean chains 3 (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.
  • DeriveComponent::impl_component (cognitive 27) crates/bevy_ecs/macro_logic/src/component.rs:182 — DeriveComponent::impl_component has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (16 pts), match/switch 3 (5 pts), boolean chains 4, loops 1 (2 pts) (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.
D2 · Cognitive Complexity · bevy_camera · ×2
  • bevy_camera::visibility::check_visibility_cpu_culling (cognitive 38) crates/bevy_camera/src/visibility/mod.rs:748 — bevy_camera::visibility::check_visibility_cpu_culling has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 5 (11 pts), boolean chains 3 (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.
  • bevy_camera::visibility::visibility_propagate_system (cognitive 18) crates/bevy_camera/src/visibility/mod.rs:638 — bevy_camera::visibility::visibility_propagate_system has cognitive complexity 18 (threshold 15). Drivers by points: loops 4 (8 pts), if/else 3 (6 pts), match/switch 2 (4 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.
D2 · Cognitive Complexity · AssetServer · ×2
  • AssetServer::load_internal (cognitive 37) crates/bevy_asset/src/server/mod.rs:540 — AssetServer::load_internal has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (26 pts), match/switch 4 (8 pts), boolean chains 3 (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.
  • AssetServer::load_folder_internal (cognitive 16) crates/bevy_asset/src/server/mod.rs:965 — AssetServer::load_folder_internal has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 4 (8 pts), if/else 4 (6 pts), loops 1 (2 pts) (nesting depth added 7). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to one function item inside it that branches (load_folder). 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.
D2 · Cognitive Complexity · TextPipeline · ×2
  • TextPipeline::update_text_layout_info (cognitive 37) crates/bevy_text/src/pipeline.rs:350 — TextPipeline::update_text_layout_info has cognitive complexity 37 (threshold 15). Drivers by points: if/else 5 (21 pts), match/switch 2 (8 pts), loops 3 (7 pts), boolean chains 1 (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.
  • TextPipeline::update_buffer (cognitive 30) crates/bevy_text/src/pipeline.rs:71 — TextPipeline::update_buffer has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (16 pts), match/switch 5 (10 pts), loops 3, boolean chains 1 (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.
D2 · Cognitive Complexity · StandardMaterial · ×2
  • StandardMaterial::as_bind_group_shader_type (cognitive 32) crates/bevy_pbr/src/pbr_material.rs:1082 — StandardMaterial::as_bind_group_shader_type has cognitive complexity 32 (threshold 15). Drivers by points: if/else 24 (27 pts), match/switch 2 (4 pts), boolean chains 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.
  • StandardMaterial::specialize (cognitive 16) crates/bevy_pbr/src/pbr_material.rs:1474 — StandardMaterial::specialize has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 2, loops 1 (2 pts), match/switch 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.
D2 · Cognitive Complexity · AutoInsertApplyDeferredPass · ×2
  • AutoInsertApplyDeferredPass::collapse_set (cognitive 30) crates/bevy_ecs/src/schedule/auto_insert_apply_deferred.rs:220 — AutoInsertApplyDeferredPass::collapse_set has cognitive complexity 30 (threshold 15). Drivers by points: loops 6 (15 pts), if/else 5 (14 pts), boolean chains 1 (nesting depth added 18). 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.
  • AutoInsertApplyDeferredPass::build (cognitive 26) crates/bevy_ecs/src/schedule/auto_insert_apply_deferred.rs:70 — AutoInsertApplyDeferredPass::build has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 4 (6 pts), boolean chains 5 (nesting depth added 11). Of this number, 24 points are the body's own statements and 2 belong to 2 function items inside it that branch. 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.
D2 · Cognitive Complexity · DagGroups · ×2
  • DagGroups::flatten_undirected (cognitive 28) crates/bevy_ecs/src/schedule/graph/dag.rs:629 — DagGroups::flatten_undirected has cognitive complexity 28 (threshold 15). Drivers by points: loops 5 (14 pts), if/else 4 (12 pts), match/switch 1 (2 pts) (nesting depth added 18). 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.
  • DagGroups::flatten (cognitive 27) crates/bevy_ecs/src/schedule/graph/dag.rs:572 — DagGroups::flatten has cognitive complexity 27 (threshold 15). Drivers by points: loops 8 (24 pts), if/else 2 (3 pts) (nesting depth added 17). 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.
D2 · Cognitive Complexity · TextWriter · ×2
  • TextWriter::get (cognitive 27) crates/bevy_text/src/text_access.rs:247 — TextWriter::get has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 2 (3 pts), boolean chains 1 (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.
  • TextWriter::for_each_until (cognitive 23) crates/bevy_text/src/text_access.rs:478 — TextWriter::for_each_until has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (20 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.
D2 · Cognitive Complexity · bevy_sprite · ×2
  • bevy_sprite::text2d::update_text2d_layout (cognitive 23) crates/bevy_sprite/src/text2d.rs:167 — bevy_sprite::text2d::update_text2d_layout has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 2 (5 pts), boolean chains 4, 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.
  • bevy_sprite::picking_backend::sprite_picking (cognitive 22) crates/bevy_sprite/src/picking_backend.rs:92 — bevy_sprite::picking_backend::sprite_picking has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 5, match/switch 2 (3 pts) (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.
D2 · Cognitive Complexity · BundleInfo · ×2
  • BundleInfo::insert_bundle_into_archetype (cognitive 21) crates/bevy_ecs/src/bundle/insert.rs:546 — BundleInfo::insert_bundle_into_archetype has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), match/switch 2 (4 pts), loops 2, boolean chains 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.
  • BundleInfo::remove_bundle_from_archetype (cognitive 19) crates/bevy_ecs/src/bundle/remove.rs:381 — BundleInfo::remove_bundle_from_archetype has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), match/switch 1 (4 pts), loops 1 (2 pts) (nesting depth added 7). 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.
D2 · Cognitive Complexity · MaterialBindlessSlab · ×2
  • MaterialBindlessSlab::check_allocation (cognitive 21) crates/bevy_render/src/material_bind_groups.rs:1173 — MaterialBindlessSlab::check_allocation has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 5 (14 pts), if/else 2 (6 pts), loops 1 (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.
  • MaterialBindlessSlab::create_buffer_binding_resource_arrays (cognitive 17) crates/bevy_render/src/material_bind_groups.rs:1946 — MaterialBindlessSlab::create_buffer_binding_resource_arrays has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 2 (6 pts), loops 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.
D2 · Cognitive Complexity · bevy_inspector · ×2
  • bevy_inspector::column_split::update_column_splits (cognitive 19) crates/bevy_inspector/src/column_split.rs:193 — bevy_inspector::column_split::update_column_splits has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, loops 4 (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.
  • bevy_inspector::entity_tree::diff_container (cognitive 17) crates/bevy_inspector/src/entity_tree.rs:291 — bevy_inspector::entity_tree::diff_container has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (4 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.
D23 · Boundary Type-Coupling · Cross-context type TableId (bevy_ecs → bevy_asset) · ×2
  • Cross-context type TableId (bevy_ecs → bevy_asset) crates/bevy_asset/src/asset_changed.rs:213 — TableId (context bevy_ecs) is exposed in bevy_asset's public surface via AssetChanged.set_archetype — couples the contexts.
  • Cross-context type TableId (bevy_ecs → bevy_asset) crates/bevy_asset/src/asset_changed.rs:236 — TableId (context bevy_ecs) is exposed in bevy_asset's public surface via AssetChanged.set_table — couples the contexts.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D35 · Change Coupling · Change coupling clique · ×2
  • Change coupling clique: directional_light.rs, point_light.rs, spot_light.rs crates/bevy_light/src/directional_light.rs — 3 files — `crates/bevy_light/src/directional_light.rs`, `crates/bevy_light/src/point_light.rs`, `crates/bevy_light/src/spot_light.rs` — all change together with no explicit dependency: a fully-connected co-change clique, not 3 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
  • Change coupling clique: node.rs, node.rs, node.rs crates/bevy_anti_alias/src/fxaa/node.rs — 3 files — `crates/bevy_anti_alias/src/fxaa/node.rs`, `crates/bevy_core_pipeline/src/tonemapping/node.rs`, `crates/bevy_core_pipeline/src/upscaling/node.rs` — all change together with no explicit dependency: a fully-connected co-change clique, not 3 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (5 members, 50+ identical tokens) crates/bevy_reflect/src/std_traits.rs:311 — crates/bevy_reflect/src/std_traits.rs:311-325 | crates/bevy_reflect/src/std_traits.rs:357-371 | crates/bevy_reflect/src/std_traits.rs:403-417 | crates/bevy_reflect/src/std_traits.rs:449-463 | crates/bevy_reflect/src/std_traits.rs:495-509 — These 5 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 5 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 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) crates/bevy_sprite_render/src/render/mod.rs:189 — crates/bevy_sprite_render/src/render/mod.rs:189-322 | crates/bevy_ui_render/src/box_shadow.rs:139-184 | crates/bevy_ui_render/src/gradient.rs:147-224 | crates/bevy_ui_render/src/pipeline.rs:57-108 | crates/bevy_ui_render/src/ui_texture_slice_pipeline.rs:148-191 — These 5 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 5 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 5 times.
D4 · Code Duplication · Duplicated block (38 lines × 2) · ×2
  • Duplicated block (38 lines × 2) crates/bevy_ecs/src/query/iter.rs:1385 — crates/bevy_ecs/src/query/iter.rs:1385-1422 | crates/bevy_ecs/src/query/iter.rs:2660-2697 — 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 (38 lines × 2) crates/bevy_pbr/src/deferred/mod.rs:214 — crates/bevy_pbr/src/deferred/mod.rs:214-251 | crates/bevy_pbr/src/render/mesh.rs:3625-3662 — before extracting anything, compare `crates/bevy_pbr/src/deferred/mod.rs` and `crates/bevy_pbr/src/render/mesh.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (31 lines × 2) · ×2
  • Duplicated block (31 lines × 2) crates/bevy_pbr/src/render/light.rs:457 — crates/bevy_pbr/src/render/light.rs:457-487 | crates/bevy_pbr/src/render/light.rs:589-619 — 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 (31 lines × 2) crates/bevy_ui_widgets/src/list.rs:129 — crates/bevy_ui_widgets/src/list.rs:129-159 | crates/bevy_ui_widgets/src/radio.rs:106-136 — 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 · Duplicated block (29 lines × 2) · ×2
  • Duplicated block (29 lines × 2) crates/bevy_light/src/lib.rs:581 — crates/bevy_light/src/lib.rs:581-609 | crates/bevy_light/src/lib.rs:672-700 — 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 (29 lines × 2) REDACTED:669 — REDACTED:669-697 | REDACTED:892-920 — 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.
D4 · Code Duplication · Duplicated block (21–22 lines × 2) · ×2
  • Duplicated block (21–22 lines × 2) crates/bevy_feathers/src/controls/listview.rs:223 — crates/bevy_feathers/src/controls/listview.rs:223-244 | crates/bevy_feathers/src/controls/tree_view.rs:316-336 — 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 (21–22 lines × 2) crates/bevy_settings/src/store_fs.rs:116 — crates/bevy_settings/src/store_fs.rs:116-137 | crates/bevy_settings/src/store_wasm.rs:69-89 — 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 · Duplicated block (22 lines × 2) · ×2
  • Duplicated block (22 lines × 2) crates/bevy_feathers/src/controls/number_input.rs:1405 — crates/bevy_feathers/src/controls/number_input.rs:1405-1426 | crates/bevy_feathers/src/controls/number_input.rs:1444-1465 — 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 (22 lines × 2) crates/bevy_pbr/src/render/gpu_preprocess.rs:927 — crates/bevy_pbr/src/render/gpu_preprocess.rs:927-948 | crates/bevy_pbr/src/render/gpu_preprocess.rs:951-972 — 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.
D4 · Code Duplication · Duplicated block (18–19 lines × 3) · ×2
  • Duplicated block (18–19 lines × 3) crates/bevy_pbr/src/material.rs:1039 — crates/bevy_pbr/src/material.rs:1039-1056 | crates/bevy_pbr/src/prepass/mod.rs:1076-1094 | crates/bevy_pbr/src/render/light.rs:2479-2497 — before extracting anything, compare `crates/bevy_pbr/src/material.rs` and `crates/bevy_pbr/src/prepass/mod.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (18–19 lines × 3) crates/bevy_render/src/render_resource/pipeline_cache.rs:541 — crates/bevy_render/src/render_resource/pipeline_cache.rs:541-559 | crates/bevy_render/src/render_resource/pipeline_cache.rs:663-680 | crates/bevy_render/src/render_resource/pipeline_cache.rs:725-743 — 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.
D4 · Code Duplication · Duplicated block (16–17 lines × 3) · ×2
  • Duplicated block (16–17 lines × 3) crates/bevy_ecs/src/bundle/insert.rs:225 — crates/bevy_ecs/src/bundle/insert.rs:225-240 | crates/bevy_ecs/src/bundle/insert.rs:266-281 | crates/bevy_ecs/src/bundle/insert.rs:308-324 — 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.
  • Duplicated block (16–17 lines × 3) crates/bevy_pbr/src/meshlet/material_shade_nodes.rs:96 — crates/bevy_pbr/src/meshlet/material_shade_nodes.rs:96-111 | crates/bevy_pbr/src/meshlet/material_shade_nodes.rs:213-229 | crates/bevy_pbr/src/meshlet/material_shade_nodes.rs:335-351 — 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.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×2
  • Duplicated block (14 lines × 3) crates/bevy_core_pipeline/src/skybox/mod.rs:160 — crates/bevy_core_pipeline/src/skybox/mod.rs:160-173 | crates/bevy_pbr/src/prepass/mod.rs:685-698 | crates/bevy_sprite_render/src/render/mod.rs:301-314 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times.
  • Duplicated block (14 lines × 3) crates/bevy_core_pipeline/src/tonemapping/mod.rs:282 — crates/bevy_core_pipeline/src/tonemapping/mod.rs:282-295 | crates/bevy_pbr/src/ssr/mod.rs:526-539 | crates/bevy_post_process/src/motion_blur/pipeline.rs:141-154 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times.
D4 · Code Duplication · Duplicated block (13 lines × 6) · ×2
  • Duplicated block (13 lines × 6) crates/bevy_ui_render/src/lib.rs:858 — crates/bevy_ui_render/src/lib.rs:858-870 | crates/bevy_ui_render/src/lib.rs:1573-1585 | crates/bevy_ui_render/src/lib.rs:1668-1680 | crates/bevy_ui_render/src/lib.rs:1809-1821 | crates/bevy_ui_render/src/lib.rs:1990-2002 | crates/bevy_ui_render/src/text.rs:73-85 — before extracting anything, compare `crates/bevy_ui_render/src/lib.rs` and `crates/bevy_ui_render/src/text.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 6) crates/bevy_ui_render/src/lib.rs:1565 — crates/bevy_ui_render/src/lib.rs:1565-1577 | crates/bevy_ui_render/src/lib.rs:1660-1672 | crates/bevy_ui_render/src/lib.rs:1801-1813 | crates/bevy_ui_render/src/lib.rs:1982-1994 | crates/bevy_ui_render/src/text.rs:65-77 | crates/bevy_ui_render/src/text.rs:253-267 — before extracting anything, compare `crates/bevy_ui_render/src/lib.rs` and `crates/bevy_ui_render/src/text.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×2
  • Duplicated block (13 lines × 3) crates/bevy_pbr/src/ssao/mod.rs:550 — crates/bevy_pbr/src/ssao/mod.rs:550-562 | crates/bevy_pbr/src/ssao/mod.rs:564-576 | crates/bevy_pbr/src/ssao/mod.rs:578-590 — 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.
  • Duplicated block (13 lines × 3) tools/example-showcase/src/main.rs:418 — tools/example-showcase/src/main.rs:418-430 | tools/example-showcase/src/main.rs:433-445 | tools/example-showcase/src/main.rs:449-461 — 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.
D4 · Code Duplication · Duplicated block (11 lines × 5) · ×2
  • Duplicated block (11 lines × 5) crates/bevy_reflect/src/std_traits.rs:64 — crates/bevy_reflect/src/std_traits.rs:64-74 | crates/bevy_reflect/src/std_traits.rs:114-124 | crates/bevy_reflect/src/std_traits.rs:164-174 | crates/bevy_reflect/src/std_traits.rs:214-224 | crates/bevy_reflect/src/std_traits.rs:265-275 — all 5 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.
  • Duplicated block (11 lines × 5) crates/bevy_sprite_render/src/render/mod.rs:277 — crates/bevy_sprite_render/src/render/mod.rs:277-287 | crates/bevy_ui_render/src/box_shadow.rs:163-173 | crates/bevy_ui_render/src/gradient.rs:203-213 | crates/bevy_ui_render/src/pipeline.rs:87-97 | crates/bevy_ui_render/src/ui_texture_slice_pipeline.rs:170-180 — before extracting anything, compare `crates/bevy_ui_render/src/box_shadow.rs` and `crates/bevy_ui_render/src/gradient.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8–10 lines × 3) · ×2
  • Duplicated block (8–10 lines × 3) crates/bevy_anti_alias/src/smaa/mod.rs:961 — crates/bevy_anti_alias/src/smaa/mod.rs:961-968 | crates/bevy_anti_alias/src/smaa/mod.rs:1012-1021 | crates/bevy_anti_alias/src/smaa/mod.rs:1060-1069 — 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.
  • Duplicated block (8–10 lines × 3) crates/bevy_state/src/state_scoped.rs:92 — crates/bevy_state/src/state_scoped.rs:92-99 | crates/bevy_state/src/state_scoped.rs:325-334 | crates/bevy_state/src/state_scoped.rs:566-575 — 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.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×2
  • Duplicated block (9 lines × 4) crates/bevy_asset/src/transformer.rs:120 — crates/bevy_asset/src/transformer.rs:120-128 | crates/bevy_asset/src/transformer.rs:150-158 | crates/bevy_asset/src/transformer.rs:291-299 | crates/bevy_asset/src/transformer.rs:321-329 — 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.
  • Duplicated block (9 lines × 4) crates/bevy_solari/src/realtime/prepare.rs:260 — crates/bevy_solari/src/realtime/prepare.rs:260-268 | crates/bevy_solari/src/realtime/prepare.rs:272-281 | crates/bevy_solari/src/realtime/prepare.rs:285-294 | crates/bevy_solari/src/realtime/prepare.rs:298-306 — 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.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×2
  • Duplicated block (8–9 lines × 2) crates/bevy_render/src/texture/texture_attachment.rs:49 — crates/bevy_render/src/texture/texture_attachment.rs:49-56 | crates/bevy_render/src/texture/texture_attachment.rs:73-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.
  • Duplicated block (8–9 lines × 2) crates/bevy_ui_render/src/debug_overlay.rs:191 — crates/bevy_ui_render/src/debug_overlay.rs:191-199 | crates/bevy_ui_render/src/lib.rs:855-862 — 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.
C2 · Access Controls · No authorization · ×1
  • No authorization crates/bevy_remote/src/http.rs:295 — This repository serves requests — a server (.serve_connection) (crates/bevy_remote/src/http.rs:295) — and no route guard, auth-gate middleware, global guard or imperative check that refuses a caller (401/403, an Unauthorized/Forbidden error) was found: its endpoints may be unprotected.
D1 · Cyclomatic Complexity · GltfLoader · ×1
  • GltfLoader::load_gltf (cyclomatic 97) crates/bevy_gltf/src/loader/mod.rs:302 — GltfLoader::load_gltf has cyclomatic complexity 97 (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.
D1 · Cyclomatic Complexity · MeshPipeline · ×1
  • MeshPipeline::specialize (cyclomatic 72) crates/bevy_pbr/src/render/mesh.rs:3389 — MeshPipeline::specialize has cyclomatic complexity 72 (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.
D1 · Cyclomatic Complexity · bevy_render_macros · ×1
  • bevy_render_macros::as_bind_group::derive_as_bind_group (cyclomatic 65) crates/bevy_render/macros/src/as_bind_group.rs:63 — bevy_render_macros::as_bind_group::derive_as_bind_group has cyclomatic complexity 65 (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.
D1 · Cyclomatic Complexity · bevy_winit · ×1
  • bevy_winit::system::changed_windows (cyclomatic 57) crates/bevy_winit/src/system.rs:316 — bevy_winit::system::changed_windows has cyclomatic complexity 57 (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.
D1 · Cyclomatic Complexity · TextEdit · ×1
  • TextEdit::apply (cyclomatic 54) crates/bevy_text/src/text_edit.rs:276 — TextEdit::apply has cyclomatic complexity 54 (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.
D1 · Cyclomatic Complexity · PrepassPipeline · ×1
  • PrepassPipeline::specialize (cyclomatic 47) crates/bevy_pbr/src/prepass/mod.rs:405 — PrepassPipeline::specialize has cyclomatic complexity 47 (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.
D1 · Cyclomatic Complexity · bevy_picking · ×1
  • bevy_picking::events::pointer_events (cyclomatic 39) crates/bevy_picking/src/events.rs:816 — bevy_picking::events::pointer_events has cyclomatic complexity 39 (threshold 15). 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.
D1 · Cyclomatic Complexity · DeferredLightingLayout · ×1
  • DeferredLightingLayout::specialize (cyclomatic 33) crates/bevy_pbr/src/deferred/mod.rs:205 — DeferredLightingLayout::specialize has cyclomatic complexity 33 (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.
D1 · Cyclomatic Complexity · StandardMaterial · ×1
  • StandardMaterial::as_bind_group_shader_type (cyclomatic 32) crates/bevy_pbr/src/pbr_material.rs:1082 — StandardMaterial::as_bind_group_shader_type has cyclomatic complexity 32 (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.
D1 · Cyclomatic Complexity · PanOrbitCamera · ×1
  • PanOrbitCamera::update_transform_and_projection (cyclomatic 31) crates/bevy_camera_controller/src/pan_orbit_camera/controller/component.rs:362 — PanOrbitCamera::update_transform_and_projection 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.
D1 · Cyclomatic Complexity · Stepping · ×1
  • Stepping::next_frame (cyclomatic 31) crates/bevy_ecs/src/schedule/stepping.rs:435 — Stepping::next_frame has cyclomatic complexity 31 (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.
D1 · Cyclomatic Complexity · bevy_window · ×1
  • bevy_window::system::send_typed_window_events (cyclomatic 31) crates/bevy_window/src/system.rs:20 — bevy_window::system::send_typed_window_events has cyclomatic complexity 31 (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.
D1 · Cyclomatic Complexity · AssetInfos · ×1
  • AssetInfos::process_asset_load (cyclomatic 30) crates/bevy_asset/src/server/info.rs:445 — AssetInfos::process_asset_load 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.
D1 · Cyclomatic Complexity · bevy_audio · ×1
  • bevy_audio::audio_output::play_queued_audio_system (cyclomatic 29) crates/bevy_audio/src/audio_output.rs:84 — bevy_audio::audio_output::play_queued_audio_system 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.
D1 · Cyclomatic Complexity · bevy_dev_tools · ×1
  • bevy_dev_tools::render_debug::update_overlay (cyclomatic 28) crates/bevy_dev_tools/src/render_debug.rs:170 — bevy_dev_tools::render_debug::update_overlay 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.
D1 · Cyclomatic Complexity · bevy_animation · ×1
  • bevy_animation::animate_targets (cyclomatic 27) crates/bevy_animation/src/lib.rs:1098 — bevy_animation::animate_targets 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.
D1 · Cyclomatic Complexity · bevy_settings · ×1
  • bevy_settings::load_properties (cyclomatic 26) crates/bevy_settings/src/lib.rs:641 — bevy_settings::load_properties has cyclomatic complexity 26 (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.
D1 · Cyclomatic Complexity · bevy_transform · ×1
  • bevy_transform::systems::mark_dirty_trees (cyclomatic 26) crates/bevy_transform/src/systems.rs:111 — bevy_transform::systems::mark_dirty_trees has cyclomatic complexity 26 (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.
D1 · Cyclomatic Complexity · ScheduleState · ×1
  • ScheduleState::skipped_systems (cyclomatic 25) crates/bevy_ecs/src/schedule/stepping.rs:799 — ScheduleState::skipped_systems 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.
D1 · Cyclomatic Complexity · World · ×1
  • World::unregister_observer (cyclomatic 25) crates/bevy_ecs/src/observer/mod.rs:392 — World::unregister_observer 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.
D1 · Cyclomatic Complexity · ExtrusionBuilder · ×1
  • ExtrusionBuilder::build (cyclomatic 25) crates/bevy_mesh/src/primitives/extrusion.rs:178 — ExtrusionBuilder::build has cyclomatic complexity 25 (threshold 15). 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.
D1 · Cyclomatic Complexity · Mesh2dPipeline · ×1
  • Mesh2dPipeline::specialize (cyclomatic 25) crates/bevy_sprite_render/src/mesh2d/mesh.rs:720 — Mesh2dPipeline::specialize has cyclomatic complexity 25 (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.
D1 · Cyclomatic Complexity · SpriteMeshMaterial · ×1
  • SpriteMeshMaterial::as_bind_group_shader_type (cyclomatic 24) REDACTED:99 — SpriteMeshMaterial::as_bind_group_shader_type 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.
D1 · Cyclomatic Complexity · FontSource · ×1
  • FontSource::resolve_font_family (cyclomatic 24) crates/bevy_text/src/text.rs:446 — FontSource::resolve_font_family 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.
D1 · Cyclomatic Complexity · App · ×1
  • App::run (cyclomatic 24) tools/export-content/src/app.rs:80 — App::run 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.
D1 · Cyclomatic Complexity · ShaderCache · ×1
  • ShaderCache::get (cyclomatic 23) crates/bevy_shader/src/shader_cache.rs:178 — ShaderCache::get 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.
D1 · Cyclomatic Complexity · BsnValue · ×1
  • BsnValue::parse (cyclomatic 22) crates/bevy_scene/macros/src/bsn/parse.rs:608 — BsnValue::parse has cyclomatic complexity 22 (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.
D1 · Cyclomatic Complexity · AssetServer · ×1
  • AssetServer::load_internal (cyclomatic 21) crates/bevy_asset/src/server/mod.rs:540 — AssetServer::load_internal 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.
D1 · Cyclomatic Complexity · Walk · ×1
  • Walk::children (cyclomatic 20) crates/bevy_inspector/src/details_panel.rs:1932 — Walk::children has cyclomatic complexity 20 (threshold 15). 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.
D1 · Cyclomatic Complexity · TypedReflectDeserializer · ×1
  • TypedReflectDeserializer::deserialize (cyclomatic 20) crates/bevy_reflect/src/serde/de/deserializer.rs:357 — TypedReflectDeserializer::deserialize 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.
D1 · Cyclomatic Complexity · BsnEntry · ×1
  • BsnEntry::parse (cyclomatic 20) crates/bevy_scene/macros/src/bsn/parse.rs:104 — BsnEntry::parse 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.
D1 · Cyclomatic Complexity · AssetState · ×1
  • AssetState::update_material (cyclomatic 20) crates/bevy_solari/src/scene/binder/assets.rs:134 — AssetState::update_material 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.
D1 · Cyclomatic Complexity · bevy_camera · ×1
  • bevy_camera::visibility::check_visibility_cpu_culling (cyclomatic 19) crates/bevy_camera/src/visibility/mod.rs:748 — bevy_camera::visibility::check_visibility_cpu_culling 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.
D1 · Cyclomatic Complexity · ReflectDerive · ×1
  • ReflectDerive::from_input (cyclomatic 19) REDACTED:184 — ReflectDerive::from_input 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.
D1 · Cyclomatic Complexity · TextPipeline · ×1
  • TextPipeline::update_buffer (cyclomatic 19) crates/bevy_text/src/pipeline.rs:71 — TextPipeline::update_buffer 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.
D1 · Cyclomatic Complexity · RenderDebugOverlayPipeline · ×1
  • RenderDebugOverlayPipeline::specialize (cyclomatic 18) crates/bevy_dev_tools/src/render_debug.rs:467 — RenderDebugOverlayPipeline::specialize 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.
D1 · Cyclomatic Complexity · MeshPipelineViewLayoutKey · ×1
  • MeshPipelineViewLayoutKey::from (cyclomatic 18) crates/bevy_pbr/src/render/mesh_view_bindings.rs:146 — MeshPipelineViewLayoutKey::from has cyclomatic complexity 18 (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.
D1 · Cyclomatic Complexity · SetMeshBindGroup · ×1
  • SetMeshBindGroup::render (cyclomatic 17) crates/bevy_pbr/src/render/mesh.rs:4507 — SetMeshBindGroup::render 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.
D1 · Cyclomatic Complexity · DrawMesh · ×1
  • DrawMesh::render (cyclomatic 17) crates/bevy_pbr/src/render/mesh.rs:4666 — DrawMesh::render 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.
D1 · Cyclomatic Complexity · AutoInsertApplyDeferredPass · ×1
  • AutoInsertApplyDeferredPass::build (cyclomatic 16) crates/bevy_ecs/src/schedule/auto_insert_apply_deferred.rs:70 — AutoInsertApplyDeferredPass::build has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to 2 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · Image · ×1
  • Image::from_dynamic_inner (cyclomatic 16) crates/bevy_image/src/image_texture_conversion.rs:19 — Image::from_dynamic_inner has cyclomatic complexity 16 (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.
D1 · Cyclomatic Complexity · Capsule3dMeshBuilder · ×1
  • Capsule3dMeshBuilder::build (cyclomatic 16) crates/bevy_mesh/src/primitives/dim3/capsule.rs:98 — Capsule3dMeshBuilder::build has cyclomatic complexity 16 (threshold 15). 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.
D1 · Cyclomatic Complexity · JsonSchemaBevyType · ×1
  • JsonSchemaBevyType::from (cyclomatic 16) crates/bevy_remote/src/schemas/json_schema.rs:91 — JsonSchemaBevyType::from has cyclomatic complexity 16 (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.
D1 · Cyclomatic Complexity · bevy_remote · ×1
  • bevy_remote::builtin_methods::process_remote_query_request (cyclomatic 16) crates/bevy_remote/src/builtin_methods.rs:978 — bevy_remote::builtin_methods::process_remote_query_request has cyclomatic complexity 16 (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.
D1 · Cyclomatic Complexity · BsnType · ×1
  • BsnType::struct_patch_tokens (cyclomatic 16) crates/bevy_scene/macros/src/bsn/codegen.rs:567 — BsnType::struct_patch_tokens 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.
D1 · Cyclomatic Complexity · bevy_solari · ×1
  • bevy_solari::realtime::node::solari_lighting (cyclomatic 16) crates/bevy_solari/src/realtime/node.rs:86 — bevy_solari::realtime::node::solari_lighting 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.
D15 · Churn × Complexity Hotspots · Repeated repair · ×1
  • Repeated repair: crates/bevy_asset/src/lib.rs crates/bevy_asset/src/lib.rs:355 — crates/bevy_asset/src/lib.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 AssetPlugin::build at line 355), 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: “Attempt a fix for flakiness of `dropping_subasset_handle_while_loading_cancels_load`. (#25643)”; “Fix issues where load_untyped_async would not correctly propagate the "modifiers". (#25506)”; “Fix canceling asset loads on singlethreaded. (#25452)”. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 22:58:17 +00:00' --until='2026-10-24 22:58:17 +00:00' --full-history --no-merges -- crates/bevy_asset/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.
D2 · Cognitive Complexity · GltfLoader · ×1
  • GltfLoader::load_gltf (cognitive 246) crates/bevy_gltf/src/loader/mod.rs:302 — GltfLoader::load_gltf has cognitive complexity 246 (threshold 15). Drivers by points: if/else 58 (145 pts), loops 26 (55 pts), match/switch 12 (40 pts), boolean chains 6 (nesting depth added 144). 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.
D2 · Cognitive Complexity · MeshPipeline · ×1
  • MeshPipeline::specialize (cognitive 77) crates/bevy_pbr/src/render/mesh.rs:3389 — MeshPipeline::specialize has cognitive complexity 77 (threshold 15). Drivers by points: if/else 66 (74 pts), boolean chains 2, match/switch 1 (nesting depth added 8). 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.
D2 · Cognitive Complexity · ShaderCache · ×1
  • ShaderCache::get (cognitive 75) crates/bevy_shader/src/shader_cache.rs:178 — ShaderCache::get has cognitive complexity 75 (threshold 15). Drivers by points: if/else 12 (43 pts), loops 5 (18 pts), match/switch 4 (13 pts), boolean chains 1 (nesting depth added 53). 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.
D2 · Cognitive Complexity · ExtrusionBuilder · ×1
  • ExtrusionBuilder::build (cognitive 64) crates/bevy_mesh/src/primitives/extrusion.rs:178 — ExtrusionBuilder::build has cognitive complexity 64 (threshold 15). Drivers by points: loops 14 (46 pts), if/else 7 (11 pts), match/switch 3 (7 pts) (nesting depth added 40). 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.
D2 · Cognitive Complexity · PrepassPipeline · ×1
  • PrepassPipeline::specialize (cognitive 62) crates/bevy_pbr/src/prepass/mod.rs:405 — PrepassPipeline::specialize has cognitive complexity 62 (threshold 15). Drivers by points: if/else 43 (53 pts), boolean chains 5, match/switch 2 (4 pts) (nesting depth added 12). 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.
D2 · Cognitive Complexity · BevyError · ×1
  • BevyError::format_backtrace (cognitive 45) crates/bevy_ecs/src/error/bevy_error.rs:208 — BevyError::format_backtrace has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (42 pts), loops 1 (2 pts), boolean chains 1 (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.
D2 · Cognitive Complexity · AssetInfos · ×1
  • AssetInfos::process_asset_load (cognitive 44) crates/bevy_asset/src/server/info.rs:445 — AssetInfos::process_asset_load has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (23 pts), loops 5 (11 pts), match/switch 5 (8 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.
D2 · Cognitive Complexity · bevy_audio · ×1
  • bevy_audio::audio_output::play_queued_audio_system (cognitive 43) crates/bevy_audio/src/audio_output.rs:84 — bevy_audio::audio_output::play_queued_audio_system has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (25 pts), match/switch 8 (17 pts), loops 1 (nesting depth added 23). 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.
D2 · Cognitive Complexity · PanOrbitCamera · ×1
  • PanOrbitCamera::update_transform_and_projection (cognitive 43) crates/bevy_camera_controller/src/pan_orbit_camera/controller/component.rs:362 — PanOrbitCamera::update_transform_and_projection has cognitive complexity 43 (threshold 15). Drivers by points: if/else 18 (28 pts), match/switch 6 (10 pts), boolean chains 5 (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.
D2 · Cognitive Complexity · ScheduleState · ×1
  • ScheduleState::skipped_systems (cognitive 39) crates/bevy_ecs/src/schedule/stepping.rs:799 — ScheduleState::skipped_systems has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (27 pts), match/switch 3 (8 pts), loops 2 (3 pts), boolean chains 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.
D2 · Cognitive Complexity · App · ×1
  • App::run (cognitive 37) tools/export-content/src/app.rs:80 — App::run has cognitive complexity 37 (threshold 15). Drivers by points: if/else 6 (22 pts), match/switch 4 (10 pts), boolean chains 4, 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.
D2 · Cognitive Complexity · DeferredLightingLayout · ×1
  • DeferredLightingLayout::specialize (cognitive 35) crates/bevy_pbr/src/deferred/mod.rs:205 — DeferredLightingLayout::specialize has cognitive complexity 35 (threshold 15). Drivers by points: if/else 32 (35 pts) (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.
D2 · Cognitive Complexity · BsnType · ×1
  • BsnType::struct_patch_tokens (cognitive 35) crates/bevy_scene/macros/src/bsn/codegen.rs:567 — BsnType::struct_patch_tokens has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (23 pts), match/switch 3 (7 pts), loops 2 (4 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.
D2 · Cognitive Complexity · bevy_input · ×1
  • bevy_input::gamepad::gamepad_event_processing_system (cognitive 32) crates/bevy_input/src/gamepad.rs:1589 — bevy_input::gamepad::gamepad_event_processing_system has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (28 pts), loops 2, match/switch 1 (2 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.
D2 · Cognitive Complexity · SpriteMeshMaterial · ×1
  • SpriteMeshMaterial::as_bind_group_shader_type (cognitive 32) REDACTED:99 — SpriteMeshMaterial::as_bind_group_shader_type has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (26 pts), match/switch 3 (6 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.
D2 · Cognitive Complexity · DrawMesh · ×1
  • DrawMesh::render (cognitive 29) crates/bevy_pbr/src/render/mesh.rs:4666 — DrawMesh::render has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 5 (9 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · BsnValue · ×1
  • BsnValue::parse (cognitive 29) crates/bevy_scene/macros/src/bsn/parse.rs:608 — BsnValue::parse has cognitive complexity 29 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 5, match/switch 1 (2 pts) (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.
D2 · Cognitive Complexity · WorldAsset · ×1
  • WorldAsset::write_to_world_with (cognitive 29) crates/bevy_world_serialization/src/world_asset.rs:64 — WorldAsset::write_to_world_with has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 6 (10 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.
D2 · Cognitive Complexity · DagAnalysis · ×1
  • DagAnalysis::new (cognitive 28) crates/bevy_ecs/src/schedule/graph/dag.rs:280 — DagAnalysis::new has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 8 (14 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.
D2 · Cognitive Complexity · BinnedRenderPhase · ×1
  • BinnedRenderPhase::render_batchable_meshes (cognitive 28) crates/bevy_render/src/render_phase/mod.rs:1191 — BinnedRenderPhase::render_batchable_meshes has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 4 (9 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 16). 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.
D2 · Cognitive Complexity · AssetLoaders · ×1
  • AssetLoaders::find (cognitive 27) crates/bevy_asset/src/server/loaders.rs:155 — AssetLoaders::find has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (24 pts), loops 1 (2 pts), match/switch 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.
D2 · Cognitive Complexity · PathType · ×1
  • PathType::new (cognitive 27) crates/bevy_macro_utils/src/path_type.rs:24 — PathType::new has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (27 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.
D2 · Cognitive Complexity · EasyScreenRecordPlugin · ×1
  • EasyScreenRecordPlugin::build (cognitive 26) crates/bevy_dev_tools/src/easy_screenshot.rs:180 — EasyScreenRecordPlugin::build has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (5 pts), match/switch 3 (5 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.
D2 · Cognitive Complexity · TabNavigation · ×1
  • TabNavigation::gather_focusable (cognitive 26) crates/bevy_input_focus/src/tab_navigation.rs:334 — TabNavigation::gather_focusable has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 16). 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.
D2 · Cognitive Complexity · DynamicEnum · ×1
  • DynamicEnum::try_apply (cognitive 26) crates/bevy_reflect/src/enums/dynamic_enum.rs:361 — DynamicEnum::try_apply has cognitive complexity 26 (threshold 15). Drivers by points: loops 4 (12 pts), if/else 4 (10 pts), match/switch 2 (4 pts) (nesting depth added 16). 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.
D2 · Cognitive Complexity · bevy_shader · ×1
  • bevy_shader::shader::scan_wesl_imports (cognitive 26) crates/bevy_shader/src/shader.rs:8 — bevy_shader::shader::scan_wesl_imports has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 4 (8 pts), match/switch 4 (7 pts) (nesting depth added 14). Of this number, 23 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.
D2 · Cognitive Complexity · FontSource · ×1
  • FontSource::resolve_font_family (cognitive 26) crates/bevy_text/src/text.rs:446 — FontSource::resolve_font_family has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 5 (15 pts), loops 2 (9 pts), boolean chains 1, if/else 1 (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.
D2 · Cognitive Complexity · SetMeshBindGroup · ×1
  • SetMeshBindGroup::render (cognitive 25) crates/bevy_pbr/src/render/mesh.rs:4507 — SetMeshBindGroup::render has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (17 pts), match/switch 4 (7 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.
D2 · Cognitive Complexity · AssetPath · ×1
  • AssetPath::parse_internal (cognitive 24) crates/bevy_asset/src/path.rs:138 — AssetPath::parse_internal has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (16 pts), match/switch 4 (7 pts), loops 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.
D2 · Cognitive Complexity · Walk · ×1
  • Walk::children (cognitive 24) crates/bevy_inspector/src/details_panel.rs:1932 — Walk::children has cognitive complexity 24 (threshold 15). Drivers by points: loops 8 (16 pts), if/else 2 (6 pts), boolean chains 1, match/switch 1 (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.
D2 · Cognitive Complexity · AssetState · ×1
  • AssetState::update_material (cognitive 24) crates/bevy_solari/src/scene/binder/assets.rs:134 — AssetState::update_material has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (19 pts), loops 2, match/switch 2, 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.
D2 · Cognitive Complexity · ReflectDerive · ×1
  • ReflectDerive::from_input (cognitive 23) REDACTED:184 — ReflectDerive::from_input has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 4 (6 pts), boolean chains 1, loops 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.
D2 · Cognitive Complexity · FrameData · ×1
  • FrameData::run_mapped_callback (cognitive 23) crates/bevy_render/src/diagnostic/internal.rs:573 — FrameData::run_mapped_callback has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 2 (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.
D2 · Cognitive Complexity · Mesh2dPipeline · ×1
  • Mesh2dPipeline::specialize (cognitive 23) crates/bevy_sprite_render/src/mesh2d/mesh.rs:720 — Mesh2dPipeline::specialize has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (21 pts), match/switch 1 (2 pts) (nesting depth added 6). 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.
D2 · Cognitive Complexity · Stepping · ×1
  • Stepping::next_frame (cognitive 22) crates/bevy_ecs/src/schedule/stepping.rs:435 — Stepping::next_frame has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 8 (13 pts), if/else 5 (8 pts), loops 1 (nesting depth added 8). 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.
D2 · Cognitive Complexity · bevy_text · ×1
  • bevy_text::text::detect_text_needs_rerender (cognitive 22) crates/bevy_text/src/text.rs:1593 — bevy_text::text::detect_text_needs_rerender has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 3 (4 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.
D2 · Cognitive Complexity · OptIn · ×1
  • OptIn::clone_components (cognitive 21) crates/bevy_ecs/src/entity/clone_entities.rs:1202 — OptIn::clone_components has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (5 pts), boolean chains 3 (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.
D2 · Cognitive Complexity · Capsule3dMeshBuilder · ×1
  • Capsule3dMeshBuilder::build (cognitive 21) crates/bevy_mesh/src/primitives/dim3/capsule.rs:98 — Capsule3dMeshBuilder::build has cognitive complexity 21 (threshold 15). Drivers by points: loops 11 (17 pts), if/else 3, match/switch 1 (nesting depth added 6). 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.
D2 · Cognitive Complexity · QueuedScenes · ×1
  • QueuedScenes::spawn_queued (cognitive 21) crates/bevy_scene/src/spawn.rs:779 — QueuedScenes::spawn_queued has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 3 (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.
D2 · Cognitive Complexity · build_templated_pages · ×1
  • build_templated_pages::features::parse_features (cognitive 21) tools/build-templated-pages/src/features.rs:30 — build_templated_pages::features::parse_features has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 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.
D2 · Cognitive Complexity · RenderDebugOverlayPipeline · ×1
  • RenderDebugOverlayPipeline::specialize (cognitive 20) crates/bevy_dev_tools/src/render_debug.rs:467 — RenderDebugOverlayPipeline::specialize has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (19 pts), match/switch 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.
D2 · Cognitive Complexity · MultiThreadedExecutor · ×1
  • MultiThreadedExecutor::init (cognitive 20) crates/bevy_ecs/src/schedule/executor/multi_threaded.rs:150 — MultiThreadedExecutor::init has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 6 (9 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.
D2 · Cognitive Complexity · Systems · ×1
  • Systems::get_conflicting_systems (cognitive 20) crates/bevy_ecs/src/schedule/node.rs:595 — Systems::get_conflicting_systems has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 1 (4 pts), boolean chains 2, loops 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.
D2 · Cognitive Complexity · MeshAllocator · ×1
  • MeshAllocator::allocate_meshes (cognitive 20) crates/bevy_render/src/mesh/allocator.rs:420 — MeshAllocator::allocate_meshes has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2, 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.
D2 · Cognitive Complexity · EntityCloner · ×1
  • EntityCloner::clone_entity_internal (cognitive 19) crates/bevy_ecs/src/entity/clone_entities.rs:569 — EntityCloner::clone_entity_internal has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2 (3 pts), 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.
D2 · Cognitive Complexity · EcsAccessType · ×1
  • EcsAccessType::is_compatible (cognitive 19) crates/bevy_ecs/src/query/access_iter.rs:126 — EcsAccessType::is_compatible has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (18 pts), match/switch 1 (nesting depth added 6). 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.
D2 · Cognitive Complexity · QueryIterationCursor · ×1
  • QueryIterationCursor::next (cognitive 19) crates/bevy_ecs/src/query/iter.rs:3306 — QueryIterationCursor::next has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (3 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.
D2 · Cognitive Complexity · SingleThreadedExecutor · ×1
  • SingleThreadedExecutor::run (cognitive 19) crates/bevy_ecs/src/schedule/executor/single_threaded.rs:53 — SingleThreadedExecutor::run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (3 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.
D2 · Cognitive Complexity · bevy_extract · ×1
  • bevy_extract::sync_world::entity_sync_system (cognitive 19) crates/bevy_extract/src/sync_world.rs:221 — bevy_extract::sync_world::entity_sync_system has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (12 pts), match/switch 2 (6 pts), loops 1 (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.
D2 · Cognitive Complexity · bevy_input_focus · ×1
  • bevy_input_focus::dispatch_focused_input (cognitive 19) crates/bevy_input_focus/src/lib.rs:414 — bevy_input_focus::dispatch_focused_input has cognitive complexity 19 (threshold 15). Drivers by points: loops 3 (11 pts), if/else 5 (8 pts) (nesting depth added 11). 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.
D2 · Cognitive Complexity · BrpRequest · ×1
  • BrpRequest::deserialize (cognitive 19) crates/bevy_remote/src/lib.rs:1287 — BrpRequest::deserialize has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (16 pts), match/switch 1 (2 pts), loops 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. This shape REPEATS in the file: one other method here (BrpResponse::deserialize) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · BrpResponse · ×1
  • BrpResponse::deserialize (cognitive 19) crates/bevy_remote/src/lib.rs:1403 — BrpResponse::deserialize has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (16 pts), match/switch 1 (2 pts), loops 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. This shape REPEATS in the file: one other method here (BrpRequest::deserialize) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · GpuImage · ×1
  • GpuImage::prepare_asset (cognitive 19) crates/bevy_render/src/texture/gpu_image.rs:63 — GpuImage::prepare_asset has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 3, 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.
D2 · Cognitive Complexity · bevy_state · ×1
  • bevy_state::state::transitions::internal_apply_state_transition (cognitive 19) crates/bevy_state/src/state/transitions.rs:138 — bevy_state::state::transitions::internal_apply_state_transition has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 3 (6 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.
D2 · Cognitive Complexity · bevy_derive · ×1
  • bevy_derive::derefs::get_deref_field (cognitive 19) crates/bevy_derive/src/derefs.rs:53 — bevy_derive::derefs::get_deref_field has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (5 pts), 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.
D2 · Cognitive Complexity · Bsn · ×1
  • Bsn::parse (cognitive 18) crates/bevy_scene/macros/src/bsn/parse.rs:61 — Bsn::parse has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (4 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.
D2 · Cognitive Complexity · TaskPool · ×1
  • TaskPool::scope_with_executor_inner (cognitive 18) crates/bevy_tasks/src/task_pool.rs:368 — TaskPool::scope_with_executor_inner has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), match/switch 2 (6 pts), loops 1 (2 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.
D2 · Cognitive Complexity · TextSpanIter · ×1
  • TextSpanIter::next (cognitive 18) crates/bevy_text/src/text_access.rs:137 — TextSpanIter::next has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (3 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.
D2 · Cognitive Complexity · WinitWindows · ×1
  • WinitWindows::create_window (cognitive 18) crates/bevy_winit/src/winit_windows.rs:56 — WinitWindows::create_window has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 2, 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.
D2 · Cognitive Complexity · BundleInserter · ×1
  • BundleInserter::before_insert (cognitive 17) crates/bevy_ecs/src/bundle/insert.rs:137 — BundleInserter::before_insert has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 2 (3 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.
D2 · Cognitive Complexity · MeshPipelineViewLayoutKey · ×1
  • MeshPipelineViewLayoutKey::from (cognitive 17) crates/bevy_pbr/src/render/mesh_view_bindings.rs:146 — MeshPipelineViewLayoutKey::from has cognitive complexity 17 (threshold 15). Drivers by points: if/else 17. 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.
D2 · Cognitive Complexity · PointerInput · ×1
  • PointerInput::receive (cognitive 17) crates/bevy_picking/src/pointer.rs:326 — PointerInput::receive has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), match/switch 3 (7 pts), loops 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.
D2 · Cognitive Complexity · TypedReflectDeserializer · ×1
  • TypedReflectDeserializer::deserialize (cognitive 17) crates/bevy_reflect/src/serde/de/deserializer.rs:357 — TypedReflectDeserializer::deserialize has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 3, match/switch 2 (3 pts) (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.
D2 · Cognitive Complexity · TextEdit · ×1
  • TextEdit::apply (cognitive 17) crates/bevy_text/src/text_edit.rs:276 — TextEdit::apply has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 2 (4 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · bevy_bsn · ×1
  • bevy_bsn::lex::lex_string::string_body (cognitive 16) crates/bevy_bsn/src/lex.rs:266 — bevy_bsn::lex::lex_string::string_body has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), boolean chains 2, match/switch 1 (2 pts), loops 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.
D2 · Cognitive Complexity · bevy_color · ×1
  • bevy_color::okcolor_convert::find_gamut_intersection (cognitive 16) crates/bevy_color/src/okcolor_convert.rs:135 — bevy_color::okcolor_convert::find_gamut_intersection has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 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.
D2 · Cognitive Complexity · Require · ×1
  • Require::parse (cognitive 16) crates/bevy_ecs/macro_logic/src/component.rs:630 — Require::parse has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 1 (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.
D2 · Cognitive Complexity · BundleRemover · ×1
  • BundleRemover::remove (cognitive 16) crates/bevy_ecs/src/bundle/remove.rs:148 — BundleRemover::remove 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.
D2 · Cognitive Complexity · ExecutorState · ×1
  • ExecutorState::spawn_system_tasks (cognitive 16) crates/bevy_ecs/src/schedule/executor/multi_threaded.rs:428 — ExecutorState::spawn_system_tasks has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 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.
D2 · Cognitive Complexity · Image · ×1
  • Image::equirectangular_to_cubemap (cognitive 16) crates/bevy_image/src/equirectangular.rs:82 — Image::equirectangular_to_cubemap has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 3 (6 pts), boolean chains 1, match/switch 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.
D2 · Cognitive Complexity · TextureAtlasBuilder · ×1
  • TextureAtlasBuilder::build (cognitive 16) crates/bevy_image/src/texture_atlas_builder.rs:203 — TextureAtlasBuilder::build has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 3, loops 3, 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.
D2 · Cognitive Complexity · MeshletMesh · ×1
  • MeshletMesh::from_mesh (cognitive 16) crates/bevy_pbr/src/meshlet/from_mesh.rs:64 — MeshletMesh::from_mesh has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 4 (6 pts), match/switch 1 (3 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.
D2 · Cognitive Complexity · BvhBuilder · ×1
  • BvhBuilder::sort_nodes_by_sah (cognitive 16) crates/bevy_pbr/src/meshlet/from_mesh.rs:757 — BvhBuilder::sort_nodes_by_sah has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (9 pts), if/else 2 (7 pts) (nesting depth added 10). 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.
D2 · Cognitive Complexity · EnumSerializer · ×1
  • EnumSerializer::serialize (cognitive 16) crates/bevy_reflect/src/serde/ser/enums.rs:21 — EnumSerializer::serialize has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (6 pts), loops 2 (4 pts), match/switch 3 (4 pts), boolean chains 2 (nesting depth added 5). 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.
D2 · Cognitive Complexity · ShaderLoader · ×1
  • ShaderLoader::load (cognitive 16) crates/bevy_shader/src/shader.rs:268 — ShaderLoader::load has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 2 (4 pts), match/switch 3 (4 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.
D2 · Cognitive Complexity · bevy_shape · ×1
  • bevy_shape::polygon::is_polygon_simple (cognitive 16) crates/bevy_shape/src/polygon.rs:259 — bevy_shape::polygon::is_polygon_simple has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 1 (2 pts), boolean chains 1, loops 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.
D2 · Cognitive Complexity · bevy_solari · ×1
  • bevy_solari::realtime::manage_prepass_double_buffers (cognitive 16) crates/bevy_solari/src/realtime/mod.rs:247 — bevy_solari::realtime::manage_prepass_double_buffers has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (15 pts), 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.
D2 · Cognitive Complexity · bevy_world_serialization · ×1
  • bevy_world_serialization::world_asset_spawner::world_instance_spawner_system (cognitive 16) crates/bevy_world_serialization/src/world_asset_spawner.rs:565 — bevy_world_serialization::world_asset_spawner::world_instance_spawner_system has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (6 pts), loops 4, match/switch 2 (4 pts), boolean chains 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.
D23 · Boundary Type-Coupling · Cross-context type ArchetypeId (bevy_ecs → bevy_asset) · ×1
  • Cross-context type ArchetypeId (bevy_ecs → bevy_asset) crates/bevy_asset/src/asset_changed.rs:213 — ArchetypeId (context bevy_ecs) is exposed in bevy_asset's public surface via AssetChanged.set_archetype — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type Entity (bevy_ecs → bevy_asset) · ×1
  • Cross-context type Entity (bevy_ecs → bevy_asset) crates/bevy_asset/src/asset_changed.rs:310 — Entity (context bevy_ecs) is exposed in bevy_asset's public surface via AssetChanged.filter_fetch — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type TableRow (bevy_ecs → bevy_asset) · ×1
  • Cross-context type TableRow (bevy_ecs → bevy_asset) crates/bevy_asset/src/asset_changed.rs:310 — TableRow (context bevy_ecs) is exposed in bevy_asset's public surface via AssetChanged.filter_fetch — couples the contexts.
D30 · Dependency Vulnerabilities · Medium CVE · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (10 members, 9 shared lines) · ×1
  • Near-duplicate member family (10 members, 9 shared lines) crates/bevy_color/src/color.rs:701 — crates/bevy_color/src/color.rs:701-717 | crates/bevy_color/src/color.rs:721-737 | crates/bevy_color/src/color.rs:741-757 | crates/bevy_color/src/color.rs:781-797 | crates/bevy_color/src/color.rs:801-817 | crates/bevy_color/src/color.rs:821-837 | crates/bevy_color/src/color.rs:841-857 | crates/bevy_color/src/color.rs:901-917 | crates/bevy_color/src/color.rs:921-937 | crates/bevy_color/src/color.rs:941-957 — These 10 members are variants of one another: a block of 9 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 10 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 10 times.
D4 · Code Duplication · Near-duplicate member family (5 members, 11 shared lines) · ×1
  • Near-duplicate member family (5 members, 11 shared lines) crates/bevy_reflect/src/std_traits.rs:60 — crates/bevy_reflect/src/std_traits.rs:60-78 | crates/bevy_reflect/src/std_traits.rs:110-128 | crates/bevy_reflect/src/std_traits.rs:160-178 | crates/bevy_reflect/src/std_traits.rs:210-228 | crates/bevy_reflect/src/std_traits.rs:261-279 — These 5 members are variants of one another: a block of 11 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 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 5 times.
D4 · Code Duplication · Near-duplicate member family (3 members, 54 shared lines) · ×1
  • Near-duplicate member family (3 members, 54 shared lines) crates/bevy_pbr/src/meshlet/material_shade_nodes.rs:42 — crates/bevy_pbr/src/meshlet/material_shade_nodes.rs:42-111 | crates/bevy_pbr/src/meshlet/material_shade_nodes.rs:131-229 | crates/bevy_pbr/src/meshlet/material_shade_nodes.rs:248-351 — These 3 members are variants of one another: a block of 54 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
D4 · Code Duplication · Near-duplicate member pair (83 shared lines) · ×1
  • Near-duplicate member pair (83 shared lines) crates/bevy_pbr/src/prepass/mod.rs:411 — crates/bevy_pbr/src/prepass/mod.rs:411-707 | crates/bevy_pbr/src/render/mesh.rs:3393-3800 — These two members are variants of one another: 83 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (74 shared lines) · ×1
  • Near-duplicate member pair (74 shared lines) crates/bevy_render/src/erased_render_asset.rs:378 — crates/bevy_render/src/erased_render_asset.rs:378-468 | crates/bevy_render/src/render_asset.rs:399-490 — These two members are variants of one another: 74 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (63 shared lines) · ×1
  • Near-duplicate member pair (63 shared lines) crates/bevy_ui_render/src/lib.rs:1791 — crates/bevy_ui_render/src/lib.rs:1791-1947 | crates/bevy_ui_render/src/lib.rs:1975-2133 — These two members are variants of one another: 63 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (60 shared lines) · ×1
  • Near-duplicate member pair (60 shared lines) crates/bevy_pbr/src/meshlet/material_pipeline_prepare.rs:71 — crates/bevy_pbr/src/meshlet/material_pipeline_prepare.rs:71-268 | crates/bevy_pbr/src/render/mesh.rs:393-516 — These two members are variants of one another: 60 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (47 shared lines) · ×1
  • Near-duplicate member pair (47 shared lines) crates/bevy_reflect/derive/src/impls/structs.rs:10 — crates/bevy_reflect/derive/src/impls/structs.rs:10-191 | crates/bevy_reflect/derive/src/impls/tuple_structs.rs:10-151 — These two members are variants of one another: 47 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (24 shared lines) · ×1
  • Near-duplicate member pair (24 shared lines) crates/bevy_reflect/src/path/access.rs:87 — crates/bevy_reflect/src/path/access.rs:87-146 | crates/bevy_reflect/src/path/access.rs:163-214 — These two members are variants of one another: 24 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (6 members, 50+ identical tokens) crates/bevy_pbr/src/material.rs:997 — crates/bevy_pbr/src/material.rs:997-1189 | crates/bevy_pbr/src/material.rs:1216-1464 | crates/bevy_pbr/src/prepass/mod.rs:1019-1313 | crates/bevy_pbr/src/prepass/mod.rs:1330-1529 | crates/bevy_pbr/src/render/light.rs:2442-2665 | crates/bevy_pbr/src/wireframe.rs:1458-1625 — These 6 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 6 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 6 times.
D4 · Code Duplication · Duplicated block (46 lines × 2) · ×1
  • Duplicated block (46 lines × 2) crates/bevy_gltf/src/material.rs:213 — crates/bevy_gltf/src/material.rs:213-258 | crates/bevy_pbr/src/pbr_material.rs:885-930 — 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.
D4 · Code Duplication · Duplicated block (43–45 lines × 2) · ×1
  • Duplicated block (43–45 lines × 2) crates/bevy_audio/src/audio_output.rs:140 — crates/bevy_audio/src/audio_output.rs:140-184 | crates/bevy_audio/src/audio_output.rs:212-254 — 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.
D4 · Code Duplication · Duplicated block (44–45 lines × 2) · ×1
  • Duplicated block (44–45 lines × 2) crates/bevy_ecs/macros/src/query_data.rs:436 — crates/bevy_ecs/macros/src/query_data.rs:436-479 | crates/bevy_ecs/macros/src/query_data.rs:518-562 — 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.
D4 · Code Duplication · Duplicated block (39 lines × 2) · ×1
  • Duplicated block (39 lines × 2) crates/bevy_pbr/src/meshlet/visibility_buffer_raster_node.rs:124 — crates/bevy_pbr/src/meshlet/visibility_buffer_raster_node.rs:124-162 | crates/bevy_pbr/src/meshlet/visibility_buffer_raster_node.rs:249-287 — 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.
D4 · Code Duplication · Duplicated block (36 lines × 3) · ×1
  • Duplicated block (36 lines × 3) crates/bevy_gltf/src/loader/mod.rs:411 — crates/bevy_gltf/src/loader/mod.rs:411-446 | crates/bevy_gltf/src/loader/mod.rs:468-503 | crates/bevy_gltf/src/loader/mod.rs:524-559 — 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.
D4 · Code Duplication · Duplicated block (30–36 lines × 2) · ×1
  • Duplicated block (30–36 lines × 2) crates/bevy_pbr/src/render/mesh.rs:4828 — crates/bevy_pbr/src/render/mesh.rs:4828-4863 | crates/bevy_pbr/src/wireframe.rs:640-669 — 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.
D4 · Code Duplication · Duplicated block (36 lines × 2) · ×1
  • Duplicated block (36 lines × 2) crates/bevy_reflect/derive/src/lib.rs:75 — crates/bevy_reflect/derive/src/lib.rs:75-110 | crates/bevy_reflect/derive/src/remote.rs:50-85 — 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 · Duplicated block (34 lines × 2) · ×1
  • Duplicated block (34 lines × 2) crates/bevy_ecs/macros/src/query_data.rs:298 — crates/bevy_ecs/macros/src/query_data.rs:298-331 | crates/bevy_ecs/macros/src/query_data.rs:394-427 — 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.
D4 · Code Duplication · Duplicated block (31–33 lines × 2) · ×1
  • Duplicated block (31–33 lines × 2) crates/bevy_pbr/src/material.rs:1271 — crates/bevy_pbr/src/material.rs:1271-1303 | crates/bevy_pbr/src/prepass/mod.rs:1399-1429 — before extracting anything, compare `crates/bevy_pbr/src/material.rs` and `crates/bevy_pbr/src/prepass/mod.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (22–32 lines × 2) · ×1
  • Duplicated block (22–32 lines × 2) crates/bevy_ecs/src/bundle/insert.rs:220 — crates/bevy_ecs/src/bundle/insert.rs:220-241 | crates/bevy_ecs/src/bundle/insert.rs:262-293 — 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.
D4 · Code Duplication · Duplicated block (30–32 lines × 2) · ×1
  • Duplicated block (30–32 lines × 2) crates/bevy_pbr/src/meshlet/visibility_buffer_raster_node.rs:91 — crates/bevy_pbr/src/meshlet/visibility_buffer_raster_node.rs:91-122 | crates/bevy_pbr/src/meshlet/visibility_buffer_raster_node.rs:218-247 — 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.
D4 · Code Duplication · Duplicated block (31 lines × 3) · ×1
  • Duplicated block (31 lines × 3) crates/bevy_pbr/src/material.rs:1063 — crates/bevy_pbr/src/material.rs:1063-1093 | crates/bevy_pbr/src/prepass/mod.rs:1097-1127 | crates/bevy_pbr/src/render/light.rs:2511-2541 — before extracting anything, compare `crates/bevy_pbr/src/material.rs` and `crates/bevy_pbr/src/prepass/mod.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (29–31 lines × 2) · ×1
  • Duplicated block (29–31 lines × 2) crates/bevy_gizmos_render/src/pipeline_2d.rs:201 — crates/bevy_gizmos_render/src/pipeline_2d.rs:201-231 | crates/bevy_gizmos_render/src/pipeline_3d.rs:210-238 — 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 · Duplicated block (27–30 lines × 2) · ×1
  • Duplicated block (27–30 lines × 2) crates/bevy_ecs/src/world/mod.rs:2633 — crates/bevy_ecs/src/world/mod.rs:2633-2659 | crates/bevy_ecs/src/world/mod.rs:2793-2822 — 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.
D4 · Code Duplication · Duplicated block (28–29 lines × 2) · ×1
  • Duplicated block (28–29 lines × 2) crates/bevy_feathers/src/controls/listview.rs:76 — crates/bevy_feathers/src/controls/listview.rs:76-104 | crates/bevy_feathers/src/controls/tree_view.rs:87-114 — 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 · Duplicated block (26–29 lines × 2) · ×1
  • Duplicated block (26–29 lines × 2) crates/bevy_pbr/src/meshlet/material_pipeline_prepare.rs:90 — crates/bevy_pbr/src/meshlet/material_pipeline_prepare.rs:90-115 | crates/bevy_pbr/src/render/mesh.rs:415-443 — before extracting anything, compare `crates/bevy_pbr/src/meshlet/material_pipeline_prepare.rs` and `crates/bevy_pbr/src/render/mesh.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (25–28 lines × 2) · ×1
  • Duplicated block (25–28 lines × 2) crates/bevy_asset/src/processor/mod.rs:458 — crates/bevy_asset/src/processor/mod.rs:458-485 | crates/bevy_asset/src/server/mod.rs:1667-1691 — 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.
D4 · Code Duplication · Duplicated block (24–28 lines × 2) · ×1
  • Duplicated block (24–28 lines × 2) crates/bevy_ecs/src/world/mod.rs:2605 — crates/bevy_ecs/src/world/mod.rs:2605-2628 | crates/bevy_ecs/src/world/mod.rs:2753-2780 — 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.
D4 · Code Duplication · Duplicated block (28 lines × 2) · ×1
  • Duplicated block (28 lines × 2) crates/bevy_pbr/src/render/gpu_preprocess.rs:2584 — crates/bevy_pbr/src/render/gpu_preprocess.rs:2584-2611 | crates/bevy_pbr/src/render/gpu_preprocess.rs:2705-2732 — 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.
D4 · Code Duplication · Duplicated block (19–27 lines × 2) · ×1
  • Duplicated block (19–27 lines × 2) crates/bevy_ecs/src/query/iter.rs:343 — crates/bevy_ecs/src/query/iter.rs:343-361 | crates/bevy_ecs/src/query/iter.rs:426-452 — 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.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×1
  • Duplicated block (27 lines × 2) crates/bevy_pbr/src/render/gpu_preprocess.rs:651 — crates/bevy_pbr/src/render/gpu_preprocess.rs:651-677 | crates/bevy_pbr/src/render/gpu_preprocess.rs:749-775 — 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.
D4 · Code Duplication · Duplicated block (26–27 lines × 2) · ×1
  • Duplicated block (26–27 lines × 2) crates/bevy_render/src/material_bind_groups.rs:1970 — crates/bevy_render/src/material_bind_groups.rs:1970-1996 | crates/bevy_render/src/material_bind_groups.rs:2020-2045 — 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.
D4 · Code Duplication · Duplicated block (23–26 lines × 4) · ×1
  • Duplicated block (23–26 lines × 4) crates/bevy_ecs/src/world/entity_access/world_mut.rs:1391 — crates/bevy_ecs/src/world/entity_access/world_mut.rs:1391-1413 | crates/bevy_ecs/src/world/entity_access/world_mut.rs:1453-1478 | crates/bevy_ecs/src/world/entity_access/world_mut.rs:1513-1538 | crates/bevy_ecs/src/world/entity_access/world_mut.rs:1634-1659 — 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.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×1
  • Duplicated block (26 lines × 2) crates/bevy_pbr/src/render/mesh.rs:3402 — crates/bevy_pbr/src/render/mesh.rs:3402-3427 | crates/bevy_sprite_render/src/mesh2d/mesh.rs:728-753 — before extracting anything, compare `crates/bevy_pbr/src/render/mesh.rs` and `crates/bevy_sprite_render/src/mesh2d/mesh.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (18–25 lines × 4) · ×1
  • Duplicated block (18–25 lines × 4) crates/bevy_pbr/src/render/mesh_bindings.rs:314 — crates/bevy_pbr/src/render/mesh_bindings.rs:314-331 | crates/bevy_pbr/src/render/mesh_bindings.rs:339-358 | crates/bevy_pbr/src/render/mesh_bindings.rs:366-386 | crates/bevy_pbr/src/render/mesh_bindings.rs:394-418 — 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.
D4 · Code Duplication · Duplicated block (22–25 lines × 3) · ×1
  • Duplicated block (22–25 lines × 3) crates/bevy_reflect/derive/src/impls/enums.rs:66 — crates/bevy_reflect/derive/src/impls/enums.rs:66-87 | crates/bevy_reflect/derive/src/impls/structs.rs:56-80 | crates/bevy_reflect/derive/src/impls/tuple_structs.rs:44-68 — before extracting anything, compare `crates/bevy_reflect/derive/src/impls/enums.rs` and `crates/bevy_reflect/derive/src/impls/structs.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (24–25 lines × 2) · ×1
  • Duplicated block (24–25 lines × 2) crates/bevy_pbr/src/prepass/mod.rs:499 — crates/bevy_pbr/src/prepass/mod.rs:499-522 | crates/bevy_pbr/src/render/mesh.rs:3426-3450 — before extracting anything, compare `crates/bevy_pbr/src/prepass/mod.rs` and `crates/bevy_pbr/src/render/mesh.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×1
  • Duplicated block (24 lines × 2) crates/bevy_pbr/src/material.rs:932 — crates/bevy_pbr/src/material.rs:932-955 | crates/bevy_sprite_render/src/mesh2d/material.rs:738-761 — before extracting anything, compare `crates/bevy_pbr/src/material.rs` and `crates/bevy_sprite_render/src/mesh2d/material.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (20–24 lines × 2) · ×1
  • Duplicated block (20–24 lines × 2) crates/bevy_ui_widgets/src/text_input.rs:289 — crates/bevy_ui_widgets/src/text_input.rs:289-312 | crates/bevy_ui_widgets/src/text_input.rs:357-376 — 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.
D4 · Code Duplication · Duplicated block (22–23 lines × 2) · ×1
  • Duplicated block (22–23 lines × 2) crates/bevy_audio/src/audio_output.rs:188 — crates/bevy_audio/src/audio_output.rs:188-209 | crates/bevy_audio/src/audio_output.rs:258-280 — 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.
D4 · Code Duplication · Duplicated block (21–23 lines × 2) · ×1
  • Duplicated block (21–23 lines × 2) crates/bevy_ecs/src/bundle/insert.rs:111 — crates/bevy_ecs/src/bundle/insert.rs:111-131 | crates/bevy_ecs/src/bundle/spawner.rs:65-87 — 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 · Duplicated block (21–22 lines × 4) · ×1
  • Duplicated block (21–22 lines × 4) crates/bevy_ecs/src/world/entity_access/world_mut.rs:1350 — crates/bevy_ecs/src/world/entity_access/world_mut.rs:1350-1370 | crates/bevy_ecs/src/world/entity_access/world_mut.rs:1398-1419 | crates/bevy_ecs/src/world/entity_access/world_mut.rs:1523-1544 | crates/bevy_ecs/src/world/entity_access/world_mut.rs:1644-1665 — 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.
D4 · Code Duplication · Duplicated block (21 lines × 3) · ×1
  • Duplicated block (21 lines × 3) crates/bevy_pbr/src/render/light.rs:476 — crates/bevy_pbr/src/render/light.rs:476-496 | crates/bevy_pbr/src/render/light.rs:608-628 | crates/bevy_pbr/src/render/light.rs:759-779 — 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.
D4 · Code Duplication · Duplicated block (19–21 lines × 3) · ×1
  • Duplicated block (19–21 lines × 3) crates/bevy_ui_render/src/lib.rs:739 — crates/bevy_ui_render/src/lib.rs:739-759 | crates/bevy_ui_render/src/lib.rs:1976-1994 | crates/bevy_ui_render/src/text.rs:247-266 — before extracting anything, compare `crates/bevy_ui_render/src/lib.rs` and `crates/bevy_ui_render/src/text.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (18–21 lines × 2) · ×1
  • Duplicated block (18–21 lines × 2) crates/bevy_pbr/src/render/light.rs:555 — crates/bevy_pbr/src/render/light.rs:555-572 | crates/bevy_pbr/src/render/light.rs:691-711 — 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.
D4 · Code Duplication · Duplicated block (17–21 lines × 2) · ×1
  • Duplicated block (17–21 lines × 2) crates/bevy_pbr/src/render/light.rs:2182 — crates/bevy_pbr/src/render/light.rs:2182-2202 | crates/bevy_pbr/src/render/light.rs:2284-2300 — 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.
D4 · Code Duplication · Duplicated block (20 lines × 5) · ×1
  • Duplicated block (20 lines × 5) crates/bevy_ui_render/src/lib.rs:1566 — crates/bevy_ui_render/src/lib.rs:1566-1585 | crates/bevy_ui_render/src/lib.rs:1661-1680 | crates/bevy_ui_render/src/lib.rs:1802-1821 | crates/bevy_ui_render/src/lib.rs:1983-2002 | crates/bevy_ui_render/src/text.rs:66-85 — before extracting anything, compare `crates/bevy_ui_render/src/lib.rs` and `crates/bevy_ui_render/src/text.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (19–20 lines × 3) · ×1
  • Duplicated block (19–20 lines × 3) crates/bevy_asset/src/saver.rs:478 — crates/bevy_asset/src/saver.rs:478-496 | crates/bevy_asset/src/transformer.rs:208-227 | crates/bevy_asset/src/transformer.rs:379-398 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (19–20 lines × 2) · ×1
  • Duplicated block (19–20 lines × 2) crates/bevy_pbr/src/material.rs:1129 — crates/bevy_pbr/src/material.rs:1129-1148 | crates/bevy_pbr/src/wireframe.rs:1538-1556 — 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 · Duplicated block (12–20 lines × 2) · ×1
  • Duplicated block (12–20 lines × 2) crates/bevy_pbr/src/render/gpu_preprocess.rs:3014 — crates/bevy_pbr/src/render/gpu_preprocess.rs:3014-3025 | crates/bevy_pbr/src/render/gpu_preprocess.rs:3081-3100 — 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.
D4 · Code Duplication · Duplicated block (19 lines × 3) · ×1
  • Duplicated block (19 lines × 3) crates/bevy_pbr/src/meshlet/material_shade_nodes.rs:44 — crates/bevy_pbr/src/meshlet/material_shade_nodes.rs:44-62 | crates/bevy_pbr/src/meshlet/material_shade_nodes.rs:135-153 | crates/bevy_pbr/src/meshlet/material_shade_nodes.rs:252-270 — 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.
D4 · Code Duplication · Duplicated block (13–19 lines × 2) · ×1
  • Duplicated block (13–19 lines × 2) crates/bevy_core_pipeline/src/core_3d/mod.rs:509 — crates/bevy_core_pipeline/src/core_3d/mod.rs:509-527 | crates/bevy_pbr/src/wireframe.rs:1340-1352 — 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.
D4 · Code Duplication · Duplicated block (17–19 lines × 2) · ×1
  • Duplicated block (17–19 lines × 2) crates/bevy_pbr/src/material.rs:1087 — crates/bevy_pbr/src/material.rs:1087-1103 | crates/bevy_pbr/src/wireframe.rs:1512-1530 — 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 · Duplicated block (18 lines × 4) · ×1
  • Duplicated block (18 lines × 4) crates/bevy_feathers/src/controls/button.rs:253 — crates/bevy_feathers/src/controls/button.rs:253-270 | crates/bevy_feathers/src/controls/checkbox.rs:334-351 | crates/bevy_feathers/src/controls/listview.rs:232-249 | crates/bevy_feathers/src/controls/toggle_switch.rs:327-344 — before extracting anything, compare `crates/bevy_feathers/src/controls/checkbox.rs` and `crates/bevy_feathers/src/controls/toggle_switch.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (17–18 lines × 3) · ×1
  • Duplicated block (17–18 lines × 3) crates/bevy_ui_render/src/gradient.rs:474 — crates/bevy_ui_render/src/gradient.rs:474-490 | crates/bevy_ui_render/src/gradient.rs:516-533 | crates/bevy_ui_render/src/gradient.rs:575-592 — 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.
D4 · Code Duplication · Duplicated block (16–18 lines × 2) · ×1
  • Duplicated block (16–18 lines × 2) crates/bevy_pbr/src/material.rs:1006 — crates/bevy_pbr/src/material.rs:1006-1023 | crates/bevy_pbr/src/render/light.rs:2448-2463 — before extracting anything, compare `crates/bevy_pbr/src/material.rs` and `crates/bevy_pbr/src/render/light.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 84 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (15–17 lines × 2) · ×1
  • Duplicated block (15–17 lines × 2) crates/bevy_scene/src/resolved_scene.rs:268 — crates/bevy_scene/src/resolved_scene.rs:268-284 | crates/bevy_scene/src/resolved_scene.rs:294-308 — 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.
D4 · Code Duplication · Duplicated block (14–16 lines × 5) · ×1
  • Duplicated block (14–16 lines × 5) crates/bevy_pbr/src/material.rs:1081 — crates/bevy_pbr/src/material.rs:1081-1096 | crates/bevy_pbr/src/material.rs:1279-1292 | crates/bevy_pbr/src/prepass/mod.rs:1115-1130 | crates/bevy_pbr/src/prepass/mod.rs:1407-1420 | crates/bevy_pbr/src/render/light.rs:2529-2544 — before extracting anything, compare `crates/bevy_pbr/src/material.rs` and `crates/bevy_pbr/src/prepass/mod.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (16 lines × 4) · ×1
  • Duplicated block (16 lines × 4) crates/bevy_render/src/erased_render_asset.rs:404 — crates/bevy_render/src/erased_render_asset.rs:404-419 | crates/bevy_render/src/erased_render_asset.rs:443-458 | crates/bevy_render/src/render_asset.rs:426-441 | crates/bevy_render/src/render_asset.rs:465-480 — before extracting anything, compare `crates/bevy_render/src/erased_render_asset.rs` and `crates/bevy_render/src/render_asset.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13–16 lines × 4) · ×1
  • Duplicated block (13–16 lines × 4) crates/bevy_ui_render/src/box_shadow.rs:619 — crates/bevy_ui_render/src/box_shadow.rs:619-631 | crates/bevy_ui_render/src/gradient.rs:1043-1055 | crates/bevy_ui_render/src/render_pass.rs:222-237 | crates/bevy_ui_render/src/ui_texture_slice_pipeline.rs:756-768 — before extracting anything, compare `crates/bevy_ui_render/src/box_shadow.rs` and `crates/bevy_ui_render/src/gradient.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (16 lines × 3) · ×1
  • Duplicated block (16 lines × 3) crates/bevy_ecs/src/query/par_iter.rs:83 — crates/bevy_ecs/src/query/par_iter.rs:83-98 | crates/bevy_ecs/src/query/par_iter.rs:443-458 | crates/bevy_ecs/src/query/par_iter.rs:609-624 — 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.
D4 · Code Duplication · Duplicated block (15 lines × 5) · ×1
  • Duplicated block (15 lines × 5) crates/bevy_ui_render/src/lib.rs:1658 — crates/bevy_ui_render/src/lib.rs:1658-1672 | crates/bevy_ui_render/src/lib.rs:1799-1813 | crates/bevy_ui_render/src/lib.rs:1980-1994 | crates/bevy_ui_render/src/text.rs:63-77 | crates/bevy_ui_render/src/text.rs:251-266 — before extracting anything, compare `crates/bevy_ui_render/src/lib.rs` and `crates/bevy_ui_render/src/text.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (15 lines × 3) · ×1
  • Duplicated block (15 lines × 3) crates/bevy_pbr/src/render/light.rs:504 — crates/bevy_pbr/src/render/light.rs:504-518 | crates/bevy_pbr/src/render/light.rs:635-649 | crates/bevy_pbr/src/render/light.rs:805-819 — 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.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×1
  • Duplicated block (14–15 lines × 2) crates/bevy_pbr/src/meshlet/material_pipeline_prepare.rs:138 — crates/bevy_pbr/src/meshlet/material_pipeline_prepare.rs:138-152 | crates/bevy_pbr/src/render/mesh.rs:486-499 — before extracting anything, compare `crates/bevy_pbr/src/meshlet/material_pipeline_prepare.rs` and `crates/bevy_pbr/src/render/mesh.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×1
  • Duplicated block (13–14 lines × 2) crates/bevy_ecs/src/query/state.rs:765 — crates/bevy_ecs/src/query/state.rs:765-777 | crates/bevy_ecs/src/query/state.rs:903-916 — 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.
D4 · Code Duplication · Duplicated block (11–14 lines × 2) · ×1
  • Duplicated block (11–14 lines × 2) crates/bevy_light/src/cluster/assign.rs:608 — crates/bevy_light/src/cluster/assign.rs:608-618 | crates/bevy_light/src/cluster/assign.rs:627-640 — 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.
D4 · Code Duplication · Duplicated block (13 lines × 4) · ×1
  • Duplicated block (13 lines × 4) crates/bevy_shape/src/dim2.rs:1723 — crates/bevy_shape/src/dim2.rs:1723-1735 | crates/bevy_shape/src/dim2.rs:1742-1754 | crates/bevy_shape/src/dim3.rs:1304-1316 | crates/bevy_shape/src/dim3.rs:1323-1335 — before extracting anything, compare `crates/bevy_shape/src/dim2.rs` and `crates/bevy_shape/src/dim3.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11–13 lines × 3) · ×1
  • Duplicated block (11–13 lines × 3) crates/bevy_pbr/src/prepass/mod.rs:542 — crates/bevy_pbr/src/prepass/mod.rs:542-554 | crates/bevy_pbr/src/render/mesh.rs:3452-3462 | crates/bevy_sprite_render/src/mesh2d/mesh.rs:764-774 — before extracting anything, compare `crates/bevy_pbr/src/prepass/mod.rs` and `crates/bevy_pbr/src/render/mesh.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (12–13 lines × 3) · ×1
  • Duplicated block (12–13 lines × 3) crates/bevy_pbr/src/prepass/mod.rs:1445 — crates/bevy_pbr/src/prepass/mod.rs:1445-1456 | crates/bevy_pbr/src/prepass/mod.rs:1493-1504 | crates/bevy_pbr/src/prepass/mod.rs:1511-1523 — 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.
D4 · Code Duplication · Duplicated block (11–13 lines × 2) · ×1
  • Duplicated block (11–13 lines × 2) crates/bevy_pbr/src/material.rs:1023 — crates/bevy_pbr/src/material.rs:1023-1033 | crates/bevy_pbr/src/prepass/mod.rs:1051-1063 — before extracting anything, compare `crates/bevy_pbr/src/material.rs` and `crates/bevy_pbr/src/prepass/mod.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9–12 lines × 2) · ×1
  • Duplicated block (9–12 lines × 2) crates/bevy_sprite_render/src/mesh2d/mesh.rs:972 — crates/bevy_sprite_render/src/mesh2d/mesh.rs:972-983 | crates/bevy_sprite_render/src/render/mod.rs:537-545 — before extracting anything, compare `crates/bevy_sprite_render/src/mesh2d/mesh.rs` and `crates/bevy_sprite_render/src/render/mod.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10–12 lines × 2) · ×1
  • Duplicated block (10–12 lines × 2) crates/bevy_ui_widgets/src/list.rs:305 — crates/bevy_ui_widgets/src/list.rs:305-316 | crates/bevy_ui_widgets/src/radio.rs:96-105 — 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 · Duplicated block (11 lines × 4) · ×1
  • Duplicated block (11 lines × 4) crates/bevy_ui_render/src/gradient.rs:480 — crates/bevy_ui_render/src/gradient.rs:480-491 | crates/bevy_ui_render/src/gradient.rs:522-534 | crates/bevy_ui_render/src/gradient.rs:581-593 | crates/bevy_ui_render/src/gradient.rs:644-654 — 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.
D4 · Code Duplication · Duplicated block (10–11 lines × 3) · ×1
  • Duplicated block (10–11 lines × 3) crates/bevy_pbr/src/prepass/mod.rs:529 — crates/bevy_pbr/src/prepass/mod.rs:529-538 | crates/bevy_pbr/src/render/mesh.rs:3414-3424 | crates/bevy_sprite_render/src/mesh2d/mesh.rs:740-750 — before extracting anything, compare `crates/bevy_pbr/src/prepass/mod.rs` and `crates/bevy_pbr/src/render/mesh.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×1
  • Duplicated block (10–11 lines × 2) crates/bevy_anti_alias/src/smaa/mod.rs:959 — crates/bevy_anti_alias/src/smaa/mod.rs:959-968 | crates/bevy_anti_alias/src/smaa/mod.rs:1010-1020 — 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.
D4 · Code Duplication · Duplicated block (7–9 lines × 2) · ×1
  • Duplicated block (7–9 lines × 2) crates/bevy_remote/src/builtin_methods.rs:748 — crates/bevy_remote/src/builtin_methods.rs:748-754 | crates/bevy_remote/src/builtin_methods.rs:1435-1443 — 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.
D4 · Code Duplication · Duplicated block (7 lines × 5) · ×1
  • Duplicated block (7 lines × 5) crates/bevy_reflect/src/std_traits.rs:314 — crates/bevy_reflect/src/std_traits.rs:314-320 | crates/bevy_reflect/src/std_traits.rs:360-366 | crates/bevy_reflect/src/std_traits.rs:406-412 | crates/bevy_reflect/src/std_traits.rs:452-458 | crates/bevy_reflect/src/std_traits.rs:498-504 — all 5 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.
D4 · Code Duplication · Duplicated block (4–6 lines × 11) · ×1
  • Duplicated block (4–6 lines × 11) crates/bevy_color/src/color.rs:712 — crates/bevy_color/src/color.rs:712-717 | crates/bevy_color/src/color.rs:732-737 | crates/bevy_color/src/color.rs:752-757 | crates/bevy_color/src/color.rs:772-777 | crates/bevy_color/src/color.rs:792-797 | crates/bevy_color/src/color.rs:812-817 | crates/bevy_color/src/color.rs:832-837 | crates/bevy_color/src/color.rs:852-857 | crates/bevy_color/src/color.rs:909-912 | crates/bevy_color/src/color.rs:929-932 | crates/bevy_color/src/color.rs:949-952 — all 11 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.
D4 · Code Duplication · Duplicated block (5–6 lines × 4) · ×1
  • Duplicated block (5–6 lines × 4) crates/bevy_ecs/src/query/state.rs:321 — crates/bevy_ecs/src/query/state.rs:321-326 | crates/bevy_ecs/src/query/state.rs:364-368 | crates/bevy_ecs/src/query/state.rs:813-818 | crates/bevy_ecs/src/query/state.rs:961-966 — 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.
D4 · Code Duplication · Duplicated block (4–5 lines × 12) · ×1
  • Duplicated block (4–5 lines × 12) crates/bevy_color/src/color.rs:704 — crates/bevy_color/src/color.rs:704-707 | crates/bevy_color/src/color.rs:725-728 | crates/bevy_color/src/color.rs:746-749 | crates/bevy_color/src/color.rs:782-786 | crates/bevy_color/src/color.rs:802-806 | crates/bevy_color/src/color.rs:822-826 | crates/bevy_color/src/color.rs:842-846 | crates/bevy_color/src/color.rs:862-866 | crates/bevy_color/src/color.rs:882-886 | crates/bevy_color/src/color.rs:902-906 | crates/bevy_color/src/color.rs:922-926 | crates/bevy_color/src/color.rs:942-946 — all 12 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.
D4 · Code Duplication · Duplicated block (3–5 lines × 3) · ×1
  • Duplicated block (3–5 lines × 3) crates/bevy_ecs/macros/src/template.rs:42 — crates/bevy_ecs/macros/src/template.rs:42-46 | crates/bevy_ecs/macros/src/template.rs:76-78 | crates/bevy_ecs/macros/src/template.rs:250-254 — 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.
D4 · Code Duplication · Duplicated block (5 lines × 6) · ×1
  • Duplicated block (5 lines × 6) crates/bevy_asset/src/loader.rs:201 — crates/bevy_asset/src/loader.rs:201-205 | crates/bevy_asset/src/loader.rs:282-286 | crates/bevy_asset/src/loader.rs:675-679 | crates/bevy_asset/src/saver.rs:248-252 | crates/bevy_asset/src/transformer.rs:167-171 | crates/bevy_asset/src/transformer.rs:338-342 — there are 6 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (9 lines × 5) · ×1
  • Duplicated block (9 lines × 5) crates/bevy_render/src/render_resource/buffer_vec.rs:130 — crates/bevy_render/src/render_resource/buffer_vec.rs:130-138 | crates/bevy_render/src/render_resource/storage_buffer.rs:102-110 | crates/bevy_render/src/render_resource/storage_buffer.rs:233-241 | crates/bevy_render/src/render_resource/uniform_buffer.rs:100-108 | crates/bevy_render/src/render_resource/uniform_buffer.rs:229-237 — there are 5 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (8 lines × 14) · ×1
  • Duplicated block (8 lines × 14) crates/bevy_ui_widgets/src/button.rs:108 — crates/bevy_ui_widgets/src/button.rs:108-115 | crates/bevy_ui_widgets/src/button.rs:121-128 | crates/bevy_ui_widgets/src/button.rs:134-141 | crates/bevy_ui_widgets/src/checkbox.rs:139-146 | crates/bevy_ui_widgets/src/checkbox.rs:152-159 | crates/bevy_ui_widgets/src/checkbox.rs:165-172 | crates/bevy_ui_widgets/src/menu.rs:382-389 | crates/bevy_ui_widgets/src/menu.rs:395-402 | crates/bevy_ui_widgets/src/menu.rs:408-415 | crates/bevy_ui_widgets/src/radio.rs:270-277 | crates/bevy_ui_widgets/src/radio.rs:283-290 | crates/bevy_ui_widgets/src/radio.rs:296-303 | crates/bevy_ui_widgets/src/slider.rs:563-570 | crates/bevy_ui_widgets/src/slider.rs:576-583 — there are 14 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 14 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (18 lines × 3) · ×1
  • Duplicated block (18 lines × 3) crates/bevy_pbr/src/atmosphere/resources.rs:61 — crates/bevy_pbr/src/atmosphere/resources.rs:61-78 | crates/bevy_pbr/src/atmosphere/resources.rs:87-104 | crates/bevy_pbr/src/atmosphere/resources.rs:117-134 — 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.
D4 · Code Duplication · Duplicated block (13 lines × 5) · ×1
  • Duplicated block (13 lines × 5) crates/bevy_core_pipeline/src/core_3d/mod.rs:870 — crates/bevy_core_pipeline/src/core_3d/mod.rs:870-882 | crates/bevy_core_pipeline/src/core_3d/mod.rs:892-904 | crates/bevy_core_pipeline/src/core_3d/mod.rs:919-931 | crates/bevy_core_pipeline/src/core_3d/mod.rs:941-953 | crates/bevy_core_pipeline/src/core_3d/mod.rs:963-975 — all 5 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.
D4 · Code Duplication · Duplicated block (11 lines × 6) · ×1
  • Duplicated block (11 lines × 6) crates/bevy_core_pipeline/src/core_3d/main_opaque_pass_3d_node.rs:71 — crates/bevy_core_pipeline/src/core_3d/main_opaque_pass_3d_node.rs:71-81 | crates/bevy_core_pipeline/src/core_3d/main_transparent_pass_3d_node.rs:83-93 | crates/bevy_core_pipeline/src/oit/resolve/node.rs:72-82 | crates/bevy_pbr/src/meshlet/material_shade_nodes.rs:78-88 | crates/bevy_pbr/src/meshlet/material_shade_nodes.rs:183-193 | crates/bevy_pbr/src/meshlet/material_shade_nodes.rs:305-315 — there are 6 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (8 lines × 6) · ×1
  • Duplicated block (8 lines × 6) crates/bevy_pbr/src/meshlet/resource_manager.rs:152 — crates/bevy_pbr/src/meshlet/resource_manager.rs:152-159 | crates/bevy_pbr/src/meshlet/resource_manager.rs:173-180 | crates/bevy_pbr/src/meshlet/resource_manager.rs:193-200 | crates/bevy_pbr/src/meshlet/resource_manager.rs:218-225 | crates/bevy_pbr/src/meshlet/resource_manager.rs:240-247 | crates/bevy_pbr/src/meshlet/resource_manager.rs:261-268 — all 6 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.
D5 · Coupling · Unstable project bevy_animation · ×1
  • Unstable project bevy_animation — bevy_animation has instability 0.82 with 3 dependents.
D5 · Coupling · Unstable project bevy_anti_alias · ×1
  • Unstable project bevy_anti_alias — bevy_anti_alias has instability 0.88 with 2 dependents.
D5 · Coupling · Unstable project bevy_camera_controller · ×1
  • Unstable project bevy_camera_controller — bevy_camera_controller has instability 0.95 with 1 dependents.
D5 · Coupling · Unstable project bevy_dev_tools · ×1
  • Unstable project bevy_dev_tools — bevy_dev_tools has instability 0.92 with 3 dependents.
D5 · Coupling · Unstable project bevy_feathers · ×1
  • Unstable project bevy_feathers — bevy_feathers has instability 0.92 with 2 dependents.
D5 · Coupling · Unstable project bevy_gilrs · ×1
  • Unstable project bevy_gilrs — bevy_gilrs has instability 0.83 with 1 dependents.
D5 · Coupling · Unstable project bevy_gizmos · ×1
  • Unstable project bevy_gizmos — bevy_gizmos has instability 0.81 with 4 dependents.
D5 · Coupling · Unstable project bevy_gizmos_render · ×1
  • Unstable project bevy_gizmos_render — bevy_gizmos_render has instability 0.95 with 1 dependents.
D5 · Coupling · Unstable project bevy_gltf · ×1
  • Unstable project bevy_gltf — bevy_gltf has instability 0.89 with 2 dependents.
D5 · Coupling · Unstable project bevy_inspector · ×1
  • Unstable project bevy_inspector — bevy_inspector has instability 0.95 with 1 dependents.
D5 · Coupling · Unstable project bevy_internal · ×1
  • Unstable project bevy_internal — bevy_internal has instability 0.97 with 2 dependents.
D5 · Coupling · Unstable project bevy_pbr · ×1
  • Unstable project bevy_pbr — bevy_pbr has instability 0.86 with 4 dependents.
D5 · Coupling · Unstable project bevy_post_process · ×1
  • Unstable project bevy_post_process — bevy_post_process has instability 0.94 with 1 dependents.
D5 · Coupling · Unstable project bevy_remote · ×1
  • Unstable project bevy_remote — bevy_remote has instability 0.88 with 2 dependents.
D5 · Coupling · Unstable project bevy_solari · ×1
  • Unstable project bevy_solari — bevy_solari has instability 0.95 with 1 dependents.
D5 · Coupling · Unstable project bevy_sprite_render · ×1
  • Unstable project bevy_sprite_render — bevy_sprite_render has instability 0.88 with 3 dependents.
D5 · Coupling · Unstable project bevy_ui_render · ×1
  • Unstable project bevy_ui_render — bevy_ui_render has instability 0.88 with 3 dependents.
D5 · Coupling · Unstable project bevy_winit · ×1
  • Unstable project bevy_winit — bevy_winit has instability 0.94 with 1 dependents.
X1 · Async correctness · Blocking `thread · ×1
  • Blocking `thread::sleep` inside an `async` body crates/bevy_remote/src/client.rs:310 — This `async` body is polled on an executor's worker thread, and `std::thread::sleep` blocks that thread: for the whole delay no other task scheduled on it makes progress — the Rust form of blocking on a task. Use `tokio::time::sleep(…).await` (or the runtime's own timer), which suspends only this task. Where the blocking work is not a sleep but a synchronous call that cannot be made async, move it off the executor with `tokio::task::spawn_blocking(…).await`.
Minor — 169 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×88
  • Orphaned file crates/bevy_math/src/compass.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 crates/bevy_math/src/ops.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 crates/bevy_shape/src/bounding/bounded3d/extrusion.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 crates/bevy_gizmos/src/arcs.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 crates/bevy_tasks/src/iter/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.
  • Orphaned file crates/bevy_mesh/src/conversions.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 crates/bevy_mesh/src/primitives/dim3/capsule.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 crates/bevy_math/src/rects/urect.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 crates/bevy_math/src/rects/irect.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 crates/bevy_light/src/cascade.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 crates/bevy_gizmos/src/grid.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 crates/bevy_gizmos/src/rounded_box.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 crates/bevy_animation/src/gltf_curves.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 crates/bevy_render/src/render_resource/specializer.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 crates/bevy_tasks/src/single_threaded_task_pool.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 crates/bevy_render/macros/src/specializer.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 crates/bevy_sprite_render/src/tilemap_chunk/tile_orientation.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 crates/bevy_color/src/oklcha.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 crates/bevy_app/src/task_pool_plugin.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 crates/bevy_gizmos/src/circles.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 crates/bevy_color/src/laba.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 crates/bevy_state/src/state/transitions.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 crates/bevy_a11y/src/lib.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 crates/bevy_post_process/src/auto_exposure/compensation_curve.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 crates/bevy_mesh/src/primitives/dim3/cone.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.
  • + 63 more in this group — see findings.md.
X4 · Structured logging · Interpolated log message defeats structured logging · ×40
  • Interpolated log message defeats structured logging crates/bevy_winit/src/game_mode.rs:27 — `info!` at line 27 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/bevy_winit/src/game_mode.rs:29 — `error!` at line 29 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/bevy_winit/src/game_mode.rs:70 — `info!` at line 70 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/bevy_winit/src/game_mode.rs:73 — `error!` at line 73 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/bevy_winit/src/state.rs:229 — `warn!` at line 229 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/bevy_winit/src/state.rs:234 — `warn!` at line 234 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/bevy_winit/src/system.rs:67 — `info!` at line 67 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/bevy_winit/src/system.rs:235 — `info!` at line 235 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/bevy_winit/src/system.rs:266 — `info!` at line 266 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/bevy_winit/src/system.rs:424 — `error!` at line 424 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/bevy_winit/src/system.rs:493 — `warn!` at line 493 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/bevy_winit/src/system.rs:500 — `warn!` at line 500 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/bevy_winit/src/system.rs:613 — `warn!` at line 613 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/bevy_winit/src/system.rs:629 — `warn!` at line 629 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/bevy_winit/src/winit_windows.rs:321 — `warn!` at line 321 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/bevy_winit/src/winit_windows.rs:393 — `warn!` at line 393 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/bevy_winit/src/winit_windows.rs:398 — `warn!` at line 398 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/bevy_winit/src/winit_windows.rs:459 — `error!` at line 459 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/bevy_winit/src/winit_windows.rs:514 — `warn!` at line 514 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/bevy_winit/src/cursor/mod.rs:149 — `warn!` at line 149 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/bevy_winit/src/cursor/mod.rs:169 — `warn!` at line 169 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/bevy_winit/src/cursor/mod.rs:182 — `warn!` at line 182 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/bevy_ui_render/src/render_pass.rs:71 — `error!` at line 71 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/bevy_ui/src/layout/debug.rs:16 — `info!` at line 16 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/bevy_transform/src/systems.rs:20 — `warn!` at line 20 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • + 15 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×18
  • Duplicated predicate crates/bevy_ui/src/layout/clipping.rs:92 — `!force_update && !tree_changed.is_changed() && !computed_layout.layout_dirty() && !computed_layout.subtree_dirty()` appears character-identically in 2 files — crates/bevy_ui/src/layout/clipping.rs, crates/bevy_ui/src/layout/mod.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 crates/bevy_ui_render/src/lib.rs:864 — `!inherited_visibility.get() || uinode.is_empty()` appears character-identically in 2 files — crates/bevy_ui_render/src/lib.rs, crates/bevy_ui_render/src/text.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 crates/bevy_core_pipeline/src/deferred/node.rs:85 — `!occlusion_culling || no_indirect_drawing` appears character-identically in 2 files — crates/bevy_core_pipeline/src/deferred/node.rs, crates/bevy_core_pipeline/src/prepass/node.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 crates/bevy_pbr/src/extended_material.rs:182 — `B::bindless_supported(render_device) && E::bindless_supported(render_device)` appears character-identically in 2 files — crates/bevy_pbr/src/extended_material.rs, crates/bevy_sprite_render/src/mesh2d/extended_material.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 crates/bevy_render/src/erased_render_asset.rs:460 — `bpf.exhausted() && !prepare_next_frame.assets.is_empty()` appears character-identically in 2 files — crates/bevy_render/src/erased_render_asset.rs, crates/bevy_render/src/render_asset.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 crates/bevy_render/src/render_resource/storage_buffer.rs:262 — `capacity < size || (self.changed && size > 0)` appears character-identically in 2 files — crates/bevy_render/src/render_resource/storage_buffer.rs, crates/bevy_render/src/render_resource/uniform_buffer.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 crates/bevy_winit/src/system.rs:457 — `constraints.max_width.is_finite() && constraints.max_height.is_finite()` appears character-identically in 2 files — crates/bevy_winit/src/system.rs, crates/bevy_winit/src/winit_windows.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 crates/bevy_ui_widgets/src/tabs.rs:393 — `event.state != ButtonState::Pressed || event.repeat` appears character-identically in 2 files — crates/bevy_ui_widgets/src/tabs.rs, crates/bevy_ui_widgets/src/tree.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 crates/bevy_ui_widgets/src/checkbox.rs:57 — `event.state == ButtonState::Pressed && !event.repeat && (event.key_code == KeyCode::Enter || event.key_code == KeyCode::NumpadEnter || event…` appears character-identically in 2 files — crates/bevy_ui_widgets/src/checkbox.rs, crates/bevy_ui_widgets/src/radio.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 crates/bevy_feathers/src/controls/listview.rs:266 — `focus.is_changed() || focus_visible.is_changed()` appears character-identically in 2 files — crates/bevy_feathers/src/controls/listview.rs, crates/bevy_feathers/src/controls/menu.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 crates/bevy_pbr/src/prepass/mod.rs:1256 — `item .mesh_key .contains(MeshPipelineKey::UNCLIPPED_DEPTH_ORTHO) && !depth_clip_control_supported` appears character-identically in 2 files — crates/bevy_pbr/src/prepass/mod.rs, crates/bevy_pbr/src/render/light.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 crates/bevy_math/src/direction.rs:61 — `length_error_squared > 2e-2 || length_error_squared.is_nan()` appears character-identically in 2 files — crates/bevy_math/src/direction.rs, crates/bevy_transform/src/components/transform.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 crates/bevy_gizmos_render/src/pipeline_2d.rs:367 — `line_gizmo.strip_vertex_count < 3 || config.line_joints == GizmoLineJoint::None` appears character-identically in 2 files — crates/bevy_gizmos_render/src/pipeline_2d.rs, crates/bevy_gizmos_render/src/pipeline_3d.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 crates/bevy_ecs/src/change_detection/params.rs:1549 — `self.ticks.summary_tick && self.is_changed_after(summary_tick.get())` appears character-identically in 2 files — crates/bevy_ecs/src/change_detection/params.rs, crates/bevy_ecs/src/change_detection/traits.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 crates/bevy_state/src/state/transitions.rs:250 — `transition.entered == transition.exited && !transition.allow_same_state_transitions` appears character-identically in 3 files — crates/bevy_state/src/state/transitions.rs, crates/bevy_state/src/state_scoped.rs, crates/bevy_state/src/state_scoped_events.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 crates/bevy_reflect/src/serde/ser/enums.rs:56 — `type_info.type_path_table().module_path() == Some("core::option") && type_info.type_path_table().ident() == Some("Option")` appears character-identically in 2 files — crates/bevy_reflect/src/serde/ser/enums.rs, crates/bevy_settings/src/lib.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 crates/bevy_render/src/render_resource/pipeline_cache.rs:923 — `v.is_empty() || v == "0" || v == "false"` appears character-identically in 2 files — crates/bevy_render/src/render_resource/pipeline_cache.rs, crates/bevy_render/src/renderer/mod.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 crates/bevy_render/src/view/mod.rs:1359 — `window.size_changed || window.present_mode_changed` appears character-identically in 2 files — crates/bevy_render/src/view/mod.rs, crates/bevy_render/src/view/window/mod.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.
D16 · Bus Factor · Off-boarding risk · ×3
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 9 significant file(s) lose their only recent owner: crates/bevy_dev_tools/src/inspection/component_inspection.rs, crates/bevy_dev_tools/src/inspection/serde_conversions.rs, crates/bevy_dev_tools/src/inspection/extension_methods.rs, crates/bevy_remote/src/inspection_methods.rs, crates/bevy_dev_tools/src/inspection/world_summary.rs, crates/bevy_remote/src/client.rs, crates/bevy_dev_tools/src/inspection/entity_inspection.rs, crates/bevy_remote/src/stepping_methods.rs (+1 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 9 significant file(s) lose their only recent owner: crates/bevy_solari/src/scene/binder/tlas.rs, crates/bevy_solari/src/scene/binder/lights.rs, crates/bevy_solari/src/scene/binder/instances.rs, crates/bevy_solari/src/realtime/prepare.rs, crates/bevy_solari/src/scene/binder/bind_group.rs, crates/bevy_solari/src/scene/binder/assets.rs, crates/bevy_solari/src/scene/blas.rs, crates/bevy_solari/src/scene/binder/mod.rs (+1 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 3 significant file(s) lose their only recent owner: crates/bevy_math/src/rects/rect.rs, crates/bevy_ui/src/layout/clipping.rs, crates/bevy_sprite/src/texture_slice/border_rect.rs. Pair on, review, or document these before any departure.
X7 · Silent fallback defaults · Silent fallback default on Err · ×3
  • Silent fallback default on Err crates/bevy_inspector/src/details_panel.rs:1165 — `inspect_components` turns every `Err` into `Vec::new()` — 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.
  • Silent fallback default on Err crates/bevy_reflect/derive/src/lib.rs:893 — `load_type_registrations` turns every `Err` into `TokenStream::new()` — 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.
  • Silent fallback default on Err crates/bevy_shader/src/shader.rs:31 — `scan_wesl_imports` turns every `Err` into `Vec::new()` — 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.
D30 · Dependency Vulnerabilities · Low CVE · ×2
  • REDACTED
  • REDACTED
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 13 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 (39 single-owned of 1021 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; 1021 of the 1290 production source files in this repository met that bar). They are anonymized user #4 (2 file(s)), anonymized user #5 (2 file(s)), anonymized user #6 (2 file(s)), anonymized user #7 (2 file(s)), anonymized user #8 (2 file(s)), anonymized user #9 (1 file(s)) (+7 more) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: crates/bevy_ecs/src/schedule/graph/dag.rs, crates/bevy_reflect/src/std_traits.rs, crates/bevy_reflect/src/display.rs, crates/bevy_utils/src/memory_size.rs, crates/bevy_asset/src/common_loaders/ron.rs, crates/bevy_reflect/src/serde/de/registrations.rs, crates/bevy_render/src/view/composition.rs, crates/bevy_color/src/primaries.rs (+10 more).
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. 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/`.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 9 of 87 project(s) overshoot their size bounds, lowering Project Cohesion to 8.0/10. The most over is `crates/bevy_ecs` (108859 LoC, 571 module-visible types across 21 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 · Further orphaned files (smaller) · ×1
  • Further orphaned files (smaller) — 88 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: crates/bevy_math/src/compass.rs, crates/bevy_math/src/ops.rs, crates/bevy_shape/src/bounding/bounded3d/extrusion.rs, crates/bevy_gizmos/src/arcs.rs, crates/bevy_tasks/src/iter/mod.rs, crates/bevy_mesh/src/conversions.rs, crates/bevy_mesh/src/primitives/dim3/capsule.rs, crates/bevy_math/src/rects/urect.rs (and 80 more) (95 orphaned of 1021 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; 1021 of the 1290 production source files in this repository met that bar). 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.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • 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.
P10 · Library API & versioning · Large public API surface · ×1
  • Large public API surface — 3579/4852 types (74%) declared in the published library are public. For a library, every public type is a stability contract — keep implementation types off the surface and expose only the intended API.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 44/45 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `crates/bevy_color/crates/gen_tests`.
P6 · Release Hygiene · Changelog looks stale/thin · ×1
  • Changelog looks stale/thin — The changelog this check read carries 0 versioned entries, against a bar of 3. Counted as either the distinct `x.y.z` versions it names (a link's target is not counted) or its version-shaped section headings (`## [1.2.0]`, `## V14.x.x`, `## Updates in 8.0.x`), whichever is the larger — so a log sectioned by minor series counts its sections, not its individual patch numbers. Entries recorded somewhere this check does not read — release notes generated at tag time from a generator config it did not recognise, or a log kept outside the repository — are not counted here, and this row is about what is re-findable in the tree rather than about how often you release.
S1 · Web-Security Posture · No security response headers detected · ×1
  • No security response headers detected — None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is set on a response this repository's Rust server sends — defense in depth, even when a proxy could set them. (−2.0 on this card.) The server: `.serve_connection(` (crates/bevy_remote/src/http.rs:295).
S1 · Web-Security Posture · No inbound request validation detected · ×1
  • No inbound request validation detected — No handler of this repository's Rust server answers 400, 413 or 422 (`StatusCode::BAD_REQUEST`, `HttpResponse::BadRequest()`, `Status::BadRequest`, tonic `Status::invalid_argument`), and nothing declares validation — no `validator`/`garde` derive, no body limit (`DefaultBodyLimit::max`, `RequestBodyLimitLayer`, `JsonConfig::default().limit(…)`, Rocket `Limits`) — nothing shows inbound requests being checked, and refused, before a handler acts on them. A check that answers its failure with 200 and an error body is not seen. (−2.0 on this card.) The server: `.serve_connection(` (crates/bevy_remote/src/http.rs:295).

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.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-829bd94997044a7f97260a0f3e484a31/history.json --exit-code 0 --source .1artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-829bd94997044a7f97260a0f3e484a31/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .68artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update23artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—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.0—
D40 · Network Egress Confinementruntime-hardening—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.0—
D41 · Kernel & Syscall Confinementruntime-hardening—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.0—
D42 · Runtime Threat Enforcementruntime-hardening—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.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update0artifacts/raw/trivy-fs.json

Run 01a17510-38a3-7d5c-88e5-c17e4471b9f9 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

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.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md