Public report of GitoxideLabs/gitoxide, published 14 November 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 14 November 2026, 16:02 UTC · Survey ID cd_7e08329b6164431da627eb87bfb62bab

GitoxideLabs/gitoxide

Measured 14 November 2026, 15:57 UTC, at code version ca90fe7

CAI score 71out of 100 Strong
CriticalWeakAdequateStrongExemplary
Up 3 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: 264,640 lines of product code in 71 projects, tests not counted · Estimated rebuild effort: about 4.0 person-years · Weakest lens: Maturity, 65

Findings by how serious they are

19 critical 1317 serious 31 minor

23 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
14 November 2026, 15:57 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that implements it, and today the Canine Code Analyzer is the only one that does.

The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

57of 57 dimensions measured by tools.
1326of 1367 findings point to an exact file and line, so you can open each one in the code. The other 41 concern the repository as a whole, such as missing documentation.
57dimensions across 9 lenses, read from 264,640 lines of product code in 71 projects.
Chapters

Executive summary

GitoxideLabs/gitoxide meets our standard for production, though the project keeps no record of its design decisions. It scores 71 out of 100 and is rated Strong, and six of its 19 critical findings are security problems in the build pipeline and in its servers and containers.

Maturity, at 65, is the weakest lens and counts most in the score. The best first step is recording design decisions, worth about 5 points. Fixing the 82 files that change often and are hard to read is another step, worth about 4 points. Raising Maturity to 70 would lift the score to about 73.

Two pipeline steps run downloads nobody checks. Two pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with, and twelve sets of files in separate parts keep changing together, which points to hidden dependencies. Checking each download against a checksum, pinning each tool to an exact version and making the hidden dependencies explicit would close these risks. The pipeline step that installs packages without pinning their versions needs the packages it installs pinned to exact versions. The unsafe setting in infrastructure or container files needs changing to safe values. The page or frame without a title needs a descriptive title.

The product code is 264,640 lines, about €590,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.
Maturity 65 · counts for 45%Accessibility 69 · counts for 25%Security and Compliance 75 · counts for 14%Code Health 85 · counts for 8%Production Readiness 89 · counts for 4%Architecture 94 · counts for 2%Performance 94 · counts for 1%Domain Modelling 100 · counts for 1%Event Sourcing 100 · counts for 0%

If Maturity rose from 65 to 70, the lowest score rated Strong, the score would rise from 71 to about 73.

Code composition: what the lines of code are
Product code 61%Tests 39%
New since the last survey: 379 findings

These 379 critical or serious findings weren't in the previous survey, on 27 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.

  • Cyclomatic Complexity · Encoding::for_label (cyclomatic 109) gix-encoding/src/encoding.rs
  • Cyclomatic Complexity · gix_date::parse::git::parse_textual_date (cyclomatic 46) gix-date/src/parse/git.rs
  • Cyclomatic Complexity · Pipeline::convert_to_diffable_inner (cyclomatic 46) gix-diff/src/blob/pipeline.rs
  • Cyclomatic Complexity · Converter::convert (cyclomatic 45) gix-encoding/src/convert.rs
  • Cyclomatic Complexity · gix_date::parse::relative::apply_operations (cyclomatic 42) gix-date/src/parse/relative.rs
  • Cyclomatic Complexity · Tracker::find_file_renames (cyclomatic 40) gix-diff/src/rewrites/tracker.rs
  • Cyclomatic Complexity · gix_encoding::legacy::bulk (cyclomatic 35) gix-encoding/src/legacy.rs
  • Cyclomatic Complexity · gix_encoding::unicode::decode (cyclomatic 31) gix-encoding/src/unicode.rs
  • Cyclomatic Complexity · gix_encoding::fast::run (cyclomatic 30) gix-encoding/src/fast.rs
  • Cyclomatic Complexity · gix_traverse::commit::simple::compute_hidden_frontier (cyclomatic 30) gix-traverse/src/commit/simple.rs
  • Cyclomatic Complexity · Context::from_bytes (cyclomatic 22) gix-credentials/src/protocol/context/serde.rs
  • Cyclomatic Complexity · gix_macros::unstable::item (cyclomatic 21) gix-macros/src/unstable.rs
  • Cyclomatic Complexity · gix_date::parse::relative::parse_operations (cyclomatic 17) gix-date/src/parse/relative.rs
  • Cyclomatic Complexity · gix_encoding::legacy::decode_iso2022_bulk (cyclomatic 17) gix-encoding/src/legacy.rs
  • Cyclomatic Complexity · Url::write_to (cyclomatic 17) gix-url/src/lib.rs
  • Cyclomatic Complexity · Url::write_canonical_form_to (cyclomatic 17) gix-url/src/lib.rs
  • Cyclomatic Complexity · Tracker::estimate_similarity (cyclomatic 16) gix-diff/src/rewrites/tracker.rs
  • Cyclomatic Complexity · LcsSearch::update_lcs (cyclomatic 16) gix-imara-diff/src/histogram/lcs.rs
  • Cognitive Complexity · Pipeline::convert_to_diffable_inner (cognitive 120) gix-diff/src/blob/pipeline.rs
  • Cognitive Complexity · Encoding::for_label (cognitive 108) gix-encoding/src/encoding.rs
  • Cognitive Complexity · Tracker::find_file_renames (cognitive 101) gix-diff/src/rewrites/tracker.rs
  • Cognitive Complexity · Converter::convert (cognitive 78) gix-encoding/src/convert.rs
  • Cognitive Complexity · gix_date::parse::git::parse_textual_date (cognitive 76) gix-date/src/parse/git.rs
  • Cognitive Complexity · gix_traverse::commit::simple::compute_hidden_frontier (cognitive 66) gix-traverse/src/commit/simple.rs
  • Cognitive Complexity · gix_encoding::fast::run (cognitive 57) gix-encoding/src/fast.rs
  • Cognitive Complexity · gix_encoding::legacy::bulk (cognitive 57) gix-encoding/src/legacy.rs
  • Cognitive Complexity · gix_date::parse::relative::apply_operations (cognitive 55) gix-date/src/parse/relative.rs
  • Cognitive Complexity · gix_encoding::unicode::decode (cognitive 41) gix-encoding/src/unicode.rs
  • Cognitive Complexity · gix_encoding::fast::utf8_unicode (cognitive 31) gix-encoding/src/fast.rs
  • Cognitive Complexity · gix_encoding::legacy::decode_iso2022_bulk (cognitive 30) gix-encoding/src/legacy.rs
  • Cognitive Complexity · Context::from_bytes (cognitive 26) gix-credentials/src/protocol/context/serde.rs
  • Cognitive Complexity · Context::write_to (cognitive 23) gix-credentials/src/protocol/context/serde.rs
  • Cognitive Complexity · gix_encoding::legacy::decode (cognitive 23) gix-encoding/src/legacy.rs
  • Cognitive Complexity · gix_encoding::legacy::decode_gb18030_bulk (cognitive 21) gix-encoding/src/legacy.rs
  • Cognitive Complexity · gix_date::parse::relative::parse_operations (cognitive 20) gix-date/src/parse/relative.rs
  • Cognitive Complexity · Tracker::estimate_similarity (cognitive 20) gix-diff/src/rewrites/tracker.rs
  • Cognitive Complexity · Transcoder::read (cognitive 20) gix-encoding/src/read.rs
  • Cognitive Complexity · gix_encoding::detect::function::detect (cognitive 19) gix-encoding/src/detect/function.rs
  • Cognitive Complexity · gix_macros::unstable::fields (cognitive 19) gix-macros/src/unstable.rs
  • Cognitive Complexity · Store::find_one_with_verified_input_filtered (cognitive 19) gix-ref/src/store/file/find.rs
  • Cognitive Complexity · gix_encoding::legacy::encode_iso2022_bulk (cognitive 18) gix-encoding/src/legacy.rs
  • Cognitive Complexity · Builder::build (cognitive 18) gix-traverse/src/commit/topo/init.rs
  • Cognitive Complexity · BuiltinSubmoduleStatus::status (cognitive 17) gix/src/status/index_worktree.rs
  • Cognitive Complexity · EncodeTable::encoded_scalar (cognitive 17) gix-encoding/src/legacy.rs
  • Cognitive Complexity · gix_encoding::legacy::encode_gb18030_bulk (cognitive 17) gix-encoding/src/legacy.rs
  • Cognitive Complexity · PlatformRef::builtin_merge (cognitive 17) gix-merge/src/blob/platform/merge.rs
  • Cognitive Complexity · gix_revision::ahead_behind_counts::function::ahead_behind_counts (cognitive 17) gix-revision/src/ahead_behind_counts.rs
  • Cognitive Complexity · gix_traverse::commit::topo::iter::collect_parent_ids (cognitive 17) gix-traverse/src/commit/topo/iter.rs
  • Cognitive Complexity · Tracker::exact_source (cognitive 16) gix-diff/src/rewrites/tracker.rs
  • Cognitive Complexity · gix_path::convert::relativize_with_prefix (cognitive 16) gix-path/src/convert.rs
  • God Classes · MethodTooLong: Pipeline.convert_to_diffable_inner gix-diff/src/blob/pipeline.rs
  • God Classes · FunctionTooLong: gix_date::parse::relative::apply_operations gix-date/src/parse/relative.rs
  • God Classes · MethodTooLong: Tracker.find_file_renames gix-diff/src/rewrites/tracker.rs
  • God Classes · FileTooLong: src/legacy.rs gix-encoding/src/legacy.rs
  • God Classes · MethodTooLong: Converter.convert gix-encoding/src/convert.rs
  • God Classes · FunctionTooLong: gix_date::parse::git::parse_textual_date gix-date/src/parse/git.rs
  • God Classes · TooManyFunctions: gix_path::env::windows gix-path/src/env/windows/mod.rs
  • God Classes · MethodTooLong: Cascade.invoke gix-credentials/src/helper/cascade.rs
  • God Classes · FileTooLong: blob/platform.rs gix-diff/src/blob/platform.rs
  • God Classes · FunctionTooLong: gix_traverse::commit::simple::compute_hidden_frontier gix-traverse/src/commit/simple.rs
  • God Classes · FileTooLong: open/repository.rs gix/src/open/repository.rs
  • God Classes · FileTooLong: commit/simple.rs gix-traverse/src/commit/simple.rs
  • Code Duplication · Edited copy of a member (108 corresponding lines) gix-config/src/format.rs
  • Code Duplication · Edited copy of a member (87 corresponding lines) gix-pack/src/bundle/write/mod.rs
  • Code Duplication · Edited copy of a member (69 corresponding lines) gix-traverse/src/commit/simple.rs
  • Code Duplication · Edited copy of a member (54 corresponding lines) gix-refspec/src/match_group/mod.rs
  • Code Duplication · Edited copy of a member (52 corresponding lines) gix-transport/src/client/capabilities.rs
  • Code Duplication · Edited copy of a member (47 corresponding lines) gix-parallel/src/in_parallel.rs
  • Code Duplication · Edited copy of a member (45 corresponding lines) gix-diff/src/tree/function.rs
  • Code Duplication · Edited copy of a member (74 corresponding lines) gitoxide-core/src/corpus/db.rs
  • Code Duplication · Edited copy of a member (24 corresponding lines) gix-packetline/src/async_io/read.rs
  • Code Duplication · Edited copy of a member (43 corresponding lines) gix-utils/src/btoi.rs
  • Code Duplication · Edited copy of a member (29 corresponding lines) gix-transport/src/client/async_io/request.rs
  • Code Duplication · Edited copy of a member (32 corresponding lines) gix-merge/src/blob/builtin_driver/text/utils.rs
  • Code Duplication · Edited copy of a member (22 corresponding lines) gix-encoding/src/fast.rs
  • Code Duplication · Edited copy of a member (28 corresponding lines) gix-tix/src/edit/rebase.rs
  • Code Duplication · Edited copy of a member (62 corresponding lines) gix-diff/src/tree_with_rewrites/change.rs
  • Code Duplication · Edited copy of a member (26 corresponding lines) gix-packetline/src/async_io/read.rs
  • Code Duplication · Edited copy of a member (22 corresponding lines) gix-index/src/fs.rs
  • Code Duplication · Edited copy of a member (18 corresponding lines) gix-object/src/tag/write.rs
  • Code Duplication · Edited copy of a member (24 corresponding lines) gix-tix/src/lib.rs
  • Code Duplication · Edited copy of a member (19 corresponding lines) gitoxide-core/src/commitgraph/verify.rs
  • Code Duplication · Edited copy of a member (10 corresponding lines) gix-object/src/tag/write.rs
  • Code Duplication · Edited copy of a member (39 corresponding lines) gix-transport/src/client/blocking_io/http/curl/mod.rs
  • Code Duplication · Edited copy of a member (25 corresponding lines) gix-diff/src/tree/function.rs
  • Code Duplication · Edited copy of a member (21 corresponding lines) gix-revwalk/src/graph/mod.rs
  • Code Duplication · Edited copy of a member (24 corresponding lines) gix-packetline/src/async_io/encode.rs
  • Code Duplication · Edited copy of a member (22 corresponding lines) gix-protocol/src/handshake/refs/async_io.rs
  • Code Duplication · Edited copy of a member (18 corresponding lines) gix-revwalk/src/graph/mod.rs
  • Code Duplication · Edited copy of a member (22 corresponding lines) gix/src/repository/identity.rs
  • Code Duplication · Edited copy of a member (18 corresponding lines) gix-tempfile/src/handle.rs
  • Code Duplication · Edited copy of a member (18 corresponding lines) gix-tix/src/lib.rs
  • Code Duplication · Edited copy of a member (18 corresponding lines) gix-pack/src/data/entry/decode.rs
  • Code Duplication · Edited copy of a member (25 corresponding lines) gix-transport/src/client/git/async_io.rs
  • Code Duplication · Edited copy of a member (22 corresponding lines) gix-packetline/src/async_io/read.rs
  • Code Duplication · Edited copy of a member (19 corresponding lines) gix-tix/src/lib.rs
  • Code Duplication · Edited copy of a member (15 corresponding lines) gix-object/src/traits/find.rs
  • Code Duplication · Edited copy of a member (17 corresponding lines) gix-tix/src/edit/replay_refs/mod.rs
  • Code Duplication · Edited copy of a member (18 corresponding lines) gix-diff/src/index/function.rs
  • Code Duplication · Edited copy of a member (12 corresponding lines) gix-pack/src/cache/lru.rs

We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.

Fixed since the last survey: 65 findings

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

  • Cyclomatic Complexity · Pipeline::convert_to_diffable (cyclomatic 38) gix-diff/src/blob/pipeline.rs
  • Cyclomatic Complexity · gix_diff::rewrites::tracker::find_match (cyclomatic 20) gix-diff/src/rewrites/tracker.rs
  • Cognitive Complexity · Pipeline::convert_to_diffable (cognitive 102) gix-diff/src/blob/pipeline.rs
  • Cognitive Complexity · gix_diff::rewrites::tracker::find_match (cognitive 40) gix-diff/src/rewrites/tracker.rs
  • Cognitive Complexity · Tracker::emit (cognitive 21) gix-diff/src/rewrites/tracker.rs
  • Cognitive Complexity · Tracker::match_pairs (cognitive 21) gix-diff/src/rewrites/tracker.rs
  • Cognitive Complexity · Store::find_one_with_verified_input (cognitive 19) gix-ref/src/store/file/find.rs
  • Cognitive Complexity · Handle::contains_with_refresh_mode (cognitive 17) gix-odb/src/store_impls/dynamic/find.rs
  • God Classes · MethodTooLong: Pipeline.convert_to_diffable gix-diff/src/blob/pipeline.rs
  • God Classes · FileTooLong: rewrites/tracker.rs gix-diff/src/rewrites/tracker.rs
  • Code Duplication · Duplicated block (29 lines × 2) gix-odb/src/store_impls/dynamic/find.rs
  • Code Duplication · Duplicated block (22–27 lines × 2) gix-merge/src/tree/function/resolve.rs
  • Code Duplication · Duplicated block (22–23 lines × 2) gix-merge/src/tree/function/resolve.rs
  • Code Duplication · Duplicated block (17 lines × 2) gix-date/src/parse/git.rs
  • Code Duplication · Duplicated block (14 lines × 2) gix-object/src/commit/ref_iter.rs
  • Code Duplication · Duplicated block (13 lines × 2) gix-transport/src/client/capabilities.rs
  • Code Duplication · Duplicated block (12 lines × 2) gix-pathspec/src/search/matching.rs
  • Code Duplication · Duplicated block (11 lines × 2) gix-packetline/src/async_io/read.rs
  • Code Duplication · Duplicated block (9–10 lines × 2) gix-config/src/file/util.rs
  • Code Duplication · Duplicated block (9–10 lines × 2) gix-date/src/parse/git.rs
  • Code Duplication · Duplicated block (9 lines × 2) gix-tix/src/app.rs
  • Code Duplication · Duplicated block (9 lines × 2) gix-tix/src/lib.rs
  • Code Duplication · Duplicated block (9 lines × 2) src/plumbing/options/mod.rs
  • Code Duplication · Duplicated block (8 lines × 2) gix-diff/src/rewrites/tracker.rs
  • Code Duplication · Duplicated block (7 lines × 3) gix-blame/src/file/function.rs
  • Code Duplication · Duplicated block (7 lines × 2) gix-pack/src/index/traverse/with_index.rs
  • Code Duplication · Duplicated block (6 lines × 2) gix-parallel/src/in_parallel.rs
  • Code Duplication · Duplicated block (6 lines × 2) gix-tix/src/lib.rs
  • Code Duplication · Duplicated block (5 lines × 2) gix-tix/src/app.rs
  • Code Duplication · Duplicated block (6 lines × 2) gix-error/src/error.rs
  • Code Duplication · Duplicated block (6 lines × 2) gix-transport/src/client/blocking_io/http/curl/mod.rs
  • Code Duplication · Duplicated block (9 lines × 2) gix-tix/src/lib.rs
  • Code Duplication · Duplicated block (8 lines × 2) gix-imara-diff/src/unified_diff.rs
  • Code Duplication · Duplicated block (7 lines × 2) gix-tix/src/edit/rebase.rs
  • Code Duplication · Duplicated block (5 lines × 2) gix-tix/src/command.rs
  • Code Duplication · Duplicated block (5 lines × 2) gix-tix/src/history.rs
  • Code Duplication · Duplicated block (5 lines × 2) gix-refspec/src/match_group/mod.rs
  • Churn × Complexity Hotspots · Hotspot: gix-tix/src/edit/create.rs gix-tix/src/edit/create.rs
  • Churn × Complexity Hotspots · Hotspot: gix-config-value/src/color.rs gix-config-value/src/color.rs
  • Churn × Complexity Hotspots · Hotspot: gix-index/src/extension/tree/verify.rs gix-index/src/extension/tree/verify.rs
  • Churn × Complexity Hotspots · Hotspot: gix-odb/src/store_impls/dynamic/prefix.rs gix-odb/src/store_impls/dynamic/prefix.rs
  • Churn × Complexity Hotspots · Hotspot: gix-protocol/src/handshake/refs/shared.rs gix-protocol/src/handshake/refs/shared.rs
  • Churn × Complexity Hotspots · Hotspot: gix-index/src/extension/link.rs gix-index/src/extension/link.rs
  • Churn × Complexity Hotspots · Hotspot: gix-commitgraph/src/file/commit.rs gix-commitgraph/src/file/commit.rs
  • Churn × Complexity Hotspots · Hotspot: gitoxide-core/src/repository/clone.rs gitoxide-core/src/repository/clone.rs
  • Churn × Complexity Hotspots · Repeated repair: gix-validate/src/reference.rs gix-validate/src/reference.rs
  • Churn × Complexity Hotspots · Repeated repair: gix-path/src/env/auxiliary.rs gix-path/src/env/auxiliary.rs
  • Churn × Complexity Hotspots · Repeated repair: gix-filter/src/driver/mod.rs gix-filter/src/driver/mod.rs
  • Explicit Debt · TodoComment src/plumbing/main.rs
  • Explicit Debt · TodoComment gix-status/src/index_as_worktree_with_renames/mod.rs
  • Explicit Debt · TodoComment gix-merge/src/blob/platform/merge.rs
  • Explicit Debt · TodoComment gix-merge/src/blob/platform/merge.rs
  • Explicit Debt · TodoComment gix-diff/src/rewrites/tracker.rs
  • Explicit Debt · TodoComment gix-diff/src/rewrites/tracker.rs
  • Explicit Debt · TodoComment gix-date/src/parse/git.rs
  • Static Analysis (SAST) · High: watchdog-mutable-job-container-image REDACTED
  • Static Analysis (SAST) · High: REDACTED REDACTED
  • Static Analysis (SAST) · High: REDACTED REDACTED
  • Dependency Vulnerabilities · Medium advisory (unmaintained): RUSTSEC-2026-0173 REDACTED
  • Dependency Vulnerabilities · Medium advisory (unsound): RUSTSEC-2026-0221 REDACTED
  • Dependency Vulnerabilities · Medium advisory (unsound): RUSTSEC-2026-0253 REDACTED
  • Dependency Vulnerabilities · Medium advisory (unsound): RUSTSEC-2026-0386 REDACTED
  • Dependency Vulnerabilities · Medium vulnerability: RUSTSEC-2026-0338 REDACTED
  • Change Coupling · Change-coupling hub: body.rs → decode.rs, parse.rs, ref_iter.rs gix-object/src/commit/message/body.rs
  • A11y enforcement · Accessibility enforcement below the top rung
Rebuild cost: about €590,000 · Estimate
Cost to rebuild€200,000 to €980,000, for 3,258 to 10,335 hours of work, about 4.0 person-years for 2 to 8 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×1.0 at a score of 71. 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: 264,640 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.

Top priorities

The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.

1
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with Cargo.toml.
Raises the score by about 5 points · Low effort · ADR Quality
2
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 5 points · Medium effort · Architecture documentation
3
Resolve the 82 Hotspot finding(s) in Churn × Complexity Hotspots — start with mod.rs (9), function.rs (6), remote.rs (3).
Raises the score by about 4 points · High effort · Churn × Complexity Hotspots

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.

Files that change often carry extra risk · Combined risk
21 files are changed often and are hard to read, which makes them the likeliest places for a mistake. They also have under half their code tested, or were written almost entirely by one person, so a mistake there is less likely to be caught, or only one person knows the code well enough to avoid it. A change to these files therefore carries more risk than the overall score suggests.
Based on: Churn × Complexity Hotspots (65 files) · Code Coverage (83 files under half tested) · The files: lib.rs, resolve.rs and main.rs
What to do: Add tests to these files and have a second person review every change to them, starting with lib.rs, resolve.rs and main.rs.
If you do one thing first · First action
Resolve the 1 No ADRs found finding(s) in ADR Quality. Of all the actions in this report, it raises the score most for the work it takes: about 5 points for low effort, because it clears the 1 ADR Quality findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.2 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 5% to 10% on every change. The history of the code shows how much it changes: about 429,766 lines over the last 90 days, which is about 1,742,940 lines a year. At that pace, the extra work comes to an estimated 198.8 to 1192.9 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.

arch gix gix gix-date gix-date gix->gix-date gix-diff gix-diff gix->gix-diff gix-error gix-error gix->gix-error gix-filter gix-filter gix->gix-filter gix-fs gix-fs gix->gix-fs gix-hash gix-hash gix->gix-hash gix-index gix-index gix->gix-index gix-merge gix-merge gix->gix-merge gix-object gix-object gix->gix-object gix-odb gix-odb gix->gix-odb gix-pack gix-pack gix->gix-pack gix-path gix-path gix->gix-path gix-protocol gix-protocol gix->gix-protocol gix-ref gix-ref gix->gix-ref gix-status gix-status gix->gix-status gix-trace gix-trace gix->gix-trace gix-utils gix-utils gix->gix-utils gix-worktree gix-worktree gix->gix-worktree gix-date->gix-error gix-diff->gix-error gix-diff->gix-filter gix-diff->gix-fs gix-diff->gix-hash gix-diff->gix-index gix-diff->gix-object gix-diff->gix-path gix-diff->gix-trace gix-diff->gix-worktree gix-filter->gix-error gix-filter->gix-hash gix-filter->gix-object gix-filter->gix-path gix-filter->gix-trace gix-filter->gix-utils gix-fs->gix-error gix-fs->gix-path gix-fs->gix-utils gix-hash->gix-error gix-hash->gix-utils gix-index->gix-error gix-index->gix-fs gix-index->gix-hash gix-index->gix-object gix-index->gix-trace gix-index->gix-utils gix-merge->gix-diff gix-merge->gix-error gix-merge->gix-filter gix-merge->gix-fs gix-merge->gix-hash gix-merge->gix-index gix-merge->gix-object gix-merge->gix-path gix-merge->gix-trace gix-merge->gix-worktree gix-object->gix-date gix-object->gix-error gix-object->gix-hash gix-object->gix-path gix-object->gix-utils gix-odb->gix-error gix-odb->gix-fs gix-odb->gix-hash gix-odb->gix-object gix-odb->gix-pack gix-odb->gix-path gix-odb->gix-trace gix-odb->gix-utils gix-pack->gix-diff gix-pack->gix-error gix-pack->gix-hash gix-pack->gix-object gix-pack->gix-path gix-pack->gix-trace gix-pack->gix-utils gix-path->gix-error gix-path->gix-trace gix-protocol->gix-date gix-protocol->gix-error gix-protocol->gix-hash gix-protocol->gix-object gix-protocol->gix-ref gix-protocol->gix-trace gix-protocol->gix-utils gix-ref->gix-error gix-ref->gix-fs gix-ref->gix-hash gix-ref->gix-object gix-ref->gix-path gix-ref->gix-utils gix-status->gix-diff gix-status->gix-error gix-status->gix-filter gix-status->gix-fs gix-status->gix-hash gix-status->gix-index gix-status->gix-object gix-status->gix-path gix-status->gix-trace gix-status->gix-utils gix-status->gix-worktree gix-testtools gix-testtools gix-testtools->gix-error gix-testtools->gix-hash gix-testtools->gix-index gix-testtools->gix-object gix-testtools->gix-odb gix-testtools->gix-path gix-testtools->gix-ref gix-testtools->gix-worktree gix-trace->gix-error gix-utils->gix-error gix-worktree->gix-error gix-worktree->gix-fs gix-worktree->gix-hash gix-worktree->gix-index gix-worktree->gix-object gix-worktree->gix-path gix-worktree->gix-trace gix-worktree->gix-utils __more__ +51 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.

992 modules, with 2958 dependencies between them. 39 loops run through 191 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 952 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 gitoxide_core.index.information2 gix_bitmap.ewah3 gix_glob.wildmatch.function4 gix_pack.data.output.entry5 gix_trace.forest6 gix_utils.cache.impl_7 gitoxide_core8 gix.config.tree.keys9 gix_attributes.search10 gix_command.parse11 gix_config_value.types12 gix_error13 gix_hash.oid14 gix_attributes15 gix_error.concrete.metadata16 gix_hash17 gix_object.traits.find18 gix_fs19 gix_hash.object_id20 gix.create21 gix_commitgraph22 gix_index23 gix_object24 gix_pack.data25 gix_ref26 gix_config.file27 gix_object.tree28 gix_odb29 gix.object.tree30 gix_diff.blob31 gix_merge.blob32 gix.dirwalk.iter33 gix.config.tree.sections34 gix.types35 gix.config.tree.keys.validate36 gix.config37 gix_tix.history38 gix_tix.app39 gix_tix.edit.rebase40 gix_tix
1 gitoxide_core.index.information
2 gix_bitmap.ewah
3 gix_glob.wildmatch.function
4 gix_pack.data.output.entry
5 gix_trace.forest
6 gix_utils.cache.impl_
7 gitoxide_core2
8 gix.config.tree.keys211
9 gix_attributes.search1112
10 gix_command.parse1
11 gix_config_value.types3
12 gix_error2
13 gix_hash.oid121
14 gix_attributes412
15 gix_error.concrete.metadata1
16 gix_hash33
17 gix_object.traits.find31
18 gix_fs1
19 gix_hash.object_id112
20 gix.create212
21 gix_commitgraph1231
22 gix_index331213
23 gix_object11142
24 gix_pack.data2211
25 gix_ref532
26 gix_config.file41
27 gix_object.tree22122
28 gix_odb14121231
29 gix.object.tree3122145
30 gix_diff.blob4112112
31 gix_merge.blob31112
32 gix.dirwalk.iter1321
33 gix.config.tree.sections4111133
34 gix.types11066124123891444124
35 gix.config.tree.keys.validate16161411
36 gix.config544413144
37 gix_tix.history373217
38 gix_tix.app2191011
39 gix_tix.edit.rebase2813156212
40 gix_tix67212139110162
Uses a module listed above itPart of a loopThe module itself
1 gitoxide_core.index.information2 gix_bitmap.ewah3 gix_glob.wildmatch.function4 gix_pack.data.output.entry5 gix_trace.forest6 gix_utils.cache.impl_7 gitoxide_core8 gix.config.tree.keys9 gix_attributes.search10 gix_command.parse11 gix_config_value.types12 gix_error13 gix_hash.oid14 gix_attributes15 gix_error.concrete.metadata16 gix_hash17 gix_object.traits.find18 gix_fs19 gix_hash.object_id20 gix.create21 gix_commitgraph22 gix_index23 gix_object24 gix_pack.data25 gix_ref26 gix_config.file27 gix_object.tree28 gix_odb29 gix.object.tree30 gix_diff.blob31 gix_merge.blob32 gix.dirwalk.iter33 gix.config.tree.sections34 gix.types35 gix.config.tree.keys.validate36 gix.config37 gix_tix.history38 gix_tix.app39 gix_tix.edit.rebase40 gix_tixgitoxide_core.index.information1gix_bitmap.ewah2gix_glob.wildmatch.function3gix_pack.data.output.entry4gix_trace.forest5gix_utils.cache.impl_6gitoxide_core7gix.config.tree.keys8gix_attributes.search9gix_command.parse10gix_config_value.types11gix_error12gix_hash.oid13gix_attributes14gix_error.concrete.metadata15gix_hash16gix_object.traits.find17gix_fs18gix_hash.object_id19gix.create20gix_commitgraph21gix_index22gix_object23gix_pack.data24gix_ref25gix_config.file26gix_object.tree27gix_odb28gix.object.tree29gix_diff.blob30gix_merge.blob31gix.dirwalk.iter32gix.config.tree.sections33gix.types34gix.config.tree.keys.validate35gix.config36gix_tix.history37gix_tix.app38gix_tix.edit.rebase39gix_tix4022111112132121412133311112212123133121311142221153241221221412123131221454112112311121321411113311066124123891444124161614115444131443732172191011281315621267212139110162+952 more modules (most-connected shown)

At a glance — Code Health · 85% · Adequate · gated by D2 ·

At a glance — Architecture · 94% · Exemplary ·

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

At a glance — Readiness · 89% · Strong ·

At a glance — Security · 75% · Adequate · gated by D36 ·

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

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

At a glance — Accessibility · 69% · Adequate ·

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 — Injection6High / Critical
A03:2025 — Software Supply Chain Failures6Medium
A02:2025 — Security Misconfiguration6High / Critical

Roadmap

Top priorities: Resolve the 1 No ADRs found finding(s) in ADR Quality — start with Cargo.toml; Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them; Resolve the 82 Hotspot finding(s) in Churn × Complexity Hotspots — start with mod.rs (9), function.rs (6), remote.rs (3).

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 — start with Cargo.toml.+5.0 ptsLowADR Quality
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.+4.7 ptsMediumArchitecture documentation
Resolve the 82 Hotspot finding(s) in Churn × Complexity Hotspots — start with mod.rs (9), function.rs (6), remote.rs (3).+3.5 ptsHighChurn × Complexity Hotspots
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.+2.5 ptsMediumPage structure
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.+2.5 ptsMediumVisual & motion safety
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing.+0.4 ptsLowSupply-chain Provenance & Signing
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing.+0.4 ptsLowSupply-chain Provenance & Signing
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing.+0.4 ptsLowSupply-chain Provenance & Signing

File quality

Per-file score 0–10 — a quality signature. Of 477 files carrying findings, judged against the Production bar: 0% slop · 51% mixed · 49% near-clean.

FileScoreBandWorst signal
REDACTED4.1MixedIaC & Container Security: High IaC: REDACTED
REDACTED5.3MixedStatic Analysis (SAST): Medium: REDACTED
gix-tix/src/lib.rs5.5MixedCyclomatic Complexity: gix_tix::event_loop (cyclomatic 570)
gix-object/src/commit/message/body.rs5.5MixedChange Coupling: Boundary-crossing change coupling: body.rs ↔ parse.rs
src/plumbing/main.rs5.6MixedCyclomatic Complexity: gitoxide::plumbing::main::main (cyclomatic 123)
gitoxide-core/src/repository/index/entries.rs5.7MixedCognitive Complexity: gitoxide_core::repository::index::entries::function::print_entries (cognitive 38)
gitoxide-core/src/repository/fetch.rs5.7MixedCognitive Complexity: gitoxide_core::repository::fetch::function::print_updates (cognitive 31)
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
gitoxide-core/src/query/engine/update.rs5.9MixedCyclomatic Complexity: gitoxide_core::query::engine::update::update (cyclomatic 47)
gix-credentials/src/helper/cascade.rs5.9MixedCyclomatic Complexity: Cascade::invoke (cyclomatic 32)
gitoxide-core/src/index/checkout.rs5.9MixedCyclomatic Complexity: gitoxide_core::index::checkout::checkout_exclusive (cyclomatic 16)
gitoxide-core/src/commitgraph/verify.rs5.9MixedCode Duplication: Edited copy of a member (19 corresponding lines)
gitoxide-core/src/repository/merge/commit.rs5.9MixedCode Duplication: Edited copy of a member (11 corresponding lines)
gix/src/open/repository.rs6.0MixedExplicit Debt: TodoComment
gix-diff/src/blob/pipeline.rs6.0MixedExplicit Debt: TodoComment
gix-blame/src/file/function.rs6.0MixedExplicit Debt: TodoComment
gix-odb/src/store_impls/dynamic/load_index.rs6.0MixedExplicit Debt: TodoComment
gix/src/clone/fetch/mod.rs6.0MixedExplicit Debt: TodoComment
gix-dir/src/walk/classify.rs6.0MixedExplicit Debt: TodoComment

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

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

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

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

