Public report of astral-sh/uv, 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, 20:50 UTC · Survey ID cd_8aea6759e7a543e8bf11a031206ab3f5

astral-sh/uv

Measured 25 October 2026, 20:42 UTC, at code version 84515f7

No regression 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 68out of 100 Strong
CriticalWeakAdequateStrongExemplary
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 large codebase: 291,542 lines of product code in 100 projects, tests not counted · Estimated rebuild effort: about 4.5 person-years · Weakest lens: Code Health, 63

Findings by how serious they are

46 critical 1673 serious 104 minor

11 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, 20:42 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.

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 ▸

69of 69 dimensions measured by tools.
1738of 1823 findings point to an exact file and line, so you can open each one in the code. The other 85 concern the repository as a whole, such as missing documentation.
69dimensions across 8 lenses, read from 291,542 lines of product code in 100 projects.
Chapters

Executive summary

astral-sh/uv meets our standard for a preview release. It scores 68 out of 100 and is rated Strong, and 45 of its 46 critical findings are security problems.

Code Health, at 63, is the weakest lens by a small margin, and the weakest lens counts most in the score. The best first step for the work it takes is recording design decisions, worth about 3 points. Writing log messages as searchable templates would lift Code Health itself, worth about 4 points.

Twenty-four secrets can leak from the build pipeline. Six pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with, and six settings leave the servers or containers unsafe. Limiting each secret to its own step, pinning each tool to an exact version and correcting the unsafe settings would close these risks. Fixing the weaknesses the scanner points to would fix the five security weaknesses in the code, and the three pipeline steps that run downloads without checking them need each download checked against a known checksum first. The part of the code nobody has worked on for a long time needs someone to learn and document it before anyone changes it.

The product code is 291,542 lines, about €650,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.
Code Health 63 · counts for 45%Production Readiness 64 · counts for 25%Maturity 65 · counts for 14%Security and Compliance 81 · counts for 8%Performance 94 · counts for 4%Architecture 96 · counts for 2%Domain Modelling 100 · counts for 1%Event Sourcing 100 · counts for 1%

The weakest lenses score close to each other, so improving any of them moves the score.

Code composition: what the lines of code are
Product code 56%Tests 44%
New since the last survey: 97 findings

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

  • Cyclomatic Complexity · VariantsJsonContent::try_from (cyclomatic 23) crates/uv-distribution-types/src/variants_json.rs
  • Cyclomatic Complexity · ResolverState::choose_version_registry (cyclomatic 19) crates/uv-resolver/src/resolver/mod.rs
  • Cyclomatic Complexity · uv_client::retry::retryable_on_request_failure_inner (cyclomatic 17) crates/uv-client/src/retry.rs
  • Cyclomatic Complexity · uv_lock::lock::export::resolve_marker_bindings (cyclomatic 17) crates/uv-lock/src/lock/export/mod.rs
  • Cognitive Complexity · VariantsJsonContent::try_from (cognitive 40) crates/uv-distribution-types/src/variants_json.rs
  • Cognitive Complexity · uv_client::retry::retryable_on_request_failure_inner (cognitive 30) crates/uv-client/src/retry.rs
  • Cognitive Complexity · uv_lock::lock::export::resolve_marker_bindings (cognitive 30) crates/uv-lock/src/lock/export/mod.rs
  • Cognitive Complexity · ScriptEnvironment::get_or_init (cognitive 29) crates/uv-environment-operations/src/lib.rs
  • Cognitive Complexity · uv_metadata::read_metadata_async_stream (cognitive 29) crates/uv-metadata/src/lib.rs
  • Cognitive Complexity · GatheredCredentials::gather (cognitive 22) crates/uv-publish-commands/src/lib.rs
  • Cognitive Complexity · VersionMapLazy::get_simple (cognitive 20) crates/uv-resolver/src/version_map.rs
  • Cognitive Complexity · WheelFilename::parse (cognitive 19) crates/uv-distribution-filename/src/wheel.rs
  • Cognitive Complexity · UnsupportedVariantProperties::fmt (cognitive 18) crates/uv-distribution-types/src/variants_json.rs
  • Cognitive Complexity · ServerIndex::new (cognitive 16) crates/uv-test/src/packse/server.rs
  • God Classes · TooManyMethods: SafeUrl crates/uv-redacted/src/lib.rs
  • God Classes · FileTooLong: export/mod.rs crates/uv-lock/src/lock/export/mod.rs
  • God Classes · MethodTooLong: WheelFilename.parse crates/uv-distribution-filename/src/wheel.rs
  • God Classes · MethodTooLong: ScriptEnvironment.get_or_init crates/uv-environment-operations/src/lib.rs
  • God Classes · FileTooLong: src/site_packages.rs crates/uv-installer/src/site_packages.rs
  • Code Duplication · Members sharing a duplicated core (10 members, 50+ identical tokens) crates/uv-distribution/src/source/mod.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) crates/uv-settings/src/settings.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) crates/uv-build-commands/src/lib.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) crates/uv-distribution/src/distribution_database.rs
  • Code Duplication · Duplicated block (44 lines × 2) crates/uv-installer/src/satisfies.rs
  • Code Duplication · Duplicated block (33–35 lines × 2) crates/uv-pypi-types/src/metadata/metadata_resolver.rs
  • Code Duplication · Duplicated block (21 lines × 2) crates/uv-auth/src/keyring.rs
  • Code Duplication · Duplicated block (18 lines × 2) crates/uv-installer/src/satisfies.rs
  • Code Duplication · Duplicated block (17 lines × 3) crates/uv-distribution-types/src/requirement.rs
  • Code Duplication · Duplicated block (17 lines × 2) crates/uv/src/bin/uvw.rs
  • Code Duplication · Duplicated block (16 lines × 2) crates/uv-project-commands/src/run.rs
  • Code Duplication · Duplicated block (15 lines × 2) crates/uv/src/bin/uvw.rs
  • Code Duplication · Duplicated block (13 lines × 2) crates/uv-build-backend/src/wheel.rs
  • Code Duplication · Duplicated block (13 lines × 2) crates/uv-client/src/registry_client.rs
  • Code Duplication · Duplicated block (12–13 lines × 2) crates/uv-client/src/registry_client.rs
  • Code Duplication · Duplicated block (12–13 lines × 2) crates/uv-workspace/src/pyproject.rs
  • Code Duplication · Duplicated block (12–13 lines × 2) crates/uv-workspace/src/pyproject.rs
  • Code Duplication · Duplicated block (12 lines × 2) crates/uv-build-frontend/src/lib.rs
  • Code Duplication · Duplicated block (10 lines × 2) crates/uv-client/src/registry_client.rs
  • Code Duplication · Duplicated block (10 lines × 2) crates/uv-lock/src/lock/export/mod.rs
  • Code Duplication · Duplicated block (10 lines × 2) crates/uv-lock/src/lock/export/requirements_txt.rs
  • Code Duplication · Duplicated block (10 lines × 2) crates/uv-workspace/src/pyproject.rs
  • Code Duplication · Duplicated block (7 lines × 2) crates/uv-client/src/registry_client.rs
  • Code Duplication · Duplicated block (7 lines × 2) crates/uv-lock/src/lock/mod.rs
  • Code Duplication · Duplicated block (5–6 lines × 2) crates/uv-client/src/base_client.rs
  • Code Duplication · Duplicated block (5 lines × 2) crates/uv-lock/src/lock/export/pylock_toml.rs
  • Code Duplication · Duplicated block (5 lines × 2) crates/uv-resolver/src/pubgrub/report.rs
  • Code Duplication · Duplicated block (15 lines × 3) crates/uv-workspace/src/pyproject.rs
  • Code Duplication · Duplicated block (12 lines × 2) crates/uv-build-frontend/src/lib.rs
  • Code Duplication · Duplicated block (9 lines × 2) crates/uv-lock/src/lock/export/pylock_toml.rs
  • Code Duplication · Duplicated block (9 lines × 3) crates/uv-lock/src/lock/export/pylock_toml.rs
  • Code Duplication · Duplicated block (8 lines × 2) crates/uv-lock/src/lock/export/pylock_toml.rs
  • Coupling · Unstable project uv-bin-install
  • Churn × Complexity Hotspots · Hotspot: crates/uv-resolver/src/prioritized_distribution.rs crates/uv-resolver/src/prioritized_distribution.rs
  • Churn × Complexity Hotspots · Hotspot: crates/uv-publish/src/lib.rs crates/uv-publish/src/lib.rs
  • Churn × Complexity Hotspots · Hotspot: crates/uv-python-types/src/request.rs crates/uv-python-types/src/request.rs
  • Churn × Complexity Hotspots · Hotspot: crates/uv-distribution-types/src/variants_json.rs crates/uv-distribution-types/src/variants_json.rs
  • Churn × Complexity Hotspots · Hotspot: crates/uv-distribution-types/src/requirement.rs crates/uv-distribution-types/src/requirement.rs
  • Churn × Complexity Hotspots · Hotspot: crates/uv-distribution-types/src/installed.rs crates/uv-distribution-types/src/installed.rs
  • Churn × Complexity Hotspots · Hotspot: crates/uv-pep508/src/marker/simplify.rs crates/uv-pep508/src/marker/simplify.rs
  • Churn × Complexity Hotspots · Hotspot: crates/uv-lock/src/lock/export/requirements_txt.rs crates/uv-lock/src/lock/export/requirements_txt.rs
  • Explicit Debt · TodoComment crates/uv-workspace-commands/src/environment.rs
  • Explicit Debt · TodoComment crates/uv-torch/src/nvidia.rs
  • Explicit Debt · TodoComment crates/uv-static/src/env_vars.rs
  • Explicit Debt · TodoComment crates/uv-static/src/env_vars.rs
  • Explicit Debt · TodoComment crates/uv-resolver/src/resolver/mod.rs
  • Explicit Debt · TodoComment crates/uv-resolver/src/resolver/mod.rs
  • Explicit Debt · TodoComment crates/uv-resolve-operations/src/latest.rs
  • Explicit Debt · TodoComment crates/uv-python-interpreter/src/environment.rs
  • Explicit Debt · TodoComment crates/uv-lock/src/lock/mod.rs
  • Explicit Debt · TodoComment crates/uv-installer/src/plan.rs
  • Explicit Debt · TodoComment crates/uv-installer/src/satisfies.rs
  • Explicit Debt · TodoComment crates/uv-installer/src/satisfies.rs
  • Explicit Debt · TodoComment crates/uv-distribution-types/src/variants_json.rs
  • Explicit Debt · TodoComment crates/uv-distribution-types/src/variants_json.rs
  • Explicit Debt · TodoComment crates/uv-distribution-filename/src/wheel.rs
  • Explicit Debt · TodoComment crates/uv-distribution-filename/src/wheel.rs
  • Explicit Debt · TodoComment crates/uv-distribution/src/distribution_database.rs
  • Explicit Debt · TodoComment crates/uv-distribution/src/distribution_database.rs
  • Explicit Debt · TodoComment crates/uv-distribution/src/variant/mod.rs
  • Explicit Debt · TodoComment crates/uv-distribution/src/variant/mod.rs
  • Explicit Debt · TodoComment crates/uv-distribution/src/variant/nvidia.rs
  • Explicit Debt · TodoComment crates/uv-distribution/src/variant/nvidia.rs
  • Explicit Debt · TodoComment crates/uv-client/src/registry_client.rs
  • Explicit Debt · TodoComment crates/uv-auth/src/store.rs
  • Dependency Vulnerabilities · REDACTED
  • Dependency Vulnerabilities · REDACTED
  • Dependency Vulnerabilities · REDACTED
  • Dependency Vulnerabilities · REDACTED
  • Dependency Vulnerabilities · REDACTED
  • Dependency Vulnerabilities · REDACTED
  • Knowledge Freshness · Orphaned knowledge crates/uv-keyring/src/secret_service.rs
  • Change Coupling · Change coupling: download.rs ↔ mod.rs crates/uv-distribution/src/download.rs
  • Change Coupling · Change coupling: lib.rs ↔ mod.rs crates/uv-cli/src/lib.rs
  • Change Coupling · Change coupling: freeze.rs ↔ list.rs crates/uv-pip-commands/src/freeze.rs
  • Change Coupling · Change coupling: validate_zip.rs ↔ distribution_database.rs crates/uv-dev/src/validate_zip.rs
  • Change Coupling · Change coupling: error.rs ↔ derivation.rs crates/uv-resolver/src/error.rs
  • Change Coupling · Change coupling: derivation.rs ↔ diagnostics.rs crates/uv-resolver/src/resolver/derivation.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: 71 findings

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

  • Cyclomatic Complexity · uv_resolver_types::universal_marker::resolve_activated_extras (cyclomatic 24) crates/uv-resolver-types/src/universal_marker.rs
  • Cyclomatic Complexity · Accelerator::detect (cyclomatic 23) crates/uv-torch/src/accelerator.rs
  • Cyclomatic Complexity · uv_lock::lock::export::conflict_marker_reachability (cyclomatic 19) crates/uv-lock/src/lock/export/mod.rs
  • Cyclomatic Complexity · uv_publish_commands::gather_credentials (cyclomatic 19) crates/uv-publish-commands/src/lib.rs
  • Cyclomatic Complexity · uv_resolver::resolver::find_environments (cyclomatic 18) crates/uv-resolver/src/resolver/mod.rs
  • Cyclomatic Complexity · VersionRequest::from_str (cyclomatic 17) crates/uv-python-types/src/request.rs
  • Cyclomatic Complexity · prune_cargo_workspace_cache.prune_workspace_fingerprints (cyclomatic 17) scripts/prune_cargo_workspace_cache.py
  • Cyclomatic Complexity · uv_resolver::resolution::output::from_state (cyclomatic 16) crates/uv-resolver/src/resolution/output.rs
  • Cognitive Complexity · uv_resolver_types::universal_marker::resolve_activated_extras (cognitive 67) crates/uv-resolver-types/src/universal_marker.rs
  • Cognitive Complexity · uv_publish_commands::gather_credentials (cognitive 29) crates/uv-publish-commands/src/lib.rs
  • Cognitive Complexity · prune_cargo_workspace_cache.prune_workspace_fingerprints (cognitive 27) scripts/prune_cargo_workspace_cache.py
  • Cognitive Complexity · uv_client::retry::retryable_on_request_failure (cognitive 26) crates/uv-client/src/retry.rs
  • Cognitive Complexity · ForkState::visit_package_version_dependencies (cognitive 26) crates/uv-resolver/src/resolver/mod.rs
  • Cognitive Complexity · uv_resolver::resolution::output::from_state (cognitive 25) crates/uv-resolver/src/resolution/output.rs
  • Cognitive Complexity · GitSource::fetch (cognitive 24) crates/uv-git/src/source.rs
  • Cognitive Complexity · uv_test::packse::server::build_server_index (cognitive 21) crates/uv-test/src/packse/server.rs
  • Cognitive Complexity · ComponentBuilder::create_component_from_package (cognitive 20) crates/uv-lock/src/lock/export/cyclonedx_json.rs
  • Cognitive Complexity · UvFormat::format_event (cognitive 20) crates/uv-logging/src/lib.rs
  • Cognitive Complexity · VersionRequest::from_str (cognitive 19) crates/uv-python-types/src/request.rs
  • Cognitive Complexity · uv_git::git::fetch (cognitive 18) crates/uv-git/src/git.rs
  • God Classes · FunctionTooLong: uv_lock::lock::export::cyclonedx_json::from_lock crates/uv-lock/src/lock/export/cyclonedx_json.rs
  • God Classes · FileTooLong: src/git.rs crates/uv-git/src/git.rs
  • Code Duplication · Members sharing a duplicated core (10 members, 50+ identical tokens) crates/uv-distribution/src/source/mod.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) crates/uv-settings/src/settings.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) crates/uv-build-commands/src/lib.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) crates/uv-distribution/src/distribution_database.rs
  • Code Duplication · Duplicated block (37 lines × 2) crates/uv/src/bin/uvw.rs
  • Code Duplication · Duplicated block (35 lines × 2) crates/uv-installer/src/satisfies.rs
  • Code Duplication · Duplicated block (33–35 lines × 2) crates/uv-pypi-types/src/metadata/metadata_resolver.rs
  • Code Duplication · Duplicated block (21 lines × 2) crates/uv-auth/src/keyring.rs
  • Code Duplication · Duplicated block (19 lines × 2) crates/uv-lock/src/lock/export/mod.rs
  • Code Duplication · Duplicated block (17 lines × 2) crates/uv-workspace/src/pyproject.rs
  • Code Duplication · Duplicated block (16 lines × 2) crates/uv-installer/src/satisfies.rs
  • Code Duplication · Duplicated block (16 lines × 2) crates/uv-lock/src/lock/export/mod.rs
  • Code Duplication · Duplicated block (16 lines × 2) crates/uv-project-commands/src/run.rs
  • Code Duplication · Duplicated block (15 lines × 3) crates/uv-resolver-types/src/universal_marker.rs
  • Code Duplication · Duplicated block (15 lines × 2) crates/uv-build-backend/src/wheel.rs
  • Code Duplication · Duplicated block (14 lines × 3) crates/uv-distribution-types/src/requirement.rs
  • Code Duplication · Duplicated block (9–13 lines × 2) crates/uv-lock/src/lock/mod.rs
  • Code Duplication · Duplicated block (13 lines × 2) crates/uv-project-commands/src/run.rs
  • Code Duplication · Duplicated block (13 lines × 2) crates/uv-test/src/packse/server.rs
  • Code Duplication · Duplicated block (12 lines × 2) crates/uv-build-frontend/src/lib.rs
  • Code Duplication · Duplicated block (12 lines × 2) crates/uv-resolver/src/pubgrub/priority.rs
  • Code Duplication · Duplicated block (11 lines × 2) crates/uv-build-frontend/src/lib.rs
  • Code Duplication · Duplicated block (10–11 lines × 2) crates/uv-workspace/src/pyproject.rs
  • Code Duplication · Duplicated block (10 lines × 2) crates/uv-client/src/registry_client.rs
  • Code Duplication · Duplicated block (9–10 lines × 2) crates/uv-lock/src/lock/export/mod.rs
  • Code Duplication · Duplicated block (10 lines × 2) crates/uv-lock/src/lock/export/requirements_txt.rs
  • Code Duplication · Duplicated block (7–10 lines × 2) crates/uv-resolver/src/resolver/mod.rs
  • Code Duplication · Duplicated block (8 lines × 2) crates/uv-lock/src/lock/export/pylock_toml.rs
  • Code Duplication · Duplicated block (5 lines × 2) crates/uv-pypi-types/src/parsed_url.rs
  • Code Duplication · Duplicated block (16 lines × 3) crates/uv-workspace/src/pyproject.rs
  • Code Duplication · Duplicated block (13 lines × 2) crates/uv-pip-commands/src/uninstall.rs
  • Code Duplication · Duplicated block (11 lines × 2) crates/uv-lock/src/lock/export/pylock_toml.rs
  • Code Duplication · Duplicated block (5 lines × 4) crates/uv-distribution-types/src/config_settings.rs
  • Coupling · Off the main sequence: uv-redacted
  • Coupling · Off the main sequence: uv-git-types
  • Churn × Complexity Hotspots · Hotspot: crates/uv-publish-commands/src/lib.rs crates/uv-publish-commands/src/lib.rs
  • Churn × Complexity Hotspots · Hotspot: crates/uv-build-frontend/src/lib.rs crates/uv-build-frontend/src/lib.rs
  • Churn × Complexity Hotspots · Hotspot: crates/uv-resolver-types/src/universal_marker.rs crates/uv-resolver-types/src/universal_marker.rs
  • Churn × Complexity Hotspots · Hotspot: scripts/sync-python-version-constants.py scripts/sync-python-version-constants.py
  • Churn × Complexity Hotspots · Hotspot: crates/uv-project-commands/src/format.rs crates/uv-project-commands/src/format.rs
  • Churn × Complexity Hotspots · Hotspot: crates/uv-dev/src/lib.rs crates/uv-dev/src/lib.rs
  • Explicit Debt · TodoComment crates/uv-auth/src/store.rs
  • Explicit Debt · TodoComment crates/uv-distribution/src/distribution_database.rs
  • Explicit Debt · TodoComment crates/uv-installer/src/satisfies.rs
  • Explicit Debt · TodoComment crates/uv-python-interpreter/src/environment.rs
  • Explicit Debt · TodoComment crates/uv-python-interpreter/src/environment.rs
  • Explicit Debt · TodoComment crates/uv-workspace-commands/src/module_owners.rs
  • Change Coupling · Change coupling: algebra.rs ↔ simplify.rs crates/uv-pep508/src/marker/algebra.rs
  • Change Coupling · Change coupling: osv.rs ↔ audit.rs crates/uv-audit/src/service/osv.rs
Rebuild cost: about €650,000 · Estimate
Cost to rebuild€220,000 to €1,100,000, for 3,592 to 11,394 hours of work, about 4.5 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.9 at a score of 68. 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.
SizeLarge: 291,542 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
Resolve the 1 No ADRs found finding(s) in ADR Quality.
Raises the score by about 3 points · Low effort · ADR Quality
2
Interpolated log message defeats structured logging
Raises the score by about 4 points · Medium effort · Structured logging
3
Record your significant design decisions.
Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Raises the score by about 3 points · Medium effort · Architecture documentation

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 €650,000 to build again, about 4.5 person-years of work. Its weakest lens is Code Health, at 63 (Adequate). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Resolve the 1 No ADRs found finding(s) in ADR Quality. Of all the actions in this report, it raises the score most for the work it takes: about 3 points for low effort, because it clears the 1 ADR Quality findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.6 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 4% to 8% on every change. The history of the code shows how much it changes: about 291,259 lines over the last 90 days, which is about 1,181,217 lines a year. At that pace, the extra work comes to an estimated 105 to 630 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 uv uv uv-cache uv-cache uv->uv-cache uv-client uv-client uv->uv-client uv-configuration uv-configuration uv->uv-configuration uv-distribution uv-distribution uv->uv-distribution uv-distribution-types uv-distribution-types uv->uv-distribution-types uv-environment-operations uv-environment-operations uv->uv-environment-operations uv-fs uv-fs uv->uv-fs uv-installer uv-installer uv->uv-installer uv-lock uv-lock uv->uv-lock uv-normalize uv-normalize uv->uv-normalize uv-pep440 uv-pep440 uv->uv-pep440 uv-pip-commands uv-pip-commands uv->uv-pip-commands uv-project-commands uv-project-commands uv->uv-project-commands uv-pypi-types uv-pypi-types uv->uv-pypi-types uv-resolver uv-resolver uv->uv-resolver uv-static uv-static uv->uv-static uv-tool-commands uv-tool-commands uv->uv-tool-commands uv-warnings uv-warnings uv->uv-warnings uv-workspace uv-workspace uv->uv-workspace uv-cache->uv-distribution-types uv-cache->uv-fs uv-cache->uv-normalize uv-cache->uv-pypi-types uv-cache->uv-static uv-client->uv-cache uv-client->uv-configuration uv-client->uv-distribution-types uv-client->uv-fs uv-client->uv-normalize uv-client->uv-pep440 uv-client->uv-pypi-types uv-client->uv-static uv-client->uv-warnings uv-configuration->uv-cache uv-configuration->uv-distribution-types uv-configuration->uv-fs uv-configuration->uv-normalize uv-configuration->uv-pep440 uv-configuration->uv-pypi-types uv-configuration->uv-static uv-configuration->uv-warnings uv-distribution->uv-cache uv-distribution->uv-client uv-distribution->uv-configuration uv-distribution->uv-distribution-types uv-distribution->uv-fs uv-distribution->uv-normalize uv-distribution->uv-pep440 uv-distribution->uv-pypi-types uv-distribution->uv-static uv-distribution->uv-workspace uv-distribution-types->uv-fs uv-distribution-types->uv-normalize uv-distribution-types->uv-pep440 uv-distribution-types->uv-pypi-types uv-distribution-types->uv-warnings uv-environment-operations->uv-cache uv-environment-operations->uv-client uv-environment-operations->uv-configuration uv-environment-operations->uv-distribution uv-environment-operations->uv-distribution-types uv-environment-operations->uv-fs uv-environment-operations->uv-installer uv-environment-operations->uv-lock uv-environment-operations->uv-normalize uv-environment-operations->uv-pep440 uv-environment-operations->uv-pypi-types uv-environment-operations->uv-resolver uv-environment-operations->uv-warnings uv-environment-operations->uv-workspace uv-fs->uv-static uv-fs->uv-warnings uv-installer->uv-cache uv-installer->uv-configuration uv-installer->uv-distribution uv-installer->uv-distribution-types uv-installer->uv-fs uv-installer->uv-normalize uv-installer->uv-pep440 uv-installer->uv-pypi-types uv-installer->uv-static uv-installer->uv-warnings uv-lock->uv-client uv-lock->uv-configuration uv-lock->uv-distribution uv-lock->uv-distribution-types uv-lock->uv-fs uv-lock->uv-normalize uv-lock->uv-pep440 uv-lock->uv-pypi-types uv-lock->uv-warnings uv-lock->uv-workspace uv-pip-commands->uv-cache uv-pip-commands->uv-client uv-pip-commands->uv-configuration uv-pip-commands->uv-distribution uv-pip-commands->uv-distribution-types uv-pip-commands->uv-fs uv-pip-commands->uv-installer uv-pip-commands->uv-lock uv-pip-commands->uv-normalize uv-pip-commands->uv-pep440 uv-pip-commands->uv-pypi-types uv-pip-commands->uv-resolver uv-pip-commands->uv-static uv-pip-commands->uv-warnings uv-pip-commands->uv-workspace uv-project-commands->uv-cache uv-project-commands->uv-client uv-project-commands->uv-configuration uv-project-commands->uv-distribution uv-project-commands->uv-distribution-types uv-project-commands->uv-environment-operations uv-project-commands->uv-fs uv-project-commands->uv-installer uv-project-commands->uv-lock uv-project-commands->uv-normalize uv-project-commands->uv-pep440 uv-project-commands->uv-pypi-types uv-project-commands->uv-resolver uv-project-commands->uv-static uv-project-commands->uv-warnings uv-project-commands->uv-workspace uv-pypi-types->uv-normalize uv-pypi-types->uv-pep440 uv-resolver->uv-cache uv-resolver->uv-client uv-resolver->uv-configuration uv-resolver->uv-distribution uv-resolver->uv-distribution-types uv-resolver->uv-fs uv-resolver->uv-normalize uv-resolver->uv-pep440 uv-resolver->uv-pypi-types uv-resolver->uv-static uv-resolver->uv-warnings uv-tool-commands->uv-cache uv-tool-commands->uv-client uv-tool-commands->uv-configuration uv-tool-commands->uv-distribution uv-tool-commands->uv-distribution-types uv-tool-commands->uv-environment-operations uv-tool-commands->uv-fs uv-tool-commands->uv-installer uv-tool-commands->uv-lock uv-tool-commands->uv-normalize uv-tool-commands->uv-pep440 uv-tool-commands->uv-pypi-types uv-tool-commands->uv-resolver uv-tool-commands->uv-static uv-tool-commands->uv-warnings uv-tool-commands->uv-workspace uv-workspace->uv-cache uv-workspace->uv-configuration uv-workspace->uv-distribution-types uv-workspace->uv-fs uv-workspace->uv-normalize uv-workspace->uv-pep440 uv-workspace->uv-pypi-types uv-workspace->uv-static uv-workspace->uv-warnings __more__ +80 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.

659 modules, with 3807 dependencies between them. 3 loops run through 261 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 619 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 uv_python_types.target2 uv_audit_operations.sarif3 uv_configuration.concurrency4 uv_errors5 uv_normalize.package_name6 uv_pep440.version7 uv_preview8 uv_python_types.architecture9 uv_redacted10 uv_client.base_client11 uv_configuration.build_options12 uv_distribution_filename.wheel13 uv_pep440.version_specifier14 uv_pep508.marker.tree15 uv_distribution_types16 uv_distribution_types.requirement17 uv_python_types.request18 uv_client.registry_client19 uv_python_interpreter.interpreter20 uv_workspace.workspace21 uv_build_frontend22 uv_distribution.distribution_database23 uv_pypi_types.simple_json24 uv_dispatch25 uv_lock.lock26 uv_settings.resolved27 uv_build_commands28 uv_workspace.pyproject29 uv_settings.settings30 uv_distribution_types.index_url31 uv_cli32 uv_cache33 uv_audit.service.osv34 uv_cli.settings35 uv_install_operations36 uv_pip_commands.compile37 uv_pip_commands.install38 uv_environment_operations39 uv_resolver.resolver40 uv_tool_commands.common
1 uv_python_types.target
2 uv_audit_operations.sarif2
3 uv_configuration.concurrency1
4 uv_errors6
5 uv_normalize.package_name1
6 uv_pep440.version1133
7 uv_preview4
8 uv_python_types.architecture1
9 uv_redacted21
10 uv_client.base_client6143
11 uv_configuration.build_options3
12 uv_distribution_filename.wheel211
13 uv_pep440.version_specifier1854
14 uv_pep508.marker.tree1122
15 uv_distribution_types17146355
16 uv_distribution_types.requirement2111
17 uv_python_types.request832
18 uv_client.registry_client7414421126531
19 uv_python_interpreter.interpreter16411331
20 uv_workspace.workspace941441
21 uv_build_frontend633431222
22 uv_distribution.distribution_database41111142131
23 uv_pypi_types.simple_json1221
24 uv_dispatch2112131111131
25 uv_lock.lock212972234827617296
26 uv_settings.resolved4141212
27 uv_build_commands512211131213211111
28 uv_workspace.pyproject2122323131
29 uv_settings.settings981484692
30 uv_distribution_types.index_url11111
31 uv_cli1102512114421
32 uv_cache1631
33 uv_audit.service.osv1122
34 uv_cli.settings13611611132122214433635017
35 uv_install_operations42212222212
36 uv_pip_commands.compile1111111212111111
37 uv_pip_commands.install11121111212111111
38 uv_environment_operations251114410234233411
39 uv_resolver.resolver52411153
40 uv_tool_commands.common41221131142121212141
Uses a module listed above itPart of a loopThe module itself
1 uv_python_types.target2 uv_audit_operations.sarif3 uv_configuration.concurrency4 uv_errors5 uv_normalize.package_name6 uv_pep440.version7 uv_preview8 uv_python_types.architecture9 uv_redacted10 uv_client.base_client11 uv_configuration.build_options12 uv_distribution_filename.wheel13 uv_pep440.version_specifier14 uv_pep508.marker.tree15 uv_distribution_types16 uv_distribution_types.requirement17 uv_python_types.request18 uv_client.registry_client19 uv_python_interpreter.interpreter20 uv_workspace.workspace21 uv_build_frontend22 uv_distribution.distribution_database23 uv_pypi_types.simple_json24 uv_dispatch25 uv_lock.lock26 uv_settings.resolved27 uv_build_commands28 uv_workspace.pyproject29 uv_settings.settings30 uv_distribution_types.index_url31 uv_cli32 uv_cache33 uv_audit.service.osv34 uv_cli.settings35 uv_install_operations36 uv_pip_commands.compile37 uv_pip_commands.install38 uv_environment_operations39 uv_resolver.resolver40 uv_tool_commands.commonuv_python_types.target1uv_audit_operations.sarif2uv_configuration.concurrency3uv_errors4uv_normalize.package_name5uv_pep440.version6uv_preview7uv_python_types.architecture8uv_redacted9uv_client.base_client10uv_configuration.build_options11uv_distribution_filename.wheel12uv_pep440.version_specifier13uv_pep508.marker.tree14uv_distribution_types15uv_distribution_types.requirement16uv_python_types.request17uv_client.registry_client18uv_python_interpreter.interpreter19uv_workspace.workspace20uv_build_frontend21uv_distribution.distribution_database22uv_pypi_types.simple_json23uv_dispatch24uv_lock.lock25uv_settings.resolved26uv_build_commands27uv_workspace.pyproject28uv_settings.settings29uv_distribution_types.index_url30uv_cli31uv_cache32uv_audit.service.osv33uv_cli.settings34uv_install_operations35uv_pip_commands.compile36uv_pip_commands.install37uv_environment_operations38uv_resolver.resolver39uv_tool_commands.common4021611133412161433211185411221714635521118327414421126531164113319414416334312224111114213112212112131111131212972234827617296414121251221113121321111121223231319814846921111111025121144211631112213611611132122214433635017422122222121111111212111111111211112121111112511144102342334115241115341221131142121212141+619 more modules (most-connected shown)

At a glance — Code Health · 63% · Adequate · gated by D2, X4 ·

At a glance — Architecture · 96% · Exemplary ·

At a glance — Maturity · 65% · Adequate · gated by M2 ·

At a glance — Readiness · 64% · Strong ·

At a glance — Security · 81% · Adequate · gated by D29 ·

At a glance — Domain Modelling · 100% · Exemplary ·

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

At a glance — Performance · 94% · 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 — Injection42High / Critical
A03:2025 — Software Supply Chain Failures21Medium
A02:2025 — Security Misconfiguration9High / Critical

Roadmap

Begin by fixing the 1,030 instances of interpolated logging to enable proper structured logging, and address the single missing architecture decision record. Next, document your disaster recovery strategy by defining RTO/RPO targets and a tested restore procedure, ensuring this goes beyond simple backup configurations. Finally, reduce the cognitive complexity of the 15 most complex code bodies to 120 or less, prioritizing the highest-complexity functions to significantly improve overall maintainability.

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

Do thisHelpsEffortDimension
Resolve the 1 No ADRs found finding(s) in ADR Quality.+3.3 ptsLowADR Quality
Interpolated log message defeats structured logging+3.6 ptsMediumStructured logging
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.+3.0 ptsMediumArchitecture documentation
Resolve the 1 Orphaned knowledge finding(s) in Knowledge Freshness — start with secret_service.rs.+0.9 ptsLowKnowledge Freshness
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).+1.4 ptsMediumDR & Backup
Bring the 15 bodies over 120 down to 120 or less in Cognitive Complexity — start with uv_extract::stream::unzip_inner (cognitive 301), uv_project_commands::run::run (cognitive 273), LockedDependencyBuilder::add_requirements (cognitive 260).+1.3 ptsHighCognitive Complexity
Bring the 1 body over 120 down to 120 or less in Cyclomatic Complexity — start with uv::run (cyclomatic 195).+0.6 ptsMediumCyclomatic Complexity
Enable Dependabot/Renovate or a dependency-review gate.+1.0 ptsMediumSecurity & performance tooling

File quality

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

FileScoreBandWorst signal
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED3.7MixedIaC & Container Security: High IaC: REDACTED
REDACTED3.7MixedIaC & Container Security: High IaC: REDACTED
REDACTED3.7MixedIaC & Container Security: High IaC: REDACTED
REDACTED4.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
crates/uv-cli/src/lib.rs4.8MixedGod Classes: FileTooLong: src/lib.rs
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
crates/uv-pip-commands/src/install.rs5.5MixedCyclomatic Complexity: uv_pip_commands::install::pip_install (cyclomatic 32)
crates/uv-resolver/src/resolution/display.rs5.6MixedCyclomatic Complexity: DisplayResolutionGraph::fmt (cyclomatic 31)
crates/uv-distribution/src/index/built_wheel_index.rs5.6MixedCognitive Complexity: BuiltWheelIndex::find (cognitive 17)
crates/uv-resolver/src/error.rs5.6MixedCognitive Complexity: uv_resolver::error::drop_root_dependency_on_project (cognitive 33)
crates/uv-pip-commands/src/freeze.rs5.7MixedCognitive Complexity: uv_pip_commands::freeze::pip_freeze (cognitive 17)
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedDependency Vulnerabilities: Medium CVE: REDACTED
crates/uv-pip-commands/src/sync.rs5.9MixedCyclomatic Complexity: uv_pip_commands::sync::pip_sync (cyclomatic 23)

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

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

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

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

Could not be resolved — 11

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. 69 of 69 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 — 69 dimensions across the health lenses
D1D2D3D4D5D6D9D12D13D14D15D16D17D19D20D26D28D29D30D31D34D35D36D37D43D44AX10AX3AX4AX8AX9DM4DM5ES1ES2M1M2M3P1P10P2P3P4P5P6PF1PF3S1X1X12X13X14X15X16X17X18X19X21X22X23X24X25X26X27X28X29X3X30X4

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, 1738 of 1823 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 · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ 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 01a174cc-97cd-7d71-aec3-aa28deefe93f.

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: test source is present (.py, .rs) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo. To have real coverage read, produce a coverage report in a standard format (`coverage run -m pytest` then `coverage xml`, or 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. You can widen what we reach: optional: produce a coverage report in a standard format (`coverage run -m pytest` then `coverage xml`, or 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 — then 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 (.py, .rs) and this repository declares a Cargo test suite (repository root, 292 test files), but it was not re-run: its build outgrew the 6 GB scratch ceiling (6.015 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.
  • D14 License Compliance — 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. This repository declares a Python REDACTED/requirements.txt (pip/uv/Poetry), but the licence verdict published here was taken over its crate dependencies. Nothing was read about its Python dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • 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.
  • D32 Data Compliance (PII/GDPR) — 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. `crates/uv-python-managed/fetch-download-metadata.py` produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • 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.
  • AXR1 Runtime accessibility — 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. Render strategy: boot via REDACTED (REDACTED). docker build failed (exit 1) — ve: ubuntu:24.04@sha256:d1e2e92c075e5ca139d51a140fff46f84315c0fdce203eab2807c7e495eff4f9: failed to resolve source metadata for docker.io/library/ubuntu:24.04@sha256:d1e2e92c075e5ca139d51a140fff46f84315c0fdce203eab2807c7e495eff4f9: failed to do request: Head "https://registry-1.docker.io/v2/library/ubuntu/manifests/sha256:d1e2e92c075e5ca139d51a140fff46f84315c0fdce203eab2807c7e495eff4f9": Forbidden; runtime evidence skipped.
  • 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 this repository's Python, Rust is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — 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 this repository's Python, Rust is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • 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. 990 further occurrence(s) are not listed individually; the score already reflects all 1030.
  • 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 Python, Rust is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

Repo exclusion declarations: 19 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.

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.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • 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.
  • 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.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • 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 REDACTED (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.
  • DM4 Rich vs anemic domain model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
  • 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".
  • P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
  • 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.1 / 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.1 / 10 · rule-coverage 100% · ceiling Prevented

181 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was uv::run at 195. A further 20 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 TargetTriple::platform at 77 — they are counted neither in the figure above nor in this dimension's score. 3 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/uv-configuration/src/target_triple.rs (TargetTriple::platform at 77), crates/uv-torch/src/backend.rs (TorchStrategy::from_mode at 53), crates/uv-lock/src/lock/deserialize.rs (DocumentMapAccess::section_key at 16). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

uv_project_commands::run::run (cyclomatic 112) · ×17crates/uv-project-commands/src/run.rs:90
Lock::satisfies (cyclomatic 84) · ×7crates/uv-lock/src/lock/mod.rs:4201
uv_pip_commands::compile::pip_compile (cyclomatic 75) · ×7crates/uv-pip-commands/src/compile.rs:69
uv_tool_commands::install::install (cyclomatic 64) · ×7crates/uv-tool-commands/src/install.rs:63
ResolverState::solve (cyclomatic 40) · ×7crates/uv-resolver/src/resolver/mod.rs:349

+ 99 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 uv::run (cyclomatic 195). — Refactoring it lifts Cyclomatic Complexity from 5.1 to about 5.7/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 Complexity2.0 / 10Critical✓ 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 2.0 / 10 · rule-coverage 100% · ceiling Prevented

325 method(s) exceeded the cognitive complexity threshold of 15; the worst was uv_extract::stream::unzip_inner at 301.

uv_project_commands::run::run (cognitive 273) · ×21crates/uv-project-commands/src/run.rs:90
Lock::satisfies (cognitive 196) · ×11crates/uv-lock/src/lock/mod.rs:4201
uv_tool_commands::install::install (cognitive 147) · ×9crates/uv-tool-commands/src/install.rs:63
uv_pip_commands::compile::pip_compile (cognitive 128) · ×9crates/uv-pip-commands/src/compile.rs:69
uv::run (cognitive 248) · ×8crates/uv/src/lib.rs:134

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

What to do

  1. Bring the 15 bodies over 120 down to 120 or less in Cognitive Complexity — start with uv_extract::stream::unzip_inner (cognitive 301), uv_project_commands::run::run (cognitive 273), LockedDependencyBuilder::add_requirements (cognitive 260). — 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 15 together lifts Cognitive Complexity from 2.0 to about 3.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 Classes7.9 / 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 7.9 / 10 · rule-coverage 100% · ceiling Prevented

282 god class(es) detected.

MethodTooLong: Lock.satisfies · ×83crates/uv-lock/src/lock/mod.rs:4201
FileTooLong: lock/mod.rs · ×82crates/uv-lock/src/lock/mod.rs
FunctionTooLong: uv::run · ×68crates/uv/src/lib.rs:134
ClassTooLong: Lock · ×27crates/uv-lock/src/lock/mod.rs:312
TooManyFields: OptionsWire · ×13crates/uv-settings/src/settings.rs:2644

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

What to do

  1. Resolve the 83 MethodTooLong finding(s) in God Classes — start with mod.rs (27), settings.rs (9), lib.rs (8). — One of this dimension's main actionable groups (83 warning-level).
  2. Resolve the 82 FileTooLong finding(s) in God Classes — start with lib.rs (16), mod.rs (5), install.rs (3). — One of this dimension's main actionable groups (82 warning-level).
  3. Resolve the 68 FunctionTooLong finding(s) in God Classes — start with lib.rs (12), run.rs (3), install.rs (3). — One of this dimension's main actionable groups (68 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.2 / 10Stronggated by 464 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.2 / 10 · rule-coverage 100% · ceiling Verified

450 duplicated block group(s) detected. A further 14 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.

Duplicated block (12 lines × 2) · ×24crates/uv-build-commands/src/lib.rs:307
Duplicated block (10 lines × 2) · ×22crates/uv-cli/src/settings.rs:2552
Duplicated block (8 lines × 2) · ×21crates/uv-build-backend/src/metadata.rs:491
Duplicated block (7 lines × 2) · ×21crates/uv-build-commands/src/lib.rs:644
Duplicated block (11 lines × 2) · ×18crates/uv-build-backend/src/metadata.rs:559

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

What to do

  1. Resolve the 24 Duplicated block (12 lines × 2) finding(s) in Code Duplication — start with lib.rs (8), mod.rs (3), build_requires.rs (2). — One of this dimension's main actionable groups (24 warning-level).
  2. Resolve the 22 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with mod.rs (2), settings.rs, registry_client.rs. — One of this dimension's main actionable groups (22 warning-level).
  3. Resolve the 21 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with lib.rs (4), reporters.rs (2), metadata.rs. — One of this dimension's main actionable groups (21 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.4 / 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.4 / 10 · rule-coverage 100% · ceiling Prevented

100 production modules (Cargo+Python), 0 dependency cycle(s), 18 unstable depended-on module(s). Read from the build's own module declarations; 22 module(s) off the main sequence, with abstractness counted on 78 of the 100 (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: uv-fastid · ×22
Unstable project uv-audit-operations
Unstable project uv-bin-install
Unstable project uv-build-commands
Unstable project uv-build-frontend

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

What to do

  1. Resolve the 22 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (22 warning-level).
  2. Resolve the 1 Unstable project uv-audit-operations finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Unstable project uv-bin-install 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)10.0 / 10Stronggated by 1 serious finding✓ 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 10.0 / 10 · rule-coverage 100% · ceiling Verified

1 of 365 classes have LCOM4 above 3.

Low cohesion: PubGrubPackage (LCOM4 9)crates/uv-resolver/src/pubgrub/package.rs:13

What to do

  1. Resolve the 1 Low cohesion finding(s) in Cohesion (LCOM4) — start with package.rs. — One of this dimension's main actionable groups (1 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

5721 test methods: 1701 unit, 4020 integration, 0 BDD, 0 e2e. The Rust suite contributes 5719 `#[test]` function(s) across 292 file(s) declaring at least one; its unit/integration split is Cargo's own — 86 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. The Python suite contributes 2 test function(s) across 1 file(s) declaring at least one — every `def test…` in a file pytest or unittest would collect, which is those frameworks' own definition of a case; a parametrize table counts once, so this is a floor. Its tier split is read from file names and paths only.

Inverted test pyramid

✓ On the Gold path — maintain.

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

D12 · Dependency Hygiene8.2 7.8 / 10Strong✓ Tool-verified

What it measures: Whether dependencies are current, secure, and not bloated.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.

Maturity: Documented → Verified → Prevented · effective 7.8 / 10 · rule-coverage 94% · ceiling Verified

35 outdated, 0 yanked direct Cargo dependencies. 146 of 155 direct crates were graded against crates.io (0 not published there, 9 not resolved by a committed REDACTED). Only DIRECT edges are graded: a transitive crate cannot be moved past what its parent's requirement admits, so reporting one would be advice its owner cannot take. A newer release is reported only where this repository's OWN requirement already admits it, so the remedy is `cargo update` and never a manifest edit — which means a release outside the declared range is deliberately NOT charged, because a written-down constraint is a decision rather than a defect. Note that a bare requirement is a CARET, and for a 0.x crate its ceiling is the minor. Whether any crate is UNMAINTAINED is not graded — crates.io publishes no maintenance status, and release age does not stand in for one. Known CVEs in this dependency graph are D30's question, read from REDACTED there.

Outdated: async-compression · ×35

What to do

  1. Enforce Dependency Hygiene in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D13 · Secret Scanning10.0 / 10Exemplary○ Nothing flagged

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 10.0 / 10 · rule-coverage 100% · ceiling Prevented

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.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 640 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's REDACTED closed over its manifests' `[dependencies]` and `[build-dependencies]`. 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. ★ COVERAGE OF THIS VERDICT: it grades this repository's crate dependencies and nothing else. The repository also declares a Python REDACTED/requirements.txt (pip/uv/Poetry), and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.5 / 10Stronggated by 91 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.5 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: crates/uv/src/lib.rs (42×195=8190); crates/uv-lock/src/lock/mod.rs (69×111=7659); crates/uv-project-commands/src/run.rs (45×112=5040)

Hotspot: crates/uv/src/lib.rs · ×91crates/uv/src/lib.rs:134

What to do

  1. Resolve the 91 Hotspot finding(s) in Churn × Complexity Hotspots — start with lib.rs (10), mod.rs (4), install.rs (3). — One of this dimension's main actionable groups (91 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

22 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is crates/uv-client/src/httpcache/control.rs. Counted over 510 of the 673 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)

✓ On the Gold path — maintain.

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

D17 · Explicit Debt9.8 / 10Stronggated by 241 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.8 / 10 · rule-coverage 100% · ceiling Prevented

241 deducted task-comment markers across 291542 LoC (0.1/KLoC) → score 9.8. 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 · ×239scripts/publish/test_publish.py:238
FixmeComment · ×2crates/uv-resolver/src/resolution/output.rs:222

What to do

  1. Resolve the 239 TodoComment finding(s) in Explicit Debt — start with lib.rs (25), resolver.py (14), settings.rs (12). — One of this dimension's main actionable groups (239 warning-level).
  2. Resolve the 2 FixmeComment finding(s) in Explicit Debt — start with output.rs, wheel.rs. — One of this dimension's main actionable groups (2 warning-level).
  3. 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. 101 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.

D26 · Project Cohesion9.6 / 10Exemplary✓ 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 9.6 / 10 · rule-coverage 100% · ceiling Documented

2 of 91 build units (Cargo) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

✓ On the Gold path — maintain.

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

42 finding(s): 0 critical, 39 high, 3 medium, 0 low. semgrep hit a parse error in 15 file(s) — `crates/uv-audit/src/service/osv.rs` (line 367, line 417), `crates/uv-cli/src/lib.rs` (line 6740), `crates/uv-client/src/cached_client.rs` (line 429, line 744, line 776, …), `crates/uv-distribution/src/distribution_database.rs` (line 946, line 999, line 1074), `crates/uv-fs/src/lib.rs` (line 61, line 606), … (+10 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 6 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

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

What to do

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

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

D30 · Dependency Vulnerabilities7.6 / 10Strong✓ 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 7.6 / 10 · rule-coverage 100% · ceiling Documented

13 finding(s): 0 critical, 0 high, 13 medium, 0 low.

REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 6 Medium advisory (unmaintained) finding(s) in Dependency Vulnerabilities — start with REDACTED (6). — One of this dimension's main actionable groups (6 warning-level).
  2. Resolve the 3 Medium advisory (unsound) finding(s) in Dependency Vulnerabilities — start with REDACTED (3). — One of this dimension's main actionable groups (3 warning-level).
  3. Resolve the 3 Medium vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED (3). — One of this dimension's main actionable groups (3 warning-level).

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

D31 · IaC & Container Security7.7 / 10Adequategated by 6 critical findings✓ Tool-verified

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (REDACTED/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

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

9 finding(s): 0 critical, 6 high, 3 medium, 0 low.

REDACTED
REDACTED

What to do

  1. Resolve the 6 High IaC finding(s) in IaC & Container Security — start with REDACTED (4), REDACTED (2). — One of this dimension's main actionable groups (6 issue-level).
  2. Resolve the 3 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 warning-level).

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

D34 · Knowledge Freshness9.9 / 10Adequategated by 1 critical finding✓ 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.9 / 10 · rule-coverage 100% · ceiling Documented

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

Orphaned knowledgecrates/uv-keyring/src/secret_service.rs:1
Orphaned file · ×6crates/uv-cache-info/src/glob.rs:1
Further orphaned files (smaller)

What to do

  1. Resolve the 1 Orphaned knowledge finding(s) in Knowledge Freshness — start with secret_service.rs. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 6 Orphaned file finding(s) in Knowledge Freshness — start with glob.rs, runnable.rs, credential.rs. — One of this dimension's main actionable groups (6 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.4 / 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.4 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: login.rs↔logout.rs 80%; extras.rs↔lookahead.rs 73%; dist_error.rs↔diagnostics.rs 70%

Change coupling: login.rs ↔ logout.rs · ×20crates/uv/src/commands/auth/login.rs:1
Change-coupling hub: install.rs → compile.rs, uninstall.rs, manifest.rscrates/uv-pip-commands/src/install.rs

What to do

  1. Resolve the 20 Change coupling finding(s) in Change Coupling — start with extras.rs (2), lib.rs (2), login.rs. — One of this dimension's main actionable groups (20 warning-level).
  2. Resolve the 1 Change-coupling hub finding(s) in Change Coupling — start with install.rs. — One of this dimension's main actionable groups (1 warning-level).

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

D36 · Supply-chain Provenance & Signing10.0 / 10Stronggated by 7 serious findings✓ 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 10.0 / 10 · rule-coverage 100% · ceiling Documented

Build pipeline generates provenance, signs artifacts and produces an SBOM.

REDACTED
REDACTED
REDACTED
REDACTED

What to do

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

DM4 · Rich vs anemic domain model10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether domain entities own their behaviour (invariant-enforcing commands) rather than being data-only structs driven by a foreign service.

Method: Roslyn (DDD-gated): entity method BODIES classified mutator-vs-query — only methods that mutate the entity's own declared state count as invariant-protecting behaviour, so a getter/passthrough doesn't rescue an anemic class. Deterministic, exhaustive over domain-layer entities.

Coverage: Population: entities by name/base convention; rich-vs-anemic judged by classifying each method body mutator-vs-query — logic-bearing domain types outside the convention are invisible.

DM5 · Encapsulated state10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether a domain type's identity-bearing field stays immutable — a `pub` mutable field under a hand-rolled Hash/PartialEq breaks the value-identity invariant.

Method: Roslyn (DDD-gated): entities scanned for publicly writable state — public setters, and (C#/VB) own mutable collections handed out through an auto-property, a public field or a bare-field expression getter, where a computed/copying getter is never charged. One finding per entity; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.

Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.

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)8.3 / 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

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
  • Add a README to the 17 of 93 project(s) that lack one — worth up to 0.4 pts.
M2 · Architecture documentation2.0 / 10Weak✓ 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.

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 & versioning10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language 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.

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 60/63 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `crates/uv-bin-install`, `crates/uv-build`, `crates/uv-trampoline-builder`.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
  • Consider OpenTelemetry tracing/metrics (opentelemetry with tracing-opentelemetry) and a health-check endpoint (a /health route on your axum/actix router) for operability.
P3 · Security & performance tooling5.0 / 10Adequate✓ 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

  • Enable Dependabot/Renovate or a dependency-review gate.
  • 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.

P5 · DR & Backup4.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.

Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.

What to do

  • Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
  • Enable purge protection / soft-delete (and prevent_destroy on critical resources) so data stores can't be lost to an accidental or malicious delete.
P6 · Release Hygiene10.0 / 10Exemplary✓ 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.

PF1 · Benchmark discipline9.0 / 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 Posture8.0 / 10Strong✓ 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 builds on an HTTP-server crate (`hyper` (Cargo.toml)) but serves no HTTP of its own: its production source starts no server (no `HttpServer::new`, `axum::serve`, `Server::bind`, tonic `Server::builder()…serve`, `rocket::build()`, `warp::serve`, `serve_connection` or the like — its examples and tests are not production source), so it is a library whose server controls belong to the application that serves it — HTTPS enforcement, HSTS, cookie flags and input validation are N/A here, as they are for a C# library.

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.

  • MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call. — crates/uv-extract/src/hash.rs:33

What to do

  • Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key.
X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

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.

X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.

Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.

X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.

Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. 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 `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.

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.

X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.

Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. 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 `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.

X17 · Uncapped recursion over a caller-supplied document10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.

Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.

X18 · Disposal-pattern correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.

Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.

X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.

Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. 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.

X22 · Contradicted release guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.

Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.

X23 · Unguarded diagnostic materialisation10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.

Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. 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 `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.

X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.

Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.

X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.

Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.

X26 · Unsynchronised callback handoff10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.

Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. 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. Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items 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.

X3 · Exception handling10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

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 logging1.7 / 10Critical✓ 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 36 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — scripts/check_cache_compat.py:36
  • `info` at line 44 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — scripts/check_cache_compat.py:44
  • `info` at line 134 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — scripts/check_cache_compat.py:134
  • `info` at line 59 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — scripts/check_embedded_python.py:59
  • `info` at line 70 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — scripts/check_embedded_python.py:70
  • `info` at line 82 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — scripts/check_embedded_python.py:82
  • `info` at line 91 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — scripts/check_embedded_python.py:91
  • `info` at line 38 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — scripts/check_system_python.py:38
  • `info` at line 45 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — scripts/check_system_python.py:45
  • `info` at line 188 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — scripts/check_system_python.py:188
  • `warning` at line 85 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — scripts/create-python-mirror.py:85
  • `error` at line 89 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. — scripts/create-python-mirror.py:89
  • `error` at line 92 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. — scripts/create-python-mirror.py:92
  • `debug` at line 152 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — scripts/create-python-mirror.py:152
  • `debug` at line 158 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — scripts/create-python-mirror.py:158
  • `debug` at line 172 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — scripts/create-python-mirror.py:172
  • `info` at line 281 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — scripts/create-python-mirror.py:281
  • `error` at line 295 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. — scripts/create-python-mirror.py:295
  • `warn!` at line 178 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/uv-workspace-commands/src/environment.rs:178
  • `warn!` at line 295 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/uv-workspace-commands/src/metadata.rs:295
  • `debug!` at line 95 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: `debug!(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/uv-workspace/src/workspace.rs:95
  • `debug!` at line 498 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: `debug!(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/uv-workspace/src/workspace.rs:498
  • `debug!` at line 553 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: `debug!(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/uv-workspace/src/workspace.rs:553
  • `trace!` at line 1134 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: `trace!(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/uv-workspace/src/workspace.rs:1134
  • `debug!` at line 1156 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: `debug!(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/uv-workspace/src/workspace.rs:1156
  • `debug!` at line 1244 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: `debug!(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/uv-workspace/src/workspace.rs:1244
  • `debug!` at line 1282 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: `debug!(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/uv-workspace/src/workspace.rs:1282
  • `debug!` at line 1301 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: `debug!(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/uv-workspace/src/workspace.rs:1301
  • `debug!` at line 1317 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: `debug!(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/uv-workspace/src/workspace.rs:1317
  • `trace!` at line 1324 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: `trace!(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/uv-workspace/src/workspace.rs:1324
  • `debug!` at line 1340 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: `debug!(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/uv-workspace/src/workspace.rs:1340
  • `warn!` at line 1349 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/uv-workspace/src/workspace.rs:1349
  • `debug!` at line 1363 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: `debug!(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/uv-workspace/src/workspace.rs:1363
  • `debug!` at line 1373 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: `debug!(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/uv-workspace/src/workspace.rs:1373
  • `debug!` at line 1381 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: `debug!(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/uv-workspace/src/workspace.rs:1381
  • `debug!` at line 1413 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: `debug!(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/uv-workspace/src/workspace.rs:1413
  • `debug!` at line 1418 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: `debug!(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/uv-workspace/src/workspace.rs:1418
  • `debug!` at line 1433 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: `debug!(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/uv-workspace/src/workspace.rs:1433
  • `debug!` 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: `debug!(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/uv-workspace/src/workspace.rs:1650
  • `debug!` at line 1794 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: `debug!(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/uv-workspace/src/workspace.rs:1794

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 Health63%Adequate — gated by D2, X4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture96%ExemplarySolid.
Maturity65%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness64%StrongSolid.
Security81%Adequate — gated by D29Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling100%ExemplaryStrongest area.
Event Sourcing100%ExemplarySolid.
Performance94%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 — 12 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not included — 56 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — Not applicable: this repository's Python imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one.
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — docker build failed (exit 1) — ve: ubuntu:24.04@sha256:d1e2e92c075e5ca139d51a140fff46f84315c0fdce203eab2807c7e495eff4f9: failed to resolve source metadata for docker.io/library/ubuntu:24.04@sha256:d1e2e92c075e5ca139d51a140fff46f84315c0fdce203eab2807c7e495eff4f9: failed to do request: Head "https://registry-1.docker.io/v2/library/ubuntu/manifests/sha256:d1e2e92c075e5ca139d51a140fff46f84315c0fdce203eab2807c7e495eff4f9": Forbidden; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no data at rest for these controls to protect.
  • C2 Access Controls — No access-control surface detected in the analyzed source — this repository starts no server another machine can reach (no actix-web HttpServer, axum::serve, Rocket launch, warp::serve, poem or salvo Server, tonic Server::builder, hyper or tiny_http server outside examples and tests, none bound beyond loopback). Access control is therefore N/A here — a crate is authorized by the application that serves it, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • D10 Test Quality — ~231492 lines of test source are present (.py, .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
  • 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; JavaScript, Python, Rust not measured.
  • D22 Internal API Consistency — API consistency is measured on C# only; the exposed Rust surface was not measured.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ projects each declaring an entity of their own. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C# and Visual Basic comments only — this repository's production source is .py, .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.
  • D32 Data Compliance (PII/GDPR) — 1 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • 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 included — suite not readable by the collector
  • DM1 Aggregate boundaries — this Rust crate declares no domain aggregate (a struct with private state and its own command methods), so DM1's aggregate-boundary read has no population to be taken over
  • DM2 Strongly-typed ids — the crate defines newtype typed-ids but declares no domain aggregate that could carry an id — so DM2's adoption ratio has no population to be taken over
  • DM3 Integration-event coupling — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • DM6 Domain ↔ infrastructure boundary — this Rust crate maps no type to a persistence framework (diesel/sea-orm/sqlx), so DM6's domain↔infrastructure fusion read has no population to be taken over
  • DM7 Repository granularity — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • 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
  • M4 Documentation accuracy — Not applicable: the 102 current-state document(s) make no claim of a kind M4 checks. 221 claim(s) of kinds M4 does not check were not checked (path 107, command argument 4, environment variable 109, cd 1); M4 checks only links and versions.
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript, Python, Rust source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — 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.
  • X2 Cancellation propagation — no C# was loaded; this repository's Python and Rust were read, and no request in it can be cancelled by a caller — a Python request takes no token: asyncio cancels the task and trio or anyio the scope that made it, from outside the call, and requests, httpx, aiohttp and gRPC take a timeout, not a cancellation; a Rust request takes no token: a future is cancelled by dropping it, from outside the call (select!, a timeout, an aborted task), and reqwest, hyper and tonic take none
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • 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 — 46 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
D31 · IaC & Container Security · High IaC · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned knowledge · ×1
  • Orphaned knowledge crates/uv-keyring/src/secret_service.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.
Serious — 1673 finding(s)
D17 · Explicit Debt · TodoComment · ×239
  • TodoComment scripts/publish/test_publish.py:238 — # TODO: In principle we could test this by having GitLab issue us an `aud:sigstore` — 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 scripts/benchmark/src/benchmark/resolver.py:210 — # TODO(charlie): Make this a `setup`. — 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 scripts/benchmark/src/benchmark/resolver.py:253 — # TODO(charlie): Make this a `setup`. — 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 scripts/benchmark/src/benchmark/resolver.py:453 — # TODO(charlie): Make this a `setup`. — 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 scripts/benchmark/src/benchmark/resolver.py:506 — # TODO(charlie): Make this a `setup`. — 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 scripts/benchmark/src/benchmark/resolver.py:544 — # TODO(charlie): Make this a `setup`. — 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 scripts/benchmark/src/benchmark/resolver.py:710 — # TODO(charlie): Make this a `setup`. — 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 scripts/benchmark/src/benchmark/resolver.py:755 — # TODO(charlie): Make this a `setup`. — 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 scripts/benchmark/src/benchmark/resolver.py:785 — # TODO(charlie): Make this a `setup`. — 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 scripts/benchmark/src/benchmark/resolver.py:822 — # TODO(charlie): Make this a `setup`. — 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 scripts/benchmark/src/benchmark/resolver.py:915 — # TODO(charlie): Make this a `setup`. — 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 scripts/benchmark/src/benchmark/resolver.py:1123 — # TODO(charlie): Make this a `setup`. — 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 scripts/benchmark/src/benchmark/resolver.py:1171 — # TODO(charlie): Make this a `setup`. — 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 scripts/benchmark/src/benchmark/resolver.py:1204 — # TODO(charlie): Make this a `setup`. — 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 scripts/benchmark/src/benchmark/resolver.py:1244 — # TODO(charlie): Make this a `setup`. — 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/uv-workspace-commands/src/environment.rs:171 — // TODO: Editable installs often only record a `.pth` file; we'll — 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/uv-windows/src/exception.rs:282 — // TODO: std::backtrace does a lot of allocations, so we are no longer async-signal-safe at — 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/uv-virtualenv/src/virtualenv.rs:139 — // TODO(zanieb): We may want to consider omitting the hint in some of these cases, e.g., — 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/uv-trampoline/src/bounce.rs:122 — // TODO(john): In order to avoid resolving junctions and symlinks for relative paths and — 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/uv-torch/src/accelerator.rs:154 — // TODO: Consider rejecting display adapters with disabled/problem devnode status. — 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/uv-torch/src/nvidia.rs:38 — // TODO(konsti): Filter GPUs by `CUDA_VISIBLE_DEVICES` before choosing compute capability. — 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/uv-tool-commands/src/common.rs:677 — // TODO(charlie): Solve for the Python version iteratively (or even, within the resolver — 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/uv-tool-commands/src/install.rs:702 — // TODO(zanieb): Build the environment in the cache directory then copy into the tool directory. — 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/uv-tool-commands/src/requirements.rs:122 — // TODO(charlie): These are all default values. We should consider whether we want to make them — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/uv-lock-operations/src/lock.rs:705 — // TODO(charlie): These are all default values. We should consider whether we want to make them — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • + 214 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×91
  • Hotspot: crates/uv/src/lib.rs crates/uv/src/lib.rs:134 — crates/uv/src/lib.rs changed 42 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 195 in uv::run at line 134. 3 of those changes were fix/bug commits, and the other 39 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:56 +00:00' --until='2026-10-25 13:24:56 +00:00' --full-history --no-merges -- crates/uv/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/uv-lock/src/lock/mod.rs crates/uv-lock/src/lock/mod.rs:587 — crates/uv-lock/src/lock/mod.rs changed 69 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 111 in LockedDependencyBuilder::add_requirements at line 587. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:56 +00:00' --until='2026-10-25 13:24:56 +00:00' --full-history --no-merges -- crates/uv-lock/src/lock/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/uv-project-commands/src/run.rs crates/uv-project-commands/src/run.rs:90 — crates/uv-project-commands/src/run.rs changed 45 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 112 in uv_project_commands::run::run at line 90. 1 of those changes was a fix/bug commit, and the other 44 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:56 +00:00' --until='2026-10-25 13:24:56 +00:00' --full-history --no-merges -- crates/uv-project-commands/src/run.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/uv-project-commands/src/check.rs crates/uv-project-commands/src/check.rs:51 — crates/uv-project-commands/src/check.rs changed 38 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 70 in uv_project_commands::check::check at line 51. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:56 +00:00' --until='2026-10-25 13:24:56 +00:00' --full-history --no-merges -- crates/uv-project-commands/src/check.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/uv-pip-commands/src/compile.rs crates/uv-pip-commands/src/compile.rs:69 — crates/uv-pip-commands/src/compile.rs changed 34 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 75 in uv_pip_commands::compile::pip_compile at line 69. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:56 +00:00' --until='2026-10-25 13:24:56 +00:00' --full-history --no-merges -- crates/uv-pip-commands/src/compile.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/uv-project-commands/src/add.rs crates/uv-project-commands/src/add.rs:98 — crates/uv-project-commands/src/add.rs changed 39 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 62 in uv_project_commands::add::add at line 98. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:56 +00:00' --until='2026-10-25 13:24:56 +00:00' --full-history --no-merges -- crates/uv-project-commands/src/add.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/uv-project-commands/src/sync.rs crates/uv-project-commands/src/sync.rs:54 — crates/uv-project-commands/src/sync.rs changed 34 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in uv_project_commands::sync::sync at line 54. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:56 +00:00' --until='2026-10-25 13:24:56 +00:00' --full-history --no-merges -- crates/uv-project-commands/src/sync.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/uv-tool-commands/src/install.rs crates/uv-tool-commands/src/install.rs:63 — crates/uv-tool-commands/src/install.rs changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 64 in uv_tool_commands::install::install at line 63. 1 of those changes was a fix/bug commit, and the other 25 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:56 +00:00' --until='2026-10-25 13:24:56 +00:00' --full-history --no-merges -- crates/uv-tool-commands/src/install.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/uv-resolver/src/resolver/mod.rs crates/uv-resolver/src/resolver/mod.rs:349 — crates/uv-resolver/src/resolver/mod.rs changed 41 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in ResolverState::solve at line 349. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:56 +00:00' --until='2026-10-25 13:24:56 +00:00' --full-history --no-merges -- crates/uv-resolver/src/resolver/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/uv-python-commands/src/install.rs crates/uv-python-commands/src/install.rs:289 — crates/uv-python-commands/src/install.rs changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 80 in uv_python_commands::install::perform_install at line 289. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:56 +00:00' --until='2026-10-25 13:24:56 +00:00' --full-history --no-merges -- crates/uv-python-commands/src/install.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/uv-cli/src/settings.rs crates/uv-cli/src/settings.rs:489 — crates/uv-cli/src/settings.rs changed 58 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in InitSettings::resolve at line 489. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:56 +00:00' --until='2026-10-25 13:24:56 +00:00' --full-history --no-merges -- crates/uv-cli/src/settings.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/uv-extract/src/stream.rs crates/uv-extract/src/stream.rs:163 — crates/uv-extract/src/stream.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 99 in uv_extract::stream::unzip_inner at line 163. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:56 +00:00' --until='2026-10-25 13:24:56 +00:00' --full-history --no-merges -- crates/uv-extract/src/stream.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/uv-tool-commands/src/run.rs crates/uv-tool-commands/src/run.rs:131 — crates/uv-tool-commands/src/run.rs changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in uv_tool_commands::run::run at line 131. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:56 +00:00' --until='2026-10-25 13:24:56 +00:00' --full-history --no-merges -- crates/uv-tool-commands/src/run.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/uv-settings/src/lib.rs crates/uv-settings/src/lib.rs:390 — crates/uv-settings/src/lib.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 66 in uv_settings::warn_uv_toml_masked_fields at line 390. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:56 +00:00' --until='2026-10-25 13:24:56 +00:00' --full-history --no-merges -- crates/uv-settings/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/uv-workspace/src/pyproject.rs crates/uv-workspace/src/pyproject.rs:1334 — crates/uv-workspace/src/pyproject.rs changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 55 in Source::deserialize at line 1334. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:56 +00:00' --until='2026-10-25 13:24:56 +00:00' --full-history --no-merges -- crates/uv-workspace/src/pyproject.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/uv-pip-commands/src/install.rs crates/uv-pip-commands/src/install.rs:84 — crates/uv-pip-commands/src/install.rs changed 33 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in uv_pip_commands::install::pip_install at line 84. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:56 +00:00' --until='2026-10-25 13:24:56 +00:00' --full-history --no-merges -- crates/uv-pip-commands/src/install.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/uv-build-commands/src/lib.rs crates/uv-build-commands/src/lib.rs:522 — crates/uv-build-commands/src/lib.rs changed 34 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in uv_build_commands::build_package at line 522. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:56 +00:00' --until='2026-10-25 13:24:56 +00:00' --full-history --no-merges -- crates/uv-build-commands/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/uv-project-commands/src/version.rs crates/uv-project-commands/src/version.rs:76 — crates/uv-project-commands/src/version.rs changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in uv_project_commands::version::project_version at line 76. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:56 +00:00' --until='2026-10-25 13:24:56 +00:00' --full-history --no-merges -- crates/uv-project-commands/src/version.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/uv-project-commands/src/lock.rs crates/uv-project-commands/src/lock.rs:39 — crates/uv-project-commands/src/lock.rs changed 51 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in uv_project_commands::lock::lock at line 39. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:56 +00:00' --until='2026-10-25 13:24:56 +00:00' --full-history --no-merges -- crates/uv-project-commands/src/lock.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/uv-project-commands/src/upgrade.rs crates/uv-project-commands/src/upgrade.rs:165 — crates/uv-project-commands/src/upgrade.rs changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in uv_project_commands::upgrade::upgrade at line 165. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:56 +00:00' --until='2026-10-25 13:24:56 +00:00' --full-history --no-merges -- crates/uv-project-commands/src/upgrade.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/uv-project-commands/src/export.rs crates/uv-project-commands/src/export.rs:155 — crates/uv-project-commands/src/export.rs changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in uv_project_commands::export::export at line 155. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:56 +00:00' --until='2026-10-25 13:24:56 +00:00' --full-history --no-merges -- crates/uv-project-commands/src/export.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/uv-project-commands/src/remove.rs crates/uv-project-commands/src/remove.rs:44 — crates/uv-project-commands/src/remove.rs changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in uv_project_commands::remove::remove at line 44. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:56 +00:00' --until='2026-10-25 13:24:56 +00:00' --full-history --no-merges -- crates/uv-project-commands/src/remove.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/uv-distribution/src/distribution_database.rs crates/uv-distribution/src/distribution_database.rs:1102 — crates/uv-distribution/src/distribution_database.rs changed 32 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in DistributionDatabase::download_wheel_response at line 1102. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:56 +00:00' --until='2026-10-25 13:24:56 +00:00' --full-history --no-merges -- crates/uv-distribution/src/distribution_database.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/uv-lock/src/lock/installable.rs crates/uv-lock/src/lock/installable.rs:255 — crates/uv-lock/src/lock/installable.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 81 in InstallableExt::to_resolution_from_packages at line 255. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:56 +00:00' --until='2026-10-25 13:24:56 +00:00' --full-history --no-merges -- crates/uv-lock/src/lock/installable.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/uv-installer/src/plan.rs crates/uv-installer/src/plan.rs:291 — crates/uv-installer/src/plan.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 65 in Planner::build at line 291. 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-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 13:24:56 +00:00' --until='2026-10-25 13:24:56 +00:00' --full-history --no-merges -- crates/uv-installer/src/plan.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.
  • + 66 more in this group — see findings.md.
D3 · God Classes · MethodTooLong · ×83
  • MethodTooLong: Lock.satisfies crates/uv-lock/src/lock/mod.rs:4201 — MethodTooLong — satisfies runs 546 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 446 over it, 5.46× 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: LockedDependencyBuilder.add_requirements crates/uv-lock/src/lock/mod.rs:587 — MethodTooLong — add_requirements runs 512 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 412 over it, 5.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: PubGrubHint.fmt crates/uv-resolver/src/pubgrub/report.rs:1890 — MethodTooLong — fmt runs 430 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 330 over it, 4.30× 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: TargetTriple.platform crates/uv-configuration/src/target_triple.rs:741 — MethodTooLong — platform runs 384 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 284 over it, 3.84× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ResolverState.solve crates/uv-resolver/src/resolver/mod.rs:349 — MethodTooLong — solve runs 371 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 271 over it, 3.71× 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: InstallableExt.to_resolution_from_packages crates/uv-lock/src/lock/installable.rs:255 — MethodTooLong — to_resolution_from_packages runs 369 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 269 over it, 3.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: PipSettings.combine crates/uv-cli/src/settings.rs:4617 — MethodTooLong — combine runs 349 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 249 over it, 3.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: PlatformTag.from_str crates/uv-platform-tags/src/platform_tag.rs:490 — MethodTooLong — from_str runs 327 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 227 over it, 3.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ValidatedLock.validate crates/uv-lock-operations/src/validated_lock.rs:42 — MethodTooLong — validate runs 321 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 221 over it, 3.21× 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: Planner.build crates/uv-installer/src/plan.rs:291 — MethodTooLong — build runs 318 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 218 over it, 3.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.
  • MethodTooLong: RequirementSatisfaction.check crates/uv-installer/src/satisfies.rs:44 — MethodTooLong — check runs 286 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 186 over it, 2.86× 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: Lock.collect_dependency_sources crates/uv-lock/src/lock/mod.rs:5506 — MethodTooLong — collect_dependency_sources runs 278 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 178 over it, 2.78× 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: TreeDisplay.new crates/uv-lock/src/lock/tree.rs:76 — MethodTooLong — new runs 263 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 163 over it, 2.63× 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: Lock.extend_dependency_source_reachability crates/uv-lock/src/lock/mod.rs:5182 — MethodTooLong — extend_dependency_source_reachability runs 242 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 142 over it, 2.42× 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: Package.to_source_dist crates/uv-lock/src/lock/mod.rs:6915 — MethodTooLong — to_source_dist runs 230 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 130 over it, 2.30× 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: Source.deserialize crates/uv-workspace/src/pyproject.rs:1334 — MethodTooLong — deserialize runs 219 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 119 over it, 2.19× 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: PylockToml.from_lock crates/uv-lock/src/lock/export/pylock_toml.rs:783 — MethodTooLong — from_lock runs 211 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 111 over it, 2.11× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SourceDistributionBuilder.git_source_tree_metadata crates/uv-distribution/src/source/mod.rs:2261 — MethodTooLong — git_source_tree_metadata 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.
  • MethodTooLong: PyProjectToml.to_metadata crates/uv-build-backend/src/metadata.rs:459 — MethodTooLong — to_metadata 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.
  • MethodTooLong: ExportableRequirements.from_lock crates/uv-lock/src/lock/export/mod.rs:62 — MethodTooLong — from_lock 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.
  • MethodTooLong: PubGrubReportFormatter.generate_hints crates/uv-resolver/src/pubgrub/report.rs:735 — MethodTooLong — generate_hints runs 201 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 101 over it, 2.01× 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: AddSettings.resolve crates/uv-cli/src/settings.rs:2246 — MethodTooLong — resolve runs 192 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 92 over it, 1.92× 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: ResolverState.process_request crates/uv-resolver/src/resolver/mod.rs:2251 — MethodTooLong — process_request runs 186 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 86 over it, 1.86× 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: PipCompileSettings.resolve crates/uv-cli/src/settings.rs:3364 — MethodTooLong — resolve runs 179 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 79 over it, 1.79× 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: PylockToml.from_resolution crates/uv-lock/src/lock/export/pylock_toml.rs:457 — MethodTooLong — from_resolution runs 179 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 79 over it, 1.79× 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.
  • + 58 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×82
  • FileTooLong: lock/mod.rs crates/uv-lock/src/lock/mod.rs — FileTooLong — 7028 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 6528 over it, 14.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/settings.rs crates/uv-cli/src/settings.rs — FileTooLong — 4199 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 3699 over it, 8.40× 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/uv-cli/src/lib.rs — FileTooLong — 3201 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 2701 over it, 6.40× 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: resolver/mod.rs crates/uv-resolver/src/resolver/mod.rs — FileTooLong — 2655 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 61% of them inside a single declaration: ResolverState (2 blocks, 127-2734). The bar is 500 significant lines; this is 2155 over it, 5.31× 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: source/mod.rs crates/uv-distribution/src/source/mod.rs — FileTooLong — 2442 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 84% of them inside a single declaration: SourceDistributionBuilder (2 blocks, 210-3233). The bar is 500 significant lines; this is 1942 over it, 4.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: src/lib.rs crates/uv/src/lib.rs — FileTooLong — 2390 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 1890 over it, 4.78× 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/settings.rs crates/uv-settings/src/settings.rs — FileTooLong — 2059 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 1559 over it, 4.12× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: pubgrub/report.rs crates/uv-resolver/src/pubgrub/report.rs — FileTooLong — 1870 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 1370 over it, 3.74× 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/uv-test/src/lib.rs — FileTooLong — 1643 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 1143 over it, 3.29× 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/uv-environment-operations/src/lib.rs — FileTooLong — 1528 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 1028 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: export/pylock_toml.rs crates/uv-lock/src/lock/export/pylock_toml.rs — FileTooLong — 1525 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 1025 over it, 3.05× 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/target_triple.rs crates/uv-configuration/src/target_triple.rs — FileTooLong — 1447 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 98% of them inside a single declaration: TargetTriple (2 blocks, 15-1880). The bar is 500 significant lines; this is 947 over it, 2.89× 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/run.rs crates/uv-project-commands/src/run.rs — FileTooLong — 1433 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 933 over it, 2.87× 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/workspace.rs crates/uv-workspace/src/workspace.rs — FileTooLong — 1418 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 918 over it, 2.84× 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/registry_client.rs crates/uv-client/src/registry_client.rs — FileTooLong — 1257 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 61% of them inside a single declaration: RegistryClient (2 blocks, 223-1414). The bar is 500 significant lines; this is 757 over it, 2.51× 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/error.rs crates/uv-resolver/src/error.rs — FileTooLong — 1228 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 33 free functions. The bar is 500 significant lines; this is 728 over it, 2.46× 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/pyproject.rs crates/uv-workspace/src/pyproject.rs — FileTooLong — 1198 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 698 over it, 2.40× 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/distribution_database.rs crates/uv-distribution/src/distribution_database.rs — FileTooLong — 1177 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 83% of them inside a single declaration: DistributionDatabase (2 blocks, 68-1634). The bar is 500 significant lines; this is 677 over it, 2.35× 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/lib.rs crates/uv-build-commands/src/lib.rs — FileTooLong — 1170 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 670 over it, 2.34× 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/uv-project-edit/src/lib.rs — FileTooLong — 1103 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: PyProjectTomlMut (3 blocks, 26-1678). The bar is 500 significant lines; this is 603 over it, 2.21× 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/request.rs crates/uv-python-types/src/request.rs — FileTooLong — 1084 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 584 over it, 2.17× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/discovery.rs crates/uv-python-discovery/src/discovery.rs — FileTooLong — 1072 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 572 over it, 2.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/lib.rs crates/uv-requirements-txt/src/lib.rs — FileTooLong — 1039 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 539 over it, 2.08× 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/uv-distribution-types/src/lib.rs — FileTooLong — 1002 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 502 over it, 2.00× 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/add.rs crates/uv-project-commands/src/add.rs — FileTooLong — 993 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 493 over it, 1.99× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • + 57 more in this group — see findings.md.
D3 · God Classes · FunctionTooLong · ×68
  • FunctionTooLong: uv::run crates/uv/src/lib.rs:134 — FunctionTooLong — uv::run runs 1569 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 1469 over it, 15.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: uv_project_commands::run::run crates/uv-project-commands/src/run.rs:90 — FunctionTooLong — uv_project_commands::run::run runs 801 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 701 over it, 8.01× 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: uv_tool_commands::install::install crates/uv-tool-commands/src/install.rs:63 — FunctionTooLong — uv_tool_commands::install::install runs 771 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 671 over it, 7.71× 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: uv::run_project crates/uv/src/lib.rs:2254 — FunctionTooLong — uv::run_project runs 598 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 498 over it, 5.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: uv_project_commands::check::check crates/uv-project-commands/src/check.rs:51 — FunctionTooLong — uv_project_commands::check::check runs 558 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 458 over it, 5.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: uv_lock_operations::lock::do_lock crates/uv-lock-operations/src/lock.rs:284 — FunctionTooLong — uv_lock_operations::lock::do_lock runs 553 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 453 over it, 5.53× 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: uv_python_commands::install::perform_install crates/uv-python-commands/src/install.rs:289 — FunctionTooLong — uv_python_commands::install::perform_install runs 471 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 371 over it, 4.71× 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: uv_project_commands::sync::sync crates/uv-project-commands/src/sync.rs:54 — FunctionTooLong — uv_project_commands::sync::sync runs 403 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 303 over it, 4.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: uv_virtualenv::virtualenv::create crates/uv-virtualenv/src/virtualenv.rs:63 — FunctionTooLong — uv_virtualenv::virtualenv::create runs 401 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 301 over it, 4.01× 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: uv_tool_commands::run::get_or_create_environment crates/uv-tool-commands/src/run.rs:745 — FunctionTooLong — uv_tool_commands::run::get_or_create_environment runs 392 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 292 over it, 3.92× 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: uv_extract::stream::unzip_inner crates/uv-extract/src/stream.rs:163 — FunctionTooLong — uv_extract::stream::unzip_inner runs 339 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 239 over it, 3.39× 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: uv_tool_commands::upgrade::upgrade_tool crates/uv-tool-commands/src/upgrade.rs:271 — FunctionTooLong — uv_tool_commands::upgrade::upgrade_tool runs 317 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 217 over it, 3.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: uv_project_commands::upgrade::upgrade crates/uv-project-commands/src/upgrade.rs:165 — FunctionTooLong — uv_project_commands::upgrade::upgrade runs 304 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 204 over it, 3.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: uv_project_commands::tree::tree crates/uv-project-commands/src/tree.rs:50 — FunctionTooLong — uv_project_commands::tree::tree runs 276 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 176 over it, 2.76× 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: uv_project_commands::export::export crates/uv-project-commands/src/export.rs:155 — FunctionTooLong — uv_project_commands::export::export runs 270 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 170 over it, 2.70× 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: uv_project_commands::remove::remove crates/uv-project-commands/src/remove.rs:44 — FunctionTooLong — uv_project_commands::remove::remove runs 268 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 168 over it, 2.68× 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: uv::commands::venv::venv crates/uv/src/commands/venv.rs:66 — FunctionTooLong — uv::commands::venv::venv runs 249 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 149 over it, 2.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.
  • FunctionTooLong: uv_environment_operations::sync::sync_from_lock crates/uv-environment-operations/src/sync.rs:37 — FunctionTooLong — uv_environment_operations::sync::sync_from_lock runs 248 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 148 over it, 2.48× 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: uv_static::known_stdlib::is_known_standard_library_package crates/uv-static/src/known_stdlib.rs:4 — FunctionTooLong — uv_static::known_stdlib::is_known_standard_library_package runs 238 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 138 over it, 2.38× 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: uv_environment_operations::update_environment crates/uv-environment-operations/src/lib.rs:1779 — FunctionTooLong — uv_environment_operations::update_environment 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: uv_tool_commands::run::run crates/uv-tool-commands/src/run.rs:131 — FunctionTooLong — uv_tool_commands::run::run runs 228 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 128 over it, 2.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: uv_workspace_commands::metadata::metadata crates/uv-workspace-commands/src/metadata.rs:44 — FunctionTooLong — uv_workspace_commands::metadata::metadata runs 227 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 127 over it, 2.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: uv_build_commands::build_frontend crates/uv-build-commands/src/lib.rs:218 — FunctionTooLong — uv_build_commands::build_frontend runs 225 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 125 over it, 2.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: uv_resolve_operations::resolve crates/uv-resolve-operations/src/lib.rs:95 — FunctionTooLong — uv_resolve_operations::resolve runs 225 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 125 over it, 2.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: uv_settings::warn_uv_toml_masked_fields crates/uv-settings/src/lib.rs:390 — FunctionTooLong — uv_settings::warn_uv_toml_masked_fields runs 223 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 123 over it, 2.23× 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.
  • + 43 more in this group — see findings.md.
D3 · God Classes · ClassTooLong · ×27
  • ClassTooLong: Lock crates/uv-lock/src/lock/mod.rs:312 — ClassTooLong — 2451 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 86 methods, 3 blocks, lines 312-6595. The bar is 400 significant lines; this is 2051 over it, 6.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.
  • ClassTooLong: SourceDistributionBuilder crates/uv-distribution/src/source/mod.rs:210 — ClassTooLong — 2042 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 35 methods, 2 blocks, lines 210-3233. The bar is 400 significant lines; this is 1642 over it, 5.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: ResolverState crates/uv-resolver/src/resolver/mod.rs:127 — ClassTooLong — 1616 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 23 methods, 2 blocks, lines 127-2734. The bar is 400 significant lines; this is 1216 over it, 4.04× 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: TargetTriple crates/uv-configuration/src/target_triple.rs:15 — ClassTooLong — 1423 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 15-1880. The bar is 400 significant lines; this is 1023 over it, 3.56× 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: DistributionDatabase crates/uv-distribution/src/distribution_database.rs:68 — ClassTooLong — 976 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 28 methods, 2 blocks, lines 68-1634. The bar is 400 significant lines; this is 576 over it, 2.44× 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: PubGrubReportFormatter crates/uv-resolver/src/pubgrub/report.rs:43 — ClassTooLong — 783 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 17 methods, 3 blocks, lines 43-1426. The bar is 400 significant lines; this is 383 over it, 1.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: RegistryClient crates/uv-client/src/registry_client.rs:223 — ClassTooLong — 773 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 25 methods, 2 blocks, lines 223-1414. The bar is 400 significant lines; this is 373 over it, 1.93× 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: PyProjectTomlMut crates/uv-project-edit/src/lib.rs:26 — ClassTooLong — 749 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 26-1678. The bar is 400 significant lines; this is 349 over it, 1.87× 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: PylockToml crates/uv-lock/src/lock/export/pylock_toml.rs:253 — ClassTooLong — 740 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 7 methods, 2 blocks, lines 253-1488. The bar is 400 significant lines; this is 340 over it, 1.85× 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: LockedDependencyBuilder crates/uv-lock/src/lock/mod.rs:559 — ClassTooLong — 689 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 6 methods, 2 blocks, lines 559-1535. The bar is 400 significant lines; this is 289 over it, 1.72× 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: EnvVars crates/uv-static/src/env_vars.rs:6 — ClassTooLong — 658 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 2 methods. The bar is 400 significant lines; this is 258 over it, 1.65× 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: Workspace crates/uv-workspace/src/workspace.rs:414 — ClassTooLong — 655 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 414-1473. The bar is 400 significant lines; this is 255 over it, 1.64× 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: PlatformTag crates/uv-platform-tags/src/platform_tag.rs:71 — ClassTooLong — 632 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 17 methods, 5 blocks, lines 71-956. The bar is 400 significant lines; this is 232 over it, 1.58× 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: ExpectedPackageDependencies crates/uv-lock/src/lock/mod.rs:1632 — ClassTooLong — 565 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 16 methods, 2 blocks, lines 1632-2436. The bar is 400 significant lines; this is 165 over it, 1.41× 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: InstallTarget crates/uv-environment-operations/src/install_target.rs:31 — ClassTooLong — 561 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 12 methods, 3 blocks, lines 31-906. The bar is 400 significant lines; this is 161 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.
  • ClassTooLong: PubGrubHint crates/uv-resolver/src/pubgrub/report.rs:1500 — ClassTooLong — 537 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 0 methods, 4 blocks, lines 1500-2409. The bar is 400 significant lines; this is 137 over it, 1.34× 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: Package crates/uv-lock/src/lock/mod.rs:6614 — ClassTooLong — 536 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 25 methods, 2 blocks, lines 6614-7388. The bar is 400 significant lines; this is 136 over it, 1.34× 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: TreeDisplay crates/uv-lock/src/lock/tree.rs:49 — ClassTooLong — 513 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 6 methods, 3 blocks, lines 49-1658. The bar is 400 significant lines; this is 113 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: Source crates/uv-workspace/src/pyproject.rs:1214 — ClassTooLong — 474 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, 3 blocks, lines 1214-1996. The bar is 400 significant lines; this is 74 over it, 1.19× 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: Interpreter crates/uv-python-interpreter/src/interpreter.rs:47 — ClassTooLong — 458 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 62 methods, 2 blocks, lines 47-882. The bar is 400 significant lines; this is 58 over it, 1.15× 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: RequirementsSpecification crates/uv-requirements/src/specification.rs:58 — ClassTooLong — 451 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 8 methods, 2 blocks, lines 58-728. The bar is 400 significant lines; this is 51 over it, 1.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.
  • ClassTooLong: CachedClient crates/uv-client/src/cached_client.rs:216 — ClassTooLong — 450 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 14 methods. The bar is 400 significant lines; this is 50 over it, 1.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.
  • ClassTooLong: CandidateSelector crates/uv-resolver/src/candidate_selector.rs:27 — ClassTooLong — 448 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 27-743. The bar is 400 significant lines; this is 48 over it, 1.12× 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: Cache crates/uv-cache/src/lib.rs:164 — ClassTooLong — 446 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 33 methods, 2 blocks, lines 164-967. The bar is 400 significant lines; this is 46 over it, 1.12× 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: BuildDispatch crates/uv-dispatch/src/lib.rs:153 — ClassTooLong — 430 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 5 methods, 3 blocks, lines 153-732. The bar is 400 significant lines; this is 30 over it, 1.08× 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.
  • + 2 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×24
  • Duplicated block (12 lines × 2) crates/uv-build-commands/src/lib.rs:307 — crates/uv-build-commands/src/lib.rs:307-318 | crates/uv-project-commands/src/init.rs:885-896 — 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/uv-build-commands/src/lib.rs:1184 — crates/uv-build-commands/src/lib.rs:1184-1195 | crates/uv-build-commands/src/lib.rs:1297-1308 — both copies are in the same file, so extract the 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/uv-build-frontend/src/lib.rs:1075 — crates/uv-build-frontend/src/lib.rs:1075-1086 | crates/uv-build-frontend/src/lib.rs:1090-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 (12 lines × 2) crates/uv-cli/src/settings.rs:4466 — crates/uv-cli/src/settings.rs:4466-4477 | crates/uv-cli/src/settings.rs:4541-4552 — both copies are in the same file, so extract the 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/uv-distribution/src/metadata/build_requires.rs:127 — crates/uv-distribution/src/metadata/build_requires.rs:127-138 | crates/uv-distribution/src/metadata/build_requires.rs:203-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 (12 lines × 2) crates/uv-distribution/src/metadata/build_requires.rs:158 — crates/uv-distribution/src/metadata/build_requires.rs:158-169 | crates/uv-distribution/src/metadata/build_requires.rs:234-245 — both copies are in the same file, so extract the 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/uv-distribution/src/source/mod.rs:332 — crates/uv-distribution/src/source/mod.rs:332-343 | crates/uv-distribution/src/source/mod.rs:493-504 — both copies are in the same file, so extract the 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/uv-environment-operations/src/install_target.rs:846 — crates/uv-environment-operations/src/install_target.rs:846-857 | crates/uv-environment-operations/src/install_target.rs:881-892 — both copies are in the same file, so extract the 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/uv-environment-operations/src/lib.rs:1679 — crates/uv-environment-operations/src/lib.rs:1679-1690 | crates/uv-environment-operations/src/lib.rs:1921-1932 — both copies are in the same file, so extract the 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/uv-lock/src/lock/mod.rs:9689 — crates/uv-lock/src/lock/mod.rs:9689-9700 | crates/uv-lock/src/lock/mod.rs:9748-9759 — both copies are in the same file, so extract the 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/uv-project-edit/src/lib.rs:190 — crates/uv-project-edit/src/lib.rs:190-201 | crates/uv-project-edit/src/lib.rs:283-294 — both copies are in the same file, so extract the 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/uv-project-edit/src/lib.rs:878 — crates/uv-project-edit/src/lib.rs:878-889 | crates/uv-project-edit/src/lib.rs:902-913 — both copies are in the same file, so extract the 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/uv-pypi-types/src/metadata/metadata_resolver.rs:230 — crates/uv-pypi-types/src/metadata/metadata_resolver.rs:230-241 | crates/uv-pypi-types/src/metadata/requires_dist.rs:60-71 — before extracting anything, compare `crates/uv-pypi-types/src/metadata/metadata_resolver.rs` and `crates/uv-pypi-types/src/metadata/requires_dist.rs` as WHOLE FILES: this scan already matched 4 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 (12 lines × 2) crates/uv-python-managed/src/managed.rs:181 — crates/uv-python-managed/src/managed.rs:181-192 | crates/uv-tool/src/lib.rs:376-387 — 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/uv-requirements-txt/src/lib.rs:357 — crates/uv-requirements-txt/src/lib.rs:357-368 | crates/uv-requirements-txt/src/lib.rs:417-428 — both copies are in the same file, so extract the 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/uv-resolver/src/flat_index.rs:213 — crates/uv-resolver/src/flat_index.rs:213-224 | crates/uv-resolver/src/flat_index.rs:258-269 — both copies are in the same file, so extract the 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/uv-tool-commands/src/install.rs:232 — crates/uv-tool-commands/src/install.rs:232-243 | crates/uv-tool-commands/src/install.rs:257-268 — both copies are in the same file, so extract the 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/uv-tool-commands/src/upgrade.rs:290 — crates/uv-tool-commands/src/upgrade.rs:290-301 | crates/uv-tool-commands/src/upgrade.rs:310-321 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/uv-types/src/hash.rs:323 — crates/uv-types/src/hash.rs:323-334 | crates/uv-types/src/hash.rs:375-386 — both copies are in the same file, so extract the 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/uv-workspace/src/workspace.rs:1636 — crates/uv-workspace/src/workspace.rs:1636-1647 | crates/uv-workspace/src/workspace.rs:2192-2203 — both copies are in the same file, so extract the 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/uv-lock/src/lock/export/pylock_toml.rs:1525 — crates/uv-lock/src/lock/export/pylock_toml.rs:1525-1536 | crates/uv-lock/src/lock/export/pylock_toml.rs:1543-1554 — both copies are in the same file, so extract the 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/uv-platform-tags/src/language_tag.rs:152 — crates/uv-platform-tags/src/language_tag.rs:152-163 | crates/uv-platform-tags/src/language_tag.rs:194-205 — both copies are in the same file, so extract the 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/uv-build-frontend/src/lib.rs:957 — crates/uv-build-frontend/src/lib.rs:957-968 | crates/uv-build-frontend/src/lib.rs:1077-1088 — both copies are in the same file, so extract the 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/uv-lock/src/lock/mod.rs:9676 — crates/uv-lock/src/lock/mod.rs:9676-9687 | crates/uv-lock/src/lock/mod.rs:9735-9746 — both copies are in the same file, so extract the 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 × 2) · ×22
  • Duplicated block (10 lines × 2) crates/uv-cli/src/settings.rs:2552 — crates/uv-cli/src/settings.rs:2552-2561 | crates/uv-cli/src/settings.rs:2641-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 (10 lines × 2) crates/uv-client/src/registry_client.rs:641 — crates/uv-client/src/registry_client.rs:641-650 | crates/uv-client/src/registry_client.rs:833-842 — both copies are in the same file, so extract the 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/uv-configuration/src/target_triple.rs:1250 — crates/uv-configuration/src/target_triple.rs:1250-1259 | crates/uv-configuration/src/target_triple.rs:1264-1273 — both copies are in the same file, so extract the 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/uv-extract/src/stream.rs:191 — crates/uv-extract/src/stream.rs:191-200 | crates/uv-extract/src/stream.rs:504-513 — both copies are in the same file, so extract the 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/uv-lock/src/lock/deserialize.rs:132 — crates/uv-lock/src/lock/deserialize.rs:132-141 | crates/uv-lock/src/lock/deserialize.rs:179-188 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/uv-lock/src/lock/export/mod.rs:141 — crates/uv-lock/src/lock/export/mod.rs:141-150 | crates/uv-lock/src/lock/export/mod.rs:272-281 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/uv-lock/src/lock/export/pylock_toml.rs:1894 — crates/uv-lock/src/lock/export/pylock_toml.rs:1894-1903 | crates/uv-lock/src/lock/export/pylock_toml.rs:1967-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 (10 lines × 2) crates/uv-lock/src/lock/export/requirements_txt.rs:132 — crates/uv-lock/src/lock/export/requirements_txt.rs:132-141 | crates/uv-lock/src/lock/export/requirements_txt.rs:151-160 — both copies are in the same file, so extract the 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/uv-normalize/src/extra_name.rs:52 — crates/uv-normalize/src/extra_name.rs:52-61 | crates/uv-normalize/src/group_name.rs:248-257 — before extracting anything, compare `crates/uv-normalize/src/extra_name.rs` and `crates/uv-normalize/src/group_name.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 33 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/uv-pip-commands/src/check.rs:37 — crates/uv-pip-commands/src/check.rs:37-46 | crates/uv-pip-commands/src/tree.rs:63-72 — 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/uv-pip-commands/src/list.rs:150 — crates/uv-pip-commands/src/list.rs:150-159 | crates/uv-tool-commands/src/list.rs:168-177 — 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/uv-python-commands/src/install.rs:1020 — crates/uv-python-commands/src/install.rs:1020-1029 | crates/uv-python-commands/src/install.rs:1184-1193 — both copies are in the same file, so extract the 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/uv-resolver/src/prioritized_distribution.rs:771 — crates/uv-resolver/src/prioritized_distribution.rs:771-780 | crates/uv-resolver/src/prioritized_distribution.rs:787-796 — both copies are in the same file, so extract the 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/uv-resolver/src/resolved.rs:51 — crates/uv-resolver/src/resolved.rs:51-60 | crates/uv-resolver/src/resolver/mod.rs:3552-3561 — 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/uv-resolver/src/resolver/mod.rs:2454 — crates/uv-resolver/src/resolver/mod.rs:2454-2463 | crates/uv-resolver/src/resolver/mod.rs:2513-2522 — both copies are in the same file, so extract the 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/uv-test/src/find_links.rs:53 — crates/uv-test/src/find_links.rs:53-62 | crates/uv-test/src/find_links.rs:73-82 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/uv-workspace/src/pyproject.rs:1896 — crates/uv-workspace/src/pyproject.rs:1896-1905 | crates/uv-workspace/src/pyproject.rs:1928-1937 — both copies are in the same file, so extract the 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/uv/src/bin/uvw.rs:92 — crates/uv/src/bin/uvw.rs:92-101 | crates/uv/src/bin/uvx.rs:87-96 — before extracting anything, compare `crates/uv/src/bin/uvw.rs` and `crates/uv/src/bin/uvx.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 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/uv/src/lib.rs:751 — crates/uv/src/lib.rs:751-760 | crates/uv/src/lib.rs:864-873 — both copies are in the same file, so extract the 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/uv-build/src/main.rs:82 — crates/uv-build/src/main.rs:82-91 | crates/uv-build/src/main.rs:95-104 — both copies are in the same file, so extract the 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/uv-auth/src/middleware.rs:728 — crates/uv-auth/src/middleware.rs:728-737 | crates/uv-auth/src/middleware.rs:750-759 — both copies are in the same file, so extract the 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/uv-platform-tags/src/platform_tag.rs:860 — crates/uv-platform-tags/src/platform_tag.rs:860-869 | crates/uv-platform-tags/src/platform_tag.rs:889-898 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D5 · Coupling · Off the main sequence · ×22
  • Off the main sequence: uv-fastid — uv-fastid: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
  • Off the main sequence: uv-flags — uv-flags: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 6 project(s), so it's rigid to change.
  • Off the main sequence: uv-logging — uv-logging: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
  • Off the main sequence: uv-once-map — uv-once-map: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
  • Off the main sequence: uv-small-str — uv-small-str: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 9 project(s), so it's rigid to change.
  • Off the main sequence: uv-windows — uv-windows: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
  • Off the main sequence: uv-normalize — uv-normalize: abstractness 0.00, instability 0.02, distance 0.98 — zone of pain — concrete and depended on by 40 project(s), so it's rigid to change.
  • Off the main sequence: uv-static — uv-static: abstractness 0.00, instability 0.03, distance 0.98 — zone of pain — concrete and depended on by 39 project(s), so it's rigid to change.
  • Off the main sequence: uv-preview — uv-preview: abstractness 0.00, instability 0.07, distance 0.93 — zone of pain — concrete and depended on by 26 project(s), so it's rigid to change.
  • Off the main sequence: uv-platform-tags — uv-platform-tags: abstractness 0.00, instability 0.09, distance 0.91 — zone of pain — concrete and depended on by 21 project(s), so it's rigid to change.
  • Off the main sequence: uv-cache-info — uv-cache-info: abstractness 0.00, instability 0.14, distance 0.86 — zone of pain — concrete and depended on by 12 project(s), so it's rigid to change.
  • Off the main sequence: uv-errors — uv-errors: abstractness 0.11, instability 0.03, distance 0.86 — zone of pain — concrete and depended on by 29 project(s), so it's rigid to change.
  • Off the main sequence: uv-trampoline-builder — uv-trampoline-builder: abstractness 0.00, instability 0.17, distance 0.83 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
  • Off the main sequence: uv-keyring — uv-keyring: abstractness 0.18, instability 0.00, distance 0.82 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: uv-pypi-types — uv-pypi-types: abstractness 0.00, instability 0.19, distance 0.81 — zone of pain — concrete and depended on by 38 project(s), so it's rigid to change.
  • Off the main sequence: uv-distribution-filename — uv-distribution-filename: abstractness 0.00, instability 0.20, distance 0.80 — zone of pain — concrete and depended on by 24 project(s), so it's rigid to change.
  • Off the main sequence: uv-fs — uv-fs: abstractness 0.14, instability 0.06, distance 0.79 — zone of pain — concrete and depended on by 45 project(s), so it's rigid to change.
  • Off the main sequence: uv-shell — uv-shell: abstractness 0.00, instability 0.22, distance 0.78 — zone of pain — concrete and depended on by 7 project(s), so it's rigid to change.
  • Off the main sequence: uv-python-types — uv-python-types: abstractness 0.00, instability 0.23, distance 0.77 — zone of pain — concrete and depended on by 20 project(s), so it's rigid to change.
  • Off the main sequence: uv-options-metadata — uv-options-metadata: abstractness 0.25, instability 0.00, distance 0.75 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
  • Off the main sequence: uv-state — uv-state: abstractness 0.00, instability 0.25, distance 0.75 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
  • Off the main sequence: uv-cache-key — uv-cache-key: abstractness 0.25, instability 0.04, distance 0.71 — zone of pain — concrete and depended on by 22 project(s), so it's rigid to change.
D2 · Cognitive Complexity · uv_project_commands · ×21
  • uv_project_commands::run::run (cognitive 273) crates/uv-project-commands/src/run.rs:90 — uv_project_commands::run::run has cognitive complexity 273 (threshold 15). Drivers by points: if/else 90 (185 pts), match/switch 16 (51 pts), loops 10 (29 pts), boolean chains 8 (nesting depth added 149). 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.
  • uv_project_commands::check::check (cognitive 131) crates/uv-project-commands/src/check.rs:51 — uv_project_commands::check::check has cognitive complexity 131 (threshold 15). Drivers by points: if/else 64 (90 pts), boolean chains 15, match/switch 6 (15 pts), loops 5 (11 pts) (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • uv_project_commands::add::add (cognitive 108) crates/uv-project-commands/src/add.rs:98 — uv_project_commands::add::add has cognitive complexity 108 (threshold 15). Drivers by points: if/else 41 (77 pts), match/switch 13 (20 pts), loops 5 (10 pts), boolean chains 1 (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • uv_project_commands::sync::sync (cognitive 79) crates/uv-project-commands/src/sync.rs:54 — uv_project_commands::sync::sync has cognitive complexity 79 (threshold 15). Drivers by points: if/else 29 (49 pts), match/switch 12 (19 pts), loops 2 (6 pts), boolean chains 5 (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.
  • uv_project_commands::export::export (cognitive 64) crates/uv-project-commands/src/export.rs:155 — uv_project_commands::export::export has cognitive complexity 64 (threshold 15). Drivers by points: if/else 23 (41 pts), match/switch 6 (12 pts), loops 3 (8 pts), boolean chains 3 (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.
  • uv_project_commands::upgrade::upgrade (cognitive 55) crates/uv-project-commands/src/upgrade.rs:165 — uv_project_commands::upgrade::upgrade has cognitive complexity 55 (threshold 15). Drivers by points: if/else 23 (36 pts), loops 6 (8 pts), match/switch 5 (7 pts), boolean chains 4 (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.
  • uv_project_commands::remove::remove (cognitive 53) crates/uv-project-commands/src/remove.rs:44 — uv_project_commands::remove::remove has cognitive complexity 53 (threshold 15). Drivers by points: if/else 24 (42 pts), match/switch 7 (8 pts), boolean chains 2, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • uv_project_commands::add::edits (cognitive 52) crates/uv-project-commands/src/add.rs:879 — uv_project_commands::add::edits has cognitive complexity 52 (threshold 15). Drivers by points: if/else 11 (31 pts), match/switch 6 (17 pts), loops 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.
  • uv_project_commands::tree::tree (cognitive 51) crates/uv-project-commands/src/tree.rs:50 — uv_project_commands::tree::tree has cognitive complexity 51 (threshold 15). Drivers by points: if/else 19 (33 pts), match/switch 7 (11 pts), boolean chains 4, loops 1 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • uv_project_commands::add::lock_and_sync (cognitive 50) crates/uv-project-commands/src/add.rs:1080 — uv_project_commands::add::lock_and_sync has cognitive complexity 50 (threshold 15). Drivers by points: if/else 18 (39 pts), match/switch 3 (7 pts), loops 2 (4 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.
  • uv_project_commands::version::project_version (cognitive 45) crates/uv-project-commands/src/version.rs:76 — uv_project_commands::version::project_version has cognitive complexity 45 (threshold 15). Drivers by points: if/else 18 (29 pts), match/switch 4 (9 pts), boolean chains 5, loops 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.
  • uv_project_commands::export::render_export (cognitive 42) crates/uv-project-commands/src/export.rs:501 — uv_project_commands::export::render_export has cognitive complexity 42 (threshold 15). Drivers by points: if/else 17 (33 pts), loops 2 (6 pts), match/switch 2, 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.
  • uv_project_commands::init::init_project (cognitive 39) crates/uv-project-commands/src/init.rs:290 — uv_project_commands::init::init_project has cognitive complexity 39 (threshold 15). Drivers by points: if/else 21 (35 pts), boolean chains 2, match/switch 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.
  • uv_project_commands::check::ty::run (cognitive 38) crates/uv-project-commands/src/check/ty.rs:25 — uv_project_commands::check::ty::run has cognitive complexity 38 (threshold 15). Drivers by points: if/else 20 (27 pts), match/switch 3 (6 pts), loops 3 (5 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.
  • uv_project_commands::lock::lock (cognitive 37) crates/uv-project-commands/src/lock.rs:39 — uv_project_commands::lock::lock has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (24 pts), loops 2 (8 pts), match/switch 3 (4 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • uv_project_commands::init::determine_requires_python (cognitive 31) crates/uv-project-commands/src/init.rs:506 — uv_project_commands::init::determine_requires_python has cognitive complexity 31 (threshold 15). Drivers by points: if/else 18 (29 pts), match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • uv_project_commands::init::init (cognitive 25) crates/uv-project-commands/src/init.rs:48 — uv_project_commands::init::init has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 5 (10 pts), boolean chains 1 (nesting depth added 13). 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.
  • uv_project_commands::upgrade::select_requirements (cognitive 24) crates/uv-project-commands/src/upgrade.rs:613 — uv_project_commands::upgrade::select_requirements has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4, loops 3 (4 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.
  • uv_project_commands::audit::audit (cognitive 23) crates/uv-project-commands/src/audit.rs:33 — uv_project_commands::audit::audit has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13, boolean chains 5, match/switch 4 (5 pts) (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.
  • uv_project_commands::format::format (cognitive 21) crates/uv-project-commands/src/format.rs:21 — uv_project_commands::format::format has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (17 pts), match/switch 2 (4 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.
  • uv_project_commands::init::generate_package_scripts (cognitive 17) crates/uv-project-commands/src/init.rs:1030 — uv_project_commands::init::generate_package_scripts has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (16 pts), match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×21
  • Duplicated block (8 lines × 2) crates/uv-build-backend/src/metadata.rs:491 — crates/uv-build-backend/src/metadata.rs:491-498 | crates/uv-build-backend/src/metadata.rs:506-513 — both copies are in the same file, so extract the 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/uv-cli/src/settings.rs:2172 — crates/uv-cli/src/settings.rs:2172-2179 | crates/uv-cli/src/settings.rs:2736-2743 — both copies are in the same file, so extract the 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/uv-distribution-types/src/lib.rs:1319 — crates/uv-distribution-types/src/lib.rs:1319-1326 | crates/uv-distribution-types/src/lib.rs:1338-1345 — both copies are in the same file, so extract the 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/uv-environment-operations/src/lib.rs:1087 — crates/uv-environment-operations/src/lib.rs:1087-1094 | crates/uv-environment-operations/src/lib.rs:1298-1305 — both copies are in the same file, so extract the 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/uv-environment-operations/src/sync.rs:400 — crates/uv-environment-operations/src/sync.rs:400-407 | crates/uv-lock-operations/src/lock.rs:607-614 — 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/uv-install-wheel/src/uninstall.rs:66 — crates/uv-install-wheel/src/uninstall.rs:66-73 | crates/uv-install-wheel/src/uninstall.rs:82-89 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/uv-macros/src/options_metadata.rs:382 — crates/uv-macros/src/options_metadata.rs:382-389 | crates/uv-macros/src/options_metadata.rs:415-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 (8 lines × 2) crates/uv-project-commands/src/audit.rs:157 — crates/uv-project-commands/src/audit.rs:157-164 | crates/uv-project-commands/src/export.rs:326-333 — 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/uv-requirements/src/script.rs:44 — crates/uv-requirements/src/script.rs:44-51 | crates/uv-requirements/src/script.rs:186-193 — both copies are in the same file, so extract the 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/uv-resolver/src/resolution/display.rs:350 — crates/uv-resolver/src/resolution/display.rs:350-357 | crates/uv-resolver/src/resolution/display.rs:402-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 (8 lines × 2) crates/uv-tool-commands/src/list.rs:44 — crates/uv-tool-commands/src/list.rs:44-51 | crates/uv-tool-commands/src/run.rs:508-515 — 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/uv-bin-install/src/lib.rs:919 — crates/uv-bin-install/src/lib.rs:919-926 | crates/uv-distribution/src/distribution_database.rs:1823-1830 — 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/uv-python-managed/src/managed.rs:118 — crates/uv-python-managed/src/managed.rs:118-125 | crates/uv-tool/src/lib.rs:210-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 (8 lines × 2) crates/uv-cache/src/lib.rs:713 — crates/uv-cache/src/lib.rs:713-720 | crates/uv-cache/src/lib.rs:727-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 (8 lines × 2) crates/uv-distribution/src/diagnostics.rs:107 — crates/uv-distribution/src/diagnostics.rs:107-114 | crates/uv-distribution/src/diagnostics.rs:119-126 — both copies are in the same file, so extract the 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/uv-platform-tags/src/platform_tag.rs:849 — crates/uv-platform-tags/src/platform_tag.rs:849-856 | crates/uv-platform-tags/src/platform_tag.rs:878-885 — both copies are in the same file, so extract the 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/uv-lock/src/lock/serialize.rs:59 — crates/uv-lock/src/lock/serialize.rs:59-66 | crates/uv-lock/src/lock/serialize.rs:71-78 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/uv-install-operations/src/loggers.rs:79 — crates/uv-install-operations/src/loggers.rs:79-86 | crates/uv-resolve-operations/src/loggers.rs:30-37 — 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/uv/src/commands/reporters.rs:15 — crates/uv/src/commands/reporters.rs:15-22 | crates/uv/src/commands/reporters.rs:44-51 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/uv-install-operations/src/reporters.rs:22 — crates/uv-install-operations/src/reporters.rs:22-29 | crates/uv-resolve-operations/src/reporters.rs:31-38 — 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/uv-lock/src/lock/export/pylock_toml.rs:1678 — crates/uv-lock/src/lock/export/pylock_toml.rs:1678-1685 | crates/uv-lock/src/lock/export/pylock_toml.rs:1838-1845 — both copies are in the same file, so extract the 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 × 2) · ×21
  • Duplicated block (7 lines × 2) crates/uv-build-commands/src/lib.rs:644 — crates/uv-build-commands/src/lib.rs:644-650 | crates/uv/src/commands/venv.rs:288-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 (7 lines × 2) crates/uv-cli/src/settings.rs:1943 — crates/uv-cli/src/settings.rs:1943-1949 | crates/uv-cli/src/settings.rs:2418-2425 — both copies are in the same file, so extract the 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/uv-client/src/registry_client.rs:980 — crates/uv-client/src/registry_client.rs:980-986 | crates/uv-client/src/registry_client.rs:1185-1191 — both copies are in the same file, so extract the 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/uv-configuration/src/target_triple.rs:1888 — crates/uv-configuration/src/target_triple.rs:1888-1894 | crates/uv-configuration/src/target_triple.rs:1902-1908 — both copies are in the same file, so extract the 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/uv-console/src/lib.rs:228 — crates/uv-console/src/lib.rs:228-234 | crates/uv-console/src/lib.rs:260-266 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/uv-distribution/src/source/mod.rs:2179 — crates/uv-distribution/src/source/mod.rs:2179-2185 | crates/uv-distribution/src/source/mod.rs:2365-2371 — both copies are in the same file, so extract the 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/uv-lock/src/lock/export/pylock_toml.rs:1510 — crates/uv-lock/src/lock/export/pylock_toml.rs:1510-1516 | crates/uv-lock/src/lock/export/pylock_toml.rs:1569-1575 — both copies are in the same file, so extract the 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/uv-lock/src/lock/mod.rs:4012 — crates/uv-lock/src/lock/mod.rs:4012-4018 | crates/uv-lock/src/lock/mod.rs:4477-4483 — both copies are in the same file, so extract the 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/uv-lock/src/lock/mod.rs:4660 — crates/uv-lock/src/lock/mod.rs:4660-4669 | crates/uv-lock/src/lock/mod.rs:4674-4680 — both copies are in the same file, so extract the 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/uv-lock/src/lock/mod.rs:8639 — crates/uv-lock/src/lock/mod.rs:8639-8649 | crates/uv-lock/src/lock/mod.rs:8959-8965 — both copies are in the same file, so extract the 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/uv-pip-commands/src/compile.rs:821 — crates/uv-pip-commands/src/compile.rs:821-827 | crates/uv-project-commands/src/export.rs:735-741 — 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/uv-project-commands/src/check.rs:163 — crates/uv-project-commands/src/check.rs:163-169 | crates/uv-project-commands/src/run.rs:581-587 — 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/uv-project-commands/src/init.rs:1289 — crates/uv-project-commands/src/init.rs:1289-1295 | crates/uv-project-commands/src/init.rs:1302-1308 — both copies are in the same file, so extract the 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/uv-project-edit/src/lib.rs:858 — crates/uv-project-edit/src/lib.rs:858-864 | crates/uv-project-edit/src/lib.rs:977-984 — both copies are in the same file, so extract the 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/uv/src/commands/auth/login.rs:27 — crates/uv/src/commands/auth/login.rs:27-33 | crates/uv/src/commands/auth/logout.rs:26-32 — 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/uv-distribution/src/index/registry_wheel_index.rs:404 — crates/uv-distribution/src/index/registry_wheel_index.rs:404-410 | crates/uv-installer/src/satisfies.rs:485-491 — 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/uv-environment-operations/src/error.rs:314 — crates/uv-environment-operations/src/error.rs:314-320 | crates/uv-lock-operations/src/error.rs:292-298 — 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/uv-lock/src/lock/export/pylock_toml.rs:215 — crates/uv-lock/src/lock/export/pylock_toml.rs:215-221 | crates/uv-lock/src/lock/mod.rs:9460-9466 — 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/uv-distribution-types/src/installed.rs:170 — crates/uv-distribution-types/src/installed.rs:170-176 | crates/uv-distribution-types/src/installed.rs:280-286 — both copies are in the same file, so extract the 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/uv-lock/src/lock/serialize.rs:249 — crates/uv-lock/src/lock/serialize.rs:249-255 | crates/uv-lock/src/lock/serialize.rs:365-371 — both copies are in the same file, so extract the 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/uv-pypi-types/src/dependency_groups.rs:55 — crates/uv-pypi-types/src/dependency_groups.rs:55-61 | crates/uv-toml/src/lib.rs:27-33 — 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.
D35 · Change Coupling · Change coupling · ×20
  • Change coupling: login.rs ↔ logout.rs crates/uv/src/commands/auth/login.rs:1 — `crates/uv/src/commands/auth/login.rs` and `crates/uv/src/commands/auth/logout.rs` change together 80% of the time (12 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 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 12 shared commits counted here, the most recent 3 are `1a1a801a` Reject invalid UTF-8 URL credentials (#19814); `fb5de222` auth: use the globally constructed client builder (#16979); `51e8da2d` Move parsing http retries to EnvironmentOptions (#16284) — run `git show` on any of them.
  • Change coupling: extras.rs ↔ lookahead.rs crates/uv-requirements/src/extras.rs:1 — `crates/uv-requirements/src/extras.rs` and `crates/uv-requirements/src/lookahead.rs` change together 73% of the time (8 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 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 `c73db78f` Omit unused runtime settings from lockfiles (#21913); `cf688249` Separate metadata and archive hash policies (#21549); `5dc986d3` Avoid sharing version metadata across indexes (#18373) — run `git show` on any of them.
  • Change coupling: dist_error.rs ↔ diagnostics.rs crates/uv-distribution-types/src/dist_error.rs:1 — `crates/uv-distribution-types/src/dist_error.rs` and `crates/uv/src/commands/diagnostics.rs` change together 70% of the time (7 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 7 shared commits counted here, the most recent 3 are `82c08b83` Make `version` an optional field on installable distribution type (#1…; `dcd96a83` Respect static metadata for already-installed distributions (#10242); `400839c5` Remove derivation chain special casing (#9678) — run `git show` on any of them.
  • Change coupling: prerelease.rs ↔ resolution_mode.rs crates/uv-resolver/src/prerelease.rs:1 — `crates/uv-resolver/src/prerelease.rs` and `crates/uv-resolver/src/resolution_mode.rs` change together 70% of the time (7 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 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 7 shared commits counted here, the most recent 3 are `9b403688` Move resolver configuration into uv-configuration (#21737); `5a23f057` Store resolution options in lockfile (#5264) (at that commit the file was still `crates/uv-resolver/src/prerelease_mode.rs`); `792a917a` Restrict observed requirements to direct when `--no-deps` is specifie… (at that commit the file was still `crates/uv-resolver/src/prerelease_mode.rs`) — run `git show` on any of them.
  • Change coupling: cache_clean.rs ↔ cache_prune.rs crates/uv/src/commands/cache_clean.rs:1 — `crates/uv/src/commands/cache_clean.rs` and `crates/uv/src/commands/cache_prune.rs` change together 70% of the time (7 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 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 7 shared commits counted here, the most recent 3 are `fab2c0c0` Improve basic space accounting when reporting cache clean space savin…; `a25a9520` Uniformly print human readable sizes below 1024 bytes without a fract…; `329b5c8c` Fix human-readable size rounding at unit boundaries (#21136) — run `git show` on any of them.
  • Change coupling: logout.rs ↔ token.rs crates/uv/src/commands/auth/logout.rs:1 — `crates/uv/src/commands/auth/logout.rs` and `crates/uv/src/commands/auth/token.rs` change together 67% of the time (10 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 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 10 shared commits counted here, the most recent 3 are `1a1a801a` Reject invalid UTF-8 URL credentials (#19814); `fb5de222` auth: use the globally constructed client builder (#16979); `51e8da2d` Move parsing http retries to EnvironmentOptions (#16284) — run `git show` on any of them.
  • Change coupling: cached_wheel.rs ↔ plan.rs crates/uv-distribution/src/index/cached_wheel.rs:1 — `crates/uv-distribution/src/index/cached_wheel.rs` and `crates/uv-installer/src/plan.rs` change together 59% of the time (10 of the 17 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 10 shared commits counted here, the most recent 3 are `abf4c7e6` Validate archive sizes before reusing cached distributions (#21609); `806ea29b` Clarify URL conversion ownership (#20224); `58c7cc0e` Reject already-installed wheels built with outdated settings (#15289) — run `git show` on any of them.
  • Change coupling: constraints.rs ↔ overrides.rs crates/uv-configuration/src/constraints.rs:1 — `crates/uv-configuration/src/constraints.rs` and `crates/uv-configuration/src/overrides.rs` change together 57% of the time (8 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency 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 `151e0156` Preserve compound extra guards in dependency overrides (#22237); `7467a0d0` Unify override and exclude code (#20689); `c73db78f` Omit unused runtime settings from lockfiles (#21913) — run `git show` on any of them.
  • Change coupling: compile.rs ↔ sync.rs crates/uv-pip-commands/src/compile.rs:1 — `crates/uv-pip-commands/src/compile.rs` and `crates/uv-pip-commands/src/sync.rs` change together 56% of the time (79 of the 142 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 79 shared commits counted here, the most recent 3 are `27b9edf7` Introduce a `PythonDownloadMirrors` type (#22270) (at that commit the files were still `crates/uv/src/commands/pip/compile.rs` and `crates/uv/src/commands/pip/sync.rs`); `acc5ee23` Reject alternate sources for workspace members across forks (#22153) (at that commit the files were still `crates/uv/src/commands/pip/compile.rs` and `crates/uv/src/commands/pip/sync.rs`); `c73db78f` Omit unused runtime settings from lockfiles (#21913) (at that commit the files were still `crates/uv/src/commands/pip/compile.rs` and `crates/uv/src/commands/pip/sync.rs`) — run `git show` on any of them.
  • Change coupling: lib.rs ↔ dependency_groups.rs crates/uv-cli/src/lib.rs:1 — `crates/uv-cli/src/lib.rs` and `crates/uv-configuration/src/dependency_groups.rs` change together 56% of the time (10 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 10 shared commits counted here, the most recent 3 are `d3a1c704` Fix stale references in crate documentation (#22311); `727d2b84` Add module owners to workspace metadata (#19122); `b81cce91` Support `extras` and `dependency_groups` markers on `uv pip install` … — run `git show` on any of them.
  • Change coupling: download.rs ↔ mod.rs crates/uv-distribution/src/download.rs:1 — `crates/uv-distribution/src/download.rs` and `crates/uv-distribution/src/source/mod.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 `58c7cc0e` Reject already-installed wheels built with outdated settings (#15289); `e4c98e97` Use `Box<Path>` in lieu of `PathBuf` for immutable structs (#12346); `21f4b086` Use boxed slices for hash vector (#11714) — run `git show` on any of them.
  • Change coupling: extras.rs ↔ mod.rs crates/uv-requirements/src/extras.rs:1 — `crates/uv-requirements/src/extras.rs` and `crates/uv-resolver/src/resolver/mod.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 `c73db78f` Omit unused runtime settings from lockfiles (#21913); `5dc986d3` Avoid sharing version metadata across indexes (#18373); `50cf7d19` Use a boxed slice for various requirement types (#12514) — run `git show` on any of them.
  • Change coupling: sync.rs ↔ uninstall.rs crates/uv-pip-commands/src/sync.rs:1 — `crates/uv-pip-commands/src/sync.rs` and `crates/uv-pip-commands/src/uninstall.rs` change together 54% of the time (14 of the 26 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 14 shared commits counted here, the most recent 3 are `743260b1` Make project and interpreter lock acquisition non-fatal (#14404) (at that commit the files were still `crates/uv/src/commands/pip/sync.rs` and `crates/uv/src/commands/pip/uninstall.rs`); `b9d66101` Initialize all `--prefix` subdirectories (#4895) (at that commit the files were still `crates/uv/src/commands/pip/sync.rs` and `crates/uv/src/commands/pip/uninstall.rs`); `92802df2` Suggest correct command to create a virtual environment when encounte… (at that commit the files were still `crates/uv/src/commands/pip/sync.rs` and `crates/uv/src/commands/pip/uninstall.rs`) — run `git show` on any of them.
  • Change coupling: display.rs ↔ output.rs crates/uv-resolver/src/resolution/display.rs:1 — `crates/uv-resolver/src/resolution/display.rs` and `crates/uv-resolver/src/resolution/output.rs` change together 53% of the time (18 of the 34 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 18 shared commits counted here, the most recent 3 are `7467a0d0` Unify override and exclude code (#20689); `116ca06b` Returns new markers from marker operations (#20687); `edf875e3` add conflict markers to the lock file (#9370) — run `git show` on any of them.
  • Change coupling: lib.rs ↔ mod.rs crates/uv-cli/src/lib.rs:1 — `crates/uv-cli/src/lib.rs` and `crates/uv/src/commands/mod.rs` change together 52% of the time (52 of the 100 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 52 shared commits counted here, the most recent 3 are `25c80531` Decouple command inputs and presentation (#22205); `0c8da51a` Add JSON output for `uv pip install` and `uv pip sync` (#21893); `2e79cd74` Implement `uv tool audit` (#20921) — run `git show` on any of them.
  • Change coupling: built_wheel_index.rs ↔ registry_wheel_index.rs crates/uv-distribution/src/index/built_wheel_index.rs:1 — `crates/uv-distribution/src/index/built_wheel_index.rs` and `crates/uv-distribution/src/index/registry_wheel_index.rs` change together 52% of the time (14 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 14 shared commits counted here, the most recent 3 are `abf4c7e6` Validate archive sizes before reusing cached distributions (#21609); `cf688249` Separate metadata and archive hash policies (#21549); `2a555a93` Clarify build information ownership (#20274) — run `git show` on any of them.
  • Change coupling: freeze.rs ↔ list.rs crates/uv-pip-commands/src/freeze.rs:1 — `crates/uv-pip-commands/src/freeze.rs` and `crates/uv-pip-commands/src/list.rs` change together 50% of the time (6 of the 12 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 6 shared commits counted here, the most recent 3 are `fe3a5cbd` Clarify Python resolution input ownership (#20240) (at that commit the files were still `crates/uv/src/commands/pip/freeze.rs` and `crates/uv/src/commands/pip/list.rs`); `7f44de5d` Use `FxHashSet<PackageName>` instead of `Vec` for `exclude` in `uv pi… (at that commit the files were still `crates/uv/src/commands/pip/freeze.rs` and `crates/uv/src/commands/pip/list.rs`); `49b70e72` Support `--target` and `--prefix` in `uv pip list`, `uv pip freeze`, … (at that commit the files were still `crates/uv/src/commands/pip/freeze.rs` and `crates/uv/src/commands/pip/list.rs`) — run `git show` on any of them.
  • Change coupling: validate_zip.rs ↔ distribution_database.rs crates/uv-dev/src/validate_zip.rs:1 — `crates/uv-dev/src/validate_zip.rs` and `crates/uv-distribution/src/distribution_database.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 `6dacee04` Run streaming ZIP extraction in a blocking task (#21372); `471137f5` Deprecate unexpected ZIP compression methods (#17946); `38765535` Revert "Warn on unexpected ZIP compression methods" (#17944) — run `git show` on any of them.
  • Change coupling: error.rs ↔ derivation.rs crates/uv-resolver/src/error.rs:1 — `crates/uv-resolver/src/error.rs` and `crates/uv-resolver/src/resolver/derivation.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 `5b06dc67` Adapt uv to IDs-only PubGrub dependencies (#20048); `7d495713` Rename `Dev` to `Group` internally (#15557); `400839c5` Remove derivation chain special casing (#9678) — run `git show` on any of them.
  • Change coupling: derivation.rs ↔ diagnostics.rs crates/uv-resolver/src/resolver/derivation.rs:1 — `crates/uv-resolver/src/resolver/derivation.rs` and `crates/uv/src/commands/diagnostics.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 `82c08b83` Make `version` an optional field on installable distribution type (#1…; `400839c5` Remove derivation chain special casing (#9678); `5bff2ba2` Include extras and dependency groups in derivation chains (#9113) — run `git show` on any of them.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×18
  • Duplicated block (11 lines × 2) crates/uv-build-backend/src/metadata.rs:559 — crates/uv-build-backend/src/metadata.rs:559-569 | crates/uv-build-backend/src/metadata.rs:589-599 — both copies are in the same file, so extract the 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/uv-cli/src/options.rs:388 — crates/uv-cli/src/options.rs:388-398 | crates/uv-cli/src/options.rs:491-501 — both copies are in the same file, so extract the 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/uv-client/src/html.rs:24 — crates/uv-client/src/html.rs:24-34 | crates/uv-pypi-types/src/simple_json.rs:74-84 — 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/uv-dev/src/main.rs:27 — crates/uv-dev/src/main.rs:27-37 | crates/uv/src/logging.rs:133-143 — 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/uv-distribution/src/metadata/requires_dist.rs:427 — crates/uv-distribution/src/metadata/requires_dist.rs:427-437 | crates/uv-resolver/src/resolver/requirements.rs:187-197 — 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/uv-keyring/src/macos.rs:96 — crates/uv-keyring/src/macos.rs:96-106 | crates/uv-keyring/src/macos.rs:116-126 — both copies are in the same file, so extract the 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/uv-normalize/src/extra_name.rs:28 — crates/uv-normalize/src/extra_name.rs:28-38 | crates/uv-normalize/src/group_name.rs:224-234 — before extracting anything, compare `crates/uv-normalize/src/extra_name.rs` and `crates/uv-normalize/src/group_name.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 33 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/uv-requirements/src/unnamed.rs:155 — crates/uv-requirements/src/unnamed.rs:155-165 | crates/uv-requirements/src/unnamed.rs:180-190 — both copies are in the same file, so extract the 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/uv-requirements/src/unnamed.rs:199 — crates/uv-requirements/src/unnamed.rs:199-209 | crates/uv-requirements/src/unnamed.rs:221-231 — both copies are in the same file, so extract the 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/uv-resolver/src/pubgrub/report.rs:2248 — crates/uv-resolver/src/pubgrub/report.rs:2248-2258 | crates/uv-resolver/src/pubgrub/report.rs:2284-2294 — both copies are in the same file, so extract the 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/uv-resolver/src/resolution/display.rs:125 — crates/uv-resolver/src/resolution/display.rs:125-135 | crates/uv-resolver/src/resolution/display.rs:149-159 — both copies are in the same file, so extract the 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/uv-resolver/src/resolver/mod.rs:1509 — crates/uv-resolver/src/resolver/mod.rs:1509-1519 | crates/uv-resolver/src/resolver/mod.rs:1732-1742 — both copies are in the same file, so extract the 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/uv-settings/src/settings.rs:523 — crates/uv-settings/src/settings.rs:523-533 | crates/uv-settings/src/settings.rs:536-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 (11 lines × 2) crates/uv-install-wheel/src/wheel.rs:939 — crates/uv-install-wheel/src/wheel.rs:939-949 | crates/uv-install-wheel/src/wheel.rs:953-965 — both copies are in the same file, so extract the 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/uv-distribution-types/src/requirement.rs:986 — crates/uv-distribution-types/src/requirement.rs:986-997 | crates/uv-lock/src/lock/mod.rs:8797-8807 — 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/uv-cache/src/cli.rs:102 — crates/uv-cache/src/cli.rs:102-113 | crates/uv-cache/src/cli.rs:122-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 (11 lines × 2) crates/uv-distribution/src/diagnostics.rs:63 — crates/uv-distribution/src/diagnostics.rs:63-73 | crates/uv-distribution/src/diagnostics.rs:80-90 — both copies are in the same file, so extract the 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/uv-project-edit/src/lib.rs:299 — crates/uv-project-edit/src/lib.rs:299-309 | crates/uv-project-edit/src/lib.rs:922-932 — both copies are in the same file, so extract the 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 × 2) · ×18
  • Duplicated block (9 lines × 2) crates/uv-build/src/main.rs:105 — crates/uv-build/src/main.rs:105-113 | crates/uv-build/src/main.rs:115-123 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/uv-client/src/error.rs:694 — crates/uv-client/src/error.rs:694-702 | crates/uv-client/src/error.rs:714-722 — both copies are in the same file, so extract the 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/uv-distribution-types/src/requirement.rs:243 — crates/uv-distribution-types/src/requirement.rs:243-251 | crates/uv-distribution-types/src/requirement.rs:265-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 (9 lines × 2) crates/uv-distribution-types/src/requirement.rs:428 — crates/uv-distribution-types/src/requirement.rs:428-436 | crates/uv-distribution-types/src/requirement.rs:898-906 — both copies are in the same file, so extract the 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/uv-distribution/src/metadata/build_requires.rs:282 — crates/uv-distribution/src/metadata/build_requires.rs:282-290 | crates/uv-distribution/src/metadata/dependency_groups.rs:129-137 — 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/uv-distribution/src/metadata/lowering.rs:319 — crates/uv-distribution/src/metadata/lowering.rs:319-327 | crates/uv-distribution/src/metadata/lowering.rs:500-508 — both copies are in the same file, so extract the 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/uv-distribution/src/source/mod.rs:3045 — crates/uv-distribution/src/source/mod.rs:3045-3053 | crates/uv-distribution/src/source/mod.rs:3175-3183 — both copies are in the same file, so extract the 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/uv-lock/src/lock/export/pylock_toml.rs:1385 — crates/uv-lock/src/lock/export/pylock_toml.rs:1385-1393 | crates/uv-lock/src/lock/export/pylock_toml.rs:1429-1441 — both copies are in the same file, so extract the 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/uv-lock/src/lock/mod.rs:993 — crates/uv-lock/src/lock/mod.rs:993-1001 | crates/uv-lock/src/lock/mod.rs:1196-1204 — both copies are in the same file, so extract the 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/uv-lock/src/lock/mod.rs:7887 — crates/uv-lock/src/lock/mod.rs:7887-7895 | crates/uv-lock/src/lock/mod.rs:7903-7911 — both copies are in the same file, so extract the 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/uv-lock/src/lock/tree.rs:426 — crates/uv-lock/src/lock/tree.rs:426-434 | crates/uv-lock/src/lock/tree.rs:452-460 — both copies are in the same file, so extract the 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/uv-project-commands/src/check/ty.rs:72 — crates/uv-project-commands/src/check/ty.rs:72-80 | crates/uv-project-commands/src/format.rs:100-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 (9 lines × 2) crates/uv-project-commands/src/export.rs:338 — crates/uv-project-commands/src/export.rs:338-349 | crates/uv-project-commands/src/tree.rs:229-237 — 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/uv-tool-commands/src/run.rs:909 — crates/uv-tool-commands/src/run.rs:909-917 | crates/uv-tool-commands/src/run.rs:932-940 — both copies are in the same file, so extract the 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/uv-lock/src/lock/export/pylock_toml.rs:1118 — crates/uv-lock/src/lock/export/pylock_toml.rs:1118-1126 | crates/uv-lock/src/lock/export/pylock_toml.rs:1130-1138 — both copies are in the same file, so extract the 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/uv-distribution-filename/src/wheel.rs:217 — crates/uv-distribution-filename/src/wheel.rs:217-225 | crates/uv-distribution-filename/src/wheel.rs:231-239 — both copies are in the same file, so extract the 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/uv-install-operations/src/loggers.rs:135 — crates/uv-install-operations/src/loggers.rs:135-143 | crates/uv-install-operations/src/loggers.rs:160-168 — both copies are in the same file, so extract the 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/uv-bin-install/src/lib.rs:179 — crates/uv-bin-install/src/lib.rs:179-187 | crates/uv-bin-install/src/lib.rs:191-199 — both copies are in the same file, so extract the 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 · uv_project_commands · ×17
  • uv_project_commands::run::run (cyclomatic 112) crates/uv-project-commands/src/run.rs:90 — uv_project_commands::run::run has cyclomatic complexity 112 (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.
  • uv_project_commands::check::check (cyclomatic 70) crates/uv-project-commands/src/check.rs:51 — uv_project_commands::check::check has cyclomatic complexity 70 (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.
  • uv_project_commands::add::add (cyclomatic 62) crates/uv-project-commands/src/add.rs:98 — uv_project_commands::add::add has cyclomatic complexity 62 (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.
  • uv_project_commands::sync::sync (cyclomatic 49) crates/uv-project-commands/src/sync.rs:54 — uv_project_commands::sync::sync has cyclomatic complexity 49 (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.
  • uv_project_commands::upgrade::upgrade (cyclomatic 37) crates/uv-project-commands/src/upgrade.rs:165 — uv_project_commands::upgrade::upgrade has cyclomatic complexity 37 (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.
  • uv_project_commands::version::project_version (cyclomatic 33) crates/uv-project-commands/src/version.rs:76 — uv_project_commands::version::project_version 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.
  • uv_project_commands::remove::remove (cyclomatic 32) crates/uv-project-commands/src/remove.rs:44 — uv_project_commands::remove::remove has cyclomatic complexity 32 (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.
  • uv_project_commands::export::export (cyclomatic 30) crates/uv-project-commands/src/export.rs:155 — uv_project_commands::export::export 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.
  • uv_project_commands::tree::tree (cyclomatic 29) crates/uv-project-commands/src/tree.rs:50 — uv_project_commands::tree::tree 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.
  • uv_project_commands::check::ty::run (cyclomatic 27) crates/uv-project-commands/src/check/ty.rs:25 — uv_project_commands::check::ty::run 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.
  • uv_project_commands::add::edits (cyclomatic 26) crates/uv-project-commands/src/add.rs:879 — uv_project_commands::add::edits 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.
  • uv_project_commands::export::render_export (cyclomatic 24) crates/uv-project-commands/src/export.rs:501 — uv_project_commands::export::render_export 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.
  • uv_project_commands::add::lock_and_sync (cyclomatic 23) crates/uv-project-commands/src/add.rs:1080 — uv_project_commands::add::lock_and_sync 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.
  • uv_project_commands::audit::audit (cyclomatic 19) crates/uv-project-commands/src/audit.rs:33 — uv_project_commands::audit::audit 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.
  • uv_project_commands::init::init_project (cyclomatic 19) crates/uv-project-commands/src/init.rs:290 — uv_project_commands::init::init_project 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.
  • uv_project_commands::lock::lock (cyclomatic 18) crates/uv-project-commands/src/lock.rs:39 — uv_project_commands::lock::lock 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.
  • uv_project_commands::upgrade::select_requirements (cyclomatic 17) crates/uv-project-commands/src/upgrade.rs:613 — uv_project_commands::upgrade::select_requirements 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.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×17
  • Duplicated block (13 lines × 2) crates/uv-build-backend/src/wheel.rs:101 — crates/uv-build-backend/src/wheel.rs:101-113 | crates/uv-build-backend/src/wheel.rs:410-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 (13 lines × 2) crates/uv-cli/src/settings.rs:1890 — crates/uv-cli/src/settings.rs:1890-1902 | crates/uv-cli/src/settings.rs:2740-2752 — both copies are in the same file, so extract the 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/uv-cli/src/settings.rs:3989 — crates/uv-cli/src/settings.rs:3989-4001 | crates/uv-cli/src/settings.rs:4092-4104 — both copies are in the same file, so extract the 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/uv-client/src/cached_client.rs:629 — crates/uv-client/src/cached_client.rs:629-641 | crates/uv-client/src/cached_client.rs:700-712 — both copies are in the same file, so extract the 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/uv-client/src/registry_client.rs:568 — crates/uv-client/src/registry_client.rs:568-580 | crates/uv-client/src/registry_client.rs:966-978 — both copies are in the same file, so extract the 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/uv-distribution/src/metadata/dependency_groups.rs:144 — crates/uv-distribution/src/metadata/dependency_groups.rs:144-156 | crates/uv-distribution/src/metadata/requires_dist.rs:148-160 — before extracting anything, compare `crates/uv-distribution/src/metadata/dependency_groups.rs` and `crates/uv-distribution/src/metadata/requires_dist.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 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 × 2) crates/uv-distribution/src/metadata/dependency_groups.rs:175 — crates/uv-distribution/src/metadata/dependency_groups.rs:175-187 | crates/uv-distribution/src/metadata/requires_dist.rs:179-191 — before extracting anything, compare `crates/uv-distribution/src/metadata/dependency_groups.rs` and `crates/uv-distribution/src/metadata/requires_dist.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 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 × 2) crates/uv-installer/src/plan.rs:551 — crates/uv-installer/src/plan.rs:551-563 | crates/uv-installer/src/plan.rs:609-621 — both copies are in the same file, so extract the 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/uv-pip-commands/src/install.rs:591 — crates/uv-pip-commands/src/install.rs:591-603 | crates/uv-pip-commands/src/sync.rs:476-488 — before extracting anything, compare `crates/uv-pip-commands/src/install.rs` and `crates/uv-pip-commands/src/sync.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 324 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 × 2) crates/uv-pip-commands/src/list.rs:304 — crates/uv-pip-commands/src/list.rs:304-316 | crates/uv-pip-commands/src/show.rs:231-243 — before extracting anything, compare `crates/uv-pip-commands/src/list.rs` and `crates/uv-pip-commands/src/show.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 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 × 2) crates/uv-project-commands/src/run.rs:230 — crates/uv-project-commands/src/run.rs:230-242 | crates/uv-project-commands/src/run.rs:708-720 — both copies are in the same file, so extract the 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/uv-requirements/src/specification.rs:435 — crates/uv-requirements/src/specification.rs:435-447 | crates/uv-requirements/src/specification.rs:449-461 — both copies are in the same file, so extract the 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/uv-resolve-operations/src/lib.rs:148 — crates/uv-resolve-operations/src/lib.rs:148-160 | crates/uv-resolve-operations/src/lib.rs:292-304 — both copies are in the same file, so extract the 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/uv/src/lib.rs:1900 — crates/uv/src/lib.rs:1900-1912 | crates/uv/src/lib.rs:1934-1946 — both copies are in the same file, so extract the 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/uv-lock/src/lock/mod.rs:3414 — crates/uv-lock/src/lock/mod.rs:3414-3426 | crates/uv-lock/src/lock/mod.rs:3463-3475 — both copies are in the same file, so extract the 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/uv-build-backend/src/source_dist.rs:344 — crates/uv-build-backend/src/source_dist.rs:344-356 | crates/uv-build-backend/src/wheel.rs:183-195 — 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/uv-python-managed/src/windows_registry.rs:174 — crates/uv-python-managed/src/windows_registry.rs:174-186 | crates/uv-python-managed/src/windows_registry.rs:189-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.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×15
  • Duplicated block (5 lines × 2) crates/uv-configuration/src/add_bounds.rs:85 — crates/uv-configuration/src/add_bounds.rs:85-89 | crates/uv-configuration/src/add_bounds.rs:123-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 (5 lines × 2) crates/uv-distribution-types/src/config_settings.rs:195 — crates/uv-distribution-types/src/config_settings.rs:195-199 | crates/uv-distribution-types/src/config_settings.rs:292-296 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/uv-distribution-types/src/requirement.rs:1231 — crates/uv-distribution-types/src/requirement.rs:1231-1235 | crates/uv-distribution-types/src/requirement.rs:1251-1255 — both copies are in the same file, so extract the 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/uv-distribution/src/metadata/requires_dist.rs:377 — crates/uv-distribution/src/metadata/requires_dist.rs:377-381 | crates/uv-resolver/src/resolver/requirements.rs:122-126 — 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 (5 lines × 2) crates/uv-lock/src/lock/export/pylock_toml.rs:1649 — crates/uv-lock/src/lock/export/pylock_toml.rs:1649-1653 | crates/uv-lock/src/lock/export/pylock_toml.rs:1804-1808 — both copies are in the same file, so extract the 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/uv-lock/src/lock/export/pylock_toml.rs:1933 — crates/uv-lock/src/lock/export/pylock_toml.rs:1933-1937 | crates/uv-lock/src/lock/export/pylock_toml.rs:1979-1983 — both copies are in the same file, so extract the 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/uv-lock/src/lock/mod.rs:7882 — crates/uv-lock/src/lock/mod.rs:7882-7886 | crates/uv-lock/src/lock/mod.rs:7898-7902 — both copies are in the same file, so extract the 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/uv-project-commands/src/add.rs:1002 — crates/uv-project-commands/src/add.rs:1002-1006 | crates/uv-project-commands/src/add.rs:1020-1024 — both copies are in the same file, so extract the 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/uv-requirements/src/sources.rs:179 — crates/uv-requirements/src/sources.rs:179-183 | crates/uv-requirements/src/sources.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/uv-resolver/src/pubgrub/report.rs:1966 — crates/uv-resolver/src/pubgrub/report.rs:1966-1970 | crates/uv-resolver/src/pubgrub/report.rs:1974-1978 — both copies are in the same file, so extract the 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/uv-workspace/src/pyproject.rs:1980 — crates/uv-workspace/src/pyproject.rs:1980-1984 | crates/uv-workspace/src/pyproject.rs:1991-1995 — both copies are in the same file, so extract the 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/uv/src/commands/auth/login.rs:21 — crates/uv/src/commands/auth/login.rs:21-26 | crates/uv/src/commands/auth/logout.rs:21-25 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) crates/uv-resolver/src/resolver/mod.rs:2351 — crates/uv-resolver/src/resolver/mod.rs:2351-2358 | crates/uv-resolver/src/resolver/mod.rs:2370-2374 — both copies are in the same file, so extract the 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/uv-project-commands/src/run.rs:460 — crates/uv-project-commands/src/run.rs:460-465 | crates/uv-project-commands/src/run.rs:953-957 — both copies are in the same file, so extract the 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/uv-install-operations/src/reporters.rs:17 — crates/uv-install-operations/src/reporters.rs:17-21 | crates/uv-resolve-operations/src/reporters.rs:26-30 — 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 lines × 2) · ×14
  • Duplicated block (17 lines × 2) crates/uv-cli/src/options.rs:282 — crates/uv-cli/src/options.rs:282-298 | crates/uv-cli/src/options.rs:451-467 — both copies are in the same file, so extract the 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/uv-command-support/src/progress.rs:139 — crates/uv-command-support/src/progress.rs:139-155 | crates/uv-command-support/src/progress.rs:361-377 — both copies are in the same file, so extract the 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/uv-distribution/src/index/registry_wheel_index.rs:241 — crates/uv-distribution/src/index/registry_wheel_index.rs:241-257 | crates/uv-distribution/src/index/registry_wheel_index.rs:267-283 — both copies are in the same file, so extract the 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/uv-environment-operations/src/lib.rs:1561 — crates/uv-environment-operations/src/lib.rs:1561-1577 | crates/uv-environment-operations/src/lib.rs:1703-1719 — both copies are in the same file, so extract the 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/uv-installer/src/plan.rs:672 — crates/uv-installer/src/plan.rs:672-688 | crates/uv-installer/src/plan.rs:693-709 — both copies are in the same file, so extract the 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/uv-lock/src/lock/mod.rs:3582 — crates/uv-lock/src/lock/mod.rs:3582-3598 | crates/uv-lock/src/lock/mod.rs:3607-3623 — both copies are in the same file, so extract the 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/uv-pip-commands/src/install.rs:261 — crates/uv-pip-commands/src/install.rs:261-277 | crates/uv-pip-commands/src/sync.rs:223-239 — before extracting anything, compare `crates/uv-pip-commands/src/install.rs` and `crates/uv-pip-commands/src/sync.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 324 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/uv-project-edit/src/lib.rs:522 — crates/uv-project-edit/src/lib.rs:522-538 | crates/uv-project-edit/src/lib.rs:622-638 — both copies are in the same file, so extract the 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/uv-pypi-types/src/metadata/metadata_resolver.rs:198 — crates/uv-pypi-types/src/metadata/metadata_resolver.rs:198-214 | crates/uv-pypi-types/src/metadata/requires_dist.rs:42-60 — before extracting anything, compare `crates/uv-pypi-types/src/metadata/metadata_resolver.rs` and `crates/uv-pypi-types/src/metadata/requires_dist.rs` as WHOLE FILES: this scan already matched 4 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 (17 lines × 2) crates/uv-settings/src/settings.rs:2298 — crates/uv-settings/src/settings.rs:2298-2314 | crates/uv-settings/src/settings.rs:2602-2618 — both copies are in the same file, so extract the 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/uv/src/bin/uvw.rs:32 — crates/uv/src/bin/uvw.rs:32-48 | crates/uv/src/bin/uvx.rs:30-46 — before extracting anything, compare `crates/uv/src/bin/uvw.rs` and `crates/uv/src/bin/uvx.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 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/uv/src/lib.rs:979 — crates/uv/src/lib.rs:979-995 | crates/uv/src/lib.rs:2576-2592 — both copies are in the same file, so extract the 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/uv-project-commands/src/init.rs:343 — crates/uv-project-commands/src/init.rs:343-359 | crates/uv-project-commands/src/run.rs:534-551 — 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/uv-workspace/src/pyproject.rs:1447 — crates/uv-workspace/src/pyproject.rs:1447-1463 | crates/uv-workspace/src/pyproject.rs:1559-1575 — both copies are in the same file, so extract the 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 (6 lines × 2) · ×14
  • Duplicated block (6 lines × 2) crates/uv-audit-operations/src/reporter.rs:14 — crates/uv-audit-operations/src/reporter.rs:14-19 | crates/uv-resolve-operations/src/reporters.rs:28-33 — 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/uv-client/src/registry_client.rs:763 — crates/uv-client/src/registry_client.rs:763-768 | crates/uv-client/src/registry_client.rs:911-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.
  • Duplicated block (6 lines × 2) crates/uv-distribution-types/src/requires_python.rs:160 — crates/uv-distribution-types/src/requires_python.rs:160-165 | crates/uv-distribution-types/src/requires_python.rs:172-177 — both copies are in the same file, so extract the 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/uv-distribution-types/src/requires_python.rs:184 — crates/uv-distribution-types/src/requires_python.rs:184-189 | crates/uv-distribution-types/src/requires_python.rs:196-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 (6 lines × 2) crates/uv-python-types/src/request.rs:1319 — crates/uv-python-types/src/request.rs:1319-1324 | crates/uv-python-types/src/request.rs:1368-1373 — both copies are in the same file, so extract the 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/uv-python-types/src/request.rs:1466 — crates/uv-python-types/src/request.rs:1466-1471 | crates/uv-python-types/src/request.rs:1479-1484 — both copies are in the same file, so extract the 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/uv-environment-operations/src/lib.rs:752 — crates/uv-environment-operations/src/lib.rs:752-757 | crates/uv-python-discovery/src/script.rs:306-311 — 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/uv-lock/src/lock/export/metadata.rs:1317 — crates/uv-lock/src/lock/export/metadata.rs:1317-1322 | crates/uv-lock/src/lock/tree.rs:40-45 — 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/uv-test/src/find_links.rs:21 — crates/uv-test/src/find_links.rs:21-26 | crates/uv-test/src/packse/server.rs:55-60 — 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/uv-project-commands/src/edit.rs:30 — crates/uv-project-commands/src/edit.rs:30-35 | crates/uv-project-commands/src/export.rs:53-58 — 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/uv-install-wheel/src/uninstall.rs:125 — crates/uv-install-wheel/src/uninstall.rs:125-130 | crates/uv-install-wheel/src/uninstall.rs:376-381 — both copies are in the same file, so extract the 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/uv-build/src/main.rs:74 — crates/uv-build/src/main.rs:74-79 | crates/uv-build/src/main.rs:87-92 — both copies are in the same file, so extract the 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/uv-installer/src/plan.rs:470 — crates/uv-installer/src/plan.rs:470-475 | crates/uv-installer/src/plan.rs:540-545 — both copies are in the same file, so extract the 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/uv-distribution/src/source/mod.rs:3532 — crates/uv-distribution/src/source/mod.rs:3532-3537 | crates/uv-distribution/src/source/mod.rs:3576-3581 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D3 · God Classes · TooManyFields · ×13
  • TooManyFields: OptionsWire crates/uv-settings/src/settings.rs:2644 — TooManyFields — 79 stored fields. The bar is 30 stored fields; this is 49 over it, 2.63× 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: PipOptions crates/uv-settings/src/settings.rs:1461 — TooManyFields — 64 stored fields beside 1 method. The bar is 30 stored fields; this is 34 over it, 2.13× 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: EnvironmentOptions crates/uv-settings/src/lib.rs:748 — TooManyFields — 61 stored fields beside 1 method. The bar is 30 stored fields; this is 31 over it, 2.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.
  • TooManyFields: PipSettings crates/uv-cli/src/settings.rs:4561 — TooManyFields — 51 stored fields beside 1 method. The bar is 30 stored fields; this is 21 over it, 1.70× 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: PipCompileArgs crates/uv-cli/src/lib.rs:1370 — TooManyFields — 50 stored fields. The bar is 30 stored fields; this is 20 over it, 1.67× 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: ExportArgs crates/uv-cli/src/lib.rs:4482 — TooManyFields — 41 stored fields. The bar is 30 stored fields; this is 11 over it, 1.37× 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: AddArgs crates/uv-cli/src/lib.rs:3933 — TooManyFields — 40 stored fields. 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: PipInstallArgs crates/uv-cli/src/lib.rs:2010 — TooManyFields — 39 stored fields. The bar is 30 stored fields; this is 9 over it, 1.30× 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: RunArgs crates/uv-cli/src/lib.rs:3244 — TooManyFields — 37 stored fields. The bar is 30 stored fields; this is 7 over it, 1.23× 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: SyncArgs crates/uv-cli/src/lib.rs:3522 — TooManyFields — 36 stored fields. The bar is 30 stored fields; this is 6 over it, 1.20× 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: AddSettings crates/uv-cli/src/settings.rs:2207 — TooManyFields — 34 stored fields beside 1 method. The bar is 30 stored fields; this is 4 over it, 1.13× 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: ResolverInstallerSchema crates/uv-settings/src/settings.rs:836 — TooManyFields — 34 stored fields beside 1 method. The bar is 30 stored fields; this is 4 over it, 1.13× 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: PipSyncArgs crates/uv-cli/src/lib.rs:1712 — TooManyFields — 34 stored fields. The bar is 30 stored fields; this is 4 over it, 1.13× 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 (16 lines × 2) · ×13
  • Duplicated block (16 lines × 2) crates/uv-build-frontend/src/lib.rs:941 — crates/uv-build-frontend/src/lib.rs:941-956 | crates/uv-build-frontend/src/lib.rs:1061-1076 — both copies are in the same file, so extract the 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/uv-client/src/registry_client.rs:1171 — crates/uv-client/src/registry_client.rs:1171-1186 | crates/uv-client/src/registry_client.rs:1250-1265 — both copies are in the same file, so extract the 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/uv-distribution/src/metadata/build_requires.rs:182 — crates/uv-distribution/src/metadata/build_requires.rs:182-197 | crates/uv-distribution/src/metadata/dependency_groups.rs:119-134 — 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/uv-distribution/src/source/mod.rs:3255 — crates/uv-distribution/src/source/mod.rs:3255-3270 | crates/uv-distribution/src/source/mod.rs:3279-3294 — both copies are in the same file, so extract the 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/uv-fs/src/path.rs:226 — crates/uv-fs/src/path.rs:226-241 | crates/uv-install-wheel/src/uninstall.rs:429-444 — 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/uv-lock-operations/src/lock.rs:198 — crates/uv-lock-operations/src/lock.rs:198-213 | crates/uv-lock-operations/src/lock.rs:253-268 — both copies are in the same file, so extract the 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/uv-lock/src/lock/export/pylock_toml.rs:530 — crates/uv-lock/src/lock/export/pylock_toml.rs:530-545 | crates/uv-lock/src/lock/export/pylock_toml.rs:632-647 — both copies are in the same file, so extract the 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/uv-lock/src/lock/tree.rs:262 — crates/uv-lock/src/lock/tree.rs:262-277 | crates/uv-lock/src/lock/tree.rs:315-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 (16 lines × 2) crates/uv-project-commands/src/init.rs:569 — crates/uv-project-commands/src/init.rs:569-584 | crates/uv-project-commands/src/init.rs:666-681 — both copies are in the same file, so extract the 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/uv-project-commands/src/lock.rs:108 — crates/uv-project-commands/src/lock.rs:108-123 | crates/uv-workspace-commands/src/metadata.rs:127-142 — 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/uv-project-commands/src/run.rs:1728 — crates/uv-project-commands/src/run.rs:1728-1743 | crates/uv-project-commands/src/run.rs:1759-1774 — both copies are in the same file, so extract the 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/uv-resolver/src/resolution/display.rs:369 — crates/uv-resolver/src/resolution/display.rs:369-384 | crates/uv-resolver/src/resolution/display.rs:426-441 — both copies are in the same file, so extract the 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/uv-build-backend/src/source_dist.rs:315 — crates/uv-build-backend/src/source_dist.rs:315-330 | crates/uv-build-backend/src/wheel.rs:158-175 — 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 (19 lines × 2) · ×12
  • Duplicated block (19 lines × 2) crates/uv-build-commands/src/lib.rs:843 — crates/uv-build-commands/src/lib.rs:843-861 | crates/uv-build-commands/src/lib.rs:970-988 — both copies are in the same file, so extract the 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/uv-build-commands/src/lib.rs:1122 — crates/uv-build-commands/src/lib.rs:1122-1140 | crates/uv-build-commands/src/lib.rs:1239-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.
  • Duplicated block (19 lines × 2) crates/uv-distribution/src/distribution_database.rs:885 — crates/uv-distribution/src/distribution_database.rs:885-903 | crates/uv-distribution/src/distribution_database.rs:1013-1031 — both copies are in the same file, so extract the 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/uv-lock/src/lock/export/pylock_toml.rs:1687 — crates/uv-lock/src/lock/export/pylock_toml.rs:1687-1705 | crates/uv-lock/src/lock/export/pylock_toml.rs:1847-1865 — both copies are in the same file, so extract the 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/uv-lock/src/lock/installable.rs:490 — crates/uv-lock/src/lock/installable.rs:490-508 | crates/uv-lock/src/lock/installable.rs:565-583 — both copies are in the same file, so extract the 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/uv-lock/src/lock/installable.rs:530 — crates/uv-lock/src/lock/installable.rs:530-548 | crates/uv-lock/src/lock/installable.rs:627-645 — both copies are in the same file, so extract the 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/uv-lock/src/lock/mod.rs:8618 — crates/uv-lock/src/lock/mod.rs:8618-8636 | crates/uv-lock/src/lock/mod.rs:8671-8689 — both copies are in the same file, so extract the 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/uv-pip-commands/src/compile.rs:248 — crates/uv-pip-commands/src/compile.rs:248-266 | crates/uv-pip-commands/src/install.rs:194-212 — 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 (19 lines × 2) crates/uv-pip-commands/src/sync.rs:237 — crates/uv-pip-commands/src/sync.rs:237-255 | crates/uv-pip-commands/src/uninstall.rs:81-99 — before extracting anything, compare `crates/uv-pip-commands/src/sync.rs` and `crates/uv-pip-commands/src/uninstall.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 (19 lines × 2) crates/uv-project-commands/src/run.rs:294 — crates/uv-project-commands/src/run.rs:294-312 | crates/uv-project-commands/src/run.rs:778-796 — both copies are in the same file, so extract the 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/uv-requirements/src/sources.rs:185 — crates/uv-requirements/src/sources.rs:185-203 | crates/uv-requirements/src/sources.rs:235-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 (19 lines × 2) crates/uv-tool-commands/src/run.rs:1195 — crates/uv-tool-commands/src/run.rs:1195-1213 | crates/uv-tool-commands/src/run.rs:1257-1275 — both copies are in the same file, so extract the 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) · ×12
  • Duplicated block (15 lines × 2) crates/uv-distribution-types/src/lib.rs:479 — crates/uv-distribution-types/src/lib.rs:479-493 | crates/uv-distribution-types/src/lib.rs:580-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 (15 lines × 2) crates/uv-distribution/src/index/built_wheel_index.rs:93 — crates/uv-distribution/src/index/built_wheel_index.rs:93-107 | crates/uv-distribution/src/index/built_wheel_index.rs:281-295 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) crates/uv-distribution/src/index/built_wheel_index.rs:125 — crates/uv-distribution/src/index/built_wheel_index.rs:125-139 | crates/uv-distribution/src/index/built_wheel_index.rs:179-193 — both copies are in the same file, so extract the 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/uv-distribution/src/source/mod.rs:1661 — crates/uv-distribution/src/source/mod.rs:1661-1675 | crates/uv-distribution/src/source/mod.rs:2508-2522 — both copies are in the same file, so extract the 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/uv-lock/src/lock/serialize.rs:329 — crates/uv-lock/src/lock/serialize.rs:329-343 | crates/uv-lock/src/lock/serialize.rs:348-362 — both copies are in the same file, so extract the 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/uv-project-edit/src/lib.rs:791 — crates/uv-project-edit/src/lib.rs:791-805 | crates/uv-project-edit/src/lib.rs:820-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 (15 lines × 2) crates/uv-settings/src/lib.rs:1027 — crates/uv-settings/src/lib.rs:1027-1041 | crates/uv-settings/src/lib.rs:1055-1069 — both copies are in the same file, so extract the 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/uv-settings/src/settings.rs:2473 — crates/uv-settings/src/settings.rs:2473-2487 | crates/uv-settings/src/settings.rs:2614-2628 — both copies are in the same file, so extract the 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/uv-workspace/src/workspace.rs:702 — crates/uv-workspace/src/workspace.rs:702-716 | crates/uv-workspace/src/workspace.rs:838-852 — both copies are in the same file, so extract the 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/uv/src/bin/uvw.rs:54 — crates/uv/src/bin/uvw.rs:54-68 | crates/uv/src/bin/uvx.rs:52-66 — before extracting anything, compare `crates/uv/src/bin/uvw.rs` and `crates/uv/src/bin/uvx.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 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/uv/src/lib.rs:1570 — crates/uv/src/lib.rs:1570-1584 | crates/uv/src/lib.rs:2345-2359 — both copies are in the same file, so extract the 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/uv-project-commands/src/version.rs:231 — crates/uv-project-commands/src/version.rs:231-245 | crates/uv-project-commands/src/version.rs:246-261 — both copies are in the same file, so extract the 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 · Lock · ×11
  • Lock::satisfies (cognitive 196) crates/uv-lock/src/lock/mod.rs:4201 — Lock::satisfies has cognitive complexity 196 (threshold 15). Drivers by points: if/else 62 (141 pts), match/switch 10 (25 pts), loops 9 (20 pts), boolean chains 10 (nesting depth added 105). 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.
  • Lock::extend_dependency_source_reachability (cognitive 153) crates/uv-lock/src/lock/mod.rs:5182 — Lock::extend_dependency_source_reachability has cognitive complexity 153 (threshold 15). Drivers by points: if/else 28 (100 pts), loops 8 (28 pts), boolean chains 14, match/switch 2 (11 pts) (nesting depth added 101). 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.
  • Lock::collect_dependency_sources (cognitive 111) crates/uv-lock/src/lock/mod.rs:5506 — Lock::collect_dependency_sources has cognitive complexity 111 (threshold 15). Drivers by points: if/else 28 (74 pts), loops 14 (29 pts), boolean chains 8 (nesting depth added 61). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Lock::walk_auditable (cognitive 68) crates/uv-lock/src/lock/mod.rs:3538 — Lock::walk_auditable has cognitive complexity 68 (threshold 15). Drivers by points: if/else 13 (36 pts), loops 13 (27 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 38). Of this number, 65 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.
  • Lock::new (cognitive 52) crates/uv-lock/src/lock/mod.rs:2664 — Lock::new has cognitive complexity 52 (threshold 15). Drivers by points: loops 14 (26 pts), if/else 8 (24 pts), boolean chains 2 (nesting depth added 28). 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.
  • Lock::from_resolution (cognitive 39) crates/uv-lock/src/lock/mod.rs:2475 — Lock::from_resolution has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (32 pts), loops 4 (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.
  • Lock::dependency_selection (cognitive 32) crates/uv-lock/src/lock/mod.rs:3294 — Lock::dependency_selection has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 4 (11 pts), boolean chains 5 (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.
  • Lock::upgrade_packages (cognitive 26) crates/uv-lock/src/lock/mod.rs:2976 — Lock::upgrade_packages has cognitive complexity 26 (threshold 15). Drivers by points: loops 5 (16 pts), if/else 4 (9 pts), boolean chains 1 (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.
  • Lock::satisfied_no_metadata (cognitive 21) crates/uv-lock/src/lock/mod.rs:4068 — Lock::satisfied_no_metadata has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 4, 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.
  • Lock::satisfies_requires_dist (cognitive 18) crates/uv-lock/src/lock/mod.rs:3922 — Lock::satisfies_requires_dist has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 6, match/switch 2 (3 pts), loops 1 (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Lock::hash_strategy (cognitive 17) crates/uv-lock/src/lock/mod.rs:3021 — Lock::hash_strategy has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), 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.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×10
  • Duplicated block (14 lines × 2) crates/uv-dev/src/generate_cli_reference.rs:41 — crates/uv-dev/src/generate_cli_reference.rs:41-54 | crates/uv-dev/src/generate_options_reference.rs:44-57 — before extracting anything, compare `crates/uv-dev/src/generate_cli_reference.rs` and `crates/uv-dev/src/generate_options_reference.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 (14 lines × 2) crates/uv-distribution-types/src/requirement.rs:407 — crates/uv-distribution-types/src/requirement.rs:407-420 | crates/uv-distribution-types/src/requirement.rs:877-890 — both copies are in the same file, so extract the 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/uv-fs/src/lib.rs:278 — crates/uv-fs/src/lib.rs:278-291 | crates/uv-fs/src/lib.rs:362-375 — both copies are in the same file, so extract the 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/uv-fs/src/lib.rs:769 — crates/uv-fs/src/lib.rs:769-782 | crates/uv-fs/src/lib.rs:840-853 — both copies are in the same file, so extract the 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/uv-lock-operations/src/validated_lock.rs:155 — crates/uv-lock-operations/src/validated_lock.rs:155-168 | crates/uv-lock-operations/src/validated_lock.rs:172-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 (14 lines × 2) crates/uv-lock/src/lock/mod.rs:6924 — crates/uv-lock/src/lock/mod.rs:6924-6937 | crates/uv-lock/src/lock/mod.rs:7048-7061 — both copies are in the same file, so extract the 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/uv-project-commands/src/run.rs:1708 — crates/uv-project-commands/src/run.rs:1708-1721 | crates/uv-project-commands/src/run.rs:1745-1758 — both copies are in the same file, so extract the 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/uv-project-edit/src/lib.rs:272 — crates/uv-project-edit/src/lib.rs:272-285 | crates/uv-project-edit/src/lib.rs:760-773 — both copies are in the same file, so extract the 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/uv-python-discovery/src/discovery.rs:976 — crates/uv-python-discovery/src/discovery.rs:976-989 | crates/uv-python-discovery/src/discovery.rs:1002-1015 — both copies are in the same file, so extract the 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/uv-requirements/src/sources.rs:206 — crates/uv-requirements/src/sources.rs:206-219 | crates/uv-requirements/src/sources.rs:256-269 — both copies are in the same file, so extract the 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 · uv_tool_commands · ×9
  • uv_tool_commands::install::install (cognitive 147) crates/uv-tool-commands/src/install.rs:63 — uv_tool_commands::install::install has cognitive complexity 147 (threshold 15). Drivers by points: if/else 60 (106 pts), match/switch 13 (34 pts), boolean chains 7 (nesting depth added 67). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • uv_tool_commands::run::run (cognitive 64) crates/uv-tool-commands/src/run.rs:131 — uv_tool_commands::run::run has cognitive complexity 64 (threshold 15). Drivers by points: if/else 32 (53 pts), match/switch 5 (6 pts), boolean chains 5 (nesting depth added 22). Of this number, 61 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.
  • uv_tool_commands::run::get_or_create_environment (cognitive 49) crates/uv-tool-commands/src/run.rs:745 — uv_tool_commands::run::get_or_create_environment has cognitive complexity 49 (threshold 15). Drivers by points: if/else 18 (35 pts), match/switch 9 (13 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.
  • uv_tool_commands::audit::audit (cognitive 45) crates/uv-tool-commands/src/audit.rs:29 — uv_tool_commands::audit::audit has cognitive complexity 45 (threshold 15). Drivers by points: if/else 17 (30 pts), match/switch 5 (10 pts), loops 2 (3 pts), boolean chains 2 (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.
  • uv_tool_commands::list::list (cognitive 43) crates/uv-tool-commands/src/list.rs:30 — uv_tool_commands::list::list has cognitive complexity 43 (threshold 15). Drivers by points: if/else 18 (31 pts), loops 4 (6 pts), match/switch 3 (5 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • uv_tool_commands::common::finalize_tool_install (cognitive 40) crates/uv-tool-commands/src/common.rs:743 — uv_tool_commands::common::finalize_tool_install has cognitive complexity 40 (threshold 15). Drivers by points: if/else 18 (37 pts), loops 2 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • uv_tool_commands::upgrade::upgrade_tool (cognitive 33) crates/uv-tool-commands/src/upgrade.rs:271 — uv_tool_commands::upgrade::upgrade_tool has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18 (26 pts), boolean chains 4, match/switch 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.
  • uv_tool_commands::upgrade::upgrade (cognitive 30) crates/uv-tool-commands/src/upgrade.rs:48 — uv_tool_commands::upgrade::upgrade has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (18 pts), loops 4 (6 pts), match/switch 2 (5 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.
  • uv_tool_commands::uninstall::do_uninstall (cognitive 25) crates/uv-tool-commands/src/uninstall.rs:45 — uv_tool_commands::uninstall::do_uninstall has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 2 (8 pts), loops 2 (4 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.
D2 · Cognitive Complexity · uv_pip_commands · ×9
  • uv_pip_commands::compile::pip_compile (cognitive 128) crates/uv-pip-commands/src/compile.rs:69 — uv_pip_commands::compile::pip_compile has cognitive complexity 128 (threshold 15). Drivers by points: if/else 59 (88 pts), loops 6 (17 pts), boolean chains 12, match/switch 6 (11 pts) (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • uv_pip_commands::install::pip_install (cognitive 50) crates/uv-pip-commands/src/install.rs:84 — uv_pip_commands::install::pip_install has cognitive complexity 50 (threshold 15). Drivers by points: if/else 24 (30 pts), match/switch 6 (10 pts), boolean chains 6, loops 1 (4 pts) (nesting depth added 13). 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.
  • uv_pip_commands::show::pip_show (cognitive 48) crates/uv-pip-commands/src/show.rs:26 — uv_pip_commands::show::pip_show has cognitive complexity 48 (threshold 15). Drivers by points: if/else 22 (38 pts), loops 5 (9 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.
  • uv_pip_commands::uninstall::pip_uninstall (cognitive 38) crates/uv-pip-commands/src/uninstall.rs:27 — uv_pip_commands::uninstall::pip_uninstall has cognitive complexity 38 (threshold 15). Drivers by points: if/else 22 (32 pts), loops 4 (5 pts), 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.
  • uv_pip_commands::sync::pip_sync (cognitive 34) crates/uv-pip-commands/src/sync.rs:62 — uv_pip_commands::sync::pip_sync has cognitive complexity 34 (threshold 15). Drivers by points: if/else 23 (28 pts), match/switch 3 (4 pts), boolean chains 2 (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.
  • uv_pip_commands::list::pip_list (cognitive 29) crates/uv-pip-commands/src/list.rs:39 — uv_pip_commands::list::pip_list has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (17 pts), loops 4 (8 pts), boolean chains 3, 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.
  • uv_pip_commands::compile::cmd (cognitive 28) crates/uv-pip-commands/src/compile.rs:813 — uv_pip_commands::compile::cmd has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 9 (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.
  • uv_pip_commands::tree::pip_tree (cognitive 19) crates/uv-pip-commands/src/tree.rs:37 — uv_pip_commands::tree::pip_tree has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 3 (5 pts), 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.
  • uv_pip_commands::freeze::pip_freeze (cognitive 17) crates/uv-pip-commands/src/freeze.rs:25 — uv_pip_commands::freeze::pip_freeze has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), loops 2 (5 pts), match/switch 2, boolean chains 1 (nesting depth added 4). 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.
D3 · God Classes · TooManyMethods · ×9
  • TooManyMethods: TestContext crates/uv-test/src/lib.rs:133 — TooManyMethods — 136 methods. The bar is 30 methods; this is 106 over it, 4.53× 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: Lock crates/uv-lock/src/lock/mod.rs:312 — TooManyMethods — 86 methods, declared across 3 files: lock/mod.rs (81), lock/inputs.rs (3), lock/installable.rs (2). The bar is 30 methods; this is 56 over it, 2.87× 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: Interpreter crates/uv-python-interpreter/src/interpreter.rs:47 — TooManyMethods — 62 methods. The bar is 30 methods; this is 32 over it, 2.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: SafeUrl crates/uv-redacted/src/lib.rs:128 — 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: BaseClientBuilder crates/uv-client/src/base_client.rs:101 — TooManyMethods — 37 methods. The bar is 30 methods; this is 7 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.
  • TooManyMethods: SourceDistributionBuilder crates/uv-distribution/src/source/mod.rs:210 — TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.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: Cache crates/uv-cache/src/lib.rs:164 — TooManyMethods — 33 methods, declared across 2 files: src/lib.rs (32), src/cli.rs (1). The bar is 30 methods; this is 3 over it, 1.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: PyProjectTomlMut crates/uv-project-edit/src/lib.rs:26 — 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.
  • TooManyMethods: Workspace crates/uv-workspace/src/workspace.rs:414 — 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.
D2 · Cognitive Complexity · uv · ×8
  • uv::run (cognitive 248) crates/uv/src/lib.rs:134 — uv::run has cognitive complexity 248 (threshold 15). Drivers by points: if/else 103 (173 pts), match/switch 19 (41 pts), loops 11 (23 pts), boolean chains 11 (nesting depth added 104). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • uv::run_project (cognitive 70) crates/uv/src/lib.rs:2254 — uv::run_project has cognitive complexity 70 (threshold 15). Drivers by points: if/else 20 (45 pts), match/switch 11 (17 pts), loops 3 (6 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.
  • uv::commands::help::reformat_env_annotations (cognitive 38) crates/uv/src/commands/help.rs:143 — uv::commands::help::reformat_env_annotations has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 3 (7 pts), boolean chains 4 (nesting depth added 21). 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.
  • uv::commands::venv::venv (cognitive 28) crates/uv/src/commands/venv.rs:66 — uv::commands::venv::venv has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (16 pts), match/switch 6 (9 pts), boolean chains 3 (nesting depth added 4). 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.
  • uv::commands::auth::login::login (cognitive 25) crates/uv/src/commands/auth/login.rs:13 — uv::commands::auth::login::login has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (21 pts), match/switch 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • uv::commands::help::help (cognitive 23) crates/uv/src/commands/help.rs:20 — uv::commands::help::help has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 3, 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, 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.
  • uv::commands::self_update::self_update (cognitive 21) crates/uv/src/commands/self_update.rs:60 — uv::commands::self_update::self_update has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (16 pts), match/switch 2 (5 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.
  • uv::commands::help::first_non_ansi_char (cognitive 16) crates/uv/src/commands/help.rs:119 — uv::commands::help::first_non_ansi_char has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (5 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 · uv_lock · ×8
  • uv_lock::lock::is_wheel_unreachable_for_marker (cognitive 125) crates/uv-lock/src/lock/mod.rs:10402 — uv_lock::lock::is_wheel_unreachable_for_marker has cognitive complexity 125 (threshold 15). Drivers by points: if/else 71 (123 pts), boolean chains 2 (nesting depth added 52). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • uv_lock::lock::export::metadata::metadata_reachability (cognitive 34) crates/uv-lock/src/lock/export/metadata.rs:572 — uv_lock::lock::export::metadata::metadata_reachability has cognitive complexity 34 (threshold 15). Drivers by points: loops 9 (18 pts), if/else 6 (14 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.
  • uv_lock::lock::serialize::write_package (cognitive 34) crates/uv-lock/src/lock/serialize.rs:279 — uv_lock::lock::serialize::write_package has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (24 pts), loops 4 (9 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.
  • uv_lock::lock::export::resolve_marker_bindings (cognitive 30) crates/uv-lock/src/lock/export/mod.rs:618 — uv_lock::lock::export::resolve_marker_bindings has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 7 (10 pts), boolean chains 2, match/switch 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.
  • uv_lock::lock::serialize::write_options (cognitive 24) crates/uv-lock/src/lock/serialize.rs:136 — uv_lock::lock::serialize::write_options has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (16 pts), loops 2 (4 pts), match/switch 1 (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.
  • uv_lock::lock::serialize::write_manifest (cognitive 22) crates/uv-lock/src/lock/serialize.rs:213 — uv_lock::lock::serialize::write_manifest has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 3 (5 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.
  • uv_lock::lock::serialize::write_lock (cognitive 21) crates/uv-lock/src/lock/serialize.rs:31 — uv_lock::lock::serialize::write_lock has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 4 (7 pts), match/switch 1 (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.
  • uv_lock::lock::export::conflict_marker_reachability (cognitive 18) crates/uv-lock/src/lock/export/mod.rs:423 — uv_lock::lock::export::conflict_marker_reachability has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 5 (6 pts), match/switch 1 (2 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 · ResolverState · ×8
  • ResolverState::solve (cognitive 120) crates/uv-resolver/src/resolver/mod.rs:349 — ResolverState::solve has cognitive complexity 120 (threshold 15). Drivers by points: if/else 22 (78 pts), match/switch 8 (24 pts), loops 4 (14 pts), boolean chains 4 (nesting depth added 82). 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.
  • ResolverState::process_request (cognitive 108) crates/uv-resolver/src/resolver/mod.rs:2251 — ResolverState::process_request has cognitive complexity 108 (threshold 15). Drivers by points: if/else 26 (85 pts), loops 3 (12 pts), match/switch 5 (11 pts) (nesting depth added 74). 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.
  • ResolverState::convert_no_solution_err (cognitive 71) crates/uv-resolver/src/resolver/mod.rs:2553 — ResolverState::convert_no_solution_err has cognitive complexity 71 (threshold 15). Drivers by points: if/else 15 (55 pts), loops 6 (15 pts), boolean chains 1 (nesting depth added 49). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ResolverState::choose_version_url (cognitive 32) crates/uv-resolver/src/resolver/mod.rs:1214 — ResolverState::choose_version_url has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (26 pts), loops 1 (3 pts), boolean chains 2, match/switch 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.
  • ResolverState::fork_version_registry (cognitive 26) crates/uv-resolver/src/resolver/mod.rs:1601 — ResolverState::fork_version_registry has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 2, loops 2, match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ResolverState::choose_version_registry (cognitive 23) crates/uv-resolver/src/resolver/mod.rs:1334 — ResolverState::choose_version_registry has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (18 pts), match/switch 3, 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.
  • ResolverState::get_dependencies (cognitive 19) crates/uv-resolver/src/resolver/mod.rs:1934 — ResolverState::get_dependencies has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 4 (6 pts), boolean chains 2 (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.
  • ResolverState::fetch (cognitive 18) crates/uv-resolver/src/resolver/mod.rs:2185 — ResolverState::fetch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 2 (5 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.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×8
  • Duplicated block (8 lines × 3) crates/uv-auth/src/credentials.rs:532 — crates/uv-auth/src/credentials.rs:532-539 | crates/uv-auth/src/credentials.rs:564-571 | crates/uv-auth/src/credentials.rs:596-603 — 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/uv-configuration/src/target_triple.rs:1236 — crates/uv-configuration/src/target_triple.rs:1236-1243 | crates/uv-configuration/src/target_triple.rs:1250-1257 | crates/uv-configuration/src/target_triple.rs:1264-1271 — 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/uv-resolver/src/prioritized_distribution.rs:1028 — crates/uv-resolver/src/prioritized_distribution.rs:1028-1035 | crates/uv-resolver/src/prioritized_distribution.rs:1041-1048 | crates/uv-resolver/src/prioritized_distribution.rs:1054-1061 — 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/uv/src/commands/auth/login.rs:34 — crates/uv/src/commands/auth/login.rs:34-41 | crates/uv/src/commands/auth/logout.rs:32-39 | crates/uv/src/commands/auth/token.rs:20-27 — 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/uv/src/lib.rs:2787 — crates/uv/src/lib.rs:2787-2794 | crates/uv/src/lib.rs:2835-2842 | crates/uv/src/lib.rs:2972-2979 — 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/uv-test/src/lib.rs:1124 — crates/uv-test/src/lib.rs:1124-1131 | crates/uv-test/src/lib.rs:1136-1143 | crates/uv-test/src/lib.rs:1145-1153 — 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/uv-auth/src/middleware.rs:728 — crates/uv-auth/src/middleware.rs:728-735 | crates/uv-auth/src/middleware.rs:750-757 | crates/uv-auth/src/middleware.rs:772-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.
  • Duplicated block (8 lines × 3) crates/uv-lock/src/lock/mod.rs:9698 — crates/uv-lock/src/lock/mod.rs:9698-9705 | crates/uv-lock/src/lock/mod.rs:9757-9764 | crates/uv-lock/src/lock/mod.rs:9811-9818 — 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 · Lock · ×7
  • Lock::satisfies (cyclomatic 84) crates/uv-lock/src/lock/mod.rs:4201 — Lock::satisfies has cyclomatic complexity 84 (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.
  • Lock::collect_dependency_sources (cyclomatic 49) crates/uv-lock/src/lock/mod.rs:5506 — Lock::collect_dependency_sources has cyclomatic complexity 49 (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.
  • Lock::extend_dependency_source_reachability (cyclomatic 47) crates/uv-lock/src/lock/mod.rs:5182 — Lock::extend_dependency_source_reachability has cyclomatic complexity 47 (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.
  • Lock::walk_auditable (cyclomatic 31) crates/uv-lock/src/lock/mod.rs:3538 — Lock::walk_auditable has cyclomatic complexity 31 (threshold 15). Of this number, 29 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Lock::new (cyclomatic 25) crates/uv-lock/src/lock/mod.rs:2664 — Lock::new 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.
  • Lock::from_resolution (cyclomatic 21) crates/uv-lock/src/lock/mod.rs:2475 — Lock::from_resolution 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.
  • Lock::dependency_selection (cyclomatic 16) crates/uv-lock/src/lock/mod.rs:3294 — Lock::dependency_selection 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 · uv_pip_commands · ×7
  • uv_pip_commands::compile::pip_compile (cyclomatic 75) crates/uv-pip-commands/src/compile.rs:69 — uv_pip_commands::compile::pip_compile has cyclomatic complexity 75 (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.
  • uv_pip_commands::install::pip_install (cyclomatic 32) crates/uv-pip-commands/src/install.rs:84 — uv_pip_commands::install::pip_install 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.
  • uv_pip_commands::compile::cmd (cyclomatic 25) crates/uv-pip-commands/src/compile.rs:813 — uv_pip_commands::compile::cmd 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.
  • uv_pip_commands::show::pip_show (cyclomatic 25) crates/uv-pip-commands/src/show.rs:26 — uv_pip_commands::show::pip_show 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.
  • uv_pip_commands::sync::pip_sync (cyclomatic 23) crates/uv-pip-commands/src/sync.rs:62 — uv_pip_commands::sync::pip_sync has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • uv_pip_commands::list::pip_list (cyclomatic 21) crates/uv-pip-commands/src/list.rs:39 — uv_pip_commands::list::pip_list 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.
  • uv_pip_commands::uninstall::pip_uninstall (cyclomatic 20) crates/uv-pip-commands/src/uninstall.rs:27 — uv_pip_commands::uninstall::pip_uninstall 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 · uv_tool_commands · ×7
  • uv_tool_commands::install::install (cyclomatic 64) crates/uv-tool-commands/src/install.rs:63 — uv_tool_commands::install::install has cyclomatic complexity 64 (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.
  • uv_tool_commands::run::run (cyclomatic 40) crates/uv-tool-commands/src/run.rs:131 — uv_tool_commands::run::run has cyclomatic complexity 40 (threshold 15). Of this number, 37 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • uv_tool_commands::audit::audit (cyclomatic 30) crates/uv-tool-commands/src/audit.rs:29 — uv_tool_commands::audit::audit 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.
  • uv_tool_commands::run::get_or_create_environment (cyclomatic 26) crates/uv-tool-commands/src/run.rs:745 — uv_tool_commands::run::get_or_create_environment 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.
  • uv_tool_commands::list::list (cyclomatic 22) crates/uv-tool-commands/src/list.rs:30 — uv_tool_commands::list::list 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.
  • uv_tool_commands::upgrade::upgrade_tool (cyclomatic 22) crates/uv-tool-commands/src/upgrade.rs:271 — uv_tool_commands::upgrade::upgrade_tool 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.
  • uv_tool_commands::upgrade::upgrade (cyclomatic 19) crates/uv-tool-commands/src/upgrade.rs:48 — uv_tool_commands::upgrade::upgrade 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 · ResolverState · ×7
  • ResolverState::solve (cyclomatic 40) crates/uv-resolver/src/resolver/mod.rs:349 — ResolverState::solve has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • ResolverState::process_request (cyclomatic 39) crates/uv-resolver/src/resolver/mod.rs:2251 — ResolverState::process_request 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.
  • ResolverState::convert_no_solution_err (cyclomatic 22) crates/uv-resolver/src/resolver/mod.rs:2553 — ResolverState::convert_no_solution_err 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.
  • ResolverState::fork_version_registry (cyclomatic 20) crates/uv-resolver/src/resolver/mod.rs:1601 — ResolverState::fork_version_registry 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.
  • ResolverState::choose_version_registry (cyclomatic 19) crates/uv-resolver/src/resolver/mod.rs:1334 — ResolverState::choose_version_registry 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.
  • ResolverState::get_dependencies (cyclomatic 19) crates/uv-resolver/src/resolver/mod.rs:1934 — ResolverState::get_dependencies has cyclomatic complexity 19 (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.
  • ResolverState::choose_version_url (cyclomatic 17) crates/uv-resolver/src/resolver/mod.rs:1214 — ResolverState::choose_version_url 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 · uv_resolver · ×7
  • uv_resolver::error::drop_root_dependency_on_project (cognitive 33) crates/uv-resolver/src/error.rs:1640 — uv_resolver::error::drop_root_dependency_on_project has cognitive complexity 33 (threshold 15). Drivers by points: if/else 6 (18 pts), match/switch 4 (14 pts), loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • uv_resolver::redirect::apply_redirect (cognitive 28) crates/uv-resolver/src/redirect.rs:57 — uv_resolver::redirect::apply_redirect has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (28 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • uv_resolver::resolver::find_environments (cognitive 27) crates/uv-resolver/src/resolver/mod.rs:4157 — uv_resolver::resolver::find_environments has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 4 (6 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.
  • uv_resolver::resolution::output::get_hashes (cognitive 26) crates/uv-resolver/src/resolution/output.rs:358 — uv_resolver::resolution::output::get_hashes has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (25 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.
  • uv_resolver::marker::requires_python::collect_python_markers (cognitive 21) crates/uv-resolver/src/marker.rs:19 — uv_resolver::marker::requires_python::collect_python_markers has cognitive complexity 21 (threshold 15). Drivers by points: loops 8 (18 pts), match/switch 2 (3 pts) (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.
  • uv_resolver::resolution::output::has_lower_bound (cognitive 18) crates/uv-resolver/src/resolution/output.rs:484 — uv_resolver::resolution::output::has_lower_bound has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 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.
  • uv_resolver::error::display_tree_inner (cognitive 17) crates/uv-resolver/src/error.rs:944 — uv_resolver::error::display_tree_inner has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 4 (13 pts), loops 2 (4 pts) (nesting depth added 11). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×7
  • Duplicated block (18 lines × 2) crates/uv-distribution-types/src/requirement.rs:176 — crates/uv-distribution-types/src/requirement.rs:176-193 | crates/uv-distribution-types/src/requirement.rs:207-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 (18 lines × 2) crates/uv-installer/src/satisfies.rs:187 — crates/uv-installer/src/satisfies.rs:187-204 | crates/uv-installer/src/satisfies.rs:265-282 — both copies are in the same file, so extract the 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/uv-lock/src/lock/mod.rs:7094 — crates/uv-lock/src/lock/mod.rs:7094-7111 | crates/uv-lock/src/lock/mod.rs:7168-7185 — both copies are in the same file, so extract the 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/uv-lock/src/lock/tree.rs:172 — crates/uv-lock/src/lock/tree.rs:172-189 | crates/uv-lock/src/lock/tree.rs:352-369 — both copies are in the same file, so extract the 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/uv-project-edit/src/lib.rs:1014 — crates/uv-project-edit/src/lib.rs:1014-1031 | crates/uv-project-edit/src/lib.rs:1055-1072 — both copies are in the same file, so extract the 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/uv-resolve-operations/src/lib.rs:129 — crates/uv-resolve-operations/src/lib.rs:129-146 | crates/uv-resolve-operations/src/lib.rs:273-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 (18 lines × 2) crates/uv/src/lib.rs:727 — crates/uv/src/lib.rs:727-744 | crates/uv/src/lib.rs:850-867 — both copies are in the same file, so extract the 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 · uv_python_discovery · ×6
  • uv_python_discovery::discovery::find_python_installation (cognitive 35) crates/uv-python-discovery/src/discovery.rs:1186 — uv_python_discovery::discovery::find_python_installation has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (28 pts), boolean chains 6, 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.
  • uv_python_discovery::discovery::find_best_python_installation (cognitive 32) crates/uv-python-discovery/src/discovery.rs:1342 — uv_python_discovery::discovery::find_best_python_installation has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (21 pts), match/switch 4 (9 pts), boolean chains 1, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • uv_python_discovery::discovery::find_python_installations_with_strategy (cognitive 23) crates/uv-python-discovery/src/discovery.rs:940 — uv_python_discovery::discovery::find_python_installations_with_strategy has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 3 (7 pts), boolean chains 1 (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.
  • uv_python_discovery::discovery::python_executables_from_installed (cognitive 21) crates/uv-python-discovery/src/discovery.rs:207 — uv_python_discovery::discovery::python_executables_from_installed has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (19 pts), match/switch 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.
  • uv_python_discovery::windows_registry::registry_pythons (cognitive 21) crates/uv-python-discovery/src/windows_registry.rs:25 — uv_python_discovery::windows_registry::registry_pythons has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 3 (6 pts), match/switch 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.
  • uv_python_discovery::discovery::find_all_minor (cognitive 18) crates/uv-python-discovery/src/discovery.rs:567 — uv_python_discovery::discovery::find_all_minor has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (17 pts), match/switch 1 (nesting depth added 9). 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 · SourceDistributionBuilder · ×6
  • SourceDistributionBuilder::git_source_tree_metadata (cognitive 30) crates/uv-distribution/src/source/mod.rs:2261 — SourceDistributionBuilder::git_source_tree_metadata has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (18 pts), match/switch 5 (12 pts) (nesting depth added 11). 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.
  • SourceDistributionBuilder::build_distribution (cognitive 29) crates/uv-distribution/src/source/mod.rs:2925 — SourceDistributionBuilder::build_distribution has cognitive complexity 29 (threshold 15). Drivers by points: if/else 19 (28 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.
  • SourceDistributionBuilder::source_tree_metadata (cognitive 20) crates/uv-distribution/src/source/mod.rs:1508 — SourceDistributionBuilder::source_tree_metadata has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (18 pts), match/switch 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • SourceDistributionBuilder::url_metadata (cognitive 19) crates/uv-distribution/src/source/mod.rs:782 — SourceDistributionBuilder::url_metadata has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (17 pts), match/switch 2 (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.
  • SourceDistributionBuilder::build_metadata (cognitive 19) crates/uv-distribution/src/source/mod.rs:3087 — SourceDistributionBuilder::build_metadata has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (16 pts), match/switch 1 (2 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.
  • SourceDistributionBuilder::archive_metadata (cognitive 16) crates/uv-distribution/src/source/mod.rs:1186 — SourceDistributionBuilder::archive_metadata has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), 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.
D30 · Dependency Vulnerabilities · Medium advisory (unmaintained) · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×6
  • Duplicated block (21 lines × 2) crates/uv-auth/src/keyring.rs:90 — crates/uv-auth/src/keyring.rs:90-110 | crates/uv-auth/src/keyring.rs:140-160 — both copies are in the same file, so extract the 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/uv-build-backend/src/wheel.rs:56 — crates/uv-build-backend/src/wheel.rs:56-76 | crates/uv-build-backend/src/wheel.rs:262-282 — both copies are in the same file, so extract the 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/uv-configuration/src/build_options.rs:151 — crates/uv-configuration/src/build_options.rs:151-171 | crates/uv-configuration/src/build_options.rs:251-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 (21 lines × 2) crates/uv-distribution/src/source/mod.rs:980 — crates/uv-distribution/src/source/mod.rs:980-1000 | crates/uv-distribution/src/source/mod.rs:2774-2794 — both copies are in the same file, so extract the 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/uv-pypi-types/src/metadata/metadata_resolver.rs:246 — crates/uv-pypi-types/src/metadata/metadata_resolver.rs:246-266 | crates/uv-pypi-types/src/metadata/requires_dist.rs:76-96 — before extracting anything, compare `crates/uv-pypi-types/src/metadata/metadata_resolver.rs` and `crates/uv-pypi-types/src/metadata/requires_dist.rs` as WHOLE FILES: this scan already matched 4 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 (21 lines × 2) crates/uv/src/commands/auth/logout.rs:32 — crates/uv/src/commands/auth/logout.rs:32-52 | crates/uv/src/commands/auth/token.rs:20-40 — 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 (20 lines × 2) · ×6
  • Duplicated block (20 lines × 2) crates/uv-lock-operations/src/lock.rs:492 — crates/uv-lock-operations/src/lock.rs:492-511 | crates/uv-lock-operations/src/lock.rs:521-540 — both copies are in the same file, so extract the 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/uv-lock/src/lock/mod.rs:4750 — crates/uv-lock/src/lock/mod.rs:4750-4769 | crates/uv-lock/src/lock/mod.rs:4816-4835 — both copies are in the same file, so extract the 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/uv-project-commands/src/export.rs:228 — crates/uv-project-commands/src/export.rs:228-247 | crates/uv-project-commands/src/sync.rs:114-133 — 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 (20 lines × 2) crates/uv-python-interpreter/src/interpreter.rs:938 — crates/uv-python-interpreter/src/interpreter.rs:938-957 | crates/uv-python-interpreter/src/interpreter.rs:975-994 — both copies are in the same file, so extract the 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/uv-settings/src/settings.rs:2515 — crates/uv-settings/src/settings.rs:2515-2534 | crates/uv-settings/src/settings.rs:2565-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 (20 lines × 2) crates/uv-test/src/pypi_proxy.rs:197 — crates/uv-test/src/pypi_proxy.rs:197-216 | crates/uv-test/src/pypi_proxy.rs:288-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.
D1 · Cyclomatic Complexity · uv · ×5
  • uv::run (cyclomatic 195) crates/uv/src/lib.rs:134 — uv::run has cyclomatic complexity 195 (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.
  • uv::run_project (cyclomatic 55) crates/uv/src/lib.rs:2254 — uv::run_project has cyclomatic complexity 55 (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.
  • uv::commands::venv::venv (cyclomatic 28) crates/uv/src/commands/venv.rs:66 — uv::commands::venv::venv 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.
  • uv::commands::auth::login::login (cyclomatic 23) crates/uv/src/commands/auth/login.rs:13 — uv::commands::auth::login::login 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.
  • uv::commands::help::reformat_env_annotations (cyclomatic 18) crates/uv/src/commands/help.rs:143 — uv::commands::help::reformat_env_annotations 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 · uv_python_commands · ×5
  • uv_python_commands::install::perform_install (cyclomatic 80) crates/uv-python-commands/src/install.rs:289 — uv_python_commands::install::perform_install has cyclomatic complexity 80 (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.
  • uv_python_commands::list::list (cyclomatic 37) crates/uv-python-commands/src/list.rs:57 — uv_python_commands::list::list has cyclomatic complexity 37 (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.
  • uv_python_commands::pin::pin (cyclomatic 28) crates/uv-python-commands/src/pin.rs:31 — uv_python_commands::pin::pin 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.
  • uv_python_commands::install::create_bin_links (cyclomatic 27) crates/uv-python-commands/src/install.rs:966 — uv_python_commands::install::create_bin_links 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.
  • uv_python_commands::uninstall::do_uninstall (cyclomatic 27) crates/uv-python-commands/src/uninstall.rs:77 — uv_python_commands::uninstall::do_uninstall 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.
D2 · Cognitive Complexity · uv_python_commands · ×5
  • uv_python_commands::install::perform_install (cognitive 170) crates/uv-python-commands/src/install.rs:289 — uv_python_commands::install::perform_install has cognitive complexity 170 (threshold 15). Drivers by points: if/else 58 (108 pts), match/switch 10 (30 pts), loops 11 (22 pts), boolean chains 10 (nesting depth added 81). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • uv_python_commands::list::list (cognitive 92) crates/uv-python-commands/src/list.rs:57 — uv_python_commands::list::list has cognitive complexity 92 (threshold 15). Drivers by points: if/else 34 (74 pts), match/switch 5 (9 pts), loops 4 (7 pts), boolean chains 2 (nesting depth added 47). 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.
  • uv_python_commands::install::create_bin_links (cognitive 65) crates/uv-python-commands/src/install.rs:966 — uv_python_commands::install::create_bin_links has cognitive complexity 65 (threshold 15). Drivers by points: if/else 21 (53 pts), match/switch 3 (6 pts), boolean chains 5, loops 1 (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.
  • uv_python_commands::pin::pin (cognitive 55) crates/uv-python-commands/src/pin.rs:31 — uv_python_commands::pin::pin has cognitive complexity 55 (threshold 15). Drivers by points: if/else 25 (46 pts), boolean chains 3, loops 1 (3 pts), match/switch 2 (3 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.
  • uv_python_commands::uninstall::do_uninstall (cognitive 54) crates/uv-python-commands/src/uninstall.rs:77 — uv_python_commands::uninstall::do_uninstall has cognitive complexity 54 (threshold 15). Drivers by points: if/else 19 (36 pts), loops 9 (12 pts), match/switch 2 (5 pts), boolean chains 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.
D4 · Code Duplication · Duplicated block (29 lines × 2) · ×5
  • Duplicated block (29 lines × 2) crates/uv-cli/src/settings.rs:969 — crates/uv-cli/src/settings.rs:969-997 | crates/uv-cli/src/settings.rs:1098-1126 — both copies are in the same file, so extract the 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) crates/uv-installer/src/satisfies.rs:350 — crates/uv-installer/src/satisfies.rs:350-378 | crates/uv-installer/src/satisfies.rs:414-442 — both copies are in the same file, so extract the 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) crates/uv-lock/src/lock/mod.rs:4820 — crates/uv-lock/src/lock/mod.rs:4820-4848 | crates/uv-lock/src/lock/mod.rs:4953-4981 — both copies are in the same file, so extract the 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) crates/uv-pypi-types/src/parsed_url.rs:107 — crates/uv-pypi-types/src/parsed_url.rs:107-135 | crates/uv-pypi-types/src/parsed_url.rs:139-167 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (29 lines × 2) crates/uv/src/commands/cache_clean.rs:89 — crates/uv/src/commands/cache_clean.rs:89-117 | crates/uv/src/commands/cache_prune.rs:75-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.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×5
  • Duplicated block (22 lines × 2) crates/uv-client/src/cached_client.rs:773 — crates/uv-client/src/cached_client.rs:773-794 | crates/uv-client/src/cached_client.rs:817-838 — both copies are in the same file, so extract the 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/uv-distribution/src/index/cached_wheel.rs:81 — crates/uv-distribution/src/index/cached_wheel.rs:81-102 | crates/uv-distribution/src/index/cached_wheel.rs:110-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 (22 lines × 2) crates/uv-distribution/src/metadata/build_requires.rs:210 — crates/uv-distribution/src/metadata/build_requires.rs:210-231 | crates/uv-distribution/src/metadata/build_requires.rs:301-322 — both copies are in the same file, so extract the 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/uv-environment-operations/src/lib.rs:1460 — crates/uv-environment-operations/src/lib.rs:1460-1481 | crates/uv-environment-operations/src/lib.rs:1901-1922 — both copies are in the same file, so extract the 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/uv-lock/src/lock/requirements.rs:119 — crates/uv-lock/src/lock/requirements.rs:119-140 | crates/uv-lock/src/lock/requirements.rs:156-177 — both copies are in the same file, so extract the 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–13 lines × 2) · ×5
  • Duplicated block (12–13 lines × 2) crates/uv-client/src/registry_client.rs:989 — crates/uv-client/src/registry_client.rs:989-1001 | crates/uv-client/src/registry_client.rs:1205-1216 — both copies are in the same file, so extract the 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/uv-pypi-types/src/metadata/metadata_resolver.rs:179 — crates/uv-pypi-types/src/metadata/metadata_resolver.rs:179-190 | crates/uv-pypi-types/src/metadata/requires_dist.rs:28-40 — before extracting anything, compare `crates/uv-pypi-types/src/metadata/metadata_resolver.rs` and `crates/uv-pypi-types/src/metadata/requires_dist.rs` as WHOLE FILES: this scan already matched 4 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 (12–13 lines × 2) crates/uv-test/src/pypi_proxy.rs:187 — crates/uv-test/src/pypi_proxy.rs:187-199 | crates/uv-test/src/pypi_proxy.rs:244-255 — both copies are in the same file, so extract the 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/uv-workspace/src/pyproject.rs:1900 — crates/uv-workspace/src/pyproject.rs:1900-1911 | crates/uv-workspace/src/pyproject.rs:1913-1925 — both copies are in the same file, so extract the 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/uv-workspace/src/pyproject.rs:1932 — crates/uv-workspace/src/pyproject.rs:1932-1943 | crates/uv-workspace/src/pyproject.rs:1945-1957 — both copies are in the same file, so extract the 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 lines × 4) · ×5
  • Duplicated block (11 lines × 4) crates/uv-project-edit/src/lib.rs:878 — crates/uv-project-edit/src/lib.rs:878-888 | crates/uv-project-edit/src/lib.rs:902-912 | crates/uv-project-edit/src/lib.rs:1014-1025 | crates/uv-project-edit/src/lib.rs:1055-1066 — 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 (11 lines × 4) crates/uv/src/lib.rs:718 — crates/uv/src/lib.rs:718-728 | crates/uv/src/lib.rs:841-851 | crates/uv/src/lib.rs:1387-1397 | crates/uv/src/lib.rs:1554-1565 — 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 (11 lines × 4) crates/uv/src/lib.rs:2331 — crates/uv/src/lib.rs:2331-2341 | crates/uv/src/lib.rs:2406-2416 | crates/uv/src/lib.rs:2683-2693 | crates/uv/src/lib.rs:2914-2924 — 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 (11 lines × 4) crates/uv-platform-tags/src/platform_tag.rs:515 — crates/uv-platform-tags/src/platform_tag.rs:515-525 | crates/uv-platform-tags/src/platform_tag.rs:607-617 | crates/uv-platform-tags/src/platform_tag.rs:655-665 | crates/uv-platform-tags/src/platform_tag.rs:916-926 — 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 (11 lines × 4) crates/uv-dev/src/generate_cli_reference.rs:50 — crates/uv-dev/src/generate_cli_reference.rs:50-60 | crates/uv-dev/src/generate_json_schema.rs:45-55 | crates/uv-dev/src/generate_options_reference.rs:53-63 | crates/uv-dev/src/generate_sysconfig_mappings.rs:56-66 — before extracting anything, compare `crates/uv-dev/src/generate_cli_reference.rs` and `crates/uv-dev/src/generate_options_reference.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.
D1 · Cyclomatic Complexity · uv_lock · ×4
  • uv_lock::lock::is_wheel_unreachable_for_marker (cyclomatic 74) crates/uv-lock/src/lock/mod.rs:10402 — uv_lock::lock::is_wheel_unreachable_for_marker has cyclomatic complexity 74 (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.
  • uv_lock::lock::serialize::write_package (cyclomatic 21) crates/uv-lock/src/lock/serialize.rs:279 — uv_lock::lock::serialize::write_package 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.
  • uv_lock::lock::export::metadata::metadata_reachability (cyclomatic 18) crates/uv-lock/src/lock/export/metadata.rs:572 — uv_lock::lock::export::metadata::metadata_reachability has cyclomatic complexity 18 (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.
  • uv_lock::lock::export::resolve_marker_bindings (cyclomatic 17) crates/uv-lock/src/lock/export/mod.rs:618 — uv_lock::lock::export::resolve_marker_bindings 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 · uv_dev · ×4
  • uv_dev::generate_cli_reference::generate_command (cognitive 65) crates/uv-dev/src/generate_cli_reference.rs:123 — uv_dev::generate_cli_reference::generate_command has cognitive complexity 65 (threshold 15). Drivers by points: if/else 16 (41 pts), loops 7 (23 pts), boolean chains 1 (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.
  • uv_dev::generate_sysconfig_mappings::generate (cognitive 26) crates/uv-dev/src/generate_sysconfig_mappings.rs:100 — uv_dev::generate_sysconfig_mappings::generate has cognitive complexity 26 (threshold 15). Drivers by points: loops 9 (14 pts), if/else 4 (12 pts) (nesting depth added 13). 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.
  • uv_dev::generate_scenarios::pretty_tree (cognitive 23) crates/uv-dev/src/generate_scenarios.rs:715 — uv_dev::generate_scenarios::pretty_tree has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (20 pts), loops 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.
  • uv_dev::generate_options_reference::emit_field (cognitive 17) crates/uv-dev/src/generate_options_reference.rs:210 — uv_dev::generate_options_reference::emit_field has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 1 (2 pts), match/switch 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, 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 · ExpectedPackageDependencies · ×4
  • ExpectedPackageDependencies::normalize_dependency_edges (cognitive 44) crates/uv-lock/src/lock/mod.rs:2157 — ExpectedPackageDependencies::normalize_dependency_edges has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (28 pts), boolean chains 8, loops 4 (8 pts) (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.
  • ExpectedPackageDependencies::dependencies_match (cognitive 25) crates/uv-lock/src/lock/mod.rs:2303 — ExpectedPackageDependencies::dependencies_match has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 7, 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.
  • ExpectedPackageDependencies::package_requirement_marker (cognitive 19) crates/uv-lock/src/lock/mod.rs:1736 — ExpectedPackageDependencies::package_requirement_marker has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ExpectedPackageDependencies::selected_extra_payload_marker (cognitive 17) crates/uv-lock/src/lock/mod.rs:2094 — ExpectedPackageDependencies::selected_extra_payload_marker has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (5 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 · uv_fs · ×4
  • uv_fs::space::linux_physical_space (cognitive 19) crates/uv-fs/src/space.rs:157 — uv_fs::space::linux_physical_space has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 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.
  • uv_fs::link::reflink_file_with_fallback (cognitive 18) crates/uv-fs/src/link.rs:469 — uv_fs::link::reflink_file_with_fallback has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 3 (5 pts) (nesting depth added 9). 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.
  • uv_fs::link::hardlink_file_with_fallback (cognitive 18) crates/uv-fs/src/link.rs:642 — uv_fs::link::hardlink_file_with_fallback has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 2, 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. This shape REPEATS in the file: one other method here (uv_fs::link::symlink_file_with_fallback) 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.
  • uv_fs::link::symlink_file_with_fallback (cognitive 18) crates/uv-fs/src/link.rs:701 — uv_fs::link::symlink_file_with_fallback has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 2, 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. This shape REPEATS in the file: one other method here (uv_fs::link::hardlink_file_with_fallback) 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.
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×4
  • Duplicated block (25 lines × 2) crates/uv-distribution/src/source/mod.rs:714 — crates/uv-distribution/src/source/mod.rs:714-738 | crates/uv-distribution/src/source/mod.rs:861-885 — both copies are in the same file, so extract the 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 (25 lines × 2) crates/uv-pip-commands/src/install.rs:487 — crates/uv-pip-commands/src/install.rs:487-511 | crates/uv-pip-commands/src/sync.rs:370-394 — before extracting anything, compare `crates/uv-pip-commands/src/install.rs` and `crates/uv-pip-commands/src/sync.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 324 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 (25 lines × 2) crates/uv-project-commands/src/run.rs:212 — crates/uv-project-commands/src/run.rs:212-236 | crates/uv-project-commands/src/run.rs:402-426 — both copies are in the same file, so extract the 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 (25 lines × 2) crates/uv/src/commands/cache_clean.rs:29 — crates/uv/src/commands/cache_clean.rs:29-53 | crates/uv/src/commands/cache_prune.rs:27-51 — 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 (14 lines × 3) · ×4
  • Duplicated block (14 lines × 3) crates/uv-auth/src/credentials.rs:541 — crates/uv-auth/src/credentials.rs:541-554 | crates/uv-auth/src/credentials.rs:573-586 | crates/uv-auth/src/credentials.rs:605-618 — 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 (14 lines × 3) crates/uv-dev/src/list_packages.rs:22 — crates/uv-dev/src/list_packages.rs:22-35 | crates/uv-dev/src/validate_zip.rs:23-36 | crates/uv-dev/src/wheel_metadata.rs:27-40 — 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 (14 lines × 3) crates/uv-lock/src/lock/mod.rs:9706 — crates/uv-lock/src/lock/mod.rs:9706-9719 | crates/uv-lock/src/lock/mod.rs:9765-9778 | crates/uv-lock/src/lock/mod.rs:9819-9832 — 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 (14 lines × 3) crates/uv-lock/src/lock/mod.rs:8697 — crates/uv-lock/src/lock/mod.rs:8697-8710 | crates/uv-lock/src/lock/mod.rs:8715-8728 | crates/uv-lock/src/lock/mod.rs:8733-8746 — 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 (12 lines × 3) · ×4
  • Duplicated block (12 lines × 3) crates/uv-distribution/src/source/mod.rs:2393 — crates/uv-distribution/src/source/mod.rs:2393-2404 | crates/uv-distribution/src/source/mod.rs:2446-2457 | crates/uv-distribution/src/source/mod.rs:2503-2514 — 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/uv-environment-operations/src/lib.rs:1494 — crates/uv-environment-operations/src/lib.rs:1494-1505 | crates/uv-environment-operations/src/lib.rs:1930-1941 | crates/uv-tool-commands/src/common.rs:466-477 — 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 (12 lines × 3) crates/uv-lock/src/lock/mod.rs:4621 — crates/uv-lock/src/lock/mod.rs:4621-4632 | crates/uv-lock/src/lock/tree.rs:238-249 | crates/uv-lock/src/lock/tree.rs:290-301 — 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 (12 lines × 3) crates/uv-settings/src/settings.rs:2483 — crates/uv-settings/src/settings.rs:2483-2494 | crates/uv-settings/src/settings.rs:2535-2546 | crates/uv-settings/src/settings.rs:2586-2597 — 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 × 3) · ×4
  • Duplicated block (7 lines × 3) crates/uv-cli/src/settings.rs:4743 — crates/uv-cli/src/settings.rs:4743-4749 | crates/uv-cli/src/settings.rs:4755-4764 | crates/uv-cli/src/settings.rs:4776-4782 — 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/uv-configuration/src/build_options.rs:140 — crates/uv-configuration/src/build_options.rs:140-147 | crates/uv-configuration/src/build_options.rs:240-247 | crates/uv-configuration/src/sources.rs:54-60 — 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 (7 lines × 3) crates/uv-environment-operations/src/lib.rs:1476 — crates/uv-environment-operations/src/lib.rs:1476-1482 | crates/uv-environment-operations/src/lib.rs:1917-1923 | crates/uv-tool-commands/src/requirements.rs:100-106 — 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 (7 lines × 3) crates/uv-lock/src/lock/mod.rs:3998 — crates/uv-lock/src/lock/mod.rs:3998-4004 | crates/uv-lock/src/lock/mod.rs:4453-4459 | crates/uv-lock/src/lock/mod.rs:4465-4471 — 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 × 3) · ×4
  • Duplicated block (5 lines × 3) crates/uv-lock/src/lock/mod.rs:6951 — crates/uv-lock/src/lock/mod.rs:6951-6955 | crates/uv-lock/src/lock/mod.rs:6964-6968 | crates/uv-lock/src/lock/mod.rs:6977-6981 — 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/uv-normalize/src/extra_name.rs:68 — crates/uv-normalize/src/extra_name.rs:68-72 | crates/uv-normalize/src/group_name.rs:264-268 | crates/uv-pypi-types/src/supported_environments.rs:85-89 — before extracting anything, compare `crates/uv-normalize/src/extra_name.rs` and `crates/uv-normalize/src/group_name.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 33 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 (5 lines × 3) crates/uv-normalize/src/group_name.rs:70 — crates/uv-normalize/src/group_name.rs:70-74 | crates/uv-normalize/src/package_name.rs:97-101 | crates/uv-small-str/src/lib.rs:109-113 — 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 (5 lines × 3) crates/uv-python-types/src/request.rs:1468 — crates/uv-python-types/src/request.rs:1468-1472 | crates/uv-python-types/src/request.rs:1481-1485 | crates/uv-python-types/src/request.rs:1495-1499 — 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 · TreeDisplay · ×3
  • TreeDisplay::new (cyclomatic 58) crates/uv-lock/src/lock/tree.rs:76 — TreeDisplay::new has cyclomatic complexity 58 (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.
  • TreeDisplay::visit (cyclomatic 31) crates/uv-lock/src/lock/tree.rs:532 — TreeDisplay::visit 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.
  • TreeDisplay::json_traversal (cyclomatic 23) crates/uv-lock/src/lock/tree.rs:806 — TreeDisplay::json_traversal 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 · PubGrubReportFormatter · ×3
  • PubGrubReportFormatter::generate_hints (cyclomatic 37) crates/uv-resolver/src/pubgrub/report.rs:735 — PubGrubReportFormatter::generate_hints has cyclomatic complexity 37 (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.
  • PubGrubReportFormatter::format_external (cyclomatic 24) crates/uv-resolver/src/pubgrub/report.rs:245 — PubGrubReportFormatter::format_external 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. This is NOT this file's highest cyclomatic complexity: PubGrubHintCore::from (cyclomatic 28) 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.
  • PubGrubReportFormatter::index_hints (cyclomatic 24) crates/uv-resolver/src/pubgrub/report.rs:1206 — PubGrubReportFormatter::index_hints 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. This is NOT this file's highest cyclomatic complexity: PubGrubHintCore::from (cyclomatic 28) 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.
D1 · Cyclomatic Complexity · PylockToml · ×3
  • PylockToml::to_resolution (cyclomatic 30) crates/uv-lock/src/lock/export/pylock_toml.rs:1257 — PylockToml::to_resolution 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.
  • PylockToml::from_lock (cyclomatic 25) crates/uv-lock/src/lock/export/pylock_toml.rs:783 — PylockToml::from_lock has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • PylockToml::from_resolution (cyclomatic 19) crates/uv-lock/src/lock/export/pylock_toml.rs:457 — PylockToml::from_resolution 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 · DistributionDatabase · ×3
  • DistributionDatabase::download_wheel_response (cyclomatic 25) crates/uv-distribution/src/distribution_database.rs:1102 — DistributionDatabase::download_wheel_response 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.
  • DistributionDatabase::get_wheel (cyclomatic 16) crates/uv-distribution/src/distribution_database.rs:285 — DistributionDatabase::get_wheel 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.
  • DistributionDatabase::stream_wheel (cyclomatic 16) crates/uv-distribution/src/distribution_database.rs:777 — DistributionDatabase::stream_wheel 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 · uv_python_discovery · ×3
  • uv_python_discovery::discovery::find_python_installation (cyclomatic 22) crates/uv-python-discovery/src/discovery.rs:1186 — uv_python_discovery::discovery::find_python_installation 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.
  • uv_python_discovery::discovery::find_python_installations_with_strategy (cyclomatic 20) crates/uv-python-discovery/src/discovery.rs:940 — uv_python_discovery::discovery::find_python_installations_with_strategy 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.
  • uv_python_discovery::discovery::find_best_python_installation (cyclomatic 19) crates/uv-python-discovery/src/discovery.rs:1342 — uv_python_discovery::discovery::find_best_python_installation 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.
D2 · Cognitive Complexity · LockedDependencyBuilder · ×3
  • LockedDependencyBuilder::add_requirements (cognitive 260) crates/uv-lock/src/lock/mod.rs:587 — LockedDependencyBuilder::add_requirements has cognitive complexity 260 (threshold 15). Drivers by points: if/else 48 (154 pts), loops 16 (57 pts), boolean chains 45, match/switch 3 (4 pts) (nesting depth added 148). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • LockedDependencyBuilder::source_is_covered (cognitive 31) crates/uv-lock/src/lock/mod.rs:1299 — LockedDependencyBuilder::source_is_covered has cognitive complexity 31 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 5 (15 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.
  • LockedDependencyBuilder::base_covered_by_extra_edges (cognitive 22) crates/uv-lock/src/lock/mod.rs:1376 — LockedDependencyBuilder::base_covered_by_extra_edges has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, loops 2 (4 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TreeDisplay · ×3
  • TreeDisplay::new (cognitive 161) crates/uv-lock/src/lock/tree.rs:76 — TreeDisplay::new has cognitive complexity 161 (threshold 15). Drivers by points: if/else 45 (112 pts), loops 20 (48 pts), match/switch 1 (nesting depth added 95). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • TreeDisplay::visit (cognitive 56) crates/uv-lock/src/lock/tree.rs:532 — TreeDisplay::visit has cognitive complexity 56 (threshold 15). Drivers by points: if/else 26 (43 pts), match/switch 3 (6 pts), boolean chains 4, loops 2 (3 pts) (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.
  • TreeDisplay::json_traversal (cognitive 56) crates/uv-lock/src/lock/tree.rs:806 — TreeDisplay::json_traversal has cognitive complexity 56 (threshold 15). Drivers by points: if/else 14 (42 pts), loops 4 (7 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PubGrubReportFormatter · ×3
  • PubGrubReportFormatter::generate_hints (cognitive 90) crates/uv-resolver/src/pubgrub/report.rs:735 — PubGrubReportFormatter::generate_hints has cognitive complexity 90 (threshold 15). Drivers by points: if/else 21 (69 pts), boolean chains 7, loops 3 (7 pts), match/switch 2 (7 pts) (nesting depth added 57). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • PubGrubReportFormatter::format_external (cognitive 55) crates/uv-resolver/src/pubgrub/report.rs:245 — PubGrubReportFormatter::format_external has cognitive complexity 55 (threshold 15). Drivers by points: if/else 24 (49 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 27). 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.
  • PubGrubReportFormatter::index_hints (cognitive 26) crates/uv-resolver/src/pubgrub/report.rs:1206 — PubGrubReportFormatter::index_hints has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (18 pts), match/switch 2 (5 pts), loops 2 (3 pts) (nesting depth added 14). 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 · InstallTarget · ×3
  • InstallTarget::packages (cognitive 79) crates/uv-environment-operations/src/install_target.rs:786 — InstallTarget::packages has cognitive complexity 79 (threshold 15). Drivers by points: if/else 12 (48 pts), loops 9 (29 pts), boolean chains 1, match/switch 1 (nesting depth added 56). 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.
  • InstallTarget::validate_groups (cognitive 22) crates/uv-environment-operations/src/install_target.rs:674 — InstallTarget::validate_groups has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (9 pts), match/switch 3 (9 pts), loops 2 (4 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.
  • InstallTarget::python_requirement (cognitive 20) crates/uv-environment-operations/src/install_target.rs:290 — InstallTarget::python_requirement has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (6 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 · Cache · ×3
  • Cache::prune (cognitive 57) crates/uv-cache/src/lib.rs:678 — Cache::prune has cognitive complexity 57 (threshold 15). Drivers by points: if/else 13 (33 pts), loops 7 (17 pts), match/switch 4 (5 pts), boolean chains 2 (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.
  • Cache::find_archive_references (cognitive 30) crates/uv-cache/src/lib.rs:844 — Cache::find_archive_references has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (24 pts), loops 2 (4 pts), boolean chains 2 (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.
  • Cache::prune_archive_files (cognitive 18) crates/uv-cache/src/lib.rs:630 — Cache::prune_archive_files has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 3 (6 pts), match/switch 2 (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 · uv_distribution · ×3
  • uv_distribution::source::prune (cognitive 56) crates/uv-distribution/src/source/mod.rs:3236 — uv_distribution::source::prune has cognitive complexity 56 (threshold 15). Drivers by points: if/else 10 (44 pts), loops 3 (12 pts) (nesting depth added 43). 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.
  • uv_distribution::diagnostics::format_chain::format_step (cognitive 35) crates/uv-distribution/src/diagnostics.rs:52 — uv_distribution::diagnostics::format_chain::format_step has cognitive complexity 35 (threshold 15). Drivers by points: if/else 20 (34 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.
  • uv_distribution::metadata::lowering::path_source (cognitive 16) crates/uv-distribution/src/metadata/lowering.rs:915 — uv_distribution::metadata::lowering::path_source has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (15 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, 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 · SitePackages · ×3
  • SitePackages::diagnostics (cognitive 51) crates/uv-installer/src/site_packages.rs:207 — SitePackages::diagnostics has cognitive complexity 51 (threshold 15). Drivers by points: if/else 10 (32 pts), match/switch 3 (12 pts), loops 3 (6 pts), boolean chains 1 (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.
  • SitePackages::satisfies_requirements (cognitive 43) crates/uv-installer/src/site_packages.rs:478 — SitePackages::satisfies_requirements has cognitive complexity 43 (threshold 15). Drivers by points: if/else 8 (25 pts), match/switch 3 (10 pts), loops 4 (8 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • SitePackages::from_interpreter_with_filter (cognitive 19) crates/uv-installer/src/site_packages.rs:72 — SitePackages::from_interpreter_with_filter has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (9 pts), match/switch 2 (5 pts), loops 2 (3 pts), boolean chains 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 · Tags · ×3
  • Tags::from_env (cognitive 49) crates/uv-platform-tags/src/tags.rs:169 — Tags::from_env has cognitive complexity 49 (threshold 15). Drivers by points: loops 10 (24 pts), if/else 14 (22 pts), boolean chains 3 (nesting depth added 22). 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.
  • Tags::compatibility (cognitive 19) crates/uv-platform-tags/src/tags.rs:372 — Tags::compatibility has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (6 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.
  • Tags::from_repository (cognitive 16) crates/uv-cache-info/src/git_info.rs:69 — Tags::from_repository has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (3 pts), match/switch 1 (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.
D2 · Cognitive Complexity · DistributionDatabase · ×3
  • DistributionDatabase::download_wheel_response (cognitive 45) crates/uv-distribution/src/distribution_database.rs:1102 — DistributionDatabase::download_wheel_response has cognitive complexity 45 (threshold 15). Drivers by points: if/else 17 (34 pts), boolean chains 6, match/switch 2 (4 pts), loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • DistributionDatabase::get_wheel (cognitive 23) crates/uv-distribution/src/distribution_database.rs:285 — DistributionDatabase::get_wheel has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 3 (5 pts), boolean chains 1 (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.
  • DistributionDatabase::get_wheel_metadata (cognitive 16) crates/uv-distribution/src/distribution_database.rs:612 — DistributionDatabase::get_wheel_metadata has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), match/switch 4 (7 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.
D2 · Cognitive Complexity · PylockToml · ×3
  • PylockToml::from_lock (cognitive 32) crates/uv-lock/src/lock/export/pylock_toml.rs:783 — PylockToml::from_lock has cognitive complexity 32 (threshold 15). Drivers by points: match/switch 7 (16 pts), if/else 8 (15 pts), loops 1 (nesting depth added 16). 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.
  • PylockToml::from_resolution (cognitive 28) crates/uv-lock/src/lock/export/pylock_toml.rs:457 — PylockToml::from_resolution has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (25 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • PylockToml::to_resolution (cognitive 25) crates/uv-lock/src/lock/export/pylock_toml.rs:1257 — PylockToml::to_resolution has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (15 pts), match/switch 2 (5 pts), loops 2 (3 pts), boolean chains 2 (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 · uv_client · ×3
  • uv_client::retry::retryable_on_request_failure_inner (cognitive 30) crates/uv-client/src/retry.rs:219 — uv_client::retry::retryable_on_request_failure_inner has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (28 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.
  • uv_client::base_client::request_into_redirect (cognitive 20) crates/uv-client/src/base_client.rs:956 — uv_client::base_client::request_into_redirect has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (13 pts), match/switch 3 (4 pts), loops 1 (2 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.
  • uv_client::base_client::fetch_with_url_fallback (cognitive 20) crates/uv-client/src/base_client.rs:1190 — uv_client::base_client::fetch_with_url_fallback has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 2 (3 pts), match/switch 1 (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.
D2 · Cognitive Complexity · RegistryClient · ×3
  • RegistryClient::simple_detail (cognitive 27) crates/uv-client/src/registry_client.rs:346 — RegistryClient::simple_detail has cognitive complexity 27 (threshold 15). Drivers by points: match/switch 7 (17 pts), if/else 5 (8 pts), loops 1 (2 pts) (nesting depth added 14). 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.
  • RegistryClient::wheel_metadata_no_pep658 (cognitive 19) crates/uv-client/src/registry_client.rs:1232 — RegistryClient::wheel_metadata_no_pep658 has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), match/switch 2 (3 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.
  • RegistryClient::simple_detail_single_index (cognitive 16) crates/uv-client/src/registry_client.rs:540 — RegistryClient::simple_detail_single_index has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 3 (4 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.
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Medium advisory (unsound) · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Medium vulnerability · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · Medium IaC · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×3
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/uv-build-commands/src/lib.rs:1336 — crates/uv-build-commands/src/lib.rs:1336-1353 | crates/uv-cache/src/lib.rs:463-520 | crates/uv-python-managed/src/managed.rs:155-192 | crates/uv-tool/src/lib.rs:369-387 — 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/uv-cli/src/options.rs:245 — crates/uv-cli/src/options.rs:245-329 | crates/uv-cli/src/options.rs:403-501 | crates/uv-cli/src/options.rs:586-701 | crates/uv-cli/src/options.rs:742-873 — 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/uv-distribution/src/distribution_database.rs:786 — crates/uv-distribution/src/distribution_database.rs:786-965 | crates/uv-distribution/src/distribution_database.rs:981-1093 | crates/uv-distribution/src/source/mod.rs:976-1074 | crates/uv-distribution/src/source/mod.rs:2769-2830 — 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 (37 lines × 2) · ×3
  • Duplicated block (37 lines × 2) crates/uv-cli/src/settings.rs:3426 — crates/uv-cli/src/settings.rs:3426-3462 | crates/uv-cli/src/settings.rs:3774-3810 — both copies are in the same file, so extract the 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 (37 lines × 2) crates/uv-installer/src/site_packages.rs:353 — crates/uv-installer/src/site_packages.rs:353-389 | crates/uv-installer/src/site_packages.rs:393-429 — both copies are in the same file, so extract the 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 (37 lines × 2) crates/uv-pip-commands/src/install.rs:615 — crates/uv-pip-commands/src/install.rs:615-651 | crates/uv-pip-commands/src/sync.rs:488-524 — before extracting anything, compare `crates/uv-pip-commands/src/install.rs` and `crates/uv-pip-commands/src/sync.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 324 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 × 4) · ×3
  • Duplicated block (15 lines × 4) crates/uv-distribution/src/source/mod.rs:832 — crates/uv-distribution/src/source/mod.rs:832-846 | crates/uv-distribution/src/source/mod.rs:1231-1245 | crates/uv-distribution/src/source/mod.rs:1576-1590 | crates/uv-distribution/src/source/mod.rs:2050-2064 — 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/uv-project-edit/src/lib.rs:951 — crates/uv-project-edit/src/lib.rs:951-965 | crates/uv-project-edit/src/lib.rs:979-993 | crates/uv-project-edit/src/lib.rs:1020-1034 | crates/uv-project-edit/src/lib.rs:1061-1075 — 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/uv-workspace/src/pyproject.rs:1449 — crates/uv-workspace/src/pyproject.rs:1449-1463 | crates/uv-workspace/src/pyproject.rs:1506-1520 | crates/uv-workspace/src/pyproject.rs:1561-1575 | crates/uv-workspace/src/pyproject.rs:1617-1631 — 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 (15 lines × 3) · ×3
  • Duplicated block (15 lines × 3) crates/uv-distribution/src/source/mod.rs:1531 — crates/uv-distribution/src/source/mod.rs:1531-1545 | crates/uv-distribution/src/source/mod.rs:1601-1615 | crates/uv-distribution/src/source/mod.rs:1653-1667 — 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 (15 lines × 3) crates/uv-fs/src/lib.rs:865 — crates/uv-fs/src/lib.rs:865-879 | crates/uv-fs/src/lib.rs:888-902 | crates/uv-fs/src/lib.rs:910-924 — 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 (15 lines × 3) crates/uv-workspace/src/pyproject.rs:1449 — crates/uv-workspace/src/pyproject.rs:1449-1463 | crates/uv-workspace/src/pyproject.rs:1506-1520 | crates/uv-workspace/src/pyproject.rs:1561-1575 — 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 × 3) · ×3
  • Duplicated block (13 lines × 3) crates/uv-dev/src/generate_cli_reference.rs:44 — crates/uv-dev/src/generate_cli_reference.rs:44-56 | crates/uv-dev/src/generate_options_reference.rs:47-59 | crates/uv-dev/src/generate_sysconfig_mappings.rs:50-62 — before extracting anything, compare `crates/uv-dev/src/generate_cli_reference.rs` and `crates/uv-dev/src/generate_options_reference.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 (13 lines × 3) crates/uv-resolver/src/pubgrub/report.rs:2042 — crates/uv-resolver/src/pubgrub/report.rs:2042-2054 | crates/uv-resolver/src/pubgrub/report.rs:2066-2078 | crates/uv-resolver/src/pubgrub/report.rs:2089-2101 — 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) crates/uv-configuration/src/build_options.rs:101 — crates/uv-configuration/src/build_options.rs:101-113 | crates/uv-configuration/src/build_options.rs:197-209 | crates/uv-configuration/src/sources.rs:19-31 — 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 (11–12 lines × 2) · ×3
  • Duplicated block (11–12 lines × 2) crates/uv-environment-operations/src/install_target.rs:691 — crates/uv-environment-operations/src/install_target.rs:691-701 | crates/uv-environment-operations/src/install_target.rs:735-746 — both copies are in the same file, so extract the 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/uv-lock/src/lock/export/pylock_toml.rs:1414 — crates/uv-lock/src/lock/export/pylock_toml.rs:1414-1424 | crates/uv-lock/src/lock/export/pylock_toml.rs:1428-1439 — both copies are in the same file, so extract the 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/uv-project-commands/src/remove.rs:141 — crates/uv-project-commands/src/remove.rs:141-152 | crates/uv-project-commands/src/remove.rs:166-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.
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×3
  • Duplicated block (10 lines × 4) crates/uv-lock/src/lock/mod.rs:3271 — crates/uv-lock/src/lock/mod.rs:3271-3280 | crates/uv-lock/src/lock/mod.rs:4620-4629 | crates/uv-lock/src/lock/tree.rs:237-246 | crates/uv-lock/src/lock/tree.rs:289-298 — 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 (10 lines × 4) crates/uv-tool/src/tool.rs:223 — crates/uv-tool/src/tool.rs:223-232 | crates/uv-tool/src/tool.rs:245-254 | crates/uv-tool/src/tool.rs:267-276 | crates/uv-tool/src/tool.rs:289-298 — 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 (10 lines × 4) crates/uv/src/lib.rs:721 — crates/uv/src/lib.rs:721-730 | crates/uv/src/lib.rs:844-853 | crates/uv/src/lib.rs:1019-1028 | crates/uv/src/lib.rs:1390-1399 — 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 (7–8 lines × 2) · ×3
  • Duplicated block (7–8 lines × 2) crates/uv-distribution-types/src/requirement.rs:1173 — crates/uv-distribution-types/src/requirement.rs:1173-1179 | crates/uv-distribution/src/metadata/lowering.rs:723-730 — 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–8 lines × 2) crates/uv-project-commands/src/add.rs:1132 — crates/uv-project-commands/src/add.rs:1132-1138 | crates/uv-project-commands/src/add.rs:1261-1268 — both copies are in the same file, so extract the 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–8 lines × 2) crates/uv-pypi-types/src/parsed_url.rs:345 — crates/uv-pypi-types/src/parsed_url.rs:345-351 | crates/uv-pypi-types/src/parsed_url.rs:392-399 — both copies are in the same file, so extract the 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 (6 lines × 3) · ×3
  • Duplicated block (6 lines × 3) crates/uv-auth/src/credentials.rs:525 — crates/uv-auth/src/credentials.rs:525-530 | crates/uv-auth/src/credentials.rs:557-562 | crates/uv-auth/src/credentials.rs:589-594 — 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/uv-cli/src/settings.rs:2389 — crates/uv-cli/src/settings.rs:2389-2394 | crates/uv-cli/src/settings.rs:2552-2557 | crates/uv-cli/src/settings.rs:2641-2646 — 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/uv-virtualenv/src/virtualenv.rs:858 — crates/uv-virtualenv/src/virtualenv.rs:858-863 | crates/uv-virtualenv/src/virtualenv.rs:875-880 | crates/uv-virtualenv/src/virtualenv.rs:886-891 — 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 · LockedDependencyBuilder · ×2
  • LockedDependencyBuilder::add_requirements (cyclomatic 111) crates/uv-lock/src/lock/mod.rs:587 — LockedDependencyBuilder::add_requirements has cyclomatic complexity 111 (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.
  • LockedDependencyBuilder::base_covered_by_extra_edges (cyclomatic 16) crates/uv-lock/src/lock/mod.rs:1376 — LockedDependencyBuilder::base_covered_by_extra_edges 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 · uv_lock_operations · ×2
  • uv_lock_operations::lock::do_lock (cyclomatic 57) crates/uv-lock-operations/src/lock.rs:284 — uv_lock_operations::lock::do_lock 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.
  • uv_lock_operations::lock_target::find_lock_format_error (cyclomatic 42) crates/uv-lock-operations/src/lock_target.rs:551 — uv_lock_operations::lock_target::find_lock_format_error has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · uv_virtualenv · ×2
  • uv_virtualenv::virtualenv::create (cyclomatic 57) crates/uv-virtualenv/src/virtualenv.rs:63 — uv_virtualenv::virtualenv::create 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.
  • uv_virtualenv::virtualenv::copy_launcher_windows (cyclomatic 21) crates/uv-virtualenv/src/virtualenv.rs:843 — uv_virtualenv::virtualenv::copy_launcher_windows has cyclomatic complexity 21 (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 · Source · ×2
  • Source::deserialize (cyclomatic 55) crates/uv-workspace/src/pyproject.rs:1334 — Source::deserialize has cyclomatic complexity 55 (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.
  • Source::from_requirement (cyclomatic 31) crates/uv-workspace/src/pyproject.rs:1739 — Source::from_requirement 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 · RequirementsSpecification · ×2
  • RequirementsSpecification::from_sources (cyclomatic 39) crates/uv-requirements/src/specification.rs:414 — RequirementsSpecification::from_sources 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.
  • RequirementsSpecification::from_source_with_cache (cyclomatic 26) crates/uv-requirements/src/specification.rs:246 — RequirementsSpecification::from_source_with_cache 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 · PyProjectTomlMut · ×2
  • PyProjectTomlMut::add_index (cyclomatic 36) crates/uv-project-edit/src/lib.rs:297 — PyProjectTomlMut::add_index has cyclomatic complexity 36 (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.
  • PyProjectTomlMut::find_dependency (cyclomatic 16) crates/uv-project-edit/src/lib.rs:1143 — PyProjectTomlMut::find_dependency 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 · PyProjectToml · ×2
  • PyProjectToml::to_metadata (cyclomatic 29) crates/uv-build-backend/src/metadata.rs:459 — PyProjectToml::to_metadata 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.
  • PyProjectToml::license_metadata (cyclomatic 21) crates/uv-build-backend/src/metadata.rs:727 — PyProjectToml::license_metadata 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 · uv_build_commands · ×2
  • uv_build_commands::build_package (cyclomatic 29) crates/uv-build-commands/src/lib.rs:522 — uv_build_commands::build_package 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.
  • uv_build_commands::build_frontend (cyclomatic 27) crates/uv-build-commands/src/lib.rs:218 — uv_build_commands::build_frontend 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 · AuthMiddleware · ×2
  • AuthMiddleware::fetch_credentials (cyclomatic 27) crates/uv-auth/src/middleware.rs:668 — AuthMiddleware::fetch_credentials 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.
  • AuthMiddleware::handle (cyclomatic 20) crates/uv-auth/src/middleware.rs:344 — AuthMiddleware::handle 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 · uv_install_wheel · ×2
  • uv_install_wheel::uninstall::uninstall_wheel (cyclomatic 27) crates/uv-install-wheel/src/uninstall.rs:17 — uv_install_wheel::uninstall::uninstall_wheel 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.
  • uv_install_wheel::wheel::install_script (cyclomatic 21) crates/uv-install-wheel/src/wheel.rs:547 — uv_install_wheel::wheel::install_script 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 · ExpectedPackageDependencies · ×2
  • ExpectedPackageDependencies::normalize_dependency_edges (cyclomatic 24) crates/uv-lock/src/lock/mod.rs:2157 — ExpectedPackageDependencies::normalize_dependency_edges 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.
  • ExpectedPackageDependencies::dependencies_match (cyclomatic 18) crates/uv-lock/src/lock/mod.rs:2303 — ExpectedPackageDependencies::dependencies_match 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 · Interpreter · ×2
  • Interpreter::matches_request (cyclomatic 20) crates/uv-python-interpreter/src/interpreter.rs:792 — Interpreter::matches_request has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Interpreter::matches_version_request (cyclomatic 17) crates/uv-python-interpreter/src/interpreter.rs:695 — Interpreter::matches_version_request has cyclomatic complexity 17 (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 · SitePackages · ×2
  • SitePackages::diagnostics (cyclomatic 19) crates/uv-installer/src/site_packages.rs:207 — SitePackages::diagnostics 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.
  • SitePackages::satisfies_requirements (cyclomatic 16) crates/uv-installer/src/site_packages.rs:478 — SitePackages::satisfies_requirements 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 · DisplayDependencyGraph · ×2
  • DisplayDependencyGraph::new (cyclomatic 19) crates/uv-pip-commands/src/tree.rs:223 — DisplayDependencyGraph::new 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.
  • DisplayDependencyGraph::visit (cyclomatic 16) crates/uv-pip-commands/src/tree.rs:367 — DisplayDependencyGraph::visit 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 · uv_client · ×2
  • uv_client::base_client::request_into_redirect (cyclomatic 18) crates/uv-client/src/base_client.rs:956 — uv_client::base_client::request_into_redirect 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.
  • uv_client::retry::retryable_on_request_failure_inner (cyclomatic 17) crates/uv-client/src/retry.rs:219 — uv_client::retry::retryable_on_request_failure_inner 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 · Package · ×2
  • Package::to_dist (cyclomatic 18) crates/uv-lock/src/lock/mod.rs:6711 — Package::to_dist 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.
  • Package::to_source_dist (cyclomatic 18) crates/uv-lock/src/lock/mod.rs:6915 — Package::to_source_dist 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.
D17 · Explicit Debt · FixmeComment · ×2
  • FixmeComment crates/uv-resolver/src/resolution/output.rs:222 — // FIXME: When `UniversalMarker` supports extras/groups, we can — 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/uv-install-wheel/src/wheel.rs:332 — // FIXME: What are the in-reality rules here for name normalization? — 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.
D2 · Cognitive Complexity · uv_extract · ×2
  • uv_extract::stream::unzip_inner (cognitive 301) crates/uv-extract/src/stream.rs:163 — uv_extract::stream::unzip_inner has cognitive complexity 301 (threshold 15). Drivers by points: if/else 77 (258 pts), match/switch 10 (25 pts), loops 5 (12 pts), boolean chains 6 (nesting depth added 203). 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.
  • uv_extract::stream::untar_in_tokio_tar (cognitive 23) crates/uv-extract/src/stream.rs:825 — uv_extract::stream::untar_in_tokio_tar has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (18 pts), boolean chains 4, loops 1 (nesting depth added 12). 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 · uv_lock_operations · ×2
  • uv_lock_operations::lock::do_lock (cognitive 86) crates/uv-lock-operations/src/lock.rs:284 — uv_lock_operations::lock::do_lock has cognitive complexity 86 (threshold 15). Drivers by points: if/else 37 (56 pts), match/switch 11 (15 pts), loops 8 (11 pts), boolean chains 4 (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.
  • uv_lock_operations::lock_target::find_lock_format_error (cognitive 64) crates/uv-lock-operations/src/lock_target.rs:551 — uv_lock_operations::lock_target::find_lock_format_error has cognitive complexity 64 (threshold 15). Drivers by points: if/else 17 (44 pts), boolean chains 17, match/switch 1 (2 pts), loops 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · uv_virtualenv · ×2
  • uv_virtualenv::virtualenv::create (cognitive 75) crates/uv-virtualenv/src/virtualenv.rs:63 — uv_virtualenv::virtualenv::create has cognitive complexity 75 (threshold 15). Drivers by points: if/else 32 (47 pts), match/switch 11 (22 pts), boolean chains 5, loops 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.
  • uv_virtualenv::virtualenv::copy_launcher_windows (cognitive 36) crates/uv-virtualenv/src/virtualenv.rs:843 — uv_virtualenv::virtualenv::copy_launcher_windows has cognitive complexity 36 (threshold 15). Drivers by points: if/else 4 (18 pts), match/switch 6 (9 pts), loops 3 (8 pts), boolean chains 1 (nesting depth added 22). 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 · PyProjectTomlMut · ×2
  • PyProjectTomlMut::add_index (cognitive 73) crates/uv-project-edit/src/lib.rs:297 — PyProjectTomlMut::add_index has cognitive complexity 73 (threshold 15). Drivers by points: if/else 29 (63 pts), boolean chains 6, loops 1 (2 pts), match/switch 1 (2 pts) (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.
  • PyProjectTomlMut::find_dependency (cognitive 35) crates/uv-project-edit/src/lib.rs:1143 — PyProjectTomlMut::find_dependency has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (28 pts), loops 2 (5 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · RequirementsSpecification · ×2
  • RequirementsSpecification::from_sources (cognitive 71) crates/uv-requirements/src/specification.rs:414 — RequirementsSpecification::from_sources has cognitive complexity 71 (threshold 15). Drivers by points: if/else 26 (46 pts), loops 10 (16 pts), match/switch 2 (6 pts), boolean chains 3 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • RequirementsSpecification::from_source_with_cache (cognitive 33) crates/uv-requirements/src/specification.rs:246 — RequirementsSpecification::from_source_with_cache has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (22 pts), match/switch 4 (9 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · Workspace · ×2
  • Workspace::collect_members_only (cognitive 70) crates/uv-workspace/src/workspace.rs:1216 — Workspace::collect_members_only has cognitive complexity 70 (threshold 15). Drivers by points: if/else 18 (54 pts), match/switch 3 (10 pts), loops 3 (4 pts), boolean chains 2 (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.
  • Workspace::collect_required_members (cognitive 18) crates/uv-workspace/src/workspace.rs:729 — Workspace::collect_required_members has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (15 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Source · ×2
  • Source::deserialize (cognitive 59) crates/uv-workspace/src/pyproject.rs:1334 — Source::deserialize has cognitive complexity 59 (threshold 15). Drivers by points: if/else 48 (54 pts), boolean chains 3, match/switch 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.
  • Source::from_requirement (cognitive 36) crates/uv-workspace/src/pyproject.rs:1739 — Source::from_requirement has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 5, loops 1 (3 pts), match/switch 2 (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.
D2 · Cognitive Complexity · uv_test · ×2
  • uv_test::pypi_proxy::start (cognitive 57) crates/uv-test/src/pypi_proxy.rs:370 — uv_test::pypi_proxy::start has cognitive complexity 57 (threshold 15). Drivers by points: if/else 27 (47 pts), boolean chains 8, match/switch 1 (2 pts) (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.
  • uv_test::run_and_format_silent (cognitive 36) crates/uv-test/src/lib.rs:2391 — uv_test::run_and_format_silent has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 3 (12 pts), match/switch 1 (6 pts) (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 · CandidateSelector · ×2
  • CandidateSelector::get_preferred_from_iter (cognitive 55) crates/uv-resolver/src/candidate_selector.rs:257 — CandidateSelector::get_preferred_from_iter has cognitive complexity 55 (threshold 15). Drivers by points: if/else 13 (40 pts), match/switch 3 (10 pts), loops 2 (5 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.
  • CandidateSelector::select_candidate (cognitive 22) crates/uv-resolver/src/candidate_selector.rs:627 — CandidateSelector::select_candidate has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (19 pts), match/switch 1 (2 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 · uv_install_wheel · ×2
  • uv_install_wheel::uninstall::uninstall_wheel (cognitive 54) crates/uv-install-wheel/src/uninstall.rs:17 — uv_install_wheel::uninstall::uninstall_wheel has cognitive complexity 54 (threshold 15). Drivers by points: if/else 12 (33 pts), match/switch 6 (17 pts), loops 3 (4 pts) (nesting depth added 33). 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.
  • uv_install_wheel::wheel::install_script (cognitive 42) crates/uv-install-wheel/src/wheel.rs:547 — uv_install_wheel::wheel::install_script has cognitive complexity 42 (threshold 15). Drivers by points: if/else 17 (34 pts), match/switch 3 (6 pts), loops 1 (2 pts) (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 · AuthMiddleware · ×2
  • AuthMiddleware::fetch_credentials (cognitive 49) crates/uv-auth/src/middleware.rs:668 — AuthMiddleware::fetch_credentials has cognitive complexity 49 (threshold 15). Drivers by points: if/else 30 (41 pts), match/switch 5 (8 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.
  • AuthMiddleware::handle (cognitive 32) crates/uv-auth/src/middleware.rs:344 — AuthMiddleware::handle has cognitive complexity 32 (threshold 15). Drivers by points: if/else 20 (28 pts), boolean chains 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · uv_requirements_txt · ×2
  • uv_requirements_txt::parse_entry (cognitive 45) crates/uv-requirements-txt/src/lib.rs:662 — uv_requirements_txt::parse_entry has cognitive complexity 45 (threshold 15). Drivers by points: if/else 26 (33 pts), boolean chains 6, match/switch 3 (5 pts), loops 1 (nesting depth added 9). 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.
  • uv_requirements_txt::parse_requirement_and_hashes (cognitive 28) crates/uv-requirements-txt/src/lib.rs:966 — uv_requirements_txt::parse_requirement_and_hashes has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 1, 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 · uv_build_commands · ×2
  • uv_build_commands::build_frontend (cognitive 44) crates/uv-build-commands/src/lib.rs:218 — uv_build_commands::build_frontend has cognitive complexity 44 (threshold 15). Drivers by points: if/else 20 (28 pts), match/switch 5 (9 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.
  • uv_build_commands::build_package (cognitive 32) crates/uv-build-commands/src/lib.rs:522 — uv_build_commands::build_package has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (19 pts), match/switch 8 (10 pts), boolean chains 3 (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 · DisplayDependencyGraph · ×2
  • DisplayDependencyGraph::new (cognitive 42) crates/uv-pip-commands/src/tree.rs:223 — DisplayDependencyGraph::new has cognitive complexity 42 (threshold 15). Drivers by points: if/else 10 (28 pts), loops 8 (14 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.
  • DisplayDependencyGraph::visit (cognitive 30) crates/uv-pip-commands/src/tree.rs:367 — DisplayDependencyGraph::visit has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (21 pts), match/switch 2 (4 pts), loops 2 (3 pts), boolean chains 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 · ForkState · ×2
  • ForkState::into_resolution (cognitive 42) crates/uv-resolver/src/resolver/mod.rs:3306 — ForkState::into_resolution has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (32 pts), match/switch 2 (5 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ForkState::record_conflict (cognitive 16) crates/uv-resolver/src/resolver/mod.rs:3111 — ForkState::record_conflict has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), 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.
D2 · Cognitive Complexity · PyProjectToml · ×2
  • PyProjectToml::license_metadata (cognitive 38) crates/uv-build-backend/src/metadata.rs:727 — PyProjectToml::license_metadata has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 5 (10 pts), match/switch 2 (4 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.
  • PyProjectToml::to_metadata (cognitive 28) crates/uv-build-backend/src/metadata.rs:459 — PyProjectToml::to_metadata has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (19 pts), match/switch 6 (7 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.
D2 · Cognitive Complexity · uv_project_edit · ×2
  • uv_project_edit::add_dependency (cognitive 34) crates/uv-project-edit/src/lib.rs:1270 — uv_project_edit::add_dependency has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (23 pts), match/switch 4 (10 pts), boolean chains 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.
  • uv_project_edit::reformat_array_multiline (cognitive 21) crates/uv-project-edit/src/lib.rs:1686 — uv_project_edit::reformat_array_multiline has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (9 pts), loops 3 (5 pts), match/switch 2 (4 pts), boolean chains 3 (nesting depth added 5). Of this number, 15 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent 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 · SourceBuild · ×2
  • SourceBuild::extract_pep517_backend (cognitive 32) crates/uv-build-frontend/src/lib.rs:675 — SourceBuild::extract_pep517_backend has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (27 pts), boolean chains 2, loops 1 (2 pts), match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • SourceBuild::setup (cognitive 19) crates/uv-build-frontend/src/lib.rs:294 — SourceBuild::setup has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (16 pts), 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 · JsonGraphBuilder · ×2
  • JsonGraphBuilder::roots (cognitive 27) crates/uv-lock/src/lock/tree.rs:1348 — JsonGraphBuilder::roots has cognitive complexity 27 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 3 (9 pts), match/switch 2 (5 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.
  • JsonGraphBuilder::add_target_edges (cognitive 16) crates/uv-lock/src/lock/tree.rs:1218 — JsonGraphBuilder::add_target_edges has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 1 (3 pts), match/switch 2, boolean chains 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 · ManagedPythonDownload · ×2
  • ManagedPythonDownload::download_urls_with_astral_mirror (cognitive 26) crates/uv-python-managed/src/downloads.rs:801 — ManagedPythonDownload::download_urls_with_astral_mirror has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (25 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.
  • ManagedPythonDownload::fetch_from_url (cognitive 19) crates/uv-python-managed/src/downloads.rs:489 — ManagedPythonDownload::fetch_from_url has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 4 (7 pts), boolean chains 1 (nesting depth added 5). 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 · ResolverOutput · ×2
  • ResolverOutput::marker_tree (cognitive 26) crates/uv-resolver-types/src/output.rs:200 — ResolverOutput::marker_tree has cognitive complexity 26 (threshold 15). Drivers by points: loops 11 (19 pts), if/else 2 (4 pts), match/switch 2 (3 pts) (nesting depth added 11). Most of this is not in the body itself: 11 of the 26 points are its own statements and the rest belongs to one function item inside it that branches (add_marker_params_from_tree). 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.
  • ResolverOutput::find_conflicting_distributions (cognitive 17) crates/uv-resolver-types/src/output.rs:336 — ResolverOutput::find_conflicting_distributions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 2 (8 pts), loops 4 (7 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.
D2 · Cognitive Complexity · RequirementExpander · ×2
  • RequirementExpander::expand (cognitive 23) crates/uv-resolver/src/resolver/requirements.rs:88 — RequirementExpander::expand has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, loops 3 (4 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.
  • RequirementExpander::constraints_for_requirement (cognitive 23) crates/uv-resolver/src/resolver/requirements.rs:306 — RequirementExpander::constraints_for_requirement has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (22 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 · VersionMapLazy · ×2
  • VersionMapLazy::get_simple (cognitive 20) crates/uv-resolver/src/version_map.rs:623 — VersionMapLazy::get_simple has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 4 (10 pts), if/else 6 (9 pts), loops 1 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • VersionMapLazy::wheel_compatibility (cognitive 20) crates/uv-resolver/src/version_map.rs:815 — VersionMapLazy::wheel_compatibility has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 2, match/switch 1 (2 pts) (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.
D2 · Cognitive Complexity · uv_workspace · ×2
  • uv_workspace::workspace::find_workspace (cognitive 20) crates/uv-workspace/src/workspace.rs:1906 — uv_workspace::workspace::find_workspace has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (18 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.
  • uv_workspace::pyproject::deserialize_index_vec (cognitive 17) crates/uv-workspace/src/pyproject.rs:300 — uv_workspace::pyproject::deserialize_index_vec has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 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.
D2 · Cognitive Complexity · uv_python_managed · ×2
  • uv_python_managed::sysconfig::patch_sysconfigdata (cognitive 18) crates/uv-python-managed/src/sysconfig/mod.rs:138 — uv_python_managed::sysconfig::patch_sysconfigdata has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3 (5 pts), match/switch 1 (nesting depth added 6). Of this number, 11 points are the body's own statements and 7 belong to 2 function items inside it that branch. This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
  • uv_python_managed::windows_registry::remove_registry_entry (cognitive 16) crates/uv-python-managed/src/windows_registry.rs:118 — uv_python_managed::windows_registry::remove_registry_entry has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, 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.
D2 · Cognitive Complexity · Error · ×2
  • Error::from_command_output (cognitive 16) crates/uv-build-frontend/src/error.rs:352 — Error::from_command_output has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), match/switch 3 (6 pts) (nesting depth added 4). 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.
  • Error::is_http_range_requests_unsupported (cognitive 16) crates/uv-client/src/error.rs:299 — Error::is_http_range_requests_unsupported has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 2 (3 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.
D2 · Cognitive Complexity · RequirementsSource · ×2
  • RequirementsSource::from_package_argument (cognitive 16) crates/uv-requirements/src/sources.rs:176 — RequirementsSource::from_package_argument has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (RequirementsSource::from_with_package_argument) 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.
  • RequirementsSource::from_with_package_argument (cognitive 16) crates/uv-requirements/src/sources.rs:226 — RequirementsSource::from_with_package_argument has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (RequirementsSource::from_package_argument) 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.
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
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/uv-distribution/src/index/built_wheel_index.rs:60 — crates/uv-distribution/src/index/built_wheel_index.rs:60-107 | crates/uv-distribution/src/index/built_wheel_index.rs:110-154 | crates/uv-distribution/src/index/built_wheel_index.rs:161-208 | crates/uv-distribution/src/index/built_wheel_index.rs:211-250 | crates/uv-distribution/src/index/built_wheel_index.rs:253-295 — 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/uv-settings/src/settings.rs:2297 — crates/uv-settings/src/settings.rs:2297-2343 | crates/uv-settings/src/settings.rs:2457-2494 | crates/uv-settings/src/settings.rs:2498-2546 | crates/uv-settings/src/settings.rs:2550-2597 | crates/uv-settings/src/settings.rs:2601-2637 — 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 (44 lines × 2) · ×2
  • Duplicated block (44 lines × 2) crates/uv-installer/src/satisfies.rs:206 — crates/uv-installer/src/satisfies.rs:206-249 | crates/uv-installer/src/satisfies.rs:284-327 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (44 lines × 2) crates/uv-pip-commands/src/install.rs:657 — crates/uv-pip-commands/src/install.rs:657-700 | crates/uv-pip-commands/src/sync.rs:530-573 — before extracting anything, compare `crates/uv-pip-commands/src/install.rs` and `crates/uv-pip-commands/src/sync.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 324 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 (34 lines × 2) · ×2
  • Duplicated block (34 lines × 2) crates/uv-distribution/src/source/mod.rs:1888 — crates/uv-distribution/src/source/mod.rs:1888-1921 | crates/uv-distribution/src/source/mod.rs:1998-2031 — both copies are in the same file, so extract the 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 (34 lines × 2) crates/uv-settings/src/lib.rs:1079 — crates/uv-settings/src/lib.rs:1079-1112 | crates/uv-settings/src/lib.rs:1122-1155 — both copies are in the same file, so extract the 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 (33 lines × 2) · ×2
  • Duplicated block (33 lines × 2) crates/uv-cli/src/settings.rs:1837 — crates/uv-cli/src/settings.rs:1837-1869 | crates/uv-cli/src/settings.rs:3374-3406 — both copies are in the same file, so extract the 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 (33 lines × 2) crates/uv-cli/src/settings.rs:2826 — crates/uv-cli/src/settings.rs:2826-2858 | crates/uv-cli/src/settings.rs:3053-3085 — both copies are in the same file, so extract the 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 lines × 3) · ×2
  • Duplicated block (30 lines × 3) crates/uv-cli/src/settings.rs:1836 — crates/uv-cli/src/settings.rs:1836-1865 | crates/uv-cli/src/settings.rs:2840-2869 | crates/uv-cli/src/settings.rs:3373-3402 — 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 (30 lines × 3) crates/uv-cli/src/settings.rs:1826 — crates/uv-cli/src/settings.rs:1826-1855 | crates/uv-cli/src/settings.rs:2830-2859 | crates/uv-cli/src/settings.rs:3057-3086 — 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 (28 lines × 2) · ×2
  • Duplicated block (28 lines × 2) crates/uv-lock/src/lock/tree.rs:233 — crates/uv-lock/src/lock/tree.rs:233-260 | crates/uv-lock/src/lock/tree.rs:285-312 — both copies are in the same file, so extract the 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 (28 lines × 2) crates/uv-project-commands/src/init.rs:1082 — crates/uv-project-commands/src/init.rs:1082-1110 | crates/uv-project-commands/src/init.rs:1114-1141 — both copies are in the same file, so extract the 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) · ×2
  • Duplicated block (27 lines × 2) crates/uv-lock/src/lock/tree.rs:692 — crates/uv-lock/src/lock/tree.rs:692-718 | crates/uv-pip-commands/src/tree.rs:467-493 — 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 (27 lines × 2) crates/uv-resolver/src/pubgrub/report.rs:786 — crates/uv-resolver/src/pubgrub/report.rs:786-812 | crates/uv-resolver/src/pubgrub/report.rs:853-879 — both copies are in the same file, so extract the 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 lines × 2) · ×2
  • Duplicated block (26 lines × 2) crates/uv-cli/src/settings.rs:754 — crates/uv-cli/src/settings.rs:754-780 | crates/uv-cli/src/settings.rs:1849-1874 — both copies are in the same file, so extract the 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 (26 lines × 2) crates/uv-distribution/src/metadata/dependency_groups.rs:205 — crates/uv-distribution/src/metadata/dependency_groups.rs:205-230 | crates/uv-distribution/src/metadata/requires_dist.rs:273-298 — before extracting anything, compare `crates/uv-distribution/src/metadata/dependency_groups.rs` and `crates/uv-distribution/src/metadata/requires_dist.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 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 lines × 3) · ×2
  • Duplicated block (24 lines × 3) crates/uv-installer/src/satisfies.rs:533 — crates/uv-installer/src/satisfies.rs:533-556 | crates/uv-installer/src/satisfies.rs:596-619 | crates/uv-installer/src/satisfies.rs:632-655 — 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 (24 lines × 3) crates/uv-pip-commands/src/freeze.rs:42 — crates/uv-pip-commands/src/freeze.rs:42-65 | crates/uv-pip-commands/src/list.rs:69-92 | crates/uv-pip-commands/src/show.rs:54-77 — before extracting anything, compare `crates/uv-pip-commands/src/list.rs` and `crates/uv-pip-commands/src/show.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 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 (22–23 lines × 3) · ×2
  • Duplicated block (22–23 lines × 3) crates/uv-cli/src/settings.rs:765 — crates/uv-cli/src/settings.rs:765-787 | crates/uv-cli/src/settings.rs:2619-2641 | crates/uv-cli/src/settings.rs:3075-3096 — 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 (22–23 lines × 3) crates/uv-requirements/src/specification.rs:579 — crates/uv-requirements/src/specification.rs:579-601 | crates/uv-requirements/src/specification.rs:619-641 | crates/uv-requirements/src/specification.rs:647-668 — 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 (18–19 lines × 2) · ×2
  • Duplicated block (18–19 lines × 2) crates/uv-distribution/src/source/mod.rs:290 — crates/uv-distribution/src/source/mod.rs:290-308 | crates/uv-distribution/src/source/mod.rs:454-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 (18–19 lines × 2) crates/uv-project-commands/src/check.rs:144 — crates/uv-project-commands/src/check.rs:144-161 | crates/uv-project-commands/src/run.rs:560-578 — 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) · ×2
  • Duplicated block (18 lines × 4) crates/uv-cli/src/settings.rs:765 — crates/uv-cli/src/settings.rs:765-782 | crates/uv-cli/src/settings.rs:2034-2054 | crates/uv-cli/src/settings.rs:2619-2636 | crates/uv-cli/src/settings.rs:3075-3092 — 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 (18 lines × 4) crates/uv-distribution/src/source/mod.rs:936 — crates/uv-distribution/src/source/mod.rs:936-953 | crates/uv-distribution/src/source/mod.rs:1310-1327 | crates/uv-distribution/src/source/mod.rs:2121-2138 | crates/uv-distribution/src/source/mod.rs:2529-2546 — 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 (15–18 lines × 4) · ×2
  • Duplicated block (15–18 lines × 4) crates/uv-dev/src/generate_cli_reference.rs:67 — crates/uv-dev/src/generate_cli_reference.rs:67-84 | crates/uv-dev/src/generate_json_schema.rs:62-76 | crates/uv-dev/src/generate_options_reference.rs:70-87 | crates/uv-dev/src/generate_sysconfig_mappings.rs:73-90 — before extracting anything, compare `crates/uv-dev/src/generate_cli_reference.rs` and `crates/uv-dev/src/generate_options_reference.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–18 lines × 4) crates/uv-distribution/src/source/mod.rs:665 — crates/uv-distribution/src/source/mod.rs:665-679 | crates/uv-distribution/src/source/mod.rs:798-815 | crates/uv-distribution/src/source/mod.rs:1093-1107 | crates/uv-distribution/src/source/mod.rs:1198-1212 — 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 (17 lines × 3) · ×2
  • Duplicated block (17 lines × 3) crates/uv-distribution-types/src/requirement.rs:1000 — crates/uv-distribution-types/src/requirement.rs:1000-1016 | crates/uv-distribution-types/src/requirement.rs:1048-1064 | crates/uv-lock/src/lock/mod.rs:8810-8826 — 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 (17 lines × 3) crates/uv-distribution/src/source/mod.rs:842 — crates/uv-distribution/src/source/mod.rs:842-858 | crates/uv-distribution/src/source/mod.rs:1241-1257 | crates/uv-distribution/src/source/mod.rs:2060-2076 — 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 × 2) · ×2
  • Duplicated block (16–17 lines × 2) crates/uv-lock/src/lock/mod.rs:9053 — crates/uv-lock/src/lock/mod.rs:9053-9068 | crates/uv-lock/src/lock/mod.rs:9095-9111 — both copies are in the same file, so extract the 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–17 lines × 2) crates/uv-tool-commands/src/install.rs:927 — crates/uv-tool-commands/src/install.rs:927-942 | crates/uv-tool-commands/src/install.rs:982-998 — both copies are in the same file, so extract the 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 (16 lines × 3) · ×2
  • Duplicated block (16 lines × 3) crates/uv-lock/src/lock/mod.rs:4750 — crates/uv-lock/src/lock/mod.rs:4750-4769 | crates/uv-lock/src/lock/mod.rs:4816-4835 | crates/uv-lock/src/lock/mod.rs:4953-4968 — 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 lines × 3) crates/uv-requirements/src/script.rs:55 — crates/uv-requirements/src/script.rs:55-70 | crates/uv-requirements/src/script.rs:82-97 | crates/uv-requirements/src/script.rs:134-149 — 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–15 lines × 3) · ×2
  • Duplicated block (13–15 lines × 3) crates/uv-project-commands/src/init.rs:607 — crates/uv-project-commands/src/init.rs:607-620 | crates/uv-project-commands/src/init.rs:633-645 | crates/uv-project-commands/src/init.rs:706-720 — 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–15 lines × 3) crates/uv/src/lib.rs:718 — crates/uv/src/lib.rs:718-732 | crates/uv/src/lib.rs:841-855 | crates/uv/src/lib.rs:1387-1399 — 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 × 4) · ×2
  • Duplicated block (13 lines × 4) crates/uv-lock/src/lock/export/mod.rs:162 — crates/uv-lock/src/lock/export/mod.rs:162-174 | crates/uv-lock/src/lock/export/mod.rs:299-311 | crates/uv-lock/src/lock/tree.rs:195-207 | crates/uv-lock/src/lock/tree.rs:382-394 — 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 (13 lines × 4) crates/uv-settings/src/settings.rs:2469 — crates/uv-settings/src/settings.rs:2469-2481 | crates/uv-settings/src/settings.rs:2521-2533 | crates/uv-settings/src/settings.rs:2571-2583 | crates/uv-settings/src/settings.rs:2610-2622 — 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 (12 lines × 5) · ×2
  • Duplicated block (12 lines × 5) crates/uv-distribution/src/index/built_wheel_index.rs:86 — crates/uv-distribution/src/index/built_wheel_index.rs:86-97 | crates/uv-distribution/src/index/built_wheel_index.rs:138-149 | crates/uv-distribution/src/index/built_wheel_index.rs:192-203 | crates/uv-distribution/src/index/built_wheel_index.rs:229-240 | crates/uv-distribution/src/index/built_wheel_index.rs:274-285 — 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 (12 lines × 5) crates/uv-platform-tags/src/platform_tag.rs:529 — crates/uv-platform-tags/src/platform_tag.rs:529-540 | crates/uv-platform-tags/src/platform_tag.rs:621-632 | crates/uv-platform-tags/src/platform_tag.rs:669-681 | crates/uv-platform-tags/src/platform_tag.rs:709-720 | crates/uv-platform-tags/src/platform_tag.rs:930-941 — 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 (12 lines × 4) · ×2
  • Duplicated block (12 lines × 4) crates/uv-distribution/src/distribution_database.rs:892 — crates/uv-distribution/src/distribution_database.rs:892-903 | crates/uv-distribution/src/distribution_database.rs:1020-1031 | crates/uv-distribution/src/source/mod.rs:981-992 | crates/uv-distribution/src/source/mod.rs:2775-2786 — 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 (12 lines × 4) crates/uv-lock/src/lock/mod.rs:9662 — crates/uv-lock/src/lock/mod.rs:9662-9673 | crates/uv-lock/src/lock/mod.rs:9721-9732 | crates/uv-resolver/src/pubgrub/report.rs:2233-2244 | crates/uv-resolver/src/pubgrub/report.rs:2269-2280 — 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.
D4 · Code Duplication · Duplicated block (11–12 lines × 3) · ×2
  • Duplicated block (11–12 lines × 3) crates/uv-installer/src/plan.rs:488 — crates/uv-installer/src/plan.rs:488-498 | crates/uv-installer/src/plan.rs:555-566 | crates/uv-installer/src/plan.rs:613-623 — 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–12 lines × 3) crates/uv-pip-commands/src/install.rs:237 — crates/uv-pip-commands/src/install.rs:237-247 | crates/uv-pip-commands/src/sync.rs:204-214 | crates/uv-pip-commands/src/uninstall.rs:49-60 — before extracting anything, compare `crates/uv-pip-commands/src/install.rs` and `crates/uv-pip-commands/src/sync.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 324 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 lines × 3) · ×2
  • Duplicated block (11 lines × 3) crates/uv-distribution/src/distribution_database.rs:914 — crates/uv-distribution/src/distribution_database.rs:914-924 | crates/uv-distribution/src/distribution_database.rs:1042-1052 | crates/uv-distribution/src/source/mod.rs:1023-1033 — 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 (11 lines × 3) crates/uv-distribution/src/source/mod.rs:1895 — crates/uv-distribution/src/source/mod.rs:1895-1905 | crates/uv-distribution/src/source/mod.rs:2005-2015 | crates/uv-distribution/src/source/mod.rs:2172-2182 — 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 (10–11 lines × 2) · ×2
  • Duplicated block (10–11 lines × 2) crates/uv-lock/src/lock/mod.rs:6783 — crates/uv-lock/src/lock/mod.rs:6783-6793 | crates/uv-lock/src/lock/mod.rs:6991-7000 — both copies are in the same file, so extract the 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–11 lines × 2) crates/uv-resolve-operations/src/error.rs:68 — crates/uv-resolve-operations/src/error.rs:68-78 | crates/uv-resolve-operations/src/error.rs:93-102 — both copies are in the same file, so extract the 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) · ×2
  • Duplicated block (10 lines × 3) crates/uv-distribution/src/distribution_database.rs:1431 — crates/uv-distribution/src/distribution_database.rs:1431-1440 | crates/uv-distribution/src/distribution_database.rs:1460-1469 | crates/uv-distribution/src/distribution_database.rs:1521-1531 — 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 (10 lines × 3) crates/uv-resolver/src/pubgrub/report.rs:2257 — crates/uv-resolver/src/pubgrub/report.rs:2257-2266 | crates/uv-resolver/src/pubgrub/report.rs:2293-2302 | crates/uv-resolver/src/pubgrub/report.rs:2310-2319 — 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–10 lines × 2) · ×2
  • Duplicated block (9–10 lines × 2) crates/uv-distribution-filename/src/expanded_tags.rs:117 — crates/uv-distribution-filename/src/expanded_tags.rs:117-126 | crates/uv-distribution-filename/src/wheel.rs:348-356 — 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–10 lines × 2) crates/uv-install-operations/src/error.rs:47 — crates/uv-install-operations/src/error.rs:47-55 | crates/uv-install-operations/src/error.rs:93-102 — both copies are in the same file, so extract the 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) · ×2
  • Duplicated block (9 lines × 3) crates/uv-distribution/src/metadata/build_requires.rs:155 — crates/uv-distribution/src/metadata/build_requires.rs:155-163 | crates/uv-distribution/src/metadata/build_requires.rs:231-239 | crates/uv-distribution/src/metadata/requires_dist.rs:222-230 — 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/uv-lock/src/lock/export/pylock_toml.rs:1120 — crates/uv-lock/src/lock/export/pylock_toml.rs:1120-1128 | crates/uv-lock/src/lock/export/pylock_toml.rs:1132-1140 | crates/uv-lock/src/lock/export/pylock_toml.rs:1143-1151 — 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 (6 lines × 4) · ×2
  • Duplicated block (6 lines × 4) crates/uv-build-commands/src/lib.rs:1343 — crates/uv-build-commands/src/lib.rs:1343-1348 | crates/uv-cache/src/lib.rs:469-474 | crates/uv-python-managed/src/managed.rs:182-187 | crates/uv-tool/src/lib.rs:377-382 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times.
  • Duplicated block (6 lines × 4) crates/uv-project-edit/src/lib.rs:361 — crates/uv-project-edit/src/lib.rs:361-366 | crates/uv-project-edit/src/lib.rs:390-395 | crates/uv-project-edit/src/lib.rs:409-414 | crates/uv-project-edit/src/lib.rs:431-436 — 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 (5–6 lines × 2) · ×2
  • Duplicated block (5–6 lines × 2) crates/uv-client/src/base_client.rs:711 — crates/uv-client/src/base_client.rs:711-715 | crates/uv-client/src/base_client.rs:720-725 — both copies are in the same file, so extract the 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–6 lines × 2) crates/uv-pypi-types/src/dependency_groups.rs:58 — crates/uv-pypi-types/src/dependency_groups.rs:58-63 | crates/uv-pypi-types/src/dependency_groups.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.
D1 · Cyclomatic Complexity · uv_extract · ×1
  • uv_extract::stream::unzip_inner (cyclomatic 99) crates/uv-extract/src/stream.rs:163 — uv_extract::stream::unzip_inner has cyclomatic complexity 99 (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 · InstallableExt · ×1
  • InstallableExt::to_resolution_from_packages (cyclomatic 81) crates/uv-lock/src/lock/installable.rs:255 — InstallableExt::to_resolution_from_packages has cyclomatic complexity 81 (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 · uv_settings · ×1
  • uv_settings::warn_uv_toml_masked_fields (cyclomatic 66) crates/uv-settings/src/lib.rs:390 — uv_settings::warn_uv_toml_masked_fields has cyclomatic complexity 66 (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 · Planner · ×1
  • Planner::build (cyclomatic 65) crates/uv-installer/src/plan.rs:291 — Planner::build 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 · PubGrubHint · ×1
  • PubGrubHint::fmt (cyclomatic 60) crates/uv-resolver/src/pubgrub/report.rs:1890 — PubGrubHint::fmt has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RequirementSatisfaction · ×1
  • RequirementSatisfaction::check (cyclomatic 59) crates/uv-installer/src/satisfies.rs:44 — RequirementSatisfaction::check has cyclomatic complexity 59 (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 · ValidatedLock · ×1
  • ValidatedLock::validate (cyclomatic 53) crates/uv-lock-operations/src/validated_lock.rs:42 — ValidatedLock::validate has cyclomatic complexity 53 (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 · uv_platform_tags · ×1
  • uv_platform_tags::tags::compatible_tags (cyclomatic 40) crates/uv-platform-tags/src/tags.rs:587 — uv_platform_tags::tags::compatible_tags has cyclomatic complexity 40 (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 · PlatformTag · ×1
  • PlatformTag::from_str (cyclomatic 38) crates/uv-platform-tags/src/platform_tag.rs:490 — PlatformTag::from_str 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.
D1 · Cyclomatic Complexity · uv_test · ×1
  • uv_test::pypi_proxy::start (cyclomatic 37) crates/uv-test/src/pypi_proxy.rs:370 — uv_test::pypi_proxy::start has cyclomatic complexity 37 (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 · ForkedDependencies · ×1
  • ForkedDependencies::fork (cyclomatic 35) crates/uv-resolver/src/resolver/mod.rs:3726 — ForkedDependencies::fork has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExportableRequirements · ×1
  • ExportableRequirements::from_lock (cyclomatic 34) crates/uv-lock/src/lock/export/mod.rs:62 — ExportableRequirements::from_lock 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.
D1 · Cyclomatic Complexity · CacheInfo · ×1
  • CacheInfo::from_directory (cyclomatic 33) crates/uv-cache-info/src/cache_info.rs:68 — CacheInfo::from_directory 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.
D1 · Cyclomatic Complexity · uv_requirements_txt · ×1
  • uv_requirements_txt::parse_entry (cyclomatic 32) crates/uv-requirements-txt/src/lib.rs:662 — uv_requirements_txt::parse_entry 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 · DisplayResolutionGraph · ×1
  • DisplayResolutionGraph::fmt (cyclomatic 31) crates/uv-resolver/src/resolution/display.rs:89 — DisplayResolutionGraph::fmt 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 · Cache · ×1
  • Cache::prune (cyclomatic 30) crates/uv-cache/src/lib.rs:678 — Cache::prune 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 · uv_command_support · ×1
  • uv_command_support::child::run_to_completion (cyclomatic 30) crates/uv-command-support/src/child.rs:102 — uv_command_support::child::run_to_completion 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 · ScriptTag · ×1
  • ScriptTag::parse (cyclomatic 30) crates/uv-scripts/src/lib.rs:503 — ScriptTag::parse 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 · RequirementsTxt · ×1
  • RequirementsTxt::parse_inner (cyclomatic 29) crates/uv-requirements-txt/src/lib.rs:343 — RequirementsTxt::parse_inner 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.
D1 · Cyclomatic Complexity · Tags · ×1
  • Tags::from_env (cyclomatic 27) crates/uv-platform-tags/src/tags.rs:169 — Tags::from_env has cyclomatic complexity 27 (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 · PythonDownloadRequest · ×1
  • PythonDownloadRequest::from_str (cyclomatic 27) crates/uv-python-types/src/download_request.rs:519 — PythonDownloadRequest::from_str has cyclomatic complexity 27 (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 · Workspace · ×1
  • Workspace::collect_members_only (cyclomatic 27) crates/uv-workspace/src/workspace.rs:1216 — Workspace::collect_members_only 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 · LoweredRequirement · ×1
  • LoweredRequirement::from_requirement (cyclomatic 26) crates/uv-distribution/src/metadata/lowering.rs:46 — LoweredRequirement::from_requirement 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 · ProjectEnvironment · ×1
  • ProjectEnvironment::get_or_init (cyclomatic 26) crates/uv-environment-operations/src/lib.rs:835 — ProjectEnvironment::get_or_init 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 · InstallTarget · ×1
  • InstallTarget::packages (cyclomatic 25) crates/uv-environment-operations/src/install_target.rs:786 — InstallTarget::packages 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 · uv_resolver_types · ×1
  • uv_resolver_types::graph_ops::simplify_conflict_markers (cyclomatic 25) crates/uv-resolver-types/src/graph_ops.rs:95 — uv_resolver_types::graph_ops::simplify_conflict_markers 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 · InitSettings · ×1
  • InitSettings::resolve (cyclomatic 24) crates/uv-cli/src/settings.rs:489 — InitSettings::resolve has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · uv_dev · ×1
  • uv_dev::generate_cli_reference::generate_command (cyclomatic 24) crates/uv-dev/src/generate_cli_reference.rs:123 — uv_dev::generate_cli_reference::generate_command 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 · PortableGlobParser · ×1
  • PortableGlobParser::check (cyclomatic 24) crates/uv-globfilter/src/portable_glob.rs:109 — PortableGlobParser::check 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 · IncompatibleDist · ×1
  • IncompatibleDist::fmt (cyclomatic 24) crates/uv-resolver/src/prioritized_distribution.rs:278 — IncompatibleDist::fmt 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 · get_interpreter_info.get_operating_system_and_architecture (cyclomatic 24) · ×1
  • get_interpreter_info.get_operating_system_and_architecture (cyclomatic 24) crates/uv-python-interpreter/python/get_interpreter_info.py:420 — get_interpreter_info.get_operating_system_and_architecture 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 · RegistryWheelIndex · ×1
  • RegistryWheelIndex::index (cyclomatic 23) crates/uv-distribution/src/index/registry_wheel_index.rs:203 — RegistryWheelIndex::index 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 · InstalledDist · ×1
  • InstalledDist::try_from_path (cyclomatic 23) crates/uv-distribution-types/src/installed.rs:168 — InstalledDist::try_from_path 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 · VariantsJsonContent · ×1
  • VariantsJsonContent::try_from (cyclomatic 23) crates/uv-distribution-types/src/variants_json.rs:416 — VariantsJsonContent::try_from 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 · Conflicts · ×1
  • Conflicts::expand_transitive_group_includes (cyclomatic 23) crates/uv-pypi-types/src/conflicts.rs:86 — Conflicts::expand_transitive_group_includes 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 · HashStrategy · ×1
  • HashStrategy::from_requirements (cyclomatic 23) crates/uv-types/src/hash.rs:298 — HashStrategy::from_requirements 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 · CacheBucket · ×1
  • CacheBucket::remove (cyclomatic 22) crates/uv-cache/src/lib.rs:1328 — CacheBucket::remove has cyclomatic complexity 22 (threshold 15). Of this number, 16 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CacheControl · ×1
  • CacheControl::from_iter (cyclomatic 22) crates/uv-client/src/httpcache/control.rs:142 — CacheControl::from_iter has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. 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 · RequirementSourceWire · ×1
  • RequirementSourceWire::from (cyclomatic 22) crates/uv-distribution-types/src/requirement.rs:946 — RequirementSourceWire::from 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.
D1 · Cyclomatic Complexity · ParsedRunCommand · ×1
  • ParsedRunCommand::from_args (cyclomatic 22) crates/uv-project-commands/src/run.rs:1466 — ParsedRunCommand::from_args 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 · uv_project_edit · ×1
  • uv_project_edit::add_dependency (cyclomatic 22) crates/uv-project-edit/src/lib.rs:1270 — uv_project_edit::add_dependency 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.
D1 · Cyclomatic Complexity · PackageRange · ×1
  • PackageRange::fmt (cyclomatic 22) crates/uv-resolver/src/pubgrub/report.rs:2641 — PackageRange::fmt 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. This is NOT this file's highest cyclomatic complexity: PubGrubHintCore::from (cyclomatic 28) 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.
D1 · Cyclomatic Complexity · uv_workspace_commands · ×1
  • uv_workspace_commands::metadata::metadata (cyclomatic 22) crates/uv-workspace-commands/src/metadata.rs:44 — uv_workspace_commands::metadata::metadata 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.
D1 · Cyclomatic Complexity · InstallOptions · ×1
  • InstallOptions::include_package (cyclomatic 21) crates/uv-configuration/src/install_options.rs:61 — InstallOptions::include_package 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 · RequirementSource · ×1
  • RequirementSource::try_from (cyclomatic 21) crates/uv-distribution-types/src/requirement.rs:1114 — RequirementSource::try_from 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.
D1 · Cyclomatic Complexity · NamedRequirementsResolver · ×1
  • NamedRequirementsResolver::resolve_requirement (cyclomatic 21) crates/uv-requirements/src/unnamed.rs:82 — NamedRequirementsResolver::resolve_requirement 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 · CandidateSelector · ×1
  • CandidateSelector::get_preferred_from_iter (cyclomatic 21) crates/uv-resolver/src/candidate_selector.rs:257 — CandidateSelector::get_preferred_from_iter 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 · ForkState · ×1
  • ForkState::into_resolution (cyclomatic 21) crates/uv-resolver/src/resolver/mod.rs:3306 — ForkState::into_resolution 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 · uv_console · ×1
  • uv_console::input (cyclomatic 21) crates/uv-console/src/lib.rs:137 — uv_console::input 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 · sync-python-version-constants.main (cyclomatic 21) · ×1
  • sync-python-version-constants.main (cyclomatic 21) scripts/sync-python-version-constants.py:35 — sync-python-version-constants.main 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 · SourceDistributionBuilder · ×1
  • SourceDistributionBuilder::git_source_tree_metadata (cyclomatic 20) crates/uv-distribution/src/source/mod.rs:2261 — SourceDistributionBuilder::git_source_tree_metadata 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.
D1 · Cyclomatic Complexity · WheelTagHint · ×1
  • WheelTagHint::fmt (cyclomatic 20) crates/uv-lock/src/lock/mod.rs:9659 — WheelTagHint::fmt 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 · Removal · ×1
  • Removal::rm_rf (cyclomatic 19) crates/uv-cache/src/removal.rs:133 — Removal::rm_rf has cyclomatic complexity 19 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D1 · Cyclomatic Complexity · Tool · ×1
  • Tool::to_toml (cyclomatic 19) crates/uv-tool/src/tool.rs:207 — Tool::to_toml has cyclomatic complexity 19 (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 · Error · ×1
  • Error::hints (cyclomatic 18) crates/uv-build-commands/src/lib.rs:137 — Error::hints 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.
D1 · Cyclomatic Complexity · uv_distribution · ×1
  • uv_distribution::diagnostics::format_chain (cyclomatic 18) crates/uv-distribution/src/diagnostics.rs:50 — uv_distribution::diagnostics::format_chain has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to one function item inside it that branches (format_step). 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.
D1 · Cyclomatic Complexity · RequirementsTxtExport · ×1
  • RequirementsTxtExport::fmt (cyclomatic 18) crates/uv-lock/src/lock/export/requirements_txt.rs:65 — RequirementsTxtExport::fmt 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 · LatestClient · ×1
  • LatestClient::find_latest (cyclomatic 18) crates/uv-resolve-operations/src/latest.rs:106 — LatestClient::find_latest 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.
D1 · Cyclomatic Complexity · uv_resolver · ×1
  • uv_resolver::marker::requires_python::collect_python_markers (cyclomatic 18) crates/uv-resolver/src/marker.rs:19 — uv_resolver::marker::requires_python::collect_python_markers has cyclomatic complexity 18 (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 · check-cargo-bans.inspect (cyclomatic 18) · ×1
  • check-cargo-bans.inspect (cyclomatic 18) scripts/check-cargo-bans.py:22 — check-cargo-bans.inspect 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 · SourceBuild · ×1
  • SourceBuild::extract_pep517_backend (cyclomatic 17) crates/uv-build-frontend/src/lib.rs:675 — SourceBuild::extract_pep517_backend 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 · UnresolvedRequirement · ×1
  • UnresolvedRequirement::augment_requirement (cyclomatic 17) crates/uv-distribution-types/src/specified_requirement.rs:97 — UnresolvedRequirement::augment_requirement 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 · PythonInstallation · ×1
  • PythonInstallation::find_or_download (cyclomatic 17) crates/uv-python-discovery/src/installation.rs:174 — PythonInstallation::find_or_download has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ManagedPythonDownload · ×1
  • ManagedPythonDownload::fetch_from_url (cyclomatic 17) crates/uv-python-managed/src/downloads.rs:489 — ManagedPythonDownload::fetch_from_url 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.
D1 · Cyclomatic Complexity · ExecutableNameComparator · ×1
  • ExecutableNameComparator::cmp (cyclomatic 17) crates/uv-python-types/src/request.rs:847 — ExecutableNameComparator::cmp 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.
D1 · Cyclomatic Complexity · IncompatibleWheel · ×1
  • IncompatibleWheel::is_more_compatible (cyclomatic 17) crates/uv-resolver/src/prioritized_distribution.rs:929 — IncompatibleWheel::is_more_compatible has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · PubGrubDependency · ×1
  • PubGrubDependency::from_requirement (cyclomatic 17) crates/uv-resolver/src/pubgrub/dependencies.rs:129 — PubGrubDependency::from_requirement 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 · RequirementsTxtDist · ×1
  • RequirementsTxtDist::to_requirements_txt (cyclomatic 17) crates/uv-resolver/src/resolution/requirements_txt.rs:35 — RequirementsTxtDist::to_requirements_txt 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 · build_uv_pgo.main (cyclomatic 17) · ×1
  • build_uv_pgo.main (cyclomatic 17) scripts/build_uv_pgo.py:122 — build_uv_pgo.main 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.
D1 · Cyclomatic Complexity · NetworkSettings · ×1
  • NetworkSettings::resolve (cyclomatic 16) crates/uv-cli/src/settings.rs:296 — NetworkSettings::resolve 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.
D1 · Cyclomatic Complexity · uv_installer · ×1
  • uv_installer::satisfies::generate_dist_compatibility_hint (cyclomatic 16) crates/uv-installer/src/satisfies.rs:514 — uv_installer::satisfies::generate_dist_compatibility_hint 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 · VersionRequest · ×1
  • VersionRequest::executable_names (cyclomatic 16) crates/uv-python-types/src/request.rs:1051 — VersionRequest::executable_names 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 · BatchPrefetcherRunner · ×1
  • BatchPrefetcherRunner::send_prefetch (cyclomatic 16) crates/uv-resolver/src/resolver/batch_prefetch.rs:191 — BatchPrefetcherRunner::send_prefetch 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 · ResolverOutput · ×1
  • ResolverOutput::marker_tree::add_marker_params_from_tree (cyclomatic 16) crates/uv-resolver-types/src/output.rs:222 — ResolverOutput::marker_tree::add_marker_params_from_tree 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 · assemble-release-artifacts.assemble (cyclomatic 16) · ×1
  • assemble-release-artifacts.assemble (cyclomatic 16) scripts/assemble-release-artifacts.py:76 — assemble-release-artifacts.assemble 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 · InstallableExt · ×1
  • InstallableExt::to_resolution_from_packages (cognitive 217) crates/uv-lock/src/lock/installable.rs:255 — InstallableExt::to_resolution_from_packages has cognitive complexity 217 (threshold 15). Drivers by points: if/else 44 (126 pts), loops 26 (66 pts), match/switch 6 (17 pts), boolean chains 8 (nesting depth added 133). To reduce it, split the body into named stages: move each independent 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 · Planner · ×1
  • Planner::build (cognitive 137) crates/uv-installer/src/plan.rs:291 — Planner::build has cognitive complexity 137 (threshold 15). Drivers by points: if/else 32 (100 pts), match/switch 9 (28 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 88). 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 · ForkedDependencies · ×1
  • ForkedDependencies::fork (cognitive 121) crates/uv-resolver/src/resolver/mod.rs:3726 — ForkedDependencies::fork has cognitive complexity 121 (threshold 15). Drivers by points: if/else 20 (76 pts), loops 12 (40 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 86). 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 · RequirementSatisfaction · ×1
  • RequirementSatisfaction::check (cognitive 112) crates/uv-installer/src/satisfies.rs:44 — RequirementSatisfaction::check has cognitive complexity 112 (threshold 15). Drivers by points: if/else 48 (100 pts), match/switch 4 (9 pts), boolean chains 3 (nesting depth added 57). 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 · RegistryWheelIndex · ×1
  • RegistryWheelIndex::index (cognitive 97) crates/uv-distribution/src/index/registry_wheel_index.rs:203 — RegistryWheelIndex::index has cognitive complexity 97 (threshold 15). Drivers by points: if/else 18 (82 pts), loops 4 (9 pts), match/switch 2 (6 pts) (nesting depth added 73). 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 · ExportableRequirements · ×1
  • ExportableRequirements::from_lock (cognitive 88) crates/uv-lock/src/lock/export/mod.rs:62 — ExportableRequirements::from_lock has cognitive complexity 88 (threshold 15). Drivers by points: if/else 21 (54 pts), loops 11 (28 pts), match/switch 3 (4 pts), boolean chains 2 (nesting depth added 51). To reduce it, split the body into named stages: move each independent 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 · CacheInfo · ×1
  • CacheInfo::from_directory (cognitive 81) crates/uv-cache-info/src/cache_info.rs:68 — CacheInfo::from_directory has cognitive complexity 81 (threshold 15). Drivers by points: if/else 18 (45 pts), match/switch 9 (30 pts), loops 3 (6 pts) (nesting depth added 51). To reduce it, split the body into named stages: move each independent 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 · DisplayResolutionGraph · ×1
  • DisplayResolutionGraph::fmt (cognitive 75) crates/uv-resolver/src/resolution/display.rs:89 — DisplayResolutionGraph::fmt has cognitive complexity 75 (threshold 15). Drivers by points: if/else 20 (45 pts), loops 8 (18 pts), match/switch 4 (12 pts) (nesting depth added 43). To reduce it, split the body into named stages: move each independent 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 · PubGrubHint · ×1
  • PubGrubHint::fmt (cognitive 73) crates/uv-resolver/src/pubgrub/report.rs:1890 — PubGrubHint::fmt has cognitive complexity 73 (threshold 15). Drivers by points: if/else 36 (60 pts), match/switch 5 (9 pts), loops 2 (4 pts) (nesting depth added 30). 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 · uv_resolver_types · ×1
  • uv_resolver_types::graph_ops::simplify_conflict_markers (cognitive 70) crates/uv-resolver-types/src/graph_ops.rs:95 — uv_resolver_types::graph_ops::simplify_conflict_markers has cognitive complexity 70 (threshold 15). Drivers by points: if/else 13 (36 pts), loops 13 (34 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.
D2 · Cognitive Complexity · WheelTagHint · ×1
  • WheelTagHint::fmt (cognitive 65) crates/uv-lock/src/lock/mod.rs:9659 — WheelTagHint::fmt has cognitive complexity 65 (threshold 15). Drivers by points: if/else 34 (64 pts), match/switch 1 (nesting depth added 30). 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 · uv_settings · ×1
  • uv_settings::warn_uv_toml_masked_fields (cognitive 64) crates/uv-settings/src/lib.rs:390 — uv_settings::warn_uv_toml_masked_fields has cognitive complexity 64 (threshold 15). Drivers by points: if/else 63, match/switch 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.
D2 · Cognitive Complexity · RequirementsTxt · ×1
  • RequirementsTxt::parse_inner (cognitive 58) crates/uv-requirements-txt/src/lib.rs:343 — RequirementsTxt::parse_inner has cognitive complexity 58 (threshold 15). Drivers by points: if/else 11 (35 pts), match/switch 5 (15 pts), loops 3 (7 pts), boolean chains 1 (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.
D2 · Cognitive Complexity · ProjectEnvironment · ×1
  • ProjectEnvironment::get_or_init (cognitive 57) crates/uv-environment-operations/src/lib.rs:835 — ProjectEnvironment::get_or_init has cognitive complexity 57 (threshold 15). Drivers by points: if/else 26 (46 pts), match/switch 4 (9 pts), boolean chains 2 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · uv_platform_tags · ×1
  • uv_platform_tags::tags::compatible_tags (cognitive 56) crates/uv-platform-tags/src/tags.rs:587 — uv_platform_tags::tags::compatible_tags has cognitive complexity 56 (threshold 15). Drivers by points: loops 13 (38 pts), if/else 7 (15 pts), match/switch 2 (3 pts) (nesting depth added 34). 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 · ScriptTag · ×1
  • ScriptTag::parse (cognitive 55) crates/uv-scripts/src/lib.rs:503 — ScriptTag::parse has cognitive complexity 55 (threshold 15). Drivers by points: if/else 20 (44 pts), boolean chains 6, loops 4 (5 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ValidatedLock · ×1
  • ValidatedLock::validate (cognitive 51) crates/uv-lock-operations/src/validated_lock.rs:42 — ValidatedLock::validate has cognitive complexity 51 (threshold 15). Drivers by points: if/else 38 (49 pts), boolean chains 1, match/switch 1 (nesting depth added 11). 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 · PortableGlobParser · ×1
  • PortableGlobParser::check (cognitive 50) crates/uv-globfilter/src/portable_glob.rs:109 — PortableGlobParser::check has cognitive complexity 50 (threshold 15). Drivers by points: if/else 16 (30 pts), match/switch 3 (10 pts), loops 3 (7 pts), boolean chains 3 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · uv_console · ×1
  • uv_console::input (cognitive 50) crates/uv-console/src/lib.rs:137 — uv_console::input has cognitive complexity 50 (threshold 15). Drivers by points: if/else 17 (43 pts), match/switch 2 (6 pts), loops 1 (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.
D2 · Cognitive Complexity · HashStrategy · ×1
  • HashStrategy::from_requirements (cognitive 49) crates/uv-types/src/hash.rs:298 — HashStrategy::from_requirements has cognitive complexity 49 (threshold 15). Drivers by points: if/else 18 (42 pts), match/switch 2 (3 pts), boolean chains 2, loops 2 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · uv_command_support · ×1
  • uv_command_support::child::run_to_completion (cognitive 47) crates/uv-command-support/src/child.rs:102 — uv_command_support::child::run_to_completion has cognitive complexity 47 (threshold 15). Drivers by points: if/else 17 (41 pts), match/switch 2 (3 pts), loops 2, boolean chains 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InstalledDist · ×1
  • InstalledDist::try_from_path (cognitive 47) crates/uv-distribution-types/src/installed.rs:168 — InstalledDist::try_from_path has cognitive complexity 47 (threshold 15). Drivers by points: if/else 23 (45 pts), match/switch 1 (2 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.
D2 · Cognitive Complexity · PlatformTag · ×1
  • PlatformTag::from_str (cognitive 46) crates/uv-platform-tags/src/platform_tag.rs:490 — PlatformTag::from_str has cognitive complexity 46 (threshold 15). Drivers by points: if/else 31 (44 pts), boolean chains 1, 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.
D2 · Cognitive Complexity · Conflicts · ×1
  • Conflicts::expand_transitive_group_includes (cognitive 46) crates/uv-pypi-types/src/conflicts.rs:86 — Conflicts::expand_transitive_group_includes has cognitive complexity 46 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 11 (21 pts), boolean chains 1 (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.
D2 · Cognitive Complexity · RequirementsTxtDist · ×1
  • RequirementsTxtDist::to_requirements_txt (cognitive 44) crates/uv-resolver/src/resolution/requirements_txt.rs:35 — RequirementsTxtDist::to_requirements_txt has cognitive complexity 44 (threshold 15). Drivers by points: if/else 18 (36 pts), match/switch 2 (7 pts), boolean chains 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 · PythonDownloadRequest · ×1
  • PythonDownloadRequest::from_str (cognitive 41) crates/uv-python-types/src/download_request.rs:519 — PythonDownloadRequest::from_str has cognitive complexity 41 (threshold 15). Drivers by points: if/else 8 (22 pts), match/switch 7 (18 pts), loops 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VariantsJsonContent · ×1
  • VariantsJsonContent::try_from (cognitive 40) crates/uv-distribution-types/src/variants_json.rs:416 — VariantsJsonContent::try_from has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 5 (11 pts), boolean chains 4, match/switch 1 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CacheBucket · ×1
  • CacheBucket::remove (cognitive 39) crates/uv-cache/src/lib.rs:1328 — CacheBucket::remove has cognitive complexity 39 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 9 (18 pts), match/switch 1 (nesting depth added 21). Of this number, 28 points are the body's own statements and 11 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 · UnresolvedRequirement · ×1
  • UnresolvedRequirement::augment_requirement (cognitive 37) crates/uv-distribution-types/src/specified_requirement.rs:97 — UnresolvedRequirement::augment_requirement has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (32 pts), match/switch 3 (5 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.
D2 · Cognitive Complexity · LatestClient · ×1
  • LatestClient::find_latest (cognitive 37) crates/uv-resolve-operations/src/latest.rs:106 — LatestClient::find_latest has cognitive complexity 37 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 5 (13 pts), match/switch 4 (8 pts), boolean chains 2 (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 · Removal · ×1
  • Removal::rm_rf (cognitive 36) crates/uv-cache/src/removal.rs:133 — Removal::rm_rf has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (31 pts), boolean chains 3, loops 1, match/switch 1 (nesting depth added 17). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D2 · Cognitive Complexity · uv_installer · ×1
  • uv_installer::satisfies::generate_dist_compatibility_hint (cognitive 36) crates/uv-installer/src/satisfies.rs:514 — uv_installer::satisfies::generate_dist_compatibility_hint has cognitive complexity 36 (threshold 15). Drivers by points: if/else 19 (33 pts), match/switch 2 (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.
D2 · Cognitive Complexity · PublishSession · ×1
  • PublishSession::upload (cognitive 36) crates/uv-publish/src/lib.rs:690 — PublishSession::upload has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (26 pts), match/switch 3 (7 pts), boolean chains 2, loops 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 · AuditResults · ×1
  • AuditResults::render_text (cognitive 35) crates/uv-audit-operations/src/lib.rs:206 — AuditResults::render_text has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (25 pts), loops 3 (7 pts), match/switch 1 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RequirementsTxtExport · ×1
  • RequirementsTxtExport::fmt (cognitive 35) crates/uv-lock/src/lock/export/requirements_txt.rs:65 — RequirementsTxtExport::fmt has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 3 (8 pts), match/switch 3 (7 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CacheControlParser · ×1
  • CacheControlParser::next (cognitive 34) crates/uv-client/src/httpcache/control.rs:443 — CacheControlParser::next has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (23 pts), match/switch 2 (8 pts), loops 2 (3 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.
D2 · Cognitive Complexity · FrozenWorkspace · ×1
  • FrozenWorkspace::discover (cognitive 33) crates/uv-lock-operations/src/lockfile.rs:24 — FrozenWorkspace::discover has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (29 pts), match/switch 1 (3 pts), loops 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 · LookaheadResolver · ×1
  • LookaheadResolver::resolve (cognitive 33) crates/uv-requirements/src/lookahead.rs:82 — LookaheadResolver::resolve has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 4 (9 pts), boolean chains 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BatchPrefetcherRunner · ×1
  • BatchPrefetcherRunner::send_prefetch (cognitive 33) crates/uv-resolver/src/resolver/batch_prefetch.rs:191 — BatchPrefetcherRunner::send_prefetch has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (24 pts), match/switch 3 (7 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.
D2 · Cognitive Complexity · uv_workspace_commands · ×1
  • uv_workspace_commands::metadata::metadata (cognitive 32) crates/uv-workspace-commands/src/metadata.rs:44 — uv_workspace_commands::metadata::metadata has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (19 pts), match/switch 7 (11 pts), boolean chains 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 · sync-python-version-constants.main (cognitive 32) · ×1
  • sync-python-version-constants.main (cognitive 32) scripts/sync-python-version-constants.py:35 — sync-python-version-constants.main has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 6 (7 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LoweredRequirement · ×1
  • LoweredRequirement::from_requirement (cognitive 31) crates/uv-distribution/src/metadata/lowering.rs:46 — LoweredRequirement::from_requirement has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (19 pts), match/switch 3 (6 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VersionRequest · ×1
  • VersionRequest::executable_names (cognitive 31) crates/uv-python-types/src/request.rs:1051 — VersionRequest::executable_names has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 5 (13 pts), boolean chains 1, 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.
D2 · Cognitive Complexity · NamedRequirementsResolver · ×1
  • NamedRequirementsResolver::resolve_requirement (cognitive 31) crates/uv-requirements/src/unnamed.rs:82 — NamedRequirementsResolver::resolve_requirement has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (21 pts), match/switch 4 (7 pts), boolean chains 3 (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 · check-cargo-bans.inspect (cognitive 31) · ×1
  • check-cargo-bans.inspect (cognitive 31) scripts/check-cargo-bans.py:22 — check-cargo-bans.inspect has cognitive complexity 31 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 5 (9 pts), boolean chains 5, ternaries 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.
D2 · Cognitive Complexity · Preparer · ×1
  • Preparer::get_wheel (cognitive 30) crates/uv-installer/src/preparer.rs:111 — Preparer::get_wheel has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (23 pts), match/switch 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.
D2 · Cognitive Complexity · get_interpreter_info.get_operating_system_and_architecture (cognitive 30) · ×1
  • get_interpreter_info.get_operating_system_and_architecture (cognitive 30) crates/uv-python-interpreter/python/get_interpreter_info.py:420 — get_interpreter_info.get_operating_system_and_architecture has cognitive complexity 30 (threshold 15). Drivers by points: if/else 19 (29 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.
D2 · Cognitive Complexity · uv_configuration · ×1
  • uv_configuration::normalized_requirements::normalize_package_requirements (cognitive 29) crates/uv-configuration/src/normalized_requirements.rs:320 — uv_configuration::normalized_requirements::normalize_package_requirements has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 4 (7 pts), boolean chains 3 (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.
D2 · Cognitive Complexity · ScriptEnvironment · ×1
  • ScriptEnvironment::get_or_init (cognitive 29) crates/uv-environment-operations/src/lib.rs:1148 — ScriptEnvironment::get_or_init has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 4 (9 pts), boolean chains 2 (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · uv_metadata · ×1
  • uv_metadata::read_metadata_async_stream (cognitive 29) crates/uv-metadata/src/lib.rs:233 — uv_metadata::read_metadata_async_stream has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 2, 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 · Urls · ×1
  • Urls::from_manifest (cognitive 29) crates/uv-resolver/src/resolver/urls.rs:41 — Urls::from_manifest has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 3, boolean chains 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · InstallOptions · ×1
  • InstallOptions::include_package (cognitive 28) crates/uv-configuration/src/install_options.rs:61 — InstallOptions::include_package has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IterativeReporter · ×1
  • IterativeReporter::build (cognitive 28) crates/uv-resolver/src/pubgrub/report.rs:87 — IterativeReporter::build has cognitive complexity 28 (threshold 15). Drivers by points: match/switch 4 (14 pts), if/else 5 (12 pts), boolean chains 1, loops 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 · uv_macros · ×1
  • uv_macros::options_metadata::derive_impl (cognitive 27) crates/uv-macros/src/options_metadata.rs:15 — uv_macros::options_metadata::derive_impl has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 2 (7 pts), boolean chains 1, match/switch 1 (nesting depth added 16). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D2 · Cognitive Complexity · ExecutableNameComparator · ×1
  • ExecutableNameComparator::cmp (cognitive 27) crates/uv-python-types/src/request.rs:847 — ExecutableNameComparator::cmp has cognitive complexity 27 (threshold 15). Drivers by points: if/else 20 (25 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.
D2 · Cognitive Complexity · SimpleDetailHTML · ×1
  • SimpleDetailHTML::parse_anchor (cognitive 26) crates/uv-client/src/html.rs:170 — SimpleDetailHTML::parse_anchor has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (18 pts), match/switch 3 (8 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 · RequiresDist · ×1
  • RequiresDist::validate_sources (cognitive 26) crates/uv-distribution/src/metadata/requires_dist.rs:245 — RequiresDist::validate_sources has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (22 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PythonRequirementConflicts · ×1
  • PythonRequirementConflicts::fmt (cognitive 26) crates/uv-python-discovery/src/project.rs:316 — PythonRequirementConflicts::fmt has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (25 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.
D2 · Cognitive Complexity · Interpreter · ×1
  • Interpreter::matches_request (cognitive 26) crates/uv-python-interpreter/src/interpreter.rs:792 — Interpreter::matches_request has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (22 pts), boolean chains 3, match/switch 1 (nesting depth added 13). Of this number, 25 points are the body's own statements and 1 belongs to one function item inside it that branches. 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 · ParsedRunCommand · ×1
  • ParsedRunCommand::from_args (cognitive 25) crates/uv-project-commands/src/run.rs:1466 — ParsedRunCommand::from_args has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 7 (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.
D2 · Cognitive Complexity · RequiresPython · ×1
  • RequiresPython::matches_wheel_tag (cognitive 24) crates/uv-distribution-types/src/requires_python.rs:379 — RequiresPython::matches_wheel_tag has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (24 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.
D2 · Cognitive Complexity · uv_resolve_operations · ×1
  • uv_resolve_operations::resolve (cognitive 23) crates/uv-resolve-operations/src/lib.rs:95 — uv_resolve_operations::resolve has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (5 pts), match/switch 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · uv_environment_operations · ×1
  • uv_environment_operations::warn_on_requirements_txt_setting (cognitive 22) crates/uv-environment-operations/src/lib.rs:2104 — uv_environment_operations::warn_on_requirements_txt_setting has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 2 (4 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.
D2 · Cognitive Complexity · LockOperation · ×1
  • LockOperation::execute (cognitive 22) crates/uv-lock-operations/src/lock.rs:161 — LockOperation::execute has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (18 pts), match/switch 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.
D2 · Cognitive Complexity · uv_publish · ×1
  • uv_publish::group_files (cognitive 22) crates/uv-publish/src/lib.rs:443 — uv_publish::group_files has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (3 pts), boolean chains 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 · GatheredCredentials · ×1
  • GatheredCredentials::gather (cognitive 22) crates/uv-publish-commands/src/lib.rs:340 — GatheredCredentials::gather has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 1, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PubGrubDependency · ×1
  • PubGrubDependency::from_requirement (cognitive 22) crates/uv-resolver/src/pubgrub/dependencies.rs:129 — PubGrubDependency::from_requirement has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (20 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 · Accelerator · ×1
  • Accelerator::detect (cognitive 22) crates/uv-torch/src/accelerator.rs:82 — Accelerator::detect has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 2 (4 pts), loops 1 (2 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 · Sources · ×1
  • Sources::try_from (cognitive 22) crates/uv-workspace/src/pyproject.rs:1165 — Sources::try_from has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · _manylinux.platform_tags (cognitive 22) · ×1
  • _manylinux.platform_tags (cognitive 22) crates/uv-python-interpreter/python/packaging/_manylinux.py:214 — _manylinux.platform_tags has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 4 (7 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 · assemble-release-artifacts.assemble (cognitive 22) · ×1
  • assemble-release-artifacts.assemble (cognitive 22) scripts/assemble-release-artifacts.py:76 — assemble-release-artifacts.assemble has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 6 (8 pts), ternaries 1 (2 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 · InitSettings · ×1
  • InitSettings::resolve (cognitive 21) crates/uv-cli/src/settings.rs:489 — InitSettings::resolve has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 8, match/switch 2 (4 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Metadata · ×1
  • Metadata::from_lock_target (cognitive 21) crates/uv-lock/src/lock/export/metadata.rs:1339 — Metadata::from_lock_target has cognitive complexity 21 (threshold 15). Drivers by points: loops 7 (15 pts), if/else 3 (4 pts), match/switch 2 (nesting depth added 9). 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 · Package · ×1
  • Package::to_source_dist (cognitive 21) crates/uv-lock/src/lock/mod.rs:6915 — Package::to_source_dist has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 2 (3 pts) (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · AbiTag · ×1
  • AbiTag::from_str (cognitive 21) crates/uv-platform-tags/src/abi_tag.rs:233 — AbiTag::from_str has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (19 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 · IncompatibleDist · ×1
  • IncompatibleDist::fmt (cognitive 21) crates/uv-resolver/src/prioritized_distribution.rs:278 — IncompatibleDist::fmt has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 8 (16 pts), if/else 3 (5 pts) (nesting depth added 10). 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 · PackageRange · ×1
  • PackageRange::fmt (cognitive 21) crates/uv-resolver/src/pubgrub/report.rs:2641 — PackageRange::fmt has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 3 (5 pts), 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.
D2 · Cognitive Complexity · Requirement · ×1
  • Requirement::cache_key (cognitive 20) crates/uv-distribution-types/src/requirement.rs:452 — Requirement::cache_key has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 3 (4 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 · RequirementSourceWire · ×1
  • RequirementSourceWire::from (cognitive 20) crates/uv-distribution-types/src/requirement.rs:946 — RequirementSourceWire::from has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), match/switch 3 (4 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.
D2 · Cognitive Complexity · PythonInstallation · ×1
  • PythonInstallation::find_or_download (cognitive 20) crates/uv-python-discovery/src/installation.rs:174 — PythonInstallation::find_or_download has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 5 (7 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 · Options · ×1
  • Options::with_origin (cognitive 20) crates/uv-settings/src/settings.rs:213 — Options::with_origin has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 4 (10 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 · _Finder.find_spec (cognitive 20) · ×1
  • _Finder.find_spec (cognitive 20) crates/uv-virtualenv/src/_virtualenv.py:51 — _Finder.find_spec has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 2 (6 pts), error handling 2 (5 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.
D2 · Cognitive Complexity · WheelFilename · ×1
  • WheelFilename::parse (cognitive 19) crates/uv-distribution-filename/src/wheel.rs:206 — WheelFilename::parse has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15 (18 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 · IncompatibleWheelHint · ×1
  • IncompatibleWheelHint::fmt (cognitive 19) crates/uv-installer/src/plan.rs:116 — IncompatibleWheelHint::fmt has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (16 pts), match/switch 2 (3 pts) (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 · Cursor · ×1
  • Cursor::string (cognitive 19) crates/uv-lock/src/lock/deserialize.rs:193 — Cursor::string has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), match/switch 1 (2 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 · PrefixMatch · ×1
  • PrefixMatch::from_range (cognitive 19) crates/uv-resolver/src/error.rs:1712 — PrefixMatch::from_range has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 2, 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 · Preferences · ×1
  • Preferences::from_iter (cognitive 19) crates/uv-resolver/src/preferences.rs:210 — Preferences::from_iter has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (4 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.
D2 · Cognitive Complexity · DerivationChainBuilder · ×1
  • DerivationChainBuilder::from_state::find_path (cognitive 19) crates/uv-resolver/src/resolver/derivation.rs:25 — DerivationChainBuilder::from_state::find_path 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.
D2 · Cognitive Complexity · Tool · ×1
  • Tool::to_toml (cognitive 19) crates/uv-tool/src/tool.rs:207 — Tool::to_toml has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 5 (10 pts), if/else 8 (9 pts) (nesting depth added 6). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · TorchStrategy · ×1
  • TorchStrategy::index_urls (cognitive 19) crates/uv-torch/src/backend.rs:363 — TorchStrategy::index_urls has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 4 (7 pts) (nesting depth added 9). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D2 · Cognitive Complexity · check_registry.main (cognitive 19) · ×1
  • check_registry.main (cognitive 19) scripts/check_registry.py:122 — check_registry.main has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (5 pts), boolean chains 3 (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 · uv_cache_info · ×1
  • uv_cache_info::glob::split_glob (cognitive 18) crates/uv-cache-info/src/glob.rs:30 — uv_cache_info::glob::split_glob has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 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 · NetworkSettings · ×1
  • NetworkSettings::resolve (cognitive 18) crates/uv-cli/src/settings.rs:296 — NetworkSettings::resolve has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 2, match/switch 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.
D2 · Cognitive Complexity · AddSettings · ×1
  • AddSettings::resolve (cognitive 18) crates/uv-cli/src/settings.rs:2246 — AddSettings::resolve has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 1, 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.
D2 · Cognitive Complexity · StaticMetadata · ×1
  • StaticMetadata::read (cognitive 18) crates/uv-distribution/src/source/mod.rs:3314 — StaticMetadata::read has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), match/switch 5 (9 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 · RequirementSource · ×1
  • RequirementSource::try_from (cognitive 18) crates/uv-distribution-types/src/requirement.rs:1114 — RequirementSource::try_from has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 2 (4 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 · UnsupportedVariantProperties · ×1
  • UnsupportedVariantProperties::fmt (cognitive 18) crates/uv-distribution-types/src/variants_json.rs:53 — UnsupportedVariantProperties::fmt has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (6 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 · uv_publish_commands · ×1
  • uv_publish_commands::publish (cognitive 18) crates/uv-publish-commands/src/lib.rs:34 — uv_publish_commands::publish has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), match/switch 3, 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 · RangeCursor · ×1
  • RangeCursor::contains (cognitive 18) crates/uv-resolver/src/candidate_selector.rs:770 — RangeCursor::contains has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 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 · DefaultResolverProvider · ×1
  • DefaultResolverProvider::get_package_versions (cognitive 18) crates/uv-resolver/src/resolver/provider.rs:188 — DefaultResolverProvider::get_package_versions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 3 (5 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.
D2 · Cognitive Complexity · codspeed-profiles.find_source_run (cognitive 18) · ×1
  • codspeed-profiles.find_source_run (cognitive 18) scripts/codspeed-profiles.py:306 — codspeed-profiles.find_source_run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 2, 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.
D2 · Cognitive Complexity · KeyringProvider · ×1
  • KeyringProvider::fetch_subprocess (cognitive 17) crates/uv-auth/src/keyring.rs:262 — KeyringProvider::fetch_subprocess has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (17 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 · TextCredentialStore · ×1
  • TextCredentialStore::get_credentials (cognitive 17) crates/uv-auth/src/store.rs:341 — TextCredentialStore::get_credentials has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (16 pts), 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.
D2 · Cognitive Complexity · EnvFile · ×1
  • EnvFile::from_args (cognitive 17) crates/uv-configuration/src/env_file.rs:9 — EnvFile::from_args has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 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 · BuiltWheelIndex · ×1
  • BuiltWheelIndex::find (cognitive 17) crates/uv-distribution/src/index/built_wheel_index.rs:313 — BuiltWheelIndex::find has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DerivationChain · ×1
  • DerivationChain::from_resolution (cognitive 17) crates/uv-distribution-types/src/dist_error.rs:93 — DerivationChain::from_resolution has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 3 (10 pts), loops 2 (4 pts), if/else 2 (3 pts) (nesting depth added 10). 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 · LockTarget · ×1
  • LockTarget::validate_upgrade_groups (cognitive 17) crates/uv-lock-operations/src/lock_target.rs:143 — LockTarget::validate_upgrade_groups has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (4 pts), boolean chains 1, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoSolutionError · ×1
  • NoSolutionError::narrow_widened_sets (cognitive 17) crates/uv-resolver/src/error.rs:611 — NoSolutionError::narrow_widened_sets has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), match/switch 3 (4 pts), boolean chains 2 (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 · FlatDependencyGroups · ×1
  • FlatDependencyGroups::from_dependency_groups::resolve_group (cognitive 17) crates/uv-workspace/src/dependency_groups.rs:95 — FlatDependencyGroups::from_dependency_groups::resolve_group has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), match/switch 2 (5 pts), loops 2 (3 pts) (nesting depth added 6). 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 · get_interpreter_info.get_virtualenv (cognitive 17) · ×1
  • get_interpreter_info.get_virtualenv (cognitive 17) crates/uv-python-interpreter/python/get_interpreter_info.py:132 — get_interpreter_info.get_virtualenv has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (6 pts), loops 2 (5 pts), boolean chains 2, error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · build_uv_pgo.main (cognitive 17) · ×1
  • build_uv_pgo.main (cognitive 17) scripts/build_uv_pgo.py:122 — build_uv_pgo.main has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7, boolean chains 5, loops 2 (3 pts), ternaries 2 (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.
D2 · Cognitive Complexity · build_uv_pgo.prepare_corpus (cognitive 17) · ×1
  • build_uv_pgo.prepare_corpus (cognitive 17) scripts/build_uv_pgo.py:312 — build_uv_pgo.prepare_corpus 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.
D2 · Cognitive Complexity · bump-workspace-crate-versions.main (cognitive 17) · ×1
  • bump-workspace-crate-versions.main (cognitive 17) scripts/bump-workspace-crate-versions.py:25 — bump-workspace-crate-versions.main has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 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 · generate-crate-readmes.main (cognitive 17) · ×1
  • generate-crate-readmes.main (cognitive 17) scripts/generate-crate-readmes.py:59 — generate-crate-readmes.main has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (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 · MissingHeaderCause · ×1
  • MissingHeaderCause::fmt (cognitive 16) crates/uv-build-frontend/src/error.rs:188 — MissingHeaderCause::fmt has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (15 pts), match/switch 1 (nesting depth added 4). 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 · ToolRunSettings · ×1
  • ToolRunSettings::resolve (cognitive 16) crates/uv-cli/src/settings.rs:914 — ToolRunSettings::resolve has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 7 (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.
D2 · Cognitive Complexity · CacheControl · ×1
  • CacheControl::from_iter (cognitive 16) crates/uv-client/src/httpcache/control.rs:142 — CacheControl::from_iter has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 5 (10 pts), if/else 3 (5 pts), loops 1 (nesting depth added 7). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · FlatRequiresDist · ×1
  • FlatRequiresDist::from_requirements (cognitive 16) crates/uv-distribution/src/metadata/requires_dist.rs:364 — FlatRequiresDist::from_requirements has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 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.
D2 · Cognitive Complexity · DirhashTree · ×1
  • DirhashTree::insertion_entry (cognitive 16) crates/uv-extract/src/dirhash.rs:322 — DirhashTree::insertion_entry has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 1 (3 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 · InstallState · ×1
  • InstallState::warn_directory_conflict (cognitive 16) crates/uv-install-wheel/src/linker.rs:158 — InstallState::warn_directory_conflict has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 4 (5 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 · ParsedUrl · ×1
  • ParsedUrl::try_from (cognitive 16) crates/uv-pypi-types/src/parsed_url.rs:488 — ParsedUrl::try_from has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), 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 · InterpreterInfo · ×1
  • InterpreterInfo::query_cached (cognitive 16) crates/uv-python-interpreter/src/interpreter.rs:1344 — InterpreterInfo::query_cached has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 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 · uv_python_interpreter · ×1
  • uv_python_interpreter::interpreter::find_base_python (cognitive 16) crates/uv-python-interpreter/src/interpreter.rs:1460 — uv_python_interpreter::interpreter::find_base_python has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 6). Of this number, 13 points are the body's own statements and 3 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 · PubGrubPackageInner · ×1
  • PubGrubPackageInner::fmt (cognitive 16) crates/uv-resolver/src/pubgrub/package.rs:353 — PubGrubPackageInner::fmt has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 1 (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 · ServerIndex · ×1
  • ServerIndex::new (cognitive 16) crates/uv-test/src/packse/server.rs:141 — ServerIndex::new has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 4 (8 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.
D30 · Dependency Vulnerabilities · Medium CVE · ×1
  • REDACTED
D35 · Change Coupling · Change-coupling hub · ×1
  • Change-coupling hub: install.rs → compile.rs, uninstall.rs, manifest.rs crates/uv-pip-commands/src/install.rs — `crates/uv-pip-commands/src/install.rs` changes together with 3 other files — `crates/uv-pip-commands/src/compile.rs`, `crates/uv-pip-commands/src/uninstall.rs`, `crates/uv-resolver/src/manifest.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.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (4 members, 26 shared lines) · ×1
  • Near-duplicate member family (4 members, 26 shared lines) crates/uv-dev/src/generate_cli_reference.rs:38 — crates/uv-dev/src/generate_cli_reference.rs:38-92 | crates/uv-dev/src/generate_json_schema.rs:35-83 | crates/uv-dev/src/generate_options_reference.rs:41-95 | crates/uv-dev/src/generate_sysconfig_mappings.rs:42-98 — These 4 members are variants of one another: a block of 26 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 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 · Near-duplicate member pair (73 shared lines) · ×1
  • Near-duplicate member pair (73 shared lines) crates/uv-cli/src/settings.rs:1824 — crates/uv-cli/src/settings.rs:1824-2010 | crates/uv-cli/src/settings.rs:2250-2478 — These two members are variants of one another: 73 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 (68 shared lines) · ×1
  • Near-duplicate member pair (68 shared lines) crates/uv-project-commands/src/remove.rs:68 — crates/uv-project-commands/src/remove.rs:68-412 | crates/uv-project-commands/src/version.rs:519-664 — These two members are variants of one another: 68 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 (62 shared lines) · ×1
  • Near-duplicate member pair (62 shared lines) crates/uv-pypi-types/src/metadata/metadata_resolver.rs:178 — crates/uv-pypi-types/src/metadata/metadata_resolver.rs:178-270 | crates/uv-pypi-types/src/metadata/requires_dist.rs:27-98 — These two members are variants of one another: 62 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 (53 shared lines) · ×1
  • Near-duplicate member pair (53 shared lines) crates/uv-build-commands/src/lib.rs:1106 — crates/uv-build-commands/src/lib.rs:1106-1206 | crates/uv-build-commands/src/lib.rs:1227-1333 — These two members are variants of one another: 53 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 (38 shared lines) · ×1
  • Near-duplicate member pair (38 shared lines) crates/uv-requirements/src/sources.rs:176 — crates/uv-requirements/src/sources.rs:176-219 | crates/uv-requirements/src/sources.rs:226-269 — These two members are variants of one another: 38 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 (22 shared lines) · ×1
  • Near-duplicate member pair (22 shared lines) crates/uv-distribution/src/metadata/requires_dist.rs:364 — crates/uv-distribution/src/metadata/requires_dist.rs:364-444 | crates/uv-resolver/src/resolver/requirements.rs:92-204 — These two members are variants of one another: 22 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 (10 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (10 members, 50+ identical tokens) crates/uv-distribution/src/source/mod.rs:659 — crates/uv-distribution/src/source/mod.rs:659-776 | crates/uv-distribution/src/source/mod.rs:792-964 | crates/uv-distribution/src/source/mod.rs:1084-1180 | crates/uv-distribution/src/source/mod.rs:1192-1338 | crates/uv-distribution/src/source/mod.rs:1407-1501 | crates/uv-distribution/src/source/mod.rs:1514-1720 | crates/uv-distribution/src/source/mod.rs:1886-1987 | crates/uv-distribution/src/source/mod.rs:1996-2149 | crates/uv-distribution/src/source/mod.rs:2159-2255 | crates/uv-distribution/src/source/mod.rs:2268-2569 — These 10 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 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 · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (6 members, 50+ identical tokens) crates/uv-pip-commands/src/freeze.rs:38 — crates/uv-pip-commands/src/freeze.rs:38-142 | crates/uv-pip-commands/src/install.rs:143-700 | crates/uv-pip-commands/src/list.rs:60-316 | crates/uv-pip-commands/src/show.rs:38-243 | crates/uv-pip-commands/src/sync.rs:110-573 | crates/uv-pip-commands/src/uninstall.rs:40-254 — 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 (73 lines × 2) · ×1
  • Duplicated block (73 lines × 2) crates/uv-configuration/src/target_triple.rs:1448 — crates/uv-configuration/src/target_triple.rs:1448-1520 | crates/uv-configuration/src/target_triple.rs:1534-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.
D4 · Code Duplication · Duplicated block (69–70 lines × 3) · ×1
  • Duplicated block (69–70 lines × 3) crates/uv-distribution/src/source/mod.rs:895 — crates/uv-distribution/src/source/mod.rs:895-964 | crates/uv-distribution/src/source/mod.rs:1270-1338 | crates/uv-distribution/src/source/mod.rs:2081-2149 — 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 (61–62 lines × 2) · ×1
  • Duplicated block (61–62 lines × 2) crates/uv-pip-commands/src/install.rs:513 — crates/uv-pip-commands/src/install.rs:513-574 | crates/uv-pip-commands/src/sync.rs:399-459 — before extracting anything, compare `crates/uv-pip-commands/src/install.rs` and `crates/uv-pip-commands/src/sync.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 324 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 (61 lines × 2) · ×1
  • Duplicated block (61 lines × 2) crates/uv-distribution/src/distribution_database.rs:905 — crates/uv-distribution/src/distribution_database.rs:905-965 | crates/uv-distribution/src/distribution_database.rs:1033-1093 — both copies are in the same file, so extract the 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 (50–51 lines × 2) · ×1
  • Duplicated block (50–51 lines × 2) crates/uv-cli/src/options.rs:405 — crates/uv-cli/src/options.rs:405-455 | crates/uv-cli/src/options.rs:744-793 — both copies are in the same file, so extract the 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 (45 lines × 2) · ×1
  • Duplicated block (45 lines × 2) crates/uv-tool-commands/src/install.rs:290 — crates/uv-tool-commands/src/install.rs:290-334 | crates/uv-tool-commands/src/run.rs:963-1007 — 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 (44 lines × 3) · ×1
  • Duplicated block (44 lines × 3) crates/uv-pip-commands/src/compile.rs:421 — crates/uv-pip-commands/src/compile.rs:421-464 | crates/uv-pip-commands/src/install.rs:418-461 | crates/uv-pip-commands/src/sync.rs:296-339 — before extracting anything, compare `crates/uv-pip-commands/src/install.rs` and `crates/uv-pip-commands/src/sync.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 324 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 (39–40 lines × 2) · ×1
  • Duplicated block (39–40 lines × 2) crates/uv-cli/src/options.rs:247 — crates/uv-cli/src/options.rs:247-286 | crates/uv-cli/src/options.rs:588-626 — both copies are in the same file, so extract the 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/uv-cli/src/settings.rs:3591 — crates/uv-cli/src/settings.rs:3591-3629 | crates/uv-cli/src/settings.rs:3735-3773 — both copies are in the same file, so extract the 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 (38 lines × 2) · ×1
  • Duplicated block (38 lines × 2) crates/uv-cli/src/settings.rs:1827 — crates/uv-cli/src/settings.rs:1827-1864 | crates/uv-cli/src/settings.rs:2831-2868 — both copies are in the same file, so extract the 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–37 lines × 2) · ×1
  • Duplicated block (36–37 lines × 2) crates/uv-cli/src/settings.rs:1902 — crates/uv-cli/src/settings.rs:1902-1938 | crates/uv-cli/src/settings.rs:2296-2331 — both copies are in the same file, so extract the 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 (35–36 lines × 2) · ×1
  • Duplicated block (35–36 lines × 2) crates/uv-distribution/src/distribution_database.rs:319 — crates/uv-distribution/src/distribution_database.rs:319-354 | crates/uv-distribution/src/distribution_database.rs:397-431 — both copies are in the same file, so extract the 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 (33–36 lines × 2) · ×1
  • Duplicated block (33–36 lines × 2) crates/uv-pip-commands/src/install.rs:217 — crates/uv-pip-commands/src/install.rs:217-252 | crates/uv-pip-commands/src/sync.rs:184-216 — before extracting anything, compare `crates/uv-pip-commands/src/install.rs` and `crates/uv-pip-commands/src/sync.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 324 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 (35 lines × 2) · ×1
  • Duplicated block (35 lines × 2) crates/uv-pip-commands/src/list.rs:110 — crates/uv-pip-commands/src/list.rs:110-144 | crates/uv-pip-commands/src/tree.rs:93-127 — 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 (33–35 lines × 2) · ×1
  • Duplicated block (33–35 lines × 2) crates/uv-pypi-types/src/metadata/metadata_resolver.rs:47 — crates/uv-pypi-types/src/metadata/metadata_resolver.rs:47-79 | crates/uv-pypi-types/src/metadata/metadata_resolver.rs:125-159 — both copies are in the same file, so extract the 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 (32 lines × 2) · ×1
  • Duplicated block (32 lines × 2) crates/uv-distribution/src/metadata/lowering.rs:166 — crates/uv-distribution/src/metadata/lowering.rs:166-197 | crates/uv-distribution/src/metadata/lowering.rs:363-394 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (31–32 lines × 2) · ×1
  • Duplicated block (31–32 lines × 2) crates/uv-project-commands/src/remove.rs:265 — crates/uv-project-commands/src/remove.rs:265-296 | crates/uv-project-commands/src/version.rs:553-583 — before extracting anything, compare `crates/uv-project-commands/src/remove.rs` and `crates/uv-project-commands/src/version.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 71 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 (30 lines × 4) · ×1
  • Duplicated block (30 lines × 4) crates/uv-cli/src/options.rs:252 — crates/uv-cli/src/options.rs:252-281 | crates/uv-cli/src/options.rs:416-445 | crates/uv-cli/src/options.rs:593-622 | crates/uv-cli/src/options.rs:755-784 — 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 (18–30 lines × 3) · ×1
  • Duplicated block (18–30 lines × 3) crates/uv-static/src/known_stdlib.rs:216 — crates/uv-static/src/known_stdlib.rs:216-245 | crates/uv-static/src/known_stdlib.rs:251-280 | crates/uv-static/src/known_stdlib.rs:286-303 — 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 (29 lines × 4) · ×1
  • Duplicated block (29 lines × 4) crates/uv-cli/src/settings.rs:1844 — crates/uv-cli/src/settings.rs:1844-1872 | crates/uv-cli/src/settings.rs:2264-2292 | crates/uv-settings/src/settings.rs:739-767 | crates/uv-windows/src/exception.rs:194-222 — there are 4 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 4 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (27–28 lines × 2) · ×1
  • Duplicated block (27–28 lines × 2) crates/uv-distribution/src/source/mod.rs:2982 — crates/uv-distribution/src/source/mod.rs:2982-3008 | crates/uv-distribution/src/source/mod.rs:3134-3161 — both copies are in the same file, so extract the 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 (24–28 lines × 2) · ×1
  • Duplicated block (24–28 lines × 2) crates/uv-lock/src/lock/export/pylock_toml.rs:564 — crates/uv-lock/src/lock/export/pylock_toml.rs:564-591 | crates/uv-lock/src/lock/export/pylock_toml.rs:662-685 — both copies are in the same file, so extract the 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 (24–25 lines × 2) · ×1
  • Duplicated block (24–25 lines × 2) crates/uv-project-commands/src/init.rs:596 — crates/uv-project-commands/src/init.rs:596-619 | crates/uv-project-commands/src/init.rs:695-719 — both copies are in the same file, so extract the 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/uv-build-commands/src/lib.rs:1160 — crates/uv-build-commands/src/lib.rs:1160-1181 | crates/uv-build-commands/src/lib.rs:1272-1294 — both copies are in the same file, so extract the 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/uv-distribution/src/distribution_database.rs:358 — crates/uv-distribution/src/distribution_database.rs:358-380 | crates/uv-distribution/src/distribution_database.rs:436-456 — both copies are in the same file, so extract the 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 lines × 2) · ×1
  • Duplicated block (23 lines × 2) crates/uv-distribution/src/source/mod.rs:1145 — crates/uv-distribution/src/source/mod.rs:1145-1167 | crates/uv-distribution/src/source/mod.rs:1952-1974 — both copies are in the same file, so extract the 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) · ×1
  • Duplicated block (21–22 lines × 2) crates/uv-project-commands/src/run.rs:243 — crates/uv-project-commands/src/run.rs:243-264 | crates/uv-project-commands/src/run.rs:723-743 — both copies are in the same file, so extract the 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–21 lines × 4) · ×1
  • Duplicated block (20–21 lines × 4) crates/uv-cli/src/settings.rs:762 — crates/uv-cli/src/settings.rs:762-782 | crates/uv-cli/src/settings.rs:1857-1876 | crates/uv-cli/src/settings.rs:2616-2636 | crates/uv-cli/src/settings.rs:3072-3092 — 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 (20–21 lines × 3) · ×1
  • Duplicated block (20–21 lines × 3) crates/uv-cli/src/settings.rs:3451 — crates/uv-cli/src/settings.rs:3451-3471 | crates/uv-cli/src/settings.rs:3799-3819 | crates/uv-cli/src/settings.rs:4260-4279 — 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 (18–20 lines × 3) · ×1
  • Duplicated block (18–20 lines × 3) crates/uv-cli/src/settings.rs:789 — crates/uv-cli/src/settings.rs:789-807 | crates/uv-cli/src/settings.rs:1893-1910 | crates/uv-cli/src/settings.rs:2890-2909 — 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 (10–20 lines × 3) · ×1
  • Duplicated block (10–20 lines × 3) crates/uv-cli/src/settings.rs:4835 — crates/uv-cli/src/settings.rs:4835-4844 | crates/uv-cli/src/settings.rs:4846-4864 | crates/uv-cli/src/settings.rs:4900-4919 — 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–20 lines × 2) · ×1
  • Duplicated block (19–20 lines × 2) crates/uv-lock/src/lock/installable.rs:409 — crates/uv-lock/src/lock/installable.rs:409-428 | crates/uv-lock/src/lock/installable.rs:776-794 — both copies are in the same file, so extract the 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–20 lines × 2) · ×1
  • Duplicated block (18–20 lines × 2) crates/uv-project-commands/src/remove.rs:370 — crates/uv-project-commands/src/remove.rs:370-387 | crates/uv-project-commands/src/version.rs:621-640 — before extracting anything, compare `crates/uv-project-commands/src/remove.rs` and `crates/uv-project-commands/src/version.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 71 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 lines × 4) · ×1
  • Duplicated block (19 lines × 4) crates/uv-pip-commands/src/install.rs:487 — crates/uv-pip-commands/src/install.rs:487-505 | crates/uv-pip-commands/src/install.rs:621-639 | crates/uv-pip-commands/src/sync.rs:370-388 | crates/uv-pip-commands/src/sync.rs:494-512 — before extracting anything, compare `crates/uv-pip-commands/src/install.rs` and `crates/uv-pip-commands/src/sync.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 324 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–19 lines × 3) · ×1
  • Duplicated block (18–19 lines × 3) crates/uv-distribution/src/source/mod.rs:812 — crates/uv-distribution/src/source/mod.rs:812-830 | crates/uv-distribution/src/source/mod.rs:1212-1229 | crates/uv-distribution/src/source/mod.rs:2031-2048 — 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 (17–19 lines × 2) · ×1
  • Duplicated block (17–19 lines × 2) crates/uv-project-commands/src/remove.rs:244 — crates/uv-project-commands/src/remove.rs:244-262 | crates/uv-project-commands/src/version.rs:535-551 — before extracting anything, compare `crates/uv-project-commands/src/remove.rs` and `crates/uv-project-commands/src/version.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 71 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 × 5) · ×1
  • Duplicated block (17–18 lines × 5) crates/uv-distribution/src/source/mod.rs:689 — crates/uv-distribution/src/source/mod.rs:689-706 | crates/uv-distribution/src/source/mod.rs:1113-1130 | crates/uv-distribution/src/source/mod.rs:1441-1458 | crates/uv-distribution/src/source/mod.rs:1927-1944 | crates/uv-distribution/src/source/mod.rs:2199-2215 — 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 (18 lines × 5) · ×1
  • Duplicated block (18 lines × 5) crates/uv-distribution/src/source/mod.rs:753 — crates/uv-distribution/src/source/mod.rs:753-770 | crates/uv-distribution/src/source/mod.rs:1157-1174 | crates/uv-distribution/src/source/mod.rs:1478-1495 | crates/uv-distribution/src/source/mod.rs:1964-1981 | crates/uv-distribution/src/source/mod.rs:2232-2249 — 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 (15–18 lines × 2) · ×1
  • Duplicated block (15–18 lines × 2) crates/uv-distribution/src/distribution_database.rs:1449 — crates/uv-distribution/src/distribution_database.rs:1449-1466 | crates/uv-distribution/src/distribution_database.rs:1513-1527 — both copies are in the same file, so extract the 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–18 lines × 2) · ×1
  • Duplicated block (12–18 lines × 2) crates/uv-install-operations/src/lib.rs:419 — crates/uv-install-operations/src/lib.rs:419-436 | crates/uv-install-operations/src/lib.rs:805-816 — both copies are in the same file, so extract the 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–17 lines × 5) · ×1
  • Duplicated block (15–17 lines × 5) crates/uv-cli/src/settings.rs:770 — crates/uv-cli/src/settings.rs:770-785 | crates/uv-cli/src/settings.rs:2624-2639 | crates/uv-cli/src/settings.rs:2725-2740 | crates/uv-cli/src/settings.rs:2871-2887 | crates/uv-cli/src/settings.rs:3080-3094 — 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 (16–17 lines × 4) · ×1
  • Duplicated block (16–17 lines × 4) crates/uv-environment-operations/src/lib.rs:1480 — crates/uv-environment-operations/src/lib.rs:1480-1496 | crates/uv-lock-operations/src/lock.rs:620-636 | crates/uv-tool-commands/src/common.rs:453-468 | crates/uv-tool-commands/src/requirements.rs:104-120 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times.
D4 · Code Duplication · Duplicated block (16–17 lines × 3) · ×1
  • Duplicated block (16–17 lines × 3) crates/uv/src/lib.rs:411 — crates/uv/src/lib.rs:411-426 | crates/uv/src/lib.rs:436-452 | crates/uv/src/lib.rs:462-478 — 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–16 lines × 2) · ×1
  • Duplicated block (15–16 lines × 2) crates/uv-installer/src/compile.rs:188 — crates/uv-installer/src/compile.rs:188-203 | crates/uv-installer/src/compile.rs:270-284 — both copies are in the same file, so extract the 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–16 lines × 2) · ×1
  • Duplicated block (13–16 lines × 2) crates/uv-project-edit/src/lib.rs:605 — crates/uv-project-edit/src/lib.rs:605-617 | crates/uv-project-edit/src/lib.rs:668-683 — both copies are in the same file, so extract the 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 × 6) · ×1
  • Duplicated block (15 lines × 6) crates/uv-pip-commands/src/freeze.rs:49 — crates/uv-pip-commands/src/freeze.rs:49-63 | crates/uv-pip-commands/src/install.rs:257-271 | crates/uv-pip-commands/src/list.rs:76-90 | crates/uv-pip-commands/src/show.rs:61-75 | crates/uv-pip-commands/src/sync.rs:219-233 | crates/uv-pip-commands/src/uninstall.rs:63-77 — before extracting anything, compare `crates/uv-pip-commands/src/install.rs` and `crates/uv-pip-commands/src/sync.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 324 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 (14–15 lines × 2) · ×1
  • Duplicated block (14–15 lines × 2) crates/uv-cache/src/lib.rs:1362 — crates/uv-cache/src/lib.rs:1362-1375 | crates/uv-cache/src/lib.rs:1381-1395 — both copies are in the same file, so extract the 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–15 lines × 2) · ×1
  • Duplicated block (13–15 lines × 2) crates/uv-command-support/src/progress.rs:169 — crates/uv-command-support/src/progress.rs:169-181 | crates/uv-command-support/src/progress.rs:391-405 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (11–14 lines × 4) · ×1
  • Duplicated block (11–14 lines × 4) crates/uv-distribution/src/index/built_wheel_index.rs:89 — crates/uv-distribution/src/index/built_wheel_index.rs:89-102 | crates/uv-distribution/src/index/built_wheel_index.rs:141-151 | crates/uv-distribution/src/index/built_wheel_index.rs:195-205 | crates/uv-distribution/src/index/built_wheel_index.rs:277-290 — 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 (13–14 lines × 4) · ×1
  • Duplicated block (13–14 lines × 4) crates/uv/src/lib.rs:737 — crates/uv/src/lib.rs:737-749 | crates/uv/src/lib.rs:951-963 | crates/uv/src/lib.rs:1587-1600 | crates/uv/src/lib.rs:1691-1703 — 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 (12–14 lines × 3) · ×1
  • Duplicated block (12–14 lines × 3) crates/uv-torch/src/backend.rs:397 — crates/uv-torch/src/backend.rs:397-410 | crates/uv-torch/src/backend.rs:430-441 | crates/uv-torch/src/backend.rs:449-460 — 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–14 lines × 2) · ×1
  • Duplicated block (13–14 lines × 2) crates/uv-distribution/src/source/mod.rs:1429 — crates/uv-distribution/src/source/mod.rs:1429-1442 | crates/uv-distribution/src/source/mod.rs:1564-1576 — both copies are in the same file, so extract the 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–14 lines × 2) · ×1
  • Duplicated block (10–14 lines × 2) crates/uv/src/lib.rs:2476 — crates/uv/src/lib.rs:2476-2489 | crates/uv/src/lib.rs:2551-2560 — both copies are in the same file, so extract the 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 × 10) · ×1
  • Duplicated block (12 lines × 10) crates/uv-distribution/src/source/mod.rs:686 — crates/uv-distribution/src/source/mod.rs:686-697 | crates/uv-distribution/src/source/mod.rs:828-839 | crates/uv-distribution/src/source/mod.rs:1110-1121 | crates/uv-distribution/src/source/mod.rs:1227-1238 | crates/uv-distribution/src/source/mod.rs:1438-1449 | crates/uv-distribution/src/source/mod.rs:1572-1583 | crates/uv-distribution/src/source/mod.rs:1924-1935 | crates/uv-distribution/src/source/mod.rs:2046-2057 | crates/uv-distribution/src/source/mod.rs:2196-2207 | crates/uv-distribution/src/source/mod.rs:2410-2421 — all 10 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–12 lines × 2) · ×1
  • Duplicated block (8–12 lines × 2) crates/uv-distribution/src/source/mod.rs:1416 — crates/uv-distribution/src/source/mod.rs:1416-1427 | crates/uv-distribution/src/source/mod.rs:1553-1560 — both copies are in the same file, so extract the 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–11 lines × 2) · ×1
  • Duplicated block (8–11 lines × 2) crates/uv-cli/src/settings.rs:4743 — crates/uv-cli/src/settings.rs:4743-4750 | crates/uv-cli/src/settings.rs:4755-4765 — both copies are in the same file, so extract the 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–11 lines × 2) · ×1
  • Duplicated block (9–11 lines × 2) crates/uv-client/src/flat_index.rs:224 — crates/uv-client/src/flat_index.rs:224-232 | crates/uv-client/src/registry_client.rs:637-647 — 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 (3–11 lines × 3) · ×1
  • Duplicated block (3–11 lines × 3) crates/uv-lock/src/lock/tree.rs:408 — crates/uv-lock/src/lock/tree.rs:408-418 | crates/uv-lock/src/lock/tree.rs:437-447 | crates/uv-pip-commands/src/tree.rs:300-302 — 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–11 lines × 2) · ×1
  • Duplicated block (6–11 lines × 2) crates/uv-virtualenv/src/virtualenv.rs:858 — crates/uv-virtualenv/src/virtualenv.rs:858-868 | crates/uv-virtualenv/src/virtualenv.rs:875-880 — both copies are in the same file, so extract the 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 × 5) · ×1
  • Duplicated block (10 lines × 5) crates/uv/src/lib.rs:2334 — crates/uv/src/lib.rs:2334-2343 | crates/uv/src/lib.rs:2409-2418 | crates/uv/src/lib.rs:2616-2625 | crates/uv/src/lib.rs:2686-2695 | crates/uv/src/lib.rs:2917-2926 — 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 (8–10 lines × 2) · ×1
  • Duplicated block (8–10 lines × 2) crates/uv-resolver/src/pubgrub/report.rs:1073 — crates/uv-resolver/src/pubgrub/report.rs:1073-1082 | crates/uv-resolver/src/pubgrub/report.rs:1122-1129 — both copies are in the same file, so extract the 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/uv-cli/src/settings.rs:4750 — crates/uv-cli/src/settings.rs:4750-4758 | crates/uv-cli/src/settings.rs:4770-4776 — both copies are in the same file, so extract the 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–9 lines × 2) · ×1
  • Duplicated block (8–9 lines × 2) crates/uv-lock/src/lock/deserialize.rs:753 — crates/uv-lock/src/lock/deserialize.rs:753-760 | crates/uv-lock/src/lock/deserialize.rs:794-802 — both copies are in the same file, so extract the 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 × 5) · ×1
  • Duplicated block (8 lines × 5) crates/uv-tool/src/tool.rs:223 — crates/uv-tool/src/tool.rs:223-230 | crates/uv-tool/src/tool.rs:245-252 | crates/uv-tool/src/tool.rs:267-274 | crates/uv-tool/src/tool.rs:289-296 | crates/uv-tool/src/tool.rs:311-318 — 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 (6–7 lines × 2) · ×1
  • Duplicated block (6–7 lines × 2) crates/uv-distribution/src/metadata/requires_dist.rs:397 — crates/uv-distribution/src/metadata/requires_dist.rs:397-402 | crates/uv-resolver/src/resolver/requirements.rs:143-149 — 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 (3–7 lines × 3) · ×1
  • Duplicated block (3–7 lines × 3) crates/uv-workspace/src/workspace.rs:485 — crates/uv-workspace/src/workspace.rs:485-487 | crates/uv-workspace/src/workspace.rs:1663-1670 | crates/uv-workspace/src/workspace.rs:2220-2226 — 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 (6 lines × 6) · ×1
  • Duplicated block (6 lines × 6) crates/uv-cli/src/settings.rs:779 — crates/uv-cli/src/settings.rs:779-785 | crates/uv-cli/src/settings.rs:2170-2176 | crates/uv-cli/src/settings.rs:2633-2639 | crates/uv-cli/src/settings.rs:2734-2740 | crates/uv-cli/src/settings.rs:2878-2888 | crates/uv-cli/src/settings.rs:3089-3094 — 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.
D4 · Code Duplication · Duplicated block (3–5 lines × 3) · ×1
  • Duplicated block (3–5 lines × 3) crates/uv-distribution-types/src/installed.rs:370 — crates/uv-distribution-types/src/installed.rs:370-372 | crates/uv-distribution-types/src/installed.rs:389-393 | crates/uv-distribution-types/src/installed.rs:402-406 — 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 lines × 3) · ×1
  • Duplicated block (19 lines × 3) crates/uv-installer/src/plan.rs:648 — crates/uv-installer/src/plan.rs:648-666 | crates/uv-installer/src/plan.rs:724-742 | crates/uv-installer/src/plan.rs:758-778 — 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) · ×1
  • Duplicated block (11 lines × 5) crates/uv-tool/src/tool.rs:210 — crates/uv-tool/src/tool.rs:210-220 | crates/uv-tool/src/tool.rs:232-242 | crates/uv-tool/src/tool.rs:254-264 | crates/uv-tool/src/tool.rs:276-286 | crates/uv-tool/src/tool.rs:298-308 — 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 (9 lines × 6) · ×1
  • Duplicated block (9 lines × 6) crates/uv-platform-tags/src/platform_tag.rs:738 — crates/uv-platform-tags/src/platform_tag.rs:738-746 | crates/uv-platform-tags/src/platform_tag.rs:753-761 | crates/uv-platform-tags/src/platform_tag.rs:768-776 | crates/uv-platform-tags/src/platform_tag.rs:783-791 | crates/uv-platform-tags/src/platform_tag.rs:798-806 | crates/uv-platform-tags/src/platform_tag.rs:813-821 — 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.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×1
  • Duplicated block (8 lines × 4) crates/uv-platform-tags/src/platform_tag.rs:504 — crates/uv-platform-tags/src/platform_tag.rs:504-511 | crates/uv-platform-tags/src/platform_tag.rs:596-603 | crates/uv-platform-tags/src/platform_tag.rs:644-651 | crates/uv-platform-tags/src/platform_tag.rs:905-912 — 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 (7 lines × 5) · ×1
  • Duplicated block (7 lines × 5) crates/uv-resolver/src/prioritized_distribution.rs:1029 — crates/uv-resolver/src/prioritized_distribution.rs:1029-1035 | crates/uv-resolver/src/prioritized_distribution.rs:1042-1048 | crates/uv-resolver/src/prioritized_distribution.rs:1055-1061 | crates/uv-resolver/src/prioritized_distribution.rs:1117-1123 | crates/uv-resolver/src/prioritized_distribution.rs:1135-1141 — 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 (7 lines × 6) · ×1
  • Duplicated block (7 lines × 6) crates/uv-configuration/src/name_specifiers.rs:40 — crates/uv-configuration/src/name_specifiers.rs:40-46 | crates/uv-lock/src/lock/mod.rs:8294-8300 | crates/uv-normalize/src/extra_name.rs:53-59 | crates/uv-normalize/src/group_name.rs:249-255 | crates/uv-pypi-types/src/dependency_groups.rs:111-117 | crates/uv-pypi-types/src/supported_environments.rs:74-80 — before extracting anything, compare `crates/uv-normalize/src/extra_name.rs` and `crates/uv-normalize/src/group_name.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 33 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.
D5 · Coupling · Unstable project uv-audit-operations · ×1
  • Unstable project uv-audit-operations — uv-audit-operations has instability 0.86 with 2 dependents.
D5 · Coupling · Unstable project uv-bin-install · ×1
  • Unstable project uv-bin-install — uv-bin-install has instability 0.82 with 2 dependents.
D5 · Coupling · Unstable project uv-build-commands · ×1
  • Unstable project uv-build-commands — uv-build-commands has instability 0.97 with 1 dependents.
D5 · Coupling · Unstable project uv-build-frontend · ×1
  • Unstable project uv-build-frontend — uv-build-frontend has instability 0.86 with 3 dependents.
D5 · Coupling · Unstable project uv-cli · ×1
  • Unstable project uv-cli — uv-cli has instability 0.91 with 2 dependents.
D5 · Coupling · Unstable project uv-environment-operations · ×1
  • Unstable project uv-environment-operations — uv-environment-operations has instability 0.91 with 4 dependents.
D5 · Coupling · Unstable project uv-lock-operations · ×1
  • Unstable project uv-lock-operations — uv-lock-operations has instability 0.88 with 4 dependents.
D5 · Coupling · Unstable project uv-pip-commands · ×1
  • Unstable project uv-pip-commands — uv-pip-commands has instability 0.97 with 1 dependents.
D5 · Coupling · Unstable project uv-project-commands · ×1
  • Unstable project uv-project-commands — uv-project-commands has instability 0.98 with 1 dependents.
D5 · Coupling · Unstable project uv-project-edit · ×1
  • Unstable project uv-project-edit — uv-project-edit has instability 0.89 with 1 dependents.
D5 · Coupling · Unstable project uv-publish · ×1
  • Unstable project uv-publish — uv-publish has instability 0.93 with 1 dependents.
D5 · Coupling · Unstable project uv-publish-commands · ×1
  • Unstable project uv-publish-commands — uv-publish-commands has instability 0.93 with 1 dependents.
D5 · Coupling · Unstable project uv-python-commands · ×1
  • Unstable project uv-python-commands — uv-python-commands has instability 0.95 with 1 dependents.
D5 · Coupling · Unstable project uv-resolver-types · ×1
  • Unstable project uv-resolver-types — uv-resolver-types has instability 0.83 with 2 dependents.
D5 · Coupling · Unstable project uv-test · ×1
  • Unstable project uv-test — uv-test has instability 0.89 with 2 dependents.
D5 · Coupling · Unstable project uv-tool · ×1
  • Unstable project uv-tool — uv-tool has instability 0.90 with 2 dependents.
D5 · Coupling · Unstable project uv-tool-commands · ×1
  • Unstable project uv-tool-commands — uv-tool-commands has instability 0.98 with 1 dependents.
D5 · Coupling · Unstable project uv-workspace-commands · ×1
  • Unstable project uv-workspace-commands — uv-workspace-commands has instability 0.96 with 1 dependents.
D6 · Cohesion (LCOM4) · Low cohesion · ×1
  • Low cohesion: PubGrubPackage (LCOM4 9) crates/uv-resolver/src/pubgrub/package.rs:13 — PubGrubPackage's methods fall into 9 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 9 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.
S1 · Web-Security Posture · Weak hash algorithm · ×1
  • Weak hash algorithm crates/uv-extract/src/hash.rs:33 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Minor — 69 finding(s)
X4 · Structured logging · Interpolated log message defeats structured logging · ×40
  • Interpolated log message defeats structured logging scripts/check_cache_compat.py:36 — `info` at line 36 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging scripts/check_cache_compat.py:44 — `info` at line 44 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging scripts/check_cache_compat.py:134 — `info` at line 134 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging scripts/check_embedded_python.py:59 — `info` at line 59 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging scripts/check_embedded_python.py:70 — `info` at line 70 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging scripts/check_embedded_python.py:82 — `info` at line 82 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging scripts/check_embedded_python.py:91 — `info` at line 91 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging scripts/check_system_python.py:38 — `info` at line 38 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging scripts/check_system_python.py:45 — `info` at line 45 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging scripts/check_system_python.py:188 — `info` at line 188 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging scripts/create-python-mirror.py:85 — `warning` at line 85 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging scripts/create-python-mirror.py:89 — `error` at line 89 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging scripts/create-python-mirror.py:92 — `error` at line 92 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging scripts/create-python-mirror.py:152 — `debug` at line 152 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging scripts/create-python-mirror.py:158 — `debug` at line 158 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging scripts/create-python-mirror.py:172 — `debug` at line 172 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging scripts/create-python-mirror.py:281 — `info` at line 281 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging scripts/create-python-mirror.py:295 — `error` at line 295 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging crates/uv-workspace-commands/src/environment.rs:178 — `warn!` at line 178 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/uv-workspace-commands/src/metadata.rs:295 — `warn!` at line 295 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/uv-workspace/src/workspace.rs:95 — `debug!` at line 95 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: `debug!(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/uv-workspace/src/workspace.rs:498 — `debug!` at line 498 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: `debug!(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/uv-workspace/src/workspace.rs:553 — `debug!` at line 553 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: `debug!(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/uv-workspace/src/workspace.rs:1134 — `trace!` at line 1134 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: `trace!(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/uv-workspace/src/workspace.rs:1156 — `debug!` at line 1156 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: `debug!(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 · ×12
  • Duplicated predicate crates/uv-pip-commands/src/compile.rs:200 — `!extras.is_empty() && !requirements.iter().any(RequirementsSource::allows_extras)` appears character-identically in 2 files — crates/uv-pip-commands/src/compile.rs, crates/uv-resolve-operations/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/uv-pip-commands/src/compile.rs:879 — `arg == "--upgrade-package" || arg == "-P"` appears character-identically in 2 files — crates/uv-pip-commands/src/compile.rs, crates/uv-project-commands/src/export.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/uv-pip-commands/src/compile.rs:885 — `arg.starts_with("--upgrade-package=") || arg.starts_with("-P")` appears character-identically in 2 files — crates/uv-pip-commands/src/compile.rs, crates/uv-project-commands/src/export.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/uv-lock-operations/src/lock.rs:811 — `err.is_resolution() || err.is_no_build()` appears character-identically in 2 files — crates/uv-lock-operations/src/lock.rs, crates/uv-tool-commands/src/install.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/uv-requirements/src/sources.rs:68 — `extension.eq_ignore_ascii_case("py") || extension.eq_ignore_ascii_case("pyw")` appears character-identically in 2 files — crates/uv-requirements/src/sources.rs, crates/uv-scripts/src/discovery.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/uv-resolver/src/flat_index.rs:236 — `filename.variant().is_some() && !uv_preview::is_enabled(PreviewFeature::WheelVariants)` appears character-identically in 2 files — crates/uv-resolver/src/flat_index.rs, crates/uv-resolver/src/version_map.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/uv-platform/src/host.rs:137 — `line.is_empty() || line.starts_with('#')` appears character-identically in 2 files — crates/uv-platform/src/host.rs, crates/uv-python-discovery/src/version_files.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/uv-project-commands/src/audit.rs:71 — `matches!(output_format, AuditOutputFormat::Json) && !preview.is_enabled(PreviewFeature::JsonOutput)` appears character-identically in 2 files — crates/uv-project-commands/src/audit.rs, crates/uv-tool-commands/src/audit.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/uv-project-commands/src/audit.rs:165 — `matches!(target, LockTarget::Script(_)) && !target.lock_path().is_file()` appears character-identically in 2 files — crates/uv-project-commands/src/audit.rs, crates/uv-project-commands/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/uv-environment-operations/src/install_target.rs:826 — `root_kind == InstallableRootKind::Production && groups.prod()` appears character-identically in 2 files — crates/uv-environment-operations/src/install_target.rs, crates/uv-lock/src/lock/export/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/uv/src/commands/cache_clean.rs:105 — `summary.num_files > 0 || summary.num_dirs > 0` appears character-identically in 2 files — crates/uv/src/commands/cache_clean.rs, crates/uv/src/commands/cache_prune.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/uv-auth/src/credentials.rs:229 — `url.username().is_empty() && url.password().is_none()` appears character-identically in 2 files — crates/uv-auth/src/credentials.rs, crates/uv-distribution-types/src/index_url.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.
D34 · Knowledge Freshness · Orphaned file · ×6
  • Orphaned file crates/uv-cache-info/src/glob.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/uv-shell/src/runnable.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/uv-keyring/src/credential.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/uv-pypi-types/src/identifier.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/uv-client/src/rkyvutil.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/uv-keyring/src/error.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.
X7 · Silent fallback defaults · Silent fallback default on Err · ×2
  • Silent fallback default on Err crates/uv-cli/src/version.rs:98 — `uv_self_version` turns every `Err` into `0` — 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/uv-python-interpreter/src/interpreter.rs:321 — `is_externally_managed` turns every `Err` into `Some(ExternallyManaged::default())` — 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.
D16 · Bus Factor · Off-boarding risk · ×1
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 15 significant file(s) lose their only recent owner: crates/uv-client/src/httpcache/control.rs, crates/uv-extract/src/dirhash/seek.rs, crates/uv-fs/src/hardlink_macos.rs, crates/uv-pep508/src/marker/environment.rs, crates/uv-lock/src/lock/inputs.rs, crates/uv-extract/src/dirhash/archive.rs, crates/uv-distribution-types/src/build_requires.rs, crates/uv-resolver/src/resolver/fork_map.rs (+7 more). Pair on, review, or document these before any departure.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 2 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 (22 single-owned of 510 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; 510 of the 673 production source files in this repository met that bar). They are anonymized user #2 (2 file(s)), anonymized user #3 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: scripts/check-cargo-bans.py, crates/uv-pypi-types/src/project_status.rs, crates/uv-test/src/package_server.rs.
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 — 2 of 91 project(s) overshoot their size bounds, lowering Project Cohesion to 9.6/10. The most over is `crates/uv-cli` (13228 LoC, 165 module-visible types across 1 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) — 6 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/uv-cache-info/src/glob.rs, crates/uv-shell/src/runnable.rs, crates/uv-keyring/src/credential.rs, crates/uv-pypi-types/src/identifier.rs, crates/uv-client/src/rkyvutil.rs, crates/uv-keyring/src/error.rs (7 orphaned of 510 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; 510 of the 673 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
D9 · Test Distribution · Inverted test pyramid · ×1
  • Inverted test pyramid — Only 30 % of tests are unit tests (1701 unit vs 4020 integration, 0 BDD); a broader unit base gives faster, more localised feedback.
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.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 60/63 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `crates/uv-bin-install`, `crates/uv-build`, `crates/uv-trampoline-builder`.
Minor — 35 finding(s)
D12 · Dependency Hygiene · Outdated · ×35
  • Outdated: async-compression — `async-compression` is locked at 0.4.48 but 0.4.51 is the current stable release on crates.io, and it already satisfies the `"0.4.12"` requirement declared in crates/uv-extract/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p async-compression` and commit the updated REDACTED.
  • Outdated: axoupdater — `axoupdater` is locked at 0.10.2 but 0.10.3 is the current stable release on crates.io, and it already satisfies the `"0.10.0"` requirement declared in crates/uv/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p axoupdater` and commit the updated REDACTED.
  • Outdated: cargo-util — `cargo-util` is locked at 0.2.31 but 0.2.32 is the current stable release on crates.io, and it already satisfies the `"0.2.14"` requirement declared in crates/uv-git/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p cargo-util` and commit the updated REDACTED.
  • Outdated: crc32fast — `crc32fast` is locked at 1.5.2 but 1.5.3 is the current stable release on crates.io, and it already satisfies the `"1.5.0"` requirement declared in crates/uv-client/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p crc32fast` and commit the updated REDACTED.
  • Outdated: either — `either` is locked at 1.18.0 but 1.19.0 is the current stable release on crates.io, and it already satisfies the `"1.13.0"` requirement declared in crates/uv-command-support/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p either` and commit the updated REDACTED.
  • Outdated: fs-err — `fs-err` is locked at 3.3.1 but 3.3.2 is the current stable release on crates.io, and it already satisfies the `"3.2.2"` requirement declared in crates/uv-auth/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p fs-err` and commit the updated REDACTED.
  • Outdated: h2 — `h2` is locked at 0.4.15 but 0.4.20 is the current stable release on crates.io, and it already satisfies the `"0.4.7"` requirement declared in crates/uv-client/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p h2` and commit the updated REDACTED.
  • Outdated: indoc — `indoc` is locked at 2.0.7 but 2.0.8 is the current stable release on crates.io, and it already satisfies the `"2.0.5"` requirement declared in crates/uv-build-frontend/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p indoc` and commit the updated REDACTED.
  • Outdated: insta — `insta` is locked at 1.48.0 but 1.49.0 is the current stable release on crates.io, and it already satisfies the `"1.46.0"` requirement declared in crates/uv-test/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p insta` and commit the updated REDACTED.
  • Outdated: jiff — `jiff` is locked at 0.2.37 but 0.2.38 is the current stable release on crates.io, and it already satisfies the `"0.2.0"` requirement declared in crates/uv-audit/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p jiff` and commit the updated REDACTED.
  • Outdated: junction — `junction` is locked at 2.0.0 but 2.1.0 is the current stable release on crates.io, and it already satisfies the `"2.0.0"` requirement declared in crates/uv-fs/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p junction` and commit the updated REDACTED.
  • Outdated: libc — `libc` is locked at 0.2.189 but 0.2.191 is the current stable release on crates.io, and it already satisfies the `"0.2.0"` requirement declared in crates/uv-fs/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p libc` and commit the updated REDACTED.
  • Outdated: rand — `rand` is locked at 0.10.2 but 0.10.3 is the current stable release on crates.io, and it already satisfies the `"0.10.2"` requirement declared in crates/uv-fastid/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p rand` and commit the updated REDACTED.
  • Outdated: reqsign — `reqsign` is locked at 0.20.6 but 0.20.7 is the current stable release on crates.io, and it already satisfies the `"0.20.0"` requirement declared in crates/uv-auth/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p reqsign` and commit the updated REDACTED.
  • Outdated: reqwest — `reqwest` is locked at 0.13.4 but 0.13.5 is the current stable release on crates.io, and it already satisfies the `"0.13.1"` requirement declared in crates/uv-auth/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p reqwest` and commit the updated REDACTED.
  • Outdated: rustls — `rustls` is locked at 0.23.45 but 0.23.46 is the current stable release on crates.io, and it already satisfies the `"0.23.36"` requirement declared in crates/uv-client/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p rustls` and commit the updated REDACTED.
  • Outdated: rustls-native-certs — `rustls-native-certs` is locked at 0.8.4 but 0.8.5 is the current stable release on crates.io, and it already satisfies the `"0.8.3"` requirement declared in crates/uv-client/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p rustls-native-certs` and commit the updated REDACTED.
  • Outdated: schemars — `schemars` is locked at 1.2.2 but 1.2.3 is the current stable release on crates.io, and it already satisfies the `"1.0.0"` requirement declared in crates/uv-auth/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p schemars` and commit the updated REDACTED.
  • Outdated: secret-service — `secret-service` is locked at 5.1.0 but 5.2.0 is the current stable release on crates.io, and it already satisfies the `"5.0.0"` requirement declared in crates/uv-keyring/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p secret-service` and commit the updated REDACTED.
  • Outdated: serde_json — `serde_json` is locked at 1.0.151 but 1.0.154 is the current stable release on crates.io, and it already satisfies the `"1.0.128"` requirement declared in crates/uv-audit-operations/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p serde_json` and commit the updated REDACTED.
  • Outdated: sha2 — `sha2` is locked at 0.11.0 but 0.11.1 is the current stable release on crates.io, and it already satisfies the `"0.11.0"` requirement declared in crates/uv-build-backend/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p sha2` and commit the updated REDACTED.
  • Outdated: similar — `similar` is locked at 3.2.0 but 3.2.1 is the current stable release on crates.io, and it already satisfies the `"3.0.0"` requirement declared in crates/uv-test/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p similar` and commit the updated REDACTED.
  • Outdated: smallvec — `smallvec` is locked at 1.16.1 but 1.16.4 is the current stable release on crates.io, and it already satisfies the `"1.13.2"` requirement declared in crates/uv-distribution-filename/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p smallvec` and commit the updated REDACTED.
  • Outdated: spdx — `spdx` is locked at 0.13.5 but 0.13.6 is the current stable release on crates.io, and it already satisfies the `"0.13.0"` requirement declared in crates/uv-build-backend/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p spdx` and commit the updated REDACTED.
  • Outdated: syn — `syn` is locked at 3.0.6 but 3.0.9 is the current stable release on crates.io, and it already satisfies the `"3.0.0"` requirement declared in crates/uv-macros/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p syn` and commit the updated REDACTED.
  • + 10 more in this group — see findings.md.

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-43956b14cd34410cbf79de50bd640d30/history.json --exit-code 0 --source .10artifacts/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-43956b14cd34410cbf79de50bd640d30/tree.json --exit-code 0 --source .2artifacts/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 --exclude test/requirements/compiled .42artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .13artifacts/raw/osv-scanner.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .9artifacts/raw/trivy-config.json
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. semgrep could not parse 1 file(s) — `crates/uv-python-managed/fetch-download-metadata.py` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.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 Dependenciesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .0artifacts/raw/osv-scanner.json

Run 01a174cc-97cd-7d71-aec3-aa28deefe93f · 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