Could not be resolved — 23

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 57 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.

Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.

What we checked — 57 dimensions across the health lenses
D1D2D3D4D5D6D8D12D13D14D15D17D19D20D26D28D29D30D31D34D35D36D37D43D44AC1AC2AC3AC6AX10AX3AX4AX8AX9DM4DM5ES1ES2M1M2M3M4P1P10P2P3P4P6PF1PF3X1X14X21X28X29X30X4

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, 1326 of 1367 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 or a scanner, 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
Canine Code Analyzer 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

Every finding is locatable in findings.md. Run 01a1dac7-1fc8-7af8-bd23-302d8ecf2c27.

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.

  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.rs) and this repository declares a Cargo test suite (repository root, 662 test files), but it was not re-run: its build outgrew the 6 GB scratch ceiling (6.013 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.
  • D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository — bus factor is not applicable (238 contributor(s) across 17382 commit(s) sampled, automation and bot accounts excluded). One of them holds 81% of the history; the other 237 hold 0.1% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via REDACTED (REDACTED). docker build failed (exit 1) — 6 | >>> RUN apk upgrade --update-cache --available \ 7 | >>> && apk add --no-cache --virtual .runtime-gitoxide libressl libressl3.8-libcrypto 8 | -------------------- ERROR: failed to solve: process "/bin/sh -c apk upgrade --update-cache --available && apk add --no-cache --virtual .runtime-gitoxide libressl libressl3.8-libcrypto" did not complete successfully: exit code: 2; runtime evidence skipped.
  • ED5 Idempotency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check decides whether a handler's mutation is safe to re-run by recognising its persistence writes (a database save, a repository write, an event publish) and its guards. Those markers are .NET member names, so in this repository's language a write such as `repository.save(order)` is not recognised and a same-named call on an unrelated library type could be. The handlers were found; their idempotency was neither confirmed nor ruled out.
  • GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and no C#, F#, JavaScript/TypeScript, Dart, Ruby or Scala was found, and this repository's Rust, c is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and no C#, JavaScript/TypeScript, Java, Dart, Ruby or Scala was found, and this repository's Rust, c is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X13 Undrained process stream — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X17 Uncapped recursion over a caller-supplied document — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X18 Disposal-pattern correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X19 Unrestored process-global state — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Python, Dart, Ruby, Scala or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X22 Contradicted release guard — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, TypeScript/JavaScript, Python, Dart, Ruby, Scala, Kotlin and PHP source only, and no C# was loaded, and this repository's C, Rust is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X23 Unguarded diagnostic materialisation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, F#, Python, Dart, Ruby, Scala, Kotlin and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, F#, Python, Dart, Ruby, Scala, Kotlin or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Scala, Ruby and Python source only, and no C# was loaded and no JavaScript/TypeScript, Java, Scala, Ruby or Python was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X25 Inert configuration knob — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Erlang, Python, Dart and Ruby source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Erlang, Python, Dart or Ruby was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X26 Unsynchronised callback handoff — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, Kotlin, Scala, Go, Swift, Python and Ruby source only, and no C# was loaded, no Java, Kotlin, Scala, Go, Swift, Python or Ruby was found, and this repository's C 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.
  • X3 Exception handling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and PHP, Java, Kotlin, Python, Ruby, Scala, Dart, Swift, Erlang, Go and JavaScript/TypeScript source only, and no C# was loaded and no PHP, Java, Kotlin, Python, Ruby, Scala, Dart, Swift, Erlang, Go, JavaScript or TypeScript was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X5 Nullable reference types — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax and MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, and Kotlin source only, and no C# was loaded, no TypeScript was found, and this repository's C, 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: 2 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

We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.

Per-dimension blind spots

For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D8 Code Coverage: Coverage is measured by building and running the test suite inside our isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
  • 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.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • 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.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • 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.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity4.2 / 10Weak✓ 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 4.2 / 10 · rule-coverage 100% · ceiling Prevented

156 function(s) exceeded the cyclomatic complexity threshold of 15; the worst was gix_tix::event_loop at 570. A further 12 function(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 Encoding::name at 55 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: gix-tix/src/enrich.rs (gix_tix::enrich::marker 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.

gix_tix::event_loop (cyclomatic 570) · ×39gix-tix/src/lib.rs:1389
gitoxide_core::repository::clean::function::clean (cyclomatic 55) · ×12gitoxide-core/src/repository/clean.rs:42
gix_date::parse::git::parse_textual_date (cyclomatic 46) · ×4gix-date/src/parse/git.rs:88
gix_encoding::legacy::bulk (cyclomatic 35) · ×4gix-encoding/src/legacy.rs:553
gix::remote::connection::fetch::update_refs::update (cyclomatic 31) · ×4gix/src/remote/connection/fetch/update_refs/mod.rs:62

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

What to do

  1. Bring the 2 bodies over 240 down to 240 or less in Cyclomatic Complexity — start with gix_tix::event_loop (cyclomatic 570), gix_merge::tree::function::resolve::tree (cyclomatic 254). — 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 2 together lifts Cyclomatic Complexity from 4.2 to about 5.1/10, projected with the scoring formula itself and assuming each lands exactly at 240; a cleaner split scores higher.

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

308 function(s) exceeded the cognitive complexity threshold of 15; the worst was gix_tix::event_loop at 1340.

gix_tix::event_loop (cognitive 1340) · ×65gix-tix/src/lib.rs:1389
gitoxide_core::query::engine::update::update (cognitive 118) · ×19gitoxide-core/src/query/engine/update.rs:21
gix::remote::connection::fetch::update_refs::update (cognitive 92) · ×10gix/src/remote/connection/fetch/update_refs/mod.rs:62
gix_encoding::fast::run (cognitive 57) · ×10gix-encoding/src/fast.rs:5
Store::consolidate_with_disk_state (cognitive 85) · ×9gix-odb/src/store_impls/dynamic/load_index.rs:193

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

What to do

  1. Bring the 4 bodies over 240 down to 240 or less in Cognitive Complexity — start with gix_tix::event_loop (cognitive 1340), gix_merge::tree::function::resolve::tree (cognitive 952), gix_glob::wildmatch::function::match_recursive (cognitive 335). — 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 4 together lifts Cognitive Complexity from 2.0 to about 3.4/10, projected with the scoring formula itself and assuming each lands exactly at 240; a cleaner split scores higher.

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

D3 · God Classes8.6 / 10Strong✓ Tool-verified

What it measures: Over-large classes that try to do too much ("god classes").

Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.

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

119 over-large unit(s) detected — types, modules or files that carry too much.

FunctionTooLong: gix_tix::event_loop · ×45gix-tix/src/lib.rs:1389
MethodTooLong: App.update · ×32gix-tix/src/app.rs:1950
FileTooLong: src/lib.rs · ×24gix-tix/src/lib.rs
TooManyMethods: App · ×13gix-tix/src/app.rs:579
ClassTooLong: App · ×3gix-tix/src/app.rs:579

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

What to do

  1. Resolve the 45 FunctionTooLong finding(s) in God Classes — start with mod.rs (7), rebase.rs (4), todo.rs (4). — One of this dimension's main actionable groups (45 warning-level).
  2. Resolve the 32 MethodTooLong finding(s) in God Classes — start with mod.rs (3), app.rs (2), pipeline.rs (2). — One of this dimension's main actionable groups (32 warning-level).
  3. Resolve the 24 FileTooLong finding(s) in God Classes — start with mod.rs (4), lib.rs, rebase.rs. — One of this dimension's main actionable groups (24 warning-level).

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

D4 · Code Duplication8.9 / 10Strong✓ Tool-verified

What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.

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

172 duplicated block group(s) detected. 2.9 % of the production lines (7,600 of 264,640) are in a reported copy. A further 126 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 4 of the 298 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.

Duplicated block (9 lines × 2) · ×20gitoxide-core/src/repository/fetch.rs:235
Duplicated block (7 lines × 2) · ×18gitoxide-core/src/repository/diff.rs:206
Duplicated block (5 lines × 2) · ×18gix-date/src/parse/git.rs:354
Duplicated block (6 lines × 2) · ×16gix-tix/src/edit/auto_merge/mod.rs:1319
Edited copy of a member (10 corresponding lines) · ×10gix-object/src/tag/write.rs:38

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

What to do

  1. Resolve the 20 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with lib.rs (5), async_io.rs (3), fetch.rs. — One of this dimension's main actionable groups (20 warning-level).
  2. Resolve the 18 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with lib.rs (2), diff.rs, commit.rs. — One of this dimension's main actionable groups (18 warning-level).
  3. Resolve the 18 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with mod.rs (2), write.rs (2), git.rs. — One of this dimension's main actionable groups (18 warning-level).

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

D5 · Coupling7.0 / 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 7.0 / 10 · rule-coverage 100% · ceiling Prevented

71 production modules (Cargo), 0 dependency cycle(s), 12 unstable depended-on module(s). Read from the build's own module declarations; 12 module(s) off the main sequence, with abstractness counted on 62 of the 71 (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: gix-path · ×12
Unstable project gitoxide-core
Unstable project gix
Unstable project gix-blame
Unstable project gix-dir

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

What to do

  1. Resolve the 12 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (12 warning-level).
  2. Resolve the 1 Unstable project gitoxide-core finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Unstable project gix finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).

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

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

What it measures: Whether a class's methods are focused on a single responsibility.

Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.

Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.

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

11 of 398 classes have LCOM4 above 3.

Low cohesion: Reference (LCOM4 28) · ×11gix-ref/src/raw.rs:8

What to do

  1. Resolve the 11 Low cohesion finding(s) in Cohesion (LCOM4) — start with lib.rs (7), raw.rs, keys.rs. — One of this dimension's main actionable groups (11 warning-level).

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

D8 · Code Coverage9.9 / 10Stronggated by 121 serious findings✓ Tool-verified

What it measures: How much of the code is actually exercised by tests.

Method: Coverage from the analyzer's own run of the suite, computed per-file with structured exclusions for generated, trivial, and glue code. A coverage report found in the repository is never read. When the suite can't be built/run in-image, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.

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

Line coverage 79.2% — 121 file(s) below 50%. Measured from the Rust suite (repository root: `cargo test --workspace` instrumented over 893 production file(s), 165 test binaries and 2 doc-test binaries).

Low coverage: gitoxide-core/src/commitgraph/verify.rs · ×121gitoxide-core/src/commitgraph/verify.rs:1

What to do

  1. Resolve the 121 Low coverage finding(s) in Code Coverage — start with mod.rs (14), lib.rs (8), verify.rs (5). — One of this dimension's main actionable groups (121 warning-level).

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

D12 · Dependency Hygiene9.6 9.5 / 10Exemplary✓ Tool-verified

What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.

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

9 outdated, 0 yanked direct Cargo dependencies. 98 of 99 direct crates were graded against crates.io (0 not published there, 1 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: arc-swap · ×9

✓ On the Gold path — maintain.

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

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots7.1 / 10Strong✓ 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 7.1 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: gix-tix/src/lib.rs (238×570=135660); gix-tix/src/ui.rs (169×170=28730); gix-tix/src/app.rs (149×180=26820) Repeated repair below the complexity floor: gix-path/src/env/mod.rs (23 of 27 changes were fixes); gix-path/src/env/git/mod.rs (18 of 22 changes were fixes); gix-tix/src/edit/review.rs (17 of 32 changes were fixes)

Hotspot: gix-tix/src/lib.rs · ×82gix-tix/src/lib.rs:1389
Repeated repair: gix-path/src/env/mod.rs · ×10gix-path/src/env/mod.rs:102

What to do

  1. Resolve the 82 Hotspot finding(s) in Churn × Complexity Hotspots — start with mod.rs (9), function.rs (6), remote.rs (3). — One of this dimension's main actionable groups (82 warning-level).
  2. Resolve the 10 Repeated repair finding(s) in Churn × Complexity Hotspots — start with mod.rs (4), lib.rs (2), review.rs. — One of this dimension's main actionable groups (10 warning-level).

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

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

What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.

Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.

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

169 deducted task-comment markers across 264640 LoC (0.1/KLoC) → score 9.9. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

TodoComment · ×165tests/tools/src/lib.rs:2560
HackComment · ×3gix-ref/src/store/file/transaction/commit.rs:58
FixmeCommentgix-pack/src/data/file/decode/entry.rs:476

What to do

  1. Resolve the 165 TodoComment finding(s) in Explicit Debt — start with mod.rs (19), function.rs (8), types.rs (6). — One of this dimension's main actionable groups (165 warning-level).
  2. Resolve the 3 HackComment finding(s) in Explicit Debt — start with mod.rs (2), commit.rs. — One of this dimension's main actionable groups (3 warning-level).
  3. Resolve the 1 FixmeComment finding(s) in Explicit Debt — start with entry.rs. — One of this dimension's main actionable groups (1 warning-level).

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. 23 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: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.

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

No architecture decision records were found.

No ADRs foundCargo.toml:17

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality — start with Cargo.toml. — One of this dimension's main actionable groups (1 recommendation-level).

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

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

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

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

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

4 of 70 build units (Cargo) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

  1. Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).

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

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

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.

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

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

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)5.6 / 10Adequate✓ 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 5.6 / 10 · rule-coverage 100% · ceiling Documented

6 finding(s): 0 critical, 5 high, 1 medium, 0 low. 2 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 2 file(s) — `etc/scripts/remap-release-paths.sh` (line 79), `gix/src/repository/location.rs` (line 245) — 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.

REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. No action in Static Analysis (SAST) — all 2 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (2 issue-level, 0 of them charged here).

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

D30 · Dependency Vulnerabilities10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

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

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

REDACTED

✓ On the Gold path — maintain.

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

D31 · IaC & Container Security9.3 / 10Adequategated by 1 critical finding✓ 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 9.3 / 10 · rule-coverage 100% · ceiling Documented

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

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 1 High IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 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).
  3. Resolve the 2 Low IaC finding(s) in IaC & Container Security — start with REDACTED (2). — One of this dimension's main actionable groups (2 recommendation-level).

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

D34 · Knowledge Freshness10.0 / 10Exemplary✓ 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 10.0 / 10 · rule-coverage 100% · ceiling Documented

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

Orphaned file · ×2gix-utils/src/btoi.rs:1
Orphaned files with no living knowledge

✓ On the Gold path — maintain.

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

D35 · Change Coupling9.8 / 10Adequategated by 12 critical 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.8 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: decode.rs↔mod.rs 73%; decode.rs↔decode.rs 70%; decode.rs↔parse.rs 70%

Boundary-crossing change coupling: decode.rs ↔ mod.rs · ×12gix-actor/src/signature/decode.rs:1
Change coupling: body.rs ↔ decode.rs · ×3gix-object/src/commit/message/body.rs:1

What to do

  1. Resolve the 12 Boundary-crossing change coupling finding(s) in Change Coupling — start with decode.rs (8), ref_iter.rs (2), body.rs (2). — One of this dimension's main actionable groups (12 issue-level).
  2. Resolve the 3 Change coupling finding(s) in Change Coupling — start with body.rs, ref_iter.rs, cascade.rs. — One of this dimension's main actionable groups (3 warning-level).

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

D36 · Supply-chain Provenance & Signing0.0 / 10Critical✓ 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 0.0 / 10 · rule-coverage 100% · ceiling Documented

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

REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

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

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

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 1 platform declaration(s) and 0 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.

AC1 · Text alternatives10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.

AC2 · Forms & labels10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.

Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

AC3 · Page structure5.1 / 10Adequate✓ Tool-verified

Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.

Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>. — etc/speak/gitmerge-2024.marp.html:1
  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. — etc/speak/gitmerge-2024.marp.html:1
  • Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one. (×6) — etc/speak/gitmerge-2024.marp.html:39, etc/speak/gitmerge-2024.marp.html:44, etc/speak/gitmerge-2024.marp.html:49, …

What to do

  • Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
AC6 · Visual & motion safety5.2 / 10Adequate✓ Tool-verified

Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.

Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.

Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • `::view-transition-new(__bespoke_marp_transition_osc__)` moves (`animation-name: __bespoke_marp_transition_osc__`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — etc/speak/gitmerge-2024.marp.html:1
  • `svg.bespoke-marp-slide.bespoke-marp-active.bespoke-marp-active-ready *` moves (`animation-name: __bespoke_marp__`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — etc/speak/gitmerge-2024.marp.html:1
  • `body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>button` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — etc/speak/gitmerge-2024.marp.html:1

What to do

  • Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
AX10 · Code composition9.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.

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)7.7 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.

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

M2 · Architecture documentation2.0 / 10Critical✓ 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 repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.

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

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

Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.

Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.

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✓ Tool-verified

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

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

  • 1 public type in `gix_diff.blob.unified_diff.impls` is marked as implementation by its own namespace, folder or name: `UnifiedDiff` (gix-diff/src/blob/unified_diff/impls.rs:11, `impls`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — gix-diff/src/blob/unified_diff/impls.rs:11
  • 3 public types in `gix_error.exn.impls` are marked as implementation by their own namespace, folder or name: `Exn` (gix-error/src/exn/impls.rs:115, `impls`), `Frame` (gix-error/src/exn/impls.rs:524, `impls`), `Untyped` (gix-error/src/exn/impls.rs:884, `impls`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers. — gix-error/src/exn/impls.rs:115

What to do

  • Hide `gix_diff.blob.unified_diff.impls` (`UnifiedDiff`) (Rust: `pub(crate)`, or keep the module private): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
  • Hide `gix_error.exn.impls` (`Exn`, `Frame`, `Untyped`) (Rust: `pub(crate)`, or keep the module private): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
P2 · Observability6.9 / 10Adequate✓ 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 26/27 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `gix-tui`.

What to do

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

Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).

Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.

What to do

  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback10.0 / 10Exemplary✓ Tool-verified

Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.

Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.

P6 · Release 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 each language's code 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.

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.

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.

X21 · Side-effecting pattern guard8.0 / 10Strong✓ Tool-verified

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.

  • The `if` guard on line 3270 (`ref_tree::Input::PinReferences { .. } | ref_tree::Input::ResolveRemoteReferences(_) | ref_tree::Input::DeleteLocalBranches { .. } | ref_tree::Input::DeleteRemoteReferences { .. } if { pending_rebase_conflict.is_some() || pending_todo_rebase_conflict.is_some() || { dirty |= refresh_rebase_session(&mut app, &repository_path, repository_is_bare); app.rebase_continuation_pending() } } =>`) changes `dirty` with `dirty |= …` while the `match` is deciding whether that arm applies. Rust tests a guard during PATTERN MATCHING — after the arm's pattern has matched and before the arm is chosen, going on to the next arm when it is false — so the change lands whenever this arm is merely TESTED, whether or not it is then chosen, and never once an earlier arm has matched. And `||` can skip it, so it does not happen at all whenever what decides first already answers the guard. The accounting therefore depends on evaluation order and on how many arms the subject was tested against, not on any statement a reader can point at: a counter kept this way misses exactly the path the deciding operand rules out, so it cannot reach a limit it is checked against on that path. Move the change out of the guard — leave it reading only (`if dirty + 1 >= limit`) and put the assignment in the arm's BODY, where it runs precisely when the arm is chosen, or hoist it above the `match` if it must happen for every subject. — gix-tix/src/lib.rs:3270

What to do

  • Each finding names the mutation inside the `case` label or `when` guard and the short-circuiting operator that decides whether it happens at all. Confirm from the two, then move the change out of the label: a JavaScript or PHP `case` expression, a PHP `match` arm's conditions, a Java `when` guard, a Kotlin `when` branch's conditions, a Ruby `when` clause or `in … if` guard, a Python `case … if` guard, a Dart `when` guard, a Rust `match` guard and a Scala `case … if` guard are evaluated while the switch is still MATCHING — on labels that are then not selected, and not at all once an earlier label has matched or an operand to its left has answered. Leave the label reading only and put the increment in the arm's BODY, where it runs exactly when the arm is chosen, or hoist it above the switch if it must happen on every subject.
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.

Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.

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

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

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

X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.

Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.

X4 · Structured logging10.0 / 10Exemplary○ Nothing flagged

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.

WCAG coverage — what static analysis assessed

Statically assessed 13 of 55 WCAG 2.2 Level A/AA success criteria (24%; ≈26% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 42 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC1 · Text alternatives1.1.1, 1.2.2, 1.2.5Partial signal
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only

Not statically assessed — these 42 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.2.1, 1.2.3, 1.2.4, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.1, 1.4.2, 1.4.5, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 2.1.1, 2.1.2, 2.1.4, 2.2.2, 2.3.1, 2.4.3, 2.4.4, 2.4.5, 2.4.6, 2.4.11, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.7, 2.5.8, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.6, 3.3.1, 3.3.3, 3.3.4, 3.3.7, 3.3.8, 4.1.3.

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 Health85%Adequate — gated by D2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture94%ExemplarySolid.
Maturity65%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness89%StrongSolid.
Security75%Adequate — gated by D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling100%ExemplaryStrongest area.
Event Sourcing100%ExemplarySolid.
Accessibility69%AdequateAcceptable, with room to improve.
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 — 5 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for

These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.

  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 64 check(s) not relevant to this codebase

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

  • AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
  • AC5 ARIA correctness — No ARIA usage found in the parsed markup — AC5 not applicable here.
  • AX1 Captive dependencies — Not applicable: 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 — Not applicable: Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written.
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • 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) — 6 | >>> RUN apk upgrade --update-cache --available \ 7 | >>> && apk add --no-cache --virtual .runtime-gitoxide libressl libressl3.8-libcrypto 8 | -------------------- ERROR: failed to solve: process "/bin/sh -c apk upgrade --update-cache --available && apk add --no-cache --virtual .runtime-gitoxide libressl libressl3.8-libcrypto" did not complete successfully: exit code: 2; 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 — ~169693 lines of test source are present (.rs) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included — the .rs suite was found but not re-run
  • D16 Bus Factor — single-maintainer repository — bus factor is not applicable
  • 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 — N/A — too few peers to establish a naming convention (25933 declarations, no unit with a dominant convention).
  • D22 Internal API Consistency — API consistency is measured on C# only; the exposed Rust surface was not measured.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only — this repository's production source is .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) — 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.
  • 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
  • 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 — Not assessed, and this one is on us: 1 command handler(s) or message consumer(s) were found here, but this check does not yet recognise persistence writes in this repository's language. Idempotency was neither confirmed nor ruled out — this is a limit of the analyzer, not a finding about your code.
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the Rust source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage data present for 893 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • S1 Web-Security Posture — No web surface: 995 Rust file(s) were read for weak hashes and ciphers, key material fixed in the source, disabled TLS certificate validation and obsolete TLS versions, and none was found. This repository serves no HTTP of its own — no HTTP-server crate (actix-web, axum, Rocket, warp, poem, tide, salvo, tonic, a hyper server, …) among its Cargo manifests' run-time dependencies, and no server started in its production source — so HTTPS enforcement, HSTS, cookie flags and input validation are N/A here, as they are for a C# library or worker. If this codebase starts serving HTTP, the dimension reactivates automatically.
  • X12 Unreachable branch — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X13 Undrained process stream — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X16 Unfloored truncation loop — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X17 Uncapped recursion over a caller-supplied document — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X18 Disposal-pattern correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X19 Unrestored process-global state — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X2 Cancellation propagation — no C# was loaded; this repository's Rust was read, and no request in it can be cancelled by a caller — a Rust request takes no token: a future is cancelled by dropping it, from outside the call (select!, a timeout, an aborted task), and reqwest, hyper and tonic take none
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X22 Contradicted release guard — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X23 Unguarded diagnostic materialisation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X24 Document value interpolated into markup unescaped — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X25 Inert configuration knob — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X26 Unsynchronised callback handoff — not 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
  • X27 Collection changed while being enumerated — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X3 Exception handling — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.

Critical — 19 finding(s)
D35 · Change Coupling · Boundary-crossing change coupling · ×12
  • Boundary-crossing change coupling: decode.rs ↔ mod.rs gix-actor/src/signature/decode.rs:1 — `gix-actor/src/signature/decode.rs` (context gix-actor) and `gix-ref/src/store/packed/decode/mod.rs` (context gix-ref) sit in DIFFERENT parts of the tree yet 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `3cd3e2a7` Resolve Winnow deprecations (at that commit the file was still `gix-ref/src/store/packed/decode.rs`); `12f03db6` Simplify parsers (at that commit the file was still `gix-ref/src/store/packed/decode.rs`); `f0cbf81a` Resolve 0.4 not-quite deprecations (at that commit the file was still `gix-ref/src/store/packed/decode.rs`) — run `git show` on any of them.
  • Boundary-crossing change coupling: decode.rs ↔ decode.rs gix-actor/src/signature/decode.rs:1 — `gix-actor/src/signature/decode.rs` (context gix-actor) and `gix-object/src/commit/message/decode.rs` (context gix-object) sit in DIFFERENT parts of the tree yet 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `3cd3e2a7` Resolve Winnow deprecations; `e175b20d` Update winnow to 0.6; `12f03db6` Simplify parsers — run `git show` on any of them.
  • Boundary-crossing change coupling: decode.rs ↔ parse.rs gix-actor/src/signature/decode.rs:1 — `gix-actor/src/signature/decode.rs` (context gix-actor) and `gix-ref/src/parse.rs` (context gix-ref) sit in DIFFERENT parts of the tree yet 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `3cd3e2a7` Resolve Winnow deprecations; `12f03db6` Simplify parsers; `f0cbf81a` Resolve 0.4 not-quite deprecations — run `git show` on any of them.
  • Boundary-crossing change coupling: ref_iter.rs ↔ parse.rs gix-object/src/tree/ref_iter.rs:1 — `gix-object/src/tree/ref_iter.rs` (context gix-object) and `gix-ref/src/parse.rs` (context gix-ref) sit in DIFFERENT parts of the tree yet 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `3cd3e2a7` Resolve Winnow deprecations; `12f03db6` Simplify parsers; `f0cbf81a` Resolve 0.4 not-quite deprecations — run `git show` on any of them.
  • Boundary-crossing change coupling: body.rs ↔ parse.rs gix-object/src/commit/message/body.rs:1 — `gix-object/src/commit/message/body.rs` (context gix-object) and `gix-ref/src/parse.rs` (context gix-ref) sit in DIFFERENT parts of the tree yet change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `3cd3e2a7` Resolve Winnow deprecations; `12f03db6` Simplify parsers; `f0cbf81a` Resolve 0.4 not-quite deprecations — run `git show` on any of them.
  • Boundary-crossing change coupling: decode.rs ↔ parse.rs gix-object/src/commit/message/decode.rs:1 — `gix-object/src/commit/message/decode.rs` (context gix-object) and `gix-ref/src/parse.rs` (context gix-ref) sit in DIFFERENT parts of the tree yet change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `3cd3e2a7` Resolve Winnow deprecations; `12f03db6` Simplify parsers; `f0cbf81a` Resolve 0.4 not-quite deprecations — run `git show` on any of them.
  • Boundary-crossing change coupling: decode.rs ↔ decode.rs gix-object/src/commit/message/decode.rs:1 — `gix-object/src/commit/message/decode.rs` (context gix-object) and `gix-ref/src/store/file/loose/reference/decode.rs` (context gix-ref) sit in DIFFERENT parts of the tree yet change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `3cd3e2a7` Resolve Winnow deprecations; `12f03db6` Simplify parsers; `f0cbf81a` Resolve 0.4 not-quite deprecations — run `git show` on any of them.
  • Boundary-crossing change coupling: decode.rs ↔ mod.rs gix-object/src/commit/message/decode.rs:1 — `gix-object/src/commit/message/decode.rs` (context gix-object) and `gix-ref/src/store/packed/decode/mod.rs` (context gix-ref) sit in DIFFERENT parts of the tree yet change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `3cd3e2a7` Resolve Winnow deprecations (at that commit the file was still `gix-ref/src/store/packed/decode.rs`); `12f03db6` Simplify parsers (at that commit the file was still `gix-ref/src/store/packed/decode.rs`); `f0cbf81a` Resolve 0.4 not-quite deprecations (at that commit the file was still `gix-ref/src/store/packed/decode.rs`) — run `git show` on any of them.
  • Boundary-crossing change coupling: body.rs ↔ mod.rs gix-object/src/commit/message/body.rs:1 — `gix-object/src/commit/message/body.rs` (context gix-object) and `gix-ref/src/store/packed/decode/mod.rs` (context gix-ref) sit in DIFFERENT parts of the tree yet 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `3cd3e2a7` Resolve Winnow deprecations (at that commit the file was still `gix-ref/src/store/packed/decode.rs`); `12f03db6` Simplify parsers (at that commit the file was still `gix-ref/src/store/packed/decode.rs`); `f0cbf81a` Resolve 0.4 not-quite deprecations (at that commit the file was still `gix-ref/src/store/packed/decode.rs`) — run `git show` on any of them.
  • Boundary-crossing change coupling: decode.rs ↔ decode.rs gix-actor/src/signature/decode.rs:1 — `gix-actor/src/signature/decode.rs` (context gix-actor) and `gix-ref/src/store/file/loose/reference/decode.rs` (context gix-ref) sit in DIFFERENT parts of the tree yet change together 53% of the time (8 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `3cd3e2a7` Resolve Winnow deprecations; `12f03db6` Simplify parsers; `f0cbf81a` Resolve 0.4 not-quite deprecations — run `git show` on any of them.
  • Boundary-crossing change coupling: decode.rs ↔ body.rs gix-actor/src/signature/decode.rs:1 — `gix-actor/src/signature/decode.rs` (context gix-actor) and `gix-object/src/commit/message/body.rs` (context gix-object) sit in DIFFERENT parts of the tree yet change together 53% of the time (8 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `3cd3e2a7` Resolve Winnow deprecations; `52ede063` Move off deprecated take_until[01]; `12f03db6` Simplify parsers — run `git show` on any of them.
  • Boundary-crossing change coupling: ref_iter.rs ↔ parse.rs gix-object/src/tag/ref_iter.rs:1 — `gix-object/src/tag/ref_iter.rs` (context gix-object) and `gix-ref/src/parse.rs` (context gix-ref) sit in DIFFERENT parts of the tree yet 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `3cd3e2a7` Resolve Winnow deprecations; `f0cbf81a` Resolve 0.4 not-quite deprecations; `9ed7df0a` Resolve 0.4 deprecations — run `git show` on any of them.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
AC3 · Page structure · Document without a <title> · ×1
  • Document without a <title> etc/speak/gitmerge-2024.marp.html:1 — A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D31 · IaC & Container Security · High IaC · ×1
  • REDACTED
Serious — 1317 finding(s)
D17 · Explicit Debt · TodoComment · ×165
  • TodoComment tests/tools/src/lib.rs:2560 — // TODO(deps): Unify with `gix_path::env::shell()` by having both call a more general function — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment tests/it/src/commands/blame_copy_royal.rs:58 — // TODO: there should be a way to normalize paths without going through patterns, at least in this case maybe? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment tests/it/src/commands/check_mode.rs:125 — // TODO: Maybe check status? On Unix, it should be 0 or SIGPIPE. Not sure about Windows. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment tests/it/src/commands/copy_royal.rs:22 — // TODO: ideally this could accept patterns already. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment tests/it/src/commands/git_to_sh.rs:93 — // TODO: ideally this could accept patterns already. — 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 src/plumbing/options/mod.rs:60 — // TODO: needs a 'lenient' mutually exclusive counterpart. Opens the gate to auto-verbose some commands, and add --no-verbose — 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 src/plumbing/options/mod.rs:298 — // TODO: figure out how to implement traditional, which right now can't be done as it requires ignored folders — 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 gix-worktree-state/src/checkout/chunk.rs:123 — // TODO: write test for that — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment gix-worktree/tests/worktree/stack/ignore.rs:152 — // TODO: adjust baseline to also include precious files. — 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 gix-worktree/tests/worktree/stack/ignore.rs:232 — // TODO: adjust baseline to also include precious files. — 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 gix-url/src/parse.rs:56 — // TODO: url's may only contain `:/`, we should additionally check if the characters used for — 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 gix-url/src/parse.rs:215 — // TODO: this incorrectly splits at IPv6 addresses, check for `[]` before splitting — 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 gix-url/src/parse.rs:286 — // TODO: implement UNC path special case — 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 gix-transport/src/client/blocking_io/file.rs:220 — // TODO: fix this — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment gix-diff/tests/diff/blob/unified_diff.rs:210 — // TODO: fix this — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment gix-transport/src/client/blocking_io/ssh/program_kind.rs:93 — // TODO: turn this into HostUnreachable when stable, or NetworkUnreachable in 'no route' example. — 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 gix-transport/src/client/blocking_io/http/mod.rs:123 — // TODO: testing most of these fields requires a lot of effort, unless special flags to introspect ongoing requests are added. — 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 gix-tix/src/command/rebase.rs:79 — /// Todo file to apply; omit or use '-' to read standard input. — 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 gix-tempfile/src/lib.rs:75 — // TODO(performance): use the `gix-hashtable` slot-map once available. It seems quite fast already though, so experiment. — 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 gix-status/src/index_as_worktree/function.rs:148 — // TODO: heuristic: when is parallelization not worth it? Git says 500 items per thread, but to 20 threads, we can be more fine-grained though. — 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 gix-status/src/index_as_worktree/function.rs:464 — // TODO: find a test for the following line or remove it. Is this more often hit with smudge/clean filters? — 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 gix-status/src/index_as_worktree/function.rs:599 — // TODO: what to do about precompose unicode and ignore_case for symlinks — 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 gix-status/src/index_as_worktree/traits.rs:138 — // TODO: make all streaming IOPs interruptible. — 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 gix-status/src/index_as_worktree/types.rs:30 — // TODO(perf): Make worktree status scale (like they do on Linux) with more threads on macOS instead of capping 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 gix-revision/src/spec/parse/function.rs:113 — // TODO: smallvec to save the unnecessary allocation? Can't keep ref due to lifetime constraints in traits — 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.
  • + 140 more in this group — see findings.md.
D8 · Code Coverage · Low coverage · ×121
  • Low coverage: gitoxide-core/src/commitgraph/verify.rs gitoxide-core/src/commitgraph/verify.rs:1 — 0.0% line coverage (0/43).
  • Low coverage: gitoxide-core/src/corpus/db.rs gitoxide-core/src/corpus/db.rs:1 — 46.3% line coverage (87/188).
  • Low coverage: gitoxide-core/src/corpus/engine.rs gitoxide-core/src/corpus/engine.rs:1 — 0.0% line coverage (0/266).
  • Low coverage: gitoxide-core/src/corpus/run.rs gitoxide-core/src/corpus/run.rs:1 — 0.0% line coverage (0/81).
  • Low coverage: gitoxide-core/src/discover.rs gitoxide-core/src/discover.rs:1 — 0.0% line coverage (0/45).
  • Low coverage: gitoxide-core/src/hours/core.rs gitoxide-core/src/hours/core.rs:1 — 0.0% line coverage (0/159).
  • Low coverage: gitoxide-core/src/hours/mod.rs gitoxide-core/src/hours/mod.rs:1 — 12.5% line coverage (38/303).
  • Low coverage: gitoxide-core/src/hours/util.rs gitoxide-core/src/hours/util.rs:1 — 0.0% line coverage (0/101).
  • Low coverage: gitoxide-core/src/index/checkout.rs gitoxide-core/src/index/checkout.rs:1 — 0.0% line coverage (0/143).
  • Low coverage: gitoxide-core/src/index/information.rs gitoxide-core/src/index/information.rs:1 — 0.0% line coverage (0/76).
  • Low coverage: gitoxide-core/src/index/mod.rs gitoxide-core/src/index/mod.rs:1 — 0.0% line coverage (0/39).
  • Low coverage: gitoxide-core/src/lib.rs gitoxide-core/src/lib.rs:1 — 8.6% line coverage (5/58).
  • Low coverage: gitoxide-core/src/mailmap.rs gitoxide-core/src/mailmap.rs:1 — 0.0% line coverage (0/27).
  • Low coverage: gitoxide-core/src/net.rs gitoxide-core/src/net.rs:1 — 0.0% line coverage (0/26).
  • Low coverage: gitoxide-core/src/pack/create.rs gitoxide-core/src/pack/create.rs:1 — 0.0% line coverage (0/226).
  • Low coverage: gitoxide-core/src/pack/explode.rs gitoxide-core/src/pack/explode.rs:1 — 0.0% line coverage (0/159).
  • Low coverage: gitoxide-core/src/pack/index.rs gitoxide-core/src/pack/index.rs:1 — 0.0% line coverage (0/72).
  • Low coverage: gitoxide-core/src/pack/multi_index.rs gitoxide-core/src/pack/multi_index.rs:1 — 0.0% line coverage (0/62).
  • Low coverage: gitoxide-core/src/pack/receive.rs gitoxide-core/src/pack/receive.rs:1 — 0.0% line coverage (0/212).
  • Low coverage: gitoxide-core/src/pack/verify.rs gitoxide-core/src/pack/verify.rs:1 — 1.9% line coverage (3/162).
  • Low coverage: gitoxide-core/src/query/db.rs gitoxide-core/src/query/db.rs:1 — 0.0% line coverage (0/61).
  • Low coverage: gitoxide-core/src/query/engine/command.rs gitoxide-core/src/query/engine/command.rs:1 — 0.0% line coverage (0/144).
  • Low coverage: gitoxide-core/src/query/engine/update.rs gitoxide-core/src/query/engine/update.rs:1 — 0.0% line coverage (0/440).
  • Low coverage: gitoxide-core/src/query/mod.rs gitoxide-core/src/query/mod.rs:1 — 0.0% line coverage (0/11).
  • Low coverage: gitoxide-core/src/remote.rs gitoxide-core/src/remote.rs:1 — 0.0% line coverage (0/115).
  • + 96 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×82
  • Hotspot: gix-tix/src/lib.rs gix-tix/src/lib.rs:1389 — gix-tix/src/lib.rs changed 238 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 570 in gix_tix::event_loop at line 1389. 78 of those changes were fix/bug commits, and the other 160 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gix-tix/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: gix-tix/src/ui.rs gix-tix/src/ui.rs:426 — gix-tix/src/ui.rs changed 169 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 170 in gix_tix::ui::draw_with_worktree at line 426. 47 of those changes were fix/bug commits, and the other 122 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gix-tix/src/ui.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: gix-tix/src/app.rs gix-tix/src/app.rs:1950 — gix-tix/src/app.rs changed 149 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 180 in App::update at line 1950. 43 of those changes were fix/bug commits, and the other 106 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gix-tix/src/app.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: gix-tix/src/edit/rebase.rs gix-tix/src/edit/rebase.rs:982 — gix-tix/src/edit/rebase.rs changed 96 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 115 in gix_tix::edit::rebase::perform_inner at line 982. 34 of those changes were fix/bug commits, and the other 62 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gix-tix/src/edit/rebase.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: gix-merge/src/tree/function/resolve.rs gix-merge/src/tree/function/resolve.rs:97 — gix-merge/src/tree/function/resolve.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 254 in gix_merge::tree::function::resolve::tree at line 97. 6 of those changes were fix/bug commits, and the other 11 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gix-merge/src/tree/function/resolve.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: gix-tix/src/history.rs gix-tix/src/history.rs:2208 — gix-tix/src/history.rs changed 84 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in gix_tix::history::decorations_excluding at line 2208. 29 of those changes were fix/bug commits, and the other 55 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gix-tix/src/history.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: gix-tix/src/edit/todo.rs gix-tix/src/edit/todo.rs:1213 — gix-tix/src/edit/todo.rs changed 51 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 66 in gix_tix::edit::todo::parse at line 1213. 18 of those changes were fix/bug commits, and the other 33 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gix-tix/src/edit/todo.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: gix-tix/src/edit/time_travel.rs gix-tix/src/edit/time_travel.rs:249 — gix-tix/src/edit/time_travel.rs changed 71 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in gix_tix::edit::time_travel::move_head_to_reporting at line 249. 28 of those changes were fix/bug commits, and the other 43 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gix-tix/src/edit/time_travel.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: src/plumbing/main.rs src/plumbing/main.rs:30 — src/plumbing/main.rs changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 123 in gitoxide::plumbing::main::main at line 30. 2 of those changes were fix/bug commits, and the other 16 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- src/plumbing/main.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: gix-tix/src/command.rs gix-tix/src/command.rs:347 — gix-tix/src/command.rs changed 79 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in Platform::run_as_initialized at line 347. 15 of those changes were fix/bug commits, and the other 64 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gix-tix/src/command.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: gix-tix/src/ref_tree.rs gix-tix/src/ref_tree.rs:274 — gix-tix/src/ref_tree.rs changed 36 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in Tree::handle_key at line 274. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gix-tix/src/ref_tree.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: gix/src/open/repository.rs gix/src/open/repository.rs:202 — gix/src/open/repository.rs changed 28 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 54 in ThreadSafeRepository::open_from_paths at line 202. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gix/src/open/repository.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: gix-tix/src/command_menu.rs gix-tix/src/command_menu.rs:244 — gix-tix/src/command_menu.rs changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 66 in gix_tix::command_menu::commands at line 244. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gix-tix/src/command_menu.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: gix-tix/src/edit/head.rs gix-tix/src/edit/head.rs:92 — gix-tix/src/edit/head.rs changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in gix_tix::edit::head::perform_inner at line 92. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gix-tix/src/edit/head.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: gix-diff/src/rewrites/tracker.rs gix-diff/src/rewrites/tracker.rs:329 — gix-diff/src/rewrites/tracker.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in Tracker::find_file_renames at line 329. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gix-diff/src/rewrites/tracker.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: gix-tix/src/edit/auto_merge/mod.rs gix-tix/src/edit/auto_merge/mod.rs:1269 — gix-tix/src/edit/auto_merge/mod.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in gix_tix::edit::auto_merge::order_plan at line 1269. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gix-tix/src/edit/auto_merge/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: gix-transport/src/client/blocking_io/http/curl/remote.rs gix-transport/src/client/blocking_io/http/curl/remote.rs:412 — gix-transport/src/client/blocking_io/http/curl/remote.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in gix_transport::client::blocking_io::http::curl::remote::new at line 412. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gix-transport/src/client/blocking_io/http/curl/remote.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: gitoxide-core/src/query/engine/update.rs gitoxide-core/src/query/engine/update.rs:21 — gitoxide-core/src/query/engine/update.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in gitoxide_core::query::engine::update::update at line 21. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gitoxide-core/src/query/engine/update.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: gix-odb/src/store_impls/dynamic/load_index.rs gix-odb/src/store_impls/dynamic/load_index.rs:193 — gix-odb/src/store_impls/dynamic/load_index.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in Store::consolidate_with_disk_state at line 193. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gix-odb/src/store_impls/dynamic/load_index.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: gix-date/src/parse/relative.rs gix-date/src/parse/relative.rs:293 — gix-date/src/parse/relative.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in gix_date::parse::relative::apply_operations at line 293. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gix-date/src/parse/relative.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: gix-diff/src/blob/pipeline.rs gix-diff/src/blob/pipeline.rs:226 — gix-diff/src/blob/pipeline.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in Pipeline::convert_to_diffable_inner at line 226. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gix-diff/src/blob/pipeline.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: gix-traverse/src/commit/simple.rs gix-traverse/src/commit/simple.rs:179 — gix-traverse/src/commit/simple.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in gix_traverse::commit::simple::compute_hidden_frontier at line 179. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gix-traverse/src/commit/simple.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: gix-blame/src/file/function.rs gix-blame/src/file/function.rs:76 — gix-blame/src/file/function.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in gix_blame::file::function::file 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gix-blame/src/file/function.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: gix-status/src/index_as_worktree_with_renames/mod.rs gix-status/src/index_as_worktree_with_renames/mod.rs:49 — gix-status/src/index_as_worktree_with_renames/mod.rs changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in gix_status::index_as_worktree_with_renames::function::index_as_worktree_with_renames at line 49. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gix-status/src/index_as_worktree_with_renames/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: gix/src/clone/fetch/mod.rs gix/src/clone/fetch/mod.rs:24 — gix/src/clone/fetch/mod.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in PrepareFetch::fetch_only at line 24. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gix/src/clone/fetch/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.
  • + 57 more in this group — see findings.md.
D2 · Cognitive Complexity · gix_tix · ×65
  • gix_tix::event_loop (cognitive 1340) gix-tix/src/lib.rs:1389 — gix_tix::event_loop has cognitive complexity 1340 (threshold 15). Drivers by points: if/else 298 (867 pts), match/switch 93 (343 pts), boolean chains 100, loops 9 (30 pts) (nesting depth added 840). 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.
  • gix_tix::ui::draw_with_worktree (cognitive 269) gix-tix/src/ui.rs:426 — gix_tix::ui::draw_with_worktree has cognitive complexity 269 (threshold 15). Drivers by points: if/else 112 (174 pts), boolean chains 49, loops 11 (25 pts), match/switch 13 (21 pts) (nesting depth added 84). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • gix_tix::edit::rebase::perform_plan_with_progress (cognitive 168) gix-tix/src/edit/rebase.rs:1816 — gix_tix::edit::rebase::perform_plan_with_progress has cognitive complexity 168 (threshold 15). Drivers by points: if/else 43 (95 pts), boolean chains 27, loops 17 (26 pts), match/switch 10 (20 pts) (nesting depth added 71). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • gix_tix::edit::rebase::perform_inner (cognitive 165) gix-tix/src/edit/rebase.rs:982 — gix_tix::edit::rebase::perform_inner has cognitive complexity 165 (threshold 15). Drivers by points: if/else 53 (88 pts), boolean chains 54, loops 6 (13 pts), match/switch 8 (10 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.
  • gix_tix::edit::todo::parse (cognitive 145) gix-tix/src/edit/todo.rs:1213 — gix_tix::edit::todo::parse has cognitive complexity 145 (threshold 15). Drivers by points: if/else 50 (118 pts), loops 7 (14 pts), boolean chains 10, match/switch 2 (3 pts) (nesting depth added 76). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • gix_tix::edit::auto_merge::order_plan (cognitive 105) gix-tix/src/edit/auto_merge/mod.rs:1269 — gix_tix::edit::auto_merge::order_plan has cognitive complexity 105 (threshold 15). Drivers by points: if/else 17 (52 pts), loops 15 (25 pts), match/switch 9 (25 pts), boolean chains 3 (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.
  • gix_tix::draw (cognitive 89) gix-tix/src/lib.rs:6918 — gix_tix::draw has cognitive complexity 89 (threshold 15). Drivers by points: if/else 28 (46 pts), boolean chains 16, match/switch 5 (15 pts), loops 4 (12 pts) (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • gix_tix::ui::metadata_columns (cognitive 88) gix-tix/src/ui.rs:2796 — gix_tix::ui::metadata_columns has cognitive complexity 88 (threshold 15). Drivers by points: if/else 35 (64 pts), loops 5 (15 pts), match/switch 4 (6 pts), boolean chains 3 (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.
  • gix_tix::command_menu::commands (cognitive 81) gix-tix/src/command_menu.rs:244 — gix_tix::command_menu::commands has cognitive complexity 81 (threshold 15). Drivers by points: if/else 39 (57 pts), boolean chains 17, match/switch 5, loops 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • gix_tix::history::load (cognitive 77) gix-tix/src/history.rs:1217 — gix_tix::history::load has cognitive complexity 77 (threshold 15). Drivers by points: if/else 29 (58 pts), loops 6 (11 pts), boolean chains 8 (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.
  • gix_tix::edit::todo::prepare (cognitive 76) gix-tix/src/edit/todo.rs:111 — gix_tix::edit::todo::prepare has cognitive complexity 76 (threshold 15). Drivers by points: if/else 27 (47 pts), loops 11 (19 pts), boolean chains 8, match/switch 1 (2 pts) (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.
  • gix_tix::edit::auto_merge::prepare (cognitive 71) gix-tix/src/edit/auto_merge/mod.rs:584 — gix_tix::edit::auto_merge::prepare has cognitive complexity 71 (threshold 15). Drivers by points: if/else 13 (44 pts), loops 8 (17 pts), boolean chains 8, match/switch 1 (2 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.
  • gix_tix::edit::transplant::build_plan (cognitive 68) gix-tix/src/edit/transplant/mod.rs:216 — gix_tix::edit::transplant::build_plan has cognitive complexity 68 (threshold 15). Drivers by points: if/else 25 (38 pts), boolean chains 15, loops 8 (10 pts), match/switch 4 (5 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.
  • gix_tix::history::decorations_excluding (cognitive 68) gix-tix/src/history.rs:2208 — gix_tix::history::decorations_excluding has cognitive complexity 68 (threshold 15). Drivers by points: if/else 24 (43 pts), boolean chains 11, match/switch 4 (11 pts), loops 3 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • gix_tix::edit::rebase::finish_review_with_progress (cognitive 54) gix-tix/src/edit/rebase.rs:1501 — gix_tix::edit::rebase::finish_review_with_progress has cognitive complexity 54 (threshold 15). Drivers by points: if/else 27 (41 pts), boolean chains 10, loops 2, 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.
  • gix_tix::edit::todo::prepare_continuation (cognitive 54) gix-tix/src/edit/todo.rs:375 — gix_tix::edit::todo::prepare_continuation has cognitive complexity 54 (threshold 15). Drivers by points: if/else 15 (33 pts), loops 4 (8 pts), match/switch 5 (8 pts), boolean chains 5 (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.
  • gix_tix::app_action (cognitive 53) gix-tix/src/lib.rs:9575 — gix_tix::app_action has cognitive complexity 53 (threshold 15). Drivers by points: if/else 20 (31 pts), match/switch 5 (14 pts), boolean chains 8 (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.
  • gix_tix::app::compute_lanes (cognitive 52) gix-tix/src/app.rs:4028 — gix_tix::app::compute_lanes has cognitive complexity 52 (threshold 15). Drivers by points: if/else 13 (34 pts), loops 10 (18 pts) (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.
  • gix_tix::edit::time_travel::perform_reporting_rebased (cognitive 49) gix-tix/src/edit/time_travel.rs:773 — gix_tix::edit::time_travel::perform_reporting_rebased has cognitive complexity 49 (threshold 15). Drivers by points: if/else 19 (29 pts), match/switch 8 (13 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • gix_tix::edit::time_travel::move_head_to_reporting (cognitive 43) gix-tix/src/edit/time_travel.rs:249 — gix_tix::edit::time_travel::move_head_to_reporting has cognitive complexity 43 (threshold 15). Drivers by points: if/else 16 (20 pts), match/switch 11 (16 pts), boolean chains 7 (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.
  • gix_tix::edit::rebase::update_refs (cognitive 41) gix-tix/src/edit/rebase.rs:3764 — gix_tix::edit::rebase::update_refs has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (30 pts), loops 4 (6 pts), match/switch 1 (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.
  • gix_tix::edit::auto_merge::expand_plan (cognitive 38) gix-tix/src/edit/auto_merge/mod.rs:1174 — gix_tix::edit::auto_merge::expand_plan has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 9 (16 pts), match/switch 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.
  • gix_tix::edit::replay_refs::unreachable_owners (cognitive 38) gix-tix/src/edit/replay_refs/mod.rs:225 — gix_tix::edit::replay_refs::unreachable_owners has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 7 (9 pts), match/switch 3 (6 pts), boolean chains 4 (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.
  • gix_tix::edit::todo::parse_state (cognitive 37) gix-tix/src/edit/todo.rs:994 — gix_tix::edit::todo::parse_state has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (34 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • gix_tix::edit::head::perform_inner (cognitive 36) gix-tix/src/edit/head.rs:92 — gix_tix::edit::head::perform_inner has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 7, match/switch 6 (7 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • + 40 more in this group — see findings.md.
D3 · God Classes · FunctionTooLong · ×45
  • FunctionTooLong: gix_tix::event_loop gix-tix/src/lib.rs:1389 — FunctionTooLong — gix_tix::event_loop runs 3283 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 3183 over it, 32.83× 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: gix_merge::tree::function::resolve::tree gix-merge/src/tree/function/resolve.rs:97 — FunctionTooLong — gix_merge::tree::function::resolve::tree runs 1623 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 1523 over it, 16.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.
  • FunctionTooLong: gitoxide::plumbing::main::main src/plumbing/main.rs:30 — FunctionTooLong — gitoxide::plumbing::main::main runs 1099 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 999 over it, 10.99× 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: gix_tix::ui::draw_with_worktree gix-tix/src/ui.rs:426 — FunctionTooLong — gix_tix::ui::draw_with_worktree runs 853 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 753 over it, 8.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: gix_tix::edit::rebase::perform_plan_with_progress gix-tix/src/edit/rebase.rs:1816 — FunctionTooLong — gix_tix::edit::rebase::perform_plan_with_progress runs 481 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 381 over it, 4.81× 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: gix_tix::edit::rebase::perform_inner gix-tix/src/edit/rebase.rs:982 — FunctionTooLong — gix_tix::edit::rebase::perform_inner runs 434 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 334 over it, 4.34× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: gix_tix::draw gix-tix/src/lib.rs:6918 — FunctionTooLong — gix_tix::draw runs 303 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 203 over it, 3.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: gix_tix::edit::rebase::finish_review_with_progress gix-tix/src/edit/rebase.rs:1501 — FunctionTooLong — gix_tix::edit::rebase::finish_review_with_progress runs 271 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 171 over it, 2.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: gix_blame::file::function::file gix-blame/src/file/function.rs:76 — FunctionTooLong — gix_blame::file::function::file 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: gix::config::cache::init::apply_environment_overrides gix/src/config/cache/init.rs:406 — FunctionTooLong — gix::config::cache::init::apply_environment_overrides runs 245 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 145 over it, 2.45× 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: gix_tix::edit::transplant::build_plan gix-tix/src/edit/transplant/mod.rs:216 — FunctionTooLong — gix_tix::edit::transplant::build_plan 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: gix_tix::history::load gix-tix/src/history.rs:1217 — FunctionTooLong — gix_tix::history::load runs 233 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 133 over it, 2.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: gix_tix::edit::todo::parse gix-tix/src/edit/todo.rs:1213 — FunctionTooLong — gix_tix::edit::todo::parse runs 226 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 126 over it, 2.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: gix_tix::edit::todo::prepare gix-tix/src/edit/todo.rs:111 — FunctionTooLong — gix_tix::edit::todo::prepare 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.
  • FunctionTooLong: gix_glob::wildmatch::function::match_recursive gix-glob/src/wildmatch.rs:55 — FunctionTooLong — gix_glob::wildmatch::function::match_recursive runs 218 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 118 over it, 2.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: gix_tix::edit::time_travel::perform_reporting_rebased gix-tix/src/edit/time_travel.rs:773 — FunctionTooLong — gix_tix::edit::time_travel::perform_reporting_rebased runs 209 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 109 over it, 2.09× 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: gix::remote::connection::fetch::update_refs::update gix/src/remote/connection/fetch/update_refs/mod.rs:62 — FunctionTooLong — gix::remote::connection::fetch::update_refs::update runs 205 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 105 over it, 2.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: gix_date::parse::relative::apply_operations gix-date/src/parse/relative.rs:293 — FunctionTooLong — gix_date::parse::relative::apply_operations runs 199 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 99 over it, 1.99× 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: gix_tix::ui::metadata_columns gix-tix/src/ui.rs:2796 — FunctionTooLong — gix_tix::ui::metadata_columns runs 193 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 93 over it, 1.93× 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: gix_transport::client::blocking_io::http::curl::remote::new gix-transport/src/client/blocking_io/http/curl/remote.rs:412 — FunctionTooLong — gix_transport::client::blocking_io::http::curl::remote::new runs 187 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 87 over it, 1.87× 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: gix_tix::edit::auto_merge::order_plan gix-tix/src/edit/auto_merge/mod.rs:1269 — FunctionTooLong — gix_tix::edit::auto_merge::order_plan runs 169 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 69 over it, 1.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: gix_tix::edit::todo::prepare_continuation gix-tix/src/edit/todo.rs:375 — FunctionTooLong — gix_tix::edit::todo::prepare_continuation runs 167 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 67 over it, 1.67× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: gix_tix::command_menu::commands gix-tix/src/command_menu.rs:244 — FunctionTooLong — gix_tix::command_menu::commands runs 160 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 60 over it, 1.60× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: gix_tix::edit::time_travel::move_head_to_reporting gix-tix/src/edit/time_travel.rs:249 — FunctionTooLong — gix_tix::edit::time_travel::move_head_to_reporting runs 159 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 59 over it, 1.59× 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: gix_tix::command::write_history gix-tix/src/command.rs:574 — FunctionTooLong — gix_tix::command::write_history runs 155 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 55 over it, 1.55× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 20 more in this group — see findings.md.
D1 · Cyclomatic Complexity · gix_tix · ×39
  • gix_tix::event_loop (cyclomatic 570) gix-tix/src/lib.rs:1389 — gix_tix::event_loop has cyclomatic complexity 570 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • gix_tix::ui::draw_with_worktree (cyclomatic 170) gix-tix/src/ui.rs:426 — gix_tix::ui::draw_with_worktree has cyclomatic complexity 170 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • gix_tix::edit::rebase::perform_inner (cyclomatic 115) gix-tix/src/edit/rebase.rs:982 — gix_tix::edit::rebase::perform_inner has cyclomatic complexity 115 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • gix_tix::edit::rebase::perform_plan_with_progress (cyclomatic 96) gix-tix/src/edit/rebase.rs:1816 — gix_tix::edit::rebase::perform_plan_with_progress has cyclomatic complexity 96 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • gix_tix::command_menu::commands (cyclomatic 66) gix-tix/src/command_menu.rs:244 — gix_tix::command_menu::commands has cyclomatic complexity 66 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • gix_tix::edit::todo::parse (cyclomatic 66) gix-tix/src/edit/todo.rs:1213 — gix_tix::edit::todo::parse has cyclomatic complexity 66 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • gix_tix::draw (cyclomatic 51) gix-tix/src/lib.rs:6918 — gix_tix::draw has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • gix_tix::edit::transplant::build_plan (cyclomatic 49) gix-tix/src/edit/transplant/mod.rs:216 — gix_tix::edit::transplant::build_plan 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.
  • gix_tix::edit::auto_merge::order_plan (cyclomatic 43) gix-tix/src/edit/auto_merge/mod.rs:1269 — gix_tix::edit::auto_merge::order_plan has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • gix_tix::history::decorations_excluding (cyclomatic 43) gix-tix/src/history.rs:2208 — gix_tix::history::decorations_excluding has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • gix_tix::ui::metadata_columns (cyclomatic 43) gix-tix/src/ui.rs:2796 — gix_tix::ui::metadata_columns has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • gix_tix::app_action (cyclomatic 41) gix-tix/src/lib.rs:9575 — gix_tix::app_action has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent 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: gix_tix::action_with_shortcut_groups (cyclomatic 44) 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.
  • gix_tix::edit::todo::prepare (cyclomatic 41) gix-tix/src/edit/todo.rs:111 — gix_tix::edit::todo::prepare has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • gix_tix::history::load (cyclomatic 41) gix-tix/src/history.rs:1217 — gix_tix::history::load has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • gix_tix::edit::time_travel::move_head_to_reporting (cyclomatic 37) gix-tix/src/edit/time_travel.rs:249 — gix_tix::edit::time_travel::move_head_to_reporting has cyclomatic complexity 37 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • gix_tix::edit::time_travel::perform_reporting_rebased (cyclomatic 37) gix-tix/src/edit/time_travel.rs:773 — gix_tix::edit::time_travel::perform_reporting_rebased 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.
  • gix_tix::edit::rebase::finish_review_with_progress (cyclomatic 33) gix-tix/src/edit/rebase.rs:1501 — gix_tix::edit::rebase::finish_review_with_progress 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.
  • gix_tix::edit::auto_merge::prepare (cyclomatic 31) gix-tix/src/edit/auto_merge/mod.rs:584 — gix_tix::edit::auto_merge::prepare 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.
  • gix_tix::edit::todo::parse_state (cyclomatic 29) gix-tix/src/edit/todo.rs:994 — gix_tix::edit::todo::parse_state 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.
  • gix_tix::edit::head::perform_inner (cyclomatic 27) gix-tix/src/edit/head.rs:92 — gix_tix::edit::head::perform_inner 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.
  • gix_tix::edit::todo::prepare_continuation (cyclomatic 26) gix-tix/src/edit/todo.rs:375 — gix_tix::edit::todo::prepare_continuation 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.
  • gix_tix::ui::commit_title_spans (cyclomatic 26) gix-tix/src/ui.rs:2326 — gix_tix::ui::commit_title_spans has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • gix_tix::edit::replay_refs::unreachable_owners (cyclomatic 25) gix-tix/src/edit/replay_refs/mod.rs:225 — gix_tix::edit::replay_refs::unreachable_owners 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.
  • gix_tix::command::write_history (cyclomatic 24) gix-tix/src/command.rs:574 — gix_tix::command::write_history 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.
  • gix_tix::edit::rebase::update_refs (cyclomatic 24) gix-tix/src/edit/rebase.rs:3764 — gix_tix::edit::rebase::update_refs 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.
  • + 14 more in this group — see findings.md.
D3 · God Classes · MethodTooLong · ×32
  • MethodTooLong: App.update gix-tix/src/app.rs:1950 — MethodTooLong — update runs 493 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 393 over it, 4.93× 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: ThreadSafeRepository.open_from_paths gix/src/open/repository.rs:202 — MethodTooLong — open_from_paths runs 306 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 206 over it, 3.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Repository.transport_options gix/src/repository/config/transport.rs:24 — MethodTooLong — transport_options runs 291 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 191 over it, 2.91× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Pipeline.convert_to_diffable_inner gix-diff/src/blob/pipeline.rs:226 — MethodTooLong — convert_to_diffable_inner runs 236 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 136 over it, 2.36× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PrepareFetch.fetch_only gix/src/clone/fetch/mod.rs:24 — MethodTooLong — fetch_only runs 217 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 117 over it, 2.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.
  • MethodTooLong: Prepared.finish_inner gix-tix/src/edit/rebase.rs:2493 — MethodTooLong — finish_inner runs 209 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 109 over it, 2.09× 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: HistoryGraph.refresh_inner gix-tix/src/history.rs:773 — MethodTooLong — refresh_inner runs 196 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 96 over it, 1.96× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: File.resolve_deltas gix-pack/src/data/file/decode/entry.rs:235 — MethodTooLong — resolve_deltas runs 184 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 84 over it, 1.84× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Store.consolidate_with_disk_state gix-odb/src/store_impls/dynamic/load_index.rs:193 — MethodTooLong — consolidate_with_disk_state runs 182 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 82 over it, 1.82× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Remote.default gix-transport/src/client/blocking_io/http/reqwest/remote.rs:43 — MethodTooLong — default runs 165 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 65 over it, 1.65× 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: Tracker.find_file_renames gix-diff/src/rewrites/tracker.rs:329 — MethodTooLong — find_file_renames runs 156 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 56 over it, 1.56× 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: Platform.into_iter gix/src/status/iter/mod.rs:42 — MethodTooLong — into_iter runs 150 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 50 over it, 1.50× 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: Handle.try_find_cached_inner gix-odb/src/store_impls/dynamic/find.rs:53 — MethodTooLong — try_find_cached_inner runs 142 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 42 over it, 1.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: Overview.new gix-tix/src/ref_tree.rs:949 — MethodTooLong — new runs 142 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 42 over it, 1.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: PrepareDetached.receive gix/src/remote/connection/fetch/receive_pack.rs:90 — MethodTooLong — receive runs 140 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 40 over it, 1.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Store.verify_integrity gix-odb/src/store_impls/dynamic/verify.rs:95 — MethodTooLong — verify_integrity runs 138 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 38 over it, 1.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.
  • MethodTooLong: Repository.prepare_add_worktree gix/src/worktree/add.rs:124 — MethodTooLong — prepare_add_worktree runs 136 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 36 over it, 1.36× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Converter.convert gix-encoding/src/convert.rs:121 — MethodTooLong — convert runs 131 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 31 over it, 1.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Pipeline.convert_to_mergeable gix-merge/src/blob/pipeline.rs:141 — MethodTooLong — convert_to_mergeable runs 128 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 28 over it, 1.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.
  • MethodTooLong: App.update_tree_selection gix-tix/src/app/tree_selection/mod.rs:503 — MethodTooLong — update_tree_selection runs 126 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Transaction.prepare_inner gix-ref/src/store/file/transaction/prepare.rs:218 — MethodTooLong — prepare_inner runs 122 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Repository.try_find_remote_inner gix/src/repository/remote.rs:176 — MethodTooLong — try_find_remote_inner runs 122 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Engine.perform_run gitoxide-core/src/corpus/engine.rs:72 — MethodTooLong — perform_run runs 118 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 18 over it, 1.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: Cascade.invoke gix-credentials/src/helper/cascade.rs:85 — MethodTooLong — invoke runs 113 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 13 over it, 1.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: File.new gix-commitgraph/src/file/init.rs:30 — MethodTooLong — new runs 110 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 10 over it, 1.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.
  • + 7 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×24
  • FileTooLong: src/lib.rs gix-tix/src/lib.rs — FileTooLong — 7803 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 183 free functions. The bar is 500 significant lines; this is 7303 over it, 15.61× 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: edit/rebase.rs gix-tix/src/edit/rebase.rs — FileTooLong — 3143 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 53 free functions. The bar is 500 significant lines; this is 2643 over it, 6.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/app.rs gix-tix/src/app.rs — FileTooLong — 3043 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 72% of them inside a single declaration: App (579-3903). The bar is 500 significant lines; this is 2543 over it, 6.09× 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/ui.rs gix-tix/src/ui.rs — FileTooLong — 2540 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 60 free functions. The bar is 500 significant lines; this is 2040 over it, 5.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/history.rs gix-tix/src/history.rs — FileTooLong — 1835 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 37 free functions. The bar is 500 significant lines; this is 1335 over it, 3.67× 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: function/resolve.rs gix-merge/src/tree/function/resolve.rs — FileTooLong — 1715 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 1215 over it, 3.43× 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/ref_tree.rs gix-tix/src/ref_tree.rs — FileTooLong — 1315 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 815 over it, 2.63× 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: edit/todo.rs gix-tix/src/edit/todo.rs — FileTooLong — 1275 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 775 over it, 2.55× 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: edit/time_travel.rs gix-tix/src/edit/time_travel.rs — FileTooLong — 1162 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 40 free functions. The bar is 500 significant lines; this is 662 over it, 2.32× 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: plumbing/main.rs src/plumbing/main.rs — FileTooLong — 1128 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 628 over it, 2.26× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: auto_merge/mod.rs gix-tix/src/edit/auto_merge/mod.rs — FileTooLong — 1104 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 604 over it, 2.21× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: worktrunk/mod.rs gix-tix/src/worktrunk/mod.rs — FileTooLong — 934 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 434 over it, 1.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/command.rs gix-tix/src/command.rs — FileTooLong — 771 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 271 over it, 1.54× 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: options/mod.rs src/plumbing/options/mod.rs — FileTooLong — 768 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 268 over it, 1.54× 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: file/function.rs gix-blame/src/file/function.rs — FileTooLong — 719 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 219 over it, 1.44× 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: edit/undo.rs gix-tix/src/edit/undo.rs — FileTooLong — 711 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 43 free functions. The bar is 500 significant lines; this is 211 over it, 1.42× 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/legacy.rs gix-encoding/src/legacy.rs — FileTooLong — 670 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 170 over it, 1.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: cache/init.rs gix/src/config/cache/init.rs — FileTooLong — 563 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 63 over it, 1.13× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: blob/platform.rs gix-diff/src/blob/platform.rs — FileTooLong — 549 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 49 over it, 1.10× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: open/repository.rs gix/src/open/repository.rs — FileTooLong — 519 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 72% of them inside a single declaration: ThreadSafeRepository (56-610). The bar is 500 significant lines; this is 19 over it, 1.04× 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: tree_selection/mod.rs gix-tix/src/app/tree_selection/mod.rs — FileTooLong — 511 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 66% of them inside a single declaration: App (231-665). The bar is 500 significant lines; this is 11 over it, 1.02× 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: commit/simple.rs gix-traverse/src/commit/simple.rs — FileTooLong — 510 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 10 over it, 1.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: cache/access.rs gix/src/config/cache/access.rs — FileTooLong — 507 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 79% of them inside a single declaration: Cache (20-566). The bar is 500 significant lines; this is 7 over it, 1.01× 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: exn/impls.rs gix-error/src/exn/impls.rs — FileTooLong — 504 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 4 over it, 1.01× 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.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×20
  • Duplicated block (9 lines × 2) gitoxide-core/src/repository/fetch.rs:235 — gitoxide-core/src/repository/fetch.rs:235-243 | gitoxide-core/src/repository/remote.rs:176-184 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `gitoxide-core/src/repository/fetch.rs:235` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `gitoxide-core/src/repository/fetch.rs:244` calls `Some` and `gitoxide-core/src/repository/remote.rs:185` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) gix-config/src/file/mutable/section.rs:313 — gix-config/src/file/mutable/section.rs:313-321 | gix-config/src/file/section/mod.rs:298-306 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `gix-config/src/file/mutable/section.rs:313` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) gix-odb/src/store_impls/dynamic/handle.rs:268 — gix-odb/src/store_impls/dynamic/handle.rs:268-276 | gix-odb/src/store_impls/dynamic/handle.rs:286-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. Read the line range as the matched WINDOW rather than a finished unit: at `gix-odb/src/store_impls/dynamic/handle.rs:268` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `self` to `&OwnShared<Self>` in one and `&Arc<Self>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (9 lines × 2) gix-pack/src/data/delta.rs:42 — gix-pack/src/data/delta.rs:42-50 | gix-pack/src/data/delta.rs:54-62 — both copies are in the same file, so extract the block into 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) gix-protocol/src/handshake/refs/async_io.rs:11 — gix-protocol/src/handshake/refs/async_io.rs:11-19 | gix-protocol/src/handshake/refs/async_io.rs:42-50 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-protocol/src/handshake/refs/async_io.rs:11` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) gix-tix/src/app.rs:2308 — gix-tix/src/app.rs:2308-2316 | gix-tix/src/app.rs:2334-2342 — both copies are in the same file, so extract the block into 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) gix-tix/src/edit/review.rs:324 — gix-tix/src/edit/review.rs:324-332 | gix-tix/src/edit/time_travel.rs:183-191 — 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) gix-tix/src/history.rs:1876 — gix-tix/src/history.rs:1876-1884 | gix-tix/src/history.rs:2153-2161 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-tix/src/history.rs:1876` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) gix-tix/src/lib.rs:9109 — gix-tix/src/lib.rs:9109-9117 | gix-tix/src/lib.rs:9150-9158 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-tix/src/lib.rs:9109` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) gix-transport/src/client/git/async_io.rs:55 — gix-transport/src/client/git/async_io.rs:55-63 | gix-transport/src/client/git/blocking_io.rs:53-61 — before extracting anything, compare `gix-transport/src/client/git/async_io.rs` and `gix-transport/src/client/git/blocking_io.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 2) src/plumbing/main.rs:128 — src/plumbing/main.rs:128-136 | src/porcelain/main.rs:20-28 — 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) src/plumbing/options/mod.rs:814 — src/plumbing/options/mod.rs:814-822 | src/plumbing/options/mod.rs:894-902 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/plumbing/options/mod.rs:814` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) gix-transport/src/client/async_io/bufread_ext.rs:123 — gix-transport/src/client/async_io/bufread_ext.rs:123-131 | gix-transport/src/client/blocking_io/bufread_ext.rs:113-121 — 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) gix-transport/src/client/git/async_io.rs:117 — gix-transport/src/client/git/async_io.rs:117-125 | gix-transport/src/client/git/blocking_io.rs:112-120 — before extracting anything, compare `gix-transport/src/client/git/async_io.rs` and `gix-transport/src/client/git/blocking_io.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `gix-transport/src/client/git/async_io.rs:117` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) gix-tix/src/lib.rs:7882 — gix-tix/src/lib.rs:7882-7891 | gix-tix/src/lib.rs:8375-8383 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-tix/src/lib.rs:7882` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9 lines × 2) gix-tix/src/lib.rs:7736 — gix-tix/src/lib.rs:7736-7744 | gix-tix/src/lib.rs:7793-7801 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-tix/src/lib.rs:7736` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9 lines × 2) gix-tix/src/lib.rs:1433 — gix-tix/src/lib.rs:1433-1441 | gix-tix/src/lib.rs:1630-1638 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-tix/src/lib.rs:1433` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) gix-filter/src/driver/process/client.rs:40 — gix-filter/src/driver/process/client.rs:40-48 | gix-filter/src/driver/process/server.rs:40-48 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `gix-filter/src/driver/process/client.rs:40` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9 lines × 2) gix-tix/src/lib.rs:4597 — gix-tix/src/lib.rs:4597-4605 | gix-tix/src/lib.rs:4610-4618 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-tix/src/lib.rs:4597` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) gix-pack/fuzz/fuzz_targets/index_file.rs:13 — gix-pack/fuzz/fuzz_targets/index_file.rs:13-21 | gix-pack/fuzz/fuzz_targets/multi_index_file.rs:15-23 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `gix-pack/fuzz/fuzz_targets/index_file.rs:13` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `gix-pack/fuzz/fuzz_targets/multi_index_file.rs:24` calls `black_box`, `num_indices` and `gix-pack/fuzz/fuzz_targets/index_file.rs:22` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D2 · Cognitive Complexity · gitoxide_core · ×19
  • gitoxide_core::query::engine::update::update (cognitive 118) gitoxide-core/src/query/engine/update.rs:21 — gitoxide_core::query::engine::update::update has cognitive complexity 118 (threshold 15). Drivers by points: if/else 30 (70 pts), match/switch 8 (34 pts), loops 8 (12 pts), boolean chains 2 (nesting depth added 70). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • gitoxide_core::repository::clean::function::clean (cognitive 109) gitoxide-core/src/repository/clean.rs:42 — gitoxide_core::repository::clean::function::clean has cognitive complexity 109 (threshold 15). Drivers by points: if/else 42 (92 pts), boolean chains 8, match/switch 4 (8 pts), loops 1 (nesting depth added 54). 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.
  • gitoxide_core::hours::estimate (cognitive 62) gitoxide-core/src/hours/mod.rs:103 — gitoxide_core::hours::estimate has cognitive complexity 62 (threshold 15). Drivers by points: if/else 26 (41 pts), loops 6 (10 pts), match/switch 3 (6 pts), boolean chains 5 (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.
  • gitoxide_core::repository::remote::refs_impl::print_refmap (cognitive 50) gitoxide-core/src/repository/remote.rs:159 — gitoxide_core::repository::remote::refs_impl::print_refmap has cognitive complexity 50 (threshold 15). Drivers by points: if/else 10 (24 pts), match/switch 7 (20 pts), loops 3 (6 pts) (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • gitoxide_core::hours::core::spawn_tree_delta_threads (cognitive 45) gitoxide-core/src/hours/core.rs:84 — gitoxide_core::hours::core::spawn_tree_delta_threads has cognitive complexity 45 (threshold 15). Drivers by points: if/else 6 (25 pts), match/switch 5 (17 pts), loops 2 (3 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.
  • gitoxide_core::repository::attributes::validate_baseline::function::validate_baseline (cognitive 40) gitoxide-core/src/repository/attributes/validate_baseline.rs:32 — gitoxide_core::repository::attributes::validate_baseline::function::validate_baseline has cognitive complexity 40 (threshold 15). Drivers by points: if/else 16 (29 pts), loops 7 (8 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • gitoxide_core::repository::index::entries::function::print_entries (cognitive 38) gitoxide-core/src/repository/index/entries.rs:94 — gitoxide_core::repository::index::entries::function::print_entries has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (27 pts), match/switch 2 (7 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • gitoxide_core::repository::attributes::query::function::query (cognitive 31) gitoxide-core/src/repository/attributes/query.rs:27 — gitoxide_core::repository::attributes::query::function::query has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 3 (8 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • gitoxide_core::repository::fetch::function::print_updates (cognitive 31) gitoxide-core/src/repository/fetch.rs:203 — gitoxide_core::repository::fetch::function::print_updates has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (15 pts), match/switch 7 (13 pts), loops 2 (3 pts) (nesting depth added 16). Of this number, 30 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • gitoxide_core::repository::status::show (cognitive 26) gitoxide-core/src/repository/status.rs:50 — gitoxide_core::repository::status::show has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (14 pts), match/switch 5 (10 pts), boolean chains 1, loops 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.
  • gitoxide_core::organize::handle (cognitive 24) gitoxide-core/src/organize.rs:150 — gitoxide_core::organize::handle has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (16 pts), match/switch 5, boolean chains 2, loops 1 (nesting depth added 6). Of this number, 20 points are the body's own statements and 4 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.
  • gitoxide_core::repository::clone::function::clone (cognitive 23) gitoxide-core/src/repository/clone.rs:28 — gitoxide_core::repository::clone::function::clone has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (13 pts), loops 2 (6 pts), boolean chains 2, match/switch 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.
  • gitoxide_core::repository::odb::statistics (cognitive 21) gitoxide-core/src/repository/odb.rs:61 — gitoxide_core::repository::odb::statistics has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2 (3 pts), match/switch 2, 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.
  • gitoxide_core::index::checkout::checkout_exclusive (cognitive 20) gitoxide-core/src/index/checkout.rs:17 — gitoxide_core::index::checkout::checkout_exclusive has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9, loops 5 (9 pts), boolean chains 1, match/switch 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.
  • gitoxide_core::organize::find_git_repository_workdirs (cognitive 20) gitoxide-core/src/organize.rs:34 — gitoxide_core::organize::find_git_repository_workdirs has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 3). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 3 function items inside it that branch (is_repository, into_workdir, repository_at). 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.
  • gitoxide_core::repository::merge::tree::function::tree (cognitive 20) gitoxide-core/src/repository/merge/tree.rs:27 — gitoxide_core::repository::merge::tree::function::tree has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 5 (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.
  • gitoxide_core::repository::revision::list::function::list (cognitive 20) gitoxide-core/src/repository/revision/list.rs:35 — gitoxide_core::repository::revision::list::function::list has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 4 (10 pts), if/else 4 (6 pts), loops 2 (4 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.
  • gitoxide_core::pack::verify::pack_or_pack_index (cognitive 18) gitoxide-core/src/pack/verify.rs:88 — gitoxide_core::pack::verify::pack_or_pack_index has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 4 (8 pts), if/else 5 (6 pts), loops 1 (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.
  • gitoxide_core::pack::create::create (cognitive 16) gitoxide-core/src/pack/create.rs:94 — gitoxide_core::pack::create::create has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 2, match/switch 2, loops 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.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×18
  • Duplicated block (7 lines × 2) gitoxide-core/src/repository/diff.rs:206 — gitoxide-core/src/repository/diff.rs:206-212 | gix-tix/src/lib.rs:7561-7567 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `gix-tix/src/lib.rs:7560` calls `Some`, `count_additions`, `count_removals` and `gitoxide-core/src/repository/diff.rs:205` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) gitoxide-core/src/repository/merge/commit.rs:61 — gitoxide-core/src/repository/merge/commit.rs:61-67 | gitoxide-core/src/repository/merge/tree.rs:96-102 — 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) gix-object/src/parse.rs:20 — gix-object/src/parse.rs:20-26 | gix-object/src/parse.rs:86-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 (7 lines × 2) gix-object/src/traits/find.rs:219 — gix-object/src/traits/find.rs:219-225 | gix-object/src/traits/find.rs:237-243 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-object/src/traits/find.rs:219` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) gix-ref/src/store/file/overlay_iter.rs:398 — gix-ref/src/store/file/overlay_iter.rs:398-404 | gix-ref/src/store/file/overlay_iter.rs:408-414 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-ref/src/store/file/overlay_iter.rs:408` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) gix-tix/src/edit/rebase.rs:3943 — gix-tix/src/edit/rebase.rs:3943-3952 | gix-tix/src/edit/time_travel.rs:1348-1354 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `gix-tix/src/edit/rebase.rs:3943` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7 lines × 2) gix-tix/src/edit/time_travel.rs:624 — gix-tix/src/edit/time_travel.rs:624-630 | gix-tix/src/edit/time_travel.rs:929-935 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-tix/src/edit/time_travel.rs:624` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `gix-tix/src/edit/time_travel.rs:928` calls `filter`, `contains` and `gix-tix/src/edit/time_travel.rs:623` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) gix-tix/src/history.rs:417 — gix-tix/src/history.rs:417-423 | gix-tix/src/ref_tree.rs:1130-1136 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `gix-tix/src/history.rs:417` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) gix-tix/src/lib.rs:1457 — gix-tix/src/lib.rs:1457-1463 | gix-tix/src/lib.rs:2101-2107 — both copies are in the same file, so extract the block into 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) gix-transport/src/client/async_io/bufread_ext.rs:133 — gix-transport/src/client/async_io/bufread_ext.rs:133-139 | gix-transport/src/client/blocking_io/bufread_ext.rs:123-129 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (7 lines × 2) gix-packetline/src/async_io/encode.rs:74 — gix-packetline/src/async_io/encode.rs:74-80 | gix-packetline/src/async_io/encode.rs:99-105 — both copies are in the same file, so extract the block into 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) gix-revwalk/src/graph/mod.rs:210 — gix-revwalk/src/graph/mod.rs:210-216 | gix-revwalk/src/graph/mod.rs:261-267 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-revwalk/src/graph/mod.rs:210` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) gix-diff/src/blob/pipeline.rs:544 — gix-diff/src/blob/pipeline.rs:544-550 | gix-merge/src/blob/pipeline.rs:317-323 — before extracting anything, compare `gix-diff/src/blob/pipeline.rs` and `gix-merge/src/blob/pipeline.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) gix-error/src/error.rs:216 — gix-error/src/error.rs:216-222 | gix-error/src/exn/impls.rs:319-325 — 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) gix-object/src/commit/ref_iter.rs:155 — gix-object/src/commit/ref_iter.rs:155-161 | gix-object/src/tag/ref_iter.rs:74-80 — 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) gix-pack/src/cache/delta/traverse/resolve.rs:646 — gix-pack/src/cache/delta/traverse/resolve.rs:646-652 | gix-pack/src/data/file/decode/entry.rs:513-519 — 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) gix-tix/src/lib.rs:1521 — gix-tix/src/lib.rs:1521-1527 | gix-tix/src/lib.rs:3763-3769 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-tix/src/lib.rs:1521` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) gix-date/src/parse/git.rs:254 — gix-date/src/parse/git.rs:254-260 | gix-date/src/parse/git.rs:443-449 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-date/src/parse/git.rs:254` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×18
  • Duplicated block (5 lines × 2) gix-date/src/parse/git.rs:354 — gix-date/src/parse/git.rs:354-358 | gix-date/src/parse/git.rs:392-396 — both copies are in the same file, so extract the block into 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) gix-diff/src/index/function.rs:148 — gix-diff/src/index/function.rs:148-152 | gix-diff/src/index/function.rs:154-158 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (5 lines × 2) gix-imara-diff/src/sources.rs:175 — gix-imara-diff/src/sources.rs:175-179 | gix-imara-diff/src/sources.rs:208-212 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) gix-odb/src/store_impls/loose/find.rs:97 — gix-odb/src/store_impls/loose/find.rs:97-101 | gix-odb/src/store_impls/loose/find.rs:121-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. Read the line range as the matched WINDOW rather than a finished unit: at `gix-odb/src/store_impls/loose/find.rs:97` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (5 lines × 2) gix-prompt/src/unix.rs:42 — gix-prompt/src/unix.rs:42-46 | gix-prompt/src/unix.rs:61-65 — both copies are in the same file, so extract the block into 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) gix-tix/src/app.rs:3301 — gix-tix/src/app.rs:3301-3305 | gix-tix/src/app.rs:3513-3517 — both copies are in the same file, so extract the block into 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) gix-tix/src/edit/time_travel.rs:1431 — gix-tix/src/edit/time_travel.rs:1431-1435 | gix-tix/src/edit/time_travel.rs:1459-1463 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-tix/src/edit/time_travel.rs:1431` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) gix-config/src/file/section/mod.rs:202 — gix-config/src/file/section/mod.rs:202-206 | gix-config/src/file/write.rs:10-14 — 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) gix-config/src/format.rs:96 — gix-config/src/format.rs:96-100 | gix-config/src/parse/format.rs:81-85 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `options` to `Options` in one and `&Options` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (5 lines × 2) gix-hash/src/io.rs:107 — gix-hash/src/io.rs:107-111 | gix-pack/src/data/input/bytes_to_entries.rs:307-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 (5 lines × 2) gix/src/config/tree/sections/diff.rs:230 — gix/src/config/tree/sections/diff.rs:230-234 | gix/src/config/tree/sections/merge.rs:159-163 — 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) gitoxide-core/src/repository/attributes/validate_baseline.rs:78 — gitoxide-core/src/repository/attributes/validate_baseline.rs:78-82 | gitoxide-core/src/repository/attributes/validate_baseline.rs:131-135 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gitoxide-core/src/repository/attributes/validate_baseline.rs:78` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) gix-tix/src/command.rs:838 — gix-tix/src/command.rs:838-842 | gix-tix/src/command.rs:931-935 — both copies are in the same file, so extract the block into 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) gitoxide-core/src/repository/fetch.rs:169 — gitoxide-core/src/repository/fetch.rs:169-173 | gitoxide-core/src/repository/revision/list.rs:127-131 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `gitoxide-core/src/repository/revision/list.rs:125` calls `show_throughput`, `Some` and `gitoxide-core/src/repository/fetch.rs:167` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 2) gix-config/src/file/includes/mod.rs:158 — gix-config/src/file/includes/mod.rs:158-162 | gix-config/src/file/includes/mod.rs:179-183 — both copies are in the same file, so extract the block into 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) gix-odb/src/store_impls/loose/write.rs:35 — gix-odb/src/store_impls/loose/write.rs:35-39 | gix-odb/src/store_impls/loose/write.rs:52-56 — both copies are in the same file, so extract the block into 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) gix-odb/src/store_impls/loose/write.rs:72 — gix-odb/src/store_impls/loose/write.rs:72-76 | gix-odb/src/store_impls/loose/write.rs:90-94 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) gix-pack/src/cache/delta/tree.rs:120 — gix-pack/src/cache/delta/tree.rs:120-124 | gix-pack/src/cache/delta/tree.rs:176-180 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-pack/src/cache/delta/tree.rs:120` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `self` to `super) fn set_pack_entries_end_and_resolve_ref_offsets( &mut` in one and `crate) fn add_root(&mut` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×16
  • Duplicated block (6 lines × 2) gix-tix/src/edit/auto_merge/mod.rs:1319 — gix-tix/src/edit/auto_merge/mod.rs:1319-1324 | gix-tix/src/edit/rebase.rs:1915-1920 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `gix-tix/src/edit/auto_merge/mod.rs:1319` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) gix-tix/src/lib.rs:4282 — gix-tix/src/lib.rs:4282-4287 | gix-tix/src/lib.rs:5034-5039 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (6 lines × 2) gix-tix/src/lib.rs:4349 — gix-tix/src/lib.rs:4349-4354 | gix-tix/src/lib.rs:4403-4408 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (6 lines × 2) gix-tix/src/lib.rs:9706 — gix-tix/src/lib.rs:9706-9711 | gix-tix/src/lib.rs:9725-9730 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-tix/src/lib.rs:9706` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) gix-tix/src/app.rs:2217 — gix-tix/src/app.rs:2217-2222 | gix-tix/src/app.rs:2228-2233 — both copies are in the same file, so extract the block into 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) gix-tix/src/app.rs:4013 — gix-tix/src/app.rs:4013-4018 | gix-tix/src/app.rs:4030-4035 — both copies are in the same file, so extract the block into 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) gix-tix/src/edit/time_travel.rs:405 — gix-tix/src/edit/time_travel.rs:405-410 | gix-tix/src/edit/time_travel.rs:650-655 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) gix-tix/src/history.rs:1505 — gix-tix/src/history.rs:1505-1510 | gix-tix/src/history.rs:2222-2227 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-tix/src/history.rs:1505` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) gix-tix/src/lib.rs:5097 — gix-tix/src/lib.rs:5097-5102 | gix-tix/src/lib.rs:7238-7243 — both copies are in the same file, so extract the block into 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) gix-transport/src/client/async_io/bufread_ext.rs:117 — gix-transport/src/client/async_io/bufread_ext.rs:117-122 | gix-transport/src/client/blocking_io/bufread_ext.rs:107-112 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `gix-transport/src/client/async_io/bufread_ext.rs:117` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) gix-error/src/error.rs:203 — gix-error/src/error.rs:203-208 | gix-error/src/exn/impls.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) gix-transport/src/client/blocking_io/http/curl/mod.rs:150 — gix-transport/src/client/blocking_io/http/curl/mod.rs:150-155 | gix-transport/src/client/blocking_io/http/reqwest/remote.rs:390-395 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `config` to `&dyn std::any::Any` in one and `&dyn Any` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (6 lines × 2) gix-tix/src/edit/delete.rs:138 — gix-tix/src/edit/delete.rs:138-143 | gix-tix/src/edit/delete.rs:150-155 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-tix/src/edit/delete.rs:138` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) gix-tix/src/lib.rs:629 — gix-tix/src/lib.rs:629-634 | gix-tix/src/lib.rs:639-644 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-tix/src/lib.rs:629` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) gix-filter/src/driver/process/client.rs:30 — gix-filter/src/driver/process/client.rs:30-35 | gix-filter/src/driver/process/client.rs:81-86 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) gix-credentials/src/protocol/context/serde.rs:65 — gix-credentials/src/protocol/context/serde.rs:65-70 | gix-credentials/src/protocol/context/serde.rs:78-83 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-credentials/src/protocol/context/serde.rs:65` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D3 · God Classes · TooManyMethods · ×13
  • TooManyMethods: App gix-tix/src/app.rs:579 — TooManyMethods — 227 methods, declared across 3 files: src/app.rs (207), tree_selection/mod.rs (14), prefix/mod.rs (6). The bar is 30 methods; this is 197 over it, 7.57× 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: Repository gix/src/types.rs:159 — TooManyMethods — 203 methods, declared across 36 files: repository/object.rs (23), config/mod.rs (21), repository/reference.rs (20), repository/location.rs (19), +32 more file(s). The bar is 30 methods; this is 173 over it, 6.77× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: File gix-config/src/types.rs:104 — TooManyMethods — 142 methods, declared across 11 files: access/raw.rs (39), access/read_only.rs (29), access/comfort.rs (28), access/mutate.rs (25), +7 more file(s). The bar is 30 methods; this is 112 over it, 4.73× 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: State gix-index/src/lib.rs:136 — TooManyMethods — 56 methods, declared across 5 files: access/mod.rs (48), src/write.rs (3), src/init.rs (2), src/verify.rs (2), +1 more file(s). The bar is 30 methods; this is 26 over it, 1.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: Store gix-ref/src/lib.rs:131 — TooManyMethods — 53 methods, declared across 9 files: file/find.rs (17), loose/reflog.rs (9), file/packed.rs (7), file/mod.rs (5), +5 more file(s). The bar is 30 methods; this is 23 over it, 1.77× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Store gix-odb/src/lib.rs:149 — TooManyMethods — 43 methods, declared across 12 files: dynamic/load_index.rs (10), dynamic/handle.rs (8), loose/find.rs (7), loose/write.rs (5), +8 more file(s). The bar is 30 methods; this is 13 over it, 1.43× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SectionMut gix-config/src/file/mutable/section.rs:21 — 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: Tree gix-tix/src/ref_tree.rs:147 — TooManyMethods — 34 methods. The bar is 30 methods; this is 4 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.
  • TooManyMethods: Cache gix/src/config/mod.rs:198 — TooManyMethods — 34 methods, declared across 2 files: cache/access.rs (30), cache/init.rs (4). The bar is 30 methods; this is 4 over it, 1.13× 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: Message gix-error/src/concrete/metadata.rs:206 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Menu gix-tix/src/menu.rs:30 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Worktrees gix-tix/src/worktrunk/mod.rs:114 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: HistoryGraph gix-tix/src/history.rs:149 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D1 · Cyclomatic Complexity · gitoxide_core · ×12
  • gitoxide_core::repository::clean::function::clean (cyclomatic 55) gitoxide-core/src/repository/clean.rs:42 — gitoxide_core::repository::clean::function::clean 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.
  • gitoxide_core::query::engine::update::update (cyclomatic 47) gitoxide-core/src/query/engine/update.rs:21 — gitoxide_core::query::engine::update::update 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.
  • gitoxide_core::hours::estimate (cyclomatic 37) gitoxide-core/src/hours/mod.rs:103 — gitoxide_core::hours::estimate 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.
  • gitoxide_core::repository::status::show (cyclomatic 25) gitoxide-core/src/repository/status.rs:50 — gitoxide_core::repository::status::show 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.
  • gitoxide_core::repository::attributes::validate_baseline::function::validate_baseline (cyclomatic 23) gitoxide-core/src/repository/attributes/validate_baseline.rs:32 — gitoxide_core::repository::attributes::validate_baseline::function::validate_baseline 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.
  • gitoxide_core::organize::handle (cyclomatic 20) gitoxide-core/src/organize.rs:150 — gitoxide_core::organize::handle has cyclomatic complexity 20 (threshold 15). Of this number, 17 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.
  • gitoxide_core::hours::core::spawn_tree_delta_threads (cyclomatic 18) gitoxide-core/src/hours/core.rs:84 — gitoxide_core::hours::core::spawn_tree_delta_threads 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.
  • gitoxide_core::organize::find_git_repository_workdirs (cyclomatic 18) gitoxide-core/src/organize.rs:34 — gitoxide_core::organize::find_git_repository_workdirs has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to 3 function items inside it that branch (is_repository, into_workdir, repository_at). 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.
  • gitoxide_core::repository::merge::tree::function::tree (cyclomatic 18) gitoxide-core/src/repository/merge/tree.rs:27 — gitoxide_core::repository::merge::tree::function::tree 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.
  • gitoxide_core::repository::remote::refs_impl::print_refmap (cyclomatic 18) gitoxide-core/src/repository/remote.rs:159 — gitoxide_core::repository::remote::refs_impl::print_refmap 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.
  • gitoxide_core::index::checkout::checkout_exclusive (cyclomatic 16) gitoxide-core/src/index/checkout.rs:17 — gitoxide_core::index::checkout::checkout_exclusive has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • gitoxide_core::repository::odb::statistics (cyclomatic 16) gitoxide-core/src/repository/odb.rs:61 — gitoxide_core::repository::odb::statistics 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.
D5 · Coupling · Off the main sequence · ×12
  • Off the main sequence: gix-path — gix-path: abstractness 0.00, instability 0.09, distance 0.91 — zone of pain — concrete and depended on by 29 project(s), so it's rigid to change.
  • Off the main sequence: gix-hash — gix-hash: abstractness 0.00, instability 0.11, distance 0.89 — zone of pain — concrete and depended on by 25 project(s), so it's rigid to change.
  • Off the main sequence: gix-hashtable — gix-hashtable: abstractness 0.00, instability 0.11, distance 0.89 — zone of pain — concrete and depended on by 8 project(s), so it's rigid to change.
  • Off the main sequence: gix-imara-diff — gix-imara-diff: abstractness 0.12, instability 0.00, distance 0.88 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
  • Off the main sequence: gix-trace — gix-trace: abstractness 0.09, instability 0.04, distance 0.88 — zone of pain — concrete and depended on by 27 project(s), so it's rigid to change.
  • Off the main sequence: gix-tempfile — gix-tempfile: abstractness 0.00, instability 0.13, distance 0.88 — zone of pain — concrete and depended on by 7 project(s), so it's rigid to change.
  • Off the main sequence: gix-validate — gix-validate: abstractness 0.00, instability 0.13, distance 0.88 — zone of pain — concrete and depended on by 7 project(s), so it's rigid to change.
  • Off the main sequence: gix-date — gix-date: 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: gix-error — gix-error: abstractness 0.17, instability 0.00, distance 0.83 — zone of pain — concrete and depended on by 54 project(s), so it's rigid to change.
  • Off the main sequence: gix-zlib — gix-zlib: abstractness 0.00, instability 0.20, distance 0.80 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
  • Off the main sequence: gix-utils — gix-utils: abstractness 0.16, instability 0.04, distance 0.80 — zone of pain — concrete and depended on by 22 project(s), so it's rigid to change.
  • Off the main sequence: gix-parallel — gix-parallel: abstractness 0.20, instability 0.08, distance 0.72 — zone of pain — concrete and depended on by 12 project(s), so it's rigid to change.
D6 · Cohesion (LCOM4) · Low cohesion · ×11
  • Low cohesion: Reference (LCOM4 28) gix-ref/src/raw.rs:8 — Reference's methods fall into 28 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 28 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: FullNameRef (LCOM4 11) gix-ref/src/lib.rs:143 — FullNameRef's methods fall into 11 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 11 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: PartialNameRef (LCOM4 11) gix-ref/src/lib.rs:148 — PartialNameRef's methods fall into 11 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 11 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Prepare (LCOM4 10) gix-command/src/lib.rs:70 — Prepare's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: FullName (LCOM4 9) gix-ref/src/lib.rs:138 — FullName'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.
  • Low cohesion: PartialName (LCOM4 9) gix-ref/src/lib.rs:153 — PartialName'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.
  • Low cohesion: Any (LCOM4 8) gix/src/config/tree/keys.rs:15 — Any's methods fall into 8 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 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Namespace (LCOM4 7) gix-ref/src/lib.rs:158 — Namespace's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: CommitRefIter (LCOM4 6) gix-object/src/lib.rs:137 — CommitRefIter's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Object (LCOM4 5) gix/src/types.rs:37 — Object's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Vec (LCOM4 4) gix-bitmap/src/ewah.rs:173 — Vec's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
D15 · Churn × Complexity Hotspots · Repeated repair · ×10
  • Repeated repair: gix-path/src/env/mod.rs gix-path/src/env/mod.rs:102 — gix-path/src/env/mod.rs changed 27 times in last 90 days and 23 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is gix_path::env::shell_command at line 102), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(gix-path): skip the Git query without `/etc/gitconfig`”; “fix(gix-path): infer known Unix config paths without running Git (#3182)”; “fix(gix-path): share MSYS2 path conversion across discovery calls”; “fix(gix-path): reuse native Git prefixes across discovery calls”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gix-path/src/env/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: gix-path/src/env/git/mod.rs gix-path/src/env/git/mod.rs:126 — gix-path/src/env/git/mod.rs changed 22 times in last 90 days and 18 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is gix_path::env::git::config_paths_from_config_with_origin at line 126), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(gix-path): skip the Git query without `/etc/gitconfig`”; “fix(gix-path): infer known Unix config paths without running Git (#3182)”; “fix(gix-path): share MSYS2 path conversion across discovery calls”; “fix(gix-path): prioritize cheap Windows Git discovery probes”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gix-path/src/env/git/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: gix-tix/src/edit/review.rs gix-tix/src/edit/review.rs:277 — gix-tix/src/edit/review.rs changed 32 times in last 90 days and 17 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is gix_tix::edit::review::finish_with_progress at line 277), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(gix-tix): make finishing reviews undoable”; “fix(gix-tix): preserve commits below a finished review”; “fix(gix-tix): Isolate Tix tests from the invoking worktree and environment”; “fix(gix-tix): keep metadata-only descendants fully replayed”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gix-tix/src/edit/review.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: gix-tix/src/worktrunk/mod.rs gix-tix/src/worktrunk/mod.rs:264 — gix-tix/src/worktrunk/mod.rs changed 19 times in last 90 days and 10 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is Worktrees::edit_search at line 264), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(gix-path)!: return path conversion errors instead of panicking”; “fix(gix-tix): Isolate Tix tests from the invoking worktree and environment”; “fix(gix-tix): track detached offspring from unpinned sources”; “fix(gix-tix)!: hand worktree switches back to the shell”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gix-tix/src/worktrunk/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: gix-pack/src/lib.rs gix-pack/src/lib.rs:94 — gix-pack/src/lib.rs changed 6 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is gix_pack::source_name at line 94), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(gix-pack): allow more metadata for packs with small objects (#3199)”; “fix(gix-pack)!: enforce allocation limits for pack traversal metadata”; “fix: map packs read-only on Windows so large ones can be opened”; “fix(gix-pack): avoid aborts in remaining capacity hints”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gix-pack/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.
  • Repeated repair: gix-command/src/lib.rs gix-command/src/lib.rs:166 — gix-command/src/lib.rs changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is gix_command::win_path_lookup at line 166), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(gix-filter): run filter drivers from the worktree root”; “fix(gix-path)!: return path conversion errors instead of panicking”; “fix(gix-command): safely split commands and ignore shebang options”; “fix(gix-command): invoke existing absolute paths directly”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gix-command/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.
  • Repeated repair: gix-worktree/src/stack/state/ignore.rs gix-worktree/src/stack/state/ignore.rs:162 — gix-worktree/src/stack/state/ignore.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is Ignore::push_directory at line 162), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(gix-path)!: return path conversion errors instead of panicking”; “fix(gix-worktree): skip symlinked ignore files and protect checkout writes”; “fix(gix-worktree): keep descendants of ignored directories excluded”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gix-worktree/src/stack/state/ignore.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: gix-fs/src/symlink.rs gix-fs/src/symlink.rs:177 — gix-fs/src/symlink.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is gix_fs::symlink::target_is_dir at line 177), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(gix-fs): guard indirect Windows symlink targets before probing”; “fix(gix-worktree-state): resolve Windows directory symlink chains”; “fix(gix-fs): avoid probing slash-prefixed symlink targets on Windows”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gix-fs/src/symlink.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: gix-transport/src/client/git/mod.rs gix-transport/src/client/git/mod.rs:28 — gix-transport/src/client/git/mod.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is gix_transport::client::git::message::connect at line 28), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(gix-transport): connect to `git://` URLs with an IPv6 address”; “fix(gix-path)!: return path conversion errors instead of panicking”; “fix(gix-transport): reject control bytes in git daemon requests”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gix-transport/src/client/git/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: gix-discover/src/repository.rs gix-discover/src/repository.rs:205 — gix-discover/src/repository.rs changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is Path::from_dot_git_dir at line 205), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(gix-testtools): return absolute read-only fixture paths”; “fix(gix-path)!: return path conversion errors instead of panicking”; “fix(gix-discover): derive trust from all detected repository paths”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 05:32:08 +01:00' --until='2026-11-13 05:32:08 +01:00' --full-history --no-merges -- gix-discover/src/repository.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D2 · Cognitive Complexity · gix · ×10
  • gix::remote::connection::fetch::update_refs::update (cognitive 92) gix/src/remote/connection/fetch/update_refs/mod.rs:62 — gix::remote::connection::fetch::update_refs::update has cognitive complexity 92 (threshold 15). Drivers by points: if/else 18 (51 pts), match/switch 11 (37 pts), boolean chains 2, loops 2 (nesting depth added 59). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • gix::config::snapshot::credential_helpers::function::credential_helpers (cognitive 41) gix/src/config/snapshot/credential_helpers.rs:69 — gix::config::snapshot::credential_helpers::function::credential_helpers has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (29 pts), loops 2 (6 pts), boolean chains 3, match/switch 1 (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.
  • gix::worktree::remove::resolve (cognitive 24) gix/src/worktree/remove.rs:309 — gix::worktree::remove::resolve has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 5 (8 pts), loops 3, 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.
  • gix::config::cache::init::apply_environment_overrides (cognitive 23) gix/src/config/cache/init.rs:406 — gix::config::cache::init::apply_environment_overrides has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (19 pts), 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.
  • gix::open::repository::check_safe_directories (cognitive 23) gix/src/open/repository.rs:717 — gix::open::repository::check_safe_directories has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (19 pts), match/switch 1 (3 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • gix::submodule::url::resolve_relative_url (cognitive 23) gix/src/submodule/url.rs:110 — gix::submodule::url::resolve_relative_url has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 5, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • gix::clone::fetch::util::update_head (cognitive 22) gix/src/clone/fetch/util.rs:236 — gix::clone::fetch::util::update_head has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 4 (8 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.
  • gix::remote::connection::fetch::update_refs::update_needs_adjustment_as_edits_symbolic_target_is_missing (cognitive 22) gix/src/remote/connection/fetch/update_refs/mod.rs:353 — gix::remote::connection::fetch::update_refs::update_needs_adjustment_as_edits_symbolic_target_is_missing has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (16 pts), match/switch 3 (6 pts) (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.
  • gix::repository::worktree::insert_head (cognitive 20) gix/src/repository/worktree.rs:242 — gix::repository::worktree::insert_head has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2, 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.
  • gix::create::into_with_capabilities (cognitive 16) gix/src/create.rs:148 — gix::create::into_with_capabilities has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 2, boolean chains 1, match/switch 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gix_encoding · ×10
  • gix_encoding::fast::run (cognitive 57) gix-encoding/src/fast.rs:5 — gix_encoding::fast::run has cognitive complexity 57 (threshold 15). Drivers by points: if/else 18 (42 pts), loops 4 (8 pts), match/switch 3 (5 pts), boolean chains 2 (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.
  • gix_encoding::legacy::bulk (cognitive 57) gix-encoding/src/legacy.rs:553 — gix_encoding::legacy::bulk has cognitive complexity 57 (threshold 15). Drivers by points: if/else 15 (30 pts), boolean chains 12, loops 4 (9 pts), match/switch 2 (6 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.
  • gix_encoding::unicode::decode (cognitive 41) gix-encoding/src/unicode.rs:10 — gix_encoding::unicode::decode has cognitive complexity 41 (threshold 15). Drivers by points: if/else 19 (30 pts), match/switch 4 (11 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.
  • gix_encoding::fast::utf8_unicode (cognitive 31) gix-encoding/src/fast.rs:110 — gix_encoding::fast::utf8_unicode has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (27 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • gix_encoding::legacy::decode_iso2022_bulk (cognitive 30) gix-encoding/src/legacy.rs:689 — gix_encoding::legacy::decode_iso2022_bulk has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (21 pts), match/switch 2 (6 pts), boolean chains 2, 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.
  • gix_encoding::legacy::decode (cognitive 23) gix-encoding/src/legacy.rs:268 — gix_encoding::legacy::decode has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 2, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • gix_encoding::legacy::decode_gb18030_bulk (cognitive 21) gix-encoding/src/legacy.rs:820 — gix_encoding::legacy::decode_gb18030_bulk has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • gix_encoding::detect::function::detect (cognitive 19) gix-encoding/src/detect/function.rs:49 — gix_encoding::detect::function::detect has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 3, 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.
  • gix_encoding::legacy::encode_iso2022_bulk (cognitive 18) gix-encoding/src/legacy.rs:742 — gix_encoding::legacy::encode_iso2022_bulk has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 2 (5 pts), boolean chains 2, 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.
  • gix_encoding::legacy::encode_gb18030_bulk (cognitive 17) gix-encoding/src/legacy.rs:780 — gix_encoding::legacy::encode_gb18030_bulk 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.
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×10
  • Edited copy of a member (10 corresponding lines) gix-object/src/tag/write.rs:38 — gix-object/src/tag/write.rs:38-48 | gix-object/src/tag/write.rs:75-84 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) gix-tix/src/history.rs:568 — gix-tix/src/history.rs:568-577 | gix-tix/src/history.rs:1097-1106 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) gix-tix/src/app.rs:3443 — gix-tix/src/app.rs:3443-3452 | gix-tix/src/app.rs:3557-3566 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) gix-protocol/src/fetch/response/mod.rs:36 — gix-protocol/src/fetch/response/mod.rs:36-49 | gix-protocol/src/fetch/response/mod.rs:90-99 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) gix-merge/src/blob/builtin_driver/text/utils.rs:359 — gix-merge/src/blob/builtin_driver/text/utils.rs:359-368 | gix-merge/src/blob/builtin_driver/text/utils.rs:371-381 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) gix-diff/src/blob/platform.rs:170 — gix-diff/src/blob/platform.rs:170-184 | gix-merge/src/blob/platform/resource.rs:7-16 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) gix-tix/src/enrich.rs:222 — gix-tix/src/enrich.rs:222-231 | gix-tix/src/enrich.rs:264-274 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) gix-tix/src/menu.rs:199 — gix-tix/src/menu.rs:199-208 | gix-tix/src/menu.rs:214-227 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) gix-pack/src/cache/lru.rs:37 — gix-pack/src/cache/lru.rs:37-46 | gix-pack/src/cache/object.rs:42-52 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) gix-error/src/error.rs:151 — gix-error/src/error.rs:151-160 | gix-error/src/exn/impls.rs:127-137 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×10
  • Duplicated block (11 lines × 2) gix-diff/src/tree/function.rs:225 — gix-diff/src/tree/function.rs:225-235 | gix-diff/src/tree/function.rs:279-289 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-diff/src/tree/function.rs:225` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 2) gix-hash/src/object_id.rs:70 — gix-hash/src/object_id.rs:70-80 | gix-hash/src/object_id.rs:85-95 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-hash/src/object_id.rs:70` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) gix-index/src/access/mod.rs:354 — gix-index/src/access/mod.rs:354-364 | gix-index/src/access/mod.rs:449-459 — both copies are in the same file, so extract the block into 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) gix-pack/src/bundle/write/mod.rs:100 — gix-pack/src/bundle/write/mod.rs:100-110 | gix-pack/src/bundle/write/mod.rs:213-223 — both copies are in the same file, so extract the block into 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) gix-tix/src/command/enrich.rs:261 — gix-tix/src/command/enrich.rs:261-271 | gix-tix/src/lib.rs:7782-7792 — 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) gix-tix/src/lib.rs:1650 — gix-tix/src/lib.rs:1650-1660 | gix-tix/src/lib.rs:1754-1764 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-tix/src/lib.rs:1650` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) gix/src/config/cache/access.rs:50 — gix/src/config/cache/access.rs:50-60 | gix/src/config/cache/access.rs:104-114 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix/src/config/cache/access.rs:50` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `gix/src/config/cache/access.rs:117` calls `into` and `gix/src/config/cache/access.rs:63` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 2) src/plumbing/main.rs:1258 — src/plumbing/main.rs:1258-1268 | src/plumbing/main.rs:1310-1320 — both copies are in the same file, so extract the block into 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) gix-tix/src/lib.rs:8629 — gix-tix/src/lib.rs:8629-8639 | gix-tix/src/lib.rs:9161-9171 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-tix/src/lib.rs:8629` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) gix-pack/fuzz/fuzz_targets/index_file.rs:34 — gix-pack/fuzz/fuzz_targets/index_file.rs:34-44 | gix-pack/fuzz/fuzz_targets/multi_index_file.rs:37-47 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `gix-pack/fuzz/fuzz_targets/index_file.rs:34` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D2 · Cognitive Complexity · Store · ×9
  • Store::consolidate_with_disk_state (cognitive 85) gix-odb/src/store_impls/dynamic/load_index.rs:193 — Store::consolidate_with_disk_state has cognitive complexity 85 (threshold 15). Drivers by points: if/else 30 (62 pts), match/switch 4 (13 pts), boolean chains 5, loops 4 (5 pts) (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Store::load_next_index (cognitive 30) gix-odb/src/store_impls/dynamic/load_index.rs:111 — Store::load_next_index has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (15 pts), match/switch 2 (8 pts), loops 3 (7 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.
  • Store::metrics (cognitive 29) gix-odb/src/store_impls/dynamic/metrics.rs:9 — Store::metrics has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (16 pts), match/switch 3 (8 pts), loops 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.
  • Store::load_pack (cognitive 26) gix-odb/src/store_impls/dynamic/load_one.rs:14 — Store::load_pack has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 8 (24 pts), if/else 2 (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.
  • Store::find_inner (cognitive 25) gix-ref/src/store/file/find.rs:222 — Store::find_inner has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (18 pts), match/switch 3 (5 pts), boolean chains 2 (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.
  • Store::lookup_prefix (cognitive 19) gix-odb/src/store_impls/loose/find.rs:26 — Store::lookup_prefix has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 5 (11 pts), if/else 3 (7 pts), loops 1 (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.
  • Store::find_one_with_verified_input_filtered (cognitive 19) gix-ref/src/store/file/find.rs:146 — Store::find_one_with_verified_input_filtered has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 2 (4 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Store::reflog_create_or_append (cognitive 18) gix-ref/src/store/file/loose/reflog.rs:144 — Store::reflog_create_or_append has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 2 (3 pts), 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.
  • Store::verify_integrity (cognitive 16) gix-odb/src/store_impls/dynamic/verify.rs:95 — Store::verify_integrity has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 4 (11 pts), if/else 2 (3 pts), loops 2 (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×9
  • Duplicated block (12 lines × 2) gitoxide-core/src/corpus/db.rs:63 — gitoxide-core/src/corpus/db.rs:63-74 | gitoxide-core/src/query/db.rs:17-28 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `gitoxide-core/src/corpus/db.rs:63` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) gix-imara-diff/src/slider_heuristic.rs:210 — gix-imara-diff/src/slider_heuristic.rs:210-221 | gix-imara-diff/src/slider_heuristic.rs:230-241 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-imara-diff/src/slider_heuristic.rs:210` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) gix-pathspec/src/search/matching.rs:134 — gix-pathspec/src/search/matching.rs:134-145 | gix-pathspec/src/search/matching.rs:196-207 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-pathspec/src/search/matching.rs:134` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) gix-tix/src/edit/rebase.rs:583 — gix-tix/src/edit/rebase.rs:583-594 | gix-tix/src/edit/rebase.rs:3808-3819 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-tix/src/edit/rebase.rs:583` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) gix-transport/src/client/git/async_io.rs:147 — gix-transport/src/client/git/async_io.rs:147-158 | gix-transport/src/client/git/blocking_io.rs:142-153 — before extracting anything, compare `gix-transport/src/client/git/async_io.rs` and `gix-transport/src/client/git/blocking_io.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) gix-worktree/src/stack/state/attributes.rs:110 — gix-worktree/src/stack/state/attributes.rs:110-121 | gix-worktree/src/stack/state/attributes.rs:150-161 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-worktree/src/stack/state/attributes.rs:110` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) gix-packetline/src/async_io/read.rs:46 — gix-packetline/src/async_io/read.rs:46-57 | gix-packetline/src/blocking_io/read.rs:44-55 — `gix-packetline/src/async_io/read.rs` and `gix-packetline/src/blocking_io/read.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 95 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (12 lines × 2) gix-tix/src/app.rs:2436 — gix-tix/src/app.rs:2436-2447 | gix-tix/src/app.rs:2467-2478 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-tix/src/app.rs:2436` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) gix-diff/src/tree/recorder.rs:122 — gix-diff/src/tree/recorder.rs:122-133 | gix-traverse/src/tree/recorder.rs:120-131 — 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 (10 lines × 2) · ×9
  • Duplicated block (10 lines × 2) gix-merge/src/blob/builtin_driver/text/function.rs:174 — gix-merge/src/blob/builtin_driver/text/function.rs:174-183 | gix-merge/src/blob/builtin_driver/text/function.rs:201-210 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) gix-merge/src/tree/function/resolve.rs:1803 — gix-merge/src/tree/function/resolve.rs:1803-1812 | gix-merge/src/tree/function/resolve.rs:2214-2223 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-merge/src/tree/function/resolve.rs:1803` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10 lines × 2) gix-protocol/src/handshake/refs/async_io.rs:14 — gix-protocol/src/handshake/refs/async_io.rs:14-23 | gix-protocol/src/handshake/refs/blocking_io.rs:14-23 — before extracting anything, compare `gix-protocol/src/handshake/refs/async_io.rs` and `gix-protocol/src/handshake/refs/blocking_io.rs` as WHOLE FILES: 87% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. 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. Read the line range as the matched WINDOW rather than a finished unit: at `gix-protocol/src/handshake/refs/async_io.rs:14` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) gix-tix/src/edit/rebase.rs:3825 — gix-tix/src/edit/rebase.rs:3825-3834 | gix-tix/src/edit/rebase.rs:3840-3849 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-tix/src/edit/rebase.rs:3825` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) REDACTED:147 — REDACTED:147-156 | REDACTED:164-173 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:147` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) gix/src/worktree/remove.rs:382 — gix/src/worktree/remove.rs:382-391 | gix/src/worktree/remove.rs:397-406 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix/src/worktree/remove.rs:382` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) gix-pack/src/index/verify.rs:116 — gix-pack/src/index/verify.rs:116-125 | gix-pack/src/multi_index/verify.rs:51-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. Read the line range as the matched WINDOW rather than a finished unit: at `gix-pack/src/index/verify.rs:116` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) gix-diff/src/blob/pipeline.rs:350 — gix-diff/src/blob/pipeline.rs:350-359 | gix-merge/src/blob/pipeline.rs:198-209 — before extracting anything, compare `gix-diff/src/blob/pipeline.rs` and `gix-merge/src/blob/pipeline.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `gix-diff/src/blob/pipeline.rs:350` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) gix-filter/src/driver/process/client.rs:91 — gix-filter/src/driver/process/client.rs:91-100 | gix-filter/src/driver/process/server.rs:93-102 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `gix-filter/src/driver/process/client.rs:91` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `gix-filter/src/driver/process/client.rs:89` calls `reset_with` and `gix-filter/src/driver/process/server.rs:90` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×8
  • Edited copy of a member (9 corresponding lines) gix-tix/src/prefix_input/mod.rs:208 — gix-tix/src/prefix_input/mod.rs:208-219 | gix-tix/src/ref_tree.rs:1711-1719 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) gix/src/config/tree/keys.rs:269 — gix/src/config/tree/keys.rs:269-277 | gix/src/config/tree/keys.rs:302-313 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) src/shared.rs:290 — src/shared.rs:290-298 | src/shared.rs:312-320 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) gix-commitgraph/src/file/init.rs:219 — gix-commitgraph/src/file/init.rs:219-227 | gix-pack/src/index/init.rs:91-99 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) gix-imara-diff/src/sources.rs:174 — gix-imara-diff/src/sources.rs:174-182 | gix-imara-diff/src/sources.rs:207-215 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) gix-tix/src/edit/review.rs:100 — gix-tix/src/edit/review.rs:100-108 | gix-tix/src/edit/review.rs:414-422 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) gix-ref/src/store/file/find.rs:125 — gix-ref/src/store/file/find.rs:125-136 | gix-ref/src/store/packed/find.rs:67-75 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) gix-config/src/parse/from_bytes/mod.rs:433 — gix-config/src/parse/from_bytes/mod.rs:433-441 | gix-protocol/src/remote_progress.rs:71-79 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×8
  • Edited copy of a member (7 corresponding lines) gix-refspec/src/match_group/util.rs:35 — gix-refspec/src/match_group/util.rs:35-41 | gix-refspec/src/match_group/util.rs:49-55 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) gix-index/src/access/mod.rs:581 — gix-index/src/access/mod.rs:581-587 | gix-index/src/access/mod.rs:591-598 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) gix-packetline/src/async_io/encode.rs:216 — gix-packetline/src/async_io/encode.rs:216-223 | gix-packetline/src/blocking_io/encode.rs:43-49 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) gix-odb/src/store_impls/dynamic/types.rs:218 — gix-odb/src/store_impls/dynamic/types.rs:218-224 | gix-odb/src/store_impls/dynamic/types.rs:226-233 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) gix-attributes/src/search/attributes.rs:112 — gix-attributes/src/search/attributes.rs:112-120 | gix-ignore/src/search.rs:197-203 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) gix-actor/src/signature/mod.rs:97 — gix-actor/src/signature/mod.rs:97-103 | gix-mailmap/src/snapshot/mod.rs:167-173 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) gix-attributes/src/parse.rs:74 — gix-attributes/src/parse.rs:74-80 | gix-ignore/src/parse.rs:17-24 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) gix-diff/src/tree/visit.rs:75 — gix-diff/src/tree/visit.rs:75-81 | gix-diff/src/tree_with_rewrites/change.rs:579-586 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D2 · Cognitive Complexity · App · ×7
  • App::update (cognitive 113) gix-tix/src/app.rs:1950 — App::update has cognitive complexity 113 (threshold 15). Drivers by points: if/else 43 (76 pts), match/switch 10 (20 pts), boolean chains 13, loops 2 (4 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.
  • App::update_tree_selection (cognitive 46) gix-tix/src/app/tree_selection/mod.rs:503 — App::update_tree_selection has cognitive complexity 46 (threshold 15). Drivers by points: if/else 15 (25 pts), match/switch 7 (15 pts), boolean chains 3, 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.
  • App::notice (cognitive 22) gix-tix/src/app.rs:925 — App::notice has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (17 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
  • App::finish_lane_computation (cognitive 20) gix-tix/src/app.rs:2845 — App::finish_lane_computation has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 2, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • App::begin_tree_selection (cognitive 19) gix-tix/src/app/tree_selection/mod.rs:351 — App::begin_tree_selection has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (4 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.
  • App::update_hidden_branch_targets (cognitive 17) gix-tix/src/app.rs:2647 — App::update_hidden_branch_targets has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (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.
  • App::peel_compressed_segment (cognitive 16) gix-tix/src/app.rs:1705 — App::peel_compressed_segment has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
D4 · Code Duplication · Edited copy of a member (22 corresponding lines) · ×7
  • Edited copy of a member (22 corresponding lines) gix-encoding/src/fast.rs:196 — gix-encoding/src/fast.rs:196-218 | gix-encoding/src/legacy.rs:435-456 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) gix-index/src/fs.rs:70 — gix-index/src/fs.rs:70-91 | gix-index/src/fs.rs:97-118 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) gix-protocol/src/handshake/refs/async_io.rs:37 — gix-protocol/src/handshake/refs/async_io.rs:37-59 | gix-protocol/src/handshake/refs/blocking_io.rs:36-57 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) gix/src/repository/identity.rs:34 — gix/src/repository/identity.rs:34-55 | gix/src/repository/identity.rs:104-125 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) gix-packetline/src/async_io/read.rs:167 — gix-packetline/src/async_io/read.rs:167-189 | gix-packetline/src/blocking_io/read.rs:165-186 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) gitoxide-core/src/repository/index/entries.rs:400 — gitoxide-core/src/repository/index/entries.rs:400-421 | gix-index/src/lib.rs:218-240 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) gix-lock/src/acquire.rs:73 — gix-lock/src/acquire.rs:73-94 | gix-lock/src/acquire.rs:126-147 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×7
  • Edited copy of a member (12 corresponding lines) gix-pack/src/cache/lru.rs:50 — gix-pack/src/cache/lru.rs:50-68 | gix-pack/src/cache/object.rs:57-68 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) gix-ref/src/store/file/find.rs:350 — gix-ref/src/store/file/find.rs:350-361 | gix-ref/src/store/file/loose/reflog.rs:221-233 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) gix-pack/src/cache/lru.rs:70 — gix-pack/src/cache/lru.rs:70-81 | gix-pack/src/cache/lru.rs:171-186 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) gix/src/config/tree/sections/core.rs:331 — gix/src/config/tree/sections/core.rs:331-347 | gix/src/config/tree/sections/pack.rs:33-44 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) gix-attributes/src/search/refmap.rs:27 — gix-attributes/src/search/refmap.rs:27-38 | gix-attributes/src/search/refmap.rs:40-51 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) gix-blame/src/file/function.rs:528 — gix-blame/src/file/function.rs:528-539 | gix-blame/src/file/function.rs:543-561 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) gix-encoding/src/read.rs:25 — gix-encoding/src/read.rs:25-39 | gix-encoding/src/write.rs:24-35 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×7
  • Edited copy of a member (8 corresponding lines) gix-ref/src/store/file/log/iter.rs:51 — gix-ref/src/store/file/log/iter.rs:51-59 | gix-ref/src/store/file/log/iter.rs:62-69 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) gix-transport/src/client/async_io/bufread_ext.rs:132 — gix-transport/src/client/async_io/bufread_ext.rs:132-139 | gix-transport/src/client/blocking_io/bufread_ext.rs:122-129 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) gix/src/dirwalk/iter.rs:169 — gix/src/dirwalk/iter.rs:169-177 | gix/src/status/iter/mod.rs:340-347 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) gix-object/src/commit/ref_iter.rs:113 — gix-object/src/commit/ref_iter.rs:113-120 | gix-object/src/tag/ref_iter.rs:58-65 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) gix-diff/src/tree/recorder.rs:49 — gix-diff/src/tree/recorder.rs:49-56 | gix-traverse/src/tree/recorder.rs:45-52 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) gix-pack/src/index/traverse/with_index.rs:47 — gix-pack/src/index/traverse/with_index.rs:47-56 | gix-pack/src/index/traverse/with_lookup.rs:51-58 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) gix-object/src/tree/ref_iter.rs:112 — gix-object/src/tree/ref_iter.rs:112-121 | gix/src/object/tree/mod.rs:174-181 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×7
  • Duplicated block (13 lines × 2) gitoxide-core/src/index/checkout.rs:140 — gitoxide-core/src/index/checkout.rs:140-152 | gitoxide-core/src/repository/clone.rs:128-140 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (13 lines × 2) gitoxide-core/src/repository/index/entries.rs:404 — gitoxide-core/src/repository/index/entries.rs:404-416 | gix-index/src/lib.rs:223-235 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (13 lines × 2) gix-merge/src/tree/function/resolve.rs:1040 — gix-merge/src/tree/function/resolve.rs:1040-1052 | gix-merge/src/tree/function/resolve.rs:1523-1535 — both copies are in the same file, so extract the block into 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) gix-packetline/src/async_io/sidebands.rs:286 — gix-packetline/src/async_io/sidebands.rs:286-298 | gix-packetline/src/blocking_io/sidebands.rs:145-157 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `gix-packetline/src/async_io/sidebands.rs:286` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) gix-parallel/src/in_parallel.rs:61 — gix-parallel/src/in_parallel.rs:61-73 | gix-parallel/src/in_parallel.rs:132-144 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-parallel/src/in_parallel.rs:61` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `gix-parallel/src/in_parallel.rs:145` calls `clone` and `gix-parallel/src/in_parallel.rs:74` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 2) gix-traverse/src/commit/simple.rs:630 — gix-traverse/src/commit/simple.rs:630-642 | gix-traverse/src/commit/simple.rs:713-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. Read the line range as the matched WINDOW rather than a finished unit: at `gix-traverse/src/commit/simple.rs:630` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) gix-tix/src/lib.rs:4756 — gix-tix/src/lib.rs:4756-4768 | gix-tix/src/lib.rs:4810-4822 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `gix-tix/src/lib.rs:4769` calls `Ok`, `leave_attention` and `gix-tix/src/lib.rs:4823` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×7
  • Duplicated block (8 lines × 2) gitoxide-core/src/repository/attributes/validate_baseline.rs:99 — gitoxide-core/src/repository/attributes/validate_baseline.rs:99-106 | gitoxide-core/src/repository/attributes/validate_baseline.rs:152-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. Read the line range as the matched WINDOW rather than a finished unit: at `gitoxide-core/src/repository/attributes/validate_baseline.rs:99` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 2) gix-blame/src/file/function.rs:579 — gix-blame/src/file/function.rs:579-586 | gix-blame/src/file/function.rs:589-596 — both copies are in the same file, so extract the block into 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) gix-encoding/src/legacy.rs:609 — gix-encoding/src/legacy.rs:609-616 | gix-encoding/src/legacy.rs:784-791 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-encoding/src/legacy.rs:609` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) gix-packetline/src/async_io/encode.rs:88 — gix-packetline/src/async_io/encode.rs:88-95 | gix-packetline/src/async_io/encode.rs:115-122 — both copies are in the same file, so extract the block into 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) gix-tix/src/edit/rebase.rs:2768 — gix-tix/src/edit/rebase.rs:2768-2775 | gix-tix/src/edit/rebase.rs:2834-2841 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-tix/src/edit/rebase.rs:2768` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) gix-tix/src/lib.rs:1728 — gix-tix/src/lib.rs:1728-1735 | gix-tix/src/lib.rs:4038-4045 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-tix/src/lib.rs:1728` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) gix-imara-diff/src/unified_diff.rs:180 — gix-imara-diff/src/unified_diff.rs:180-187 | gix-imara-diff/src/unified_diff.rs:189-196 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-imara-diff/src/unified_diff.rs:180` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
AC3 · Page structure · Heading level jumps from h1 to h3 · ×6
  • Heading level jumps from h1 to h3 etc/speak/gitmerge-2024.marp.html:39 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h1 to h3 etc/speak/gitmerge-2024.marp.html:44 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h1 to h3 etc/speak/gitmerge-2024.marp.html:49 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h1 to h3 etc/speak/gitmerge-2024.marp.html:54 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h1 to h3 etc/speak/gitmerge-2024.marp.html:59 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h1 to h3 etc/speak/gitmerge-2024.marp.html:64 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
D2 · Cognitive Complexity · File · ×6
  • File::resolve_deltas (cognitive 32) gix-pack/src/data/file/decode/entry.rs:235 — File::resolve_deltas has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (23 pts), match/switch 3 (6 pts), loops 3 (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.
  • File::from_paths_metadata_buf (cognitive 18) gix-config/src/file/init/from_paths.rs:60 — File::from_paths_metadata_buf has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 3 (6 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.
  • File::verify_integrity_inner (cognitive 18) gix-pack/src/multi_index/verify.rs:95 — File::verify_integrity_inner has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (4 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.
  • File::new (cognitive 17) gix-commitgraph/src/file/init.rs:30 — File::new has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 1, 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.
  • File::eq (cognitive 17) gix-config/src/file/impls.rs:51 — File::eq has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (4 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 7). Of this number, 13 points are the body's own statements and 4 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.
  • File::write_to_filter (cognitive 17) gix-config/src/file/write.rs:18 — File::write_to_filter 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.
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×6
  • Edited copy of a member (18 corresponding lines) gix-object/src/tag/write.rs:10 — gix-object/src/tag/write.rs:10-32 | gix-object/src/tag/write.rs:52-69 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) gix-revwalk/src/graph/mod.rs:209 — gix-revwalk/src/graph/mod.rs:209-226 | gix-revwalk/src/graph/mod.rs:260-277 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) gix-tempfile/src/handle.rs:295 — gix-tempfile/src/handle.rs:295-316 | gix-tempfile/src/handle.rs:322-339 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) gix-tix/src/lib.rs:9705 — gix-tix/src/lib.rs:9705-9722 | gix-tix/src/lib.rs:9724-9745 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) gix-pack/src/data/entry/decode.rs:104 — gix-pack/src/data/entry/decode.rs:104-125 | gix-utils/src/decode.rs:5-22 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) gix-diff/src/index/function.rs:238 — gix-diff/src/index/function.rs:238-255 | gix-diff/src/index/function.rs:261-282 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×6
  • Edited copy of a member (13 corresponding lines) gix-tix/src/command/enrich.rs:195 — gix-tix/src/command/enrich.rs:195-207 | gix-tix/src/lib.rs:6583-6597 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) gix-tix/src/lib.rs:8627 — gix-tix/src/lib.rs:8627-8639 | gix-tix/src/lib.rs:8747-8761 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) gix-tempfile/src/handle.rs:181 — gix-tempfile/src/handle.rs:181-196 | gix-tempfile/src/handle.rs:209-221 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) gix-packetline/src/async_io/sidebands.rs:195 — gix-packetline/src/async_io/sidebands.rs:195-207 | gix-packetline/src/async_io/sidebands.rs:223-235 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) gix/src/config/tree/sections/core.rs:275 — gix/src/config/tree/sections/core.rs:275-287 | gix/src/config/tree/sections/core.rs:299-311 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) gix-transport/src/client/async_io/request.rs:53 — gix-transport/src/client/async_io/request.rs:53-65 | gix-transport/src/client/blocking_io/request.rs:43-55 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×6
  • Edited copy of a member (11 corresponding lines) gitoxide-core/src/repository/merge/commit.rs:82 — gitoxide-core/src/repository/merge/commit.rs:82-92 | gitoxide-core/src/repository/merge/tree.rs:176-186 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) gix-tix/src/enrich.rs:331 — gix-tix/src/enrich.rs:331-341 | gix-tix/src/enrich.rs:347-358 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) gix-protocol/src/fetch/refmap/mod.rs:26 — gix-protocol/src/fetch/refmap/mod.rs:26-36 | gix-protocol/src/fetch/refmap/mod.rs:50-60 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) gix-attributes/src/search/attributes.rs:59 — gix-attributes/src/search/attributes.rs:59-73 | gix-attributes/src/search/attributes.rs:84-94 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) gix-object/src/tag/decode.rs:75 — gix-object/src/tag/decode.rs:75-85 | gix-object/src/tag/decode.rs:93-104 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) gix-error/src/error.rs:893 — gix-error/src/error.rs:893-903 | gix-error/src/exn/impls.rs:508-520 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×6
  • Duplicated block (15 lines × 2) gix-imara-diff/src/myers.rs:159 — gix-imara-diff/src/myers.rs:159-173 | gix-imara-diff/src/myers.rs:182-196 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-imara-diff/src/myers.rs:159` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (15 lines × 2) gix-imara-diff/src/slider_heuristic.rs:127 — gix-imara-diff/src/slider_heuristic.rs:127-141 | gix-imara-diff/src/slider_heuristic.rs:154-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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `src` to `impl IntoIterator<Item = u8>` in one and `impl IntoIterator<Item = char>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (15 lines × 2) gix-imara-diff/src/unified_diff.rs:230 — gix-imara-diff/src/unified_diff.rs:230-244 | gix-imara-diff/src/unified_diff.rs:264-278 — both copies are in the same file, so extract the block into 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) gix-protocol/src/handshake/refs/async_io.rs:45 — gix-protocol/src/handshake/refs/async_io.rs:45-59 | gix-protocol/src/handshake/refs/blocking_io.rs:43-57 — before extracting anything, compare `gix-protocol/src/handshake/refs/async_io.rs` and `gix-protocol/src/handshake/refs/blocking_io.rs` as WHOLE FILES: 87% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. 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. Read the line range as the matched WINDOW rather than a finished unit: at `gix-protocol/src/handshake/refs/async_io.rs:45` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) gix-tix/src/edit/time_travel.rs:434 — gix-tix/src/edit/time_travel.rs:434-448 | gix-tix/src/edit/time_travel.rs:665-679 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-tix/src/edit/time_travel.rs:434` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) gix-tix/src/lib.rs:4803 — gix-tix/src/lib.rs:4803-4817 | gix-tix/src/lib.rs:4915-4929 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-tix/src/lib.rs:4803` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D2 · Cognitive Complexity · gix_date · ×5
  • gix_date::parse::git::parse_textual_date (cognitive 76) gix-date/src/parse/git.rs:88 — gix_date::parse::git::parse_textual_date has cognitive complexity 76 (threshold 15). Drivers by points: if/else 34 (58 pts), boolean chains 12, match/switch 3 (5 pts), 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.
  • gix_date::parse::relative::apply_operations (cognitive 55) gix-date/src/parse/relative.rs:293 — gix_date::parse::relative::apply_operations has cognitive complexity 55 (threshold 15). Drivers by points: if/else 22 (42 pts), boolean chains 6, match/switch 3 (6 pts), loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • gix_date::parse::function::parse (cognitive 20) gix-date/src/parse/function.rs:195 — gix_date::parse::function::parse has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16 (19 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.
  • gix_date::parse::relative::parse_operations (cognitive 20) gix-date/src/parse/relative.rs:101 — gix_date::parse::relative::parse_operations has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 1, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • gix_date::parse::git::split_time_and_offset (cognitive 16) gix-date/src/parse/git.rs:452 — gix_date::parse::git::split_time_and_offset has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gix_traverse · ×5
  • gix_traverse::commit::simple::compute_hidden_frontier (cognitive 66) gix-traverse/src/commit/simple.rs:179 — gix_traverse::commit::simple::compute_hidden_frontier has cognitive complexity 66 (threshold 15). Drivers by points: if/else 18 (51 pts), loops 5 (7 pts), boolean chains 6, match/switch 1 (2 pts) (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • gix_traverse::commit::topo::iter::collect_parents (cognitive 23) gix-traverse/src/commit/topo/iter.rs:291 — gix_traverse::commit::topo::iter::collect_parents has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 3 (6 pts), match/switch 2 (4 pts) (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • gix_traverse::tree::depthfirst::function::depthfirst (cognitive 21) gix-traverse/src/tree/depthfirst.rs:40 — gix_traverse::tree::depthfirst::function::depthfirst has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (10 pts), match/switch 2 (7 pts), loops 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • gix_traverse::commit::topo::iter::collect_parent_ids (cognitive 17) gix-traverse/src/commit/topo/iter.rs:361 — gix_traverse::commit::topo::iter::collect_parent_ids has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 2 (4 pts), match/switch 2 (4 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.
  • gix_traverse::tree::breadthfirst::function::breadthfirst (cognitive 17) gix-traverse/src/tree/breadthfirst.rs:43 — gix_traverse::tree::breadthfirst::function::breadthfirst has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (8 pts), match/switch 2 (6 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · State · ×5
  • State::handle (cognitive 35) gix-tix/src/prefix_input/mod.rs:70 — State::handle has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (23 pts), match/switch 5 (8 pts), boolean chains 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • State::compute_status (cognitive 27) gix-status/src/index_as_worktree/function.rs:372 — State::compute_status has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 6, match/switch 3 (4 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.
  • State::apply_delayed (cognitive 20) gix-filter/src/driver/apply.rs:88 — State::apply_delayed has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 4 (8 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.
  • State::from_bytes (cognitive 20) gix-index/src/decode/mod.rs:41 — State::from_bytes has cognitive complexity 20 (threshold 15). Drivers by points: loops 3 (10 pts), match/switch 3 (7 pts), if/else 3 (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • State::id_mappings_from_index (cognitive 16) gix-worktree/src/stack/state/mod.rs:96 — State::id_mappings_from_index has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), match/switch 3 (6 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 · Repository · ×5
  • Repository::try_find_remote_inner (cognitive 28) gix/src/repository/remote.rs:176 — Repository::try_find_remote_inner has cognitive complexity 28 (threshold 15). Drivers by points: match/switch 8 (16 pts), if/else 4 (7 pts), boolean chains 3, loops 2 (nesting depth added 11). Of this number, 25 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • Repository::prepare_add_worktree (cognitive 23) gix/src/worktree/add.rs:124 — Repository::prepare_add_worktree has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 3 (5 pts), loops 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Repository::branch_remote_ref_name (cognitive 19) gix/src/repository/config/branch.rs:44 — Repository::branch_remote_ref_name has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 5 (13 pts), if/else 4 (6 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.
  • Repository::transport_options (cognitive 18) gix/src/repository/config/transport.rs:24 — Repository::transport_options has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 3 (4 pts), boolean chains 1 (nesting depth added 6). Of this number, 11 points are the body's own statements and 7 belong to 3 function items inside it that branch. 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.
  • Repository::state (cognitive 16) gix/src/repository/state.rs:8 — Repository::state has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14 (16 pts) (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.
D1 · Cyclomatic Complexity · gix_date · ×4
  • gix_date::parse::git::parse_textual_date (cyclomatic 46) gix-date/src/parse/git.rs:88 — gix_date::parse::git::parse_textual_date has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • gix_date::parse::relative::apply_operations (cyclomatic 42) gix-date/src/parse/relative.rs:293 — gix_date::parse::relative::apply_operations 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.
  • gix_date::parse::relative::parse_operations (cyclomatic 17) gix-date/src/parse/relative.rs:101 — gix_date::parse::relative::parse_operations 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.
  • gix_date::parse::function::parse (cyclomatic 16) gix-date/src/parse/function.rs:195 — gix_date::parse::function::parse 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 · gix_encoding · ×4
  • gix_encoding::legacy::bulk (cyclomatic 35) gix-encoding/src/legacy.rs:553 — gix_encoding::legacy::bulk 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. This is NOT this file's highest cyclomatic complexity: gix_encoding::legacy::table (cyclomatic 46) 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.
  • gix_encoding::unicode::decode (cyclomatic 31) gix-encoding/src/unicode.rs:10 — gix_encoding::unicode::decode 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.
  • gix_encoding::fast::run (cyclomatic 30) gix-encoding/src/fast.rs:5 — gix_encoding::fast::run 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.
  • gix_encoding::legacy::decode_iso2022_bulk (cyclomatic 17) gix-encoding/src/legacy.rs:689 — gix_encoding::legacy::decode_iso2022_bulk has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: gix_encoding::legacy::table (cyclomatic 46) 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 · gix · ×4
  • gix::remote::connection::fetch::update_refs::update (cyclomatic 31) gix/src/remote/connection/fetch/update_refs/mod.rs:62 — gix::remote::connection::fetch::update_refs::update 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.
  • gix::worktree::remove::resolve (cyclomatic 20) gix/src/worktree/remove.rs:309 — gix::worktree::remove::resolve has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • gix::submodule::url::resolve_relative_url (cyclomatic 18) gix/src/submodule/url.rs:110 — gix::submodule::url::resolve_relative_url 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.
  • gix::config::snapshot::credential_helpers::function::credential_helpers (cyclomatic 16) gix/src/config/snapshot/credential_helpers.rs:69 — gix::config::snapshot::credential_helpers::function::credential_helpers 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 · gix_merge · ×4
  • gix_merge::tree::function::resolve::tree (cognitive 952) gix-merge/src/tree/function/resolve.rs:97 — gix_merge::tree::function::resolve::tree has cognitive complexity 952 (threshold 15). Drivers by points: if/else 141 (659 pts), match/switch 43 (210 pts), boolean chains 56, loops 6 (27 pts) (nesting depth added 706). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • gix_merge::tree::apply_index_entries::function::apply_index_entries (cognitive 30) gix-merge/src/tree/mod.rs:556 — gix_merge::tree::apply_index_entries::function::apply_index_entries has cognitive complexity 30 (threshold 15). Drivers by points: match/switch 7 (16 pts), if/else 5 (11 pts), loops 2 (3 pts) (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.
  • gix_merge::blob::builtin_driver::text::utils::zealously_contract_hunks (cognitive 19) gix-merge/src/blob/builtin_driver/text/utils.rs:173 — gix_merge::blob::builtin_driver::text::utils::zealously_contract_hunks has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 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.
  • gix_merge::tree::utils::unique_path_in_tree (cognitive 16) gix-merge/src/tree/utils.rs:76 — gix_merge::tree::utils::unique_path_in_tree has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Pipeline · ×4
  • Pipeline::convert_to_diffable_inner (cognitive 120) gix-diff/src/blob/pipeline.rs:226 — Pipeline::convert_to_diffable_inner has cognitive complexity 120 (threshold 15). Drivers by points: if/else 23 (67 pts), match/switch 9 (38 pts), boolean chains 15 (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.
  • Pipeline::convert_to_mergeable (cognitive 45) gix-merge/src/blob/pipeline.rs:141 — Pipeline::convert_to_mergeable has cognitive complexity 45 (threshold 15). Drivers by points: if/else 10 (22 pts), match/switch 6 (22 pts), boolean chains 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.
  • Pipeline::worktree_file_to_object (cognitive 18) gix/src/filter.rs:155 — Pipeline::worktree_file_to_object has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), match/switch 2 (3 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.
  • Pipeline::convert_to_git (cognitive 17) gix-filter/src/pipeline/convert.rs:46 — Pipeline::convert_to_git has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 5 (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 · gix_validate · ×4
  • gix_validate::tag::name_inner (cognitive 88) REDACTED:77 — gix_validate::tag::name_inner has cognitive complexity 88 (threshold 15). Drivers by points: if/else 32 (66 pts), loops 5 (16 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • gix_validate::path::is_dot_ntfs (cognitive 31) gix-validate/src/path.rs:269 — gix_validate::path::is_dot_ntfs has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (27 pts), boolean chains 2, loops 1 (2 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.
  • gix_validate::path::component (cognitive 28) gix-validate/src/path.rs:90 — gix_validate::path::component has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 5 (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.
  • gix_validate::path::is_win_device (cognitive 17) gix-validate/src/path.rs:157 — gix_validate::path::is_win_device has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, if/else 7. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · Transaction · ×4
  • Transaction::commit_inner (cognitive 71) gix-ref/src/store/file/transaction/commit.rs:37 — Transaction::commit_inner has cognitive complexity 71 (threshold 15). Drivers by points: if/else 14 (41 pts), match/switch 7 (23 pts), boolean chains 4, loops 3 (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.
  • Transaction::prepare_inner (cognitive 50) gix-ref/src/store/file/transaction/prepare.rs:218 — Transaction::prepare_inner has cognitive complexity 50 (threshold 15). Drivers by points: if/else 10 (23 pts), match/switch 5 (14 pts), loops 4 (9 pts), boolean chains 4 (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.
  • Transaction::lock_ref_and_apply_change (cognitive 31) gix-ref/src/store/file/transaction/prepare.rs:40 — Transaction::lock_ref_and_apply_change has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 5 (10 pts), boolean chains 3 (nesting depth added 14). Of this number, 29 points are the body's own statements and 2 belong to one function item inside it that branches. 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.
  • Transaction::prepare (cognitive 29) gix-ref/src/store/packed/transaction.rs:56 — Transaction::prepare has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 3 (5 pts), match/switch 1 (4 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Handle · ×4
  • Handle::try_find_cached_inner (cognitive 61) gix-odb/src/store_impls/dynamic/find.rs:53 — Handle::try_find_cached_inner has cognitive complexity 61 (threshold 15). Drivers by points: match/switch 7 (30 pts), if/else 8 (25 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 42). 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.
  • Handle::try_header_inner (cognitive 61) gix-odb/src/store_impls/dynamic/header.rs:22 — Handle::try_header_inner has cognitive complexity 61 (threshold 15). Drivers by points: match/switch 7 (30 pts), if/else 8 (25 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 42). 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.
  • Handle::location_by_oid (cognitive 27) gix-odb/src/store_impls/dynamic/find.rs:327 — Handle::location_by_oid has cognitive complexity 27 (threshold 15). Drivers by points: match/switch 3 (15 pts), if/else 3 (9 pts), loops 2 (3 pts) (nesting depth added 19). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • Handle::lookup_prefix (cognitive 23) gix-odb/src/store_impls/dynamic/prefix.rs:122 — Handle::lookup_prefix has cognitive complexity 23 (threshold 15). Drivers by points: match/switch 4 (10 pts), if/else 2 (6 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 12). Of this number, 22 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gix_pack · ×4
  • gix_pack::data::output::count::objects::expand::this (cognitive 52) gix-pack/src/data/output/count/objects/mod.rs:139 — gix_pack::data::output::count::objects::expand::this has cognitive complexity 52 (threshold 15). Drivers by points: loops 7 (28 pts), match/switch 4 (16 pts), if/else 3 (8 pts) (nesting depth added 38). 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.
  • gix_pack::cache::delta::traverse::resolve::resolve_parallel (cognitive 35) gix-pack/src/cache/delta/traverse/resolve.rs:269 — gix_pack::cache::delta::traverse::resolve::resolve_parallel has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (23 pts), loops 5 (8 pts), match/switch 2 (4 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.
  • gix_pack::index::access::lookup_prefix (cognitive 28) gix-pack/src/index/access.rs:221 — gix_pack::index::access::lookup_prefix has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 3 (9 pts), boolean chains 2, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • gix_pack::data::output::entry::iter_from_counts::function::iter_from_counts (cognitive 26) gix-pack/src/data/output/entry/iter_from_counts.rs:45 — gix_pack::data::output::entry::iter_from_counts::function::iter_from_counts has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 7 (15 pts), if/else 2 (6 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 13). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Tree · ×4
  • Tree::handle_key (cognitive 50) gix-tix/src/ref_tree.rs:274 — Tree::handle_key has cognitive complexity 50 (threshold 15). Drivers by points: if/else 21 (28 pts), boolean chains 17, match/switch 3 (5 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Tree::draw (cognitive 25) gix-tix/src/ref_tree.rs:424 — Tree::draw has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 3 (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.
  • Tree::peel_to_entry (cognitive 17) gix/src/object/tree/mod.rs:111 — Tree::peel_to_entry has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 1 (2 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.
  • Tree::verify::verify_recursive (cognitive 17) gix-index/src/extension/tree/verify.rs:14 — Tree::verify::verify_recursive has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (4 pts), boolean chains 3 (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 · gix_config · ×4
  • gix_config::format::normalize_events (cognitive 49) gix-config/src/format.rs:119 — gix_config::format::normalize_events has cognitive complexity 49 (threshold 15). Drivers by points: if/else 15 (34 pts), boolean chains 6, loops 3 (6 pts), match/switch 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.
  • gix_config::parse::format::normalize_events (cognitive 39) gix-config/src/parse/format.rs:103 — gix_config::parse::format::normalize_events has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 3 (6 pts), boolean chains 4, match/switch 3 (4 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.
  • gix_config::parse::from_bytes::value (cognitive 24) gix-config/src/parse/from_bytes/mod.rs:318 — gix_config::parse::from_bytes::value has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 2 (5 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • gix_config::file::includes::include_condition_match (cognitive 16) gix-config/src/file/includes/mod.rs:152 — gix_config::file::includes::include_condition_match has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 2 (5 pts), match/switch 3 (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 · gix_protocol · ×4
  • gix_protocol::fetch::function::fetch (cognitive 36) gix-protocol/src/fetch/function.rs:40 — gix_protocol::fetch::function::fetch has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (30 pts), boolean chains 3, loops 1 (2 pts), match/switch 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.
  • gix_protocol::handshake::refs::shared::parse_v2 (cognitive 34) gix-protocol/src/handshake/refs/shared.rs:199 — gix_protocol::handshake::refs::shared::parse_v2 has cognitive complexity 34 (threshold 15). Drivers by points: match/switch 7 (21 pts), if/else 5 (11 pts), loops 1 (2 pts) (nesting depth added 21). 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.
  • gix_protocol::fetch::negotiate::mark_complete_and_common_ref (cognitive 23) gix-protocol/src/fetch/negotiate.rs:102 — gix_protocol::fetch::negotiate::mark_complete_and_common_ref has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (19 pts), loops 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.
  • gix_protocol::fetch::negotiate::one_round (cognitive 17) gix-protocol/src/fetch/negotiate.rs:444 — gix_protocol::fetch::negotiate::one_round has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 3 (5 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Algorithm · ×4
  • Algorithm::mark_common (cognitive 31) gix-negotiate/src/consecutive.rs:42 — Algorithm::mark_common has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 2 (6 pts), boolean chains 4 (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.
  • Algorithm::mark_common (cognitive 24) gix-negotiate/src/skipping.rs:40 — Algorithm::mark_common has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Algorithm::next_have (cognitive 19) gix-negotiate/src/consecutive.rs:108 — Algorithm::next_have has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Algorithm::next_have (cognitive 16) gix-negotiate/src/skipping.rs:135 — Algorithm::next_have has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×4
  • Edited copy of a member (19 corresponding lines) gitoxide-core/src/commitgraph/verify.rs:43 — gitoxide-core/src/commitgraph/verify.rs:43-61 | gitoxide-core/src/repository/commitgraph/verify.rs:31-49 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) gix-tix/src/lib.rs:5468 — gix-tix/src/lib.rs:5468-5488 | gix-tix/src/lib.rs:5495-5513 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) gix-config/src/file/mutable/multi_value.rs:214 — gix-config/src/file/mutable/multi_value.rs:214-232 | gix-config/src/file/mutable/multi_value.rs:236-255 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) gix-config/src/file/mutable/multi_value.rs:138 — gix-config/src/file/mutable/multi_value.rs:138-158 | gix-config/src/file/mutable/multi_value.rs:162-180 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×4
  • Edited copy of a member (15 corresponding lines) gix-object/src/traits/find.rs:215 — gix-object/src/traits/find.rs:215-229 | gix-object/src/traits/find.rs:233-247 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) gix-tix/src/ref_tree.rs:538 — gix-tix/src/ref_tree.rs:538-552 | gix-tix/src/ref_tree.rs:570-584 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) gitoxide-core/src/query/engine/update.rs:515 — gitoxide-core/src/query/engine/update.rs:515-529 | gitoxide-core/src/query/engine/update.rs:531-545 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) gix-diff/src/blob/pipeline.rs:137 — gix-diff/src/blob/pipeline.rs:137-151 | gix-merge/src/blob/platform/mod.rs:87-104 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×4
  • Edited copy of a member (17 corresponding lines) gix-tix/src/edit/replay_refs/mod.rs:41 — gix-tix/src/edit/replay_refs/mod.rs:41-57 | gix-tix/src/edit/undo.rs:143-163 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) gix-tix/src/command/travel.rs:219 — gix-tix/src/command/travel.rs:219-235 | gix-tix/src/command/travel.rs:255-271 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) gix-traverse/src/commit/topo/iter.rs:78 — gix-traverse/src/commit/topo/iter.rs:78-98 | gix-traverse/src/commit/topo/iter.rs:111-127 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) gix/src/config/tree/sections/http.rs:183 — gix/src/config/tree/sections/http.rs:183-199 | gix/src/config/tree/sections/http.rs:210-229 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×4
  • Edited copy of a member (14 corresponding lines) gix-odb/src/store_impls/dynamic/handle.rs:263 — gix-odb/src/store_impls/dynamic/handle.rs:263-276 | gix-odb/src/store_impls/dynamic/handle.rs:281-294 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) gix-protocol/src/handshake/refs/async_io.rs:9 — gix-protocol/src/handshake/refs/async_io.rs:9-23 | gix-protocol/src/handshake/refs/blocking_io.rs:10-23 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) src/plumbing/options/mod.rs:813 — src/plumbing/options/mod.rs:813-830 | src/plumbing/options/mod.rs:893-906 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) gix/src/config/tree/sections/remote.rs:71 — gix/src/config/tree/sections/remote.rs:71-84 | gix/src/config/tree/sections/core.rs:469-482 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×4
  • Edited copy of a member (5 corresponding lines) gix-pack/src/index/init.rs:28 — gix-pack/src/index/init.rs:28-32 | gix-pack/src/multi_index/init.rs:25-29 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) gix-diff/src/tree/recorder.rs:102 — gix-diff/src/tree/recorder.rs:102-106 | gix-traverse/src/tree/recorder.rs:104-111 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) gix-fs/src/precompose.rs:89 — gix-fs/src/precompose.rs:89-93 | gix/src/revision/walk.rs:395-399 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) gix-error/src/concrete/metadata.rs:482 — gix-error/src/concrete/metadata.rs:482-486 | gix-object/src/signature/sign.rs:200-206 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×4
  • Edited copy of a member (6 corresponding lines) gix-object/src/signature/sign.rs:87 — gix-object/src/signature/sign.rs:87-92 | gix-object/src/signature/verify.rs:423-428 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) gix-diff/src/tree/visit.rs:61 — gix-diff/src/tree/visit.rs:61-66 | gix-diff/src/tree_with_rewrites/change.rs:569-576 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) gix-object/src/commit/mod.rs:118 — gix-object/src/commit/mod.rs:118-123 | gix-tix/src/edit/auto_merge/mod.rs:73-80 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) gix-tix/src/edit/rebase.rs:482 — gix-tix/src/edit/rebase.rs:482-487 | gix-tix/src/edit/reword.rs:58-63 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×4
  • Duplicated block (14 lines × 2) gitoxide-core/src/repository/attributes/validate_baseline.rs:84 — gitoxide-core/src/repository/attributes/validate_baseline.rs:84-97 | gitoxide-core/src/repository/attributes/validate_baseline.rs:137-150 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gitoxide-core/src/repository/attributes/validate_baseline.rs:84` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) gix-object/src/commit/ref_iter.rs:246 — gix-object/src/commit/ref_iter.rs:246-259 | gix-object/src/tag/ref_iter.rs:123-136 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) gix-refspec/src/match_group/mod.rs:96 — gix-refspec/src/match_group/mod.rs:96-109 | gix-refspec/src/match_group/mod.rs:170-183 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-refspec/src/match_group/mod.rs:96` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) gix-tix/src/lib.rs:6683 — gix-tix/src/lib.rs:6683-6696 | gix-tix/src/lib.rs:6752-6765 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-tix/src/lib.rs:6683` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D1 · Cyclomatic Complexity · App · ×3
  • App::update (cyclomatic 180) gix-tix/src/app.rs:1950 — App::update has cyclomatic complexity 180 (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.
  • App::update_tree_selection (cyclomatic 36) gix-tix/src/app/tree_selection/mod.rs:503 — App::update_tree_selection has cyclomatic complexity 36 (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.
  • App::notice (cyclomatic 18) gix-tix/src/app.rs:925 — App::notice has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · gix_validate · ×3
  • gix_validate::tag::name_inner (cyclomatic 38) REDACTED:77 — gix_validate::tag::name_inner 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.
  • gix_validate::path::component (cyclomatic 22) gix-validate/src/path.rs:90 — gix_validate::path::component 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.
  • gix_validate::path::is_win_device (cyclomatic 18) gix-validate/src/path.rs:157 — gix_validate::path::is_win_device has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · gix_config · ×3
  • gix_config::format::normalize_events (cyclomatic 29) gix-config/src/format.rs:119 — gix_config::format::normalize_events 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.
  • gix_config::parse::format::normalize_events (cyclomatic 26) gix-config/src/parse/format.rs:103 — gix_config::parse::format::normalize_events 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.
  • gix_config::parse::from_bytes::value (cyclomatic 19) gix-config/src/parse/from_bytes/mod.rs:318 — gix_config::parse::from_bytes::value 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 · Transaction · ×3
  • Transaction::commit_inner (cyclomatic 27) gix-ref/src/store/file/transaction/commit.rs:37 — Transaction::commit_inner 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.
  • Transaction::prepare_inner (cyclomatic 24) gix-ref/src/store/file/transaction/prepare.rs:218 — Transaction::prepare_inner 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.
  • Transaction::lock_ref_and_apply_change (cyclomatic 23) gix-ref/src/store/file/transaction/prepare.rs:40 — Transaction::lock_ref_and_apply_change has cyclomatic complexity 23 (threshold 15). Of this number, 20 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.
D1 · Cyclomatic Complexity · gix_pack · ×3
  • gix_pack::data::output::count::objects::expand::this (cyclomatic 19) gix-pack/src/data/output/count/objects/mod.rs:139 — gix_pack::data::output::count::objects::expand::this has cyclomatic complexity 19 (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.
  • gix_pack::cache::delta::traverse::resolve::resolve_parallel (cyclomatic 17) gix-pack/src/cache/delta/traverse/resolve.rs:269 — gix_pack::cache::delta::traverse::resolve::resolve_parallel 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.
  • gix_pack::data::output::entry::iter_from_counts::function::iter_from_counts (cyclomatic 16) gix-pack/src/data/output/entry/iter_from_counts.rs:45 — gix_pack::data::output::entry::iter_from_counts::function::iter_from_counts 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.
D17 · Explicit Debt · HackComment · ×3
  • HackComment gix-ref/src/store/file/transaction/commit.rs:58 — // Special HACK: no reflog for symref changes as there is no OID involved which the reflog needs. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment gix-object/src/tree/mod.rs:104 — // Hack: `0o140000` represents `"040000"`, `0o40000` represents `"40000"`. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment gix-object/src/tree/mod.rs:169 — // Hack: `0o140000` represents `"040000"`, `0o40000` represents `"40000"`. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
D2 · Cognitive Complexity · Tracker · ×3
  • Tracker::find_file_renames (cognitive 101) gix-diff/src/rewrites/tracker.rs:329 — Tracker::find_file_renames has cognitive complexity 101 (threshold 15). Drivers by points: if/else 22 (66 pts), loops 7 (23 pts), boolean chains 11, match/switch 1 (nesting depth added 60). 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.
  • Tracker::estimate_similarity (cognitive 20) gix-diff/src/rewrites/tracker.rs:541 — Tracker::estimate_similarity has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Tracker::exact_source (cognitive 16) gix-diff/src/rewrites/tracker.rs:292 — Tracker::exact_source has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HistoryGraph · ×3
  • HistoryGraph::refresh_inner (cognitive 56) gix-tix/src/history.rs:773 — HistoryGraph::refresh_inner has cognitive complexity 56 (threshold 15). Drivers by points: if/else 14 (33 pts), loops 9 (14 pts), boolean chains 8, match/switch 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.
  • HistoryGraph::paint_inner (cognitive 41) gix-tix/src/history.rs:670 — HistoryGraph::paint_inner has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (30 pts), loops 4 (5 pts), boolean chains 4, 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.
  • HistoryGraph::descendants_in_parent_order (cognitive 18) gix-tix/src/history.rs:401 — HistoryGraph::descendants_in_parent_order has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 6 (8 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 · gix_revision · ×3
  • gix_revision::merge_base::function::remove_redundant (cognitive 44) gix-revision/src/merge_base/function.rs:111 — gix_revision::merge_base::function::remove_redundant has cognitive complexity 44 (threshold 15). Drivers by points: if/else 9 (29 pts), loops 6 (14 pts), boolean chains 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.
  • gix_revision::describe::function::describe (cognitive 34) gix-revision/src/describe.rs:148 — gix_revision::describe::function::describe has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (22 pts), loops 3 (6 pts), match/switch 1 (4 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.
  • gix_revision::ahead_behind_counts::function::ahead_behind_counts (cognitive 17) gix-revision/src/ahead_behind_counts.rs:35 — gix_revision::ahead_behind_counts::function::ahead_behind_counts has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (4 pts), boolean chains 3 (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 · gix_dir · ×3
  • gix_dir::walk::classify::path (cognitive 38) gix-dir/src/walk/classify.rs:133 — gix_dir::walk::classify::path has cognitive complexity 38 (threshold 15). Drivers by points: if/else 20 (29 pts), boolean chains 9 (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.
  • gix_dir::walk::classify::resolve_file_type_with_index (cognitive 31) gix-dir/src/walk/classify.rs:373 — gix_dir::walk::classify::resolve_file_type_with_index has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (24 pts), match/switch 2 (4 pts), boolean chains 3 (nesting depth added 13). Of this number, 27 points are the body's own statements and 4 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.
  • gix_dir::walk::readdir::recursive (cognitive 27) gix-dir/src/walk/readdir.rs:33 — gix_dir::walk::readdir::recursive has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 1, 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 · Search · ×3
  • Search::can_match_relative_path (cognitive 38) gix-pathspec/src/search/matching.rs:133 — Search::can_match_relative_path has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (31 pts), boolean chains 6, loops 1 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • Search::pattern_matching_relative_path (cognitive 35) gix-pathspec/src/search/matching.rs:27 — Search::pattern_matching_relative_path has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (24 pts), match/switch 2 (6 pts), boolean chains 3, loops 1 (2 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.
  • Search::directory_matches_prefix (cognitive 25) gix-pathspec/src/search/matching.rs:195 — Search::directory_matches_prefix has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 5, 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 · gix_path · ×3
  • gix_path::realpath::function::realpath_opts (cognitive 36) gix-path/src/realpath.rs:46 — gix_path::realpath::function::realpath_opts has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 3, 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.
  • gix_path::convert::normalize_inner (cognitive 19) gix-path/src/convert.rs:227 — gix_path::convert::normalize_inner has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (4 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.
  • gix_path::convert::relativize_with_prefix (cognitive 16) gix-path/src/convert.rs:310 — gix_path::convert::relativize_with_prefix has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MiddleSnakeSearch · ×3
  • MiddleSnakeSearch::found_snake (cognitive 29) gix-imara-diff/src/myers/middle_snake.rs:203 — MiddleSnakeSearch::found_snake has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (27 pts), boolean chains 1, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • MiddleSnakeSearch::run (cognitive 26) gix-imara-diff/src/myers/middle_snake.rs:107 — MiddleSnakeSearch::run has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 2, 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.
  • MiddleSnakeSearch::best_position (cognitive 19) gix-imara-diff/src/myers/middle_snake.rs:170 — MiddleSnakeSearch::best_position has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 3, 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 · Url · ×3
  • Url::write_to (cognitive 22) gix-url/src/lib.rs:717 — Url::write_to has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 8, match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Url::path_query_fragment (cognitive 21) gix-url/src/lib.rs:582 — Url::path_query_fragment has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 2 (3 pts) (nesting depth added 8). Of this number, 15 points are the body's own statements and 6 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.
  • Url::write_canonical_form_to (cognitive 18) gix-url/src/lib.rs:779 — Url::write_canonical_form_to has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 5, match/switch 1 (nesting depth added 1). Of this number, 11 points are the body's own statements and 7 belong to 2 function items inside it that branch. 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 · ClassTooLong · ×3
  • ClassTooLong: App gix-tix/src/app.rs:579 — ClassTooLong — 2200 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 227 methods. The bar is 400 significant lines; this is 1800 over it, 5.50× 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: HistoryGraph gix-tix/src/history.rs:149 — ClassTooLong — 617 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 32 methods, 2 blocks, lines 149-996. The bar is 400 significant lines; this is 217 over it, 1.54× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Tree gix-tix/src/ref_tree.rs:147 — ClassTooLong — 544 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 34 methods, 2 blocks, lines 147-865. The bar is 400 significant lines; this is 144 over it, 1.36× 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.
D31 · IaC & Container Security · Medium IaC · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Change coupling · ×3
  • Change coupling: body.rs ↔ decode.rs gix-object/src/commit/message/body.rs:1 — `gix-object/src/commit/message/body.rs` and `gix-object/src/commit/message/decode.rs` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency 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 `3cd3e2a7` Resolve Winnow deprecations; `12f03db6` Simplify parsers; `f0cbf81a` Resolve 0.4 not-quite deprecations — run `git show` on any of them.
  • Change coupling: ref_iter.rs ↔ ref_iter.rs gix-object/src/tag/ref_iter.rs:1 — `gix-object/src/tag/ref_iter.rs` and `gix-object/src/tree/ref_iter.rs` change together 50% of the time (8 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `3cd3e2a7` Resolve Winnow deprecations; `58252501` Refactor Errors to track remaining Input; `be1f4b5d` Remove From<winnow> for (small) step towards stable API — run `git show` on any of them.
  • Change coupling: cascade.rs ↔ serde.rs gix-credentials/src/helper/cascade.rs:1 — `gix-credentials/src/helper/cascade.rs` and `gix-credentials/src/protocol/context/serde.rs` change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `f7cbe279` feat(gix-credentials)!: support negotiated HTTP helper credentials (#…; `d0360639` change(gix-credentials)!: migrate errors to gix-error; `7496ef16` feat(gix-credentials)!: support HTTP challenges in credential context… — run `git show` on any of them.
D4 · Code Duplication · Edited copy of a member (24 corresponding lines) · ×3
  • Edited copy of a member (24 corresponding lines) gix-packetline/src/async_io/read.rs:40 — gix-packetline/src/async_io/read.rs:40-63 | gix-packetline/src/blocking_io/read.rs:38-61 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) gix-tix/src/lib.rs:7868 — gix-tix/src/lib.rs:7868-7896 | gix-tix/src/lib.rs:8364-8387 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) gix-packetline/src/async_io/encode.rs:146 — gix-packetline/src/async_io/encode.rs:146-169 | gix-packetline/src/blocking_io/encode.rs:85-108 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×3
  • Edited copy of a member (4 corresponding lines) gix-bitmap/src/lib.rs:34 — gix-bitmap/src/lib.rs:34-37 | gix-index/src/lib.rs:253-256 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) gix-tix/src/change_id.rs:106 — gix-tix/src/change_id.rs:106-111 | gix-tix/src/patch_id/mod.rs:191-194 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) gix-ref/src/store/file/find.rs:452 — gix-ref/src/store/file/find.rs:452-455 | gix-ref/src/store/file/raw_ext.rs:111-114 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×3
  • Duplicated block (16 lines × 2) gix-diff/src/index/function.rs:240 — gix-diff/src/index/function.rs:240-255 | gix-diff/src/index/function.rs:267-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. Read the line range as the matched WINDOW rather than a finished unit: at `gix-diff/src/index/function.rs:240` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) gix-tix/src/app/tree_selection/mod.rs:270 — gix-tix/src/app/tree_selection/mod.rs:270-285 | gix-tix/src/lib.rs:9764-9779 — 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) gitoxide-core/src/commitgraph/verify.rs:46 — gitoxide-core/src/commitgraph/verify.rs:46-61 | gitoxide-core/src/repository/commitgraph/verify.rs:34-49 — before extracting anything, compare `gitoxide-core/src/commitgraph/verify.rs` and `gitoxide-core/src/repository/commitgraph/verify.rs` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `gitoxide-core/src/commitgraph/verify.rs:46` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×2
  • Animation without a prefers-reduced-motion guard etc/speak/gitmerge-2024.marp.html:1 — `::view-transition-new(__bespoke_marp_transition_osc__)` moves (`animation-name: __bespoke_marp_transition_osc__`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard etc/speak/gitmerge-2024.marp.html:1 — `svg.bespoke-marp-slide.bespoke-marp-active.bespoke-marp-active-ready *` moves (`animation-name: __bespoke_marp__`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
D1 · Cyclomatic Complexity · gix_merge · ×2
  • gix_merge::tree::function::resolve::tree (cyclomatic 254) gix-merge/src/tree/function/resolve.rs:97 — gix_merge::tree::function::resolve::tree has cyclomatic complexity 254 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • gix_merge::tree::apply_index_entries::function::apply_index_entries (cyclomatic 26) gix-merge/src/tree/mod.rs:556 — gix_merge::tree::apply_index_entries::function::apply_index_entries has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Tree · ×2
  • Tree::handle_key (cyclomatic 47) gix-tix/src/ref_tree.rs:274 — Tree::handle_key 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.
  • Tree::draw (cyclomatic 17) gix-tix/src/ref_tree.rs:424 — Tree::draw 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 · Pipeline · ×2
  • Pipeline::convert_to_diffable_inner (cyclomatic 46) gix-diff/src/blob/pipeline.rs:226 — Pipeline::convert_to_diffable_inner has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Pipeline::convert_to_mergeable (cyclomatic 18) gix-merge/src/blob/pipeline.rs:141 — Pipeline::convert_to_mergeable 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 · gix_blame · ×2
  • gix_blame::file::function::file (cyclomatic 40) gix-blame/src/file/function.rs:76 — gix_blame::file::function::file 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.
  • gix_blame::file::process_change (cyclomatic 27) gix-blame/src/file/mod.rs:17 — gix_blame::file::process_change has cyclomatic complexity 27 (threshold 15). Of this number, 26 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 · Tracker · ×2
  • Tracker::find_file_renames (cyclomatic 40) gix-diff/src/rewrites/tracker.rs:329 — Tracker::find_file_renames 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.
  • Tracker::estimate_similarity (cyclomatic 16) gix-diff/src/rewrites/tracker.rs:541 — Tracker::estimate_similarity 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 · HistoryGraph · ×2
  • HistoryGraph::refresh_inner (cyclomatic 32) gix-tix/src/history.rs:773 — HistoryGraph::refresh_inner 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.
  • HistoryGraph::paint_inner (cyclomatic 21) gix-tix/src/history.rs:670 — HistoryGraph::paint_inner 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 · State · ×2
  • State::handle (cyclomatic 31) gix-tix/src/prefix_input/mod.rs:70 — State::handle 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.
  • State::compute_status (cyclomatic 22) gix-status/src/index_as_worktree/function.rs:372 — State::compute_status 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 · Remote · ×2
  • Remote::default (cyclomatic 31) gix-transport/src/client/blocking_io/http/reqwest/remote.rs:43 — Remote::default 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.
  • Remote::save_to (cyclomatic 19) gix/src/remote/save.rs:11 — Remote::save_to has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Repository · ×2
  • Repository::try_find_remote_inner (cyclomatic 24) gix/src/repository/remote.rs:176 — Repository::try_find_remote_inner has cyclomatic complexity 24 (threshold 15). Of this number, 22 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, 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.
  • Repository::prepare_add_worktree (cyclomatic 16) gix/src/worktree/add.rs:124 — Repository::prepare_add_worktree 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 · gix_discover · ×2
  • gix_discover::upwards::function::discover_opts_with_trust (cyclomatic 24) gix-discover/src/upwards/mod.rs:216 — gix_discover::upwards::function::discover_opts_with_trust 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.
  • gix_discover::is::git_with_metadata (cyclomatic 20) gix-discover/src/is.rs:51 — gix_discover::is::git_with_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 · File · ×2
  • File::resolve_deltas (cyclomatic 22) gix-pack/src/data/file/decode/entry.rs:235 — File::resolve_deltas 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.
  • File::new (cyclomatic 17) gix-commitgraph/src/file/init.rs:30 — File::new 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 · Handle · ×2
  • Handle::try_find_cached_inner (cyclomatic 20) gix-odb/src/store_impls/dynamic/find.rs:53 — Handle::try_find_cached_inner 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.
  • Handle::try_header_inner (cyclomatic 20) gix-odb/src/store_impls/dynamic/header.rs:22 — Handle::try_header_inner 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 · Search · ×2
  • Search::pattern_matching_relative_path (cyclomatic 20) gix-pathspec/src/search/matching.rs:27 — Search::pattern_matching_relative_path 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.
  • Search::can_match_relative_path (cyclomatic 19) gix-pathspec/src/search/matching.rs:133 — Search::can_match_relative_path 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 · gix_protocol · ×2
  • gix_protocol::fetch::function::fetch (cyclomatic 18) gix-protocol/src/fetch/function.rs:40 — gix_protocol::fetch::function::fetch 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.
  • gix_protocol::fetch::negotiate::mark_complete_and_common_ref (cyclomatic 17) gix-protocol/src/fetch/negotiate.rs:102 — gix_protocol::fetch::negotiate::mark_complete_and_common_ref 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 · gix_revision · ×2
  • gix_revision::describe::function::describe (cyclomatic 18) gix-revision/src/describe.rs:148 — gix_revision::describe::function::describe 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.
  • gix_revision::merge_base::function::remove_redundant (cyclomatic 17) gix-revision/src/merge_base/function.rs:111 — gix_revision::merge_base::function::remove_redundant 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 · Url · ×2
  • Url::write_to (cyclomatic 17) gix-url/src/lib.rs:717 — Url::write_to 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.
  • Url::write_canonical_form_to (cyclomatic 17) gix-url/src/lib.rs:779 — Url::write_canonical_form_to has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · gix_blame · ×2
  • gix_blame::file::function::file (cognitive 105) gix-blame/src/file/function.rs:76 — gix_blame::file::function::file has cognitive complexity 105 (threshold 15). Drivers by points: if/else 29 (83 pts), loops 6 (16 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 66). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • gix_blame::file::process_change (cognitive 38) gix-blame/src/file/mod.rs:17 — gix_blame::file::process_change has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (19 pts), match/switch 8 (18 pts), boolean chains 1 (nesting depth added 18). Of this number, 37 points are the body's own statements and 1 belongs to one function item inside it that branches. 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 · Editor · ×2
  • Editor::upsert_or_remove_at_pathbuf (cognitive 65) gix-object/src/tree/editor.rs:275 — Editor::upsert_or_remove_at_pathbuf has cognitive complexity 65 (threshold 15). Drivers by points: if/else 19 (45 pts), match/switch 5 (16 pts), boolean chains 3, loops 1 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Editor::write_at_pathbuf (cognitive 37) gix-object/src/tree/editor.rs:188 — Editor::write_at_pathbuf has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (20 pts), match/switch 3 (14 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 · Remote · ×2
  • Remote::default (cognitive 64) gix-transport/src/client/blocking_io/http/reqwest/remote.rs:43 — Remote::default has cognitive complexity 64 (threshold 15). Drivers by points: if/else 17 (42 pts), match/switch 5 (14 pts), boolean chains 5, loops 2 (3 pts) (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.
  • Remote::save_to (cognitive 31) gix/src/remote/save.rs:11 — Remote::save_to has cognitive complexity 31 (threshold 15). Drivers by points: loops 7 (14 pts), if/else 9 (13 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · gix_diff · ×2
  • gix_diff::index::function::diff (cognitive 63) gix-diff/src/index/function.rs:32 — gix_diff::index::function::diff has cognitive complexity 63 (threshold 15). Drivers by points: match/switch 10 (35 pts), if/else 11 (23 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 38). 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.
  • gix_diff::tree::function::handle_lhs_and_rhs_with_equal_filenames (cognitive 19) gix-diff/src/tree/function.rs:298 — gix_diff::tree::function::handle_lhs_and_rhs_with_equal_filenames has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · gix_discover · ×2
  • gix_discover::upwards::function::discover_opts_with_trust (cognitive 45) gix-discover/src/upwards/mod.rs:216 — gix_discover::upwards::function::discover_opts_with_trust has cognitive complexity 45 (threshold 15). Drivers by points: if/else 19 (33 pts), match/switch 4 (8 pts), boolean chains 3, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • gix_discover::is::git_with_metadata (cognitive 24) gix-discover/src/is.rs:51 — gix_discover::is::git_with_metadata has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (17 pts), match/switch 4 (6 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · WithSidebands · ×2
  • WithSidebands::poll_fill_buf (cognitive 43) gix-packetline/src/async_io/sidebands.rs:243 — WithSidebands::poll_fill_buf has cognitive complexity 43 (threshold 15). Drivers by points: match/switch 6 (22 pts), if/else 4 (19 pts), loops 1 (2 pts) (nesting depth added 32). 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.
  • WithSidebands::fill_buf (cognitive 32) gix-packetline/src/blocking_io/sidebands.rs:137 — WithSidebands::fill_buf has cognitive complexity 32 (threshold 15). Drivers by points: if/else 4 (16 pts), match/switch 4 (14 pts), loops 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 · gix_worktree · ×2
  • gix_worktree::remove::remove_root_with_after_scan (cognitive 42) gix-worktree/src/remove.rs:200 — gix_worktree::remove::remove_root_with_after_scan has cognitive complexity 42 (threshold 15). Drivers by points: if/else 9 (24 pts), match/switch 3 (11 pts), loops 3 (5 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.
  • gix_worktree::stack::delegate::create_leading_directory (cognitive 16) gix-worktree/src/stack/delegate.rs:164 — gix_worktree::stack::delegate::create_leading_directory has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParsedUrl · ×2
  • ParsedUrl::parse_host_port (cognitive 39) gix-url/src/simple_url.rs:194 — ParsedUrl::parse_host_port has cognitive complexity 39 (threshold 15). Drivers by points: if/else 20 (33 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ParsedUrl::parse (cognitive 18) gix-url/src/simple_url.rs:110 — ParsedUrl::parse has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Engine · ×2
  • Engine::perform_run (cognitive 36) gitoxide-core/src/corpus/engine.rs:72 — Engine::perform_run has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 4 (10 pts), match/switch 1 (3 pts), boolean chains 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.
  • Engine::run (cognitive 24) gitoxide-core/src/query/engine/command.rs:17 — Engine::run has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3 (7 pts), boolean chains 1, match/switch 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.
D2 · Cognitive Complexity · Iter · ×2
  • Iter::next (cognitive 30) gix-fs/src/dir/create.rs:154 — Iter::next has cognitive complexity 30 (threshold 15). Drivers by points: if/else 5 (20 pts), match/switch 4 (10 pts) (nesting depth added 21). 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.
  • Iter::next (cognitive 20) gix/src/status/iter/mod.rs:230 — Iter::next has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 3 (9 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gix_worktree_state · ×2
  • gix_worktree_state::checkout::chunk::process_delayed_filter_results (cognitive 30) gix-worktree-state/src/checkout/chunk.rs:161 — gix_worktree_state::checkout::chunk::process_delayed_filter_results has cognitive complexity 30 (threshold 15). Drivers by points: if/else 5 (15 pts), match/switch 2 (8 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • gix_worktree_state::checkout::entry::checkout (cognitive 18) gix-worktree-state/src/checkout/entry.rs:63 — gix_worktree_state::checkout::entry::checkout has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 2 (3 pts), 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 · Vec · ×2
  • Vec::for_each_set_bit (cognitive 29) gix-bitmap/src/ewah.rs:96 — Vec::for_each_set_bit has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 4 (9 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.
  • Vec::extend_with_splits_of_symbolic_refs (cognitive 17) gix-ref/src/transaction/ext.rs:56 — Vec::extend_with_splits_of_symbolic_refs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 1 (4 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Simple · ×2
  • Simple::next_by_topology (cognitive 27) gix-traverse/src/commit/simple.rs:707 — Simple::next_by_topology has cognitive complexity 27 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 3 (7 pts), match/switch 2 (6 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.
  • Simple::next_by_commit_date (cognitive 20) gix-traverse/src/commit/simple.rs:618 — Simple::next_by_commit_date has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 3 (8 pts), loops 3 (7 pts), if/else 2 (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.
D2 · Cognitive Complexity · Context · ×2
  • Context::from_bytes (cognitive 26) gix-credentials/src/protocol/context/serde.rs:125 — Context::from_bytes has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 4 (11 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Context::write_to (cognitive 23) gix-credentials/src/protocol/context/serde.rs:18 — Context::write_to has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 5 (6 pts), match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gix_macros · ×2
  • gix_macros::momo::convert (cognitive 26) gix-macros/src/momo.rs:167 — gix_macros::momo::convert has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (20 pts), match/switch 3 (5 pts), boolean chains 1 (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • gix_macros::unstable::fields (cognitive 19) gix-macros/src/unstable.rs:164 — gix_macros::unstable::fields has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · References · ×2
  • References::resolve_input (cognitive 25) gix-tix/src/edit/auto_merge/mod.rs:356 — References::resolve_input has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (4 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • References::resolve (cognitive 16) gix-tix/src/edit/auto_merge/mod.rs:410 — References::resolve has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 2 (4 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 · TreeNodes · ×2
  • TreeNodes::track_change (cognitive 21) gix-merge/src/tree/utils.rs:505 — TreeNodes::track_change has cognitive complexity 21 (threshold 15). Drivers by points: if/else 2 (9 pts), match/switch 2 (5 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • TreeNodes::check_conflict (cognitive 18) gix-merge/src/tree/utils.rs:557 — TreeNodes::check_conflict has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 1 (2 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.
D2 · Cognitive Complexity · Pattern · ×2
  • Pattern::normalize (cognitive 21) gix-pathspec/src/pattern.rs:46 — Pattern::normalize has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (16 pts), match/switch 3 (4 pts), boolean chains 1 (nesting depth added 6). Of this number, 18 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.
  • Pattern::to_bstring (cognitive 19) gix-pathspec/src/pattern.rs:159 — Pattern::to_bstring has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 1 (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.
D2 · Cognitive Complexity · Graph · ×2
  • Graph::verify_integrity (cognitive 19) gix-commitgraph/src/verify.rs:35 — Graph::verify_integrity has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Graph::at (cognitive 16) gix-commitgraph/src/init.rs:23 — Graph::at has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×2
  • Edited copy of a member (25 corresponding lines) gix-diff/src/tree/function.rs:132 — gix-diff/src/tree/function.rs:132-156 | gix-diff/src/tree/function.rs:164-188 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) gix-transport/src/client/git/async_io.rs:84 — gix-transport/src/client/git/async_io.rs:84-110 | gix-transport/src/client/git/blocking_io.rs:81-105 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 11+ corresponding lines) gix-odb/src/memory.rs:222 — gix-odb/src/memory.rs:222-233 | gix-odb/src/memory.rs:240-251 | gix-odb/src/memory.rs:273-283 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) gix-config/src/file/mutable/section.rs:311 — gix-config/src/file/mutable/section.rs:311-321 | gix-config/src/file/section/body.rs:49-59 | gix-config/src/file/section/mod.rs:296-306 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 10+ corresponding lines) gix-tix/src/app.rs:3508 — gix-tix/src/app.rs:3508-3519 | gix-tix/src/app.rs:3589-3600 | gix-tix/src/app.rs:3602-3611 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) gix-path/src/convert.rs:18 — gix-path/src/convert.rs:18-29 | gix-path/src/convert.rs:32-43 | gix-path/src/convert.rs:77-86 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 8+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 8+ corresponding lines) gix-tix/src/app.rs:3299 — gix-tix/src/app.rs:3299-3307 | gix-tix/src/app.rs:3322-3329 | gix-tix/src/app.rs:3454-3463 | gix-tix/src/app.rs:3521-3532 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 8+ corresponding lines) gix-hash/src/oid.rs:207 — gix-hash/src/oid.rs:207-214 | gix-hash/src/oid.rs:218-225 | gix-hash/src/oid.rs:229-236 | gix-hash/src/oid.rs:301-308 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×2
  • Duplicated block (27 lines × 2) gix-merge/src/tree/function/resolve.rs:1090 — gix-merge/src/tree/function/resolve.rs:1090-1116 | gix-merge/src/tree/function/resolve.rs:2310-2336 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (27 lines × 2) gix-tix/src/history.rs:831 — gix-tix/src/history.rs:831-857 | gix-tix/src/history.rs:881-907 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-tix/src/history.rs:831` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×2
  • Duplicated block (25 lines × 2) gix-parallel/src/in_parallel.rs:82 — gix-parallel/src/in_parallel.rs:82-106 | gix-parallel/src/in_parallel.rs:159-183 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-parallel/src/in_parallel.rs:82` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (25 lines × 2) gix-transport/src/client/capabilities.rs:220 — gix-transport/src/client/capabilities.rs:220-244 | gix-transport/src/client/capabilities.rs:307-331 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-transport/src/client/capabilities.rs:220` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×2
  • Duplicated block (22 lines × 2) gix-merge/src/tree/function/resolve.rs:1631 — gix-merge/src/tree/function/resolve.rs:1631-1652 | gix-merge/src/tree/function/resolve.rs:2135-2156 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-merge/src/tree/function/resolve.rs:1631` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (22 lines × 2) gix-tix/src/history.rs:916 — gix-tix/src/history.rs:916-937 | gix-tix/src/history.rs:1372-1393 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `gix-tix/src/history.rs:1394` calls `is_empty`, `extend`, `iter` and `gix-tix/src/history.rs:938` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×2
  • Duplicated block (19 lines × 2) gix-pack/src/index/traverse/with_index.rs:85 — gix-pack/src/index/traverse/with_index.rs:85-103 | gix-pack/src/index/traverse/with_lookup.rs:88-106 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `gix-pack/src/index/traverse/with_index.rs:85` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) gix-utils/src/btoi.rs:117 — gix-utils/src/btoi.rs:117-135 | gix-utils/src/btoi.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. Read the line range as the matched WINDOW rather than a finished unit: at `gix-utils/src/btoi.rs:117` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×2
  • Duplicated block (18 lines × 2) gix-tix/src/lib.rs:6728 — gix-tix/src/lib.rs:6728-6745 | gix-tix/src/lib.rs:6773-6790 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-tix/src/lib.rs:6728` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) gix-transport/src/client/capabilities.rs:201 — gix-transport/src/client/capabilities.rs:201-218 | gix-transport/src/client/capabilities.rs:288-305 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-transport/src/client/capabilities.rs:201` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×2
  • Duplicated block (11 lines × 3) gix-merge/src/tree/function/resolve.rs:891 — gix-merge/src/tree/function/resolve.rs:891-901 | gix-merge/src/tree/function/resolve.rs:960-970 | gix-merge/src/tree/function/resolve.rs:1748-1758 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-merge/src/tree/function/resolve.rs:891` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `gix-merge/src/tree/function/resolve.rs:890` calls `remove_if_leaf`, `toc` and `gix-merge/src/tree/function/resolve.rs:959` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 3) gix-diff/src/blob/pipeline.rs:360 — gix-diff/src/blob/pipeline.rs:360-371 | gix-merge/src/blob/pipeline.rs:210-222 | gix-merge/src/blob/pipeline.rs:293-303 — before extracting anything, compare `gix-diff/src/blob/pipeline.rs` and `gix-merge/src/blob/pipeline.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `gix-diff/src/blob/pipeline.rs:360` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×2
  • Duplicated block (9 lines × 4) gix-worktree/src/stack/state/attributes.rs:107 — gix-worktree/src/stack/state/attributes.rs:107-115 | gix-worktree/src/stack/state/attributes.rs:147-155 | gix-worktree/src/stack/state/ignore.rs:182-190 | gix-worktree/src/stack/state/ignore.rs:215-223 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `gix-worktree/src/stack/state/attributes.rs:107` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 4) gitoxide-core/src/repository/tree.rs:63 — gitoxide-core/src/repository/tree.rs:63-71 | gix-diff/src/tree/recorder.rs:90-98 | gix-traverse/src/tree/recorder.rs:64-72 | gix-worktree-stream/src/from_tree/traverse.rs:46-54 — 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 (6 lines × 3) · ×2
  • Duplicated block (6 lines × 3) gix-encoding/src/legacy.rs:608 — gix-encoding/src/legacy.rs:608-613 | gix-encoding/src/legacy.rs:744-749 | gix-encoding/src/legacy.rs:783-788 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-encoding/src/legacy.rs:608` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `output` to `&mut [u8]` in one and `&mut [u8]) -> (usize` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (6 lines × 3) gix-tix/src/history.rs:226 — gix-tix/src/history.rs:226-231 | gix-tix/src/history.rs:791-796 | gix-tix/src/history.rs:1238-1243 — 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) · ×2
  • Duplicated block (5 lines × 3) gix-tix/src/lib.rs:5104 — gix-tix/src/lib.rs:5104-5108 | gix-tix/src/lib.rs:6968-6972 | gix-tix/src/lib.rs:7248-7252 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-tix/src/lib.rs:5104` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `gix-tix/src/lib.rs:6966` calls `area`, `as_ref`, `map_or` and `gix-tix/src/lib.rs:5104` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 3) gix-tix/src/history.rs:1506 — gix-tix/src/history.rs:1506-1510 | gix-tix/src/history.rs:1761-1765 | gix-tix/src/history.rs:2223-2227 — 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.
AC3 · Page structure · Page without a main landmark · ×1
  • Page without a main landmark etc/speak/gitmerge-2024.marp.html:1 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
AC6 · Visual & motion safety · Focus outline removed in CSS without a · ×1
  • Focus outline removed in CSS without a :focus replacement etc/speak/gitmerge-2024.marp.html:1 — `body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>button` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
D1 · Cyclomatic Complexity · gitoxide · ×1
  • gitoxide::plumbing::main::main (cyclomatic 123) src/plumbing/main.rs:30 — gitoxide::plumbing::main::main has cyclomatic complexity 123 (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 · Encoding · ×1
  • Encoding::for_label (cyclomatic 109) gix-encoding/src/encoding.rs:197 — Encoding::for_label has cyclomatic complexity 109 (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 · gix_glob · ×1
  • gix_glob::wildmatch::function::match_recursive (cyclomatic 106) gix-glob/src/wildmatch.rs:55 — gix_glob::wildmatch::function::match_recursive has cyclomatic complexity 106 (threshold 15). To reduce it, separate the cases: extract each independent 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 · ThreadSafeRepository · ×1
  • ThreadSafeRepository::open_from_paths (cyclomatic 54) gix/src/open/repository.rs:202 — ThreadSafeRepository::open_from_paths has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent 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 · Converter · ×1
  • Converter::convert (cyclomatic 45) gix-encoding/src/convert.rs:121 — Converter::convert has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent 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 · gix_transport · ×1
  • gix_transport::client::blocking_io::http::curl::remote::new (cyclomatic 38) gix-transport/src/client/blocking_io/http/curl/remote.rs:412 — gix_transport::client::blocking_io::http::curl::remote::new 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 · Store · ×1
  • Store::consolidate_with_disk_state (cyclomatic 36) gix-odb/src/store_impls/dynamic/load_index.rs:193 — Store::consolidate_with_disk_state 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.
D1 · Cyclomatic Complexity · PrepareFetch · ×1
  • PrepareFetch::fetch_only (cyclomatic 32) gix/src/clone/fetch/mod.rs:24 — PrepareFetch::fetch_only 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 · Cascade · ×1
  • Cascade::invoke (cyclomatic 32) gix-credentials/src/helper/cascade.rs:85 — Cascade::invoke 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.
D1 · Cyclomatic Complexity · gix_traverse · ×1
  • gix_traverse::commit::simple::compute_hidden_frontier (cyclomatic 30) gix-traverse/src/commit/simple.rs:179 — gix_traverse::commit::simple::compute_hidden_frontier 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 · Mark · ×1
  • Mark::try_collapse (cyclomatic 29) gix-dir/src/walk/readdir.rs:319 — Mark::try_collapse 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 · Prepared · ×1
  • Prepared::finish_inner (cyclomatic 28) gix-tix/src/edit/rebase.rs:2493 — Prepared::finish_inner has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Overview · ×1
  • Overview::new (cyclomatic 28) gix-tix/src/ref_tree.rs:949 — Overview::new has cyclomatic complexity 28 (threshold 15). Of this number, 26 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · gix_diff · ×1
  • gix_diff::index::function::diff (cyclomatic 27) gix-diff/src/index/function.rs:32 — gix_diff::index::function::diff 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 · gix_dir · ×1
  • gix_dir::walk::classify::path (cyclomatic 27) gix-dir/src/walk/classify.rs:133 — gix_dir::walk::classify::path 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 · Platform · ×1
  • Platform::run_as_initialized (cyclomatic 27) gix-tix/src/command.rs:347 — Platform::run_as_initialized 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 · Merge · ×1
  • Merge::run (cyclomatic 26) gix-merge/src/blob/builtin_driver/text/function.rs:55 — Merge::run 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 · Configuration · ×1
  • Configuration::at_path (cyclomatic 24) gix-filter/src/pipeline/util.rs:27 — Configuration::at_path has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 10 of the 24 points are its own statements and the rest belongs to 4 function items inside it that branch (extract_encoding, extract_crlf, extract_eol, …). 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 · Editor · ×1
  • Editor::upsert_or_remove_at_pathbuf (cyclomatic 24) gix-object/src/tree/editor.rs:275 — Editor::upsert_or_remove_at_pathbuf 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 · gix_status · ×1
  • gix_status::index_as_worktree_with_renames::function::index_as_worktree_with_renames (cyclomatic 24) gix-status/src/index_as_worktree_with_renames/mod.rs:49 — gix_status::index_as_worktree_with_renames::function::index_as_worktree_with_renames 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 · SelectionFlow · ×1
  • SelectionFlow::notice (cyclomatic 24) gix-tix/src/app/tree_selection/mod.rs:107 — SelectionFlow::notice 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 · gix_filter · ×1
  • gix_filter::eol::convert_to_git::function::convert_to_git (cyclomatic 23) gix-filter/src/eol/convert_to_git.rs:55 — gix_filter::eol::convert_to_git::function::convert_to_git 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 · Response · ×1
  • Response::from_line_reader (cyclomatic 23) gix-protocol/src/fetch/response/io.rs:51 — Response::from_line_reader 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 · gix_refspec · ×1
  • gix_refspec::parse::function::parse (cyclomatic 23) gix-refspec/src/parse.rs:18 — gix_refspec::parse::function::parse has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Context · ×1
  • Context::from_bytes (cyclomatic 22) gix-credentials/src/protocol/context/serde.rs:125 — Context::from_bytes has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Cone · ×1
  • Cone::from_search (cyclomatic 22) gix-worktree/src/sparse.rs:183 — Cone::from_search 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 · Command · ×1
  • Command::try_from (cyclomatic 21) gix-command/src/prepare.rs:188 — Command::try_from 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 · gix_error · ×1
  • gix_error::exn::impls::write_error_node_recursive (cyclomatic 21) gix-error/src/exn/impls.rs:405 — gix_error::exn::impls::write_error_node_recursive 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 · gix_macros · ×1
  • gix_macros::unstable::item (cyclomatic 21) gix-macros/src/unstable.rs:97 — gix_macros::unstable::item 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 · ParsedUrl · ×1
  • ParsedUrl::parse_host_port (cyclomatic 21) gix-url/src/simple_url.rs:194 — ParsedUrl::parse_host_port 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 · gix_url · ×1
  • gix_url::parse::url (cyclomatic 21) gix-url/src/parse.rs:117 — gix_url::parse::url 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.
D1 · Cyclomatic Complexity · gix_command · ×1
  • gix_command::parse::parse_words (cyclomatic 20) gix-command/src/parse.rs:107 — gix_command::parse::parse_words has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Attribute · ×1
  • Attribute::fmt (cyclomatic 20) gix-config-value/src/color.rs:337 — Attribute::fmt has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · gix_path · ×1
  • gix_path::realpath::function::realpath_opts (cyclomatic 20) gix-path/src/realpath.rs:46 — gix_path::realpath::function::realpath_opts 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 · gix_utils · ×1
  • gix_utils::str::precompose_impl (cyclomatic 20) gix-utils/src/str.rs:13 — gix_utils::str::precompose_impl has cyclomatic complexity 20 (threshold 15). Of this number, 15 points are the body's own statements and 5 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 · gix_worktree · ×1
  • gix_worktree::remove::remove_root_with_after_scan (cyclomatic 20) gix-worktree/src/remove.rs:200 — gix_worktree::remove::remove_root_with_after_scan 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 · Stack · ×1
  • Stack::make_relative_path_current (cyclomatic 19) gix-fs/src/stack.rs:163 — Stack::make_relative_path_current 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 · Collection · ×1
  • Collection::try_from_file (cyclomatic 18) gitoxide-core/src/index/information.rs:80 — Collection::try_from_file has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Mode · ×1
  • Mode::change_to_match_fs_with_values (cyclomatic 18) gix-index/src/entry/mode.rs:80 — Mode::change_to_match_fs_with_values 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 · LineWriter · ×1
  • LineWriter::poll_write (cyclomatic 18) gix-packetline/src/async_io/encode.rs:54 — LineWriter::poll_write 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 · Myers · ×1
  • Myers::split (cyclomatic 17) gix-imara-diff/src/myers.rs:139 — Myers::split 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 · WorktreeWatchRefresh · ×1
  • WorktreeWatchRefresh::observe (cyclomatic 17) gix-tix/src/lib.rs:234 — WorktreeWatchRefresh::observe has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: gix_tix::action_with_shortcut_groups (cyclomatic 44) 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 · gix_quote · ×1
  • gix_quote::ansi_c::undo (cyclomatic 17) gix-quote/src/ansi_c.rs:57 — gix_quote::ansi_c::undo 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 · LcsSearch · ×1
  • LcsSearch::update_lcs (cyclomatic 16) gix-imara-diff/src/histogram/lcs.rs:63 — LcsSearch::update_lcs 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 · LooseThenPacked · ×1
  • LooseThenPacked::next (cyclomatic 16) gix-ref/src/store/file/overlay_iter.rs:105 — LooseThenPacked::next has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to 2 function items inside it that branch. 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 · CompressedHistory · ×1
  • CompressedHistory::new (cyclomatic 16) gix-tix/src/app.rs:3906 — CompressedHistory::new has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D17 · Explicit Debt · FixmeComment · ×1
  • FixmeComment gix-pack/src/data/file/decode/entry.rs:476 — // FIXME(Performance) If delta-chains are uneven, we know we will have to copy bytes over here — 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 · gix_glob · ×1
  • gix_glob::wildmatch::function::match_recursive (cognitive 335) gix-glob/src/wildmatch.rs:55 — gix_glob::wildmatch::function::match_recursive has cognitive complexity 335 (threshold 15). Drivers by points: if/else 58 (233 pts), match/switch 14 (51 pts), loops 7 (29 pts), boolean chains 22 (nesting depth added 234). To reduce it, split the body into named stages: move each independent 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 · gitoxide · ×1
  • gitoxide::plumbing::main::main (cognitive 176) src/plumbing/main.rs:30 — gitoxide::plumbing::main::main has cognitive complexity 176 (threshold 15). Drivers by points: match/switch 40 (91 pts), if/else 41 (84 pts), boolean chains 1 (nesting depth added 94). 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 · Encoding · ×1
  • Encoding::for_label (cognitive 108) gix-encoding/src/encoding.rs:197 — Encoding::for_label has cognitive complexity 108 (threshold 15). Drivers by points: if/else 55, boolean chains 53. 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 · ThreadSafeRepository · ×1
  • ThreadSafeRepository::open_from_paths (cognitive 84) gix/src/open/repository.rs:202 — ThreadSafeRepository::open_from_paths has cognitive complexity 84 (threshold 15). Drivers by points: if/else 32 (55 pts), boolean chains 14, match/switch 8 (13 pts), loops 1 (2 pts) (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.
D2 · Cognitive Complexity · Converter · ×1
  • Converter::convert (cognitive 78) gix-encoding/src/convert.rs:121 — Converter::convert has cognitive complexity 78 (threshold 15). Drivers by points: if/else 27 (50 pts), match/switch 6 (18 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gix_transport · ×1
  • gix_transport::client::blocking_io::http::curl::remote::new (cognitive 77) gix-transport/src/client/blocking_io/http/curl/remote.rs:412 — gix_transport::client::blocking_io::http::curl::remote::new has cognitive complexity 77 (threshold 15). Drivers by points: if/else 27 (57 pts), match/switch 5 (14 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Cascade · ×1
  • Cascade::invoke (cognitive 66) gix-credentials/src/helper/cascade.rs:85 — Cascade::invoke has cognitive complexity 66 (threshold 15). Drivers by points: if/else 19 (53 pts), boolean chains 6, loops 2 (5 pts), match/switch 1 (2 pts) (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Merge · ×1
  • Merge::run (cognitive 56) gix-merge/src/blob/builtin_driver/text/function.rs:55 — Merge::run has cognitive complexity 56 (threshold 15). Drivers by points: if/else 15 (40 pts), match/switch 6 (13 pts), boolean chains 2, loops 1 (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 · gix_status · ×1
  • gix_status::index_as_worktree_with_renames::function::index_as_worktree_with_renames (cognitive 53) gix-status/src/index_as_worktree_with_renames/mod.rs:49 — gix_status::index_as_worktree_with_renames::function::index_as_worktree_with_renames has cognitive complexity 53 (threshold 15). Drivers by points: if/else 15 (30 pts), loops 5 (12 pts), match/switch 6 (11 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.
D2 · Cognitive Complexity · Command · ×1
  • Command::try_from (cognitive 49) gix-command/src/prepare.rs:188 — Command::try_from has cognitive complexity 49 (threshold 15). Drivers by points: if/else 24 (44 pts), match/switch 2 (5 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Prepared · ×1
  • Prepared::finish_inner (cognitive 49) gix-tix/src/edit/rebase.rs:2493 — Prepared::finish_inner has cognitive complexity 49 (threshold 15). Drivers by points: if/else 18 (34 pts), loops 5 (8 pts), match/switch 2 (4 pts), boolean chains 3 (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 · PrepareFetch · ×1
  • PrepareFetch::fetch_only (cognitive 47) gix/src/clone/fetch/mod.rs:24 — PrepareFetch::fetch_only has cognitive complexity 47 (threshold 15). Drivers by points: if/else 29 (38 pts), boolean chains 5, match/switch 2 (4 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.
D2 · Cognitive Complexity · LineWriter · ×1
  • LineWriter::poll_write (cognitive 45) gix-packetline/src/async_io/encode.rs:54 — LineWriter::poll_write has cognitive complexity 45 (threshold 15). Drivers by points: if/else 10 (30 pts), loops 5 (13 pts), match/switch 1 (2 pts) (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.
D2 · Cognitive Complexity · Overview · ×1
  • Overview::new (cognitive 42) gix-tix/src/ref_tree.rs:949 — Overview::new has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 12 (15 pts), boolean chains 4 (nesting depth added 15). Of this number, 40 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Response · ×1
  • Response::from_line_reader (cognitive 41) gix-protocol/src/fetch/response/io.rs:51 — Response::from_line_reader has cognitive complexity 41 (threshold 15). Drivers by points: if/else 7 (25 pts), match/switch 4 (11 pts), loops 2 (4 pts), boolean chains 1 (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.
D2 · Cognitive Complexity · LcsSearch · ×1
  • LcsSearch::update_lcs (cognitive 40) gix-imara-diff/src/histogram/lcs.rs:63 — LcsSearch::update_lcs has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (31 pts), loops 4 (7 pts), boolean chains 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gix_error · ×1
  • gix_error::exn::impls::write_error_node_recursive (cognitive 39) gix-error/src/exn/impls.rs:405 — gix_error::exn::impls::write_error_node_recursive has cognitive complexity 39 (threshold 15). Drivers by points: if/else 17 (29 pts), loops 3 (6 pts), boolean chains 4 (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 · Cone · ×1
  • Cone::from_search (cognitive 39) gix-worktree/src/sparse.rs:183 — Cone::from_search has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 8, loops 3 (5 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 · Mark · ×1
  • Mark::try_collapse (cognitive 36) gix-dir/src/walk/readdir.rs:319 — Mark::try_collapse has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 9, match/switch 2 (4 pts), loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gix_filter · ×1
  • gix_filter::eol::convert_to_git::function::convert_to_git (cognitive 35) gix-filter/src/eol/convert_to_git.rs:55 — gix_filter::eol::convert_to_git::function::convert_to_git has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 6, match/switch 2 (4 pts), loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Myers · ×1
  • Myers::split (cognitive 35) gix-imara-diff/src/myers.rs:139 — Myers::split has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (26 pts), match/switch 2 (5 pts), boolean chains 3, 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 · LookupRefDeltaObjectsIter · ×1
  • LookupRefDeltaObjectsIter::next (cognitive 34) gix-pack/src/data/input/lookup_ref_delta_objects.rs:92 — LookupRefDeltaObjectsIter::next has cognitive complexity 34 (threshold 15). Drivers by points: match/switch 6 (20 pts), if/else 5 (14 pts) (nesting depth added 23). 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 · SelectionFlow · ×1
  • SelectionFlow::notice (cognitive 29) gix-tix/src/app/tree_selection/mod.rs:107 — SelectionFlow::notice has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (18 pts), match/switch 7 (11 pts) (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · gix_utils · ×1
  • gix_utils::str::precompose_impl (cognitive 29) gix-utils/src/str.rs:13 — gix_utils::str::precompose_impl has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 7, loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 7). Of this number, 22 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Configuration · ×1
  • Configuration::at_path (cognitive 28) gix-filter/src/pipeline/util.rs:27 — Configuration::at_path has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (16 pts), match/switch 8 (12 pts) (nesting depth added 8). Most of this is not in the body itself: 9 of the 28 points are its own statements and the rest belongs to 4 function items inside it that branch (extract_encoding, extract_crlf, extract_eol, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Reverse · ×1
  • Reverse::next (cognitive 28) gix-ref/src/store/file/log/iter.rs:116 — Reverse::next has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (25 pts), match/switch 2 (3 pts) (nesting depth added 16). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Handler · ×1
  • Handler::header (cognitive 28) gix-transport/src/client/blocking_io/http/curl/remote.rs:321 — Handler::header has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (25 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 · gix_command · ×1
  • gix_command::parse::parse_words (cognitive 27) gix-command/src/parse.rs:107 — gix_command::parse::parse_words has cognitive complexity 27 (threshold 15). Drivers by points: match/switch 5 (16 pts), if/else 5 (10 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.
D2 · Cognitive Complexity · Stack · ×1
  • Stack::make_relative_path_current (cognitive 27) gix-fs/src/stack.rs:163 — Stack::make_relative_path_current has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 4, loops 3, 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.
D2 · Cognitive Complexity · gix_parallel · ×1
  • gix_parallel::in_parallel::in_parallel_with_slice (cognitive 27) gix-parallel/src/in_parallel.rs:202 — gix_parallel::in_parallel::in_parallel_with_slice has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 4 (6 pts), match/switch 2 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gix_refspec · ×1
  • gix_refspec::parse::function::parse (cognitive 26) gix-refspec/src/parse.rs:18 — gix_refspec::parse::function::parse has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 8 (11 pts), boolean chains 4 (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 · CompressedHistory · ×1
  • CompressedHistory::new (cognitive 26) gix-tix/src/app.rs:3906 — CompressedHistory::new has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 6 (8 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gix_url · ×1
  • gix_url::parse::url (cognitive 26) gix-url/src/parse.rs:117 — gix_url::parse::url has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 10 (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 · Parents · ×1
  • Parents::next (cognitive 25) gix-commitgraph/src/file/commit.rs:131 — Parents::next has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 5 (11 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 · Postprocessor · ×1
  • Postprocessor::run (cognitive 25) gix-imara-diff/src/postprocess.rs:76 — Postprocessor::run has cognitive complexity 25 (threshold 15). Drivers by points: loops 6 (15 pts), if/else 5 (10 pts) (nesting depth added 14). 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 · Link · ×1
  • Link::dissolve_into (cognitive 25) gix-index/src/extension/link.rs:45 — Link::dissolve_into has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 3 (6 pts), boolean chains 2, 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 · Definition · ×1
  • Definition::message (cognitive 23) gix-tix/src/edit/auto_merge/mod.rs:171 — Definition::message has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Capabilities · ×1
  • Capabilities::probe_ignore_case (cognitive 22) gix-fs/src/capabilities.rs:114 — Capabilities::probe_ignore_case has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 3 (7 pts), loops 2 (5 pts) (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.
D2 · Cognitive Complexity · EntryMode · ×1
  • EntryMode::extract_from_bytes (cognitive 22) gix-object/src/tree/mod.rs:121 — EntryMode::extract_from_bytes has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (4 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 · WorktreeWatchRefresh · ×1
  • WorktreeWatchRefresh::observe (cognitive 22) gix-tix/src/lib.rs:234 — WorktreeWatchRefresh::observe has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 4 (7 pts), boolean chains 2, 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 · ReadFilterOutput · ×1
  • ReadFilterOutput::read (cognitive 21) gix-filter/src/driver/apply.rs:339 — ReadFilterOutput::read has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (18 pts), match/switch 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 · Indents · ×1
  • Indents::score (cognitive 21) gix-imara-diff/src/slider_heuristic.rs:258 — Indents::score has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SortedLoosePaths · ×1
  • SortedLoosePaths::next (cognitive 21) gix-ref/src/store/file/loose/iter.rs:43 — SortedLoosePaths::next has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LaneState · ×1
  • LaneState::advance_ids (cognitive 21) gix-tix/src/app.rs:4270 — LaneState::advance_ids has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 5 (6 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Transcoder · ×1
  • Transcoder::read (cognitive 20) gix-encoding/src/read.rs:58 — Transcoder::read has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 2 (6 pts), loops 2 (4 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 · gix_fs · ×1
  • gix_fs::symlink::target_is_dir (cognitive 20) gix-fs/src/symlink.rs:177 — gix_fs::symlink::target_is_dir has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 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 · Lines · ×1
  • Lines::next (cognitive 20) gix-ignore/src/parse.rs:30 — Lines::next has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MatchGroup · ×1
  • MatchGroup::match_lhs (cognitive 19) gix-refspec/src/match_group/mod.rs:39 — MatchGroup::match_lhs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (5 pts), match/switch 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LooseThenPacked · ×1
  • LooseThenPacked::next (cognitive 18) gix-ref/src/store/file/overlay_iter.rs:105 — LooseThenPacked::next has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 7 (14 pts), if/else 2 (3 pts), loops 1 (nesting depth added 8). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to 2 function items inside it that branch (peek_loose, advance_to_non_private). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Pretty · ×1
  • Pretty::format_span (cognitive 18) gix-trace/src/forest/printer/pretty.rs:184 — Pretty::format_span has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Builder · ×1
  • Builder::build (cognitive 18) gix-traverse/src/commit/topo/init.rs:130 — Builder::build has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 5 (7 pts), boolean chains 2 (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · BuiltinSubmoduleStatus · ×1
  • BuiltinSubmoduleStatus::status (cognitive 17) gix/src/status/index_worktree.rs:258 — BuiltinSubmoduleStatus::status has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 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.
D2 · Cognitive Complexity · EncodeTable · ×1
  • EncodeTable::encoded_scalar (cognitive 17) gix-encoding/src/legacy.rs:124 — EncodeTable::encoded_scalar has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 2, loops 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 · PlatformRef · ×1
  • PlatformRef::builtin_merge (cognitive 17) gix-merge/src/blob/platform/merge.rs:302 — PlatformRef::builtin_merge has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), match/switch 3 (6 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gix_object · ×1
  • gix_object::commit::message::summary (cognitive 17) gix-object/src/commit/message/mod.rs:92 — gix_object::commit::message::summary has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (10 pts), match/switch 2 (4 pts), loops 1 (2 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.
D2 · Cognitive Complexity · Source · ×1
  • Source::storage_location (cognitive 16) gix-config/src/source.rs:61 — Source::storage_location has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 4 (7 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 · Stats · ×1
  • Stats::from_bytes (cognitive 16) gix-filter/src/eol/utils.rs:46 — Stats::from_bytes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), match/switch 2 (6 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 · Stat · ×1
  • Stat::matches (cognitive 16) gix-index/src/entry/stat.rs:38 — Stat::matches has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4 (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 · FullNameRef · ×1
  • FullNameRef::category_and_short_name (cognitive 16) gix-ref/src/fullname.rs:112 — FullNameRef::category_and_short_name has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Platform · ×1
  • Platform::run_as_initialized (cognitive 16) gix-tix/src/command.rs:347 — Platform::run_as_initialized has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 4 (6 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D3 · God Classes · TooManyFields · ×1
  • TooManyFields: App gix-tix/src/app.rs:579 — TooManyFields — 120 stored fields beside 227 methods. The bar is 30 stored fields; this is 90 over it, 4.00× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
D3 · God Classes · TooManyFunctions · ×1
  • TooManyFunctions: gix_path::env::windows gix-path/src/env/windows/mod.rs:28 — TooManyFunctions — 37 free functions. The bar is 30 free functions; 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.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Edited copy of a member (108 corresponding lines) · ×1
  • Edited copy of a member (108 corresponding lines) gix-config/src/format.rs:130 — gix-config/src/format.rs:130-241 | gix-config/src/parse/format.rs:103-210 — These two members are one piece of code written twice and then edited apart: 108 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (87 corresponding lines) · ×1
  • Edited copy of a member (87 corresponding lines) gix-pack/src/bundle/write/mod.rs:74 — gix-pack/src/bundle/write/mod.rs:74-168 | gix-pack/src/bundle/write/mod.rs:187-273 — These two members are one piece of code written twice and then edited apart: 87 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (69 corresponding lines) · ×1
  • Edited copy of a member (69 corresponding lines) gix-traverse/src/commit/simple.rs:622 — gix-traverse/src/commit/simple.rs:622-705 | gix-traverse/src/commit/simple.rs:707-775 — These two members are one piece of code written twice and then edited apart: 69 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (54 corresponding lines) · ×1
  • Edited copy of a member (54 corresponding lines) gix-refspec/src/match_group/mod.rs:42 — gix-refspec/src/match_group/mod.rs:42-114 | gix-refspec/src/match_group/mod.rs:135-188 — These two members are one piece of code written twice and then edited apart: 54 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (52 corresponding lines) · ×1
  • Edited copy of a member (52 corresponding lines) gix-transport/src/client/capabilities.rs:193 — gix-transport/src/client/capabilities.rs:193-244 | gix-transport/src/client/capabilities.rs:280-331 — These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (47 corresponding lines) · ×1
  • Edited copy of a member (47 corresponding lines) gix-parallel/src/in_parallel.rs:60 — gix-parallel/src/in_parallel.rs:60-106 | gix-parallel/src/in_parallel.rs:131-183 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (45 corresponding lines) · ×1
  • Edited copy of a member (45 corresponding lines) gix-diff/src/tree/function.rs:198 — gix-diff/src/tree/function.rs:198-242 | gix-diff/src/tree/function.rs:252-296 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (74 corresponding lines) · ×1
  • Edited copy of a member (74 corresponding lines) gitoxide-core/src/corpus/db.rs:56 — gitoxide-core/src/corpus/db.rs:56-161 | gitoxide-core/src/query/db.rs:10-83 — These two members are one piece of code written twice and then edited apart: 74 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (43 corresponding lines) · ×1
  • Edited copy of a member (43 corresponding lines) gix-utils/src/btoi.rs:109 — gix-utils/src/btoi.rs:109-151 | gix-utils/src/btoi.rs:217-269 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (29 corresponding lines) · ×1
  • Edited copy of a member (29 corresponding lines) gix-transport/src/client/async_io/request.rs:68 — gix-transport/src/client/async_io/request.rs:68-96 | gix-transport/src/client/blocking_io/request.rs:58-86 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (32 corresponding lines) · ×1
  • Edited copy of a member (32 corresponding lines) gix-merge/src/blob/builtin_driver/text/utils.rs:277 — gix-merge/src/blob/builtin_driver/text/utils.rs:277-318 | gix-merge/src/blob/builtin_driver/text/utils.rs:325-356 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (28 corresponding lines) · ×1
  • Edited copy of a member (28 corresponding lines) gix-tix/src/edit/rebase.rs:3939 — gix-tix/src/edit/rebase.rs:3939-3966 | gix-tix/src/edit/time_travel.rs:1343-1371 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (62 corresponding lines) · ×1
  • Edited copy of a member (62 corresponding lines) gix-diff/src/tree_with_rewrites/change.rs:204 — gix-diff/src/tree_with_rewrites/change.rs:204-265 | gix-diff/src/tree_with_rewrites/change.rs:328-389 — These two members are one piece of code written twice and then edited apart: 62 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (26 corresponding lines) · ×1
  • Edited copy of a member (26 corresponding lines) gix-packetline/src/async_io/read.rs:135 — gix-packetline/src/async_io/read.rs:135-161 | gix-packetline/src/blocking_io/read.rs:134-159 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (39 corresponding lines) · ×1
  • Edited copy of a member (39 corresponding lines) gix-transport/src/client/blocking_io/http/curl/mod.rs:71 — gix-transport/src/client/blocking_io/http/curl/mod.rs:71-110 | gix-transport/src/client/blocking_io/http/reqwest/remote.rs:306-344 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×1
  • Edited copy of a member (21 corresponding lines) gix-revwalk/src/graph/mod.rs:105 — gix-revwalk/src/graph/mod.rs:105-129 | gix-revwalk/src/graph/mod.rs:148-168 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 12+ corresponding lines) gix-odb/src/memory.rs:145 — gix-odb/src/memory.rs:145-159 | gix-odb/src/memory.rs:186-197 | gix-odb/src/memory.rs:204-215 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 8+ corresponding lines) gix-odb/src/store_impls/loose/write.rs:19 — gix-odb/src/store_impls/loose/write.rs:19-26 | gix-odb/src/store_impls/loose/write.rs:33-41 | gix-odb/src/store_impls/loose/write.rs:50-58 | gix-odb/src/store_impls/loose/write.rs:70-78 | gix-odb/src/store_impls/loose/write.rs:88-96 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 8+ corresponding lines) gix-packetline/src/blocking_io/sidebands.rs:93 — gix-packetline/src/blocking_io/sidebands.rs:93-100 | gix-transport/src/client/async_io/bufread_ext.rs:115-122 | gix-transport/src/client/blocking_io/bufread_ext.rs:105-112 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×1
  • Edited copy of a member (16 corresponding lines) gix-diff/src/tree_with_rewrites/change.rs:527 — gix-diff/src/tree_with_rewrites/change.rs:527-542 | gix-diff/src/tree_with_rewrites/change.rs:599-614 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 5+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 5+ corresponding lines) gix-diff/src/tree/visit.rs:69 — gix-diff/src/tree/visit.rs:69-73 | gix-diff/src/tree_with_rewrites/change.rs:618-625 | gix-tix/src/patch_id/mod.rs:279-285 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 4+ corresponding lines) gix/src/config/tree/sections/checkout.rs:49 — gix/src/config/tree/sections/checkout.rs:49-52 | gix/src/config/tree/sections/core.rs:534-538 | gix/src/config/tree/sections/pack.rs:66-70 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (48–49 lines × 2) · ×1
  • Duplicated block (48–49 lines × 2) gix-packetline/src/async_io/read.rs:79 — gix-packetline/src/async_io/read.rs:79-126 | gix-packetline/src/blocking_io/read.rs:77-125 — `gix-packetline/src/async_io/read.rs` and `gix-packetline/src/blocking_io/read.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 95 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `gix-packetline/src/async_io/read.rs:79` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (36 lines × 2) · ×1
  • Duplicated block (36 lines × 2) gix-tix/src/lib.rs:2653 — gix-tix/src/lib.rs:2653-2688 | gix-tix/src/lib.rs:2771-2806 — both copies are in the same file, so extract the 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 (29 lines × 2) · ×1
  • Duplicated block (29 lines × 2) gix-odb/src/store_impls/dynamic/find.rs:85 — gix-odb/src/store_impls/dynamic/find.rs:85-113 | gix-odb/src/store_impls/dynamic/find.rs:351-379 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-odb/src/store_impls/dynamic/find.rs:85` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (31 lines × 2) · ×1
  • Duplicated block (31 lines × 2) gix-merge/src/tree/function/resolve.rs:890 — gix-merge/src/tree/function/resolve.rs:890-920 | gix-merge/src/tree/function/resolve.rs:1747-1777 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-merge/src/tree/function/resolve.rs:890` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×1
  • Duplicated block (26 lines × 2) gitoxide-core/src/repository/fetch.rs:295 — gitoxide-core/src/repository/fetch.rs:295-320 | gitoxide-core/src/repository/remote.rs:224-249 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `gitoxide-core/src/repository/fetch.rs:294` calls `consume_skipped_tags`, `or_error` and `gitoxide-core/src/repository/remote.rs:223` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (23 lines × 3) · ×1
  • Duplicated block (23 lines × 3) gix-tix/src/lib.rs:1536 — gix-tix/src/lib.rs:1536-1558 | gix-tix/src/lib.rs:2653-2675 | gix-tix/src/lib.rs:2771-2793 — 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 (21 lines × 2) · ×1
  • Duplicated block (21 lines × 2) gix-worktree/src/stack/state/ignore.rs:180 — gix-worktree/src/stack/state/ignore.rs:180-200 | gix-worktree/src/stack/state/ignore.rs:213-233 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-worktree/src/stack/state/ignore.rs:213` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (20 lines × 4) · ×1
  • Duplicated block (20 lines × 4) gix-merge/src/tree/function/resolve.rs:871 — gix-merge/src/tree/function/resolve.rs:871-890 | gix-merge/src/tree/function/resolve.rs:941-960 | gix-merge/src/tree/function/resolve.rs:1378-1397 | gix-merge/src/tree/function/resolve.rs:1728-1747 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-merge/src/tree/function/resolve.rs:871` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `gix-merge/src/tree/function/resolve.rs:891` calls `remove_if_leaf`, `toc` and `gix-merge/src/tree/function/resolve.rs:961` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (16–20 lines × 2) · ×1
  • Duplicated block (16–20 lines × 2) gix-blame/src/file/mod.rs:133 — gix-blame/src/file/mod.rs:133-152 | gix-blame/src/file/mod.rs:181-196 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-blame/src/file/mod.rs:133` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (19–20 lines × 2) · ×1
  • Duplicated block (19–20 lines × 2) gix-packetline/src/async_io/read.rs:136 — gix-packetline/src/async_io/read.rs:136-155 | gix-packetline/src/blocking_io/read.rs:135-153 — `gix-packetline/src/async_io/read.rs` and `gix-packetline/src/blocking_io/read.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 95 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `gix-packetline/src/async_io/read.rs:136` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×1
  • Duplicated block (18–19 lines × 2) gix-merge/src/blob/builtin_driver/text/utils.rs:194 — gix-merge/src/blob/builtin_driver/text/utils.rs:194-211 | gix-merge/src/blob/builtin_driver/text/utils.rs:234-252 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (17–18 lines × 2) · ×1
  • Duplicated block (17–18 lines × 2) gix-merge/src/tree/function/resolve.rs:999 — gix-merge/src/tree/function/resolve.rs:999-1016 | gix-merge/src/tree/function/resolve.rs:2173-2189 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-merge/src/tree/function/resolve.rs:999` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×1
  • Duplicated block (17 lines × 2) gitoxide-core/src/commitgraph/verify.rs:64 — gitoxide-core/src/commitgraph/verify.rs:64-80 | gitoxide-core/src/repository/commitgraph/verify.rs:52-68 — before extracting anything, compare `gitoxide-core/src/commitgraph/verify.rs` and `gitoxide-core/src/repository/commitgraph/verify.rs` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `stats` to `&Outcome` in one and `&gix::commitgraph::verify::Outcome` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (13–15 lines × 2) · ×1
  • Duplicated block (13–15 lines × 2) gix-merge/src/blob/pipeline.rs:208 — gix-merge/src/blob/pipeline.rs:208-222 | gix-merge/src/blob/pipeline.rs:291-303 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-merge/src/blob/pipeline.rs:208` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×1
  • Duplicated block (13–14 lines × 2) gix-packetline/src/async_io/read.rs:168 — gix-packetline/src/async_io/read.rs:168-181 | gix-packetline/src/blocking_io/read.rs:166-178 — `gix-packetline/src/async_io/read.rs` and `gix-packetline/src/blocking_io/read.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 95 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `gix-packetline/src/async_io/read.rs:168` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×1
  • Duplicated block (13 lines × 3) gix-tix/src/lib.rs:3894 — gix-tix/src/lib.rs:3894-3906 | gix-tix/src/lib.rs:4807-4819 | gix-tix/src/lib.rs:4919-4931 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-tix/src/lib.rs:3894` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) gix-blame/src/file/function.rs:989 — gix-blame/src/file/function.rs:989-1001 | gix-blame/src/file/function.rs:1020-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.
D4 · Code Duplication · Duplicated block (11–13 lines × 2) · ×1
  • Duplicated block (11–13 lines × 2) gix-pack/src/data/output/entry/iter_from_counts.rs:217 — gix-pack/src/data/output/entry/iter_from_counts.rs:217-229 | gix-pack/src/data/output/entry/iter_from_counts.rs:234-244 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-pack/src/data/output/entry/iter_from_counts.rs:234` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×1
  • Duplicated block (10–11 lines × 2) gix-diff/src/blob/pipeline.rs:496 — gix-diff/src/blob/pipeline.rs:496-505 | gix-merge/src/blob/pipeline.rs:261-271 — before extracting anything, compare `gix-diff/src/blob/pipeline.rs` and `gix-merge/src/blob/pipeline.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `gix-diff/src/blob/pipeline.rs:496` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9–11 lines × 2) · ×1
  • Duplicated block (9–11 lines × 2) gix-transport/src/client/git/async_io.rs:85 — gix-transport/src/client/git/async_io.rs:85-95 | gix-transport/src/client/git/blocking_io.rs:82-90 — before extracting anything, compare `gix-transport/src/client/git/async_io.rs` and `gix-transport/src/client/git/blocking_io.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `gix-transport/src/client/git/async_io.rs:85` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×1
  • Duplicated block (9–10 lines × 2) gitoxide-core/src/repository/merge/commit.rs:46 — gitoxide-core/src/repository/merge/commit.rs:46-55 | gitoxide-core/src/repository/merge/tree.rs:75-83 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `gitoxide-core/src/repository/merge/commit.rs:46` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×1
  • Duplicated block (8–9 lines × 2) gix-pack/src/index/access.rs:229 — gix-pack/src/index/access.rs:229-237 | gix-pack/src/index/access.rs:290-297 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-pack/src/index/access.rs:229` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–9 lines × 2) · ×1
  • Duplicated block (7–9 lines × 2) gix-refspec/src/match_group/mod.rs:68 — gix-refspec/src/match_group/mod.rs:68-76 | gix-refspec/src/match_group/mod.rs:145-151 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-refspec/src/match_group/mod.rs:68` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×1
  • Duplicated block (7 lines × 3) gix-blame/src/file/function.rs:580 — gix-blame/src/file/function.rs:580-587 | gix-blame/src/file/function.rs:590-597 | gix-blame/src/file/function.rs:895-901 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gix-blame/src/file/function.rs:580` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (184 lines × 2) · ×1
  • Duplicated block (184 lines × 2) gix/src/open/permissions.rs:37 — gix/src/open/permissions.rs:37-229 | gix/src/repository/permissions.rs:36-219 — `gix/src/open/permissions.rs` and `gix/src/repository/permissions.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 1 separate duplicated blocks between them, totalling at least 193 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `gix/src/open/permissions.rs:37` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (7 lines × 5) · ×1
  • Duplicated block (7 lines × 5) gitoxide-core/src/repository/tree.rs:55 — gitoxide-core/src/repository/tree.rs:55-61 | gix-diff/src/tree/recorder.rs:82-88 | gix-index/src/init.rs:197-203 | gix-traverse/src/tree/recorder.rs:56-62 | gix-worktree-stream/src/from_tree/traverse.rs:38-44 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 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 5 times.
D4 · Code Duplication · Edited copy of a member (34 corresponding lines) · ×1
  • Edited copy of a member (34 corresponding lines) gix-pack/fuzz/fuzz_targets/index_file.rs:11 — gix-pack/fuzz/fuzz_targets/index_file.rs:11-44 | gix-pack/fuzz/fuzz_targets/multi_index_file.rs:13-47 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×1
  • Duplicated block (14–15 lines × 2) gix-imara-diff/fuzz/fuzz_targets/comprehensive_diff.rs:35 — gix-imara-diff/fuzz/fuzz_targets/comprehensive_diff.rs:35-49 | gix-imara-diff/fuzz/fuzz_targets/unified_diff_printer.rs:28-41 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `gix-imara-diff/fuzz/fuzz_targets/comprehensive_diff.rs:35` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D5 · Coupling · Unstable project gitoxide-core · ×1
  • Unstable project gitoxide-core — gitoxide-core has instability 0.89 with 1 dependents.
D5 · Coupling · Unstable project gix · ×1
  • Unstable project gix — gix has instability 0.95 with 3 dependents.
D5 · Coupling · Unstable project gix-blame · ×1
  • Unstable project gix-blame — gix-blame has instability 0.91 with 1 dependents.
D5 · Coupling · Unstable project gix-dir · ×1
  • Unstable project gix-dir — gix-dir has instability 0.85 with 2 dependents.
D5 · Coupling · Unstable project gix-merge · ×1
  • Unstable project gix-merge — gix-merge has instability 0.94 with 1 dependents.
D5 · Coupling · Unstable project gix-odb · ×1
  • Unstable project gix-odb — gix-odb has instability 0.86 with 2 dependents.
D5 · Coupling · Unstable project gix-pack · ×1
  • Unstable project gix-pack — gix-pack has instability 0.81 with 3 dependents.
D5 · Coupling · Unstable project gix-protocol · ×1
  • Unstable project gix-protocol — gix-protocol has instability 0.94 with 1 dependents.
D5 · Coupling · Unstable project gix-status · ×1
  • Unstable project gix-status — gix-status has instability 0.88 with 2 dependents.
D5 · Coupling · Unstable project gix-submodule · ×1
  • Unstable project gix-submodule — gix-submodule has instability 0.86 with 1 dependents.
D5 · Coupling · Unstable project gix-worktree-state · ×1
  • Unstable project gix-worktree-state — gix-worktree-state has instability 0.91 with 1 dependents.
D5 · Coupling · Unstable project gix-worktree-stream · ×1
  • Unstable project gix-worktree-stream — gix-worktree-stream has instability 0.85 with 2 dependents.
X21 · Side-effecting pattern guard · Pattern guard mutates state while matching · ×1
  • Pattern guard mutates state while matching gix-tix/src/lib.rs:3270 — The `if` guard on line 3270 (`ref_tree::Input::PinReferences { .. } | ref_tree::Input::ResolveRemoteReferences(_) | ref_tree::Input::DeleteLocalBranches { .. } | ref_tree::Input::DeleteRemoteReferences { .. } if { pending_rebase_conflict.is_some() || pending_todo_rebase_conflict.is_some() || { dirty |= refresh_rebase_session(&mut app, &repository_path, repository_is_bare); app.rebase_continuation_pending() } } =>`) changes `dirty` with `dirty |= …` while the `match` is deciding whether that arm applies. Rust tests a guard during PATTERN MATCHING — after the arm's pattern has matched and before the arm is chosen, going on to the next arm when it is false — so the change lands whenever this arm is merely TESTED, whether or not it is then chosen, and never once an earlier arm has matched. And `||` can skip it, so it does not happen at all whenever what decides first already answers the guard. The accounting therefore depends on evaluation order and on how many arms the subject was tested against, not on any statement a reader can point at: a counter kept this way misses exactly the path the deciding operand rules out, so it cannot reach a limit it is checked against on that path. Move the change out of the guard — leave it reading only (`if dirty + 1 >= limit`) and put the assignment in the arm's BODY, where it runs precisely when the arm is chosen, or hoist it above the `match` if it must happen for every subject.
Minor — 22 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×5
  • Duplicated predicate gix-tix/src/command/enrich.rs:142 — `!head.is_detached() && head.id().map(gix::Id::detach) == Some(target)` appears character-identically in 2 files — gix-tix/src/command/enrich.rs, gix-tix/src/command/reword.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 gix-tix/src/edit/review.rs:133 — `graph.is_in_edit_scope(commit_id) && !graph.is_read_only(commit_id)` appears character-identically in 2 files — gix-tix/src/edit/review.rs, gix-tix/src/edit/transplant/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 gix-encoding/src/fast.rs:121 — `read < input.len() && output.len() - written >= 4` appears character-identically in 2 files — gix-encoding/src/fast.rs, gix-encoding/src/legacy.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 gix-tix/src/edit/rebase.rs:3733 — `worktree_repo.workdir().is_none() && worktree_repo.is_bare()` appears character-identically in 2 files — gix-tix/src/edit/rebase.rs, gix-tix/src/edit/undo.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 gix-tix/src/ref_tree.rs:1804 — `x < bounds.x || x >= bounds.right() || y < bounds.y || y >= bounds.bottom()` appears character-identically in 2 files — gix-tix/src/ref_tree.rs, gix-tix/src/ui.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.
D30 · Dependency Vulnerabilities · Medium advisory (unmaintained) · ×2
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · Low IaC · ×2
  • REDACTED
  • REDACTED
D34 · Knowledge Freshness · Orphaned file · ×2
  • Orphaned file gix-utils/src/btoi.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 gix-index/src/entry/stat.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.
P10 · Library API & versioning · Implementation type on the public API · ×2
  • Implementation type on the public API gix-diff/src/blob/unified_diff/impls.rs:11 — 1 public type in `gix_diff.blob.unified_diff.impls` is marked as implementation by its own namespace, folder or name: `UnifiedDiff` (gix-diff/src/blob/unified_diff/impls.rs:11, `impls`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
  • Implementation type on the public API gix-error/src/exn/impls.rs:115 — 3 public types in `gix_error.exn.impls` are marked as implementation by their own namespace, folder or name: `Exn` (gix-error/src/exn/impls.rs:115, `impls`), `Frame` (gix-error/src/exn/impls.rs:524, `impls`), `Untyped` (gix-error/src/exn/impls.rs:884, `impls`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found Cargo.toml:17 — 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/`. ADRs are expected here because `Cargo.toml` makes this repository a deployable product (line 17).
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 4 of 70 project(s) overshoot their size bounds, lowering Project Cohesion to 8.9/10. The most over is `gix-tix` (87612 LoC, 47 module-visible types across 12 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 2 of 781 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 781 of the 1054 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: gix-utils/src/btoi.rs, gix-index/src/entry/stat.rs. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 26/27 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `gix-tui`.
X7 · Silent fallback defaults · Silent fallback default on Err · ×1
  • Silent fallback default on Err gix-path/src/env/git/mod.rs:48 — `config_paths_from_executable` turns every `Err` into `ConfigPaths::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.
Minor — 9 finding(s)
D12 · Dependency Hygiene · Outdated · ×9
  • Outdated: arc-swap — `arc-swap` is locked at 1.9.3 but 1.9.5 is the current stable release on crates.io, and it already satisfies the `"1.9.0"` requirement declared in gix-odb/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p arc-swap` and commit the updated REDACTED.
  • Outdated: crc32fast — `crc32fast` is locked at 1.5.3 but 1.5.5 is the current stable release on crates.io, and it already satisfies the `"1.5.0"` requirement declared in gix-odb/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p crc32fast` and commit the updated REDACTED.
  • Outdated: flate2 — `flate2` is locked at 1.1.10 but 1.1.11 is the current stable release on crates.io, and it already satisfies the `"1.1.9"` requirement declared in gix-archive/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p flate2` and commit the updated REDACTED.
  • Outdated: itoa — `itoa` is locked at 1.0.18 but 1.0.19 is the current stable release on crates.io, and it already satisfies the `"1.0.17"` requirement declared in gix-date/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p itoa` and commit the updated REDACTED.
  • Outdated: jiff — `jiff` is locked at 0.2.38 but 0.2.43 is the current stable release on crates.io, and it already satisfies the `"0.2.25"` requirement declared in gix-date/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p jiff` and commit the updated REDACTED.
  • Outdated: notify — `notify` is locked at 8.2.1 but 8.2.2 is the current stable release on crates.io, and it already satisfies the `"8.2.0"` requirement declared in gix-tix/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p notify` and commit the updated REDACTED.
  • Outdated: smallvec — `smallvec` is locked at 1.16.4 but 1.16.5 is the current stable release on crates.io, and it already satisfies the `"1.15.1"` requirement declared in gitoxide-core/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p smallvec` and commit the updated REDACTED.
  • Outdated: toml_edit — `toml_edit` is locked at 0.25.17+spec-1.1.0 but 0.25.19+spec-1.1.0 is the current stable release on crates.io, and it already satisfies the `"0.25.13"` requirement declared in tests/it/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p toml_edit` and commit the updated REDACTED.
  • Outdated: tui-markdown — `tui-markdown` is locked at 0.3.12 but 0.3.13 is the current stable release on crates.io, and it already satisfies the `"0.3.9"` requirement declared in gix-tix/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tui-markdown` and commit the updated REDACTED.

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/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-8d5d92959a7d408899d09542b20cc247/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-8d5d92959a7d408899d09542b20cc247/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-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 .6artifacts/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 .2artifacts/raw/osv-scanner.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .6artifacts/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.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 01a1dac7-1fc8-7af8-bd23-302d8ecf2c27 · 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