Public report of colbymchenry/codegraph, published 26 October 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). Watchdog signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 26 October 2026, 13:28 UTC · Survey ID cd_c6c681a20e914f6aafe00f8cf425258d
colbymchenry/codegraph
Measured 26 October 2026, 13:07 UTC, at code version 69af19a
A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.
Code coverage is not measured: JavaScript/TypeScript suite (CouldNotMeasureNoCollector).
CAI scoreAt riskDown 2 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 231,724 lines of product code in 6 projects, tests not counted · Estimated rebuild effort: about 2.7 person-years · Weakest lens: Code Health, 40
Findings by how serious they are
49 critical2635 serious253 minor
13 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
26 October 2026, 13:07 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds Watchdog. It is open to any tool that
implements it, and today Watchdog is the only one that does.
A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.
The score is deterministic, which means the same code always gets the same score. Watchdog works it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
83of 83 dimensions measured by tools.
2916of 2937 findings point to an exact file and line, so you can open each one in the code. The other 21 concern the repository as a whole, such as missing documentation.
83dimensions across 7 lenses, read from 231,724 lines of product code in 6 projects.
colbymchenry/codegraph is rated At risk because critical security findings are open, most of them in the packages it uses. It scores 48 out of 100, which the At risk rating leaves unchanged.
Code Health, at 40, is the weakest lens and counts most in the score. The best first step for the work it takes is replacing the two exposed passwords or keys and switching the old ones off, worth about 3 points. Splitting the oversized files would lift Code Health itself, worth about 6 points. Raising Code Health to 70 would lift the score to about 56.
Twenty-four known security holes in the packages the code depends on can be used by attackers. Nine pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with, and four weaknesses in the code could be used by an attacker. Updating the vulnerable packages, pinning each tool to an exact version and fixing the weaknesses the scanner points to would close these risks. The three places where the code runs text as code or as a command need a direct call instead. The two passwords or keys in the code need replacing, with the old ones switched off. The three loops of files that import each other need breaking.
The product code is 231,724 lines, about €400,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Code Health rose from 40 to 70, the lowest score rated Strong, the score would rise from 48 to about 56.
Code composition: what the lines of code are
Product code 54%Tests 46%
New since the last survey: 606 findings
These 606 critical or serious findings weren't in the previous survey, on 12 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
Watchdog compares every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 787 findings
These 787 critical or serious findings were in the previous survey, on 12 October 2026, and are gone from this one. The first 100 are listed here.
€130,000 to €660,000, for 2,187 to 6,938 hours of work, about 2.7 person-years for 1 to 6 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.7 at a score of 48. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Large: 231,724 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: Watchdog prices the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with REDACTED (2).
Raises the score by about 3 points · Low effort · Secret Scanning
2
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Raises the score by about 6 points · Medium effort · Large Files
3
Enable <Nullable>enable</Nullable> across all projects and resolve warnings rather than suppressing with `!`.
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €400,000 to build again, about 2.7 person-years of work. Its weakest lens is Code Health, at 40 (Weak). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Resolve the 2 Leaked secret finding(s) in Secret Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 3 points for low effort, because it clears the 2 Secret Scanning 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 5.3 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 7% to 15% on every change. The history of the code shows how much it changes: about 365,617 lines over the last 90 days, which is about 1,482,780 lines a year. At that pace, the extra work comes to an estimated 248.4 to 1490.3 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, 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: 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.
272 modules, with 379 dependencies between them. Every module uses only modules listed above it, so there are no loops.
The table shows the 40 modules with the most connections; 232 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.
codegraph_kernel.ccpp uses codegraph_kernel.buffers, so a change to codegraph_kernel.buffers can break codegraph_kernel.ccpp, while a change to codegraph_kernel.ccpp can't break codegraph_kernel.buffers.
Position
Below the diagonal: codegraph_kernel.ccpp uses a module listed above it, which is the healthy direction.
codegraph_kernel.ccpp uses codegraph_kernel.ids, so a change to codegraph_kernel.ids can break codegraph_kernel.ccpp, while a change to codegraph_kernel.ccpp can't break codegraph_kernel.ids.
Position
Below the diagonal: codegraph_kernel.ccpp uses a module listed above it, which is the healthy direction.
src.extraction.languages uses src.types, so a change to src.types can break src.extraction.languages, while a change to src.extraction.languages can't break src.types.
Position
Below the diagonal: src.extraction.languages uses a module listed above it, which is the healthy direction.
src.graph.dynamic-boundary-report uses src.types, so a change to src.types can break src.graph.dynamic-boundary-report, while a change to src.graph.dynamic-boundary-report can't break src.types.
Position
Below the diagonal: src.graph.dynamic-boundary-report uses a module listed above it, which is the healthy direction.
src.graph.type-hierarchy uses src.types, so a change to src.types can break src.graph.type-hierarchy, while a change to src.graph.type-hierarchy can't break src.types.
Position
Below the diagonal: src.graph.type-hierarchy uses a module listed above it, which is the healthy direction.
src.resolution.types uses src.types, so a change to src.types can break src.resolution.types, while a change to src.resolution.types can't break src.types.
Position
Below the diagonal: src.resolution.types uses a module listed above it, which is the healthy direction.
src.ui-server.api.deadcode uses src.ui-server.api.wire, so a change to src.ui-server.api.wire can break src.ui-server.api.deadcode, while a change to src.ui-server.api.deadcode can't break src.ui-server.api.wire.
Position
Below the diagonal: src.ui-server.api.deadcode uses a module listed above it, which is the healthy direction.
src.ui-server.api.entrypoints uses src.ui-server.api.wire, so a change to src.ui-server.api.wire can break src.ui-server.api.entrypoints, while a change to src.ui-server.api.entrypoints can't break src.ui-server.api.wire.
Position
Below the diagonal: src.ui-server.api.entrypoints uses a module listed above it, which is the healthy direction.
src.ui-server.api.filecode uses src.ui-server.api.wire, so a change to src.ui-server.api.wire can break src.ui-server.api.filecode, while a change to src.ui-server.api.filecode can't break src.ui-server.api.wire.
Position
Below the diagonal: src.ui-server.api.filecode uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in src.ui-server.api.flow uses a type in src.types.
The types involved
src.ui-server.api.flow.RawHop → src.types.Node
Direction
src.ui-server.api.flow uses src.types, so a change to src.types can break src.ui-server.api.flow, while a change to src.ui-server.api.flow can't break src.types.
Position
Below the diagonal: src.ui-server.api.flow uses a module listed above it, which is the healthy direction.
src.ui-server.api.flow uses src.ui-server.api.wire, so a change to src.ui-server.api.wire can break src.ui-server.api.flow, while a change to src.ui-server.api.flow can't break src.ui-server.api.wire.
Position
Below the diagonal: src.ui-server.api.flow uses a module listed above it, which is the healthy direction.
src.ui-server.api.flow uses src.ui-server.highlight, so a change to src.ui-server.highlight can break src.ui-server.api.flow, while a change to src.ui-server.api.flow can't break src.ui-server.highlight.
Position
Below the diagonal: src.ui-server.api.flow uses a module listed above it, which is the healthy direction.
src.ui-server.api.map uses src.ui-server.api.wire, so a change to src.ui-server.api.wire can break src.ui-server.api.map, while a change to src.ui-server.api.map can't break src.ui-server.api.wire.
Position
Below the diagonal: src.ui-server.api.map uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in src.ui-server.api.steps uses a type in src.types.
The types involved
src.ui-server.api.steps.Arrival → src.types.Edge
src.ui-server.api.steps.Arrival → src.types.Node
src.ui-server.api.steps.Fold → src.types.Node
Direction
src.ui-server.api.steps uses src.types, so a change to src.types can break src.ui-server.api.steps, while a change to src.ui-server.api.steps can't break src.types.
Position
Below the diagonal: src.ui-server.api.steps uses a module listed above it, which is the healthy direction.
src.ui-server.api.steps uses src.ui-server.api.wire, so a change to src.ui-server.api.wire can break src.ui-server.api.steps, while a change to src.ui-server.api.steps can't break src.ui-server.api.wire.
Position
Below the diagonal: src.ui-server.api.steps uses a module listed above it, which is the healthy direction.
src.extraction uses src.db.queries, so a change to src.db.queries can break src.extraction, while a change to src.extraction can't break src.db.queries.
Position
Below the diagonal: src.extraction uses a module listed above it, which is the healthy direction.
src.extraction uses src.resolution.types, so a change to src.resolution.types can break src.extraction, while a change to src.extraction can't break src.resolution.types.
Position
Below the diagonal: src.extraction uses a module listed above it, which is the healthy direction.
src.graph.traversal uses src.types, so a change to src.types can break src.graph.traversal, while a change to src.graph.traversal can't break src.types.
Position
Below the diagonal: src.graph.traversal uses a module listed above it, which is the healthy direction.
src.graph.traversal uses src.db.queries, so a change to src.db.queries can break src.graph.traversal, while a change to src.graph.traversal can't break src.db.queries.
Position
Below the diagonal: src.graph.traversal uses a module listed above it, which is the healthy direction.
src.resolution.frameworks uses src.types, so a change to src.types can break src.resolution.frameworks, while a change to src.resolution.frameworks can't break src.types.
Position
Below the diagonal: src.resolution.frameworks uses a module listed above it, which is the healthy direction.
45 pairs of types, where a type in src.resolution.frameworks uses a type in src.resolution.types. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
src.resolution.frameworks uses src.resolution.types, so a change to src.resolution.types can break src.resolution.frameworks, while a change to src.resolution.frameworks can't break src.resolution.types.
Position
Below the diagonal: src.resolution.frameworks uses a module listed above it, which is the healthy direction.
src.resolution.name-matcher uses src.types, so a change to src.types can break src.resolution.name-matcher, while a change to src.resolution.name-matcher can't break src.types.
Position
Below the diagonal: src.resolution.name-matcher uses a module listed above it, which is the healthy direction.
src.resolution.name-matcher uses src.resolution.types, so a change to src.resolution.types can break src.resolution.name-matcher, while a change to src.resolution.name-matcher can't break src.resolution.types.
Position
Below the diagonal: src.resolution.name-matcher uses a module listed above it, which is the healthy direction.
src.ui-server.api.hierarchy uses src.ui-server.api.wire, so a change to src.ui-server.api.wire can break src.ui-server.api.hierarchy, while a change to src.ui-server.api.hierarchy can't break src.ui-server.api.wire.
Position
Below the diagonal: src.ui-server.api.hierarchy uses a module listed above it, which is the healthy direction.
src.ui-server.api.hierarchy uses src.graph.type-hierarchy, so a change to src.graph.type-hierarchy can break src.ui-server.api.hierarchy, while a change to src.ui-server.api.hierarchy can't break src.graph.type-hierarchy.
Position
Below the diagonal: src.ui-server.api.hierarchy uses a module listed above it, which is the healthy direction.
src.context uses src.graph.traversal, so a change to src.graph.traversal can break src.context, while a change to src.context can't break src.graph.traversal.
Position
Below the diagonal: src.context uses a module listed above it, which is the healthy direction.
src.graph.queries uses src.db.queries, so a change to src.db.queries can break src.graph.queries, while a change to src.graph.queries can't break src.db.queries.
Position
Below the diagonal: src.graph.queries uses a module listed above it, which is the healthy direction.
src.graph.queries uses src.graph.traversal, so a change to src.graph.traversal can break src.graph.queries, while a change to src.graph.queries can't break src.graph.traversal.
Position
Below the diagonal: src.graph.queries uses a module listed above it, which is the healthy direction.
src.resolution uses src.db.queries, so a change to src.db.queries can break src.resolution, while a change to src.resolution can't break src.db.queries.
Position
Below the diagonal: src.resolution uses a module listed above it, which is the healthy direction.
63 pairs of types, where a type in src.resolution uses a type in src.resolution.types. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
src.resolution uses src.resolution.types, so a change to src.resolution.types can break src.resolution, while a change to src.resolution can't break src.resolution.types.
Position
Below the diagonal: src.resolution uses a module listed above it, which is the healthy direction.
41 pairs of types, where a type in src.resolution uses a type in src.resolution.name-matcher. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
src.resolution uses src.resolution.name-matcher, so a change to src.resolution.name-matcher can break src.resolution, while a change to src.resolution can't break src.resolution.name-matcher.
Position
Below the diagonal: src.resolution uses a module listed above it, which is the healthy direction.
src.ui-server.api.node uses src.ui-server.api.hierarchy, so a change to src.ui-server.api.hierarchy can break src.ui-server.api.node, while a change to src.ui-server.api.node can't break src.ui-server.api.hierarchy.
Position
Below the diagonal: src.ui-server.api.node uses a module listed above it, which is the healthy direction.
ui.src.lib.wire uses src.ui-server.api.trails, so a change to src.ui-server.api.trails can break ui.src.lib.wire, while a change to ui.src.lib.wire can't break src.ui-server.api.trails.
Position
Below the diagonal: ui.src.lib.wire uses a module listed above it, which is the healthy direction.
ui.src.lib.wire uses src.ui-server.api.wire, so a change to src.ui-server.api.wire can break ui.src.lib.wire, while a change to ui.src.lib.wire can't break src.ui-server.api.wire.
Position
Below the diagonal: ui.src.lib.wire uses a module listed above it, which is the healthy direction.
ui.src.lib.wire uses src.ui-server.api.deadcode, so a change to src.ui-server.api.deadcode can break ui.src.lib.wire, while a change to ui.src.lib.wire can't break src.ui-server.api.deadcode.
Position
Below the diagonal: ui.src.lib.wire uses a module listed above it, which is the healthy direction.
ui.src.lib.wire uses src.ui-server.api.entrypoints, so a change to src.ui-server.api.entrypoints can break ui.src.lib.wire, while a change to ui.src.lib.wire can't break src.ui-server.api.entrypoints.
Position
Below the diagonal: ui.src.lib.wire uses a module listed above it, which is the healthy direction.
ui.src.lib.wire uses src.ui-server.api.filecode, so a change to src.ui-server.api.filecode can break ui.src.lib.wire, while a change to ui.src.lib.wire can't break src.ui-server.api.filecode.
Position
Below the diagonal: ui.src.lib.wire uses a module listed above it, which is the healthy direction.
ui.src.lib.wire uses src.ui-server.api.flow, so a change to src.ui-server.api.flow can break ui.src.lib.wire, while a change to ui.src.lib.wire can't break src.ui-server.api.flow.
Position
Below the diagonal: ui.src.lib.wire uses a module listed above it, which is the healthy direction.
ui.src.lib.wire uses src.ui-server.api.steps, so a change to src.ui-server.api.steps can break ui.src.lib.wire, while a change to ui.src.lib.wire can't break src.ui-server.api.steps.
Position
Below the diagonal: ui.src.lib.wire uses a module listed above it, which is the healthy direction.
ui.src.lib.wire uses src.ui-server.api.hierarchy, so a change to src.ui-server.api.hierarchy can break ui.src.lib.wire, while a change to ui.src.lib.wire can't break src.ui-server.api.hierarchy.
Position
Below the diagonal: ui.src.lib.wire uses a module listed above it, which is the healthy direction.
ui.src.lib.wire uses src.ui-server.api.node, so a change to src.ui-server.api.node can break ui.src.lib.wire, while a change to ui.src.lib.wire can't break src.ui-server.api.node.
Position
Below the diagonal: ui.src.lib.wire uses a module listed above it, which is the healthy direction.
src.graph uses src.graph.dynamic-boundary-report, so a change to src.graph.dynamic-boundary-report can break src.graph, while a change to src.graph can't break src.graph.dynamic-boundary-report.
Position
Below the diagonal: src.graph uses a module listed above it, which is the healthy direction.
src.graph uses src.graph.type-hierarchy, so a change to src.graph.type-hierarchy can break src.graph, while a change to src.graph can't break src.graph.type-hierarchy.
Position
Below the diagonal: src.graph uses a module listed above it, which is the healthy direction.
src.mcp.tools uses src.graph.dynamic-boundary-report, so a change to src.graph.dynamic-boundary-report can break src.mcp.tools, while a change to src.mcp.tools can't break src.graph.dynamic-boundary-report.
Position
Below the diagonal: src.mcp.tools uses a module listed above it, which is the healthy direction.
src.ui-server.api uses src.ui-server.api.trails, so a change to src.ui-server.api.trails can break src.ui-server.api, while a change to src.ui-server.api can't break src.ui-server.api.trails.
Position
Below the diagonal: src.ui-server.api uses a module listed above it, which is the healthy direction.
src.ui-server.api uses src.ui-server.api.wire, so a change to src.ui-server.api.wire can break src.ui-server.api, while a change to src.ui-server.api can't break src.ui-server.api.wire.
Position
Below the diagonal: src.ui-server.api uses a module listed above it, which is the healthy direction.
src.ui-server.api uses src.graph.dynamic-boundary-report, so a change to src.graph.dynamic-boundary-report can break src.ui-server.api, while a change to src.ui-server.api can't break src.graph.dynamic-boundary-report.
Position
Below the diagonal: src.ui-server.api uses a module listed above it, which is the healthy direction.
src.ui-server.api uses src.graph.type-hierarchy, so a change to src.graph.type-hierarchy can break src.ui-server.api, while a change to src.ui-server.api can't break src.graph.type-hierarchy.
Position
Below the diagonal: src.ui-server.api uses a module listed above it, which is the healthy direction.
src.ui-server.api uses src.ui-server.api.deadcode, so a change to src.ui-server.api.deadcode can break src.ui-server.api, while a change to src.ui-server.api can't break src.ui-server.api.deadcode.
Position
Below the diagonal: src.ui-server.api uses a module listed above it, which is the healthy direction.
src.ui-server.api uses src.ui-server.api.entrypoints, so a change to src.ui-server.api.entrypoints can break src.ui-server.api, while a change to src.ui-server.api can't break src.ui-server.api.entrypoints.
Position
Below the diagonal: src.ui-server.api uses a module listed above it, which is the healthy direction.
src.ui-server.api uses src.ui-server.api.filecode, so a change to src.ui-server.api.filecode can break src.ui-server.api, while a change to src.ui-server.api can't break src.ui-server.api.filecode.
Position
Below the diagonal: src.ui-server.api uses a module listed above it, which is the healthy direction.
src.ui-server.api uses src.ui-server.api.flow, so a change to src.ui-server.api.flow can break src.ui-server.api, while a change to src.ui-server.api can't break src.ui-server.api.flow.
Position
Below the diagonal: src.ui-server.api uses a module listed above it, which is the healthy direction.
src.ui-server.api uses src.ui-server.api.map, so a change to src.ui-server.api.map can break src.ui-server.api, while a change to src.ui-server.api can't break src.ui-server.api.map.
Position
Below the diagonal: src.ui-server.api uses a module listed above it, which is the healthy direction.
src.ui-server.api uses src.ui-server.api.steps, so a change to src.ui-server.api.steps can break src.ui-server.api, while a change to src.ui-server.api can't break src.ui-server.api.steps.
Position
Below the diagonal: src.ui-server.api uses a module listed above it, which is the healthy direction.
src.ui-server.api uses src.ui-server.api.hierarchy, so a change to src.ui-server.api.hierarchy can break src.ui-server.api, while a change to src.ui-server.api can't break src.ui-server.api.hierarchy.
Position
Below the diagonal: src.ui-server.api uses a module listed above it, which is the healthy direction.
src.ui-server.api uses src.ui-server.api.node, so a change to src.ui-server.api.node can break src.ui-server.api, while a change to src.ui-server.api can't break src.ui-server.api.node.
Position
Below the diagonal: src.ui-server.api uses a module listed above it, which is the healthy direction.
ui.src.lib.adapter uses src.ui-server.api.trails, so a change to src.ui-server.api.trails can break ui.src.lib.adapter, while a change to ui.src.lib.adapter can't break src.ui-server.api.trails.
Position
Below the diagonal: ui.src.lib.adapter uses a module listed above it, which is the healthy direction.
ui.src.lib.adapter uses src.ui-server.api.deadcode, so a change to src.ui-server.api.deadcode can break ui.src.lib.adapter, while a change to ui.src.lib.adapter can't break src.ui-server.api.deadcode.
Position
Below the diagonal: ui.src.lib.adapter uses a module listed above it, which is the healthy direction.
ui.src.lib.adapter uses src.ui-server.api.entrypoints, so a change to src.ui-server.api.entrypoints can break ui.src.lib.adapter, while a change to ui.src.lib.adapter can't break src.ui-server.api.entrypoints.
Position
Below the diagonal: ui.src.lib.adapter uses a module listed above it, which is the healthy direction.
ui.src.lib.adapter uses src.ui-server.api.filecode, so a change to src.ui-server.api.filecode can break ui.src.lib.adapter, while a change to ui.src.lib.adapter can't break src.ui-server.api.filecode.
Position
Below the diagonal: ui.src.lib.adapter uses a module listed above it, which is the healthy direction.
ui.src.lib.adapter uses src.ui-server.api.flow, so a change to src.ui-server.api.flow can break ui.src.lib.adapter, while a change to ui.src.lib.adapter can't break src.ui-server.api.flow.
Position
Below the diagonal: ui.src.lib.adapter uses a module listed above it, which is the healthy direction.
ui.src.lib.adapter uses src.ui-server.api.map, so a change to src.ui-server.api.map can break ui.src.lib.adapter, while a change to ui.src.lib.adapter can't break src.ui-server.api.map.
Position
Below the diagonal: ui.src.lib.adapter uses a module listed above it, which is the healthy direction.
ui.src.lib.adapter uses src.ui-server.api.steps, so a change to src.ui-server.api.steps can break ui.src.lib.adapter, while a change to ui.src.lib.adapter can't break src.ui-server.api.steps.
Position
Below the diagonal: ui.src.lib.adapter uses a module listed above it, which is the healthy direction.
ui.src.lib.adapter uses ui.src.lib.wire, so a change to ui.src.lib.wire can break ui.src.lib.adapter, while a change to ui.src.lib.adapter can't break ui.src.lib.wire.
Position
Below the diagonal: ui.src.lib.adapter uses a module listed above it, which is the healthy direction.
ui.src.lib uses src.ui-server.api.trails, so a change to src.ui-server.api.trails can break ui.src.lib, while a change to ui.src.lib can't break src.ui-server.api.trails.
Position
Below the diagonal: ui.src.lib uses a module listed above it, which is the healthy direction.
ui.src.lib uses src.ui-server.api.wire, so a change to src.ui-server.api.wire can break ui.src.lib, while a change to ui.src.lib can't break src.ui-server.api.wire.
Position
Below the diagonal: ui.src.lib uses a module listed above it, which is the healthy direction.
ui.src.lib uses src.ui-server.api.deadcode, so a change to src.ui-server.api.deadcode can break ui.src.lib, while a change to ui.src.lib can't break src.ui-server.api.deadcode.
Position
Below the diagonal: ui.src.lib uses a module listed above it, which is the healthy direction.
ui.src.lib uses src.ui-server.api.entrypoints, so a change to src.ui-server.api.entrypoints can break ui.src.lib, while a change to ui.src.lib can't break src.ui-server.api.entrypoints.
Position
Below the diagonal: ui.src.lib uses a module listed above it, which is the healthy direction.
ui.src.lib uses src.ui-server.api.filecode, so a change to src.ui-server.api.filecode can break ui.src.lib, while a change to ui.src.lib can't break src.ui-server.api.filecode.
Position
Below the diagonal: ui.src.lib uses a module listed above it, which is the healthy direction.
ui.src.lib uses src.ui-server.api.flow, so a change to src.ui-server.api.flow can break ui.src.lib, while a change to ui.src.lib can't break src.ui-server.api.flow.
Position
Below the diagonal: ui.src.lib uses a module listed above it, which is the healthy direction.
ui.src.lib uses src.ui-server.api.map, so a change to src.ui-server.api.map can break ui.src.lib, while a change to ui.src.lib can't break src.ui-server.api.map.
Position
Below the diagonal: ui.src.lib uses a module listed above it, which is the healthy direction.
ui.src.lib uses src.ui-server.api.steps, so a change to src.ui-server.api.steps can break ui.src.lib, while a change to ui.src.lib can't break src.ui-server.api.steps.
Position
Below the diagonal: ui.src.lib uses a module listed above it, which is the healthy direction.
ui.src.lib uses src.ui-server.api.hierarchy, so a change to src.ui-server.api.hierarchy can break ui.src.lib, while a change to ui.src.lib can't break src.ui-server.api.hierarchy.
Position
Below the diagonal: ui.src.lib uses a module listed above it, which is the healthy direction.
ui.src.lib uses ui.src.lib.adapter, so a change to ui.src.lib.adapter can break ui.src.lib, while a change to ui.src.lib can't break ui.src.lib.adapter.
Position
Below the diagonal: ui.src.lib uses a module listed above it, which is the healthy direction.
src.mcp.session uses src.mcp.engine, so a change to src.mcp.engine can break src.mcp.session, while a change to src.mcp.session can't break src.mcp.engine.
Position
Below the diagonal: src.mcp.session uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in src.mcp.daemon uses a type in src.mcp.engine.
The types involved
src.mcp.daemon.Daemon → src.mcp.engine.MCPEngine
Direction
src.mcp.daemon uses src.mcp.engine, so a change to src.mcp.engine can break src.mcp.daemon, while a change to src.mcp.daemon can't break src.mcp.engine.
Position
Below the diagonal: src.mcp.daemon uses a module listed above it, which is the healthy direction.
src.mcp.daemon uses src.mcp.session, so a change to src.mcp.session can break src.mcp.daemon, while a change to src.mcp.daemon can't break src.mcp.session.
Position
Below the diagonal: src.mcp.daemon uses a module listed above it, which is the healthy direction.
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
98
High / Critical
A03:2025 — Software Supply Chain Failures
33
High / Critical
A07:2025 — Authentication Failures
2
High / Critical
Roadmap
Begin by splitting the largest source files into smaller, focused modules to improve maintainability and enabling nullable reference types across all projects to eliminate null-safety warnings. Simultaneously, resolve the two identified secret leaks and integrate static analysis into the CI pipeline to prevent security regressions from being merged. Finally, reduce cyclomatic complexity in branch-heavy functions to ensure code remains readable and testable.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with REDACTED (2).
Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — so a security regression fails the build instead of landing.
Bound every outbound call: pass `signal: AbortSignal.timeout(ms)` to `fetch`, set `timeout` on the axios instance (`axios.create({ timeout })`), and add retries with back-off (`axios-retry`, `p-retry`) and a breaker (`opossum`, `cockatiel`) around dependencies that fail.
Bring the 35 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with name-matcher.matchMethodCall (cyclomatic 362), TreeSitterExtractor.extractCall (cyclomatic 333), ToolHandler.handleExplore (cyclomatic 318).
Bring the 110 bodies over 60 down to 60 or less in Cognitive Complexity — start with TreeSitterExtractor.extractCall (cognitive 683), ToolHandler.handleExplore (cognitive 609), steps.buildSteps (cognitive 505).
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 — 49
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 — 2635
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 — 253
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 13
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 83 of 83 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); none rely on LLM judgement. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 83 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 2916 of 2937 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D10 Test Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 7,643 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 1 test source file(s) (.rs) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability not included — the JavaScript/TypeScript suite (vitest via `npm ci --ignore-scripts` in the repository root (8555 tests)) did not finish re-running within its budget: too large to re-run within its budget.
D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its crate dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
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 (50 contributor(s) across 1690 commit(s) sampled, automation and bot accounts excluded). One of them holds 92% of the history; the other 49 hold 0.2% 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 — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D21 Naming Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
D24 Comment Value — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
D27 Navigability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `src/extraction/parse-worker.ts`, `src/extraction/vue-template-calls.ts`, `src/index.ts`, `src/resolution/angular-template-synthesizer.ts`, `src/resolution/types.ts`, … (+7 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
AXR1 Runtime accessibility — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (dev). the dev server did not expose a crawlable HTTP endpoint in time — no runtime evidence.
IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
M4 Documentation accuracy — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9). Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
P1 CI/CD gates — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. A CI pipeline exists and the word "test" appears, but no explicit test-runner invocation (your stack's test command, or a test job) was matched — so either the gate runs tests through a step this pass could not recognise, or "test" is incidental here (a path, "latest", a reporter). Which of the two it is cannot be settled from this dimension's evidence; the coverage dimensions report whether a suite exists at all. You can widen what we reach: name the test runner explicitly in the pipeline step (your stack's test command, or a job named for the suite) so the gate is unambiguous to a reader and to this pass.
P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and none applies: this repository publishes a library and deploys nothing (no container, IaC or deployment manifest), so it holds no runtime state of its own. Any data-access dependency it declares is the store it is a CLIENT for, not one it operates. The DR control belongs to whoever runs that data.
R10 Code Duplication — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 638 further occurrence(s) are not listed individually; the score already reflects all 678.
R3 Large Files — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 68 further occurrence(s) are not listed individually; the score already reflects all 108.
R4 Test Coverage — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 6 further occurrence(s) are not listed individually; the score already reflects all 46.
R7 Dead Code — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 7 further occurrence(s) are not listed individually; the score already reflects all 47.
X1 Async correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X2 Cancellation propagation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X27 Collection changed while being enumerated — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This repository's C# was parsed (it ships no .sln or .csproj, so it was read as syntax-only projects), but this check proves its findings from resolved symbols and a reference-free parse resolves none. It abstained rather than report a clean bill it could not earn. That is a gap in this analyzer's reach into build-less repositories — not a finding that the repository is free of what this check looks for.
X3 Exception handling — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X4 Structured logging — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
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 is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
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.
AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
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.
AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
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.
696 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was name-matcher.matchMethodCall at 362. A further 10 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being name-matcher.buildLocalReceiverTypePatterns at 24 — they are counted neither in the figure above nor in this dimension's score. 2 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: codegraph-kernel/src/langs.rs (codegraph_kernel::langs::grammar_for at 20), src/ui-server/api/index.ts (index.createGraphApi.handler at 19). 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.
+ 614 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 35 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with name-matcher.matchMethodCall (cyclomatic 362), TreeSitterExtractor.extractCall (cyclomatic 333), ToolHandler.handleExplore (cyclomatic 318). — 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 35 together lifts Cyclomatic Complexity from 2.0 to about 3.2/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
+ 913 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 110 bodies over 60 down to 60 or less in Cognitive Complexity — start with TreeSitterExtractor.extractCall (cognitive 683), ToolHandler.handleExplore (cognitive 609), steps.buildSteps (cognitive 505). — 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 110 together lifts Cognitive Complexity from 2.0 to about 3.2/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
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.
Resolve the 50 FileTooLong finding(s) in God Classes — start with REDACTED (5), mod.rs (2), name-matcher.ts. — One of this dimension's main actionable groups (50 warning-level).
Resolve the 18 FunctionTooLong finding(s) in God Classes — start with steps-model.ts (2), proxy.ts, render-check.mjs. — One of this dimension's main actionable groups (18 warning-level).
Resolve the 17 TooManyMethods finding(s) in God Classes — start with REDACTED (3), mod.rs (2), REDACTED. — One of this dimension's main actionable groups (17 warning-level).
Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
267 duplicated block group(s) detected. A further 34 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. Measured on part of this repository only: .ts (86% of production source) was not exposed to THIS dimension's token comparison and is not in this count; duplication there is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream.
+ 167 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 13 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with dart.rs (3), python.rs (3), extractors.rs (2). — One of this dimension's main actionable groups (13 warning-level).
Resolve the 13 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with kotlin.rs (2), mod.rs (2), php.rs (2). — One of this dimension's main actionable groups (13 warning-level).
Resolve the 12 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with csharp.rs (3), dart.rs (2), java.rs (2). — One of this dimension's main actionable groups (12 warning-level).
Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling10.0 / 10Exemplary✓ 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.
3 production modules (Cargo+npm), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 0 module(s) off the main sequence.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 10 Low cohesion finding(s) in Cohesion (LCOM4) — start with antigravity.ts, copilot-cli.ts, copilot-jetbrains.ts. — One of this dimension's main actionable groups (10 warning-level).
Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the code respects its intended layering / architecture rules.
Method: Enforcement rung (Prevented/Verified/Documented) per checkable ADR via Roslyn, plus dependency cycles via the engine shared with D5/AX3. Deterministic, exact.
No mechanizable ADR was identified, so enforcement is not measured. Dependency cycles not checked (no project-reference graph; where this repository's language has an import-cycle lens, cycles are reported there).
What to do
Enforce Architectural Integrity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d7_recommendation.md.
Do you agree with this assessment?
D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
7670 test methods: 7621 unit, 21 integration, 0 BDD, 28 e2e. The JavaScript/TypeScript suite contributes 7643 `it`/`test` case(s) across 764 test file(s) declaring at least one; its tier split is read from package names and paths only. The Rust suite contributes 27 `#[test]` function(s) across 7 file(s) declaring at least one; its unit/integration split is Cargo's own — 0 of those file(s) are integration-test targets under a crate's tests/ directory, and the rest are #[test] functions compiled into the crate they test.
✓ On the Gold path — maintain.
Detailed fixes: d9_recommendation.md.
Do you agree with this assessment?
D10 · Test Quality10.0 / 10Stronggated by 6 serious findings✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
118 skipped (118 with a documented reason), 1 zero-assertion, 5 synchronised by a fixed sleep, no mocking-framework packages referenced (hand-written doubles or no mocking) across 7643 tests. Measured on the JavaScript/TypeScript suite only — at least 1 test source file(s) (.rs) went unread, so its test quality is unmeasured and is not in these counts.
Fixed-sleep synchronisation: terminates a worker that is already loaded right away · ×5__tests__/parse-pool.test.ts:294
No assertions: closes every stream when the API is closed__tests__/ui-events-api.test.ts:371
Resolve the 5 Fixed-sleep synchronisation finding(s) in Test Quality — start with query-pool.test.ts (3), parse-pool.test.ts, worker-teardown.test.ts. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 1 No assertions finding(s) in Test Quality — start with ui-events-api.test.ts. — One of this dimension's main actionable groups (1 warning-level).
Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether dependencies are current, secure, and not bloated.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.
6 outdated, 0 yanked direct Cargo dependencies. 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 Cargo.lock there.
Outdated: cc · ×6
✓ On the Gold path — maintain.
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Enforce Secret Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 72 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's Cargo.lock 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, which is its own choice and is not judged here. ★ COVERAGE OF THIS VERDICT: it grades this repository's crate dependencies and nothing else. The repository also declares package.json, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Top hotspots: src/resolution/name-matcher.ts (295×362=106790); REDACTED (76×649=49324); src/extraction/tree-sitter.ts (104×333=34632) Repeated repair below the complexity floor: src/resolution/types.ts (23 of 28 changes were fixes); src/extraction/tree-sitter-types.ts (19 of 20 changes were fixes); src/mcp/engine.ts (14 of 14 changes were fixes)
Resolve the 87 Hotspot finding(s) in Churn × Complexity Hotspots — start with REDACTED (8), mod.rs (2), name-matcher.ts. — One of this dimension's main actionable groups (87 warning-level).
Resolve the 27 Repeated repair finding(s) in Churn × Complexity Hotspots — start with go.ts (2), rust.ts (2), types.ts. — One of this dimension's main actionable groups (27 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
2 deducted task-comment markers across 208941 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
Resolve the 2 TodoComment finding(s) in Explicit Debt — start with go-detached-doc-comments.test.ts, go-doc-directives.test.ts. — One of this dimension's main actionable groups (2 warning-level).
Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.
0 of 2 evaluated ADRs have a defect readable from the log itself (a missing or empty section, no title, a single option, consequences with no cost, no status, a missing enforcement field, a status the log contradicts, a dangling link, an unlinked second decision on one question). How well each record argues its case is not measured.
✓ On the Gold path — maintain.
Detailed fixes: d20_recommendation.md.
Do you agree with this assessment?
D26 · Project Cohesion3.6 / 10Weak✓ Tool-verified
What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.
2 of 6 build units (Cargo, npm) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
101 finding(s): 0 critical, 18 high, 79 medium, 4 low. 9 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 50 file(s) — `__tests__/cli-sync.test.ts` (line 45), `__tests__/extraction.test.ts`, `__tests__/fixtures/kernel-parity/TortureFileScoped.cs` (line 21), `__tests__/fixtures/kernel-parity/torture.c` (line 24, line 92, line 93, …), `__tests__/fixtures/kernel-parity/torture.go` (lines 65–66, line 74, line 91), … (+45 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. In 1 of those file(s) — `__tests__/fixtures/kernel-parity/TortureFileScoped.cs` — the break is a C# primary constructor, which semgrep's grammar cannot parse and which hides the type from every rule scoped to it; those files were re-scanned from a shadow copy with the constructor's parameter list blanked (line and column preserving), which restores the type to the rules, and 0 additional row(s) came from that pass. Only the header's own parameter list is unread in them. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 8 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3). — One of this dimension's main actionable groups (3 issue-level).
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).
No action in Static Analysis (SAST) — all 9 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 (9 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 21 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (21). — One of this dimension's main actionable groups (21 issue-level).
Resolve the 2 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Resolve the 1 Critical vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
1 of 328 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is src/resolution/frameworks/cargo-workspace.ts. Counted over 328 of the 357 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 3 Change coupling finding(s) in Change Coupling — start with langs.rs, REDACTED, mod.rs. — One of this dimension's main actionable groups (3 warning-level).
Resolve the 1 Change-coupling hub finding(s) in Change Coupling — start with grammars.ts. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. SCORED, not informational.
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.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 2 platform declaration(s) and 10 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.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC2 · Forms & labels7.6 / 10Strong✓ Tool-verified
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.
This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. — ui/src/views/StepsView.svelte:820
What to do
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
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.
Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one. (×2) — ui/src/views/ScreensView.svelte:427, ui/src/views/StepsView.svelte:706
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.
Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".
Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.
Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
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.
Do you agree with this assessment?
AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified
Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.
Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.
Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.
No accessibility enforcement found — no a11y linter (eslint-plugin-svelte (a11y rules are built in)) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time. What was searched, so you can tell an absence from a miss: the 57 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
What to do
Enforce accessibility in the toolchain: add eslint-plugin-svelte (a11y rules are built in), then assert with vitest-axe in tests, then gate axe/pa11y/Lighthouse in CI.
Other · Architecture — Whether any singleton service captures a scoped/transient dependency — a silent lifetime/threading bug.
Method: Roslyn scan: DI registrations parsed from AddSingleton/Scoped/Transient; each singleton checked for captured shorter-lifetime dependencies. Exhaustive, deterministic.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.
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.
Other · Code Health — Unreviewed-generation residue: shipped members still throwing NotImplementedException, and placeholder string literals left in non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.
Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Add a README to the 1 of 5 project(s) that lack one — worth up to 0.4 pts.
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.
3 ADR-shaped document(s) detected by content — `docs/design/native-extraction-kernel.md`, `docs/design/telemetry.md`, `docs/design/template-markup-parser.md`. They are not under a conventional ADR folder (docs/adr/) and are not named NNNN-title.md, and this check found them by their decision signature rather than by where they live — so a reader who does not already know these paths has no route to them. Detected by content signature only: records kept outside the repository, or written without a Status/Decision/Consequences shape, are not visible to this check and are not counted here.
What to do
Move ADRs under docs/adr/ (or docs/adrs/) and name them NNNN-title.md so they're easy to find.
Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
README.md names Node.js 22, but the repository declares engines `>=20.0.0 <25.0.0`. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — README.md:633
site/src/content/docs/reference/api.md names Node.js 22, but the repository declares engines `>=20.0.0 <25.0.0`. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — site/src/content/docs/reference/api.md:68
What to do
Reconcile the README with reality: README.md names Node.js 22, but the repository declares engines `>=20.0.0 <25.0.0`; site/src/content/docs/reference/api.md names Node.js 22, but the repository declares engines `>=20.0.0 <25.0.0`.
Do you agree with this assessment?
P1 · CI/CD gates8.5 / 10Strong✓ Tool-verified
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.
What to do
Run the test suite in CI via an explicit runner step (`npm test` for the toolchain this pipeline already uses) and gate merges on it.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Do you agree with this assessment?
P2 · Observability8.5 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Only 1/2 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`.
`src/directory.ts` reports through `console.*` at line 57 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/directory.ts:57
`src/errors.ts` reports through `console.*` at line 17 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/errors.ts:17
`src/errors.ts` reports through `console.*` at line 19 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/errors.ts:19
`src/errors.ts` reports through `console.*` at line 40 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/errors.ts:40
`src/errors.ts` reports through `console.*` at line 196 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/errors.ts:196
`src/errors.ts` reports through `console.*` at line 200 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/errors.ts:200
`src/errors.ts` reports through `console.*` at line 203 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/errors.ts:203
`src/utils.ts` reports through `console.*` at line 26 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/utils.ts:26
`REDACTED` reports through `console.*` at line 1445 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:1445
`src/resolution/callback-synthesizer.ts` reports through `console.*` at line 5284 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/resolution/callback-synthesizer.ts:5284
`src/resolution/callback-synthesizer.ts` reports through `console.*` at line 5343 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/resolution/callback-synthesizer.ts:5343
`src/resolution/callback-synthesizer.ts` reports through `console.*` at line 5407 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/resolution/callback-synthesizer.ts:5407
`src/resolution/resolver-pool.ts` reports through `console.*` at line 160 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/resolution/resolver-pool.ts:160
`src/resolution/resolver-worker.ts` reports through `console.*` at line 64 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/resolution/resolver-worker.ts:64
`src/resolution/resolver-worker.ts` reports through `console.*` at line 91 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/resolution/resolver-worker.ts:91
`src/installer/targets/shared.ts` reports through `console.*` at line 194 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/installer/targets/shared.ts:194
`src/installer/targets/shared.ts` reports through `console.*` at line 195 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/installer/targets/shared.ts:195
`src/extraction/grammars.ts` reports through `console.*` at line 543 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/extraction/grammars.ts:543
`src/extraction/store-worker.ts` reports through `console.*` at line 130 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/extraction/store-worker.ts:130
`src/db/queries.ts` reports through `console.*` at line 565 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/db/queries.ts:565
`src/db/queries.ts` reports through `console.*` at line 650 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/db/queries.ts:650
`src/db/queries.ts` reports through `console.*` at line 806 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/db/queries.ts:806
`src/db/wal-valve.ts` reports through `console.*` at line 143 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/db/wal-valve.ts:143
`src/db/wal-valve.ts` reports through `console.*` at line 165 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/db/wal-valve.ts:165
`src/db/wal-valve.ts` reports through `console.*` at line 295 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/db/wal-valve.ts:295
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
Route service-code `console.*` output through the module's structured logger (with named fields), so delivery outcomes and failures reach the log pipeline with a level.
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.
No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 16007 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
What to do
Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — so a security regression fails the build instead of landing.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.
Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.
`superagent` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×2) — REDACTED:355, src/ui-server/api/effects.ts:189
What to do
Bound every outbound call: pass `signal: AbortSignal.timeout(ms)` to `fetch`, set `timeout` on the axios instance (`axios.create({ timeout })`), and add retries with back-off (`axios-retry`, `p-retry`) and a breaker (`opossum`, `cockatiel`) around dependencies that fail.
Readiness · Readiness — Whether database schema changes go through versioned migrations rather than being auto-created from the model at startup.
Method: Roslyn scan: EF Core DbContext for a versioned migrations directory versus bare EnsureCreated usage; off .NET, a file scan of dependency manifests, migration histories (Flyway, Liquibase, Alembic, Django, Rails, Prisma, TypeORM, Knex/Sequelize, golang-migrate, goose, Laravel, Doctrine, Diesel/sqlx) and schema auto-create in production source or config. Exhaustive, deterministic.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from the language model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
`fs.existsSync` in `extractNodeCode` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/context/index.ts:1412
`fs.readFileSync` in `extractNodeCode` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/context/index.ts:1417
`fs.existsSync` in `indexAll` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — src/extraction/index.ts:2300, src/extraction/index.ts:2346
`fs.existsSync` in `callback to unique.filter` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/extraction/index.ts:3588
`fs.existsSync` in `sync` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/extraction/index.ts:3653
`fs.statSync` in `sync` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/extraction/index.ts:3700
`fs.statSync` in `treeFor` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/graph/branch-guards.ts:192
`fs.readFileSync` in `treeFor` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/graph/branch-guards.ts:202
`execSync` in `runInstallerWithOptions` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/installer/index.ts:122
`fs.existsSync` in `runUninstaller` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/installer/index.ts:533
`fs.existsSync` in `clearStaleDaemonArtifacts` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/mcp/daemon-registry.ts:212
`fs.existsSync` in `callback to some` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/mcp/daemon-registry.ts:213
`fs.readFileSync` in `clearStaleDaemonArtifacts` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/mcp/daemon-registry.ts:219
`fs.readFileSync` in `stopDaemonAt` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/mcp/daemon-registry.ts:307
`fs.readFileSync` in `daemonStopFailureMessage` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/mcp/daemon-registry.ts:366
`fs.readFileSync` in `sameLock` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/mcp/daemon-registry.ts:418
`fs.readFileSync` in `stopOlderDaemon` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/mcp/daemon-registry.ts:490
`fs.readFileSync` in `start` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/mcp/daemon.ts:275
`fs.unlinkSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/mcp/daemon.ts:295
`fs.chmodSync` in `callback to server.listen` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/mcp/daemon.ts:303
`fs.unlinkSync` in `start` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/mcp/daemon.ts:327
`fs.unlinkSync` in `stop` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/mcp/daemon.ts:427
`fs.readFileSync` in `outwaitCandidate` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/mcp/index.ts:439
`fs.existsSync` in `runProxy` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/mcp/proxy.ts:121
`fs.existsSync` in `connectWithHello` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/mcp/proxy.ts:171
`existsSync` in `handleExplore` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:5780
`readFileSync` in `handleExplore` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:5787
`readFileSync` in `handleFileView` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:8096
`fs.rmSync` in `flushNow` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — src/telemetry/index.ts:361, src/telemetry/index.ts:372
`fs.statSync` in `buildSource` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/ui-server/api/source.ts:369
`fs.readFileSync` in `buildSource` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/ui-server/api/source.ts:389
What to do
TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
Do you agree with this assessment?
R1 · Type Safety10.0 / 10Exemplary✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
React / JS · Code Health — Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm over JS/TS tokens, D-386): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.
Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Deterministic.
46 duplicated blocks under src/ have copies in at least two of the sibling directories context, db, extraction, graph, installer, mcp (+4 more sibling(s) not listed) — 35 of them are reported below, and 11 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 46 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 46 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 46 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — src/extraction/parse-pool.ts:39
29 duplicated blocks under the repository root have copies in at least two of the sibling directories scripts, src, telemetry-dashboard, telemetry-worker, ui — 15 of them are reported below, and 14 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 29 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 29 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 29 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — src/ui-server/api/flow.ts:91
ui/src/views/ScreensView.svelte:41 · ui/src/views/StepsView.svelte:72 — the two spans are one implementation copied and then locally edited — 1608 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — ui/src/views/ScreensView.svelte:41
src/extraction/parse-pool.ts:39 · src/mcp/query-pool.ts:40 — the two spans are one implementation copied and then locally edited — 987 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/extraction/parse-pool.ts:39
src/extraction/astro-extractor.ts:72 · src/extraction/svelte-extractor.ts:66 — the two spans are one implementation copied and then locally edited — 833 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/extraction/astro-extractor.ts:72
src/installer/targets/copilot-jetbrains.ts:96 · src/installer/targets/copilot-vscode.ts:65 — the two spans are one implementation copied and then locally edited — 762 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/installer/targets/copilot-jetbrains.ts:96
src/extraction/svelte-extractor.ts:25 · src/extraction/vue-extractor.ts:41 — the two spans are one implementation copied and then locally edited — 627 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/extraction/svelte-extractor.ts:25
src/ui-server/api/flow.ts:91 · ui/src/lib/wire.ts:488 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — src/ui-server/api/flow.ts:91
src/installer/targets/gemini.ts:48 · src/installer/targets/kiro.ts:43 — the two spans are one implementation copied and then locally edited — 632 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/installer/targets/gemini.ts:48
src/resolution/frameworks/svelte.ts:52 · src/resolution/frameworks/vue.ts:94 — the two spans are one implementation copied and then locally edited — 375 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/resolution/frameworks/svelte.ts:52
src/extraction/languages/javascript.ts:31 · src/extraction/languages/typescript.ts:211 — the two spans are one implementation copied and then locally edited — 441 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/extraction/languages/javascript.ts:31
src/ui-server/api/steps.ts:59 · ui/src/lib/wire.ts:711 — the two spans are one implementation copied and then locally edited — 332 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/ui-server/api/steps.ts:59
REDACTED:3243 · REDACTED:3326 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:3243
REDACTED:42 · src/resolution/frameworks/object-literal.ts:40 — the two spans are one implementation copied and then locally edited — 399 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — REDACTED:42
scripts/agent-eval/probe-file-spend.mjs:34 · scripts/agent-eval/probe-suite-envelope.mjs:27 — the two spans are one implementation copied and then locally edited — 487 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — scripts/agent-eval/probe-file-spend.mjs:34
src/resolution/frameworks/tanstack-router.ts:330 · src/resolution/frameworks/vue-router.ts:306 — the two spans are one implementation copied and then locally edited — 380 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/resolution/frameworks/tanstack-router.ts:330
src/resolution/callback-synthesizer.ts:4269 · src/resolution/callback-synthesizer.ts:4857 — the two spans are one implementation copied and then locally edited — 400 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/resolution/callback-synthesizer.ts:4269
REDACTED:734 · src/resolution/frameworks/nextjs.ts:221 — the two spans are one implementation copied and then locally edited — 365 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — REDACTED:734
REDACTED:246 · REDACTED:319 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:246
ui/src/views/MapView.svelte:58 · ui/src/views/ScreensView.svelte:52 — the two spans are one implementation copied and then locally edited — 304 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — ui/src/views/MapView.svelte:58
ui/src/components/file/FileCodeBlock.svelte:37 · ui/src/components/symbol/SourceBlock.svelte:36 — the two spans are one implementation copied and then locally edited — 352 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — ui/src/components/file/FileCodeBlock.svelte:37
src/resolution/sveltekit-synthesizer.ts:47 · src/resolution/tanstack-router-synthesizer.ts:41 — the two spans are one implementation copied and then locally edited — 471 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/resolution/sveltekit-synthesizer.ts:47
ui/src/components/file/FileCodeOutline.svelte:25 · ui/src/components/file/FileOutline.svelte:39 — the two spans are one implementation copied and then locally edited — 368 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — ui/src/components/file/FileCodeOutline.svelte:25
src/ui-server/api/screens.ts:44 · ui/src/lib/wire.ts:660 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — src/ui-server/api/screens.ts:44
src/resolution/frameworks/astro.ts:25 · src/resolution/frameworks/vue.ts:89 — the two spans are one implementation copied and then locally edited — 222 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/resolution/frameworks/astro.ts:25
src/resolution/frameworks/react-router.ts:95 · src/resolution/frameworks/sveltekit-router.ts:59 — the two spans are one implementation copied and then locally edited — 421 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/resolution/frameworks/react-router.ts:95
ui/src/views/FileCodeView.svelte:91 · ui/src/views/FileView.svelte:48 — the two spans are one implementation copied and then locally edited — 262 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — ui/src/views/FileCodeView.svelte:91
src/ui-server/api/trails.ts:72 · ui/src/lib/wire.ts:980 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — src/ui-server/api/trails.ts:72
src/installer/targets/claude.ts:106 · src/installer/targets/cursor.ts:88 — the two spans are one implementation copied and then locally edited — 270 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/installer/targets/claude.ts:106
src/extraction/dfm-extractor.ts:38 · REDACTED:62 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/extraction/dfm-extractor.ts:38
src/db/queries.ts:2519 · src/db/queries.ts:2575 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/db/queries.ts:2519
src/extraction/parse-pool.ts:458 · src/mcp/query-pool.ts:287 — the two spans are one implementation copied and then locally edited — 253 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/extraction/parse-pool.ts:458
src/installer/targets/copilot-cli.ts:126 · src/installer/targets/copilot-jetbrains.ts:144 — the two spans are one implementation copied and then locally edited — 208 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/installer/targets/copilot-cli.ts:126
src/resolution/frameworks/astro.ts:88 · src/resolution/frameworks/svelte.ts:138 — the two spans are one implementation copied and then locally edited — 222 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/resolution/frameworks/astro.ts:88
src/ui-server/api/filecode.ts:81 · ui/src/lib/wire.ts:282 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — src/ui-server/api/filecode.ts:81
src/graph/traversal.ts:280 · src/graph/traversal.ts:338 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/graph/traversal.ts:280
REDACTED:387 · REDACTED:427 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:387
ui/src/lib/map-model.ts:481 · ui/src/lib/steps-model.ts:1060 — the two spans are one implementation copied and then locally edited — 291 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — ui/src/lib/map-model.ts:481
REDACTED:60 · src/extraction/mybatis-extractor.ts:87 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:60
src/ui-server/api/program.ts:37 · ui/src/lib/wire.ts:850 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — src/ui-server/api/program.ts:37
What to do
Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
React / JS · Architecture — Conformance to the detected frontend architecture layout (feature-sliced / layered src) plus cross-package deep-import rules (D-386).
Method: Conformance to the detected frontend layout (feature-sliced / layered src) plus cross-package deep-import rules, over the module graph. Deterministic.
__tests__/type-hierarchy.test.ts:31 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/hierarchy-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — __tests__/type-hierarchy.test.ts:31
__tests__/ui-conditions.test.ts:8 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/conditions) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — __tests__/ui-conditions.test.ts:8
__tests__/ui-entry-model.test.ts:17 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/entry-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — __tests__/ui-entry-model.test.ts:17
__tests__/ui-entrypoints-api.test.ts:34 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/entry-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — __tests__/ui-entrypoints-api.test.ts:34
__tests__/ui-export-svg.test.ts:21 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/export-svg) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — __tests__/ui-export-svg.test.ts:21
__tests__/ui-export-svg.test.ts:33 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/flow-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — __tests__/ui-export-svg.test.ts:33
__tests__/ui-export-svg.test.ts:34 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/map-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — __tests__/ui-export-svg.test.ts:34
__tests__/ui-file-model.test.ts:16 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/file-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — __tests__/ui-file-model.test.ts:16
__tests__/ui-filecode-model.test.ts:14 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/filecode-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — __tests__/ui-filecode-model.test.ts:14
__tests__/ui-flow-model.test.ts:15 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/flow-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — __tests__/ui-flow-model.test.ts:15
__tests__/ui-highlight.test.ts:40 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/highlight) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — __tests__/ui-highlight.test.ts:40
__tests__/ui-highlight.test.ts:41 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/symbol-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — __tests__/ui-highlight.test.ts:41
__tests__/ui-map-model.test.ts:21 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/map-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — __tests__/ui-map-model.test.ts:21
__tests__/ui-package.test.ts:25 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/index) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — __tests__/ui-package.test.ts:25
__tests__/ui-package.test.ts:679 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/router.svelte) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — __tests__/ui-package.test.ts:679
__tests__/ui-package.test.ts:697 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/router.svelte) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — __tests__/ui-package.test.ts:697
__tests__/ui-package.test.ts:698 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/navigation) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — __tests__/ui-package.test.ts:698
__tests__/ui-program-model.test.ts:12 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/program-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — __tests__/ui-program-model.test.ts:12
__tests__/ui-program-model.test.ts:13 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/steps-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — __tests__/ui-program-model.test.ts:13
__tests__/ui-program-model.test.ts:14 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/screens-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — __tests__/ui-program-model.test.ts:14
__tests__/ui-screens-model.test.ts:22 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/screens-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — __tests__/ui-screens-model.test.ts:22
__tests__/ui-screens-model.test.ts:45 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/map-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — __tests__/ui-screens-model.test.ts:45
__tests__/ui-search-model.test.ts:14 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/search-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — __tests__/ui-search-model.test.ts:14
__tests__/ui-search-model.test.ts:24 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/trail-codec) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — __tests__/ui-search-model.test.ts:24
__tests__/ui-steps-model.test.ts:7 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/steps-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — __tests__/ui-steps-model.test.ts:7
__tests__/ui-steps-model.test.ts:8 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/screens-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — __tests__/ui-steps-model.test.ts:8
__tests__/ui-symbol-model.test.ts:13 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/symbol-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — __tests__/ui-symbol-model.test.ts:13
__tests__/ui-symbol-model.test.ts:29 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/highlight) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — __tests__/ui-symbol-model.test.ts:29
__tests__/ui-trails-model.test.ts:13 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/trails-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — __tests__/ui-trails-model.test.ts:13
scripts/add-lang/check-grammar.mjs:61 imports tree-sitter-wasms/out/, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — scripts/add-lang/check-grammar.mjs:61
scripts/add-lang/dump-ast.mjs:45 imports tree-sitter-wasms/out/, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — scripts/add-lang/dump-ast.mjs:45
scripts/sync-ui-version.mjs:25 reaches into another package with a relative path (../ui/package.json) — import the package by name instead. — scripts/sync-ui-version.mjs:25
src/extraction/grammars.ts:458 imports tree-sitter-wasms/out/, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — src/extraction/grammars.ts:458
What to do
Fix the listed violations: import through public entries (package exports / slice index), never reach into another layer or package's internals.
React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.
Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.
extractCall has cyclomatic complexity 332 and cognitive complexity 742; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/extraction/tree-sitter.ts:5276
handleExplore has cyclomatic complexity 324 and cognitive complexity 626; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:4200
matchMethodCall has cyclomatic complexity 257 and cognitive complexity 329; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/resolution/name-matcher.ts:19685
buildSteps has cyclomatic complexity 213 and cognitive complexity 528; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/ui-server/api/steps.ts:432
cFnPointerDispatchEdges has cyclomatic complexity 164 and cognitive complexity 418; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:434
findRelevantContext has cyclomatic complexity 160 and cognitive complexity 364; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/context/index.ts:477
extractVariable has cyclomatic complexity 140 and cognitive complexity 374; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/extraction/tree-sitter.ts:3884
resolveOneInner has cyclomatic complexity 134 and cognitive complexity 143; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1505
dispatchNode has cyclomatic complexity 122 and cognitive complexity 188; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/extraction/tree-sitter.ts:1541
extractInheritance has cyclomatic complexity 120 and cognitive complexity 294; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/extraction/tree-sitter.ts:7695
(anonymous) has cyclomatic complexity 117 and cognitive complexity 56; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/resolution/name-matcher.ts:11907
(anonymous) has cyclomatic complexity 111 and cognitive complexity 184; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/index.ts:927
matchReferenceInner has cyclomatic complexity 101 and cognitive complexity 132; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/resolution/name-matcher.ts:27279
parseSession has cyclomatic complexity 97 and cognitive complexity 155; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/agent-eval/parse-run.mjs:102
isRustNameInScope has cyclomatic complexity 87 and cognitive complexity 94; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/resolution/name-matcher.ts:8961
unit has cyclomatic complexity 85 and cognitive complexity 126; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1145
normalizeSpecial has cyclomatic complexity 80 and cognitive complexity 121; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/extraction/function-ref.ts:638
inferCppReceiverType has cyclomatic complexity 78 and cognitive complexity 127; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/resolution/name-matcher.ts:16827
resolveViaImport has cyclomatic complexity 77 and cognitive complexity 160; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:2981
matchByExactName has cyclomatic complexity 76 and cognitive complexity 66; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/resolution/name-matcher.ts:11825
What to do
Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
Do you agree with this assessment?
R3 · Large Files0.0 / 10Critical✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
src/extraction/tree-sitter.ts has 9245 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/extraction/tree-sitter.ts:1
REDACTED has 8412 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
src/resolution/callback-synthesizer.ts has 5238 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/resolution/callback-synthesizer.ts:1
src/db/queries.ts has 5237 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/db/queries.ts:1
REDACTED has 4282 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
REDACTED has 4186 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
src/extraction/index.ts has 3704 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/extraction/index.ts:1
src/index.ts has 2644 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/index.ts:1
REDACTED has 2624 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
REDACTED has 2376 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
src/graph/branch-guards.ts has 2242 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/graph/branch-guards.ts:1
REDACTED has 1772 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
src/ui-server/api/steps.ts has 1670 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/ui-server/api/steps.ts:1
src/context/index.ts has 1485 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/context/index.ts:1
REDACTED has 1384 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
REDACTED has 1213 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
ui/src/lib/steps-model.ts has 1142 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/src/lib/steps-model.ts:1
ui/src/views/StepsView.svelte has 1138 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/src/views/StepsView.svelte:1
src/sync/watcher.ts has 1090 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/sync/watcher.ts:1
src/directory.ts has 1071 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/directory.ts:1
src/graph/dead-code.ts has 1048 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/graph/dead-code.ts:1
src/resolution/frameworks/angular-router.ts has 1045 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/resolution/frameworks/angular-router.ts:1
src/extraction/languages/pascal-preparse.ts has 1044 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/extraction/languages/pascal-preparse.ts:1
REDACTED has 1041 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
src/mcp/daemon.ts has 990 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/mcp/daemon.ts:1
src/extraction/function-ref.ts has 977 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/extraction/function-ref.ts:1
src/db/index.ts has 962 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/db/index.ts:1
ui/src/lib/export-svg.ts has 915 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/src/lib/export-svg.ts:1
REDACTED has 910 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
src/upgrade/index.ts has 898 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/upgrade/index.ts:1
src/extraction/grammars.ts has 893 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/extraction/grammars.ts:1
src/ui-server/api/map.ts has 873 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/ui-server/api/map.ts:1
src/ui-server/api/flow.ts has 843 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/ui-server/api/flow.ts:1
telemetry-dashboard/src/api.ts has 835 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — telemetry-dashboard/src/api.ts:1
src/resolution/ambient-modules.ts has 829 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/resolution/ambient-modules.ts:1
REDACTED has 827 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
src/extraction/languages/dart.ts has 794 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/extraction/languages/dart.ts:1
src/resolution/angular-template-synthesizer.ts has 790 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/resolution/angular-template-synthesizer.ts:1
src/extraction/cfml-extractor.ts has 788 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/extraction/cfml-extractor.ts:1
ui/src/lib/screens-model.ts has 786 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/src/lib/screens-model.ts:1
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Do you agree with this assessment?
R4 · Test Coverage8.9 / 10Strong✓ Tool-verified
React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.
__tests__/fixtures/kernel-parity/torture.tsx:5 imports './namespace-module', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (6 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — __tests__/fixtures/kernel-parity/torture.tsx:5
No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×39) — scripts/agent-eval/parse-run.mjs:1, telemetry-dashboard/public/panels.js:1, telemetry-dashboard/public/app.js:1, …
What to do
Add tests that import the unreached modules (directly or through their public entry).
React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).
Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.
What to do
Bump outdated dependencies to current versions to limit upgrade debt.
Do you agree with this assessment?
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.
This repository declares test tooling, and the ✓ above records that declaration — but __tests__/fixtures/kernel-parity/torture.tsx cannot be loaded at all: it imports a module that names no file in this repository, so the runner throws while collecting it and none of its cases execute. The wiring is present and the suite it points at does not run as written, which is why the tooling tick must not be read as a statement that the tests pass. Fix the unloadable file(s) — each one is reported with its failing import under Test Coverage — then the declared script exercises what it claims to. — __tests__/fixtures/kernel-parity/torture.tsx:5
Do you agree with this assessment?
R7 · Dead Code8.0 / 10Strong✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
Unreachable from the 178 application, 55 tooling and 834 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
no import path from any entry point (178 application, 55 tooling, 834 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×7) — src/extraction/parse-worker.ts, src/extraction/store-worker.ts, src/ui/shimmer-progress.ts, …
no import path from any entry point (178 application, 55 tooling, 834 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (src/ui/shimmer-worker.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — src/ui/types.ts
Nothing ultimately consumes this binding: its only referrer is the re-export in src/installer/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in src/installer/index.ts in the same commit, or the barrel will import a name that no longer exists. (×3) — src/installer/config-writer.ts:38, src/installer/config-writer.ts:42, src/installer/config-writer.ts:52
Nothing imports this binding — it is safe to review for removal. (×14) — src/installer/index.ts:82, src/installer/index.ts:464, src/installer/index.ts:678, …
Nothing ultimately consumes this binding: its only referrer is the re-export in src/resolution/frameworks/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in src/resolution/frameworks/index.ts in the same commit, or the barrel will import a name that no longer exists. — src/resolution/frameworks/laravel.ts:16
Nothing ultimately consumes this binding: its only referrer is the re-export in REDACTED, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in REDACTED in the same commit, or the barrel will import a name that no longer exists. — REDACTED:64
Nothing in its class reads or assigns this private field (for a constructor parameter property: it is stored and never read), and no string key or test reaches it by name. Remove it, or use it where it was meant to take effect. — __tests__/fixtures/kernel-parity/torture.js:18
This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it. (×11) — __tests__/fixtures/kernel-parity/torture.js:81, __tests__/fixtures/kernel-parity/torture.js:83, __tests__/fixtures/kernel-parity/torture.js:90, …
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
Imported but not declared in any reachable package.json — installs work only by hoisting accident. — __tests__/ui-package.test.ts:22
Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×3)
Every import is type-only — move it to devDependencies. — src/installer/beta-signup.ts:114
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
Do you agree with this assessment?
R9 · Circular Imports3.6 / 10Weak✓ Tool-verified
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
src/extraction/astro-extractor.ts → src/extraction/tree-sitter.ts → src/extraction/astro-extractor.ts (one verified cycle inside a mutually-dependent group of 6 files) — src/extraction/astro-extractor.ts:3
src/index.ts → src/mcp/index.ts → src/mcp/daemon.ts → src/mcp/engine.ts → src/index.ts (one verified cycle inside a mutually-dependent group of 8 files) — src/index.ts:107
Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.
Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.
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.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.
Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.
Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X17 · Uncapped recursion over a caller-supplied document10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.
Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.
Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `ArgumentNullException` tells the caller a parameter was null when it provably was not.
Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements controlled by an `if`, whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`). Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.
Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.
Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.
Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.
Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
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.
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X32 · Type resolved by simple name across every loaded assembly10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a plugin lookup names the type it means — searching every assembly loaded into the process for a candidate whose SIMPLE name equals a string supplied at runtime, and taking the first one found, is decided by assembly LOAD ORDER rather than by this source, so the same name can resolve to a different type on the next run.
Method: Roslyn syntax only, no semantic model: every invocation of `First`/`FirstOrDefault`/`Single`/`SingleOrDefault` whose OWN expression subtree contains both a `GetAssemblies()` call and a `GetTypes()`/`GetExportedTypes()` call — a single-element pick out of every type loaded into the process. A nested selector in the same chain sees no `GetAssemblies()` in its own subtree and is outside the population, so one lookup counts once however many links its chain has. A finding additionally needs both remaining halves: the selector must be `First`/`FirstOrDefault` (`Single`/`SingleOrDefault` reports the ambiguity rather than resolving it, and is counted and never reported), and the chain must carry an `==` comparison of `<lambda parameter>.Name` against something that is not a literal. The receiver must be a plain identifier bound by one of the chain’s own lambdas, which places `assembly.GetName().Name == "X"` outside the rule by construction. One exemption: a `.Name` test joined by `&&` to a `FullName`/`AssemblyQualifiedName` test on the same identifier is spared; joined by `||` it is not. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether nullable reference types are enabled and not undermined by heavy `!` suppression.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
0/1 NRT-eligible project(s) enable <Nullable>enable</Nullable> (projects targeting a pre-C#-8 framework are excluded — NRTs aren't available there). NRTs catch a whole class of null-deref bugs at compile time.
What to do
Enable <Nullable>enable</Nullable> across all projects and resolve warnings rather than suppressing with `!`.
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 12 of 55 WCAG 2.2 Level A/AA success criteria (22%; ≈24% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 43 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).
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.
Unscored — 3 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 — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 28 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X9 Subsumed condition operand — 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 — 47 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No image/media element found in the parsed markup — AC1 not applicable here.
AX2 Stateful singletons — no singleton implementations detected
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
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — the dev server did not expose a crawlable HTTP endpoint in time — no runtime evidence 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 the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C2 Access Controls — No access-control surface detected in the analyzed source — no web/app surface to authorize (no HTTP API or web-UI project) and no authorization code at all (no [Authorize]/policies, no imperative guard methods). Access control is therefore N/A here — this is a library/CLI, which is authorized by its CALLER, 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 the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C4 Data Retention — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C5 Data-Subject Rights — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
D11 Test Reliability — Test reliability not included
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 — Naming consistency is measured on C# only; Dart, Java, JavaScript, Kotlin, PHP, Python, Rust, Scala, Swift, TypeScript not measured.
D22 Internal API Consistency — API consistency is measured on C# only; the exposed TypeScript surface was not measured.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ projects each declaring an entity of their own. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — D24 reads C# and Visual Basic comments only — this repository's production source is .mts, .py, .rs, .ts, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D25 ADR Conformance — None of 2 binding record(s) states a rule in checkable form (a backticked element with a prohibition, or an `adr-rules` block), so conformance cannot be read from the code. Write the rule as an `adr-rules` block (`forbid:` a symbol, a package or a dependency) to make it checkable.
D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.cjs,.js,.mjs,.ts), 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) — 12 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D8 Code Coverage — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the repository root runs vitest but declares no coverage provider, so the suite can run and still produce no lcov — add `@vitest/coverage-v8` (or `@vitest/coverage-istanbul`) as a devDependency. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run.
DM1 Domain Modelling — applicable but not scored (2 signals for this style, 2 needed — the count is met but a required primary signal is absent): 12 value object(s); 2 domain event(s); its domain events are published by services or handlers — no domain entity raises one
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, which this analysis does not build from source alone for this language. Reported as guidance rather than measured
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable (this repository commits no MSBuild project, so its C# was read as syntax-only projects — a handler marked ONLY by an interface from a package is not visible without a build)
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
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'.
P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `vitest --coverage --coverage.reporter=lcovonly`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
PF1 Benchmark discipline — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
PF2 Allocation hygiene — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
S1 Web-Security Posture — No web surface detected in the analyzed source — no HTTP API or web-UI project (no controllers/minimal-API endpoints, no Razor/Blazor views) and no web middleware (HTTPS redirection, HSTS, security headers, cookies). Transport security, security headers, secure cookies, CSRF/input-validation and middleware-order controls are therefore N/A here — this is a library/CLI/worker, not a web app. Crypto hygiene was still checked and found nothing to flag. If this codebase becomes web-facing, the dimension reactivates automatically.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X1 Async correctness — not 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 — 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 — This check needs a compiled C# program and this repository commits no project file to compile, so only its syntax could be read. That is a limit of the analyzer, not a finding about your code.
X3 Exception handling — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X4 Structured logging — 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.
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.
AC2 · Forms & labels· <select> without a programmatic label · ×1
<select> without a programmatic label ui/src/views/StepsView.svelte:820— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
Unlisted import 'svelte' __tests__/ui-package.test.ts:22— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Walker::synthesize_lombok_members (cognitive 107) codegraph-kernel/src/java.rs:1505— Walker::synthesize_lombok_members has cognitive complexity 107 (threshold 15). Drivers by points: if/else 43 (87 pts), boolean chains 17, loops 2 (3 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.
Walker::extract_call (cognitive 96) codegraph-kernel/src/ccpp/mod.rs:1647— Walker::extract_call has cognitive complexity 96 (threshold 15). Drivers by points: if/else 29 (78 pts), loops 3 (11 pts), match/switch 1 (4 pts), boolean chains 3 (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.
Walker::flush_value_refs (cognitive 95) codegraph-kernel/src/swift.rs:1550— Walker::flush_value_refs has cognitive complexity 95 (threshold 15). Drivers by points: if/else 22 (75 pts), loops 7 (15 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 63). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Walker::flush_value_refs (cognitive 92) codegraph-kernel/src/kotlin.rs:1646— Walker::flush_value_refs has cognitive complexity 92 (threshold 15). Drivers by points: if/else 22 (75 pts), loops 7 (15 pts), boolean chains 2 (nesting depth added 61). 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.
Walker::flush_value_refs (cognitive 80) codegraph-kernel/src/python.rs:1027— Walker::flush_value_refs has cognitive complexity 80 (threshold 15). Drivers by points: if/else 18 (63 pts), loops 7 (15 pts), boolean chains 2 (nesting depth added 53). 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.
Walker::flush_value_refs (cognitive 80) codegraph-kernel/src/ruby.rs:1025— Walker::flush_value_refs has cognitive complexity 80 (threshold 15). Drivers by points: if/else 18 (63 pts), loops 7 (15 pts), boolean chains 2 (nesting depth added 53). 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.
Walker::extract_variable (cognitive 78) codegraph-kernel/src/tsjs/extractors.rs:614— Walker::extract_variable has cognitive complexity 78 (threshold 15). Drivers by points: if/else 25 (60 pts), match/switch 4 (10 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 42). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Walker::visit_for_calls_and_structure (cognitive 65) codegraph-kernel/src/ccpp/mod.rs:2028— Walker::visit_for_calls_and_structure has cognitive complexity 65 (threshold 15). Drivers by points: if/else 24 (51 pts), loops 3 (9 pts), boolean chains 5 (nesting depth added 33). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Walker::extract_call (cognitive 64) codegraph-kernel/src/tsjs/extractors.rs:1603— Walker::extract_call has cognitive complexity 64 (threshold 15). Drivers by points: if/else 25 (59 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 36). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Walker::visit_node (cognitive 63) codegraph-kernel/src/csharp.rs:515— Walker::visit_node has cognitive complexity 63 (threshold 15). Drivers by points: if/else 23 (39 pts), loops 3 (9 pts), match/switch 3 (8 pts), boolean chains 7 (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.
Walker::flush_value_refs (cognitive 60) codegraph-kernel/src/go.rs:1329— Walker::flush_value_refs has cognitive complexity 60 (threshold 15). Drivers by points: if/else 16 (41 pts), loops 7 (15 pts), boolean chains 2, match/switch 1 (2 pts) (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.
Walker::extract_call (cognitive 60) codegraph-kernel/src/rustlang.rs:887— Walker::extract_call has cognitive complexity 60 (threshold 15). Drivers by points: if/else 17 (41 pts), match/switch 3 (18 pts), boolean chains 1 (nesting depth added 39). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Walker::flush_value_refs (cognitive 60) codegraph-kernel/src/rustlang.rs:1513— Walker::flush_value_refs has cognitive complexity 60 (threshold 15). Drivers by points: if/else 16 (41 pts), loops 7 (15 pts), boolean chains 2, match/switch 1 (2 pts) (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.
Walker::dispatch_node (cognitive 58) codegraph-kernel/src/ccpp/mod.rs:1126— Walker::dispatch_node has cognitive complexity 58 (threshold 15). Drivers by points: if/else 24 (40 pts), boolean chains 8, loops 3 (8 pts), match/switch 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.
Walker::flush_value_refs (cognitive 58) codegraph-kernel/src/scala.rs:1387— Walker::flush_value_refs has cognitive complexity 58 (threshold 15). Drivers by points: if/else 16 (46 pts), loops 6 (10 pts), boolean chains 2 (nesting depth added 34). 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.
Walker::flush_value_refs (cognitive 54) codegraph-kernel/src/ccpp/mod.rs:2348— Walker::flush_value_refs has cognitive complexity 54 (threshold 15). Drivers by points: if/else 15 (42 pts), loops 6 (10 pts), boolean chains 2 (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Walker::flush_value_refs (cognitive 53) codegraph-kernel/src/csharp.rs:1606— Walker::flush_value_refs has cognitive complexity 53 (threshold 15). Drivers by points: if/else 14 (41 pts), loops 6 (10 pts), boolean chains 2 (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Walker::flush_value_refs (cognitive 53) codegraph-kernel/src/dart.rs:2074— Walker::flush_value_refs has cognitive complexity 53 (threshold 15). Drivers by points: if/else 15 (41 pts), loops 6 (10 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.
Walker::flush_value_refs (cognitive 53) codegraph-kernel/src/java.rs:1318— Walker::flush_value_refs has cognitive complexity 53 (threshold 15). Drivers by points: if/else 14 (41 pts), loops 6 (10 pts), boolean chains 2 (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Walker::extract_class_members (cognitive 53) codegraph-kernel/src/rlang.rs:486— Walker::extract_class_members has cognitive complexity 53 (threshold 15). Drivers by points: if/else 12 (41 pts), loops 2 (6 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 34). 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.
Walker::flush_value_refs (cognitive 53) codegraph-kernel/src/tsjs/mod.rs:509— Walker::flush_value_refs has cognitive complexity 53 (threshold 15). Drivers by points: if/else 14 (41 pts), loops 6 (10 pts), boolean chains 2 (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Walker::extract_inheritance (cognitive 52) codegraph-kernel/src/dart.rs:1643— Walker::extract_inheritance has cognitive complexity 52 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 7 (22 pts), match/switch 1 (4 pts), boolean chains 1 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Walker::extract_call (cognitive 51) codegraph-kernel/src/go.rs:823— Walker::extract_call has cognitive complexity 51 (threshold 15). Drivers by points: if/else 17 (46 pts), match/switch 1 (5 pts) (nesting depth added 33). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Walker::callee_name (cognitive 50) codegraph-kernel/src/dart.rs:1298— Walker::callee_name has cognitive complexity 50 (threshold 15). Drivers by points: if/else 13 (50 pts) (nesting depth added 37). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Walker::extract_type_alias (cognitive 48) codegraph-kernel/src/ccpp/mod.rs:1458— Walker::extract_type_alias has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (37 pts), loops 3 (8 pts), boolean chains 3 (nesting depth added 26). 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.
Hotspot: src/resolution/name-matcher.ts src/resolution/name-matcher.ts:19685— src/resolution/name-matcher.ts changed 295 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 362 in name-matcher.matchMethodCall at line 19685. 288 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/resolution/name-matcher.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:4200— REDACTED changed 76 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 649 in ToolHandler.handleExplore at line 4200. 61 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/extraction/tree-sitter.ts src/extraction/tree-sitter.ts:5276— src/extraction/tree-sitter.ts changed 104 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 333 in TreeSitterExtractor.extractCall at line 5276. 101 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/extraction/tree-sitter.ts`: 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/bin/codegraph.ts src/bin/codegraph.ts:158— src/bin/codegraph.ts changed 39 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 422 in codegraph.main at line 158. 29 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/bin/codegraph.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:1505— REDACTED changed 114 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 138 in ReferenceResolver.resolveOneInner at line 1505. 110 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/index.ts src/index.ts:926— src/index.ts changed 65 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 116 in CodeGraph.sync at line 926. 49 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/index.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:2981— REDACTED changed 67 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 80 in import-resolver.resolveViaImport at line 2981. 64 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/resolution/callback-synthesizer.ts src/resolution/callback-synthesizer.ts:1034— src/resolution/callback-synthesizer.ts changed 47 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 89 in callback-synthesizer.goImplementsEdges at line 1034. 38 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/resolution/callback-synthesizer.ts`: 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/ui-server/api/steps.ts src/ui-server/api/steps.ts:432— src/ui-server/api/steps.ts changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 202 in steps.buildSteps at line 432. 5 of those changes were fix/bug commits, and the other 14 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/ui-server/api/steps.ts`: 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/extraction/index.ts src/extraction/index.ts:2181— src/extraction/index.ts changed 41 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 90 in ExtractionOrchestrator.indexAll at line 2181. 38 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/extraction/index.ts`: 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/context/index.ts src/context/index.ts:477— src/context/index.ts changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 183 in ContextBuilder.findRelevantContext at line 477. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/context/index.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:1145— REDACTED changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 80 in react.scanRoutes.unit at line 1145. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/db/queries.ts src/db/queries.ts:1666— src/db/queries.ts changed 66 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in QueryBuilder.searchNodes at line 1666. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/db/queries.ts`: 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: codegraph-kernel/src/tsjs/extractors.rs codegraph-kernel/src/tsjs/extractors.rs:614— codegraph-kernel/src/tsjs/extractors.rs changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in Walker::extract_variable at line 614. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- codegraph-kernel/src/tsjs/extractors.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: scripts/agent-eval/parse-run.mjs scripts/agent-eval/parse-run.mjs:102— scripts/agent-eval/parse-run.mjs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 91 in parse-run.parseSession at line 102. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- scripts/agent-eval/parse-run.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:434— REDACTED changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 309 in c-fnptr-synthesizer.cFnPointerDispatchEdges at line 434. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/mcp/proxy.ts src/mcp/proxy.ts:260— src/mcp/proxy.ts changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 89 in proxy.runLocalHandshakeProxy at line 260. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/mcp/proxy.ts`: 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: codegraph-kernel/src/tsjs/mod.rs codegraph-kernel/src/tsjs/mod.rs:681— codegraph-kernel/src/tsjs/mod.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in Walker::visit_node at line 681. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- codegraph-kernel/src/tsjs/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: ui/src/lib/steps-model.ts ui/src/lib/steps-model.ts:710— ui/src/lib/steps-model.ts changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 59 in steps-model.packRegions at line 710. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- ui/src/lib/steps-model.ts`: 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: codegraph-kernel/src/ccpp/mod.rs codegraph-kernel/src/ccpp/mod.rs:1126— codegraph-kernel/src/ccpp/mod.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in Walker::dispatch_node at line 1126. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- codegraph-kernel/src/ccpp/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: REDACTED REDACTED:1167— REDACTED changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in c-cpp.blankCppAnnotationMacroCalls at line 1167. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/graph/branch-guards.ts src/graph/branch-guards.ts:835— src/graph/branch-guards.ts changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in branch-guards.triggerInTree at line 835. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/graph/branch-guards.ts`: 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/mcp/explore-diagnostics.ts src/mcp/explore-diagnostics.ts:678— src/mcp/explore-diagnostics.ts changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in explore-diagnostics.renderTable at line 678. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/mcp/explore-diagnostics.ts`: 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/ui-server/api/screens.ts src/ui-server/api/screens.ts:225— src/ui-server/api/screens.ts changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in screens.buildScreens at line 225. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/ui-server/api/screens.ts`: 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: codegraph-kernel/src/dart.rs codegraph-kernel/src/dart.rs:1364— codegraph-kernel/src/dart.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in Walker::misparsed_generic_call at line 1364. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- codegraph-kernel/src/dart.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.
Walker::synthesize_lombok_members (cyclomatic 55) codegraph-kernel/src/java.rs:1505— Walker::synthesize_lombok_members 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.
Walker::extract_variable (cyclomatic 37) codegraph-kernel/src/tsjs/extractors.rs:614— Walker::extract_variable 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.
Walker::dispatch_node (cyclomatic 36) codegraph-kernel/src/ccpp/mod.rs:1126— Walker::dispatch_node 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.
Walker::visit_node (cyclomatic 36) codegraph-kernel/src/csharp.rs:515— Walker::visit_node 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.
Walker::extract_call (cyclomatic 34) codegraph-kernel/src/ccpp/mod.rs:1647— Walker::extract_call has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Walker::visit_node (cyclomatic 34) codegraph-kernel/src/tsjs/mod.rs:681— Walker::visit_node has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Walker::visit_for_calls_and_structure (cyclomatic 33) codegraph-kernel/src/ccpp/mod.rs:2028— Walker::visit_for_calls_and_structure 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.
Walker::flush_value_refs (cyclomatic 32) codegraph-kernel/src/swift.rs:1550— Walker::flush_value_refs 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.
Walker::flush_value_refs (cyclomatic 31) codegraph-kernel/src/kotlin.rs:1646— Walker::flush_value_refs 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.
Walker::flush_value_refs (cyclomatic 27) codegraph-kernel/src/go.rs:1329— Walker::flush_value_refs 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.
Walker::flush_value_refs (cyclomatic 27) codegraph-kernel/src/python.rs:1027— Walker::flush_value_refs 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.
Walker::flush_value_refs (cyclomatic 27) codegraph-kernel/src/ruby.rs:1025— Walker::flush_value_refs 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.
Walker::flush_value_refs (cyclomatic 27) codegraph-kernel/src/rustlang.rs:1513— Walker::flush_value_refs 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.
Walker::maybe_capture_fn_refs (cyclomatic 26) codegraph-kernel/src/python.rs:885— Walker::maybe_capture_fn_refs 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.
Walker::recover_single_arg_macro_defined_name (cyclomatic 25) codegraph-kernel/src/ccpp/mod.rs:818— Walker::recover_single_arg_macro_defined_name 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.
Walker::misparsed_generic_call (cyclomatic 25) codegraph-kernel/src/dart.rs:1364— Walker::misparsed_generic_call has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Walker::flush_value_refs (cyclomatic 25) codegraph-kernel/src/scala.rs:1387— Walker::flush_value_refs 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.
Walker::extract_call (cyclomatic 25) codegraph-kernel/src/tsjs/extractors.rs:1603— Walker::extract_call 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.
Walker::flush_value_refs (cyclomatic 24) codegraph-kernel/src/ccpp/mod.rs:2348— Walker::flush_value_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.
Walker::flush_value_refs (cyclomatic 24) codegraph-kernel/src/dart.rs:2074— Walker::flush_value_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.
Walker::maybe_capture_fn_refs (cyclomatic 24) codegraph-kernel/src/java.rs:1187— Walker::maybe_capture_fn_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.
Walker::maybe_capture_fn_refs (cyclomatic 24) codegraph-kernel/src/rustlang.rs:1356— Walker::maybe_capture_fn_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.
Walker::flush_value_refs (cyclomatic 23) codegraph-kernel/src/csharp.rs:1606— Walker::flush_value_refs 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.
Walker::visit (cyclomatic 23) codegraph-kernel/src/dart.rs:745— Walker::visit 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.
Walker::flush_value_refs (cyclomatic 23) codegraph-kernel/src/java.rs:1318— Walker::flush_value_refs 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.
FileTooLong: resolution/name-matcher.ts src/resolution/name-matcher.ts— FileTooLong — 15647 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 15147 over it, 31.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: extraction/tree-sitter.ts src/extraction/tree-sitter.ts— FileTooLong — 5021 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 4521 over it, 10.04× 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: REDACTED REDACTED— FileTooLong — 4070 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3570 over it, 8.14× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: resolution/callback-synthesizer.ts src/resolution/callback-synthesizer.ts— FileTooLong — 3113 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2613 over it, 6.23× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: db/queries.ts src/db/queries.ts— FileTooLong — 2972 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2472 over it, 5.94× 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: REDACTED REDACTED— FileTooLong — 2312 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1812 over it, 4.62× 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: REDACTED REDACTED— FileTooLong — 2296 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1796 over it, 4.59× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: extraction/index.ts src/extraction/index.ts— FileTooLong — 1896 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1396 over it, 3.79× 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: ccpp/mod.rs codegraph-kernel/src/ccpp/mod.rs— FileTooLong — 1625 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 31 free functions. The bar is 500 significant lines; this is 1125 over it, 3.25× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: graph/branch-guards.ts src/graph/branch-guards.ts— FileTooLong — 1595 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1095 over it, 3.19× 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: REDACTED REDACTED— FileTooLong — 1472 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 972 over it, 2.94× 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/dart.rs codegraph-kernel/src/dart.rs— FileTooLong — 1359 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 88% of them inside a single declaration: Walker (2 blocks, 209-2177). The bar is 500 significant lines; this is 859 over it, 2.72× 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: tsjs/extractors.rs codegraph-kernel/src/tsjs/extractors.rs— FileTooLong — 1344 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 96% of them inside a single declaration: Walker (15-2091). The bar is 500 significant lines; this is 844 over it, 2.69× 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: REDACTED REDACTED— FileTooLong — 1295 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 795 over it, 2.59× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/java.rs codegraph-kernel/src/java.rs— FileTooLong — 1202 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 83% of them inside a single declaration: Walker (2 blocks, 126-1681). The bar is 500 significant lines; this is 702 over it, 2.40× 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/kotlin.rs codegraph-kernel/src/kotlin.rs— FileTooLong — 1160 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 660 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: src/index.ts src/index.ts— FileTooLong — 1133 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: CodeGraph (157-2867). The bar is 500 significant lines; this is 633 over it, 2.27× 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/swift.rs codegraph-kernel/src/swift.rs— FileTooLong — 1130 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 80% of them inside a single declaration: Walker (2 blocks, 219-1683). The bar is 500 significant lines; this is 630 over it, 2.26× 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: REDACTED REDACTED— FileTooLong — 1127 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 627 over it, 2.25× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/rustlang.rs codegraph-kernel/src/rustlang.rs— FileTooLong — 1122 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 81% of them inside a single declaration: Walker (2 blocks, 118-1626). The bar is 500 significant lines; this is 622 over it, 2.24× 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/csharp.rs codegraph-kernel/src/csharp.rs— FileTooLong — 1120 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 82% of them inside a single declaration: Walker (2 blocks, 128-1700). The bar is 500 significant lines; this is 620 over it, 2.24× 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/go.rs codegraph-kernel/src/go.rs— FileTooLong — 1099 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 77% of them inside a single declaration: Walker (2 blocks, 89-1439). The bar is 500 significant lines; this is 599 over it, 2.20× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/php.rs codegraph-kernel/src/php.rs— FileTooLong — 1007 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 507 over it, 2.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.
FileTooLong: api/steps.ts src/ui-server/api/steps.ts— FileTooLong — 1003 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 503 over it, 2.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.
FileTooLong: src/scala.rs codegraph-kernel/src/scala.rs— FileTooLong — 964 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 464 over it, 1.93× 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.
+ 25 more in this group — see findings.md.
R4 · Test Coverage· No test reaches this file · ×39
No test reaches this file scripts/agent-eval/parse-run.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file telemetry-dashboard/public/panels.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file telemetry-dashboard/public/app.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file scripts/kernel-parity.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file telemetry-dashboard/src/index.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file scripts/agent-eval/compare-arms.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file scripts/agent-eval/probe-decl-only.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file scripts/agent-eval/probe-file-spend.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file telemetry-dashboard/public/theme.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file scripts/check-ui-package.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file REDACTED:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file scripts/agent-eval/probe-named-symbol.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/extraction/parse-worker.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/extraction/store-worker.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/ui/shimmer-progress.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file scripts/agent-eval/probe-factory-closure.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/resolution/resolver-worker.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file scripts/agent-eval/seq-matrix.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/ui/shimmer-worker.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file scripts/agent-eval/offload-eval-cost.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file scripts/agent-eval/parse-session.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file scripts/agent-eval/repro-daemon-clients.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file scripts/agent-eval/probe-suite-envelope.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file telemetry-dashboard/src/login-page.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file scripts/agent-eval/probe-sweep.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
Sync-over-async blocking src/context/index.ts:1412— `fs.existsSync` in `extractNodeCode` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking src/context/index.ts:1417— `fs.readFileSync` in `extractNodeCode` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking src/extraction/index.ts:2300— `fs.existsSync` in `indexAll` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking src/extraction/index.ts:2346— `fs.existsSync` in `indexAll` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking src/extraction/index.ts:3588— `fs.existsSync` in `callback to unique.filter` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking src/extraction/index.ts:3653— `fs.existsSync` in `sync` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking src/extraction/index.ts:3700— `fs.statSync` in `sync` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking src/graph/branch-guards.ts:192— `fs.statSync` in `treeFor` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking src/graph/branch-guards.ts:202— `fs.readFileSync` in `treeFor` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking src/installer/index.ts:122— `execSync` in `runInstallerWithOptions` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking src/installer/index.ts:533— `fs.existsSync` in `runUninstaller` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking src/mcp/daemon-registry.ts:212— `fs.existsSync` in `clearStaleDaemonArtifacts` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking src/mcp/daemon-registry.ts:213— `fs.existsSync` in `callback to some` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking src/mcp/daemon-registry.ts:219— `fs.readFileSync` in `clearStaleDaemonArtifacts` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking src/mcp/daemon-registry.ts:307— `fs.readFileSync` in `stopDaemonAt` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking src/mcp/daemon-registry.ts:366— `fs.readFileSync` in `daemonStopFailureMessage` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking src/mcp/daemon-registry.ts:418— `fs.readFileSync` in `sameLock` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking src/mcp/daemon-registry.ts:490— `fs.readFileSync` in `stopOlderDaemon` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking src/mcp/daemon.ts:275— `fs.readFileSync` in `start` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking src/mcp/daemon.ts:295— `fs.unlinkSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking src/mcp/daemon.ts:303— `fs.chmodSync` in `callback to server.listen` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking src/mcp/daemon.ts:327— `fs.unlinkSync` in `start` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking src/mcp/daemon.ts:427— `fs.unlinkSync` in `stop` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking src/mcp/index.ts:439— `fs.readFileSync` in `outwaitCandidate` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking src/mcp/proxy.ts:121— `fs.existsSync` in `runProxy` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Boundary violation [package:test-cross-package-internals] __tests__/type-hierarchy.test.ts:31— __tests__/type-hierarchy.test.ts:31 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/hierarchy-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] __tests__/ui-conditions.test.ts:8— __tests__/ui-conditions.test.ts:8 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/conditions) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] __tests__/ui-entry-model.test.ts:17— __tests__/ui-entry-model.test.ts:17 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/entry-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] __tests__/ui-entrypoints-api.test.ts:34— __tests__/ui-entrypoints-api.test.ts:34 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/entry-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] __tests__/ui-export-svg.test.ts:21— __tests__/ui-export-svg.test.ts:21 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/export-svg) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] __tests__/ui-export-svg.test.ts:33— __tests__/ui-export-svg.test.ts:33 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/flow-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] __tests__/ui-export-svg.test.ts:34— __tests__/ui-export-svg.test.ts:34 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/map-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] __tests__/ui-file-model.test.ts:16— __tests__/ui-file-model.test.ts:16 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/file-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] __tests__/ui-filecode-model.test.ts:14— __tests__/ui-filecode-model.test.ts:14 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/filecode-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] __tests__/ui-flow-model.test.ts:15— __tests__/ui-flow-model.test.ts:15 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/flow-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] __tests__/ui-highlight.test.ts:40— __tests__/ui-highlight.test.ts:40 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/highlight) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] __tests__/ui-highlight.test.ts:41— __tests__/ui-highlight.test.ts:41 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/symbol-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] __tests__/ui-map-model.test.ts:21— __tests__/ui-map-model.test.ts:21 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/map-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] __tests__/ui-package.test.ts:25— __tests__/ui-package.test.ts:25 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/index) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] __tests__/ui-package.test.ts:679— __tests__/ui-package.test.ts:679 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/router.svelte) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] __tests__/ui-package.test.ts:697— __tests__/ui-package.test.ts:697 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/router.svelte) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] __tests__/ui-package.test.ts:698— __tests__/ui-package.test.ts:698 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/navigation) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] __tests__/ui-program-model.test.ts:12— __tests__/ui-program-model.test.ts:12 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/program-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] __tests__/ui-program-model.test.ts:13— __tests__/ui-program-model.test.ts:13 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/steps-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] __tests__/ui-program-model.test.ts:14— __tests__/ui-program-model.test.ts:14 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/screens-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] __tests__/ui-screens-model.test.ts:22— __tests__/ui-screens-model.test.ts:22 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/screens-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] __tests__/ui-screens-model.test.ts:45— __tests__/ui-screens-model.test.ts:45 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/map-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] __tests__/ui-search-model.test.ts:14— __tests__/ui-search-model.test.ts:14 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/search-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] __tests__/ui-search-model.test.ts:24— __tests__/ui-search-model.test.ts:24 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/trail-codec) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:test-cross-package-internals] __tests__/ui-steps-model.test.ts:7— __tests__/ui-steps-model.test.ts:7 reaches past another workspace package's public entry into its internals with a relative path (../ui/src/lib/steps-model) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Repeated repair: src/resolution/types.ts src/resolution/types.ts:531— src/resolution/types.ts changed 28 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 3 (its worst body is types.isSupertypeTarget at line 531), 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(java): a record is indexed as a class, with its components' fields and accessors”; “fix(nuxt): navigateTo('/x') links to the page it opens, as router.push does (#2826)”; “fix(js,ts): a super.method() call links to the method of the class's parent (#2818)”; “fix(pascal): Delphi calls written without parentheses link to the routine (#2797)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/resolution/types.ts`: 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: src/extraction/tree-sitter-types.ts src/extraction/tree-sitter-types.ts:82— src/extraction/tree-sitter-types.ts changed 20 times in last 90 days and 19 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 1 (its worst body is (anonymous) at line 82), 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(ts): a re-export's import node keeps export type * as the file writes it (#2844)”; “fix(extraction): drop the extractVariables hook, which the core never called (#2809)”; “fix(pascal): Delphi routines with a parameter attribute like `const [ref]` are indexed (#2778)”; “fix(extraction): a function in an initializer is referenced once, by what the initializer declares (#2743)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/extraction/tree-sitter-types.ts`: 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: src/mcp/engine.ts src/mcp/engine.ts:235— src/mcp/engine.ts changed 14 times in last 90 days and 14 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 MCPEngine.retryInitializeSync at line 235), 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(db): a database SQLite can't open is reported as that, not as a Node version problem (#2796)”; “fix(db): reopening an interrupted index no longer gets the server killed at every start (#2794)”; “fix(windows): helper threads never end mid-start or with GC marking in flight (#2309)”; “fix(windows): the query pool never terminates a worker still starting up (#2307)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/mcp/engine.ts`: 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: src/extraction/languages/typescript.ts src/extraction/languages/typescript.ts:29— src/extraction/languages/typescript.ts changed 10 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 13 (its worst body is typescript.classifyTsClassMember at line 29), 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(ts): a re-export's import node keeps export type * as the file writes it (#2844)”; “fix(ts): a type-only re-export like export type * from './types' now parses (#2837)”; “fix(js,ts): a named class expression is a class with its own members (#2825)”; “fix(js,ts): static and instance methods override only their own kind (#2813)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/extraction/languages/typescript.ts`: 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: src/extraction/languages/go.ts src/extraction/languages/go.ts:13— src/extraction/languages/go.ts changed 9 times in last 90 days and 9 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 go.extractGoReturnType at line 13), 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(go): an interface or struct embedding a standard-library type counts its methods (#2759)”; “fix(go): a comment directive like //go:embed is not part of a declaration's doc (#2679)”; “fix(go): a comment a blank line separates from a declaration is not its doc (#2678)”; “fix(go): an interface's methods link the types their signatures name (#2659)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/extraction/languages/go.ts`: 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: src/db/index.ts src/db/index.ts:812— src/db/index.ts changed 9 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is DatabaseConnection.checkpointWal at line 812), 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(db): a database SQLite can't open is reported as that, not as a Node version problem (#2796)”; “fix(db): reopening an interrupted index no longer gets the server killed at every start (#2794)”; “fix(mcp): stop pending connections and serve read-only fallbacks (#1963) (#2042)”; “fix(sync): refresh synthesized edges after incremental changes (#1988) (#2033)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/db/index.ts`: 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: src/db/migrations.ts src/db/migrations.ts:346— src/db/migrations.ts changed 8 times in last 90 days and 7 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 migrations.runMigrations at line 346), 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(sync): a member reference through an import binding links its module when the module changes (#2630)”; “fix(sync): a reference through an import binding links its module when the module appears later (#2450)”; “fix(sync): a route links the module it lazily loads when the module appears later (#2422)”; “fix(sync): a Liquid section or snippet reference links its file when the file appears later (#2403)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/db/migrations.ts`: 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: __tests__/fixtures/kernel-parity/torture.tsx __tests__/fixtures/kernel-parity/torture.tsx:158— __tests__/fixtures/kernel-parity/torture.tsx changed 7 times in last 90 days and 7 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 calleeShapes at line 158), 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(js,ts): a call or new in a parameter's default value is the function's call (#2802)”; “fix(extraction): a function in an initializer is referenced once, by what the initializer declares (#2743)”; “fix(js,ts): a callee that names nothing records no reference, and a wrapped callee is the plain call (#2742)”; “fix(react): a wrapper component renders the component it wraps, and owns the calls in its styles (#2738)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- __tests__/fixtures/kernel-parity/torture.tsx`: 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: src/db/reference-tail.ts src/db/reference-tail.ts:40— src/db/reference-tail.ts changed 7 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is reference-tail.referenceNameTail at line 40), 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(sync): a name imported through a barrel links when an edit gives the barrel its re-export (#2744)”; “fix(sync): a member reference through an import binding links its module when the module changes (#2630)”; “fix(sync): a Python import of a name a package re-exports links when the package appears later (#2507)”; “fix(sync): a Python import alias links its module when the module appears later (#2501)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/db/reference-tail.ts`: 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: src/resolution/frameworks/vue.ts src/resolution/frameworks/vue.ts:342— src/resolution/frameworks/vue.ts changed 6 times in last 90 days and 6 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 vue.resolveComponent at line 342), 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(nuxt): navigateTo('/x') links to the page it opens, as router.push does (#2826)”; “fix(vue): an import through `@/` or `~/` in a Vue project links the module's file (#2633)”; “fix(vue,ts): link calls in Vue templates and in top-level destructuring (#2340) (#2357)”; “fix(nuxt, astro): a file-routed page is bound to its component (#2267)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/resolution/frameworks/vue.ts`: 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: src/extraction/languages/objc.ts src/extraction/languages/objc.ts:69— src/extraction/languages/objc.ts 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 9 (its worst body is objc.extractObjcReturnType at line 69), 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(objc): a file-scope constant or global is indexed, in an @implementation too (#2699)”; “fix(objc,c,cpp): an enum declared with NS_ENUM, NS_OPTIONS or CF_ENUM is indexed (#2694)”; “fix(objc): a macro alone on its line no longer hides the declaration below it (#2691)”; “fix(objc): a struct, union or enum defined in a variable declaration is indexed (#2690)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/extraction/languages/objc.ts`: 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: src/resolution/frameworks/react-router.ts src/resolution/frameworks/react-router.ts:114— src/resolution/frameworks/react-router.ts changed 5 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 13 (its worst body is react-router.reactRouterTable at line 114), 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(sync): a navigation call links its route when the route appears later (#2425)”; “fix(react-router): a JSX index route is the page at its parent's address, inside the layout around it (#2423)”; “fix(react-router): read route tables another file hands the router (#2400)”; “fix(react-router): read links through a route-config object's getHref (#2187)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/resolution/frameworks/react-router.ts`: 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: src/extraction/languages/rust.ts src/extraction/languages/rust.ts:14— src/extraction/languages/rust.ts changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is rust.extractRustReturnType at line 14), 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(rust): an impl's associated type or const no longer takes a bare name or a module path (#2707)”; “fix(rust): index unit structs — bodiless is a definition, not a forward decl (#1800)”; “fix(rust): qualify generic/lifetime impl methods by the implementing type, not the trait (#1588) (#1596)”; “fix(c,cpp,objc,rust): index union declarations”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/extraction/languages/rust.ts`: 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: src/utils.ts src/utils.ts:129— src/utils.ts 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 13 (its worst body is utils.validatePathWithinRoot at line 129), 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(viewer): saved trails stay inside the project when a folder or trail file is a link”; “fix(cpp): code that calls operator++ by its name no longer stops an index or sync (#2769)”; “fix(sync): recover index freshness after lock contention (#1959) (#2043)”; “fix(resolution): keep the existence probe inside the project root (#1631)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/utils.ts`: 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: src/resolution/alias-binding.ts src/resolution/alias-binding.ts:76— src/resolution/alias-binding.ts 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 11 (its worst body is alias-binding.resolveAliasBinding at line 76), 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(js,ts): a named class expression is a class with its own members (#2825)”; “fix(sync): a lazy route relinks a page that appears below its barrel (#2560)”; “fix(js): resolve calls through CommonJS require bindings (#2189)”; “fix(resolution): resolve object-literal function references safely (#1932) (#2031)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/resolution/alias-binding.ts`: 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: REDACTED REDACTED:187— REDACTED 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 12 (its worst body is LiquidExtractor.findTagOccurrences at line 187), 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(liquid): variables declared with {% capture %} are indexed, as assigned ones are (#2814)”; “fix(liquid): editor-saved Shopify JSON and {% sections %} groups link their sections (#2812)”; “fix(extraction): preserve symbols with colliding same-line IDs (#1349) (#2030)”; “fix(liquid): extract statements inside liquid blocks (#1906) (#2008)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/resolution/frameworks/rust.ts src/resolution/frameworks/rust.ts:340— src/resolution/frameworks/rust.ts 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 rust.resolveModule at line 340), 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(axum,actix): link a route to a handler written below its call (#2326) (#2359)”; “fix(frameworks): name heuristics pick only what the reference can see, own scope first (#2225)”; “fix(rust): framework name heuristics never reach a function-local item (#2224)”; “fix(rust): a bare name is in scope only through its module or a use (#2214)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/resolution/frameworks/rust.ts`: 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: src/ui-server/api/routes.ts src/ui-server/api/routes.ts:111— src/ui-server/api/routes.ts changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is routes.oneRowPerRoute at line 111), 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(viewer): the routes list's limit counts routes, not one route's calls”; “fix(viewer): pages that went blank — repeated ids, and Steps on a function full of checks (#2264)”; “fix(ui): link every route to its handler, however many files they span (#1975) (#1993)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/ui-server/api/routes.ts`: 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: src/installer/targets/codex.ts src/installer/targets/codex.ts:184— src/installer/targets/codex.ts changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is codex.writeMcpEntry at line 184), 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(installer): the Codex table is found however its config.toml writes it (#2771)”; “fix(installer): a symlinked instructions or config file is written through, not replaced (#2768)”; “fix(installer): honor CLAUDE_CONFIG_DIR and CODEX_HOME (#1627) (#1783)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/installer/targets/codex.ts`: 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: src/resolution/frameworks/svelte.ts src/resolution/frameworks/svelte.ts:195— src/resolution/frameworks/svelte.ts 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 5 (its worst body is svelte.isRuneReference at line 195), 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(frameworks): a framework resolves only references written in its own languages (#2415)”; “fix(js,ts): index the functions in every named object literal, not only exported ones (#2300) (#2363)”; “fix(sveltekit): route names drop (group) folders and parameter matchers (#2131)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/resolution/frameworks/svelte.ts`: 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: src/extraction/languages/javascript.ts src/extraction/languages/javascript.ts:33— src/extraction/languages/javascript.ts 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 12 (its worst body is resolveBody at line 33), 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(js,ts): a named class expression is a class with its own members (#2825)”; “fix(js,ts): static and instance methods override only their own kind (#2813)”; “fix(extraction): index TS/JS generator function declarations and expressions (#1741) (#1743)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/extraction/languages/javascript.ts`: 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: src/mcp/liveness-watchdog.ts src/mcp/liveness-watchdog.ts:218— src/mcp/liveness-watchdog.ts changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is liveness-watchdog.addWatchdogProgressPaths at line 218), 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(daemon): a long sync of another project no longer gets the shared daemon killed (#2793)”; “fix(mcp): cap watchdog and startup-handshake timeouts at the largest timer delay (#1966) (#2039)”; “fix(db): stop watchdog-killed sessions from leaking the SQLite WAL without bound (#1431) (#1490)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/mcp/liveness-watchdog.ts`: 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: src/installer/targets/shared.ts src/installer/targets/shared.ts:222— src/installer/targets/shared.ts 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 12 (its worst body is shared.jsonDeepEqual at line 222), 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(installer): a symlinked instructions or config file is written through, not replaced (#2768)”; “fix(installer): upgrade keeps everything around CodeGraph's section in instructions files (#2765)”; “fix(installer): keep --refresh off the configs of unconfigured agents (#1870) (#1873)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/installer/targets/shared.ts`: 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: src/resolution/frameworks/go.ts src/resolution/frameworks/go.ts:175— src/resolution/frameworks/go.ts 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 4 (its worst body is go.matchGo122MethodPattern at line 175), 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(go): a type written bare links its own package's, not a namesake struct elsewhere (#2408)”; “fix(go): an interface links the interfaces it embeds (#2397)”; “fix(frameworks): name heuristics pick only what the reference can see, own scope first (#2225)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/resolution/frameworks/go.ts`: 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: src/mcp/query-pool.ts src/mcp/query-pool.ts:290— src/mcp/query-pool.ts 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 12 (its worst body is QueryPool.drain at line 290), 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(windows): the query pool never terminates a worker still starting up (#2307)”; “fix(mcp): retire failed-startup query workers (#1357) (#2041)”; “fix(mcp): enable query workers in direct mode (#1465) (#2022)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 02:16:17 +00:00' --until='2026-10-24 02:16:17 +00:00' --full-history --no-merges -- src/mcp/query-pool.ts`: 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.
codegraph_kernel::ccpp::brace_scopes::scan (cognitive 131) codegraph-kernel/src/ccpp/brace_scopes.rs:251— codegraph_kernel::ccpp::brace_scopes::scan has cognitive complexity 131 (threshold 15). Drivers by points: if/else 37 (95 pts), boolean chains 16, loops 5 (11 pts), match/switch 3 (9 pts) (nesting depth added 70). 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.
codegraph_kernel::go::go_local_bindings (cognitive 65) codegraph-kernel/src/go.rs:1545— codegraph_kernel::go::go_local_bindings has cognitive complexity 65 (threshold 15). Drivers by points: if/else 11 (38 pts), loops 8 (23 pts), match/switch 1 (3 pts), boolean chains 1 (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.
codegraph_kernel::cfnptr::init_body (cognitive 48) codegraph-kernel/src/cfnptr.rs:579— codegraph_kernel::cfnptr::init_body has cognitive complexity 48 (threshold 15). Drivers by points: if/else 12 (36 pts), loops 3 (6 pts), match/switch 1 (5 pts), boolean chains 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
codegraph_kernel::cfnptr::strip_c (cognitive 42) codegraph-kernel/src/cfnptr.rs:210— codegraph_kernel::cfnptr::strip_c has cognitive complexity 42 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 4 (10 pts), boolean chains 9 (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.
codegraph_kernel::cfnptr::scan_file (cognitive 36) codegraph-kernel/src/cfnptr.rs:1171— codegraph_kernel::cfnptr::scan_file has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (32 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 20). 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.
codegraph_kernel::cfnptr::array_table_body (cognitive 31) codegraph-kernel/src/cfnptr.rs:638— codegraph_kernel::cfnptr::array_table_body has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (28 pts), loops 2 (3 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.
codegraph_kernel::cfnptr::scan_fntype_typedefs (cognitive 30) codegraph-kernel/src/cfnptr.rs:386— codegraph_kernel::cfnptr::scan_fntype_typedefs has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 3 (6 pts), boolean chains 4 (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.
codegraph_kernel::cfnptr::alias_line (cognitive 30) codegraph-kernel/src/cfnptr.rs:723— codegraph_kernel::cfnptr::alias_line has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 7, 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.
codegraph_kernel::docstring::preceding_docstring_with (cognitive 29) codegraph-kernel/src/docstring.rs:165— codegraph_kernel::docstring::preceding_docstring_with has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 4 (7 pts), boolean chains 3 (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.
codegraph_kernel::rustlang::receiver_chain (cognitive 26) codegraph-kernel/src/rustlang.rs:1663— codegraph_kernel::rustlang::receiver_chain has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 4, loops 2 (4 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.
codegraph_kernel::tsjs::classify_ts_class_member (cognitive 26) codegraph-kernel/src/tsjs/mod.rs:1105— codegraph_kernel::tsjs::classify_ts_class_member has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 2 (5 pts) (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
codegraph_kernel::tsjs::fnref::capture (cognitive 26) codegraph-kernel/src/tsjs/fnref.rs:52— codegraph_kernel::tsjs::fnref::capture has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 3 (5 pts), boolean chains 2, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
codegraph_kernel::cfnptr::parse_struct_fields_raw (cognitive 25) codegraph-kernel/src/cfnptr.rs:1081— codegraph_kernel::cfnptr::parse_struct_fields_raw has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3 (7 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
codegraph_kernel::tsjs::resolve_field_body (cognitive 24) codegraph-kernel/src/tsjs/mod.rs:1131— codegraph_kernel::tsjs::resolve_field_body has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 2 (5 pts) (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
codegraph_kernel::cfnptr::scan_inline_structs (cognitive 23) codegraph-kernel/src/cfnptr.rs:432— codegraph_kernel::cfnptr::scan_inline_structs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (3 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
codegraph_kernel::python::body_docstring (cognitive 22) codegraph-kernel/src/python.rs:26— codegraph_kernel::python::body_docstring has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (17 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
codegraph_kernel::php::extract (cognitive 21) codegraph-kernel/src/php.rs:157— codegraph_kernel::php::extract has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 1 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
codegraph_kernel::tsjs::is_ambient_export (cognitive 21) codegraph-kernel/src/tsjs/mod.rs:1163— codegraph_kernel::tsjs::is_ambient_export has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 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.
codegraph_kernel::rustlang::strip_turbofish (cognitive 19) codegraph-kernel/src/rustlang.rs:1708— codegraph_kernel::rustlang::strip_turbofish has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 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.
codegraph_kernel::cfnptr::scan_dispatch (cognitive 18) codegraph-kernel/src/cfnptr.rs:850— codegraph_kernel::cfnptr::scan_dispatch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 3 (5 pts), match/switch 2 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
codegraph_kernel::cfnptr::scan_array_dispatch (cognitive 18) codegraph-kernel/src/cfnptr.rs:919— codegraph_kernel::cfnptr::scan_array_dispatch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
codegraph_kernel::go::go_scoped_fn_ref_scopes (cognitive 18) codegraph-kernel/src/go.rs:1612— codegraph_kernel::go::go_scoped_fn_ref_scopes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 4 (5 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.
codegraph_kernel::ccpp::brace_scopes::namespace_head (cognitive 16) codegraph-kernel/src/ccpp/brace_scopes.rs:200— codegraph_kernel::ccpp::brace_scopes::namespace_head has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 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.
codegraph_kernel::cfnptr::scan_fnptr_typedefs (cognitive 16) codegraph-kernel/src/cfnptr.rs:353— codegraph_kernel::cfnptr::scan_fnptr_typedefs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 2 (3 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
codegraph_kernel::cfnptr::scan_includes (cognitive 16) codegraph-kernel/src/cfnptr.rs:956— codegraph_kernel::cfnptr::scan_includes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 4, loops 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.
FunctionTooLong: steps-model.packRegions ui/src/lib/steps-model.ts:710— FunctionTooLong — packRegions runs 261 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 161 over it, 2.61× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: proxy.runLocalHandshakeProxy src/mcp/proxy.ts:260— FunctionTooLong — runLocalHandshakeProxy runs 210 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 110 over it, 2.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: render-check.main telemetry-dashboard/scripts/render-check.mjs:231— FunctionTooLong — main runs 202 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 102 over it, 2.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: flow-model.buildFlowLayout ui/src/lib/flow-model.ts:343— FunctionTooLong — buildFlowLayout runs 192 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 92 over it, 1.92× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: map-model.buildMapLayout ui/src/lib/map-model.ts:301— FunctionTooLong — buildMapLayout runs 183 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 83 over it, 1.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: dead-code.buildDeadCodeReport src/graph/dead-code.ts:458— FunctionTooLong — buildDeadCodeReport runs 168 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 68 over it, 1.68× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: angular-template-synthesizer.angularTemplateEdges src/resolution/angular-template-synthesizer.ts:632— FunctionTooLong — angularTemplateEdges runs 157 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 57 over it, 1.57× 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: rust-scopes.readRustBindings src/resolution/rust-scopes.ts:506— FunctionTooLong — readRustBindings runs 155 significant lines (blank, comment-only and punctuation-only lines excluded) 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.
FunctionTooLong: vue-template-calls.scanExpression src/extraction/vue-template-calls.ts:291— FunctionTooLong — scanExpression runs 150 significant lines (blank, comment-only and punctuation-only lines excluded) 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.
FunctionTooLong: map.buildMap src/ui-server/api/map.ts:582— FunctionTooLong — buildMap runs 144 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 44 over it, 1.44× 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: screens.buildScreens src/ui-server/api/screens.ts:225— FunctionTooLong — buildScreens runs 139 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 39 over it, 1.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: index.runInstallerWithOptions src/installer/index.ts:86— FunctionTooLong — runInstallerWithOptions runs 127 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 27 over it, 1.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: export-svg.flowCardSvg ui/src/lib/export-svg.ts:357— FunctionTooLong — flowCardSvg runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 24 over it, 1.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: function-ref.normalizeSpecial src/extraction/function-ref.ts:638— FunctionTooLong — normalizeSpecial runs 123 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 23 over it, 1.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: ambient-modules.scanAmbientModules src/resolution/ambient-modules.ts:76— FunctionTooLong — scanAmbientModules runs 115 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 15 over it, 1.15× 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: adapter.createHttpAdapter ui/src/lib/adapter.ts:307— FunctionTooLong — createHttpAdapter runs 108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 8 over it, 1.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: flow.buildFlow src/ui-server/api/flow.ts:669— FunctionTooLong — buildFlow runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: steps-model.buildStepsModel ui/src/lib/steps-model.ts:389— FunctionTooLong — buildStepsModel runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
TooManyMethods: QueryBuilder src/db/queries.ts:297— TooManyMethods — 181 methods. The bar is 30 methods; this is 151 over it, 6.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: TreeSitterExtractor src/extraction/tree-sitter.ts:782— TooManyMethods — 146 methods. The bar is 30 methods; this is 116 over it, 4.87× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: CodeGraph src/index.ts:157— TooManyMethods — 121 methods. The bar is 30 methods; this is 91 over it, 4.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ReferenceResolver REDACTED:253— TooManyMethods — 92 methods. The bar is 30 methods; this is 62 over it, 3.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Walker codegraph-kernel/src/tsjs/mod.rs:190— TooManyMethods — 91 methods, declared across 2 files: tsjs/extractors.rs (63), tsjs/mod.rs (28). The bar is 30 methods; this is 61 over it, 3.03× 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: ToolHandler REDACTED:2010— TooManyMethods — 76 methods. The bar is 30 methods; this is 46 over it, 2.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Walker codegraph-kernel/src/ccpp/mod.rs:356— TooManyMethods — 59 methods. The bar is 30 methods; this is 29 over it, 1.97× 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: Walker codegraph-kernel/src/dart.rs:209— TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× 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: Walker codegraph-kernel/src/java.rs:126— TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× 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: Walker codegraph-kernel/src/csharp.rs:128— TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Walker codegraph-kernel/src/kotlin.rs:189— TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Walker codegraph-kernel/src/swift.rs:219— TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DatabaseConnection src/db/index.ts:91— TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Walker codegraph-kernel/src/go.rs:89— TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Walker codegraph-kernel/src/php.rs:140— TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Walker codegraph-kernel/src/rustlang.rs:118— TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Walker codegraph-kernel/src/scala.rs:153— TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Walker codegraph-kernel/src/dart.rs:209— ClassTooLong — 1191 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 57 methods, 2 blocks, lines 209-2177. The bar is 400 significant lines; this is 791 over it, 2.98× 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: ExtractionOrchestrator src/extraction/index.ts:1977— ClassTooLong — 1048 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 648 over it, 2.62× 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: CodeGraph src/index.ts:157— ClassTooLong — 1025 significant lines (blank, comment-only and punctuation-only lines excluded), 121 methods. The bar is 400 significant lines; this is 625 over it, 2.56× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Walker codegraph-kernel/src/java.rs:126— ClassTooLong — 1001 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 48 methods, 2 blocks, lines 126-1681. The bar is 400 significant lines; this is 601 over it, 2.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: Walker codegraph-kernel/src/csharp.rs:128— ClassTooLong — 920 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 46 methods, 2 blocks, lines 128-1700. The bar is 400 significant lines; this is 520 over it, 2.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Walker codegraph-kernel/src/rustlang.rs:118— ClassTooLong — 909 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 39 methods, 2 blocks, lines 118-1626. The bar is 400 significant lines; this is 509 over it, 2.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Walker codegraph-kernel/src/swift.rs:219— ClassTooLong — 899 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 43 methods, 2 blocks, lines 219-1683. The bar is 400 significant lines; this is 499 over it, 2.25× 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: Walker codegraph-kernel/src/go.rs:89— ClassTooLong — 848 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 41 methods, 2 blocks, lines 89-1439. The bar is 400 significant lines; this is 448 over it, 2.12× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ContextBuilder src/context/index.ts:212— ClassTooLong — 722 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. The bar is 400 significant lines; this is 322 over it, 1.81× 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: Walker codegraph-kernel/src/python.rs:140— ClassTooLong — 611 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 28 methods, 2 blocks, lines 140-1132. The bar is 400 significant lines; this is 211 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Walker codegraph-kernel/src/ruby.rs:119— ClassTooLong — 592 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 29 methods, 2 blocks, lines 119-1135. The bar is 400 significant lines; this is 192 over it, 1.48× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Walker codegraph-kernel/src/lua.rs:72— ClassTooLong — 528 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 29 methods, 2 blocks, lines 72-968. The bar is 400 significant lines; this is 128 over it, 1.32× 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: Walker codegraph-kernel/src/tsjs/mod.rs:190— ClassTooLong — 476 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 91 methods, 2 blocks, lines 190-1095. The bar is 400 significant lines; this is 76 over it, 1.19× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: CfmlExtractor src/extraction/cfml-extractor.ts:71— ClassTooLong — 417 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 17 over it, 1.04× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: FileWatcher src/sync/watcher.ts:267— ClassTooLong — 408 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 8 over it, 1.02× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Duplicated block (7 lines × 2) codegraph-kernel/src/dart.rs:707— codegraph-kernel/src/dart.rs:707-713 | codegraph-kernel/src/dart.rs:727-733 — both copies are in the same file, so extract the block into 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) codegraph-kernel/src/dart.rs:992— codegraph-kernel/src/dart.rs:992-999 | codegraph-kernel/src/scala.rs:770-776 — before extracting anything, compare `codegraph-kernel/src/dart.rs` and `codegraph-kernel/src/scala.rs` as WHOLE FILES: this scan already matched 58 separate duplicated blocks between them, totalling at least 734 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) codegraph-kernel/src/kotlin.rs:966— codegraph-kernel/src/kotlin.rs:966-972 | codegraph-kernel/src/kotlin.rs:991-997 — both copies are in the same file, so extract the block into 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) codegraph-kernel/src/php.rs:688— codegraph-kernel/src/php.rs:688-694 | codegraph-kernel/src/php.rs:708-714 — both copies are in the same file, so extract the block into 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) codegraph-kernel/src/python.rs:538— codegraph-kernel/src/python.rs:538-544 | codegraph-kernel/src/ruby.rs:662-670 — before extracting anything, compare `codegraph-kernel/src/python.rs` and `codegraph-kernel/src/ruby.rs` as WHOLE FILES: this scan already matched 43 separate duplicated blocks between them, totalling at least 523 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) codegraph-kernel/src/tsjs/extractors.rs:1114— codegraph-kernel/src/tsjs/extractors.rs:1114-1120 | codegraph-kernel/src/tsjs/extractors.rs:1261-1267 — both copies are in the same file, so extract the block into 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) codegraph-kernel/src/csharp.rs:1034— codegraph-kernel/src/csharp.rs:1034-1044 | codegraph-kernel/src/csharp.rs:1066-1072 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) codegraph-kernel/src/dart.rs:2102— codegraph-kernel/src/dart.rs:2102-2108 | codegraph-kernel/src/kotlin.rs:1700-1707 — before extracting anything, compare `codegraph-kernel/src/dart.rs` and `codegraph-kernel/src/kotlin.rs` as WHOLE FILES: this scan already matched 27 separate duplicated blocks between them, totalling at least 343 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) codegraph-kernel/src/tsjs/extractors.rs:449— codegraph-kernel/src/tsjs/extractors.rs:449-455 | codegraph-kernel/src/tsjs/extractors.rs:472-478 — both copies are in the same file, so extract the block into 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) codegraph-kernel/src/python.rs:734— codegraph-kernel/src/python.rs:734-740 | codegraph-kernel/src/tsjs/extractors.rs:1667-1673 — before extracting anything, compare `codegraph-kernel/src/python.rs` and `codegraph-kernel/src/tsjs/extractors.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 161 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) codegraph-kernel/src/csharp.rs:423— codegraph-kernel/src/csharp.rs:423-429 | codegraph-kernel/src/php.rs:429-435 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/php.rs` as WHOLE FILES: this scan already matched 64 separate duplicated blocks between them, totalling at least 732 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) codegraph-kernel/src/go.rs:863— codegraph-kernel/src/go.rs:863-869 | codegraph-kernel/src/rustlang.rs:941-947 — before extracting anything, compare `codegraph-kernel/src/go.rs` and `codegraph-kernel/src/rustlang.rs` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 618 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) codegraph-kernel/src/python.rs:507— codegraph-kernel/src/python.rs:507-513 | codegraph-kernel/src/python.rs:525-531 — both copies are in the same file, so extract the block into 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) codegraph-kernel/src/csharp.rs:1377— codegraph-kernel/src/csharp.rs:1377-1382 | codegraph-kernel/src/php.rs:1227-1231 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/php.rs` as WHOLE FILES: this scan already matched 64 separate duplicated blocks between them, totalling at least 732 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) codegraph-kernel/src/kotlin.rs:974— codegraph-kernel/src/kotlin.rs:974-979 | codegraph-kernel/src/python.rs:504-508 — before extracting anything, compare `codegraph-kernel/src/kotlin.rs` and `codegraph-kernel/src/python.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 466 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) codegraph-kernel/src/python.rs:788— codegraph-kernel/src/python.rs:788-792 | codegraph-kernel/src/tsjs/extractors.rs:1834-1838 — before extracting anything, compare `codegraph-kernel/src/python.rs` and `codegraph-kernel/src/tsjs/extractors.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 161 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 (5 lines × 2) codegraph-kernel/src/dart.rs:1652— codegraph-kernel/src/dart.rs:1652-1658 | codegraph-kernel/src/dart.rs:1684-1688 — both copies are in the same file, so extract the block into 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) codegraph-kernel/src/ccpp/mod.rs:1664— codegraph-kernel/src/ccpp/mod.rs:1664-1668 | codegraph-kernel/src/tsjs/extractors.rs:1068-1073 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/tsjs/extractors.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 69 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 (5 lines × 2) codegraph-kernel/src/php.rs:1180— codegraph-kernel/src/php.rs:1180-1184 | codegraph-kernel/src/ruby.rs:672-677 — before extracting anything, compare `codegraph-kernel/src/php.rs` and `codegraph-kernel/src/ruby.rs` as WHOLE FILES: this scan already matched 40 separate duplicated blocks between them, totalling at least 475 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) codegraph-kernel/src/kotlin.rs:659— codegraph-kernel/src/kotlin.rs:659-663 | codegraph-kernel/src/kotlin.rs:664-668 — both copies are in the same file, so extract the block into 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) codegraph-kernel/src/java.rs:1031— codegraph-kernel/src/java.rs:1031-1035 | codegraph-kernel/src/tsjs/extractors.rs:1979-1983 — before extracting anything, compare `codegraph-kernel/src/java.rs` and `codegraph-kernel/src/tsjs/extractors.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 107 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 (5 lines × 2) codegraph-kernel/src/php.rs:490— codegraph-kernel/src/php.rs:490-494 | codegraph-kernel/src/php.rs:830-834 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) codegraph-kernel/src/go.rs:801— codegraph-kernel/src/go.rs:801-805 | codegraph-kernel/src/php.rs:1198-1202 — before extracting anything, compare `codegraph-kernel/src/go.rs` and `codegraph-kernel/src/php.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 363 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) codegraph-kernel/src/tsjs/extractors.rs:447— codegraph-kernel/src/tsjs/extractors.rs:447-451 | codegraph-kernel/src/tsjs/extractors.rs:1357-1361 — both copies are in the same file, so extract the block into 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) codegraph-kernel/src/java.rs:1037— codegraph-kernel/src/java.rs:1037-1041 | codegraph-kernel/src/java.rs:1050-1054 — both copies are in the same file, so extract the block into 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) codegraph-kernel/src/tsjs/mod.rs:1114— codegraph-kernel/src/tsjs/mod.rs:1114-1118 | codegraph-kernel/src/tsjs/mod.rs:1140-1144 — both copies are in the same file, so extract the block into 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) codegraph-kernel/src/csharp.rs:736— codegraph-kernel/src/csharp.rs:736-743 | codegraph-kernel/src/swift.rs:932-939 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/swift.rs` as WHOLE FILES: this scan already matched 74 separate duplicated blocks between them, totalling at least 828 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) codegraph-kernel/src/csharp.rs:747— codegraph-kernel/src/csharp.rs:747-754 | codegraph-kernel/src/swift.rs:941-948 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/swift.rs` as WHOLE FILES: this scan already matched 74 separate duplicated blocks between them, totalling at least 828 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) codegraph-kernel/src/dart.rs:1001— codegraph-kernel/src/dart.rs:1001-1008 | codegraph-kernel/src/scala.rs:781-788 — before extracting anything, compare `codegraph-kernel/src/dart.rs` and `codegraph-kernel/src/scala.rs` as WHOLE FILES: this scan already matched 58 separate duplicated blocks between them, totalling at least 734 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) codegraph-kernel/src/java.rs:628— codegraph-kernel/src/java.rs:628-635 | codegraph-kernel/src/java.rs:656-663 — both copies are in the same file, so extract the block into 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) codegraph-kernel/src/java.rs:730— codegraph-kernel/src/java.rs:730-737 | codegraph-kernel/src/kotlin.rs:1131-1138 — before extracting anything, compare `codegraph-kernel/src/java.rs` and `codegraph-kernel/src/kotlin.rs` as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 614 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) codegraph-kernel/src/php.rs:727— codegraph-kernel/src/php.rs:727-734 | codegraph-kernel/src/rustlang.rs:655-662 — before extracting anything, compare `codegraph-kernel/src/php.rs` and `codegraph-kernel/src/rustlang.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 402 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) codegraph-kernel/src/python.rs:389— codegraph-kernel/src/python.rs:389-396 | codegraph-kernel/src/rustlang.rs:374-381 — before extracting anything, compare `codegraph-kernel/src/python.rs` and `codegraph-kernel/src/rustlang.rs` as WHOLE FILES: this scan already matched 40 separate duplicated blocks between them, totalling at least 454 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) codegraph-kernel/src/csharp.rs:597— codegraph-kernel/src/csharp.rs:597-608 | codegraph-kernel/src/java.rs:513-520 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/java.rs` as WHOLE FILES: this scan already matched 62 separate duplicated blocks between them, totalling at least 770 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) codegraph-kernel/src/lua.rs:480— codegraph-kernel/src/lua.rs:480-489 | codegraph-kernel/src/rlang.rs:309-316 — before extracting anything, compare `codegraph-kernel/src/lua.rs` and `codegraph-kernel/src/rlang.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 134 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) codegraph-kernel/src/lua.rs:518— codegraph-kernel/src/lua.rs:518-525 | codegraph-kernel/src/lua.rs:547-555 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) codegraph-kernel/src/php.rs:696— codegraph-kernel/src/php.rs:696-703 | codegraph-kernel/src/php.rs:716-723 — both copies are in the same file, so extract the block into 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) codegraph-kernel/src/dart.rs:1252— codegraph-kernel/src/dart.rs:1252-1259 | codegraph-kernel/src/dart.rs:1267-1274 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Low cohesion: AntigravityTarget (LCOM4 5) src/installer/targets/antigravity.ts:161— AntigravityTarget'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: CopilotCliTarget (LCOM4 5) src/installer/targets/copilot-cli.ts:110— CopilotCliTarget'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: CopilotJetbrainsTarget (LCOM4 5) src/installer/targets/copilot-jetbrains.ts:125— CopilotJetbrainsTarget'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: ClaudeCodeTarget (LCOM4 4) src/installer/targets/claude.ts:103— ClaudeCodeTarget's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CursorTarget (LCOM4 4) src/installer/targets/cursor.ts:85— CursorTarget's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CodexTarget (LCOM4 4) src/installer/targets/codex.ts:91— CodexTarget's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: OpencodeTarget (LCOM4 4) src/installer/targets/opencode.ts:152— OpencodeTarget's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: HermesTarget (LCOM4 4) src/installer/targets/hermes.ts:41— HermesTarget's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: GeminiTarget (LCOM4 4) src/installer/targets/gemini.ts:65— GeminiTarget's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: KiroTarget (LCOM4 4) src/installer/targets/kiro.ts:55— KiroTarget'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.
Duplicated block (6 lines × 2) codegraph-kernel/src/ccpp/mod.rs:1374— codegraph-kernel/src/ccpp/mod.rs:1374-1379 | codegraph-kernel/src/ccpp/mod.rs:1400-1405 — both copies are in the same file, so extract the block into 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) codegraph-kernel/src/csharp.rs:344— codegraph-kernel/src/csharp.rs:344-349 | codegraph-kernel/src/rustlang.rs:288-293 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/rustlang.rs` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 499 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) codegraph-kernel/src/csharp.rs:819— codegraph-kernel/src/csharp.rs:819-824 | codegraph-kernel/src/tsjs/extractors.rs:520-525 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/tsjs/extractors.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) codegraph-kernel/src/python.rs:499— codegraph-kernel/src/python.rs:499-504 | codegraph-kernel/src/python.rs:518-523 — both copies are in the same file, so extract the block into 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) codegraph-kernel/src/ccpp/mod.rs:505— codegraph-kernel/src/ccpp/mod.rs:505-510 | codegraph-kernel/src/rustlang.rs:230-235 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/rustlang.rs` as WHOLE FILES: this scan already matched 41 separate duplicated blocks between them, totalling at least 493 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) codegraph-kernel/src/java.rs:271— codegraph-kernel/src/java.rs:271-276 | codegraph-kernel/src/kotlin.rs:330-335 — before extracting anything, compare `codegraph-kernel/src/java.rs` and `codegraph-kernel/src/kotlin.rs` as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 614 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) codegraph-kernel/src/ruby.rs:630— codegraph-kernel/src/ruby.rs:630-636 | codegraph-kernel/src/ruby.rs:648-653 — both copies are in the same file, so extract the block into 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) codegraph-kernel/src/ccpp/mod.rs:2135— codegraph-kernel/src/ccpp/mod.rs:2135-2140 | codegraph-kernel/src/rustlang.rs:1125-1130 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/rustlang.rs` as WHOLE FILES: this scan already matched 41 separate duplicated blocks between them, totalling at least 493 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) codegraph-kernel/src/ruby.rs:622— codegraph-kernel/src/ruby.rs:622-627 | codegraph-kernel/src/ruby.rs:641-646 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
codegraph_kernel::ccpp::brace_scopes::scan (cyclomatic 61) codegraph-kernel/src/ccpp/brace_scopes.rs:251— codegraph_kernel::ccpp::brace_scopes::scan has cyclomatic complexity 61 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
codegraph_kernel::go::go_local_bindings (cyclomatic 24) codegraph-kernel/src/go.rs:1545— codegraph_kernel::go::go_local_bindings 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.
codegraph_kernel::cfnptr::strip_c (cyclomatic 22) codegraph-kernel/src/cfnptr.rs:210— codegraph_kernel::cfnptr::strip_c 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.
codegraph_kernel::cfnptr::alias_line (cyclomatic 22) codegraph-kernel/src/cfnptr.rs:723— codegraph_kernel::cfnptr::alias_line 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.
codegraph_kernel::docstring::preceding_docstring_with (cyclomatic 17) codegraph-kernel/src/docstring.rs:165— codegraph_kernel::docstring::preceding_docstring_with 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.
codegraph_kernel::cfnptr::scan_inline_structs (cyclomatic 16) codegraph-kernel/src/cfnptr.rs:432— codegraph_kernel::cfnptr::scan_inline_structs 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.
codegraph_kernel::cfnptr::scan_file (cyclomatic 16) codegraph-kernel/src/cfnptr.rs:1171— codegraph_kernel::cfnptr::scan_file 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.
codegraph_kernel::tsjs::fnref::capture (cyclomatic 16) codegraph-kernel/src/tsjs/fnref.rs:52— codegraph_kernel::tsjs::fnref::capture 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.
Duplicated block (11 lines × 2) codegraph-kernel/src/ccpp/mod.rs:1270— codegraph-kernel/src/ccpp/mod.rs:1270-1280 | codegraph-kernel/src/ccpp/mod.rs:1307-1317 — both copies are in the same file, so extract the block into 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) codegraph-kernel/src/dart.rs:865— codegraph-kernel/src/dart.rs:865-875 | codegraph-kernel/src/scala.rs:590-600 — before extracting anything, compare `codegraph-kernel/src/dart.rs` and `codegraph-kernel/src/scala.rs` as WHOLE FILES: this scan already matched 58 separate duplicated blocks between them, totalling at least 734 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) codegraph-kernel/src/dart.rs:1299— codegraph-kernel/src/dart.rs:1299-1309 | codegraph-kernel/src/dart.rs:1467-1477 — both copies are in the same file, so extract the block into 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) codegraph-kernel/src/java.rs:634— codegraph-kernel/src/java.rs:634-644 | codegraph-kernel/src/swift.rs:893-903 — before extracting anything, compare `codegraph-kernel/src/java.rs` and `codegraph-kernel/src/swift.rs` as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 679 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) codegraph-kernel/src/java.rs:662— codegraph-kernel/src/java.rs:662-672 | codegraph-kernel/src/swift.rs:871-881 — before extracting anything, compare `codegraph-kernel/src/java.rs` and `codegraph-kernel/src/swift.rs` as WHOLE FILES: this scan already matched 59 separate duplicated blocks between them, totalling at least 679 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) codegraph-kernel/src/lua.rs:501— codegraph-kernel/src/lua.rs:501-511 | codegraph-kernel/src/scala.rs:722-732 — before extracting anything, compare `codegraph-kernel/src/lua.rs` and `codegraph-kernel/src/scala.rs` as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) codegraph-kernel/src/rustlang.rs:1418— codegraph-kernel/src/rustlang.rs:1418-1428 | codegraph-kernel/src/scala.rs:1277-1287 — before extracting anything, compare `codegraph-kernel/src/rustlang.rs` and `codegraph-kernel/src/scala.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 364 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) codegraph-kernel/src/tsjs/extractors.rs:1266— codegraph-kernel/src/tsjs/extractors.rs:1266-1276 | codegraph-kernel/src/tsjs/extractors.rs:1286-1296 — both copies are in the same file, so extract the block into 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) codegraph-kernel/src/ccpp/mod.rs:1387— codegraph-kernel/src/ccpp/mod.rs:1387-1396 | codegraph-kernel/src/ccpp/mod.rs:1413-1422 — both copies are in the same file, so extract the block into 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) codegraph-kernel/src/ccpp/mod.rs:1503— codegraph-kernel/src/ccpp/mod.rs:1503-1512 | codegraph-kernel/src/go.rs:602-611 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/go.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 451 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) codegraph-kernel/src/csharp.rs:1339— codegraph-kernel/src/csharp.rs:1339-1348 | codegraph-kernel/src/csharp.rs:1358-1367 — both copies are in the same file, so extract the block into 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) codegraph-kernel/src/go.rs:261— codegraph-kernel/src/go.rs:261-270 | codegraph-kernel/src/python.rs:313-322 — before extracting anything, compare `codegraph-kernel/src/go.rs` and `codegraph-kernel/src/python.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 431 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) codegraph-kernel/src/java.rs:1070— codegraph-kernel/src/java.rs:1070-1079 | codegraph-kernel/src/tsjs/extractors.rs:2033-2042 — before extracting anything, compare `codegraph-kernel/src/java.rs` and `codegraph-kernel/src/tsjs/extractors.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 107 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) codegraph-kernel/src/kotlin.rs:526— codegraph-kernel/src/kotlin.rs:526-535 | codegraph-kernel/src/swift.rs:535-544 — before extracting anything, compare `codegraph-kernel/src/kotlin.rs` and `codegraph-kernel/src/swift.rs` as WHOLE FILES: this scan already matched 70 separate duplicated blocks between them, totalling at least 886 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) codegraph-kernel/src/kotlin.rs:1257— codegraph-kernel/src/kotlin.rs:1257-1266 | codegraph-kernel/src/swift.rs:1135-1144 — before extracting anything, compare `codegraph-kernel/src/kotlin.rs` and `codegraph-kernel/src/swift.rs` as WHOLE FILES: this scan already matched 70 separate duplicated blocks between them, totalling at least 886 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) codegraph-kernel/src/go.rs:432— codegraph-kernel/src/go.rs:432-441 | codegraph-kernel/src/rustlang.rs:501-514 — before extracting anything, compare `codegraph-kernel/src/go.rs` and `codegraph-kernel/src/rustlang.rs` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 618 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) codegraph-kernel/src/csharp.rs:854— codegraph-kernel/src/csharp.rs:854-865 | codegraph-kernel/src/tsjs/extractors.rs:560-571 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/tsjs/extractors.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) codegraph-kernel/src/dart.rs:1551— codegraph-kernel/src/dart.rs:1551-1562 | codegraph-kernel/src/scala.rs:1029-1040 — before extracting anything, compare `codegraph-kernel/src/dart.rs` and `codegraph-kernel/src/scala.rs` as WHOLE FILES: this scan already matched 58 separate duplicated blocks between them, totalling at least 734 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) codegraph-kernel/src/lua.rs:768— codegraph-kernel/src/lua.rs:768-779 | codegraph-kernel/src/rlang.rs:592-603 — before extracting anything, compare `codegraph-kernel/src/lua.rs` and `codegraph-kernel/src/rlang.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 134 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) codegraph-kernel/src/python.rs:598— codegraph-kernel/src/python.rs:598-609 | codegraph-kernel/src/rustlang.rs:770-781 — before extracting anything, compare `codegraph-kernel/src/python.rs` and `codegraph-kernel/src/rustlang.rs` as WHOLE FILES: this scan already matched 40 separate duplicated blocks between them, totalling at least 454 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) codegraph-kernel/src/python.rs:441— codegraph-kernel/src/python.rs:441-452 | codegraph-kernel/src/swift.rs:688-704 — before extracting anything, compare `codegraph-kernel/src/python.rs` and `codegraph-kernel/src/swift.rs` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 572 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) codegraph-kernel/src/ccpp/mod.rs:1236— codegraph-kernel/src/ccpp/mod.rs:1236-1250 | codegraph-kernel/src/go.rs:443-454 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/go.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 451 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) codegraph-kernel/src/csharp.rs:649— codegraph-kernel/src/csharp.rs:649-660 | codegraph-kernel/src/java.rs:556-567 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/java.rs` as WHOLE FILES: this scan already matched 62 separate duplicated blocks between them, totalling at least 770 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 3) codegraph-kernel/src/ccpp/mod.rs:396— codegraph-kernel/src/ccpp/mod.rs:396-403 | codegraph-kernel/src/lua.rs:89-96 | codegraph-kernel/src/tsjs/mod.rs:230-237 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/lua.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 3) codegraph-kernel/src/csharp.rs:699— codegraph-kernel/src/csharp.rs:699-706 | codegraph-kernel/src/kotlin.rs:1041-1048 | codegraph-kernel/src/swift.rs:907-914 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/kotlin.rs` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 601 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 3) codegraph-kernel/src/csharp.rs:1133— codegraph-kernel/src/csharp.rs:1133-1140 | codegraph-kernel/src/lua.rs:757-767 | codegraph-kernel/src/scala.rs:877-884 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/lua.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 189 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 3) codegraph-kernel/src/csharp.rs:1239— codegraph-kernel/src/csharp.rs:1239-1246 | codegraph-kernel/src/java.rs:980-987 | codegraph-kernel/src/php.rs:1115-1122 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/java.rs` as WHOLE FILES: this scan already matched 62 separate duplicated blocks between them, totalling at least 770 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 3) codegraph-kernel/src/dart.rs:734— codegraph-kernel/src/dart.rs:734-741 | codegraph-kernel/src/lua.rs:382-389 | codegraph-kernel/src/scala.rs:525-532 — before extracting anything, compare `codegraph-kernel/src/dart.rs` and `codegraph-kernel/src/lua.rs` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 279 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 3) codegraph-kernel/src/rustlang.rs:1201— codegraph-kernel/src/rustlang.rs:1201-1208 | codegraph-kernel/src/swift.rs:1248-1255 | codegraph-kernel/src/tsjs/extractors.rs:2051-2058 — before extracting anything, compare `codegraph-kernel/src/rustlang.rs` and `codegraph-kernel/src/swift.rs` as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 550 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 3) codegraph-kernel/src/csharp.rs:86— codegraph-kernel/src/csharp.rs:86-93 | codegraph-kernel/src/kotlin.rs:78-85 | codegraph-kernel/src/swift.rs:101-108 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/kotlin.rs` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 601 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.
MethodTooLong: CodeGraph.sync src/index.ts:926— MethodTooLong — sync runs 297 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 197 over it, 2.97× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ExtractionOrchestrator.sync src/extraction/index.ts:3508— MethodTooLong — sync runs 158 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 58 over it, 1.58× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CodeGraph.indexAll src/index.ts:579— MethodTooLong — indexAll runs 150 significant lines (blank, comment-only and punctuation-only lines excluded) 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: Walker.synthesize_lombok_members codegraph-kernel/src/java.rs:1505— MethodTooLong — synthesize_lombok_members runs 132 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 32 over it, 1.32× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: JsxLexer.code src/resolution/jsx-code.ts:247— MethodTooLong — code runs 118 significant lines (blank, comment-only and punctuation-only lines excluded) 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: Walker.extract_variable codegraph-kernel/src/tsjs/extractors.rs:614— MethodTooLong — extract_variable runs 101 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 1 over it, 1.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D10 · Test Quality· Fixed-sleep synchronisation · ×5
Fixed-sleep synchronisation: terminates a worker that is already loaded right away __tests__/parse-pool.test.ts:294— This test starts work it did not wait for (`pool`, still running when the sleep starts) and then orders itself against it with `sleep(20)` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
Fixed-sleep synchronisation: runs N concurrent calls in parallel (not serialized) __tests__/query-pool.test.ts:96— This test starts work it did not wait for (`calls`, still running when the sleep starts) and then orders itself against it with `sleep(40)` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
Fixed-sleep synchronisation: destroy settles outstanding calls instead of hanging __tests__/query-pool.test.ts:175— This test starts work it did not wait for (`pending`, still running when the sleep starts) and then orders itself against it with `sleep(5)` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
Fixed-sleep synchronisation: answers callers at once, then waits for the worker to start __tests__/query-pool.test.ts:189— This test starts work it did not wait for (`down`, still running when the sleep starts) and then orders itself against it with `sleep(50)` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
Fixed-sleep synchronisation: waits for the first message __tests__/worker-teardown.test.ts:26— This test starts work it did not wait for (`ending`, still running when the sleep starts) and then orders itself against it with `sleep(30)` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×5
Members sharing a duplicated core (4 members, 50+ identical tokens) codegraph-kernel/src/ccpp/mod.rs:1424— codegraph-kernel/src/ccpp/mod.rs:1424-1445 | codegraph-kernel/src/csharp.rs:776-799 | codegraph-kernel/src/php.rs:766-789 | codegraph-kernel/src/swift.rs:950-973 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) codegraph-kernel/src/dart.rs:1746— codegraph-kernel/src/dart.rs:1746-1761 | codegraph-kernel/src/dart.rs:1784-1798 | codegraph-kernel/src/scala.rs:501-516 | codegraph-kernel/src/scala.rs:1162-1177 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) codegraph-kernel/src/dart.rs:1985— codegraph-kernel/src/dart.rs:1985-2014 | codegraph-kernel/src/go.rs:1202-1260 | codegraph-kernel/src/lua.rs:880-909 | codegraph-kernel/src/scala.rs:1301-1328 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) codegraph-kernel/src/go.rs:1115— codegraph-kernel/src/go.rs:1115-1129 | codegraph-kernel/src/java.rs:1169-1183 | codegraph-kernel/src/rustlang.rs:1214-1228 | codegraph-kernel/src/swift.rs:1261-1275 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) codegraph-kernel/src/java.rs:869— codegraph-kernel/src/java.rs:869-935 | codegraph-kernel/src/kotlin.rs:1204-1287 | codegraph-kernel/src/php.rs:1000-1066 | codegraph-kernel/src/swift.rs:1068-1173 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Duplicated block (16 lines × 2) codegraph-kernel/src/java.rs:227— codegraph-kernel/src/java.rs:227-242 | codegraph-kernel/src/kotlin.rs:286-301 — before extracting anything, compare `codegraph-kernel/src/java.rs` and `codegraph-kernel/src/kotlin.rs` as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 614 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (16 lines × 2) codegraph-kernel/src/kotlin.rs:404— codegraph-kernel/src/kotlin.rs:404-419 | codegraph-kernel/src/lua.rs:214-229 — before extracting anything, compare `codegraph-kernel/src/kotlin.rs` and `codegraph-kernel/src/lua.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 185 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (16 lines × 2) codegraph-kernel/src/kotlin.rs:1456— codegraph-kernel/src/kotlin.rs:1456-1471 | codegraph-kernel/src/ruby.rs:859-874 — before extracting anything, compare `codegraph-kernel/src/kotlin.rs` and `codegraph-kernel/src/ruby.rs` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 499 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (16 lines × 2) codegraph-kernel/src/lua.rs:822— codegraph-kernel/src/lua.rs:822-837 | codegraph-kernel/src/scala.rs:1236-1251 — before extracting anything, compare `codegraph-kernel/src/lua.rs` and `codegraph-kernel/src/scala.rs` as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (16 lines × 2) codegraph-kernel/src/rlang.rs:225— codegraph-kernel/src/rlang.rs:225-240 | codegraph-kernel/src/tsjs/mod.rs:455-470 — before extracting anything, compare `codegraph-kernel/src/rlang.rs` and `codegraph-kernel/src/tsjs/mod.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 91 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 (14 lines × 2) codegraph-kernel/src/ccpp/mod.rs:584— codegraph-kernel/src/ccpp/mod.rs:584-597 | codegraph-kernel/src/go.rs:269-282 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/go.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 451 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 (14 lines × 2) codegraph-kernel/src/ccpp/mod.rs:986— codegraph-kernel/src/ccpp/mod.rs:986-999 | codegraph-kernel/src/java.rs:416-429 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/java.rs` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 323 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 (14 lines × 2) codegraph-kernel/src/dart.rs:1568— codegraph-kernel/src/dart.rs:1568-1581 | codegraph-kernel/src/scala.rs:1043-1056 — before extracting anything, compare `codegraph-kernel/src/dart.rs` and `codegraph-kernel/src/scala.rs` as WHOLE FILES: this scan already matched 58 separate duplicated blocks between them, totalling at least 734 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 2) codegraph-kernel/src/lua.rs:264— codegraph-kernel/src/lua.rs:264-277 | codegraph-kernel/src/rlang.rs:233-246 — before extracting anything, compare `codegraph-kernel/src/lua.rs` and `codegraph-kernel/src/rlang.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 134 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 2) codegraph-kernel/src/python.rs:472— codegraph-kernel/src/python.rs:472-485 | codegraph-kernel/src/ruby.rs:568-581 — before extracting anything, compare `codegraph-kernel/src/python.rs` and `codegraph-kernel/src/ruby.rs` as WHOLE FILES: this scan already matched 43 separate duplicated blocks between them, totalling at least 523 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 4) codegraph-kernel/src/ccpp/mod.rs:1813— codegraph-kernel/src/ccpp/mod.rs:1813-1819 | codegraph-kernel/src/python.rs:870-876 | codegraph-kernel/src/tsjs/extractors.rs:1869-1876 | codegraph-kernel/src/tsjs/extractors.rs:1962-1968 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/python.rs` as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 348 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 × 4) codegraph-kernel/src/csharp.rs:206— codegraph-kernel/src/csharp.rs:206-214 | codegraph-kernel/src/java.rs:210-216 | codegraph-kernel/src/kotlin.rs:268-275 | codegraph-kernel/src/php.rs:214-223 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/java.rs` as WHOLE FILES: this scan already matched 62 separate duplicated blocks between them, totalling at least 770 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 4) codegraph-kernel/src/csharp.rs:697— codegraph-kernel/src/csharp.rs:697-704 | codegraph-kernel/src/php.rs:726-732 | codegraph-kernel/src/rustlang.rs:654-660 | codegraph-kernel/src/swift.rs:906-912 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/php.rs` as WHOLE FILES: this scan already matched 64 separate duplicated blocks between them, totalling at least 732 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 4) codegraph-kernel/src/csharp.rs:1023— codegraph-kernel/src/csharp.rs:1023-1029 | codegraph-kernel/src/csharp.rs:1057-1063 | codegraph-kernel/src/swift.rs:864-870 | codegraph-kernel/src/swift.rs:886-892 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/swift.rs` as WHOLE FILES: this scan already matched 74 separate duplicated blocks between them, totalling at least 828 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 4) codegraph-kernel/src/dart.rs:1752— codegraph-kernel/src/dart.rs:1752-1758 | codegraph-kernel/src/dart.rs:1789-1795 | codegraph-kernel/src/scala.rs:507-513 | codegraph-kernel/src/scala.rs:1168-1174 — before extracting anything, compare `codegraph-kernel/src/dart.rs` and `codegraph-kernel/src/scala.rs` as WHOLE FILES: this scan already matched 58 separate duplicated blocks between them, totalling at least 734 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.
c-fnptr-synthesizer.cFnPointerDispatchEdges::processUnit (cognitive 32) REDACTED:1084— c-fnptr-synthesizer.cFnPointerDispatchEdges::processUnit has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 4, 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. This shape REPEATS in the file: 4 other methods here (c-fnptr-synthesizer.cFnPointerDispatchEdges, c-fnptr-synthesizer.cFnPointerDispatchEdges::parseStructFieldsRaw, c-fnptr-synthesizer.cFnPointerDispatchEdges::mergeNativeFacts, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
c-fnptr-synthesizer.cFnPointerDispatchEdges::mergeNativeFacts (cognitive 28) REDACTED:650— c-fnptr-synthesizer.cFnPointerDispatchEdges::mergeNativeFacts has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 7 (14 pts), if/else 4 (7 pts), loops 6, 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. This shape REPEATS in the file: 4 other methods here (c-fnptr-synthesizer.cFnPointerDispatchEdges, c-fnptr-synthesizer.cFnPointerDispatchEdges::parseStructFieldsRaw, c-fnptr-synthesizer.cFnPointerDispatchEdges::registerStructValue, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
c-fnptr-synthesizer.cFnPointerDispatchEdges::registerStructValue (cognitive 28) REDACTED:917— c-fnptr-synthesizer.cFnPointerDispatchEdges::registerStructValue has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 2, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 4 other methods here (c-fnptr-synthesizer.cFnPointerDispatchEdges, c-fnptr-synthesizer.cFnPointerDispatchEdges::parseStructFieldsRaw, c-fnptr-synthesizer.cFnPointerDispatchEdges::mergeNativeFacts, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
c-fnptr-synthesizer.cFnPointerDispatchEdges::parseStructFieldsRaw (cognitive 20) REDACTED:554— c-fnptr-synthesizer.cFnPointerDispatchEdges::parseStructFieldsRaw has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (3 pts), ternaries 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. This shape REPEATS in the file: 4 other methods here (c-fnptr-synthesizer.cFnPointerDispatchEdges, c-fnptr-synthesizer.cFnPointerDispatchEdges::mergeNativeFacts, c-fnptr-synthesizer.cFnPointerDispatchEdges::registerStructValue, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Duplicated block (15 lines × 2) codegraph-kernel/src/ccpp/mod.rs:2184— codegraph-kernel/src/ccpp/mod.rs:2184-2198 | codegraph-kernel/src/rustlang.rs:1381-1395 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/rustlang.rs` as WHOLE FILES: this scan already matched 41 separate duplicated blocks between them, totalling at least 493 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) codegraph-kernel/src/dart.rs:909— codegraph-kernel/src/dart.rs:909-923 | codegraph-kernel/src/dart.rs:957-971 — both copies are in the same file, so extract the block into 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) codegraph-kernel/src/dart.rs:1747— codegraph-kernel/src/dart.rs:1747-1761 | codegraph-kernel/src/scala.rs:1163-1177 — before extracting anything, compare `codegraph-kernel/src/dart.rs` and `codegraph-kernel/src/scala.rs` as WHOLE FILES: this scan already matched 58 separate duplicated blocks between them, totalling at least 734 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) codegraph-kernel/src/kotlin.rs:820— codegraph-kernel/src/kotlin.rs:820-834 | codegraph-kernel/src/ruby.rs:472-488 — before extracting anything, compare `codegraph-kernel/src/kotlin.rs` and `codegraph-kernel/src/ruby.rs` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 499 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 3) codegraph-kernel/src/csharp.rs:1419— codegraph-kernel/src/csharp.rs:1419-1431 | codegraph-kernel/src/rustlang.rs:1370-1382 | codegraph-kernel/src/swift.rs:1364-1376 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/rustlang.rs` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 499 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 3) codegraph-kernel/src/java.rs:347— codegraph-kernel/src/java.rs:347-359 | codegraph-kernel/src/kotlin.rs:446-458 | codegraph-kernel/src/rustlang.rs:303-315 — before extracting anything, compare `codegraph-kernel/src/java.rs` and `codegraph-kernel/src/kotlin.rs` as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 614 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 3) codegraph-kernel/src/lua.rs:246— codegraph-kernel/src/lua.rs:246-258 | codegraph-kernel/src/python.rs:319-331 | codegraph-kernel/src/ruby.rs:300-312 — before extracting anything, compare `codegraph-kernel/src/lua.rs` and `codegraph-kernel/src/python.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 158 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 3) codegraph-kernel/src/python.rs:318— codegraph-kernel/src/python.rs:318-330 | codegraph-kernel/src/ruby.rs:299-311 | codegraph-kernel/src/tsjs/mod.rs:447-459 — before extracting anything, compare `codegraph-kernel/src/python.rs` and `codegraph-kernel/src/ruby.rs` as WHOLE FILES: this scan already matched 43 separate duplicated blocks between them, totalling at least 523 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) codegraph-kernel/src/dart.rs:387— codegraph-kernel/src/dart.rs:387-399 | codegraph-kernel/src/scala.rs:327-339 — before extracting anything, compare `codegraph-kernel/src/dart.rs` and `codegraph-kernel/src/scala.rs` as WHOLE FILES: this scan already matched 58 separate duplicated blocks between them, totalling at least 734 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) codegraph-kernel/src/go.rs:1344— codegraph-kernel/src/go.rs:1344-1356 | codegraph-kernel/src/rustlang.rs:1529-1541 — before extracting anything, compare `codegraph-kernel/src/go.rs` and `codegraph-kernel/src/rustlang.rs` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 618 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) codegraph-kernel/src/python.rs:721— codegraph-kernel/src/python.rs:721-733 | codegraph-kernel/src/tsjs/extractors.rs:1637-1649 — before extracting anything, compare `codegraph-kernel/src/python.rs` and `codegraph-kernel/src/tsjs/extractors.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 161 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) codegraph-kernel/src/python.rs:951— codegraph-kernel/src/python.rs:951-963 | codegraph-kernel/src/rustlang.rs:1439-1451 — before extracting anything, compare `codegraph-kernel/src/python.rs` and `codegraph-kernel/src/rustlang.rs` as WHOLE FILES: this scan already matched 40 separate duplicated blocks between them, totalling at least 454 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 5) codegraph-kernel/src/ccpp/mod.rs:1702— codegraph-kernel/src/ccpp/mod.rs:1702-1711 | codegraph-kernel/src/python.rs:708-717 | codegraph-kernel/src/rustlang.rs:903-912 | codegraph-kernel/src/scala.rs:889-898 | codegraph-kernel/src/tsjs/extractors.rs:1620-1629 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/python.rs` as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 348 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 5) codegraph-kernel/src/csharp.rs:1049— codegraph-kernel/src/csharp.rs:1049-1058 | codegraph-kernel/src/java.rs:648-657 | codegraph-kernel/src/php.rs:680-689 | codegraph-kernel/src/ruby.rs:614-623 | codegraph-kernel/src/swift.rs:856-865 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/java.rs` as WHOLE FILES: this scan already matched 62 separate duplicated blocks between them, totalling at least 770 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 5) codegraph-kernel/src/csharp.rs:1278— codegraph-kernel/src/csharp.rs:1278-1287 | codegraph-kernel/src/java.rs:1018-1027 | codegraph-kernel/src/kotlin.rs:1319-1328 | codegraph-kernel/src/php.rs:1161-1170 | codegraph-kernel/src/swift.rs:1208-1217 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/java.rs` as WHOLE FILES: this scan already matched 62 separate duplicated blocks between them, totalling at least 770 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 5) codegraph-kernel/src/csharp.rs:1528— codegraph-kernel/src/csharp.rs:1528-1537 | codegraph-kernel/src/kotlin.rs:1571-1580 | codegraph-kernel/src/php.rs:1339-1348 | codegraph-kernel/src/ruby.rs:951-960 | codegraph-kernel/src/swift.rs:1480-1489 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/kotlin.rs` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 601 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 5) codegraph-kernel/src/csharp.rs:717— codegraph-kernel/src/csharp.rs:717-722 | codegraph-kernel/src/java.rs:604-609 | codegraph-kernel/src/python.rs:559-564 | codegraph-kernel/src/ruby.rs:683-688 | codegraph-kernel/src/swift.rs:919-924 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/java.rs` as WHOLE FILES: this scan already matched 62 separate duplicated blocks between them, totalling at least 770 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 5) codegraph-kernel/src/java.rs:329— codegraph-kernel/src/java.rs:329-334 | codegraph-kernel/src/php.rs:341-346 | codegraph-kernel/src/python.rs:305-310 | codegraph-kernel/src/swift.rs:432-437 | codegraph-kernel/src/tsjs/mod.rs:433-439 — before extracting anything, compare `codegraph-kernel/src/java.rs` and `codegraph-kernel/src/php.rs` as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 593 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 5) codegraph-kernel/src/ccpp/mod.rs:1449— codegraph-kernel/src/ccpp/mod.rs:1449-1454 | codegraph-kernel/src/csharp.rs:801-809 | codegraph-kernel/src/dart.rs:1047-1052 | codegraph-kernel/src/php.rs:791-798 | codegraph-kernel/src/swift.rs:975-983 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/csharp.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 346 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 5) codegraph-kernel/src/java.rs:217— codegraph-kernel/src/java.rs:217-222 | codegraph-kernel/src/kotlin.rs:276-281 | codegraph-kernel/src/kotlin.rs:1338-1343 | codegraph-kernel/src/php.rs:224-229 | codegraph-kernel/src/swift.rs:1225-1230 — before extracting anything, compare `codegraph-kernel/src/java.rs` and `codegraph-kernel/src/kotlin.rs` as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 614 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.
ToolHandler.handleExplore::shrinkCluster (cognitive 39) REDACTED:6910— ToolHandler.handleExplore::shrinkCluster has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (23 pts), boolean chains 9, loops 2 (4 pts), ternaries 1 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 3 other methods here (ToolHandler.handleExplore, ToolHandler.handleExplore::prio, ToolHandler.handleExplore::sectionRangesOf) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ToolHandler.handleExplore::prio (cognitive 20) REDACTED:6217— ToolHandler.handleExplore::prio has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (19 pts), boolean chains 1 (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: 3 other methods here (ToolHandler.handleExplore, ToolHandler.handleExplore::sectionRangesOf, ToolHandler.handleExplore::shrinkCluster) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ToolHandler.handleExplore::sectionRangesOf (cognitive 16) REDACTED:6791— ToolHandler.handleExplore::sectionRangesOf has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 3 other methods here (ToolHandler.handleExplore, ToolHandler.handleExplore::prio, ToolHandler.handleExplore::shrinkCluster) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Change coupling: langs.rs ↔ REDACTED codegraph-kernel/src/langs.rs:1— `codegraph-kernel/src/langs.rs` and `src/extraction/kernel/index.ts` change together 88% of the time (14 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `d1b75a1a` feat(kernel): R7b Dart walker — dart module, vendored-grammar-C d4d8f…; `bdd687b4` feat(kernel): R7b Scala walker — scala module, vendored-grammar-C mas…; `e3213517` feat(kernel): R7b Lua+Luau walker — one lua module, vendored-grammar-… — run `git show` on any of them.
Change coupling: REDACTED ↔ parse-worker.ts src/extraction/index.ts:1— `src/extraction/index.ts` and `src/extraction/parse-worker.ts` change together 80% of the time (8 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `c4babfce` fix(js): a CommonJS require and a module path import the file they na…; `28068fa0` perf(kernel): direct-to-store decode — buffers flow to the store work…; `5736e24b` perf(index): faster fresh indexing + parallel reference resolution, b… — run `git show` on any of them.
Change coupling: mod.rs ↔ typescript.ts codegraph-kernel/src/tsjs/mod.rs:1— `codegraph-kernel/src/tsjs/mod.rs` and `src/extraction/languages/typescript.ts` change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `013b91c1` fix(js,ts): a named class expression is a class with its own members …; `68fcf2f1` fix(js,ts): static and instance methods override only their own kind …; `a33040f7` fix(js,ts): an import of a package the repository declares itself lin… — run `git show` on any of them.
D4 · Code Duplication· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×3
Members sharing a duplicated core (6 members, 50+ identical tokens) codegraph-kernel/src/csharp.rs:757— codegraph-kernel/src/csharp.rs:757-774 | codegraph-kernel/src/java.rs:674-691 | codegraph-kernel/src/kotlin.rs:1065-1082 | codegraph-kernel/src/php.rs:747-764 | codegraph-kernel/src/rustlang.rs:629-647 | codegraph-kernel/src/swift.rs:985-1002 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) codegraph-kernel/src/csharp.rs:1104— codegraph-kernel/src/csharp.rs:1104-1129 | codegraph-kernel/src/java.rs:848-866 | codegraph-kernel/src/kotlin.rs:1156-1177 | codegraph-kernel/src/php.rs:871-996 | codegraph-kernel/src/python.rs:611-692 | codegraph-kernel/src/swift.rs:1046-1064 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) codegraph-kernel/src/go.rs:1100— codegraph-kernel/src/go.rs:1100-1113 | codegraph-kernel/src/java.rs:1154-1167 | codegraph-kernel/src/rustlang.rs:1199-1212 | codegraph-kernel/src/swift.rs:1245-1259 | codegraph-kernel/src/tsjs/extractors.rs:2046-2062 | codegraph-kernel/src/tsjs/extractors.rs:2064-2074 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Duplicated block (18–19 lines × 2) codegraph-kernel/src/csharp.rs:954— codegraph-kernel/src/csharp.rs:954-972 | codegraph-kernel/src/java.rs:806-823 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/java.rs` as WHOLE FILES: this scan already matched 62 separate duplicated blocks between them, totalling at least 770 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (18–19 lines × 2) codegraph-kernel/src/kotlin.rs:837— codegraph-kernel/src/kotlin.rs:837-854 | codegraph-kernel/src/kotlin.rs:918-936 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (18–19 lines × 2) codegraph-kernel/src/swift.rs:652— codegraph-kernel/src/swift.rs:652-669 | codegraph-kernel/src/swift.rs:820-838 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (18 lines × 2) codegraph-kernel/src/csharp.rs:1081— codegraph-kernel/src/csharp.rs:1081-1098 | codegraph-kernel/src/java.rs:829-846 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/java.rs` as WHOLE FILES: this scan already matched 62 separate duplicated blocks between them, totalling at least 770 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (18 lines × 2) codegraph-kernel/src/go.rs:232— codegraph-kernel/src/go.rs:232-249 | codegraph-kernel/src/rustlang.rs:265-282 — before extracting anything, compare `codegraph-kernel/src/go.rs` and `codegraph-kernel/src/rustlang.rs` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 618 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (18 lines × 2) codegraph-kernel/src/kotlin.rs:1675— codegraph-kernel/src/kotlin.rs:1675-1692 | codegraph-kernel/src/swift.rs:1582-1599 — before extracting anything, compare `codegraph-kernel/src/kotlin.rs` and `codegraph-kernel/src/swift.rs` as WHOLE FILES: this scan already matched 70 separate duplicated blocks between them, totalling at least 886 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14–17 lines × 3) codegraph-kernel/src/ccpp/mod.rs:2283— codegraph-kernel/src/ccpp/mod.rs:2283-2296 | codegraph-kernel/src/php.rs:1356-1372 | codegraph-kernel/src/python.rs:972-987 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/php.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 341 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 (14–17 lines × 3) codegraph-kernel/src/csharp.rs:1220— codegraph-kernel/src/csharp.rs:1220-1236 | codegraph-kernel/src/java.rs:962-977 | codegraph-kernel/src/php.rs:1100-1113 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/java.rs` as WHOLE FILES: this scan already matched 62 separate duplicated blocks between them, totalling at least 770 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14–17 lines × 3) codegraph-kernel/src/go.rs:1269— codegraph-kernel/src/go.rs:1269-1282 | codegraph-kernel/src/kotlin.rs:1591-1607 | codegraph-kernel/src/swift.rs:1496-1511 — before extracting anything, compare `codegraph-kernel/src/go.rs` and `codegraph-kernel/src/kotlin.rs` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 442 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) codegraph-kernel/src/dart.rs:2006— codegraph-kernel/src/dart.rs:2006-2014 | codegraph-kernel/src/lua.rs:901-909 — before extracting anything, compare `codegraph-kernel/src/dart.rs` and `codegraph-kernel/src/lua.rs` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 279 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) codegraph-kernel/src/go.rs:824— codegraph-kernel/src/go.rs:824-832 | codegraph-kernel/src/python.rs:696-704 — before extracting anything, compare `codegraph-kernel/src/go.rs` and `codegraph-kernel/src/python.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 431 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) codegraph-kernel/src/tsjs/extractors.rs:66— codegraph-kernel/src/tsjs/extractors.rs:66-74 | codegraph-kernel/src/tsjs/extractors.rs:428-436 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication· Duplicated block with local edits (40 matched lines × 2 locations) · ×3
Duplicated block with local edits (40 matched lines × 2 locations) src/resolution/frameworks/astro.ts:25— src/resolution/frameworks/astro.ts:25 · src/resolution/frameworks/vue.ts:89 — the two spans are one implementation copied and then locally edited — 222 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block with local edits (40 matched lines × 2 locations) src/resolution/frameworks/react-router.ts:95— src/resolution/frameworks/react-router.ts:95 · src/resolution/frameworks/sveltekit-router.ts:59 — the two spans are one implementation copied and then locally edited — 421 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block with local edits (40 matched lines × 2 locations) ui/src/views/FileCodeView.svelte:91— ui/src/views/FileCodeView.svelte:91 · ui/src/views/FileView.svelte:48 — the two spans are one implementation copied and then locally edited — 262 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
AC3 · Page structure· Heading level jumps from h2 to h4 · ×2
Heading level jumps from h2 to h4 ui/src/views/ScreensView.svelte:427— Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
Heading level jumps from h2 to h4 ui/src/views/StepsView.svelte:706— Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
ambient-modules.scanAmbientModules::blockToken (cyclomatic 29) src/resolution/ambient-modules.ts:120— ambient-modules.scanAmbientModules::blockToken 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. This shape REPEATS in the file: one other method here (ambient-modules.scanAmbientModules::token) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ambient-modules.scanAmbientModules::token (cyclomatic 23) src/resolution/ambient-modules.ts:161— ambient-modules.scanAmbientModules::token 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. This shape REPEATS in the file: one other method here (ambient-modules.scanAmbientModules::blockToken) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
c-fnptr-synthesizer.cFnPointerDispatchEdges::mergeNativeFacts (cyclomatic 25) REDACTED:650— c-fnptr-synthesizer.cFnPointerDispatchEdges::mergeNativeFacts 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. This shape REPEATS in the file: 2 other methods here (c-fnptr-synthesizer.cFnPointerDispatchEdges, c-fnptr-synthesizer.cFnPointerDispatchEdges::processUnit) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
c-fnptr-synthesizer.cFnPointerDispatchEdges::processUnit (cyclomatic 21) REDACTED:1084— c-fnptr-synthesizer.cFnPointerDispatchEdges::processUnit has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (c-fnptr-synthesizer.cFnPointerDispatchEdges, c-fnptr-synthesizer.cFnPointerDispatchEdges::mergeNativeFacts) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
TodoComment __tests__/go-detached-doc-comments.test.ts:45— // TODO: a note a blank line separates from the function below. — 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__/go-doc-directives.test.ts:81— //TODO: an uppercase word before the colon is not a directive. — 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.
ambient-modules.scanAmbientModules::blockToken (cognitive 34) src/resolution/ambient-modules.ts:120— ambient-modules.scanAmbientModules::blockToken has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 9, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (ambient-modules.scanAmbientModules::token) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ambient-modules.scanAmbientModules::token (cognitive 21) src/resolution/ambient-modules.ts:161— ambient-modules.scanAmbientModules::token has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 6 (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. This shape REPEATS in the file: one other method here (ambient-modules.scanAmbientModules::blockToken) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
callback-synthesizer.goImplementsEdges::methodArities (cognitive 30) src/resolution/callback-synthesizer.ts:1181— callback-synthesizer.goImplementsEdges::methodArities has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 5 (11 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. This shape REPEATS in the file: 2 other methods here (callback-synthesizer.goImplementsEdges, callback-synthesizer.goImplementsEdges::wantedArities) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
callback-synthesizer.goImplementsEdges::wantedArities (cognitive 16) src/resolution/callback-synthesizer.ts:1217— callback-synthesizer.goImplementsEdges::wantedArities has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 4 (7 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (callback-synthesizer.goImplementsEdges, callback-synthesizer.goImplementsEdges::methodArities) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D4 · Code Duplication· Near-duplicate member family (4 members, 27 shared lines) · ×2
Near-duplicate member family (4 members, 27 shared lines) codegraph-kernel/src/ccpp/mod.rs:532— codegraph-kernel/src/ccpp/mod.rs:532-634 | codegraph-kernel/src/go.rs:227-317 | codegraph-kernel/src/rustlang.rs:260-355 | codegraph-kernel/src/tsjs/mod.rs:382-481 — These 4 members are variants of one another: a block of 27 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Near-duplicate member family (4 members, 27 shared lines) codegraph-kernel/src/java.rs:304— codegraph-kernel/src/java.rs:304-381 | codegraph-kernel/src/php.rs:316-408 | codegraph-kernel/src/swift.rs:401-498 | codegraph-kernel/src/tsjs/mod.rs:382-481 — These 4 members are variants of one another: a block of 27 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Members sharing a duplicated core (11 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (11 members, 50+ identical tokens) codegraph-kernel/src/ccpp/mod.rs:646— codegraph-kernel/src/ccpp/mod.rs:646-704 | codegraph-kernel/src/csharp.rs:499-511 | codegraph-kernel/src/go.rs:319-331 | codegraph-kernel/src/java.rs:478-490 | codegraph-kernel/src/kotlin.rs:506-520 | codegraph-kernel/src/php.rs:410-422 | codegraph-kernel/src/python.rs:373-385 | codegraph-kernel/src/ruby.rs:352-364 | codegraph-kernel/src/rustlang.rs:358-370 | codegraph-kernel/src/swift.rs:504-529 | codegraph-kernel/src/tsjs/mod.rs:998-1020 — These 11 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 11 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 11 times.
Members sharing a duplicated core (11 members, 50+ identical tokens) codegraph-kernel/src/csharp.rs:696— codegraph-kernel/src/csharp.rs:696-725 | codegraph-kernel/src/csharp.rs:757-774 | codegraph-kernel/src/java.rs:591-617 | codegraph-kernel/src/java.rs:674-691 | codegraph-kernel/src/php.rs:725-745 | codegraph-kernel/src/php.rs:747-764 | codegraph-kernel/src/python.rs:533-566 | codegraph-kernel/src/ruby.rs:655-690 | codegraph-kernel/src/rustlang.rs:629-647 | codegraph-kernel/src/swift.rs:905-926 | codegraph-kernel/src/swift.rs:985-1002 — These 11 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 11 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 11 times.
D4 · Code Duplication· Members sharing a duplicated core (8 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (8 members, 50+ identical tokens) codegraph-kernel/src/ccpp/mod.rs:197— codegraph-kernel/src/ccpp/mod.rs:197-211 | codegraph-kernel/src/go.rs:1449-1463 | codegraph-kernel/src/kotlin.rs:50-64 | codegraph-kernel/src/python.rs:1173-1187 | codegraph-kernel/src/rustlang.rs:1741-1755 | codegraph-kernel/src/scala.rs:54-68 | codegraph-kernel/src/swift.rs:68-82 | codegraph-kernel/src/tsjs/mod.rs:103-117 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
Members sharing a duplicated core (8 members, 50+ identical tokens) codegraph-kernel/src/ccpp/mod.rs:1647— codegraph-kernel/src/ccpp/mod.rs:1647-1787 | codegraph-kernel/src/go.rs:823-911 | codegraph-kernel/src/kotlin.rs:1204-1287 | codegraph-kernel/src/python.rs:695-781 | codegraph-kernel/src/rustlang.rs:887-1021 | codegraph-kernel/src/scala.rs:876-952 | codegraph-kernel/src/swift.rs:1068-1173 | codegraph-kernel/src/tsjs/extractors.rs:1603-1728 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
Duplicated block (17–18 lines × 2) codegraph-kernel/src/kotlin.rs:823— codegraph-kernel/src/kotlin.rs:823-839 | codegraph-kernel/src/swift.rs:637-654 — before extracting anything, compare `codegraph-kernel/src/kotlin.rs` and `codegraph-kernel/src/swift.rs` as WHOLE FILES: this scan already matched 70 separate duplicated blocks between them, totalling at least 886 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (17–18 lines × 2) codegraph-kernel/src/kotlin.rs:1267— codegraph-kernel/src/kotlin.rs:1267-1284 | codegraph-kernel/src/swift.rs:1154-1170 — before extracting anything, compare `codegraph-kernel/src/kotlin.rs` and `codegraph-kernel/src/swift.rs` as WHOLE FILES: this scan already matched 70 separate duplicated blocks between them, totalling at least 886 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15–16 lines × 2) codegraph-kernel/src/dart.rs:893— codegraph-kernel/src/dart.rs:893-907 | codegraph-kernel/src/dart.rs:940-955 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15–16 lines × 2) codegraph-kernel/src/dart.rs:1928— codegraph-kernel/src/dart.rs:1928-1942 | codegraph-kernel/src/scala.rs:1246-1261 — before extracting anything, compare `codegraph-kernel/src/dart.rs` and `codegraph-kernel/src/scala.rs` as WHOLE FILES: this scan already matched 58 separate duplicated blocks between them, totalling at least 734 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14–16 lines × 2) codegraph-kernel/src/java.rs:919— codegraph-kernel/src/java.rs:919-932 | codegraph-kernel/src/php.rs:1048-1063 — before extracting anything, compare `codegraph-kernel/src/java.rs` and `codegraph-kernel/src/php.rs` as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 593 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14–16 lines × 2) codegraph-kernel/src/kotlin.rs:1048— codegraph-kernel/src/kotlin.rs:1048-1063 | codegraph-kernel/src/tsjs/extractors.rs:384-397 — before extracting anything, compare `codegraph-kernel/src/kotlin.rs` and `codegraph-kernel/src/tsjs/extractors.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 106 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 (14 lines × 9) codegraph-kernel/src/ccpp/mod.rs:599— codegraph-kernel/src/ccpp/mod.rs:599-612 | codegraph-kernel/src/csharp.rs:375-388 | codegraph-kernel/src/go.rs:284-297 | codegraph-kernel/src/java.rs:365-378 | codegraph-kernel/src/kotlin.rs:464-477 | codegraph-kernel/src/php.rs:372-385 | codegraph-kernel/src/ruby.rs:316-329 | codegraph-kernel/src/rustlang.rs:321-334 | codegraph-kernel/src/swift.rs:463-476 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/csharp.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 346 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 (14 lines × 9) codegraph-kernel/src/csharp.rs:325— codegraph-kernel/src/csharp.rs:325-338 | codegraph-kernel/src/dart.rs:358-371 | codegraph-kernel/src/java.rs:313-326 | codegraph-kernel/src/php.rs:325-338 | codegraph-kernel/src/python.rs:286-299 | codegraph-kernel/src/rlang.rs:190-203 | codegraph-kernel/src/ruby.rs:269-282 | codegraph-kernel/src/scala.rs:307-320 | codegraph-kernel/src/swift.rs:410-423 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/dart.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 429 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 15) codegraph-kernel/src/ccpp/mod.rs:476— codegraph-kernel/src/ccpp/mod.rs:476-487 | codegraph-kernel/src/csharp.rs:234-245 | codegraph-kernel/src/dart.rs:289-300 | codegraph-kernel/src/go.rs:171-182 | codegraph-kernel/src/java.rs:242-253 | codegraph-kernel/src/kotlin.rs:301-312 | codegraph-kernel/src/lua.rs:148-159 | codegraph-kernel/src/php.rs:254-265 | codegraph-kernel/src/python.rs:221-232 | codegraph-kernel/src/rlang.rs:132-143 | codegraph-kernel/src/ruby.rs:198-209 | codegraph-kernel/src/rustlang.rs:200-211 | codegraph-kernel/src/scala.rs:236-247 | codegraph-kernel/src/swift.rs:299-310 | codegraph-kernel/src/tsjs/mod.rs:308-319 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/csharp.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 346 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 15) codegraph-kernel/src/ccpp/mod.rs:597— codegraph-kernel/src/ccpp/mod.rs:597-608 | codegraph-kernel/src/csharp.rs:373-384 | codegraph-kernel/src/dart.rs:418-429 | codegraph-kernel/src/go.rs:282-293 | codegraph-kernel/src/java.rs:363-374 | codegraph-kernel/src/kotlin.rs:462-473 | codegraph-kernel/src/lua.rs:263-274 | codegraph-kernel/src/php.rs:370-381 | codegraph-kernel/src/python.rs:333-344 | codegraph-kernel/src/rlang.rs:232-243 | codegraph-kernel/src/ruby.rs:314-325 | codegraph-kernel/src/rustlang.rs:319-330 | codegraph-kernel/src/scala.rs:358-369 | codegraph-kernel/src/swift.rs:461-472 | codegraph-kernel/src/tsjs/mod.rs:462-473 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/csharp.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 346 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 4) codegraph-kernel/src/csharp.rs:1050— codegraph-kernel/src/csharp.rs:1050-1060 | codegraph-kernel/src/php.rs:681-691 | codegraph-kernel/src/ruby.rs:615-625 | codegraph-kernel/src/swift.rs:857-867 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/php.rs` as WHOLE FILES: this scan already matched 64 separate duplicated blocks between them, totalling at least 732 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 4) codegraph-kernel/src/csharp.rs:1529— codegraph-kernel/src/csharp.rs:1529-1539 | codegraph-kernel/src/kotlin.rs:1572-1582 | codegraph-kernel/src/ruby.rs:952-962 | codegraph-kernel/src/swift.rs:1481-1491 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/kotlin.rs` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 601 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 4) codegraph-kernel/src/dart.rs:326— codegraph-kernel/src/dart.rs:326-335 | codegraph-kernel/src/lua.rs:179-188 | codegraph-kernel/src/rlang.rs:163-172 | codegraph-kernel/src/scala.rs:274-283 — before extracting anything, compare `codegraph-kernel/src/dart.rs` and `codegraph-kernel/src/lua.rs` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 279 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 4) codegraph-kernel/src/kotlin.rs:1236— codegraph-kernel/src/kotlin.rs:1236-1245 | codegraph-kernel/src/python.rs:719-728 | codegraph-kernel/src/swift.rs:1112-1121 | codegraph-kernel/src/tsjs/extractors.rs:1635-1644 — before extracting anything, compare `codegraph-kernel/src/kotlin.rs` and `codegraph-kernel/src/python.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 466 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 3) codegraph-kernel/src/ccpp/mod.rs:1792— codegraph-kernel/src/ccpp/mod.rs:1792-1801 | codegraph-kernel/src/dart.rs:1185-1194 | codegraph-kernel/src/scala.rs:957-966 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/dart.rs` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 3) codegraph-kernel/src/csharp.rs:1729— codegraph-kernel/src/csharp.rs:1729-1738 | codegraph-kernel/src/java.rs:1683-1692 | codegraph-kernel/src/php.rs:1498-1507 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/java.rs` as WHOLE FILES: this scan already matched 62 separate duplicated blocks between them, totalling at least 770 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 5) codegraph-kernel/src/ccpp/mod.rs:2181— codegraph-kernel/src/ccpp/mod.rs:2181-2189 | codegraph-kernel/src/csharp.rs:1427-1435 | codegraph-kernel/src/rustlang.rs:1378-1386 | codegraph-kernel/src/swift.rs:1372-1380 | codegraph-kernel/src/tsjs/fnref.rs:55-63 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/csharp.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 346 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 5) codegraph-kernel/src/csharp.rs:758— codegraph-kernel/src/csharp.rs:758-766 | codegraph-kernel/src/java.rs:675-683 | codegraph-kernel/src/kotlin.rs:1066-1074 | codegraph-kernel/src/php.rs:748-756 | codegraph-kernel/src/swift.rs:986-994 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/java.rs` as WHOLE FILES: this scan already matched 62 separate duplicated blocks between them, totalling at least 770 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7–9 lines × 2) codegraph-kernel/src/dart.rs:1315— codegraph-kernel/src/dart.rs:1315-1323 | codegraph-kernel/src/dart.rs:1485-1491 — both copies are in the same file, so extract the block into 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–9 lines × 2) codegraph-kernel/src/lua.rs:854— codegraph-kernel/src/lua.rs:854-860 | codegraph-kernel/src/scala.rs:1269-1277 — before extracting anything, compare `codegraph-kernel/src/lua.rs` and `codegraph-kernel/src/scala.rs` as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8–9 lines × 2) codegraph-kernel/src/lua.rs:379— codegraph-kernel/src/lua.rs:379-387 | codegraph-kernel/src/scala.rs:523-530 — before extracting anything, compare `codegraph-kernel/src/lua.rs` and `codegraph-kernel/src/scala.rs` as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8–9 lines × 2) codegraph-kernel/src/python.rs:668— codegraph-kernel/src/python.rs:668-675 | codegraph-kernel/src/python.rs:681-689 — both copies are in the same file, so extract the block into 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 × 10) codegraph-kernel/src/ccpp/mod.rs:615— codegraph-kernel/src/ccpp/mod.rs:615-622 | codegraph-kernel/src/csharp.rs:394-401 | codegraph-kernel/src/go.rs:298-305 | codegraph-kernel/src/java.rs:384-391 | codegraph-kernel/src/kotlin.rs:480-487 | codegraph-kernel/src/php.rs:389-396 | codegraph-kernel/src/python.rs:352-359 | codegraph-kernel/src/ruby.rs:331-338 | codegraph-kernel/src/rustlang.rs:336-343 | codegraph-kernel/src/swift.rs:479-486 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/csharp.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 346 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 10) codegraph-kernel/src/csharp.rs:717— codegraph-kernel/src/csharp.rs:717-725 | codegraph-kernel/src/csharp.rs:767-774 | codegraph-kernel/src/java.rs:684-691 | codegraph-kernel/src/php.rs:738-745 | codegraph-kernel/src/php.rs:757-764 | codegraph-kernel/src/python.rs:559-566 | codegraph-kernel/src/ruby.rs:683-690 | codegraph-kernel/src/rustlang.rs:640-647 | codegraph-kernel/src/swift.rs:919-926 | codegraph-kernel/src/swift.rs:995-1002 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/java.rs` as WHOLE FILES: this scan already matched 62 separate duplicated blocks between them, totalling at least 770 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7–8 lines × 2) codegraph-kernel/src/ccpp/mod.rs:1814— codegraph-kernel/src/ccpp/mod.rs:1814-1820 | codegraph-kernel/src/tsjs/extractors.rs:1870-1877 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/tsjs/extractors.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 69 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–8 lines × 2) codegraph-kernel/src/dart.rs:1950— codegraph-kernel/src/dart.rs:1950-1956 | codegraph-kernel/src/go.rs:1166-1173 — before extracting anything, compare `codegraph-kernel/src/dart.rs` and `codegraph-kernel/src/go.rs` as WHOLE FILES: this scan already matched 27 separate duplicated blocks between them, totalling at least 323 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 12) codegraph-kernel/src/ccpp/mod.rs:625— codegraph-kernel/src/ccpp/mod.rs:625-631 | codegraph-kernel/src/csharp.rs:404-410 | codegraph-kernel/src/dart.rs:441-447 | codegraph-kernel/src/go.rs:308-314 | codegraph-kernel/src/java.rs:394-400 | codegraph-kernel/src/kotlin.rs:490-496 | codegraph-kernel/src/php.rs:399-405 | codegraph-kernel/src/python.rs:362-368 | codegraph-kernel/src/ruby.rs:341-347 | codegraph-kernel/src/rustlang.rs:346-352 | codegraph-kernel/src/scala.rs:381-387 | codegraph-kernel/src/swift.rs:489-495 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/csharp.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 346 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 × 12) codegraph-kernel/src/csharp.rs:1609— codegraph-kernel/src/csharp.rs:1609-1615 | codegraph-kernel/src/dart.rs:2077-2083 | codegraph-kernel/src/go.rs:1332-1338 | codegraph-kernel/src/java.rs:1321-1327 | codegraph-kernel/src/kotlin.rs:1649-1655 | codegraph-kernel/src/php.rs:1420-1426 | codegraph-kernel/src/python.rs:1030-1036 | codegraph-kernel/src/ruby.rs:1028-1034 | codegraph-kernel/src/rustlang.rs:1516-1522 | codegraph-kernel/src/scala.rs:1390-1396 | codegraph-kernel/src/swift.rs:1553-1559 | codegraph-kernel/src/tsjs/mod.rs:512-518 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/dart.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 429 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 8) codegraph-kernel/src/csharp.rs:44— codegraph-kernel/src/csharp.rs:44-49 | codegraph-kernel/src/dart.rs:78-83 | codegraph-kernel/src/go.rs:1474-1479 | codegraph-kernel/src/java.rs:51-56 | codegraph-kernel/src/rustlang.rs:1767-1772 | codegraph-kernel/src/scala.rs:79-84 | codegraph-kernel/src/swift.rs:49-54 | codegraph-kernel/src/tsjs/mod.rs:128-133 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/dart.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 429 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 8) codegraph-kernel/src/csharp.rs:317— codegraph-kernel/src/csharp.rs:317-322 | codegraph-kernel/src/go.rs:228-233 | codegraph-kernel/src/java.rs:305-310 | codegraph-kernel/src/php.rs:317-322 | codegraph-kernel/src/python.rs:278-283 | codegraph-kernel/src/ruby.rs:261-266 | codegraph-kernel/src/rustlang.rs:261-266 | codegraph-kernel/src/swift.rs:402-407 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/go.rs` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 385 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 6) codegraph-kernel/src/csharp.rs:779— codegraph-kernel/src/csharp.rs:779-784 | codegraph-kernel/src/kotlin.rs:1087-1092 | codegraph-kernel/src/php.rs:769-774 | codegraph-kernel/src/rustlang.rs:682-687 | codegraph-kernel/src/swift.rs:932-937 | codegraph-kernel/src/swift.rs:953-958 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/kotlin.rs` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 601 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 6) codegraph-kernel/src/csharp.rs:760— codegraph-kernel/src/csharp.rs:760-765 | codegraph-kernel/src/java.rs:677-682 | codegraph-kernel/src/kotlin.rs:1068-1073 | codegraph-kernel/src/php.rs:750-755 | codegraph-kernel/src/rustlang.rs:632-637 | codegraph-kernel/src/swift.rs:988-993 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/java.rs` as WHOLE FILES: this scan already matched 62 separate duplicated blocks between them, totalling at least 770 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.
Outbound HTTP without resilience REDACTED:355— `superagent` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience src/ui-server/api/effects.ts:189— `superagent` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
R10 · Code Duplication· Duplicated block with local edits (54 matched lines × 2 locations) · ×2
Duplicated block with local edits (54 matched lines × 2 locations) scripts/agent-eval/probe-file-spend.mjs:34— scripts/agent-eval/probe-file-spend.mjs:34 · scripts/agent-eval/probe-suite-envelope.mjs:27 — the two spans are one implementation copied and then locally edited — 487 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block with local edits (54 matched lines × 2 locations) src/resolution/frameworks/tanstack-router.ts:330— src/resolution/frameworks/tanstack-router.ts:330 · src/resolution/frameworks/vue-router.ts:306 — the two spans are one implementation copied and then locally edited — 380 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (34 matched lines × 2 locations) · ×2
Duplicated block with local edits (34 matched lines × 2 locations) src/extraction/parse-pool.ts:458— src/extraction/parse-pool.ts:458 · src/mcp/query-pool.ts:287 — the two spans are one implementation copied and then locally edited — 253 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block with local edits (34 matched lines × 2 locations) src/installer/targets/copilot-cli.ts:126— src/installer/targets/copilot-cli.ts:126 · src/installer/targets/copilot-jetbrains.ts:144 — the two spans are one implementation copied and then locally edited — 208 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (27 lines × 2 locations) REDACTED:60— REDACTED:60 · src/extraction/mybatis-extractor.ts:87 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (27 lines × 2 locations) src/ui-server/api/program.ts:37— src/ui-server/api/program.ts:37 · ui/src/lib/wire.ts:850 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
AC7 · A11y enforcement· Accessibility enforcement below the top rung · ×1
Accessibility enforcement below the top rung — No accessibility enforcement found — no a11y linter (eslint-plugin-svelte (a11y rules are built in)) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time. What was searched, so you can tell an absence from a miss: the 57 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
name-matcher.matchMethodCall (cyclomatic 362) src/resolution/name-matcher.ts:19685— name-matcher.matchMethodCall has cyclomatic complexity 362 (threshold 15). Of this number, 255 points are the body's own statements and 107 belong to 13 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.
TreeSitterExtractor.extractCall (cyclomatic 333) src/extraction/tree-sitter.ts:5276— TreeSitterExtractor.extractCall has cyclomatic complexity 333 (threshold 15). Of this number, 327 points are the body's own statements and 6 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.
ToolHandler.handleExplore (cyclomatic 318) REDACTED:4200— ToolHandler.handleExplore has cyclomatic complexity 318 (threshold 15). To reduce it, separate the cases: extract each independent 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 shape REPEATS in the file: one other method here (ToolHandler.handleExplore::shrinkCluster) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
steps.buildSteps (cyclomatic 202) src/ui-server/api/steps.ts:432— steps.buildSteps has cyclomatic complexity 202 (threshold 15). Of this number, 189 points are the body's own statements and 13 belong to 7 function literals 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.
name-matcher.matchByExactName (cyclomatic 193) src/resolution/name-matcher.ts:11825— name-matcher.matchByExactName has cyclomatic complexity 193 (threshold 15). Of this number, 77 points are the body's own statements and 116 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ContextBuilder.findRelevantContext (cyclomatic 183) src/context/index.ts:477— ContextBuilder.findRelevantContext has cyclomatic complexity 183 (threshold 15). Of this number, 163 points are the body's own statements and 20 belong to 10 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.
c-fnptr-synthesizer.cFnPointerDispatchEdges (cyclomatic 158) REDACTED:434— c-fnptr-synthesizer.cFnPointerDispatchEdges has cyclomatic complexity 158 (threshold 15). To reduce it, separate the cases: extract each independent 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 shape REPEATS in the file: 2 other methods here (c-fnptr-synthesizer.cFnPointerDispatchEdges::mergeNativeFacts, c-fnptr-synthesizer.cFnPointerDispatchEdges::processUnit) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
TreeSitterExtractor.extractVariable (cyclomatic 145) src/extraction/tree-sitter.ts:3884— TreeSitterExtractor.extractVariable has cyclomatic complexity 145 (threshold 15). Of this number, 135 points are the body's own statements and 10 belong to 3 function literals 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.
ReferenceResolver.resolveOneInner (cyclomatic 138) REDACTED:1505— ReferenceResolver.resolveOneInner has cyclomatic complexity 138 (threshold 15). Of this number, 134 points are the body's own statements and 4 belong to 4 function literals 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.
name-matcher.matchFuzzy (cyclomatic 131) src/resolution/name-matcher.ts:26900— name-matcher.matchFuzzy has cyclomatic complexity 131 (threshold 15). Of this number, 63 points are the body's own statements and 68 belong to 2 function literals inside it that branch. 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.
TreeSitterExtractor.dispatchNode (cyclomatic 120) src/extraction/tree-sitter.ts:1541— TreeSitterExtractor.dispatchNode has cyclomatic complexity 120 (threshold 15). Of this number, 117 points are the body's own statements and 3 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.
CodeGraph.sync (cyclomatic 116) src/index.ts:926— CodeGraph.sync has cyclomatic complexity 116 (threshold 15). Most of this is not in the body itself: 1 of the 116 points is its own statement and the rest belongs to 8 function literals inside it that branch (lines 927, 1025, 1199, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
TreeSitterExtractor.extractInheritance (cyclomatic 113) src/extraction/tree-sitter.ts:7695— TreeSitterExtractor.extractInheritance has cyclomatic complexity 113 (threshold 15). Of this number, 112 points are the body's own statements and 1 belongs to one function literal 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.
name-matcher.matchReferenceInner (cyclomatic 109) src/resolution/name-matcher.ts:27279— name-matcher.matchReferenceInner has cyclomatic complexity 109 (threshold 15). Of this number, 102 points are the body's own statements and 7 belong to 4 function literals 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.
rust-scopes.readRustBindings (cyclomatic 104) src/resolution/rust-scopes.ts:506— rust-scopes.readRustBindings has cyclomatic complexity 104 (threshold 15). Of this number, 63 points are the body's own statements and 41 belong to 12 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.
parse-run.parseSession (cyclomatic 91) scripts/agent-eval/parse-run.mjs:102— parse-run.parseSession has cyclomatic complexity 91 (threshold 15). Of this number, 90 points are the body's own statements and 1 belongs to one function literal 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.
ExtractionOrchestrator.indexAll (cyclomatic 90) src/extraction/index.ts:2181— ExtractionOrchestrator.indexAll has cyclomatic complexity 90 (threshold 15). Of this number, 54 points are the body's own statements and 36 belong to 12 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.
callback-synthesizer.goImplementsEdges (cyclomatic 89) src/resolution/callback-synthesizer.ts:1034— callback-synthesizer.goImplementsEdges has cyclomatic complexity 89 (threshold 15). Of this number, 42 points are the body's own statements and 47 belong to 9 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.
proxy.runLocalHandshakeProxy (cyclomatic 89) src/mcp/proxy.ts:260— proxy.runLocalHandshakeProxy has cyclomatic complexity 89 (threshold 15). Most of this is not in the body itself: 3 of the 89 points are its own statements and the rest belongs to 15 function items inside it that branch (a function literal at line 397, serveLocally, a function literal at line 515, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
ReferenceResolver.createContext (cyclomatic 85) REDACTED:719— ReferenceResolver.createContext has cyclomatic complexity 85 (threshold 15). Most of this is not in the body itself: 1 of the 85 points is its own statement and the rest belongs to 26 function literals inside it that branch (lines 781, 957, 864, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
name-matcher.isRustNameInScope (cyclomatic 82) src/resolution/name-matcher.ts:8961— name-matcher.isRustNameInScope has cyclomatic complexity 82 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
function-ref.normalizeSpecial (cyclomatic 80) src/extraction/function-ref.ts:638— function-ref.normalizeSpecial has cyclomatic complexity 80 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
import-resolver.resolveViaImport (cyclomatic 80) REDACTED:2981— import-resolver.resolveViaImport has cyclomatic complexity 80 (threshold 15). Of this number, 76 points are the body's own statements and 4 belong to 4 function literals 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.
react.scanRoutes.unit (cyclomatic 80) REDACTED:1145— react.scanRoutes.unit has cyclomatic complexity 80 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
callback-synthesizer.reactJsxChildEdges (cyclomatic 80) src/resolution/callback-synthesizer.ts:2424— callback-synthesizer.reactJsxChildEdges has cyclomatic complexity 80 (threshold 15). Of this number, 63 points are the body's own statements and 17 belong to 11 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.
vue-template-calls.scanExpression (cyclomatic 73) src/extraction/vue-template-calls.ts:291— vue-template-calls.scanExpression has cyclomatic complexity 73 (threshold 15). Of this number, 67 points are the body's own statements and 6 belong to 4 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.
cpp-brace-scopes.scanCppBraceScopes (cyclomatic 72) src/extraction/languages/cpp-brace-scopes.ts:204— cpp-brace-scopes.scanCppBraceScopes has cyclomatic complexity 72 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ReferenceResolver.resolveAndPersistBatched (cyclomatic 71) REDACTED:2471— ReferenceResolver.resolveAndPersistBatched has cyclomatic complexity 71 (threshold 15). Of this number, 54 points are the body's own statements and 17 belong to 8 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.
name-matcher.inferCppReceiverType (cyclomatic 70) src/resolution/name-matcher.ts:16827— name-matcher.inferCppReceiverType has cyclomatic complexity 70 (threshold 15). Of this number, 69 points are the body's own statements and 1 belongs to one function literal 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.
callback-synthesizer.rnEventEdges (cyclomatic 68) src/resolution/callback-synthesizer.ts:2881— callback-synthesizer.rnEventEdges has cyclomatic complexity 68 (threshold 15). Of this number, 64 points are the body's own statements and 4 belong to 3 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.
pascal-preparse.statementsShape (cyclomatic 66) src/extraction/languages/pascal-preparse.ts:695— pascal-preparse.statementsShape 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.
TreeSitterExtractor.visitFunctionBody::visitForCallsAndStructure (cyclomatic 66) src/extraction/tree-sitter.ts:7416— TreeSitterExtractor.visitFunctionBody::visitForCallsAndStructure 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.
name-matcher.matchFunctionRef (cyclomatic 63) src/resolution/name-matcher.ts:1104— name-matcher.matchFunctionRef has cyclomatic complexity 63 (threshold 15). Of this number, 44 points are the body's own statements and 19 belong to 7 function literals inside it that branch. 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.
query-paths.extractQueryPaths (cyclomatic 61) src/search/query-paths.ts:294— query-paths.extractQueryPaths has cyclomatic complexity 61 (threshold 15). Of this number, 59 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
java.synthesizeLombokMembers (cyclomatic 60) src/extraction/languages/java.ts:119— java.synthesizeLombokMembers has cyclomatic complexity 60 (threshold 15). Of this number, 58 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
name-matcher.rustValueType (cyclomatic 60) src/resolution/name-matcher.ts:10193— name-matcher.rustValueType has cyclomatic complexity 60 (threshold 15). Of this number, 58 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TreeSitterExtractor.flushValueRefs (cyclomatic 60) src/extraction/tree-sitter.ts:1321— TreeSitterExtractor.flushValueRefs has cyclomatic complexity 60 (threshold 15). Of this number, 56 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CodeGraph.indexAll (cyclomatic 59) src/index.ts:579— CodeGraph.indexAll has cyclomatic complexity 59 (threshold 15). Most of this is not in the body itself: 1 of the 59 points is its own statement and the rest belongs to one function literal inside it that branches (line 580). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
steps-model.packRegions (cyclomatic 59) ui/src/lib/steps-model.ts:710— steps-model.packRegions has cyclomatic complexity 59 (threshold 15). Of this number, 19 points are the body's own statements and 40 belong to 15 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.
ToolHandler.buildPolymorphicBoundaries (cyclomatic 58) REDACTED:3821— ToolHandler.buildPolymorphicBoundaries has cyclomatic complexity 58 (threshold 15). Of this number, 24 points are the body's own statements and 34 belong to 8 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.
name-matcher.cppExpressionType (cyclomatic 57) src/resolution/name-matcher.ts:14387— name-matcher.cppExpressionType has cyclomatic complexity 57 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ReferenceResolver.isBuiltInOrExternal (cyclomatic 57) REDACTED:3337— ReferenceResolver.isBuiltInOrExternal has cyclomatic complexity 57 (threshold 15). Of this number, 49 points are the body's own statements and 8 belong to 2 function literals 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.
ambient-modules.tokenize (cyclomatic 56) src/resolution/ambient-modules.ts:400— ambient-modules.tokenize has cyclomatic complexity 56 (threshold 15). Of this number, 49 points are the body's own statements and 7 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.
name-matcher.matchMemberFunctionRef (cyclomatic 56) src/resolution/name-matcher.ts:278— name-matcher.matchMemberFunctionRef has cyclomatic complexity 56 (threshold 15). Of this number, 43 points are the body's own statements and 13 belong to 6 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.
name-matcher.rustTypedMethodCall (cyclomatic 56) src/resolution/name-matcher.ts:11170— name-matcher.rustTypedMethodCall has cyclomatic complexity 56 (threshold 15). Of this number, 48 points are the body's own statements and 8 belong to 4 function literals 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.
name-matcher.resolveAwaitedCallType (cyclomatic 55) src/resolution/name-matcher.ts:19126— name-matcher.resolveAwaitedCallType has cyclomatic complexity 55 (threshold 15). Of this number, 39 points are the body's own statements and 16 belong to 6 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.
JsxLexer.code (cyclomatic 54) src/resolution/jsx-code.ts:247— JsxLexer.code 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.
name-matcher.isVisibleAcrossFiles (cyclomatic 53) src/resolution/name-matcher.ts:3450— name-matcher.isVisibleAcrossFiles has cyclomatic complexity 53 (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.
ExtractionOrchestrator.sync (cyclomatic 52) src/extraction/index.ts:3508— ExtractionOrchestrator.sync has cyclomatic complexity 52 (threshold 15). Of this number, 48 points are the body's own statements and 4 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.
callback-synthesizer.interfaceOverrideEdges (cyclomatic 52) src/resolution/callback-synthesizer.ts:1580— callback-synthesizer.interfaceOverrideEdges has cyclomatic complexity 52 (threshold 15). Of this number, 44 points are the body's own statements and 8 belong to 5 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.
name-matcher.readGoScopes (cyclomatic 50) src/resolution/name-matcher.ts:2822— name-matcher.readGoScopes has cyclomatic complexity 50 (threshold 15). Of this number, 45 points are the body's own statements and 5 belong to 3 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.
ruby.extractScopedRailsRoutes (cyclomatic 50) REDACTED:241— ruby.extractScopedRailsRoutes has cyclomatic complexity 50 (threshold 15). Of this number, 47 points are the body's own statements and 3 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.
TreeSitterExtractor.extractImport (cyclomatic 50) src/extraction/tree-sitter.ts:4736— TreeSitterExtractor.extractImport has cyclomatic complexity 50 (threshold 15). Of this number, 45 points are the body's own statements and 5 belong to 3 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.
angular-template-synthesizer.angularTemplateEdges (cyclomatic 50) src/resolution/angular-template-synthesizer.ts:632— angular-template-synthesizer.angularTemplateEdges has cyclomatic complexity 50 (threshold 15). Of this number, 42 points are the body's own statements and 8 belong to 4 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.
dead-code.buildDeadCodeReport (cyclomatic 50) src/graph/dead-code.ts:458— dead-code.buildDeadCodeReport has cyclomatic complexity 50 (threshold 15). Of this number, 43 points are the body's own statements and 7 belong to 5 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.
ToolHandler.handleFileView (cyclomatic 48) REDACTED:7979— ToolHandler.handleFileView has cyclomatic complexity 48 (threshold 15). Of this number, 38 points are the body's own statements and 10 belong to 3 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.
name-matcher.goReceiverChainType (cyclomatic 47) src/resolution/name-matcher.ts:22140— name-matcher.goReceiverChainType has cyclomatic complexity 47 (threshold 15). Of this number, 46 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
map-model.buildMapLayout (cyclomatic 46) ui/src/lib/map-model.ts:301— map-model.buildMapLayout has cyclomatic complexity 46 (threshold 15). Of this number, 31 points are the body's own statements and 15 belong to 5 function literals 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.
name-matcher.inferLocalReceiverType (cyclomatic 45) src/resolution/name-matcher.ts:18858— name-matcher.inferLocalReceiverType has cyclomatic complexity 45 (threshold 15). Of this number, 39 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
cpp-macro-visibility.walkTranslationUnit::scan (cyclomatic 44) REDACTED:293— cpp-macro-visibility.walkTranslationUnit::scan has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rust-scopes.readRustScopes (cyclomatic 44) src/resolution/rust-scopes.ts:411— rust-scopes.readRustScopes has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
name-matcher.isJavaTypeVisible (cyclomatic 44) src/resolution/name-matcher.ts:3237— name-matcher.isJavaTypeVisible has cyclomatic complexity 44 (threshold 15). Of this number, 35 points are the body's own statements and 9 belong to 4 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.
react-native.buildRNMaps (cyclomatic 44) REDACTED:363— react-native.buildRNMaps has cyclomatic complexity 44 (threshold 15). Of this number, 43 points are the body's own statements and 1 belongs to one function literal 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.
flow-model.buildFlowLayout (cyclomatic 44) ui/src/lib/flow-model.ts:343— flow-model.buildFlowLayout has cyclomatic complexity 44 (threshold 15). Of this number, 41 points are the body's own statements and 3 belong to one function literal 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.
name-matcher.resolveMethodOnType (cyclomatic 43) src/resolution/name-matcher.ts:13059— name-matcher.resolveMethodOnType has cyclomatic complexity 43 (threshold 15). Of this number, 36 points are the body's own statements and 7 belong to 2 function literals 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.
import-resolver.findExportedSymbolWalk (cyclomatic 43) REDACTED:4001— import-resolver.findExportedSymbolWalk has cyclomatic complexity 43 (threshold 15). Of this number, 41 points are the body's own statements and 2 belong to 2 function literals 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.
callback-synthesizer.erlangBehaviourDispatchEdges (cyclomatic 43) src/resolution/callback-synthesizer.ts:4754— callback-synthesizer.erlangBehaviourDispatchEdges has cyclomatic complexity 43 (threshold 15). Of this number, 33 points are the body's own statements and 10 belong to 3 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.
ReferenceResolver.gateTargetKind (cyclomatic 43) REDACTED:3963— ReferenceResolver.gateTargetKind 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.
c-cpp.blankCStatementMacroCalls (cyclomatic 42) REDACTED:1916— c-cpp.blankCStatementMacroCalls 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.
pascal-preparse.preParsePascal (cyclomatic 42) src/extraction/languages/pascal-preparse.ts:993— pascal-preparse.preParsePascal 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.
cpp-macro-methods.cppCodeScan (cyclomatic 42) src/extraction/languages/cpp-macro-methods.ts:474— cpp-macro-methods.cppCodeScan 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.
name-matcher.cppUnnamedNamespaceSpans (cyclomatic 42) src/resolution/name-matcher.ts:2303— name-matcher.cppUnnamedNamespaceSpans 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.
screens.buildScreens (cyclomatic 42) src/ui-server/api/screens.ts:225— screens.buildScreens has cyclomatic complexity 42 (threshold 15). Of this number, 41 points are the body's own statements and 1 belongs to one function literal 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.
cpp-raw-strings.cppNonCodeLines (cyclomatic 41) src/resolution/cpp-raw-strings.ts:35— cpp-raw-strings.cppNonCodeLines has cyclomatic complexity 41 (threshold 15). Of this number, 33 points are the body's own statements and 8 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.
name-matcher.pythonAttrStatementsUncached (cyclomatic 41) src/resolution/name-matcher.ts:23216— name-matcher.pythonAttrStatementsUncached has cyclomatic complexity 41 (threshold 15). Of this number, 38 points are the body's own statements and 3 belong to one function literal 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.
branch-guards.memberTypesInTree (cyclomatic 41) src/graph/branch-guards.ts:2319— branch-guards.memberTypesInTree has cyclomatic complexity 41 (threshold 15). Of this number, 24 points are the body's own statements and 17 belong to 5 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.
TreeSitterExtractor.extractStaticMemberRef (cyclomatic 40) src/extraction/tree-sitter.ts:6699— TreeSitterExtractor.extractStaticMemberRef 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.
TreeSitterExtractor.visitPascalNode (cyclomatic 40) src/extraction/tree-sitter.ts:8553— TreeSitterExtractor.visitPascalNode 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.
callback-synthesizer.synthesizeCallbackEdges (cyclomatic 40) src/resolution/callback-synthesizer.ts:5226— callback-synthesizer.synthesizeCallbackEdges has cyclomatic complexity 40 (threshold 15). Of this number, 16 points are the body's own statements and 24 belong to 9 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.
ToolHandler.buildFlowFromNamedSymbols (cyclomatic 39) REDACTED:3505— ToolHandler.buildFlowFromNamedSymbols has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (ToolHandler.buildFlowFromNamedSymbols::collectSynthLinks) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
index.runInstallerWithOptions (cyclomatic 39) src/installer/index.ts:86— index.runInstallerWithOptions has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
c-cpp.blankCTypeKeywordArgs (cyclomatic 38) REDACTED:2255— c-cpp.blankCTypeKeywordArgs 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.
name-matcher.rustTypeLookup (cyclomatic 38) src/resolution/name-matcher.ts:10011— name-matcher.rustTypeLookup has cyclomatic complexity 38 (threshold 15). Of this number, 37 points are the body's own statements and 1 belongs to one function literal 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.
name-matcher.matchReference (cyclomatic 38) src/resolution/name-matcher.ts:27079— name-matcher.matchReference has cyclomatic complexity 38 (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.
TreeSitterExtractor.extractTypeAlias (cyclomatic 38) src/extraction/tree-sitter.ts:4400— TreeSitterExtractor.extractTypeAlias 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.
branch-guards.triggerInTree (cyclomatic 38) src/graph/branch-guards.ts:835— branch-guards.triggerInTree 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.
dart-local-scope.blankDartLiterals (cyclomatic 37) src/resolution/dart-local-scope.ts:542— dart-local-scope.blankDartLiterals has cyclomatic complexity 37 (threshold 15). Of this number, 33 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
name-matcher.blankDartCode (cyclomatic 37) src/resolution/name-matcher.ts:4663— name-matcher.blankDartCode has cyclomatic complexity 37 (threshold 15). Of this number, 33 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
explore-diagnostics.renderTable (cyclomatic 37) src/mcp/explore-diagnostics.ts:678— explore-diagnostics.renderTable has cyclomatic complexity 37 (threshold 15). Of this number, 32 points are the body's own statements and 5 belong to 4 function literals 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.
index.runUninstaller (cyclomatic 37) src/installer/index.ts:464— index.runUninstaller 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.
vue-template-calls.scanMarkup (cyclomatic 36) src/extraction/vue-template-calls.ts:127— vue-template-calls.scanMarkup has cyclomatic complexity 36 (threshold 15). Of this number, 35 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ambient-modules.scanNamespaceBlocks (cyclomatic 36) src/resolution/ambient-modules.ts:313— ambient-modules.scanNamespaceBlocks has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 2 of the 36 points are its own statements and the rest belongs to one function literal inside it that branches (line 324). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
name-matcher.cppForBodyEncloses (cyclomatic 36) src/resolution/name-matcher.ts:14608— name-matcher.cppForBodyEncloses 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.
angular-router.parseAngularRoutes::walk (cyclomatic 36) src/resolution/frameworks/angular-router.ts:265— angular-router.parseAngularRoutes::walk 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.
TreeSitterExtractor.extractField (cyclomatic 36) src/extraction/tree-sitter.ts:3166— TreeSitterExtractor.extractField has cyclomatic complexity 36 (threshold 15). Of this number, 27 points are the body's own statements and 9 belong to 2 function literals 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.
tree-sitter.extractNameRaw (cyclomatic 36) src/extraction/tree-sitter.ts:121— tree-sitter.extractNameRaw 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.
callback-synthesizer.vueTemplateEdges (cyclomatic 36) src/resolution/callback-synthesizer.ts:2650— callback-synthesizer.vueTemplateEdges has cyclomatic complexity 36 (threshold 15). Of this number, 27 points are the body's own statements and 9 belong to 4 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.
callback-synthesizer.springEventEdges (cyclomatic 36) src/resolution/callback-synthesizer.ts:4210— callback-synthesizer.springEventEdges 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.
ReferenceResolver.resolveOneIn (cyclomatic 36) REDACTED:1423— ReferenceResolver.resolveOneIn has cyclomatic complexity 36 (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.
ToolHandler.execute (cyclomatic 36) REDACTED:2898— ToolHandler.execute 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.
screens.attribute (cyclomatic 36) src/ui-server/api/screens.ts:448— screens.attribute 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.
rust-scopes.blankRustCode (cyclomatic 35) src/resolution/rust-scopes.ts:98— rust-scopes.blankRustCode has cyclomatic complexity 35 (threshold 15). Of this number, 33 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
name-matcher.pythonLineBindings (cyclomatic 35) src/resolution/name-matcher.ts:547— name-matcher.pythonLineBindings 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.
name-matcher.rustItemOf (cyclomatic 35) src/resolution/name-matcher.ts:10662— name-matcher.rustItemOf has cyclomatic complexity 35 (threshold 15). Of this number, 33 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.
import-resolver.resolvePythonModuleMember (cyclomatic 35) REDACTED:3384— import-resolver.resolvePythonModuleMember has cyclomatic complexity 35 (threshold 15). Of this number, 34 points are the body's own statements and 1 belongs to one function literal 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.
react.scanRoutes.jsx (cyclomatic 35) REDACTED:1250— react.scanRoutes.jsx has cyclomatic complexity 35 (threshold 15). Of this number, 28 points are the body's own statements and 7 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.
TreeSitterExtractor.pascalNameMode (cyclomatic 35) src/extraction/tree-sitter.ts:9543— TreeSitterExtractor.pascalNameMode has cyclomatic complexity 35 (threshold 15). Of this number, 34 points are the body's own statements and 1 belongs to one function literal 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.
angular-template-synthesizer.templateMemberUses (cyclomatic 35) src/resolution/angular-template-synthesizer.ts:468— angular-template-synthesizer.templateMemberUses has cyclomatic complexity 35 (threshold 15). Of this number, 32 points are the body's own statements and 3 belong to one function literal 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.
callback-synthesizer.nixOptionPathEdges (cyclomatic 35) src/resolution/callback-synthesizer.ts:4639— callback-synthesizer.nixOptionPathEdges has cyclomatic complexity 35 (threshold 15). Of this number, 31 points are the body's own statements and 4 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.
name-matcher.cppDeclaratorsAfterFirst (cyclomatic 34) src/resolution/name-matcher.ts:13582— name-matcher.cppDeclaratorsAfterFirst has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
tier-synthesizer.readRequestPath (cyclomatic 34) REDACTED:962— tier-synthesizer.readRequestPath has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
callback-synthesizer.laravelEventEdges (cyclomatic 34) src/resolution/callback-synthesizer.ts:4931— callback-synthesizer.laravelEventEdges has cyclomatic complexity 34 (threshold 15). Of this number, 29 points are the body's own statements and 5 belong to 4 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.
ToolHandler.handleNode (cyclomatic 34) REDACTED:7850— ToolHandler.handleNode has cyclomatic complexity 34 (threshold 15). Of this number, 32 points are the body's own statements and 2 belong to 2 function literals 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.
function-ref.captureFnRefCandidates (cyclomatic 33) src/extraction/function-ref.ts:434— function-ref.captureFnRefCandidates 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.
name-matcher.goSignature (cyclomatic 33) src/resolution/name-matcher.ts:2942— name-matcher.goSignature has cyclomatic complexity 33 (threshold 15). Of this number, 22 points are the body's own statements and 11 belong to 3 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.
name-matcher.rustReadType (cyclomatic 33) src/resolution/name-matcher.ts:10090— name-matcher.rustReadType has cyclomatic complexity 33 (threshold 15). Of this number, 31 points are the body's own statements and 2 belong to 2 function literals 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.
name-matcher.cppLibraryElementOf (cyclomatic 33) src/resolution/name-matcher.ts:14323— name-matcher.cppLibraryElementOf has cyclomatic complexity 33 (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.
TreeSitterExtractor.walkComponentWrapper (cyclomatic 33) src/extraction/tree-sitter.ts:2569— TreeSitterExtractor.walkComponentWrapper 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.
TreeSitterExtractor.extractPascalParenlessName (cyclomatic 33) src/extraction/tree-sitter.ts:9332— TreeSitterExtractor.extractPascalParenlessName has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
callback-synthesizer.closureCollectionEdges (cyclomatic 33) src/resolution/callback-synthesizer.ts:245— callback-synthesizer.closureCollectionEdges has cyclomatic complexity 33 (threshold 15). Of this number, 30 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.
c-cpp.recoverSingleArgMacroDefinedName (cyclomatic 32) REDACTED:126— c-cpp.recoverSingleArgMacroDefinedName 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.
strip-comments.stripGo (cyclomatic 32) src/resolution/strip-comments.ts:391— strip-comments.stripGo 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.
vbnet-receivers.matchVbMemberRead (cyclomatic 32) REDACTED:1728— vbnet-receivers.matchVbMemberRead has cyclomatic complexity 32 (threshold 15). Of this number, 22 points are the body's own statements and 10 belong to 6 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.
name-matcher.objcFileMembers (cyclomatic 32) src/resolution/name-matcher.ts:7472— name-matcher.objcFileMembers 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.
name-matcher.rustCrateGraph (cyclomatic 32) src/resolution/name-matcher.ts:8267— name-matcher.rustCrateGraph has cyclomatic complexity 32 (threshold 15). Of this number, 22 points are the body's own statements and 10 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.
java.extractSpringConfig (cyclomatic 32) src/resolution/frameworks/java.ts:339— java.extractSpringConfig has cyclomatic complexity 32 (threshold 15). Of this number, 19 points are the body's own statements and 13 belong to 3 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.
callback-synthesizer.arkuiEmitterEdges (cyclomatic 32) src/resolution/callback-synthesizer.ts:582— callback-synthesizer.arkuiEmitterEdges has cyclomatic complexity 32 (threshold 15). Of this number, 26 points are the body's own statements and 6 belong to 4 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.
dead-code.byNameHookCandidates (cyclomatic 32) src/graph/dead-code.ts:1007— dead-code.byNameHookCandidates has cyclomatic complexity 32 (threshold 15). Of this number, 27 points are the body's own statements and 5 belong to 4 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.
function-ref.goLocalBindings (cyclomatic 31) src/extraction/function-ref.ts:932— function-ref.goLocalBindings has cyclomatic complexity 31 (threshold 15). Of this number, 25 points are the body's own statements and 6 belong to 2 function items inside it that branch. 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.
name-matcher.cppLocalBindings (cyclomatic 31) src/resolution/name-matcher.ts:16539— name-matcher.cppLocalBindings has cyclomatic complexity 31 (threshold 15). Of this number, 25 points are the body's own statements and 6 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.
name-matcher.jsBindingSites (cyclomatic 31) src/resolution/name-matcher.ts:19335— name-matcher.jsBindingSites 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.
name-matcher.pythonFactoryTypeUncached (cyclomatic 31) src/resolution/name-matcher.ts:23561— name-matcher.pythonFactoryTypeUncached has cyclomatic complexity 31 (threshold 15). Of this number, 26 points are the body's own statements and 5 belong to one function literal 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.
name-matcher.destructuredKeyTarget (cyclomatic 31) src/resolution/name-matcher.ts:26480— name-matcher.destructuredKeyTarget has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 8 of the 31 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 26496, a function literal at line 26499, a function literal at line 26497, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
import-resolver.resolvePythonModule (cyclomatic 31) REDACTED:781— import-resolver.resolvePythonModule has cyclomatic complexity 31 (threshold 15). Of this number, 29 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TreeSitterExtractor.cppStackConstructions (cyclomatic 31) src/extraction/tree-sitter.ts:6625— TreeSitterExtractor.cppStackConstructions has cyclomatic complexity 31 (threshold 15). Of this number, 24 points are the body's own statements and 7 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.
callback-synthesizer.fieldChannelEdges (cyclomatic 31) src/resolution/callback-synthesizer.ts:165— callback-synthesizer.fieldChannelEdges has cyclomatic complexity 31 (threshold 15). Of this number, 28 points are the body's own statements and 3 belong to 2 function literals 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.
callback-synthesizer.mediatrDispatchEdges (cyclomatic 31) src/resolution/callback-synthesizer.ts:4338— callback-synthesizer.mediatrDispatchEdges has cyclomatic complexity 31 (threshold 15). Of this number, 28 points are the body's own statements and 3 belong to one function literal 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.
branch-guards.abbreviateArgument (cyclomatic 31) src/graph/branch-guards.ts:670— branch-guards.abbreviateArgument 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.
trail-store.parseTrail (cyclomatic 31) src/ui-server/api/trail-store.ts:156— trail-store.parseTrail 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.
seq-matrix.parse (cyclomatic 30) scripts/agent-eval/seq-matrix.mjs:30— seq-matrix.parse has cyclomatic complexity 30 (threshold 15). Of this number, 29 points are the body's own statements and 1 belongs to one function literal 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.
c-cpp.flattenMidStatementConditionals (cyclomatic 30) REDACTED:1646— c-cpp.flattenMidStatementConditionals 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.
name-matcher.matchDartAnnotation (cyclomatic 30) src/resolution/name-matcher.ts:5593— name-matcher.matchDartAnnotation has cyclomatic complexity 30 (threshold 15). Of this number, 24 points are the body's own statements and 6 belong to 3 function literals 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.
name-matcher.matchByQualifiedName (cyclomatic 30) src/resolution/name-matcher.ts:12069— name-matcher.matchByQualifiedName has cyclomatic complexity 30 (threshold 15). Of this number, 23 points are the body's own statements and 7 belong to 4 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.
name-matcher.goChainLinks (cyclomatic 30) src/resolution/name-matcher.ts:21694— name-matcher.goChainLinks has cyclomatic complexity 30 (threshold 15). Of this number, 26 points are the body's own statements and 4 belong to 3 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.
name-matcher.pythonLocalClassUncached (cyclomatic 30) src/resolution/name-matcher.ts:24020— name-matcher.pythonLocalClassUncached has cyclomatic complexity 30 (threshold 15). Of this number, 27 points are the body's own statements and 3 belong to 2 function literals 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.
import-resolver.buildPythonModuleIndex (cyclomatic 30) REDACTED:596— import-resolver.buildPythonModuleIndex has cyclomatic complexity 30 (threshold 15). Of this number, 24 points are the body's own statements and 6 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.
ReferenceResolver.resolveCfmlComponentPath (cyclomatic 30) REDACTED:3582— ReferenceResolver.resolveCfmlComponentPath has cyclomatic complexity 30 (threshold 15). Of this number, 27 points are the body's own statements and 3 belong to one function literal 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.
ReferenceResolver.resolveDeferredThisMemberRefs (cyclomatic 30) REDACTED:3811— ReferenceResolver.resolveDeferredThisMemberRefs has cyclomatic complexity 30 (threshold 15). Of this number, 22 points are the body's own statements and 8 belong to 3 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.
named-symbol-flow.walkBidirectional (cyclomatic 30) src/graph/named-symbol-flow.ts:492— named-symbol-flow.walkBidirectional has cyclomatic complexity 30 (threshold 15). Of this number, 28 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
screens-model.entryLayering (cyclomatic 30) ui/src/lib/screens-model.ts:161— screens-model.entryLayering has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 1 of the 30 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 166, 182, 184). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
router.svelte.parseHash (cyclomatic 30) ui/src/lib/router.svelte.ts:127— router.svelte.parseHash has cyclomatic complexity 30 (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.
parse-run.classifySufficiency (cyclomatic 29) scripts/agent-eval/parse-run.mjs:853— parse-run.classifySufficiency has cyclomatic complexity 29 (threshold 15). Of this number, 26 points are the body's own statements and 3 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.
strip-comments.stripRuby (cyclomatic 29) src/resolution/strip-comments.ts:201— strip-comments.stripRuby 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.
strip-comments.stripRust (cyclomatic 29) src/resolution/strip-comments.ts:464— strip-comments.stripRust 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.
name-matcher.isSwiftCallTarget (cyclomatic 29) src/resolution/name-matcher.ts:6666— name-matcher.isSwiftCallTarget 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.
name-matcher.goExprType (cyclomatic 29) src/resolution/name-matcher.ts:22324— name-matcher.goExprType 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.
react.exportedComponent (cyclomatic 29) REDACTED:537— react.exportedComponent has cyclomatic complexity 29 (threshold 15). Of this number, 27 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.
angular-router.constantText (cyclomatic 29) src/resolution/frameworks/angular-router.ts:487— angular-router.constantText has cyclomatic complexity 29 (threshold 15). Of this number, 24 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.
TreeSitterExtractor.flushFnRefCandidates (cyclomatic 29) src/extraction/tree-sitter.ts:1165— TreeSitterExtractor.flushFnRefCandidates 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.
callback-synthesizer.eventEmitterEdges (cyclomatic 29) src/resolution/callback-synthesizer.ts:322— callback-synthesizer.eventEmitterEdges has cyclomatic complexity 29 (threshold 15). Of this number, 27 points are the body's own statements and 2 belong to one function literal 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.
synthesized-hop.describeSynthesizedHop (cyclomatic 29) src/graph/synthesized-hop.ts:39— synthesized-hop.describeSynthesizedHop has cyclomatic complexity 29 (threshold 15). Of this number, 28 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ContextBuilder.buildCallPathsSection (cyclomatic 29) src/context/index.ts:373— ContextBuilder.buildCallPathsSection has cyclomatic complexity 29 (threshold 15). Of this number, 19 points are the body's own statements and 10 belong to 5 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.
cobol.walkDataEntries (cyclomatic 28) src/extraction/languages/cobol.ts:177— cobol.walkDataEntries has cyclomatic complexity 28 (threshold 15). Of this number, 15 points are the body's own statements and 13 belong to 4 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.
decode.decodeExtractBuffers (cyclomatic 28) src/extraction/kernel/decode.ts:63— decode.decodeExtractBuffers 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.
dart-libraries.addDirective (cyclomatic 28) src/resolution/dart-libraries.ts:251— dart-libraries.addDirective 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.
cpp-supertypes.cppClassWritten (cyclomatic 28) src/resolution/cpp-supertypes.ts:181— cpp-supertypes.cppClassWritten has cyclomatic complexity 28 (threshold 15). Of this number, 25 points are the body's own statements and 3 belong to 3 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.
name-matcher.withinCppTranslationUnit (cyclomatic 28) src/resolution/name-matcher.ts:1887— name-matcher.withinCppTranslationUnit has cyclomatic complexity 28 (threshold 15). Of this number, 23 points are the body's own statements and 5 belong to 2 function literals inside it that branch. 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.
name-matcher.isScalaMemberInScope (cyclomatic 28) src/resolution/name-matcher.ts:6753— name-matcher.isScalaMemberInScope has cyclomatic complexity 28 (threshold 15). Of this number, 26 points are the body's own statements and 2 belong to one function literal 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.
name-matcher.cppDataMemberIn (cyclomatic 28) src/resolution/name-matcher.ts:14028— name-matcher.cppDataMemberIn 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.
name-matcher.pythonParamAnnotation (cyclomatic 28) src/resolution/name-matcher.ts:23940— name-matcher.pythonParamAnnotation 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.
TreeSitterExtractor.vbReceiverPath (cyclomatic 28) src/extraction/tree-sitter.ts:6851— TreeSitterExtractor.vbReceiverPath 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.
ExtractionOrchestrator.storeExtractionResult (cyclomatic 28) src/extraction/index.ts:3041— ExtractionOrchestrator.storeExtractionResult has cyclomatic complexity 28 (threshold 15). Of this number, 20 points are the body's own statements and 8 belong to 3 function literals 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.
type-parameters.gateTypeParameter (cyclomatic 28) src/resolution/type-parameters.ts:50— type-parameters.gateTypeParameter has cyclomatic complexity 28 (threshold 15). Of this number, 26 points are the body's own statements and 2 belong to one function literal 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.
callback-synthesizer.goPromotions (cyclomatic 28) src/resolution/callback-synthesizer.ts:1485— callback-synthesizer.goPromotions has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to 6 function items inside it that branch (a function literal at line 1539, kindOf, ifaceMethods, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
symbol-lookup.matchesSymbol (cyclomatic 28) src/graph/symbol-lookup.ts:65— symbol-lookup.matchesSymbol 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, 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.
named-symbol-flow.resolveNamedTokens (cyclomatic 28) src/graph/named-symbol-flow.ts:278— named-symbol-flow.resolveNamedTokens has cyclomatic complexity 28 (threshold 15). Of this number, 25 points are the body's own statements and 3 belong to one function literal 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.
index.runUpgrade (cyclomatic 28) src/upgrade/index.ts:421— index.runUpgrade 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.
query-utils.getStemVariants (cyclomatic 27) src/search/query-utils.ts:85— query-utils.getStemVariants has cyclomatic complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
dart.dartMisparsedGenericCall (cyclomatic 27) src/extraction/languages/dart.ts:213— dart.dartMisparsedGenericCall has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
pascal-preparse.holdsBody (cyclomatic 27) src/extraction/languages/pascal-preparse.ts:503— pascal-preparse.holdsBody 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.
cpp-macro-methods.bodyOpenAfter (cyclomatic 27) src/extraction/languages/cpp-macro-methods.ts:263— cpp-macro-methods.bodyOpenAfter 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.
sfc-script.foldScriptResult (cyclomatic 27) src/extraction/sfc-script.ts:87— sfc-script.foldScriptResult 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
name-matcher.pythonGlobalReceiverTarget (cyclomatic 27) src/resolution/name-matcher.ts:970— name-matcher.pythonGlobalReceiverTarget has cyclomatic complexity 27 (threshold 15). Of this number, 17 points are the body's own statements and 10 belong to 4 function literals inside it that branch. 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.
name-matcher.readDartChain (cyclomatic 27) src/resolution/name-matcher.ts:4772— name-matcher.readDartChain has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
name-matcher.matchRustSelfPath (cyclomatic 27) src/resolution/name-matcher.ts:9500— name-matcher.matchRustSelfPath has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 8 of the 27 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 9513, pick, a function literal at line 9511). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
name-matcher.rustSiteType (cyclomatic 27) src/resolution/name-matcher.ts:10710— name-matcher.rustSiteType 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.
name-matcher.readRustDeclaredFields (cyclomatic 27) src/resolution/name-matcher.ts:10780— name-matcher.readRustDeclaredFields has cyclomatic complexity 27 (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.
name-matcher.rustFieldChainAt (cyclomatic 27) src/resolution/name-matcher.ts:24655— name-matcher.rustFieldChainAt 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.
angular-router.angularRouteTable (cyclomatic 27) src/resolution/frameworks/angular-router.ts:704— angular-router.angularRouteTable 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.
module-importers.passedOn (cyclomatic 27) src/resolution/module-importers.ts:575— module-importers.passedOn has cyclomatic complexity 27 (threshold 15). Of this number, 22 points are the body's own statements and 5 belong to 3 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.
callback-synthesizer.goListItems (cyclomatic 27) src/resolution/callback-synthesizer.ts:887— callback-synthesizer.goListItems 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.
callback-synthesizer.ginMiddlewareChainEdges (cyclomatic 27) src/resolution/callback-synthesizer.ts:3436— callback-synthesizer.ginMiddlewareChainEdges has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to one function literal 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.
callback-synthesizer.objectRegistryEdges (cyclomatic 27) src/resolution/callback-synthesizer.ts:3762— callback-synthesizer.objectRegistryEdges 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.
ReferenceResolver.hasAnyPossibleMatch (cyclomatic 27) REDACTED:1207— ReferenceResolver.hasAnyPossibleMatch 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ReferenceResolver.pythonAttrRetryCandidates (cyclomatic 27) REDACTED:1327— ReferenceResolver.pythonAttrRetryCandidates has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 12 of the 27 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 1385, assignedCallees, a function literal at line 1335). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
ReferenceResolver.manifestScope (cyclomatic 27) REDACTED:4352— ReferenceResolver.manifestScope 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.
effects.modelOf (cyclomatic 27) src/ui-server/api/effects.ts:359— effects.modelOf 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.
steps.buildSteps.link (cyclomatic 27) src/ui-server/api/steps.ts:983— steps.buildSteps.link has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to 2 function literals 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.
QueryBuilder.searchNodes (cyclomatic 26) src/db/queries.ts:1666— QueryBuilder.searchNodes has cyclomatic complexity 26 (threshold 15). Of this number, 25 points are the body's own statements and 1 belongs to one function literal 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.
vue-options-api.objectMembers (cyclomatic 26) REDACTED:101— vue-options-api.objectMembers 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.
c-feature-variants.evaluate (cyclomatic 26) src/resolution/c-feature-variants.ts:189— c-feature-variants.evaluate has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 4 of the 26 points are its own statements and the rest belongs to 5 function items inside it that branch (shape::term, term, shape, …). 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.
ambient-modules.scanGlobalScope (cyclomatic 26) src/resolution/ambient-modules.ts:250— ambient-modules.scanGlobalScope has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to one function literal inside it that branches (line 258). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
name-matcher.typeDartChain (cyclomatic 26) src/resolution/name-matcher.ts:4842— name-matcher.typeDartChain 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.
name-matcher.resolveObjectLiteralBinding (cyclomatic 26) src/resolution/name-matcher.ts:12416— name-matcher.resolveObjectLiteralBinding has cyclomatic complexity 26 (threshold 15). Of this number, 14 points are the body's own statements and 12 belong to 5 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.
name-matcher.isCppLocalCallableCall (cyclomatic 26) src/resolution/name-matcher.ts:16620— name-matcher.isCppLocalCallableCall has cyclomatic complexity 26 (threshold 15). Of this number, 25 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, 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.
name-matcher.matchGoFieldChainCall (cyclomatic 26) src/resolution/name-matcher.ts:24150— name-matcher.matchGoFieldChainCall has cyclomatic complexity 26 (threshold 15). Of this number, 24 points are the body's own statements and 2 belong to one function literal 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.
name-matcher.findBestMatch (cyclomatic 26) src/resolution/name-matcher.ts:26787— name-matcher.findBestMatch 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.
import-resolver.declaredPythonRoots (cyclomatic 26) REDACTED:665— import-resolver.declaredPythonRoots has cyclomatic complexity 26 (threshold 15). Of this number, 23 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
express.regexLiteralEndAt (cyclomatic 26) REDACTED:439— express.regexLiteralEndAt has cyclomatic complexity 26 (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.
react.tableRoutes (cyclomatic 26) REDACTED:1984— react.tableRoutes has cyclomatic complexity 26 (threshold 15). Of this number, 21 points are the body's own statements and 5 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.
next-router-synthesizer.nextLinkEdges (cyclomatic 26) src/resolution/next-router-synthesizer.ts:41— next-router-synthesizer.nextLinkEdges 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.
tier-synthesizer.collectTestRequests (cyclomatic 26) REDACTED:1119— tier-synthesizer.collectTestRequests has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 9 of the 26 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 1167, add, a function literal at line 1152, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
callback-synthesizer.erlangArityAt (cyclomatic 26) src/resolution/callback-synthesizer.ts:4537— callback-synthesizer.erlangArityAt 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.
ReferenceResolver.reopenNavigationsFor (cyclomatic 26) REDACTED:3104— ReferenceResolver.reopenNavigationsFor has cyclomatic complexity 26 (threshold 15). Of this number, 25 points are the body's own statements and 1 belongs to one function literal 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.
effects.responseStatus (cyclomatic 26) src/ui-server/api/effects.ts:428— effects.responseStatus 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.
steps.buildSteps.effectLink (cyclomatic 26) src/ui-server/api/steps.ts:898— steps.buildSteps.effectLink has cyclomatic complexity 26 (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.
strip-comments.blankStringContents (cyclomatic 25) src/resolution/strip-comments.ts:40— strip-comments.blankStringContents 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.
strip-comments.stripPhp (cyclomatic 25) src/resolution/strip-comments.ts:331— strip-comments.stripPhp 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.
swift-type-visibility.resolveSwiftTypePathCall (cyclomatic 25) src/resolution/swift-type-visibility.ts:365— swift-type-visibility.resolveSwiftTypePathCall has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 10 of the 25 points are its own statements and the rest belongs to 3 function items inside it that branch (onPath, a function literal at line 401, a function literal at line 392). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
name-matcher.pythonExternalWrites (cyclomatic 25) src/resolution/name-matcher.ts:849— name-matcher.pythonExternalWrites has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to one function literal inside it that branches (line 850). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
name-matcher.goFileConstraint (cyclomatic 25) src/resolution/name-matcher.ts:21552— name-matcher.goFileConstraint has cyclomatic complexity 25 (threshold 15). Of this number, 24 points are the body's own statements and 1 belongs to one function literal 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.
name-matcher.tsFieldElementType (cyclomatic 25) src/resolution/name-matcher.ts:25129— name-matcher.tsFieldElementType has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
express.handlerRefs (cyclomatic 25) REDACTED:518— express.handlerRefs 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.
react.readObjectPath (cyclomatic 25) REDACTED:431— react.readObjectPath has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 9 of the 25 points are its own statements and the rest belongs to 2 function items inside it that branch (skipValue, skipString). 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.
react.statementEnd (cyclomatic 25) REDACTED:1785— react.statementEnd 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.
vue-router.parseVueRoutes::visit (cyclomatic 25) src/resolution/frameworks/vue-router.ts:144— vue-router.parseVueRoutes::visit 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.
swift.resolveVaporHandler (cyclomatic 25) REDACTED:492— swift.resolveVaporHandler has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 10 of the 25 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 536, 495, 504, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
TreeSitterExtractor.curriedWrapperBoundName (cyclomatic 25) src/extraction/tree-sitter.ts:7368— TreeSitterExtractor.curriedWrapperBoundName has cyclomatic complexity 25 (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.
TreeSitterExtractor.extractTypeAnnotations (cyclomatic 25) src/extraction/tree-sitter.ts:8211— TreeSitterExtractor.extractTypeAnnotations has cyclomatic complexity 25 (threshold 15). Of this number, 22 points are the body's own statements and 3 belong to one function literal 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.
TreeSitterExtractor.extractPascalCall (cyclomatic 25) src/extraction/tree-sitter.ts:9061— TreeSitterExtractor.extractPascalCall 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.
goframe-synthesizer.goframeRouteEdges (cyclomatic 25) src/resolution/goframe-synthesizer.ts:77— goframe-synthesizer.goframeRouteEdges 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.
react-router-synthesizer.reactRouterLinkEdges (cyclomatic 25) REDACTED:118— react-router-synthesizer.reactRouterLinkEdges 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.
vue-router-synthesizer.vueRouterLinkEdges (cyclomatic 25) src/resolution/vue-router-synthesizer.ts:47— vue-router-synthesizer.vueRouterLinkEdges 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.
callback-synthesizer.piniaStoreEdges (cyclomatic 25) src/resolution/callback-synthesizer.ts:3916— callback-synthesizer.piniaStoreEdges has cyclomatic complexity 25 (threshold 15). Of this number, 24 points are the body's own statements and 1 belongs to one function literal 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.
probe-allocation.evaluate (cyclomatic 24) REDACTED:129— probe-allocation.evaluate 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.
vue-template-calls.parseOpenTag (cyclomatic 24) src/extraction/vue-template-calls.ts:228— vue-template-calls.parseOpenTag has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
strip-comments.stripPython (cyclomatic 24) src/resolution/strip-comments.ts:139— strip-comments.stripPython 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.
strip-comments.stripCStyle (cyclomatic 24) src/resolution/strip-comments.ts:279— strip-comments.stripCStyle 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.
workspace-packages.collectPathDeps (cyclomatic 24) src/resolution/workspace-packages.ts:291— workspace-packages.collectPathDeps 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.
name-matcher.kotlinLambdaReceiver (cyclomatic 24) src/resolution/name-matcher.ts:6291— name-matcher.kotlinLambdaReceiver has cyclomatic complexity 24 (threshold 15). Of this number, 17 points are the body's own statements and 7 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.
name-matcher.objcMemberReceiverType (cyclomatic 24) src/resolution/name-matcher.ts:7600— name-matcher.objcMemberReceiverType has cyclomatic complexity 24 (threshold 15). Of this number, 18 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
name-matcher.rustUsesOf (cyclomatic 24) src/resolution/name-matcher.ts:8377— name-matcher.rustUsesOf has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
name-matcher.jsBodyEnd (cyclomatic 24) src/resolution/name-matcher.ts:11507— name-matcher.jsBodyEnd has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
name-matcher.resolveObjectLiteralMember (cyclomatic 24) src/resolution/name-matcher.ts:12283— name-matcher.resolveObjectLiteralMember has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 11 of the 24 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 12319, valueMember, a function literal at line 12304, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
name-matcher.cppScopeMethod (cyclomatic 24) src/resolution/name-matcher.ts:15707— name-matcher.cppScopeMethod has cyclomatic complexity 24 (threshold 15). Of this number, 15 points are the body's own statements and 9 belong to 3 function literals 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.
name-matcher.matchGoPackageValueCall (cyclomatic 24) src/resolution/name-matcher.ts:21308— name-matcher.matchGoPackageValueCall has cyclomatic complexity 24 (threshold 15). Of this number, 21 points are the body's own statements and 3 belong to one function literal inside it that branches. 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.
import-resolver.isExternalImport (cyclomatic 24) REDACTED:1114— import-resolver.isExternalImport 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.
react.readObjectValue (cyclomatic 24) REDACTED:391— react.readObjectValue has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 8 of the 24 points are its own statements and the rest belongs to 2 function items inside it that branch (skipValue, skipString). 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.
react.valueOf (cyclomatic 24) REDACTED:1809— react.valueOf has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal 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.
TreeSitterExtractor.extractMethod (cyclomatic 24) src/extraction/tree-sitter.ts:2744— TreeSitterExtractor.extractMethod has cyclomatic complexity 24 (threshold 15). Of this number, 18 points are the body's own statements and 6 belong to one function literal 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.
TreeSitterExtractor.extractDecoratorsFor::consider (cyclomatic 24) src/extraction/tree-sitter.ts:7028— TreeSitterExtractor.extractDecoratorsFor::consider has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (TreeSitterExtractor.extractDecoratorsFor) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
TreeSitterExtractor.extractDecoratorsFor (cyclomatic 24) src/extraction/tree-sitter.ts:7012— TreeSitterExtractor.extractDecoratorsFor has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (TreeSitterExtractor.extractDecoratorsFor::consider) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
tree-sitter.extractFromSource (cyclomatic 24) src/extraction/tree-sitter.ts:9633— tree-sitter.extractFromSource has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal 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.
ExtractionOrchestrator.getChangedFiles (cyclomatic 24) src/extraction/index.ts:3858— ExtractionOrchestrator.getChangedFiles 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.
cpp-constructor.matchCppConstructor (cyclomatic 24) src/resolution/cpp-constructor.ts:83— cpp-constructor.matchCppConstructor has cyclomatic complexity 24 (threshold 15). Of this number, 18 points are the body's own statements and 6 belong to 3 function literals 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.
ReferenceResolver.createEdges (cyclomatic 24) REDACTED:1917— ReferenceResolver.createEdges has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 1918, 1982). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
type-hierarchy.walkDescendants (cyclomatic 24) src/graph/type-hierarchy.ts:243— type-hierarchy.walkDescendants 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.
branch-guards.returnsInTree (cyclomatic 24) src/graph/branch-guards.ts:2123— branch-guards.returnsInTree has cyclomatic complexity 24 (threshold 15). Of this number, 12 points are the body's own statements and 12 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.
named-symbol-flow.resolveNamedSymbolFlow (cyclomatic 24) src/graph/named-symbol-flow.ts:603— named-symbol-flow.resolveNamedSymbolFlow has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal 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.
ToolHandler.handleExplore::shrinkCluster (cyclomatic 24) REDACTED:6910— ToolHandler.handleExplore::shrinkCluster has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (ToolHandler.handleExplore) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
node.buildNode (cyclomatic 24) src/ui-server/api/node.ts:77— node.buildNode has cyclomatic complexity 24 (threshold 15). Of this number, 16 points are the body's own statements and 8 belong to 3 function literals 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.
effects.classifyEffect (cyclomatic 24) src/ui-server/api/effects.ts:296— effects.classifyEffect 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.
index.handleRequest (cyclomatic 24) REDACTED:237— index.handleRequest 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.
c-cpp.blankCppAnnotationMacroCalls (cyclomatic 23) REDACTED:1167— c-cpp.blankCppAnnotationMacroCalls 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.
pascal-preparse.scanForInVariable (cyclomatic 23) src/extraction/languages/pascal-preparse.ts:363— pascal-preparse.scanForInVariable 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.
dart-local-scope.bindParameters (cyclomatic 23) src/resolution/dart-local-scope.ts:151— dart-local-scope.bindParameters 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.
name-matcher.pythonAssignment (cyclomatic 23) src/resolution/name-matcher.ts:517— name-matcher.pythonAssignment 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.pythonConstructorCall (cyclomatic 23) src/resolution/name-matcher.ts:1033— name-matcher.pythonConstructorCall 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.luaAliasExpr (cyclomatic 23) src/resolution/name-matcher.ts:2045— name-matcher.luaAliasExpr has cyclomatic complexity 23 (threshold 15). Of this number, 14 points are the body's own statements and 9 belong to 2 function literals 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.cppMethodOf (cyclomatic 23) src/resolution/name-matcher.ts:15293— name-matcher.cppMethodOf has cyclomatic complexity 23 (threshold 15). Of this number, 20 points are the body's own statements and 3 belong to 2 function literals 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.goClosingBracket (cyclomatic 23) src/resolution/name-matcher.ts:21748— name-matcher.goClosingBracket 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.pythonExprScan (cyclomatic 23) src/resolution/name-matcher.ts:22888— name-matcher.pythonExprScan 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.matchTsThisFieldCall (cyclomatic 23) src/resolution/name-matcher.ts:25699— name-matcher.matchTsThisFieldCall has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 9 of the 23 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 25749, held, a function literal at line 25724, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.tsFieldCall (cyclomatic 23) src/resolution/name-matcher.ts:25871— name-matcher.tsFieldCall has cyclomatic complexity 23 (threshold 15). Of this number, 14 points are the body's own statements and 9 belong to 4 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
import-resolver.importBindingTail (cyclomatic 23) REDACTED:4400— import-resolver.importBindingTail has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
express.scanCall (cyclomatic 23) REDACTED:379— express.scanCall 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.
angular-router.destinationOf (cyclomatic 23) src/resolution/frameworks/angular-router.ts:934— angular-router.destinationOf 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.
terraform.resolveScopedModuleRef (cyclomatic 23) REDACTED:129— terraform.resolveScopedModuleRef has cyclomatic complexity 23 (threshold 15). Of this number, 20 points are the body's own statements and 3 belong to 2 function literals 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.
TreeSitterExtractor.extract (cyclomatic 23) src/extraction/tree-sitter.ts:945— TreeSitterExtractor.extract has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
type-parameters.scalaMemberInScope (cyclomatic 23) src/resolution/type-parameters.ts:117— type-parameters.scalaMemberInScope has cyclomatic complexity 23 (threshold 15). Of this number, 18 points are the body's own statements and 5 belong to 3 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.
callback-synthesizer.vuexDispatchEdges (cyclomatic 23) src/resolution/callback-synthesizer.ts:4004— callback-synthesizer.vuexDispatchEdges has cyclomatic complexity 23 (threshold 15). Of this number, 14 points are the body's own statements and 9 belong to 3 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.
callback-synthesizer.celeryDispatchEdges (cyclomatic 23) src/resolution/callback-synthesizer.ts:4097— callback-synthesizer.celeryDispatchEdges has cyclomatic complexity 23 (threshold 15). Of this number, 13 points are the body's own statements and 10 belong to 3 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.
callback-synthesizer.sidekiqDispatchEdges (cyclomatic 23) src/resolution/callback-synthesizer.ts:4429— callback-synthesizer.sidekiqDispatchEdges has cyclomatic complexity 23 (threshold 15). Of this number, 12 points are the body's own statements and 11 belong to 5 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.
ToolHandler.withStalenessNotice (cyclomatic 23) REDACTED:2796— ToolHandler.withStalenessNotice has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
map.buildMap (cyclomatic 23) src/ui-server/api/map.ts:582— map.buildMap has cyclomatic complexity 23 (threshold 15). Of this number, 20 points are the body's own statements and 3 belong to 3 function literals 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.
codegraph.main::printIndexResult (cyclomatic 23) src/bin/codegraph.ts:418— codegraph.main::printIndexResult 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.
parse-arms.parse (cyclomatic 22) scripts/agent-eval/parse-arms.mjs:23— parse-arms.parse has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal 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.
grammars.detectLanguage (cyclomatic 22) src/extraction/grammars.ts:595— grammars.detectLanguage has cyclomatic complexity 22 (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.
c-cpp.followsDeclaredName (cyclomatic 22) REDACTED:842— c-cpp.followsDeclaredName has cyclomatic complexity 22 (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.
vbnet-receivers.extensionFor (cyclomatic 22) REDACTED:1304— vbnet-receivers.extensionFor has cyclomatic complexity 22 (threshold 15). Of this number, 17 points are the body's own statements and 5 belong to 2 function literals inside it that branch. 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.
cpp-raw-strings.cppLiteralsBlanked (cyclomatic 22) src/resolution/cpp-raw-strings.ts:115— cpp-raw-strings.cppLiteralsBlanked has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
name-matcher.isLexicallyReachable (cyclomatic 22) src/resolution/name-matcher.ts:1300— name-matcher.isLexicallyReachable has cyclomatic complexity 22 (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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.isUnexportedModuleBinding (cyclomatic 22) src/resolution/name-matcher.ts:1656— name-matcher.isUnexportedModuleBinding has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.luaLocalDecl (cyclomatic 22) src/resolution/name-matcher.ts:2001— name-matcher.luaLocalDecl has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 belong to 3 function literals 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.dartLocalType (cyclomatic 22) src/resolution/name-matcher.ts:5160— name-matcher.dartLocalType has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.isKotlinMemberReachable (cyclomatic 22) src/resolution/name-matcher.ts:6359— name-matcher.isKotlinMemberReachable 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.rustUseTreeBindings::read (cyclomatic 22) src/resolution/name-matcher.ts:8455— name-matcher.rustUseTreeBindings::read has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.matchKotlinCallResultCall (cyclomatic 22) src/resolution/name-matcher.ts:17800— name-matcher.matchKotlinCallResultCall has cyclomatic complexity 22 (threshold 15). Of this number, 15 points are the body's own statements and 7 belong to 4 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.destructuredParameterBody (cyclomatic 22) src/resolution/name-matcher.ts:19425— name-matcher.destructuredParameterBody has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.retargetSelfOverload (cyclomatic 22) src/resolution/name-matcher.ts:27204— name-matcher.retargetSelfOverload has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.cppTemplateArgumentsEnd (cyclomatic 22) src/resolution/name-matcher.ts:27758— name-matcher.cppTemplateArgumentsEnd has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
import-resolver.loadCppIncludeDirsFromCompileDB (cyclomatic 22) REDACTED:1572— import-resolver.loadCppIncludeDirsFromCompileDB 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.
package-deps.declaredDependencies (cyclomatic 22) src/resolution/frameworks/package-deps.ts:38— package-deps.declaredDependencies 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.
object-literal.readFields (cyclomatic 22) src/resolution/frameworks/object-literal.ts:78— object-literal.readFields 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.
react.blockValue (cyclomatic 22) REDACTED:1710— react.blockValue 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.
TreeSitterExtractor.emitRustUseBindingRefs (cyclomatic 22) src/extraction/tree-sitter.ts:5018— TreeSitterExtractor.emitRustUseBindingRefs has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to 2 function items inside it that branch (collect, join). 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.
TreeSitterExtractor.extractPascalDefProc (cyclomatic 22) src/extraction/tree-sitter.ts:8839— TreeSitterExtractor.extractPascalDefProc has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
module-importers.reopenNameMatchedImports (cyclomatic 22) src/resolution/module-importers.ts:301— module-importers.reopenNameMatchedImports 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.
index.collectIncludedFiles (cyclomatic 22) src/extraction/index.ts:688— index.collectIncludedFiles has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 3 of the 22 points are its own statements and the rest belongs to 2 function items inside it that branch (walk, consider). 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.
cpp-constructor.constructorShape (cyclomatic 22) src/resolution/cpp-constructor.ts:31— cpp-constructor.constructorShape has cyclomatic complexity 22 (threshold 15). Of this number, 19 points are the body's own statements and 3 belong to 3 function literals 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.
tanstack-router-synthesizer.tanstackLinkEdges (cyclomatic 22) src/resolution/tanstack-router-synthesizer.ts:49— tanstack-router-synthesizer.tanstackLinkEdges 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.
sveltekit-synthesizer.svelteKitLinkEdges (cyclomatic 22) src/resolution/sveltekit-synthesizer.ts:55— sveltekit-synthesizer.svelteKitLinkEdges 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.
tier-synthesizer.collectQueue (cyclomatic 22) REDACTED:667— tier-synthesizer.collectQueue has cyclomatic complexity 22 (threshold 15). Of this number, 19 points are the body's own statements and 3 belong to one function literal 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.
ReferenceResolver.changedDefaultExports (cyclomatic 22) REDACTED:3184— ReferenceResolver.changedDefaultExports has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GraphTraverser.traverseBFS (cyclomatic 22) src/graph/traversal.ts:48— GraphTraverser.traverseBFS has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 belong to 3 function literals 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.
FileWatcher.flush (cyclomatic 22) src/sync/watcher.ts:997— FileWatcher.flush 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.
ToolHandler.handleStatus (cyclomatic 22) REDACTED:8278— ToolHandler.handleStatus 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.
tools.allocateExploreBudget (cyclomatic 22) REDACTED:793— tools.allocateExploreBudget has cyclomatic complexity 22 (threshold 15). Of this number, 19 points are the body's own statements and 3 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.
route-roots.routeRoots (cyclomatic 22) src/ui-server/api/route-roots.ts:73— route-roots.routeRoots has cyclomatic complexity 22 (threshold 15). Of this number, 11 points are the body's own statements and 11 belong to 6 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.
steps.buildSteps.stepFor (cyclomatic 22) src/ui-server/api/steps.ts:753— steps.buildSteps.stepFor 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.
flow.buildFlow (cyclomatic 22) src/ui-server/api/flow.ts:669— flow.buildFlow has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to one function literal 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.
render-check.main (cyclomatic 22) telemetry-dashboard/scripts/render-check.mjs:231— render-check.main has cyclomatic complexity 22 (threshold 15). Of this number, 14 points are the body's own statements and 8 belong to 5 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.
writer-lock.tryAcquireWriterLock (cyclomatic 21) src/mcp/writer-lock.ts:76— writer-lock.tryAcquireWriterLock has cyclomatic complexity 21 (threshold 15). Of this number, 14 points are the body's own statements and 7 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.
cpp-macro-methods.cppDefinitionHeads (cyclomatic 21) src/extraction/languages/cpp-macro-methods.ts:304— cpp-macro-methods.cppDefinitionHeads 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.
workspace-packages.loadWorkspacePackages (cyclomatic 21) src/resolution/workspace-packages.ts:116— workspace-packages.loadWorkspacePackages 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.
dart-libraries.readString (cyclomatic 21) src/resolution/dart-libraries.ts:113— dart-libraries.readString 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.
name-matcher.localDeclarationScope (cyclomatic 21) src/resolution/name-matcher.ts:1349— name-matcher.localDeclarationScope has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.pythonFixtureReturnType (cyclomatic 21) src/resolution/name-matcher.ts:3935— name-matcher.pythonFixtureReturnType has cyclomatic complexity 21 (threshold 15). Of this number, 16 points are the body's own statements and 5 belong to 2 function literals 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.kotlinHierarchyAt (cyclomatic 21) src/resolution/name-matcher.ts:6191— name-matcher.kotlinHierarchyAt has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.rustSelfParamBounds (cyclomatic 21) src/resolution/name-matcher.ts:10547— name-matcher.rustSelfParamBounds has cyclomatic complexity 21 (threshold 15). Of this number, 16 points are the body's own statements and 5 belong to one function literal inside it that branches. 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.rustTraitImplemented (cyclomatic 21) src/resolution/name-matcher.ts:10921— name-matcher.rustTraitImplemented has cyclomatic complexity 21 (threshold 15). Of this number, 16 points are the body's own statements and 5 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.cppRangeElementOf (cyclomatic 21) src/resolution/name-matcher.ts:14250— name-matcher.cppRangeElementOf 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.matchDottedCallChain (cyclomatic 21) src/resolution/name-matcher.ts:17541— name-matcher.matchDottedCallChain has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.matchGoIndexedCall (cyclomatic 21) src/resolution/name-matcher.ts:21926— name-matcher.matchGoIndexedCall has cyclomatic complexity 21 (threshold 15). Of this number, 16 points are the body's own statements and 5 belong to 2 function items inside it that branch. 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.readDestructuredBindings (cyclomatic 21) src/resolution/name-matcher.ts:26305— name-matcher.readDestructuredBindings has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.splitCppTopLevel (cyclomatic 21) src/resolution/name-matcher.ts:27723— name-matcher.splitCppTopLevel has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
import-resolver.pythonPackageImporters (cyclomatic 21) REDACTED:934— import-resolver.pythonPackageImporters has cyclomatic complexity 21 (threshold 15). Of this number, 15 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
import-resolver.collectRustUseBindings (cyclomatic 21) REDACTED:4228— import-resolver.collectRustUseBindings has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to one function item inside it that branches (expand). 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.
react.ownReturns (cyclomatic 21) REDACTED:2292— react.ownReturns has cyclomatic complexity 21 (threshold 15). Of this number, 16 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.
tanstack-router.parseTanstackRoutes (cyclomatic 21) src/resolution/frameworks/tanstack-router.ts:167— tanstack-router.parseTanstackRoutes has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal 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.
index.scanDirectoryWalk::walk (cyclomatic 21) src/extraction/index.ts:1803— index.scanDirectoryWalk::walk 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.
c-fnptr-synthesizer.evalConditionals (cyclomatic 21) REDACTED:234— c-fnptr-synthesizer.evalConditionals has cyclomatic complexity 21 (threshold 15). Of this number, 18 points are the body's own statements and 3 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.
override-parameters.topLevelIndex (cyclomatic 21) REDACTED:358— override-parameters.topLevelIndex has cyclomatic complexity 21 (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.
callback-synthesizer.constantEventName (cyclomatic 21) src/resolution/callback-synthesizer.ts:2837— callback-synthesizer.constantEventName has cyclomatic complexity 21 (threshold 15). Of this number, 16 points are the body's own statements and 5 belong to 3 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.
query-paths.stripWrapping (cyclomatic 21) src/search/query-paths.ts:216— query-paths.stripWrapping 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.
ToolHandler.handleCallers (cyclomatic 21) REDACTED:3229— ToolHandler.handleCallers has cyclomatic complexity 21 (threshold 15). Of this number, 17 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (ToolHandler.handleCallees) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ToolHandler.handleCallees (cyclomatic 21) REDACTED:3312— ToolHandler.handleCallees has cyclomatic complexity 21 (threshold 15). Of this number, 17 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (ToolHandler.handleCallers) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
project-lifecycle.activate (cyclomatic 21) src/mcp/project-lifecycle.ts:119— project-lifecycle.activate has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal 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.
screens.mentionsOf (cyclomatic 21) src/ui-server/api/screens.ts:581— screens.mentionsOf has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to one function literal 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.
resolver-worker.port.on("message") (cyclomatic 21) src/resolution/resolver-worker.ts:50— resolver-worker.port.on("message") has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to one function literal 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.
program-model.buildOrderModel (cyclomatic 21) ui/src/lib/program-model.ts:328— program-model.buildOrderModel has cyclomatic complexity 21 (threshold 15). Of this number, 17 points are the body's own statements and 4 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.
gen-go-stdlib-methods.methodsOf (cyclomatic 20) REDACTED:100— gen-go-stdlib-methods.methodsOf has cyclomatic complexity 20 (threshold 15). Of this number, 13 points are the body's own statements and 7 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.
daemon-registry.daemonStopFailureMessage (cyclomatic 20) src/mcp/daemon-registry.ts:357— daemon-registry.daemonStopFailureMessage 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.
query-parser.parseQuery (cyclomatic 20) src/search/query-parser.ts:66— query-parser.parseQuery 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.
tree-sitter-helpers.getPrecedingDocstring (cyclomatic 20) src/extraction/tree-sitter-helpers.ts:170— tree-sitter-helpers.getPrecedingDocstring has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal 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.
function-ref.normalizeValue (cyclomatic 20) src/extraction/function-ref.ts:551— function-ref.normalizeValue 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.
c-cpp.blankLoneMacroLines (cyclomatic 20) REDACTED:1325— c-cpp.blankLoneMacroLines 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.
pascal-preparse.wrapAlternativeStatements (cyclomatic 20) src/extraction/languages/pascal-preparse.ts:800— pascal-preparse.wrapAlternativeStatements 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.
pascal-preparse.recordEnd (cyclomatic 20) src/extraction/languages/pascal-preparse.ts:892— pascal-preparse.recordEnd 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.
cpp-macro-methods.cppMacroMethods (cyclomatic 20) src/extraction/languages/cpp-macro-methods.ts:92— cpp-macro-methods.cppMacroMethods has cyclomatic complexity 20 (threshold 15). Of this number, 14 points are the body's own statements and 6 belong to one function literal 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.
CfmlExtractor.delegateScriptTag (cyclomatic 20) src/extraction/cfml-extractor.ts:632— CfmlExtractor.delegateScriptTag has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to 2 function literals 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.
dart-local-scope.gateDartLocal (cyclomatic 20) src/resolution/dart-local-scope.ts:54— dart-local-scope.gateDartLocal has cyclomatic complexity 20 (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.
ambient-modules.kindRank (cyclomatic 20) src/resolution/ambient-modules.ts:727— ambient-modules.kindRank 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.
name-matcher.pythonFieldType (cyclomatic 20) src/resolution/name-matcher.ts:1062— name-matcher.pythonFieldType has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to 2 function literals 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.typeDartHead (cyclomatic 20) src/resolution/name-matcher.ts:4917— name-matcher.typeDartHead has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.rustOutsideTypeCall (cyclomatic 20) src/resolution/name-matcher.ts:11108— name-matcher.rustOutsideTypeCall has cyclomatic complexity 20 (threshold 15). Of this number, 10 points are the body's own statements and 10 belong to 4 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.matchCppDeclaredTypeCall (cyclomatic 20) src/resolution/name-matcher.ts:15090— name-matcher.matchCppDeclaredTypeCall 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.kotlinCallResultType (cyclomatic 20) src/resolution/name-matcher.ts:17709— name-matcher.kotlinCallResultType has cyclomatic complexity 20 (threshold 15). Of this number, 12 points are the body's own statements and 8 belong to 5 function literals 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.inferJavaFieldReceiverType (cyclomatic 20) src/resolution/name-matcher.ts:17921— name-matcher.inferJavaFieldReceiverType has cyclomatic complexity 20 (threshold 15). Of this number, 16 points are the body's own statements and 4 belong to one function literal 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.matchRustSelfCall (cyclomatic 20) src/resolution/name-matcher.ts:24287— name-matcher.matchRustSelfCall has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to 2 function literals 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.resolveStoreAction (cyclomatic 20) src/resolution/name-matcher.ts:26128— name-matcher.resolveStoreAction has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to 2 function literals 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.cppOverloadFit (cyclomatic 20) src/resolution/name-matcher.ts:27897— name-matcher.cppOverloadFit has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
express.topLevelArgs (cyclomatic 20) REDACTED:470— express.topLevelArgs 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.
react.conditionalBranches (cyclomatic 20) REDACTED:799— react.conditionalBranches 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.
angular-router.commandsHref (cyclomatic 20) src/resolution/frameworks/angular-router.ts:804— angular-router.commandsHref 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.
TreeSitterExtractor.findRtkEndpointsObject (cyclomatic 20) src/extraction/tree-sitter.ts:3601— TreeSitterExtractor.findRtkEndpointsObject 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.
TreeSitterExtractor.resolveErlangGenServerTarget (cyclomatic 20) src/extraction/tree-sitter.ts:5209— TreeSitterExtractor.resolveErlangGenServerTarget 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.
module-importers.reopenReferencesThroughBarrels (cyclomatic 20) src/resolution/module-importers.ts:371— module-importers.reopenReferencesThroughBarrels has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
module-importers.addPythonImporters (cyclomatic 20) src/resolution/module-importers.ts:630— module-importers.addPythonImporters has cyclomatic complexity 20 (threshold 15). Of this number, 16 points are the body's own statements and 4 belong to 3 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.
angular-template-synthesizer.readMicrosyntax (cyclomatic 20) src/resolution/angular-template-synthesizer.ts:382— angular-template-synthesizer.readMicrosyntax has cyclomatic complexity 20 (threshold 15). Of this number, 14 points are the body's own statements and 6 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.
tier-synthesizer.operandEnd (cyclomatic 20) REDACTED:1024— tier-synthesizer.operandEnd 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.
tier-synthesizer.crossTierEdges (cyclomatic 20) REDACTED:1228— tier-synthesizer.crossTierEdges 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.
override-parameters.blankCsharpTrivia (cyclomatic 20) REDACTED:222— override-parameters.blankCsharpTrivia 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.
JsxLexer.tag (cyclomatic 20) src/resolution/jsx-code.ts:421— JsxLexer.tag 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.
callback-synthesizer.arkuiRouterEdges (cyclomatic 20) src/resolution/callback-synthesizer.ts:688— callback-synthesizer.arkuiRouterEdges has cyclomatic complexity 20 (threshold 15). Of this number, 13 points are the body's own statements and 7 belong to 5 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.
callback-synthesizer.goGrpcStubImplEdges (cyclomatic 20) src/resolution/callback-synthesizer.ts:1788— callback-synthesizer.goGrpcStubImplEdges has cyclomatic complexity 20 (threshold 15). Of this number, 18 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.
dead-code.overrideCandidates (cyclomatic 20) src/graph/dead-code.ts:850— dead-code.overrideCandidates 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.
ToolHandler.computeGraphRelevance (cyclomatic 20) REDACTED:4134— ToolHandler.computeGraphRelevance has cyclomatic complexity 20 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
search.buildSearch (cyclomatic 20) src/ui-server/api/search.ts:94— search.buildSearch has cyclomatic complexity 20 (threshold 15). Of this number, 12 points are the body's own statements and 8 belong to 3 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. This is NOT this file's highest cyclomatic complexity: search.kindRank (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
api.breakdown (cyclomatic 20) telemetry-dashboard/src/api.ts:576— api.breakdown has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 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.
program-model.orderGraph::flow (cyclomatic 20) ui/src/lib/program-model.ts:140— program-model.orderGraph::flow 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.
check-grammar.judge (cyclomatic 19) scripts/add-lang/check-grammar.mjs:68— check-grammar.judge has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
java.synthesizeRecordComponents (cyclomatic 19) src/extraction/languages/java.ts:264— java.synthesizeRecordComponents 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.
pascal-preparse.blankDuplicateBegins (cyclomatic 19) src/extraction/languages/pascal-preparse.ts:659— pascal-preparse.blankDuplicateBegins 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.
pascal-preparse.anonymousRecordDeclStart (cyclomatic 19) src/extraction/languages/pascal-preparse.ts:851— pascal-preparse.anonymousRecordDeclStart 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.
RazorExtractor.matchBrace (cyclomatic 19) src/extraction/razor-extractor.ts:192— RazorExtractor.matchBrace 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.
vue-options-api.matchClose (cyclomatic 19) REDACTED:62— vue-options-api.matchClose 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.
swift-type-visibility.declarationFor (cyclomatic 19) src/resolution/swift-type-visibility.ts:276— swift-type-visibility.declarationFor 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.
rust-scopes.walkPattern (cyclomatic 19) src/resolution/rust-scopes.ts:305— rust-scopes.walkPattern 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.
name-matcher.hasBridgeEvidence (cyclomatic 19) src/resolution/name-matcher.ts:194— name-matcher.hasBridgeEvidence 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.luaMemberIn (cyclomatic 19) src/resolution/name-matcher.ts:2097— name-matcher.luaMemberIn has cyclomatic complexity 19 (threshold 15). Of this number, 13 points are the body's own statements and 6 belong to 4 function literals 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.matchDartChainLink (cyclomatic 19) src/resolution/name-matcher.ts:4561— name-matcher.matchDartChainLink has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.dartInitializerType (cyclomatic 19) src/resolution/name-matcher.ts:5261— name-matcher.dartInitializerType 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.rustManifestDependencies (cyclomatic 19) src/resolution/name-matcher.ts:8189— name-matcher.rustManifestDependencies has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.rustFunctionReturn (cyclomatic 19) src/resolution/name-matcher.ts:10339— name-matcher.rustFunctionReturn has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 belong to 2 function literals 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.isImportShadowedByJsBinding (cyclomatic 19) src/resolution/name-matcher.ts:11559— name-matcher.isImportShadowedByJsBinding has cyclomatic complexity 19 (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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.objectLiteralProperty (cyclomatic 19) src/resolution/name-matcher.ts:12351— name-matcher.objectLiteralProperty 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.cppArgumentType (cyclomatic 19) src/resolution/name-matcher.ts:16076— name-matcher.cppArgumentType has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.cppUnqualifiedTypeFit (cyclomatic 19) src/resolution/name-matcher.ts:16254— name-matcher.cppUnqualifiedTypeFit has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to 2 function items inside it that branch. 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.inferEsmAwaitedCallType (cyclomatic 19) src/resolution/name-matcher.ts:19072— name-matcher.inferEsmAwaitedCallType 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.preferGoBuildTwin (cyclomatic 19) src/resolution/name-matcher.ts:21606— name-matcher.preferGoBuildTwin has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong to one function literal 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.pythonClassNamed (cyclomatic 19) src/resolution/name-matcher.ts:23335— name-matcher.pythonClassNamed has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to one function literal 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.rustWrittenCallReceiver (cyclomatic 19) src/resolution/name-matcher.ts:24719— name-matcher.rustWrittenCallReceiver 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
import-resolver.importedTypeMember (cyclomatic 19) REDACTED:2827— import-resolver.importedTypeMember has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
nestjs.splitTopLevelObjects (cyclomatic 19) REDACTED:936— nestjs.splitTopLevelObjects 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.
expo-router.indexAtDepth0 (cyclomatic 19) REDACTED:303— expo-router.indexAtDepth0 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.
TreeSitterExtractor.extractFunction (cyclomatic 19) src/extraction/tree-sitter.ts:2274— TreeSitterExtractor.extractFunction 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.
TreeSitterExtractor.rtkEndpointHandler (cyclomatic 19) src/extraction/tree-sitter.ts:3681— TreeSitterExtractor.rtkEndpointHandler 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.
TreeSitterExtractor.extractInstantiation (cyclomatic 19) src/extraction/tree-sitter.ts:6509— TreeSitterExtractor.extractInstantiation 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.
TreeSitterExtractor.reactHookBoundName (cyclomatic 19) src/extraction/tree-sitter.ts:7322— TreeSitterExtractor.reactHookBoundName has cyclomatic complexity 19 (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.
ParseWorkerPool.drain (cyclomatic 19) src/extraction/parse-pool.ts:461— ParseWorkerPool.drain has cyclomatic complexity 19 (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.
type-parameters.declaredTypeParameters (cyclomatic 19) src/resolution/type-parameters.ts:172— type-parameters.declaredTypeParameters 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.
tier-synthesizer.pairEvents (cyclomatic 19) REDACTED:854— tier-synthesizer.pairEvents has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to 2 function literals 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.
callback-synthesizer.fabricNativeImplEdges (cyclomatic 19) src/resolution/callback-synthesizer.ts:3244— callback-synthesizer.fabricNativeImplEdges 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.
callback-synthesizer.mybatisJavaXmlEdges (cyclomatic 19) src/resolution/callback-synthesizer.ts:3313— callback-synthesizer.mybatisJavaXmlEdges 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.
ToolHandler.buildFlowFromNamedSymbols::collectSynthLinks (cyclomatic 19) REDACTED:3533— ToolHandler.buildFlowFromNamedSymbols::collectSynthLinks 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. This shape REPEATS in the file: one other method here (ToolHandler.buildFlowFromNamedSymbols) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ToolHandler.formatFilesTree (cyclomatic 19) REDACTED:8542— ToolHandler.formatFilesTree has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to 2 function items inside it that branch (renderNode, a function literal at line 8595). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
Daemon.start (cyclomatic 19) src/mcp/daemon.ts:251— Daemon.start has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to 2 function literals inside it that branch. 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.
CodeGraph.getSegmentMatches (cyclomatic 19) src/index.ts:2259— CodeGraph.getSegmentMatches has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong to 3 function literals 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.
when.annotateWhen (cyclomatic 19) src/ui-server/api/when.ts:58— when.annotateWhen has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to 2 function literals 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.
toml.layoutOf (cyclomatic 19) src/installer/targets/toml.ts:228— toml.layoutOf has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 2 function items inside it that branch (a function literal at line 241, blockOf). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
export-svg.flowSvg (cyclomatic 19) ui/src/lib/export-svg.ts:722— export-svg.flowSvg has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, 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.
screens-model.trackedCurves (cyclomatic 19) ui/src/lib/screens-model.ts:503— screens-model.trackedCurves has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong to 2 function literals 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.
screens-model.placeLabels (cyclomatic 19) ui/src/lib/screens-model.ts:762— screens-model.placeLabels has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 785, restLabels, a function literal at line 784, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
steps-model.buildStepsModel (cyclomatic 19) ui/src/lib/steps-model.ts:389— steps-model.buildStepsModel has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function literal 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.
offload-eval-cost.analyzeRun (cyclomatic 18) scripts/agent-eval/offload-eval-cost.mjs:38— offload-eval-cost.analyzeRun 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.
directory.planFrontload (cyclomatic 18) src/directory.ts:836— directory.planFrontload 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.
QueryBuilder.findNodesByExactName (cyclomatic 18) src/db/queries.ts:2150— QueryBuilder.findNodesByExactName 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.
kotlin.kotlinPropertyKind (cyclomatic 18) src/extraction/languages/kotlin.ts:87— kotlin.kotlinPropertyKind 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.
cobol.collectRefs (cyclomatic 18) src/extraction/languages/cobol.ts:302— cobol.collectRefs 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.
erlang.handleFunDecl (cyclomatic 18) src/extraction/languages/erlang.ts:134— erlang.handleFunDecl 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.
erlang.handleAppResourceTuple (cyclomatic 18) src/extraction/languages/erlang.ts:267— erlang.handleAppResourceTuple has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
arkts.collectDecoratorNames (cyclomatic 18) src/extraction/languages/arkts.ts:48— arkts.collectDecoratorNames has cyclomatic complexity 18 (threshold 15). Of this number, 13 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.
cpp-macro-methods.qualifiedCallableAt (cyclomatic 18) src/extraction/languages/cpp-macro-methods.ts:224— cpp-macro-methods.qualifiedCallableAt 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.
cpp-macro-methods.cppMacroInvocations (cyclomatic 18) src/extraction/languages/cpp-macro-methods.ts:402— cpp-macro-methods.cppMacroInvocations 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.
path-aliases.loadProjectAliases (cyclomatic 18) src/resolution/path-aliases.ts:265— path-aliases.loadProjectAliases has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to one function literal 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.
dart-local-scope.splitParameters (cyclomatic 18) src/resolution/dart-local-scope.ts:277— dart-local-scope.splitParameters 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.
vbnet-receivers.bindingOn (cyclomatic 18) REDACTED:267— vbnet-receivers.bindingOn 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.
vbnet-receivers.headMemberOf (cyclomatic 18) REDACTED:1660— vbnet-receivers.headMemberOf 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.
cpp-namespaces.cppNamespaceMacros (cyclomatic 18) REDACTED:40— cpp-namespaces.cppNamespaceMacros 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.
name-matcher.scalaBlockOf (cyclomatic 18) src/resolution/name-matcher.ts:1370— name-matcher.scalaBlockOf has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 belong to one function literal 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.javaAncestorNames (cyclomatic 18) src/resolution/name-matcher.ts:3201— name-matcher.javaAncestorNames has cyclomatic complexity 18 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.kotlinReceiverTypes (cyclomatic 18) src/resolution/name-matcher.ts:6129— name-matcher.kotlinReceiverTypes has cyclomatic complexity 18 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.kotlinBraceFrames (cyclomatic 18) src/resolution/name-matcher.ts:6237— name-matcher.kotlinBraceFrames 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.scalaSupertypesOf (cyclomatic 18) src/resolution/name-matcher.ts:6905— name-matcher.scalaSupertypesOf 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.csharpProjectUsings (cyclomatic 18) src/resolution/name-matcher.ts:7157— name-matcher.csharpProjectUsings 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.rustFirstArgIs (cyclomatic 18) src/resolution/name-matcher.ts:9282— name-matcher.rustFirstArgIs 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.rustReturnInstance (cyclomatic 18) src/resolution/name-matcher.ts:10437— name-matcher.rustReturnInstance has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.bindsAtSites (cyclomatic 18) src/resolution/name-matcher.ts:11770— name-matcher.bindsAtSites 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.resolveObjectPathMember (cyclomatic 18) src/resolution/name-matcher.ts:12894— name-matcher.resolveObjectPathMember has cyclomatic complexity 18 (threshold 15). Of this number, 11 points are the body's own statements and 7 belong to 3 function literals 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.inferPhpAssignedPropertyType (cyclomatic 18) src/resolution/name-matcher.ts:19632— name-matcher.inferPhpAssignedPropertyType has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent 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: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.goFieldTypeOf (cyclomatic 18) src/resolution/name-matcher.ts:22461— name-matcher.goFieldTypeOf 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.pythonDefStatements (cyclomatic 18) src/resolution/name-matcher.ts:23080— name-matcher.pythonDefStatements 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.matchPythonAttrCall (cyclomatic 18) src/resolution/name-matcher.ts:23733— name-matcher.matchPythonAttrCall 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.tsFieldDeclaration (cyclomatic 18) src/resolution/name-matcher.ts:25251— name-matcher.tsFieldDeclaration 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.matchCppMacroNamespaced (cyclomatic 18) src/resolution/name-matcher.ts:27687— name-matcher.matchCppMacroNamespaced has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to 2 function literals 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
import-resolver.resolveAliasedImport (cyclomatic 18) REDACTED:1284— import-resolver.resolveAliasedImport 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.
import-resolver.stripJsComments (cyclomatic 18) REDACTED:2367— import-resolver.stripJsComments 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.
import-resolver.resolvePhpQualifiedClassRef (cyclomatic 18) REDACTED:2702— import-resolver.resolvePhpQualifiedClassRef has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 belong to 3 function literals 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.
nestjs.matchingClose (cyclomatic 18) REDACTED:909— nestjs.matchingClose 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.
react.scanRoutes (cyclomatic 18) REDACTED:1052— react.scanRoutes has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 1369, 1377, 1382). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
react.elementTags (cyclomatic 18) REDACTED:1451— react.elementTags 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.
angular-router.routeFilesLoadedBy (cyclomatic 18) src/resolution/frameworks/angular-router.ts:439— angular-router.routeFilesLoadedBy 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.
expo-modules.nativeBinding (cyclomatic 18) REDACTED:230— expo-modules.nativeBinding 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.
TreeSitterExtractor.captureValueRefScope (cyclomatic 18) src/extraction/tree-sitter.ts:1279— TreeSitterExtractor.captureValueRefScope 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.
TreeSitterExtractor.visitPatternDefaults (cyclomatic 18) src/extraction/tree-sitter.ts:2404— TreeSitterExtractor.visitPatternDefaults 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.
TreeSitterExtractor.extractProperty (cyclomatic 18) src/extraction/tree-sitter.ts:3050— TreeSitterExtractor.extractProperty has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
module-importers.importersOf (cyclomatic 18) src/resolution/module-importers.ts:515— module-importers.importersOf has cyclomatic complexity 18 (threshold 15). Of this number, 13 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.
expo-router-synthesizer.screensInBody (cyclomatic 18) src/resolution/expo-router-synthesizer.ts:156— expo-router-synthesizer.screensInBody 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.
angular-template-synthesizer.expressionEnd (cyclomatic 18) src/resolution/angular-template-synthesizer.ts:333— angular-template-synthesizer.expressionEnd 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.
tier-synthesizer.argumentsAt (cyclomatic 18) REDACTED:122— tier-synthesizer.argumentsAt has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal 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.
callback-synthesizer.bindingElementAt (cyclomatic 18) src/resolution/callback-synthesizer.ts:2278— callback-synthesizer.bindingElementAt 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.
callback-synthesizer.reduxThunkEdges (cyclomatic 18) src/resolution/callback-synthesizer.ts:3604— callback-synthesizer.reduxThunkEdges has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to one function literal 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.
dynamic-boundary-report.findDynamicBoundaries (cyclomatic 18) src/graph/dynamic-boundary-report.ts:132— dynamic-boundary-report.findDynamicBoundaries 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.
named-symbol-flow.walkCalls (cyclomatic 18) src/graph/named-symbol-flow.ts:423— named-symbol-flow.walkCalls 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.
claude.removeHookCommandsMatching (cyclomatic 18) src/installer/targets/claude.ts:363— claude.removeHookCommandsMatching has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal 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.
steps.buildSteps.chainFor (cyclomatic 18) src/ui-server/api/steps.ts:602— steps.buildSteps.chainFor 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.
trails.parseSaveRequest (cyclomatic 18) src/ui-server/api/trails.ts:397— trails.parseSaveRequest 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.
screens-model.buildScreensModel (cyclomatic 18) ui/src/lib/screens-model.ts:280— screens-model.buildScreensModel 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.
pascal-preparse.scanParameterList (cyclomatic 17) src/extraction/languages/pascal-preparse.ts:307— pascal-preparse.scanParameterList 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.
r.extractClassMembers (cyclomatic 17) src/extraction/languages/r.ts:110— r.extractClassMembers 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.
VueExtractor.addOptionsMembers (cyclomatic 17) src/extraction/vue-extractor.ts:133— VueExtractor.addOptionsMembers has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 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.
CfmlExtractor.visitTag (cyclomatic 17) src/extraction/cfml-extractor.ts:407— CfmlExtractor.visitTag 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.
laravel.routeFileMounts (cyclomatic 17) src/resolution/frameworks/laravel.ts:352— laravel.routeFileMounts has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
laravel.splitArgs (cyclomatic 17) src/resolution/frameworks/laravel.ts:451— laravel.splitArgs 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.
dart-libraries.skipTrivia (cyclomatic 17) src/resolution/dart-libraries.ts:82— dart-libraries.skipTrivia 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.
dart-libraries.resolveDartUri (cyclomatic 17) src/resolution/dart-libraries.ts:517— dart-libraries.resolveDartUri has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 3 function literals 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.
vbnet-receivers.scopeStartLine (cyclomatic 17) REDACTED:337— vbnet-receivers.scopeStartLine has cyclomatic complexity 17 (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.
vbnet-receivers.supertypesOf (cyclomatic 17) REDACTED:526— vbnet-receivers.supertypesOf has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal 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.
vbnet-receivers.typesNamedAt (cyclomatic 17) REDACTED:812— vbnet-receivers.typesNamedAt 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.
cpp-supertypes.writtenBase (cyclomatic 17) src/resolution/cpp-supertypes.ts:251— cpp-supertypes.writtenBase has cyclomatic complexity 17 (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.
cpp-macro-visibility.directiveLines (cyclomatic 17) REDACTED:144— cpp-macro-visibility.directiveLines 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.
name-matcher.pythonStatementStarts (cyclomatic 17) src/resolution/name-matcher.ts:476— name-matcher.pythonStatementStarts 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: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.isSfcPrivate (cyclomatic 17) src/resolution/name-matcher.ts:3351— name-matcher.isSfcPrivate has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to 2 function literals 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.pythonLocalBinding (cyclomatic 17) src/resolution/name-matcher.ts:4011— name-matcher.pythonLocalBinding has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to one function literal 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.dartPrefixedCallSite (cyclomatic 17) src/resolution/name-matcher.ts:4472— name-matcher.dartPrefixedCallSite has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.rustGoReceiverName (cyclomatic 17) src/resolution/name-matcher.ts:5803— name-matcher.rustGoReceiverName 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: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.csharpAncestorNames (cyclomatic 17) src/resolution/name-matcher.ts:7262— name-matcher.csharpAncestorNames has cyclomatic complexity 17 (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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.rubyAncestry (cyclomatic 17) src/resolution/name-matcher.ts:7876— name-matcher.rubyAncestry 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: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.parseRustImplHeader (cyclomatic 17) src/resolution/name-matcher.ts:9200— name-matcher.parseRustImplHeader 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: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.rustAssociatedReturn (cyclomatic 17) src/resolution/name-matcher.ts:10308— name-matcher.rustAssociatedReturn 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.readRustMethodReturn (cyclomatic 17) src/resolution/name-matcher.ts:10401— name-matcher.readRustMethodReturn 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.cppFunctionOverload (cyclomatic 17) src/resolution/name-matcher.ts:15849— name-matcher.cppFunctionOverload has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 3 function literals 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.matchCppConstruction (cyclomatic 17) src/resolution/name-matcher.ts:17322— name-matcher.matchCppConstruction has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.goParseBuildExpr (cyclomatic 17) src/resolution/name-matcher.ts:21495— name-matcher.goParseBuildExpr has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 3 function items inside it that branch (not, or, and). 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.matchGoChainedCall (cyclomatic 17) src/resolution/name-matcher.ts:21977— name-matcher.matchGoChainedCall has cyclomatic complexity 17 (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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.goTypeParamsAt (cyclomatic 17) src/resolution/name-matcher.ts:22662— name-matcher.goTypeParamsAt has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 belong to 3 function literals 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.pythonValueEvidence (cyclomatic 17) src/resolution/name-matcher.ts:22957— name-matcher.pythonValueEvidence 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: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.pythonAssignTargets (cyclomatic 17) src/resolution/name-matcher.ts:23048— name-matcher.pythonAssignTargets 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: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.matchPythonFactoryChain (cyclomatic 17) src/resolution/name-matcher.ts:24087— name-matcher.matchPythonFactoryChain 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.matchRustAsMutChainCall (cyclomatic 17) src/resolution/name-matcher.ts:24500— name-matcher.matchRustAsMutChainCall 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: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.matchRustWrittenReceiverCall (cyclomatic 17) src/resolution/name-matcher.ts:24549— name-matcher.matchRustWrittenReceiverCall 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
import-resolver.pythonStarExports (cyclomatic 17) REDACTED:1004— import-resolver.pythonStarExports 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.
import-resolver.extractGoImports (cyclomatic 17) REDACTED:2163— import-resolver.extractGoImports has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 belong to 3 function literals inside it that branch. 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.
import-resolver.resolveJavaImportedReference (cyclomatic 17) REDACTED:3818— import-resolver.resolveJavaImportedReference 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.
react.configHrefExpression (cyclomatic 17) REDACTED:333— react.configHrefExpression has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal 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.
react.initializerAt (cyclomatic 17) REDACTED:1763— react.initializerAt 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.
angular-router.staticString (cyclomatic 17) src/resolution/frameworks/angular-router.ts:132— angular-router.staticString 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.
TreeSitterExtractor.findVueStoreCollectionObjects (cyclomatic 17) src/extraction/tree-sitter.ts:3781— TreeSitterExtractor.findVueStoreCollectionObjects 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.
TreeSitterExtractor.extractTsTupleContractNames (cyclomatic 17) src/extraction/tree-sitter.ts:4667— TreeSitterExtractor.extractTsTupleContractNames has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TreeSitterExtractor.declarePascalInline (cyclomatic 17) src/extraction/tree-sitter.ts:9008— TreeSitterExtractor.declarePascalInline has cyclomatic complexity 17 (threshold 15). 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
pascal-scope.matchPascalParenlessRef (cyclomatic 17) REDACTED:71— pascal-scope.matchPascalParenlessRef 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.
tier-synthesizer.clientPath (cyclomatic 17) REDACTED:468— tier-synthesizer.clientPath has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal 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.
tier-synthesizer.pairQueue (cyclomatic 17) REDACTED:726— tier-synthesizer.pairQueue has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to 2 function literals 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.
tier-synthesizer.collectEvents (cyclomatic 17) REDACTED:807— tier-synthesizer.collectEvents 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.
callback-synthesizer.reactRenderEdges (cyclomatic 17) src/resolution/callback-synthesizer.ts:395— callback-synthesizer.reactRenderEdges has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal 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.
callback-synthesizer.jsxChild (cyclomatic 17) src/resolution/callback-synthesizer.ts:2015— callback-synthesizer.jsxChild has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals 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.
callback-synthesizer.rnCrossPlatformEdges (cyclomatic 17) src/resolution/callback-synthesizer.ts:3177— callback-synthesizer.rnCrossPlatformEdges has cyclomatic complexity 17 (threshold 15). Of this number, 15 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.
index.extractSymbolsFromQuery (cyclomatic 17) src/context/index.ts:68— index.extractSymbolsFromQuery 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.
branch-guards.hasTopLevelOr (cyclomatic 17) src/graph/branch-guards.ts:119— branch-guards.hasTopLevelOr 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.
claude.writePromptHookEntry (cyclomatic 17) src/installer/targets/claude.ts:458— claude.writePromptHookEntry has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal 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.
MCPSession.handleMessage (cyclomatic 17) src/mcp/session.ts:162— MCPSession.handleMessage 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.
daemon.readClientHello (cyclomatic 17) src/mcp/daemon.ts:978— daemon.readClientHello has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 985, 1014, 1040). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
MCPServer.startDaemonProcess (cyclomatic 17) src/mcp/index.ts:650— MCPServer.startDaemonProcess 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.
entrypoints.withoutPreviews (cyclomatic 17) src/ui-server/api/entrypoints.ts:288— entrypoints.withoutPreviews has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to 2 function literals 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.
steps.hopLabel (cyclomatic 17) src/ui-server/api/steps.ts:1720— steps.hopLabel 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.
flow.toWireFlow (cyclomatic 17) src/ui-server/api/flow.ts:485— flow.toWireFlow 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.
export-svg.flowCardSvg (cyclomatic 17) ui/src/lib/export-svg.ts:357— export-svg.flowCardSvg has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to 2 function literals 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.
export-svg.capRows (cyclomatic 17) ui/src/lib/export-svg.ts:565— export-svg.capRows has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal 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.
probe-allocation.main (cyclomatic 16) REDACTED:263— probe-allocation.main has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to 2 function literals 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.
gen-go-stdlib-methods.pkg (cyclomatic 16) REDACTED:67— gen-go-stdlib-methods.pkg has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal 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.
kernel-parity.collect (cyclomatic 16) scripts/kernel-parity.mjs:74— kernel-parity.collect 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.
query-utils.extractSearchTerms (cyclomatic 16) src/search/query-utils.ts:156— query-utils.extractSearchTerms 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. This is NOT this file's highest cyclomatic complexity: query-utils.isTestPath (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
name-substring-index.searchNameSubstring (cyclomatic 16) REDACTED:183— name-substring-index.searchNameSubstring has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to 2 function literals 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.
c-cpp.recoverCppMacroDefinedName (cyclomatic 16) REDACTED:188— c-cpp.recoverCppMacroDefinedName has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to one function item inside it that branches. 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.
c-cpp.blankCppInlineAnnotationMacros (cyclomatic 16) REDACTED:1433— c-cpp.blankCppInlineAnnotationMacros 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.
c-cpp.blankCFileScopePrefixedDeclMacros (cyclomatic 16) REDACTED:2352— c-cpp.blankCFileScopePrefixedDeclMacros 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.
path-aliases.stripJsonc (cyclomatic 16) src/resolution/path-aliases.ts:78— path-aliases.stripJsonc 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.
dart-local-scope.bindLocals (cyclomatic 16) src/resolution/dart-local-scope.ts:332— dart-local-scope.bindLocals has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 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.
cpp-type-aliases.cppTypeName (cyclomatic 16) src/resolution/cpp-type-aliases.ts:87— cpp-type-aliases.cppTypeName 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.
cpp-type-aliases.baseClassesOf (cyclomatic 16) src/resolution/cpp-type-aliases.ts:493— cpp-type-aliases.baseClassesOf 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.
rust-scopes.walkTop (cyclomatic 16) src/resolution/rust-scopes.ts:224— rust-scopes.walkTop 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.
name-matcher.goParamNames (cyclomatic 16) src/resolution/name-matcher.ts:2996— name-matcher.goParamNames 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.isReceiverLessCall (cyclomatic 16) src/resolution/name-matcher.ts:3731— name-matcher.isReceiverLessCall 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.isDotNetTypeRef (cyclomatic 16) src/resolution/name-matcher.ts:3786— name-matcher.isDotNetTypeRef 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.typeDartLink (cyclomatic 16) src/resolution/name-matcher.ts:4977— name-matcher.typeDartLink 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.dartMemberOf (cyclomatic 16) src/resolution/name-matcher.ts:5481— name-matcher.dartMemberOf 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.csharpProjectStaticUsings (cyclomatic 16) src/resolution/name-matcher.ts:7083— name-matcher.csharpProjectStaticUsings 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.rustWalkModules (cyclomatic 16) src/resolution/name-matcher.ts:8700— name-matcher.rustWalkModules 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.expandRustUse (cyclomatic 16) src/resolution/name-matcher.ts:9915— name-matcher.expandRustUse 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.rustFieldValue (cyclomatic 16) src/resolution/name-matcher.ts:10512— name-matcher.rustFieldValue has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.cppWrittenTypeFit (cyclomatic 16) src/resolution/name-matcher.ts:16208— name-matcher.cppWrittenTypeFit has cyclomatic complexity 16 (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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.inferMemberReceiverType (cyclomatic 16) src/resolution/name-matcher.ts:18487— name-matcher.inferMemberReceiverType 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.jsDeclarationReading (cyclomatic 16) src/resolution/name-matcher.ts:19512— name-matcher.jsDeclarationReading 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.dynamicImportScan (cyclomatic 16) src/resolution/name-matcher.ts:20798— name-matcher.dynamicImportScan 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.goCalledType (cyclomatic 16) src/resolution/name-matcher.ts:22235— name-matcher.goCalledType has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.goDeclaredValueType (cyclomatic 16) src/resolution/name-matcher.ts:22387— name-matcher.goDeclaredValueType 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.goElementOf (cyclomatic 16) src/resolution/name-matcher.ts:22526— name-matcher.goElementOf 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.pythonConditionalArms (cyclomatic 16) src/resolution/name-matcher.ts:22926— name-matcher.pythonConditionalArms 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.pythonAttrClassWalk (cyclomatic 16) src/resolution/name-matcher.ts:23663— name-matcher.pythonAttrClassWalk has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function literal 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.tsCallEndsStatement (cyclomatic 16) src/resolution/name-matcher.ts:25359— name-matcher.tsCallEndsStatement 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.tsNamedType (cyclomatic 16) src/resolution/name-matcher.ts:25490— name-matcher.tsNamedType has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
name-matcher.tsClassTypeParameter (cyclomatic 16) src/resolution/name-matcher.ts:25662— name-matcher.tsClassTypeParameter 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. This is NOT this file's highest cyclomatic complexity: name-matcher.buildLocalReceiverTypePatterns (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
import-resolver.extractImportMappings (cyclomatic 16) REDACTED:1813— import-resolver.extractImportMappings has cyclomatic complexity 16 (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.
import-resolver.resolveModuleImportToFile (cyclomatic 16) REDACTED:3602— import-resolver.resolveModuleImportToFile 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.
nestjs.splitTopLevel (cyclomatic 16) REDACTED:884— nestjs.splitTopLevel 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.
react.routeRender (cyclomatic 16) REDACTED:1571— react.routeRender 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.
react.exportedTable (cyclomatic 16) REDACTED:2100— react.exportedTable 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.
react.functionBody (cyclomatic 16) REDACTED:2241— react.functionBody has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
angular-router.angularMounts (cyclomatic 16) src/resolution/frameworks/angular-router.ts:624— angular-router.angularMounts has cyclomatic complexity 16 (threshold 15). Of this number, 13 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.
python.extractFlaskUrlRules (cyclomatic 16) src/resolution/frameworks/python.ts:551— python.extractFlaskUrlRules 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.
csharp.endpointGroupRoutes (cyclomatic 16) REDACTED:366— csharp.endpointGroupRoutes 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.
TreeSitterExtractor.extractVbMemberRead (cyclomatic 16) src/extraction/tree-sitter.ts:6812— TreeSitterExtractor.extractVbMemberRead 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.
TreeSitterExtractor.extractPascalDeclType (cyclomatic 16) src/extraction/tree-sitter.ts:8701— TreeSitterExtractor.extractPascalDeclType 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.
TreeSitterExtractor.readPascalTextRoutines (cyclomatic 16) src/extraction/tree-sitter.ts:9495— TreeSitterExtractor.readPascalTextRoutines 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.
ScopeIgnore.ignores (cyclomatic 16) src/extraction/index.ts:990— ScopeIgnore.ignores 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.
index.discoverEmbeddedRepoRoots (cyclomatic 16) src/extraction/index.ts:1090— index.discoverEmbeddedRepoRoots has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to one function item inside it that branches (visit). 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.
index.collectGitFiles (cyclomatic 16) src/extraction/index.ts:1287— index.collectGitFiles 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.
index.collectGitStatus (cyclomatic 16) src/extraction/index.ts:1570— index.collectGitStatus has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to one function item inside it that branches. 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.
pascal-scope.nestedRoutineInScope (cyclomatic 16) REDACTED:329— pascal-scope.nestedRoutineInScope 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.
ResolverPool.constructor (cyclomatic 16) src/resolution/resolver-pool.ts:172— ResolverPool.constructor has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 183, 222, 226). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
angular-template-synthesizer.componentsIn (cyclomatic 16) src/resolution/angular-template-synthesizer.ts:80— angular-template-synthesizer.componentsIn has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal 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.
angular-template-synthesizer.fieldValue (cyclomatic 16) src/resolution/angular-template-synthesizer.ts:173— angular-template-synthesizer.fieldValue 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.
tier-synthesizer.collectHttpSites (cyclomatic 16) REDACTED:531— tier-synthesizer.collectHttpSites has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to one function item inside it that branches (add). 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.
override-parameters.overrideFilter (cyclomatic 16) REDACTED:56— override-parameters.overrideFilter has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 3 function items inside it that branch (a function literal at line 79, typesOf, scopeOf). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
JsxLexer.children (cyclomatic 16) src/resolution/jsx-code.ts:490— JsxLexer.children 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.
callback-synthesizer.nixLeadingPlainSegments (cyclomatic 16) src/resolution/callback-synthesizer.ts:4601— callback-synthesizer.nixLeadingPlainSegments 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.
callback-synthesizer.hasSynthesisPattern (cyclomatic 16) src/resolution/callback-synthesizer.ts:5073— callback-synthesizer.hasSynthesisPattern has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
FileWatcher.refreshWatchTree (cyclomatic 16) src/sync/watcher.ts:486— FileWatcher.refreshWatchTree has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to one function item inside it that branches (walk). 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.
branch-guards.guardsInTree (cyclomatic 16) src/graph/branch-guards.ts:1065— branch-guards.guardsInTree 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.
dynamic-boundaries.scanDynamicDispatch (cyclomatic 16) REDACTED:272— dynamic-boundaries.scanDynamicDispatch 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. This is NOT this file's highest cyclomatic complexity: dynamic-boundaries.commentLang (cyclomatic 24) 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 method is counted neither in this dimension's figures nor in its score.
toml.scanTomlLine (cyclomatic 16) src/installer/targets/toml.ts:459— toml.scanTomlLine 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.
export-svg.mapSvg (cyclomatic 16) ui/src/lib/export-svg.ts:886— export-svg.mapSvg has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function literal 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.
conditions.splitTop (cyclomatic 16) ui/src/lib/conditions.ts:20— conditions.splitTop 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.
steps-model.kindWords (cyclomatic 16) ui/src/lib/steps-model.ts:196— steps-model.kindWords 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.
No assertions: closes every stream when the API is closed __tests__/ui-events-api.test.ts:371— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
TreeSitterExtractor.extractCall (cognitive 683) src/extraction/tree-sitter.ts:5276— TreeSitterExtractor.extractCall has cognitive complexity 683 (threshold 15). Drivers by points: if/else 160 (433 pts), ternaries 29 (126 pts), boolean chains 84, loops 11 (40 pts) (nesting depth added 399). Of this number, 670 points are the body's own statements and 13 belong to 2 function items inside it that branch. 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.
ToolHandler.handleExplore (cognitive 609) REDACTED:4200— ToolHandler.handleExplore has cognitive complexity 609 (threshold 15). Drivers by points: if/else 242 (551 pts), ternaries 84 (204 pts), loops 85 (171 pts), boolean chains 154, error handling 16 (27 pts) (nesting depth added 526). 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. This shape REPEATS in the file: 3 other methods here (ToolHandler.handleExplore::prio, ToolHandler.handleExplore::sectionRangesOf, ToolHandler.handleExplore::shrinkCluster) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
steps.buildSteps (cognitive 505) src/ui-server/api/steps.ts:432— steps.buildSteps has cognitive complexity 505 (threshold 15). Drivers by points: if/else 71 (304 pts), ternaries 15 (70 pts), boolean chains 68, loops 20 (58 pts), error handling 1 (5 pts) (nesting depth added 330). Of this number, 497 points are the body's own statements and 8 belong to 7 function literals inside it that branch. 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.
name-matcher.matchMethodCall (cognitive 481) src/resolution/name-matcher.ts:19685— name-matcher.matchMethodCall has cognitive complexity 481 (threshold 15). Drivers by points: if/else 137 (316 pts), boolean chains 114, ternaries 19 (45 pts), loops 3 (6 pts) (nesting depth added 208). Of this number, 325 points are the body's own statements and 156 belong to 13 function items inside it that branch. 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.
c-fnptr-synthesizer.cFnPointerDispatchEdges (cognitive 396) REDACTED:434— c-fnptr-synthesizer.cFnPointerDispatchEdges has cognitive complexity 396 (threshold 15). Drivers by points: if/else 153 (373 pts), loops 58 (126 pts), ternaries 29 (68 pts), boolean chains 49 (nesting depth added 327). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 4 other methods here (c-fnptr-synthesizer.cFnPointerDispatchEdges::parseStructFieldsRaw, c-fnptr-synthesizer.cFnPointerDispatchEdges::mergeNativeFacts, c-fnptr-synthesizer.cFnPointerDispatchEdges::registerStructValue, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ContextBuilder.findRelevantContext (cognitive 394) src/context/index.ts:477— ContextBuilder.findRelevantContext has cognitive complexity 394 (threshold 15). Drivers by points: if/else 86 (224 pts), loops 48 (109 pts), boolean chains 33, ternaries 11 (24 pts), error handling 3 (4 pts) (nesting depth added 213). Of this number, 364 points are the body's own statements and 30 belong to 10 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.
TreeSitterExtractor.extractVariable (cognitive 386) src/extraction/tree-sitter.ts:3884— TreeSitterExtractor.extractVariable has cognitive complexity 386 (threshold 15). Drivers by points: if/else 57 (200 pts), ternaries 34 (134 pts), boolean chains 34, loops 6 (18 pts) (nesting depth added 255). Of this number, 367 points are the body's own statements and 19 belong to 3 function literals inside it that branch. 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.
TreeSitterExtractor.extractInheritance (cognitive 290) src/extraction/tree-sitter.ts:7695— TreeSitterExtractor.extractInheritance has cognitive complexity 290 (threshold 15). Drivers by points: if/else 51 (151 pts), ternaries 14 (59 pts), loops 18 (58 pts), boolean chains 22 (nesting depth added 185). Of this number, 289 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
callback-synthesizer.rnEventEdges (cognitive 190) src/resolution/callback-synthesizer.ts:2881— callback-synthesizer.rnEventEdges has cognitive complexity 190 (threshold 15). Drivers by points: if/else 32 (118 pts), loops 17 (49 pts), ternaries 3 (12 pts), boolean chains 11 (nesting depth added 127). Of this number, 185 points are the body's own statements and 5 belong to 3 function items inside it that branch. 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.
callback-synthesizer.reactJsxChildEdges (cognitive 188) src/resolution/callback-synthesizer.ts:2424— callback-synthesizer.reactJsxChildEdges has cognitive complexity 188 (threshold 15). Drivers by points: if/else 36 (121 pts), loops 10 (33 pts), boolean chains 18, ternaries 5 (16 pts) (nesting depth added 119). Of this number, 172 points are the body's own statements and 16 belong to 11 function items inside it that branch. 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.
CodeGraph.sync (cognitive 188) src/index.ts:926— CodeGraph.sync has cognitive complexity 188 (threshold 15). Drivers by points: if/else 57 (108 pts), boolean chains 30, ternaries 9 (24 pts), loops 6 (18 pts), error handling 6 (8 pts) (nesting depth added 80). None of this is in the body itself: all 188 points belong to 8 function literals inside it that branch (lines 927, 1025, 999, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
TreeSitterExtractor.dispatchNode (cognitive 185) src/extraction/tree-sitter.ts:1541— TreeSitterExtractor.dispatchNode has cognitive complexity 185 (threshold 15). Drivers by points: if/else 67 (111 pts), boolean chains 31, ternaries 10 (28 pts), loops 5 (15 pts) (nesting depth added 72). Of this number, 175 points are the body's own statements and 10 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.
parse-run.parseSession (cognitive 158) scripts/agent-eval/parse-run.mjs:102— parse-run.parseSession has cognitive complexity 158 (threshold 15). Drivers by points: if/else 33 (91 pts), boolean chains 34, loops 15 (24 pts), ternaries 6, error handling 1 (3 pts) (nesting depth added 69). Of this number, 157 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
rust-scopes.readRustBindings (cognitive 156) src/resolution/rust-scopes.ts:506— rust-scopes.readRustBindings has cognitive complexity 156 (threshold 15). Drivers by points: if/else 46 (94 pts), boolean chains 26, ternaries 9 (21 pts), loops 10 (15 pts) (nesting depth added 65). Of this number, 117 points are the body's own statements and 39 belong to 12 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.
import-resolver.resolveViaImport (cognitive 155) REDACTED:2981— import-resolver.resolveViaImport has cognitive complexity 155 (threshold 15). Drivers by points: if/else 45 (115 pts), ternaries 8 (20 pts), boolean chains 19, loops 1 (nesting depth added 82). Of this number, 151 points are the body's own statements and 4 belong to 4 function literals inside it that branch. 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.
ReferenceResolver.resolveOneInner (cognitive 146) REDACTED:1505— ReferenceResolver.resolveOneInner has cognitive complexity 146 (threshold 15). Drivers by points: if/else 63 (84 pts), boolean chains 35, ternaries 16 (26 pts), loops 1 (nesting depth added 31). Of this number, 138 points are the body's own statements and 8 belong to 4 function literals 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.
name-matcher.matchReferenceInner (cognitive 138) src/resolution/name-matcher.ts:27279— name-matcher.matchReferenceInner has cognitive complexity 138 (threshold 15). Drivers by points: if/else 51 (91 pts), boolean chains 31, ternaries 5 (16 pts) (nesting depth added 51). Of this number, 133 points are the body's own statements and 5 belong to 4 function literals 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.
callback-synthesizer.interfaceOverrideEdges (cognitive 138) src/resolution/callback-synthesizer.ts:1580— callback-synthesizer.interfaceOverrideEdges has cognitive complexity 138 (threshold 15). Drivers by points: if/else 24 (87 pts), loops 10 (27 pts), boolean chains 14, ternaries 2 (10 pts) (nesting depth added 88). Of this number, 129 points are the body's own statements and 9 belong to 5 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.
ReferenceResolver.createContext (cognitive 133) REDACTED:719— ReferenceResolver.createContext has cognitive complexity 133 (threshold 15). Drivers by points: if/else 47 (82 pts), loops 9 (18 pts), boolean chains 16, ternaries 10 (14 pts), error handling 2 (3 pts) (nesting depth added 49). None of this is in the body itself: all 133 points belong to 26 function literals inside it that branch (lines 781, 957, 1046, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
vue-template-calls.scanExpression (cognitive 128) src/extraction/vue-template-calls.ts:291— vue-template-calls.scanExpression has cognitive complexity 128 (threshold 15). Drivers by points: if/else 37 (96 pts), boolean chains 21, loops 7 (11 pts) (nesting depth added 63). Of this number, 122 points are the body's own statements and 6 belong to 4 function items inside it that branch. 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.
cpp-brace-scopes.scanCppBraceScopes (cognitive 127) src/extraction/languages/cpp-brace-scopes.ts:204— cpp-brace-scopes.scanCppBraceScopes has cognitive complexity 127 (threshold 15). Drivers by points: if/else 37 (87 pts), boolean chains 21, loops 5 (11 pts), ternaries 3 (8 pts) (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.
react-native.buildRNMaps (cognitive 127) REDACTED:363— react-native.buildRNMaps has cognitive complexity 127 (threshold 15). Drivers by points: if/else 36 (99 pts), loops 7 (19 pts), boolean chains 6, ternaries 1 (3 pts) (nesting depth added 77). Of this number, 126 points are the body's own statements and 1 belongs to one function literal 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.
name-matcher.matchByExactName (cognitive 123) src/resolution/name-matcher.ts:11825— name-matcher.matchByExactName has cognitive complexity 123 (threshold 15). Drivers by points: boolean chains 81, ternaries 16 (30 pts), if/else 9 (12 pts) (nesting depth added 17). Of this number, 74 points are the body's own statements and 49 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
react.scanRoutes.unit (cognitive 123) REDACTED:1145— react.scanRoutes.unit has cognitive complexity 123 (threshold 15). Drivers by points: if/else 26 (52 pts), boolean chains 28, ternaries 12 (26 pts), loops 6 (17 pts) (nesting depth added 51). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
function-ref.normalizeSpecial (cognitive 121) src/extraction/function-ref.ts:638— function-ref.normalizeSpecial has cognitive complexity 121 (threshold 15). Drivers by points: if/else 35 (78 pts), ternaries 8 (19 pts), boolean chains 17, loops 3 (6 pts), match/switch 1 (nesting depth added 57). 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.
name-matcher.inferCppReceiverType (cognitive 119) src/resolution/name-matcher.ts:16827— name-matcher.inferCppReceiverType has cognitive complexity 119 (threshold 15). Drivers by points: if/else 29 (74 pts), boolean chains 22, ternaries 7 (19 pts), loops 3 (4 pts) (nesting depth added 58). Of this number, 118 points are the body's own statements and 1 belongs to one function literal 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.
ExtractionOrchestrator.indexAll (cognitive 111) src/extraction/index.ts:2181— ExtractionOrchestrator.indexAll has cognitive complexity 111 (threshold 15). Drivers by points: if/else 55 (105 pts), error handling 6 (17 pts), ternaries 6 (14 pts), boolean chains 12, loops 7 (12 pts) (nesting depth added 74). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (ExtractionOrchestrator.indexAll::storeResult) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ambient-modules.tokenize (cognitive 110) src/resolution/ambient-modules.ts:400— ambient-modules.tokenize has cognitive complexity 110 (threshold 15). Drivers by points: if/else 26 (67 pts), loops 9 (27 pts), boolean chains 16 (nesting depth added 59). Of this number, 97 points are the body's own statements and 13 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.
TreeSitterExtractor.extractImport (cognitive 109) src/extraction/tree-sitter.ts:4736— TreeSitterExtractor.extractImport has cognitive complexity 109 (threshold 15). Drivers by points: if/else 32 (86 pts), boolean chains 9, loops 3 (8 pts), ternaries 2 (6 pts) (nesting depth added 63). Of this number, 97 points are the body's own statements and 12 belong to 3 function items inside it that branch. 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.
c-cpp.blankCStatementMacroCalls (cognitive 107) REDACTED:1916— c-cpp.blankCStatementMacroCalls has cognitive complexity 107 (threshold 15). Drivers by points: if/else 22 (71 pts), loops 8 (26 pts), boolean chains 9, ternaries 1 (nesting depth added 67). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
angular-template-synthesizer.angularTemplateEdges (cognitive 107) src/resolution/angular-template-synthesizer.ts:632— angular-template-synthesizer.angularTemplateEdges has cognitive complexity 107 (threshold 15). Drivers by points: if/else 22 (55 pts), loops 12 (27 pts), ternaries 5 (13 pts), boolean chains 12 (nesting depth added 56). Of this number, 97 points are the body's own statements and 10 belong to 4 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.
proxy.runLocalHandshakeProxy (cognitive 106) src/mcp/proxy.ts:260— proxy.runLocalHandshakeProxy has cognitive complexity 106 (threshold 15). Drivers by points: if/else 42 (55 pts), error handling 15 (22 pts), boolean chains 19, loops 5, ternaries 2 (5 pts) (nesting depth added 23). Most of this is not in the body itself: 2 of the 106 points are its own statements and the rest belongs to 15 function items inside it that branch (a function literal at line 397, a function literal at line 515, serveLocally, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
query-paths.extractQueryPaths (cognitive 105) src/search/query-paths.ts:294— query-paths.extractQueryPaths has cognitive complexity 105 (threshold 15). Drivers by points: if/else 28 (69 pts), boolean chains 16, loops 8 (15 pts), ternaries 3 (5 pts) (nesting depth added 50). Of this number, 100 points are the body's own statements and 5 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.
ReferenceResolver.resolveAndPersistBatched (cognitive 101) REDACTED:2471— ReferenceResolver.resolveAndPersistBatched has cognitive complexity 101 (threshold 15). Drivers by points: if/else 35 (54 pts), boolean chains 13, loops 7 (13 pts), ternaries 6 (12 pts), error handling 5 (9 pts) (nesting depth added 35). Of this number, 82 points are the body's own statements and 19 belong to 8 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.
TreeSitterExtractor.visitFunctionBody::visitForCallsAndStructure (cognitive 98) src/extraction/tree-sitter.ts:7416— TreeSitterExtractor.visitFunctionBody::visitForCallsAndStructure has cognitive complexity 98 (threshold 15). Drivers by points: if/else 45 (71 pts), boolean chains 14, loops 3 (8 pts), ternaries 2 (5 pts) (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.
steps-model.packRegions (cognitive 95) ui/src/lib/steps-model.ts:710— steps-model.packRegions has cognitive complexity 95 (threshold 15). Drivers by points: loops 26 (41 pts), if/else 11 (28 pts), ternaries 10 (17 pts), boolean chains 9 (nesting depth added 39). Of this number, 29 points are the body's own statements and 66 belong to 15 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.
name-matcher.cppUnnamedNamespaceSpans (cognitive 94) src/resolution/name-matcher.ts:2303— name-matcher.cppUnnamedNamespaceSpans has cognitive complexity 94 (threshold 15). Drivers by points: if/else 19 (53 pts), loops 5 (18 pts), ternaries 3 (12 pts), boolean chains 11 (nesting depth added 56). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
java.synthesizeLombokMembers (cognitive 92) src/extraction/languages/java.ts:119— java.synthesizeLombokMembers has cognitive complexity 92 (threshold 15). Drivers by points: ternaries 11 (38 pts), if/else 18 (35 pts), boolean chains 14, loops 3 (5 pts) (nesting depth added 46). Of this number, 90 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
name-matcher.isRustNameInScope (cognitive 92) src/resolution/name-matcher.ts:8961— name-matcher.isRustNameInScope has cognitive complexity 92 (threshold 15). Drivers by points: if/else 27 (50 pts), boolean chains 31, ternaries 7 (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.
ruby.extractScopedRailsRoutes (cognitive 92) REDACTED:241— ruby.extractScopedRailsRoutes has cognitive complexity 92 (threshold 15). Drivers by points: ternaries 11 (44 pts), if/else 19 (33 pts), boolean chains 9, loops 3 (6 pts) (nesting depth added 50). Of this number, 90 points are the body's own statements and 2 belong to 2 function items inside it that branch. 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.
name-matcher.rustValueType (cognitive 88) src/resolution/name-matcher.ts:10193— name-matcher.rustValueType has cognitive complexity 88 (threshold 15). Drivers by points: if/else 28 (51 pts), boolean chains 22, ternaries 7 (14 pts), loops 1 (nesting depth added 30). Of this number, 86 points are the body's own statements and 2 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.
screens.buildScreens (cognitive 88) src/ui-server/api/screens.ts:225— screens.buildScreens has cognitive complexity 88 (threshold 15). Drivers by points: if/else 24 (59 pts), loops 7 (11 pts), ternaries 6 (11 pts), boolean chains 7 (nesting depth added 44). Of this number, 87 points are the body's own statements and 1 belongs to one function literal 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.
dead-code.buildDeadCodeReport (cognitive 87) src/graph/dead-code.ts:458— dead-code.buildDeadCodeReport has cognitive complexity 87 (threshold 15). Drivers by points: if/else 26 (58 pts), loops 8 (12 pts), boolean chains 11, ternaries 4 (6 pts) (nesting depth added 38). Of this number, 78 points are the body's own statements and 9 belong to 5 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.
c-cpp.blankCTypeKeywordArgs (cognitive 86) REDACTED:2255— c-cpp.blankCTypeKeywordArgs has cognitive complexity 86 (threshold 15). Drivers by points: if/else 16 (51 pts), loops 7 (23 pts), boolean chains 9, ternaries 2 (3 pts) (nesting depth added 52). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.inferLocalReceiverType (cognitive 85) src/resolution/name-matcher.ts:18858— name-matcher.inferLocalReceiverType has cognitive complexity 85 (threshold 15). Drivers by points: if/else 28 (61 pts), loops 6 (12 pts), ternaries 5 (7 pts), boolean chains 5 (nesting depth added 41). Of this number, 76 points are the body's own statements and 9 belong to one function item inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
TreeSitterExtractor.flushValueRefs (cognitive 85) src/extraction/tree-sitter.ts:1321— TreeSitterExtractor.flushValueRefs has cognitive complexity 85 (threshold 15). Drivers by points: if/else 17 (47 pts), loops 7 (18 pts), boolean chains 11, ternaries 2 (6 pts), match/switch 1 (3 pts) (nesting depth added 47). Of this number, 78 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.
cpp-macro-methods.cppCodeScan (cognitive 83) src/extraction/languages/cpp-macro-methods.ts:474— cpp-macro-methods.cppCodeScan has cognitive complexity 83 (threshold 15). Drivers by points: if/else 20 (60 pts), loops 4 (10 pts), boolean chains 9, ternaries 1 (4 pts) (nesting depth added 49). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cpp-raw-strings.cppNonCodeLines (cognitive 83) src/resolution/cpp-raw-strings.ts:35— cpp-raw-strings.cppNonCodeLines has cognitive complexity 83 (threshold 15). Drivers by points: ternaries 7 (30 pts), if/else 16 (29 pts), loops 5 (15 pts), boolean chains 9 (nesting depth added 46). Of this number, 65 points are the body's own statements and 18 belong to 2 function items inside it that branch. 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.
rust-scopes.readRustScopes (cognitive 82) src/resolution/rust-scopes.ts:411— rust-scopes.readRustScopes has cognitive complexity 82 (threshold 15). Drivers by points: if/else 23 (57 pts), loops 7 (11 pts), boolean chains 8, ternaries 3 (6 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.
name-matcher.matchMemberFunctionRef (cognitive 82) src/resolution/name-matcher.ts:278— name-matcher.matchMemberFunctionRef has cognitive complexity 82 (threshold 15). Drivers by points: if/else 20 (42 pts), ternaries 10 (22 pts), boolean chains 18 (nesting depth added 34). Of this number, 72 points are the body's own statements and 10 belong to 6 function items inside it that branch. 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.
callback-synthesizer.goImplementsEdges (cognitive 82) src/resolution/callback-synthesizer.ts:1034— callback-synthesizer.goImplementsEdges has cognitive complexity 82 (threshold 15). Drivers by points: if/else 50 (116 pts), loops 32 (52 pts), boolean chains 7, ternaries 2 (5 pts) (nesting depth added 89). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (callback-synthesizer.goImplementsEdges::methodArities, callback-synthesizer.goImplementsEdges::wantedArities) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
flow-model.buildFlowLayout (cognitive 81) ui/src/lib/flow-model.ts:343— flow-model.buildFlowLayout has cognitive complexity 81 (threshold 15). Drivers by points: if/else 21 (49 pts), loops 19 (23 pts), boolean chains 5, ternaries 2 (4 pts) (nesting depth added 34). Of this number, 75 points are the body's own statements and 6 belong to one function literal 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.
tier-synthesizer.readRequestPath (cognitive 80) REDACTED:962— tier-synthesizer.readRequestPath has cognitive complexity 80 (threshold 15). Drivers by points: if/else 13 (39 pts), loops 7 (29 pts), boolean chains 10, ternaries 2 (nesting depth added 48). 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.
screens.attribute (cognitive 80) src/ui-server/api/screens.ts:448— screens.attribute has cognitive complexity 80 (threshold 15). Drivers by points: if/else 17 (49 pts), loops 9 (21 pts), boolean chains 5, ternaries 3 (5 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.
ExtractionOrchestrator.sync (cognitive 79) src/extraction/index.ts:3508— ExtractionOrchestrator.sync has cognitive complexity 79 (threshold 15). Drivers by points: if/else 27 (50 pts), loops 10 (12 pts), boolean chains 7, error handling 2 (5 pts), ternaries 5 (nesting depth added 28). Of this number, 75 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.
name-matcher.readGoScopes (cognitive 78) src/resolution/name-matcher.ts:2822— name-matcher.readGoScopes has cognitive complexity 78 (threshold 15). Drivers by points: if/else 16 (29 pts), loops 12 (23 pts), ternaries 8 (15 pts), boolean chains 11 (nesting depth added 31). Of this number, 72 points are the body's own statements and 6 belong to 3 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.
callback-synthesizer.erlangBehaviourDispatchEdges (cognitive 78) src/resolution/callback-synthesizer.ts:4754— callback-synthesizer.erlangBehaviourDispatchEdges has cognitive complexity 78 (threshold 15). Drivers by points: if/else 25 (59 pts), loops 8 (12 pts), boolean chains 6, ternaries 1 (nesting depth added 38). Of this number, 69 points are the body's own statements and 9 belong to 3 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.
vue-template-calls.scanMarkup (cognitive 76) src/extraction/vue-template-calls.ts:127— vue-template-calls.scanMarkup has cognitive complexity 76 (threshold 15). Drivers by points: if/else 17 (44 pts), loops 6 (18 pts), boolean chains 9, ternaries 2 (5 pts) (nesting depth added 42). Of this number, 75 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.
callback-synthesizer.laravelEventEdges (cognitive 76) src/resolution/callback-synthesizer.ts:4931— callback-synthesizer.laravelEventEdges has cognitive complexity 76 (threshold 15). Drivers by points: if/else 17 (45 pts), loops 8 (23 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 45). Of this number, 73 points are the body's own statements and 3 belong to 4 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.
index.runInstallerWithOptions (cognitive 76) src/installer/index.ts:86— index.runInstallerWithOptions has cognitive complexity 76 (threshold 15). Drivers by points: if/else 28 (43 pts), ternaries 8 (23 pts), loops 3 (5 pts), error handling 1 (3 pts), boolean chains 2 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
angular-router.parseAngularRoutes::walk (cognitive 75) src/resolution/frameworks/angular-router.ts:265— angular-router.parseAngularRoutes::walk has cognitive complexity 75 (threshold 15). Drivers by points: if/else 15 (36 pts), ternaries 9 (26 pts), boolean chains 8, loops 2 (5 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.
cpp-macro-visibility.walkTranslationUnit::scan (cognitive 74) REDACTED:293— cpp-macro-visibility.walkTranslationUnit::scan has cognitive complexity 74 (threshold 15). Drivers by points: if/else 19 (40 pts), ternaries 8 (24 pts), boolean chains 9, loops 1 (nesting depth added 37). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
name-matcher.matchFuzzy (cognitive 74) src/resolution/name-matcher.ts:26900— name-matcher.matchFuzzy has cognitive complexity 74 (threshold 15). Drivers by points: boolean chains 63, ternaries 9 (10 pts), if/else 1 (nesting depth added 1). Of this number, 41 points are the body's own statements and 33 belong to 2 function literals inside it that branch. 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.
callback-synthesizer.springEventEdges (cognitive 74) src/resolution/callback-synthesizer.ts:4210— callback-synthesizer.springEventEdges has cognitive complexity 74 (threshold 15). Drivers by points: if/else 19 (52 pts), loops 6 (12 pts), boolean chains 10 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CodeGraph.indexAll (cognitive 74) src/index.ts:579— CodeGraph.indexAll has cognitive complexity 74 (threshold 15). Drivers by points: if/else 31 (43 pts), error handling 9 (15 pts), boolean chains 12, ternaries 2 (4 pts) (nesting depth added 20). None of this is in the body itself: all 74 points belong to one function literal inside it that branches (line 580). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
name-matcher.cppExpressionType (cognitive 72) src/resolution/name-matcher.ts:14387— name-matcher.cppExpressionType has cognitive complexity 72 (threshold 15). Drivers by points: if/else 26 (36 pts), ternaries 11 (19 pts), boolean chains 15, loops 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
angular-template-synthesizer.templateMemberUses (cognitive 72) src/resolution/angular-template-synthesizer.ts:468— angular-template-synthesizer.templateMemberUses has cognitive complexity 72 (threshold 15). Drivers by points: if/else 13 (34 pts), loops 16 (31 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 38). Of this number, 70 points are the body's own statements and 2 belong to one function literal 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.
pascal-preparse.statementsShape (cognitive 71) src/extraction/languages/pascal-preparse.ts:695— pascal-preparse.statementsShape has cognitive complexity 71 (threshold 15). Drivers by points: if/else 26 (45 pts), boolean chains 21, ternaries 2 (4 pts), loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TreeSitterExtractor.extractTypeAlias (cognitive 71) src/extraction/tree-sitter.ts:4400— TreeSitterExtractor.extractTypeAlias has cognitive complexity 71 (threshold 15). Drivers by points: if/else 23 (48 pts), loops 4 (14 pts), boolean chains 6, ternaries 3 (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.
pascal-preparse.preParsePascal (cognitive 70) src/extraction/languages/pascal-preparse.ts:993— pascal-preparse.preParsePascal has cognitive complexity 70 (threshold 15). Drivers by points: if/else 22 (45 pts), boolean chains 11, ternaries 3 (8 pts), loops 3 (6 pts) (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
import-resolver.findExportedSymbolWalk (cognitive 70) REDACTED:4001— import-resolver.findExportedSymbolWalk has cognitive complexity 70 (threshold 15). Drivers by points: if/else 25 (50 pts), ternaries 5 (10 pts), boolean chains 8, loops 2 (nesting depth added 30). Of this number, 68 points are the body's own statements and 2 belong to 2 function literals 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.
index.runUninstaller (cognitive 70) src/installer/index.ts:464— index.runUninstaller has cognitive complexity 70 (threshold 15). Drivers by points: if/else 25 (42 pts), loops 5 (14 pts), ternaries 4 (10 pts), boolean chains 4 (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.
name-matcher.resolveMethodOnType (cognitive 69) src/resolution/name-matcher.ts:13059— name-matcher.resolveMethodOnType has cognitive complexity 69 (threshold 15). Drivers by points: if/else 22 (46 pts), boolean chains 12, ternaries 3 (6 pts), loops 2 (5 pts) (nesting depth added 30). Of this number, 50 points are the body's own statements and 19 belong to 2 function literals inside it that branch. 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.
branch-guards.triggerInTree (cognitive 69) src/graph/branch-guards.ts:835— branch-guards.triggerInTree has cognitive complexity 69 (threshold 15). Drivers by points: if/else 11 (29 pts), ternaries 7 (24 pts), boolean chains 11, loops 2 (5 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.
name-matcher.rustTypedMethodCall (cognitive 68) src/resolution/name-matcher.ts:11170— name-matcher.rustTypedMethodCall has cognitive complexity 68 (threshold 15). Drivers by points: if/else 26 (39 pts), boolean chains 14, ternaries 7 (13 pts), loops 2 (nesting depth added 19). Of this number, 63 points are the body's own statements and 5 belong to 4 function literals 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.
import-resolver.declaredPythonRoots (cognitive 68) REDACTED:665— import-resolver.declaredPythonRoots has cognitive complexity 68 (threshold 15). Drivers by points: if/else 18 (48 pts), loops 5 (19 pts), boolean chains 1 (nesting depth added 44). Of this number, 66 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
callback-synthesizer.vueTemplateEdges (cognitive 67) src/resolution/callback-synthesizer.ts:2650— callback-synthesizer.vueTemplateEdges has cognitive complexity 67 (threshold 15). Drivers by points: if/else 16 (40 pts), loops 7 (13 pts), boolean chains 8, ternaries 2 (6 pts) (nesting depth added 34). Of this number, 57 points are the body's own statements and 10 belong to 4 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.
callback-synthesizer.nixOptionPathEdges (cognitive 67) src/resolution/callback-synthesizer.ts:4639— callback-synthesizer.nixOptionPathEdges has cognitive complexity 67 (threshold 15). Drivers by points: if/else 16 (38 pts), loops 7 (12 pts), ternaries 3 (9 pts), boolean chains 8 (nesting depth added 33). Of this number, 62 points are the body's own statements and 5 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.
named-symbol-flow.walkBidirectional (cognitive 67) src/graph/named-symbol-flow.ts:492— named-symbol-flow.walkBidirectional has cognitive complexity 67 (threshold 15). Drivers by points: if/else 16 (41 pts), loops 9 (21 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 38). Of this number, 64 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.
function-ref.goLocalBindings (cognitive 66) src/extraction/function-ref.ts:932— function-ref.goLocalBindings has cognitive complexity 66 (threshold 15). Drivers by points: loops 11 (34 pts), if/else 8 (27 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 44). Of this number, 56 points are the body's own statements and 10 belong to 2 function items inside it that branch. 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.
strip-comments.stripGo (cognitive 66) src/resolution/strip-comments.ts:391— strip-comments.stripGo has cognitive complexity 66 (threshold 15). Drivers by points: if/else 13 (38 pts), loops 6 (16 pts), boolean chains 12 (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.
workspace-packages.collectPathDeps (cognitive 66) src/resolution/workspace-packages.ts:291— workspace-packages.collectPathDeps has cognitive complexity 66 (threshold 15). Drivers by points: if/else 13 (47 pts), loops 4 (10 pts), ternaries 1 (4 pts), boolean chains 3, error handling 1 (2 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.
JsxLexer.code (cognitive 66) src/resolution/jsx-code.ts:247— JsxLexer.code has cognitive complexity 66 (threshold 15). Drivers by points: if/else 27 (41 pts), boolean chains 19, loops 3 (6 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
callback-synthesizer.arkuiEmitterEdges (cognitive 66) src/resolution/callback-synthesizer.ts:582— callback-synthesizer.arkuiEmitterEdges has cognitive complexity 66 (threshold 15). Drivers by points: if/else 18 (45 pts), loops 6 (10 pts), boolean chains 7, ternaries 2 (4 pts) (nesting depth added 33). Of this number, 59 points are the body's own statements and 7 belong to 4 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.
TreeSitterExtractor.extractField (cognitive 65) src/extraction/tree-sitter.ts:3166— TreeSitterExtractor.extractField has cognitive complexity 65 (threshold 15). Drivers by points: if/else 13 (30 pts), ternaries 7 (23 pts), boolean chains 7, loops 2 (5 pts) (nesting depth added 36). Of this number, 63 points are the body's own statements and 2 belong to 2 function literals inside it that branch. 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.
callback-synthesizer.closureCollectionEdges (cognitive 65) src/resolution/callback-synthesizer.ts:245— callback-synthesizer.closureCollectionEdges has cognitive complexity 65 (threshold 15). Drivers by points: if/else 16 (42 pts), loops 7 (16 pts), boolean chains 7 (nesting depth added 35). Of this number, 62 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.
ReferenceResolver.isBuiltInOrExternal (cognitive 64) REDACTED:3337— ReferenceResolver.isBuiltInOrExternal has cognitive complexity 64 (threshold 15). Drivers by points: if/else 22 (42 pts), boolean chains 20, ternaries 1 (2 pts) (nesting depth added 21). Of this number, 60 points are the body's own statements and 4 belong to 2 function literals 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.
ToolHandler.buildFlowFromNamedSymbols (cognitive 64) REDACTED:3505— ToolHandler.buildFlowFromNamedSymbols has cognitive complexity 64 (threshold 15). Drivers by points: if/else 28 (54 pts), ternaries 13 (28 pts), loops 9 (15 pts), boolean chains 11, error handling 1 (nesting depth added 47). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (ToolHandler.buildFlowFromNamedSymbols::collectSynthLinks) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ToolHandler.handleFileView (cognitive 64) REDACTED:7979— ToolHandler.handleFileView has cognitive complexity 64 (threshold 15). Drivers by points: if/else 22 (31 pts), ternaries 10 (19 pts), boolean chains 10, error handling 1 (2 pts), loops 2 (nesting depth added 19). Of this number, 52 points are the body's own statements and 12 belong to 3 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.
react-router-synthesizer.reactRouterLinkEdges (cognitive 63) REDACTED:118— react-router-synthesizer.reactRouterLinkEdges has cognitive complexity 63 (threshold 15). Drivers by points: if/else 15 (42 pts), ternaries 3 (11 pts), loops 3 (6 pts), boolean chains 4 (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.
strip-comments.stripRuby (cognitive 62) src/resolution/strip-comments.ts:201— strip-comments.stripRuby has cognitive complexity 62 (threshold 15). Drivers by points: if/else 10 (30 pts), loops 6 (21 pts), boolean chains 11 (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.
name-matcher.cppForBodyEncloses (cognitive 62) src/resolution/name-matcher.ts:14608— name-matcher.cppForBodyEncloses has cognitive complexity 62 (threshold 15). Drivers by points: if/else 16 (44 pts), boolean chains 13, loops 2 (3 pts), ternaries 1 (2 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.
TreeSitterExtractor.visitPascalNode (cognitive 62) src/extraction/tree-sitter.ts:8553— TreeSitterExtractor.visitPascalNode has cognitive complexity 62 (threshold 15). Drivers by points: if/else 25 (44 pts), loops 6 (12 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
map-model.buildMapLayout (cognitive 62) ui/src/lib/map-model.ts:301— map-model.buildMapLayout has cognitive complexity 62 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 16 (20 pts), ternaries 6 (11 pts), boolean chains 10 (nesting depth added 20). Of this number, 42 points are the body's own statements and 20 belong to 5 function literals 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.
parse-run.classifySufficiency (cognitive 61) scripts/agent-eval/parse-run.mjs:853— parse-run.classifySufficiency has cognitive complexity 61 (threshold 15). Drivers by points: if/else 13 (40 pts), loops 7 (14 pts), boolean chains 7 (nesting depth added 34). Of this number, 58 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
next-router-synthesizer.nextLinkEdges (cognitive 61) src/resolution/next-router-synthesizer.ts:41— next-router-synthesizer.nextLinkEdges has cognitive complexity 61 (threshold 15). Drivers by points: if/else 15 (42 pts), ternaries 2 (9 pts), loops 3 (6 pts), boolean chains 4 (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.
callback-synthesizer.fieldChannelEdges (cognitive 61) src/resolution/callback-synthesizer.ts:165— callback-synthesizer.fieldChannelEdges has cognitive complexity 61 (threshold 15). Drivers by points: if/else 17 (47 pts), boolean chains 7, loops 4 (7 pts) (nesting depth added 33). Of this number, 59 points are the body's own statements and 2 belong to 2 function literals 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.
ReferenceResolver.resolveDeferredThisMemberRefs (cognitive 61) REDACTED:3811— ReferenceResolver.resolveDeferredThisMemberRefs has cognitive complexity 61 (threshold 15). Drivers by points: if/else 16 (41 pts), loops 5 (12 pts), boolean chains 8 (nesting depth added 32). Of this number, 47 points are the body's own statements and 14 belong to 3 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.
rust-scopes.blankRustCode (cognitive 60) src/resolution/rust-scopes.ts:98— rust-scopes.blankRustCode has cognitive complexity 60 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 11, loops 4 (11 pts), ternaries 3 (9 pts) (nesting depth added 28). Of this number, 58 points are the body's own statements and 2 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.
name-matcher.goReceiverChainType (cognitive 60) src/resolution/name-matcher.ts:22140— name-matcher.goReceiverChainType has cognitive complexity 60 (threshold 15). Drivers by points: if/else 23 (35 pts), boolean chains 14, ternaries 4 (10 pts), loops 1 (nesting depth added 18). Of this number, 59 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.
TreeSitterExtractor.cppStackConstructions (cognitive 60) src/extraction/tree-sitter.ts:6625— TreeSitterExtractor.cppStackConstructions has cognitive complexity 60 (threshold 15). Drivers by points: if/else 15 (33 pts), boolean chains 11, ternaries 2 (9 pts), loops 3 (7 pts) (nesting depth added 29). Of this number, 36 points are the body's own statements and 24 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.
callback-synthesizer.objectRegistryEdges (cognitive 60) src/resolution/callback-synthesizer.ts:3762— callback-synthesizer.objectRegistryEdges has cognitive complexity 60 (threshold 15). Drivers by points: if/else 15 (41 pts), loops 5 (10 pts), ternaries 2 (5 pts), boolean chains 4 (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.
callback-synthesizer.mediatrDispatchEdges (cognitive 60) src/resolution/callback-synthesizer.ts:4338— callback-synthesizer.mediatrDispatchEdges has cognitive complexity 60 (threshold 15). Drivers by points: if/else 17 (45 pts), loops 5 (9 pts), boolean chains 6 (nesting depth added 32). Of this number, 59 points are the body's own statements and 1 belongs to one function literal 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.
dart-local-scope.blankDartLiterals (cognitive 58) src/resolution/dart-local-scope.ts:542— dart-local-scope.blankDartLiterals has cognitive complexity 58 (threshold 15). Drivers by points: if/else 16 (35 pts), boolean chains 15, loops 3 (5 pts), ternaries 1 (3 pts) (nesting depth added 23). Of this number, 53 points are the body's own statements and 5 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.
name-matcher.pythonLineBindings (cognitive 58) src/resolution/name-matcher.ts:547— name-matcher.pythonLineBindings has cognitive complexity 58 (threshold 15). Drivers by points: if/else 19 (31 pts), ternaries 6 (16 pts), loops 4 (6 pts), boolean chains 5 (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.
name-matcher.rustCrateGraph (cognitive 58) src/resolution/name-matcher.ts:8267— name-matcher.rustCrateGraph has cognitive complexity 58 (threshold 15). Drivers by points: if/else 11 (24 pts), ternaries 9 (20 pts), loops 6 (10 pts), boolean chains 4 (nesting depth added 28). Of this number, 48 points are the body's own statements and 10 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.
name-matcher.resolveAwaitedCallType (cognitive 58) src/resolution/name-matcher.ts:19126— name-matcher.resolveAwaitedCallType has cognitive complexity 58 (threshold 15). Drivers by points: if/else 24 (33 pts), boolean chains 14, loops 5 (6 pts), ternaries 4 (5 pts) (nesting depth added 11). Of this number, 45 points are the body's own statements and 13 belong to 6 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.
name-matcher.pythonAttrStatementsUncached (cognitive 58) src/resolution/name-matcher.ts:23216— name-matcher.pythonAttrStatementsUncached has cognitive complexity 58 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 15, ternaries 4 (10 pts), loops 2 (4 pts) (nesting depth added 23). Of this number, 57 points are the body's own statements and 1 belongs to one function literal 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.
strip-comments.stripRust (cognitive 57) src/resolution/strip-comments.ts:464— strip-comments.stripRust has cognitive complexity 57 (threshold 15). Drivers by points: if/else 12 (32 pts), loops 5 (13 pts), boolean chains 12 (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.
java.extractSpringConfig (cognitive 57) src/resolution/frameworks/java.ts:339— java.extractSpringConfig has cognitive complexity 57 (threshold 15). Drivers by points: if/else 15 (38 pts), loops 5 (10 pts), boolean chains 8, ternaries 1 (nesting depth added 28). Of this number, 26 points are the body's own statements and 31 belong to 3 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.
vue-router-synthesizer.vueRouterLinkEdges (cognitive 57) src/resolution/vue-router-synthesizer.ts:47— vue-router-synthesizer.vueRouterLinkEdges has cognitive complexity 57 (threshold 15). Drivers by points: if/else 12 (31 pts), ternaries 4 (14 pts), boolean chains 6, loops 3 (6 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.
callback-synthesizer.eventEmitterEdges (cognitive 56) src/resolution/callback-synthesizer.ts:322— callback-synthesizer.eventEmitterEdges has cognitive complexity 56 (threshold 15). Drivers by points: if/else 13 (36 pts), loops 6 (13 pts), boolean chains 7 (nesting depth added 30). Of this number, 54 points are the body's own statements and 2 belong to one function literal 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.
type-hierarchy.walkDescendants (cognitive 56) src/graph/type-hierarchy.ts:243— type-hierarchy.walkDescendants has cognitive complexity 56 (threshold 15). Drivers by points: if/else 12 (37 pts), loops 6 (12 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
seq-matrix.parse (cognitive 55) scripts/agent-eval/seq-matrix.mjs:30— seq-matrix.parse has cognitive complexity 55 (threshold 15). Drivers by points: if/else 8 (22 pts), ternaries 4 (13 pts), boolean chains 10, loops 4 (8 pts), error handling 1 (2 pts) (nesting depth added 28). Of this number, 54 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
c-cpp.flattenMidStatementConditionals (cognitive 55) REDACTED:1646— c-cpp.flattenMidStatementConditionals has cognitive complexity 55 (threshold 15). Drivers by points: if/else 19 (48 pts), boolean chains 5, loops 1, ternaries 1 (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.
react.scanRoutes.jsx (cognitive 55) REDACTED:1250— react.scanRoutes.jsx has cognitive complexity 55 (threshold 15). Drivers by points: if/else 23 (39 pts), boolean chains 8, ternaries 3 (6 pts), loops 2 (nesting depth added 19). Of this number, 45 points are the body's own statements and 10 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.
tree-sitter.extractNameRaw (cognitive 55) src/extraction/tree-sitter.ts:121— tree-sitter.extractNameRaw has cognitive complexity 55 (threshold 15). Drivers by points: if/else 14 (31 pts), boolean chains 9, loops 4 (9 pts), ternaries 2 (6 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
strip-comments.blankStringContents (cognitive 54) src/resolution/strip-comments.ts:40— strip-comments.blankStringContents has cognitive complexity 54 (threshold 15). Drivers by points: if/else 11 (38 pts), boolean chains 9, loops 3 (7 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.matchFunctionRef (cognitive 54) src/resolution/name-matcher.ts:1104— name-matcher.matchFunctionRef has cognitive complexity 54 (threshold 15). Drivers by points: boolean chains 23, if/else 14 (19 pts), ternaries 6 (12 pts) (nesting depth added 11). Of this number, 42 points are the body's own statements and 12 belong to 7 function literals 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.
callback-synthesizer.goPromotions (cognitive 54) src/resolution/callback-synthesizer.ts:1485— callback-synthesizer.goPromotions has cognitive complexity 54 (threshold 15). Drivers by points: if/else 12 (28 pts), loops 7 (16 pts), ternaries 2 (6 pts), boolean chains 4 (nesting depth added 29). None of this is in the body itself: all 54 points belong to 6 function items inside it that branch (a function literal at line 1539, ifaceMethods, kindOf, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
named-symbol-flow.resolveNamedTokens (cognitive 54) src/graph/named-symbol-flow.ts:278— named-symbol-flow.resolveNamedTokens has cognitive complexity 54 (threshold 15). Drivers by points: if/else 10 (31 pts), loops 5 (9 pts), ternaries 4 (8 pts), boolean chains 6 (nesting depth added 29). Of this number, 49 points are the body's own statements and 5 belong to one function literal 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.
name-matcher.readDartChain (cognitive 53) src/resolution/name-matcher.ts:4772— name-matcher.readDartChain has cognitive complexity 53 (threshold 15). Drivers by points: if/else 15 (40 pts), loops 5 (8 pts), boolean chains 5 (nesting depth added 28). Of this number, 51 points are the body's own statements and 2 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.
name-matcher.objcFileMembers (cognitive 53) src/resolution/name-matcher.ts:7472— name-matcher.objcFileMembers has cognitive complexity 53 (threshold 15). Drivers by points: if/else 17 (35 pts), boolean chains 8, loops 3 (7 pts), ternaries 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.
name-matcher.rustItemOf (cognitive 53) src/resolution/name-matcher.ts:10662— name-matcher.rustItemOf has cognitive complexity 53 (threshold 15). Drivers by points: if/else 15 (22 pts), ternaries 9 (20 pts), boolean chains 8, loops 2 (3 pts) (nesting depth added 19). Of this number, 51 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.
name-matcher.cppLocalBindings (cognitive 53) src/resolution/name-matcher.ts:16539— name-matcher.cppLocalBindings has cognitive complexity 53 (threshold 15). Drivers by points: if/else 13 (36 pts), loops 6 (10 pts), boolean chains 6, ternaries 1 (nesting depth added 27). Of this number, 48 points are the body's own statements and 5 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.
name-matcher.blankDartCode (cognitive 52) src/resolution/name-matcher.ts:4663— name-matcher.blankDartCode has cognitive complexity 52 (threshold 15). Drivers by points: if/else 17 (30 pts), boolean chains 14, loops 3 (5 pts), ternaries 1 (3 pts) (nesting depth added 17). Of this number, 47 points are the body's own statements and 5 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.
callback-synthesizer.goGrpcStubImplEdges (cognitive 52) src/resolution/callback-synthesizer.ts:1788— callback-synthesizer.goGrpcStubImplEdges has cognitive complexity 52 (threshold 15). Drivers by points: if/else 12 (39 pts), loops 5 (11 pts), boolean chains 2 (nesting depth added 33). Of this number, 50 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.
name-matcher.cppDataMemberIn (cognitive 51) src/resolution/name-matcher.ts:14028— name-matcher.cppDataMemberIn has cognitive complexity 51 (threshold 15). Drivers by points: if/else 11 (25 pts), ternaries 4 (13 pts), boolean chains 8, loops 2 (5 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
import-resolver.resolvePythonModuleMember (cognitive 51) REDACTED:3384— import-resolver.resolvePythonModuleMember has cognitive complexity 51 (threshold 15). Drivers by points: if/else 12 (24 pts), ternaries 6 (13 pts), boolean chains 10, loops 2 (4 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.
TreeSitterExtractor.extractStaticMemberRef (cognitive 51) src/extraction/tree-sitter.ts:6699— TreeSitterExtractor.extractStaticMemberRef has cognitive complexity 51 (threshold 15). Drivers by points: if/else 24 (39 pts), boolean chains 8, ternaries 2 (4 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
module-importers.passedOn (cognitive 51) src/resolution/module-importers.ts:575— module-importers.passedOn has cognitive complexity 51 (threshold 15). Drivers by points: if/else 11 (28 pts), loops 5 (13 pts), boolean chains 6, ternaries 1 (4 pts) (nesting depth added 28). Of this number, 48 points are the body's own statements and 3 belong to 3 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.
TreeSitterExtractor.extractDecoratorsFor (cognitive 50) src/extraction/tree-sitter.ts:7012— TreeSitterExtractor.extractDecoratorsFor has cognitive complexity 50 (threshold 15). Drivers by points: if/else 25 (55 pts), loops 6 (12 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (TreeSitterExtractor.extractDecoratorsFor::consider) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
branch-guards.memberTypesInTree (cognitive 50) src/graph/branch-guards.ts:2319— branch-guards.memberTypesInTree has cognitive complexity 50 (threshold 15). Drivers by points: if/else 18 (39 pts), loops 6 (12 pts), ternaries 3 (10 pts), boolean chains 8, match/switch 1 (2 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. This shape REPEATS in the file: one other method here (branch-guards.memberTypesInTree::visitParams) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
screens-model.entryLayering (cognitive 50) ui/src/lib/screens-model.ts:161— screens-model.entryLayering has cognitive complexity 50 (threshold 15). Drivers by points: loops 14 (25 pts), if/else 9 (17 pts), ternaries 3 (5 pts), boolean chains 3 (nesting depth added 21). None of this is in the body itself: all 50 points belong to 3 function literals inside it that branch (lines 166, 182, 184). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
parse-arms.parse (cognitive 49) scripts/agent-eval/parse-arms.mjs:23— parse-arms.parse has cognitive complexity 49 (threshold 15). Drivers by points: if/else 8 (22 pts), ternaries 3 (12 pts), loops 3 (7 pts), boolean chains 6, error handling 1 (2 pts) (nesting depth added 28). Of this number, 48 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
name-matcher.rustReadType (cognitive 49) src/resolution/name-matcher.ts:10090— name-matcher.rustReadType has cognitive complexity 49 (threshold 15). Drivers by points: if/else 18 (31 pts), ternaries 4 (9 pts), boolean chains 8, loops 1 (nesting depth added 18). Of this number, 47 points are the body's own statements and 2 belong to 2 function literals 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.
name-matcher.cppDeclaratorsAfterFirst (cognitive 49) src/resolution/name-matcher.ts:13582— name-matcher.cppDeclaratorsAfterFirst has cognitive complexity 49 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 11, loops 5 (8 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.
vue-options-api.objectMembers (cognitive 48) REDACTED:101— vue-options-api.objectMembers has cognitive complexity 48 (threshold 15). Drivers by points: if/else 12 (32 pts), ternaries 2 (7 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
decode.decodeExtractBuffers (cognitive 48) src/extraction/kernel/decode.ts:63— decode.decodeExtractBuffers has cognitive complexity 48 (threshold 15). Drivers by points: if/else 20 (37 pts), ternaries 4 (8 pts), loops 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.
dead-code.byNameHookCandidates (cognitive 48) src/graph/dead-code.ts:1007— dead-code.byNameHookCandidates has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (29 pts), loops 10 (14 pts), boolean chains 5 (nesting depth added 17). Of this number, 44 points are the body's own statements and 4 belong to 4 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.
pascal-preparse.holdsBody (cognitive 47) src/extraction/languages/pascal-preparse.ts:503— pascal-preparse.holdsBody has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (35 pts), boolean chains 8, ternaries 1 (3 pts), loops 1 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
name-matcher.rustTypeLookup (cognitive 47) src/resolution/name-matcher.ts:10011— name-matcher.rustTypeLookup has cognitive complexity 47 (threshold 15). Drivers by points: if/else 21 (32 pts), boolean chains 13, ternaries 1 (2 pts) (nesting depth added 12). Of this number, 46 points are the body's own statements and 1 belongs to one function literal 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.
tanstack-router-synthesizer.tanstackLinkEdges (cognitive 47) src/resolution/tanstack-router-synthesizer.ts:49— tanstack-router-synthesizer.tanstackLinkEdges has cognitive complexity 47 (threshold 15). Drivers by points: if/else 12 (33 pts), loops 3 (6 pts), boolean chains 4, ternaries 1 (4 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
explore-diagnostics.renderTable (cognitive 47) src/mcp/explore-diagnostics.ts:678— explore-diagnostics.renderTable has cognitive complexity 47 (threshold 15). Drivers by points: if/else 11 (19 pts), ternaries 4 (14 pts), boolean chains 8, loops 3 (6 pts) (nesting depth added 21). Of this number, 38 points are the body's own statements and 9 belong to 4 function literals 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.
program-model.orderGraph::flow (cognitive 47) ui/src/lib/program-model.ts:140— program-model.orderGraph::flow has cognitive complexity 47 (threshold 15). Drivers by points: loops 6 (20 pts), if/else 7 (17 pts), ternaries 2 (7 pts), boolean chains 3 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
function-ref.captureFnRefCandidates (cognitive 46) src/extraction/function-ref.ts:434— function-ref.captureFnRefCandidates has cognitive complexity 46 (threshold 15). Drivers by points: if/else 11 (26 pts), boolean chains 7, ternaries 3 (7 pts), loops 3 (5 pts), match/switch 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.pythonExternalWrites (cognitive 46) src/resolution/name-matcher.ts:849— name-matcher.pythonExternalWrites has cognitive complexity 46 (threshold 15). Drivers by points: if/else 8 (22 pts), ternaries 5 (13 pts), loops 3 (6 pts), boolean chains 5 (nesting depth added 25). None of this is in the body itself: all 46 points belong to one function literal inside it that branches (line 850). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
index.scanDirectoryWalk::walk (cognitive 46) src/extraction/index.ts:1803— index.scanDirectoryWalk::walk has cognitive complexity 46 (threshold 15). Drivers by points: if/else 15 (37 pts), error handling 3 (5 pts), ternaries 2, boolean chains 1, loops 1 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
sveltekit-synthesizer.svelteKitLinkEdges (cognitive 46) src/resolution/sveltekit-synthesizer.ts:55— sveltekit-synthesizer.svelteKitLinkEdges has cognitive complexity 46 (threshold 15). Drivers by points: if/else 13 (36 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
callback-synthesizer.ginMiddlewareChainEdges (cognitive 46) src/resolution/callback-synthesizer.ts:3436— callback-synthesizer.ginMiddlewareChainEdges has cognitive complexity 46 (threshold 15). Drivers by points: if/else 12 (28 pts), loops 6 (10 pts), boolean chains 8 (nesting depth added 20). Of this number, 44 points are the body's own statements and 2 belong to one function literal 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.
ToolHandler.execute (cognitive 46) REDACTED:2898— ToolHandler.execute has cognitive complexity 46 (threshold 15). Drivers by points: if/else 20 (34 pts), boolean chains 9, ternaries 2, error handling 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.
strip-comments.stripPhp (cognitive 45) src/resolution/strip-comments.ts:331— strip-comments.stripPhp has cognitive complexity 45 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 5 (13 pts), boolean chains 10 (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.
name-matcher.isUnexportedModuleBinding (cognitive 45) src/resolution/name-matcher.ts:1656— name-matcher.isUnexportedModuleBinding has cognitive complexity 45 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 5 (17 pts), boolean chains 5, ternaries 1 (5 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.isJavaTypeVisible (cognitive 45) src/resolution/name-matcher.ts:3237— name-matcher.isJavaTypeVisible has cognitive complexity 45 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 19, ternaries 3, loops 1 (nesting depth added 5). Of this number, 37 points are the body's own statements and 8 belong to 4 function items inside it that branch. 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.
name-matcher.goExprType (cognitive 45) src/resolution/name-matcher.ts:22324— name-matcher.goExprType has cognitive complexity 45 (threshold 15). Drivers by points: if/else 18 (32 pts), boolean chains 7, ternaries 2 (4 pts), loops 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
import-resolver.buildPythonModuleIndex (cognitive 45) REDACTED:596— import-resolver.buildPythonModuleIndex has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 9 (13 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 16). Of this number, 37 points are the body's own statements and 8 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.
react.tableRoutes (cognitive 45) REDACTED:1984— react.tableRoutes has cognitive complexity 45 (threshold 15). Drivers by points: loops 9 (17 pts), if/else 8 (15 pts), ternaries 4 (10 pts), boolean chains 3 (nesting depth added 21). Of this number, 41 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.
callback-synthesizer.piniaStoreEdges (cognitive 45) src/resolution/callback-synthesizer.ts:3916— callback-synthesizer.piniaStoreEdges has cognitive complexity 45 (threshold 15). Drivers by points: if/else 13 (30 pts), loops 5 (8 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 21). Of this number, 44 points are the body's own statements and 1 belongs to one function literal 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.
ReferenceResolver.manifestScope (cognitive 45) REDACTED:4352— ReferenceResolver.manifestScope has cognitive complexity 45 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 4 (8 pts), boolean chains 7, ternaries 4 (7 pts), error handling 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.
ToolHandler.buildPolymorphicBoundaries (cognitive 45) REDACTED:3821— ToolHandler.buildPolymorphicBoundaries has cognitive complexity 45 (threshold 15). Drivers by points: if/else 18 (37 pts), boolean chains 18, error handling 6 (9 pts), loops 5 (9 pts), ternaries 5 (8 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. This shape REPEATS in the file: one other method here (ToolHandler.buildPolymorphicBoundaries::memberOfSupertype::visit) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
index.handleRequest (cognitive 45) REDACTED:237— index.handleRequest has cognitive complexity 45 (threshold 15). Drivers by points: if/else 19 (32 pts), ternaries 2 (6 pts), error handling 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
strip-comments.stripPython (cognitive 44) src/resolution/strip-comments.ts:139— strip-comments.stripPython has cognitive complexity 44 (threshold 15). Drivers by points: if/else 8 (25 pts), loops 4 (10 pts), boolean chains 9 (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.
name-matcher.isVisibleAcrossFiles (cognitive 44) src/resolution/name-matcher.ts:3450— name-matcher.isVisibleAcrossFiles has cognitive complexity 44 (threshold 15). Drivers by points: if/else 23 (27 pts), boolean chains 17 (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.
name-matcher.jsBindingSites (cognitive 44) src/resolution/name-matcher.ts:19335— name-matcher.jsBindingSites has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 8, loops 5 (6 pts), ternaries 3 (6 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.
name-matcher.goChainLinks (cognitive 44) src/resolution/name-matcher.ts:21694— name-matcher.goChainLinks has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (22 pts), ternaries 5 (11 pts), loops 3 (6 pts), boolean chains 5 (nesting depth added 17). Of this number, 41 points are the body's own statements and 3 belong to 3 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.
react.exportedComponent (cognitive 44) REDACTED:537— react.exportedComponent has cognitive complexity 44 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 6 (16 pts), boolean chains 8, loops 3 (4 pts) (nesting depth added 18). Of this number, 42 points are the body's own statements and 2 belong to 2 function items inside it that branch. 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.
TreeSitterExtractor.walkComponentWrapper (cognitive 44) src/extraction/tree-sitter.ts:2569— TreeSitterExtractor.walkComponentWrapper has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 7, loops 3 (6 pts), ternaries 2 (4 pts), match/switch 1 (nesting depth added 19). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
TreeSitterExtractor.extractPascalDeclType (cognitive 44) src/extraction/tree-sitter.ts:8701— TreeSitterExtractor.extractPascalDeclType has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (34 pts), loops 3 (10 pts) (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
goframe-synthesizer.goframeRouteEdges (cognitive 44) src/resolution/goframe-synthesizer.ts:77— goframe-synthesizer.goframeRouteEdges has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (31 pts), loops 5 (7 pts), boolean chains 4, ternaries 1 (2 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.
c-cpp.recoverSingleArgMacroDefinedName (cognitive 43) REDACTED:126— c-cpp.recoverSingleArgMacroDefinedName has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 10, loops 2 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
c-cpp.blankCppAnnotationMacroCalls (cognitive 43) REDACTED:1167— c-cpp.blankCppAnnotationMacroCalls has cognitive complexity 43 (threshold 15). Drivers by points: if/else 10 (26 pts), loops 5 (11 pts), boolean chains 6 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExtractionOrchestrator.getChangedFiles (cognitive 43) src/extraction/index.ts:3858— ExtractionOrchestrator.getChangedFiles has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (29 pts), error handling 3 (6 pts), loops 4 (5 pts), boolean chains 2, ternaries 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReferenceResolver.reopenNavigationsFor (cognitive 43) REDACTED:3104— ReferenceResolver.reopenNavigationsFor has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (25 pts), loops 9 (15 pts), boolean chains 3 (nesting depth added 17). Of this number, 42 points are the body's own statements and 1 belongs to one function literal 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.
ReferenceResolver.gateTargetKind (cognitive 43) REDACTED:3963— ReferenceResolver.gateTargetKind has cognitive complexity 43 (threshold 15). Drivers by points: if/else 18 (25 pts), boolean chains 16, ternaries 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.
project-lifecycle.activate (cognitive 43) src/mcp/project-lifecycle.ts:119— project-lifecycle.activate has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (32 pts), loops 2 (5 pts), boolean chains 3, error handling 1 (3 pts) (nesting depth added 23). Of this number, 39 points are the body's own statements and 4 belong to one function literal 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.
name-matcher.pythonLocalClassUncached (cognitive 42) src/resolution/name-matcher.ts:24020— name-matcher.pythonLocalClassUncached has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (25 pts), boolean chains 8, ternaries 3 (7 pts), loops 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.matchGoFieldChainCall (cognitive 42) src/resolution/name-matcher.ts:24150— name-matcher.matchGoFieldChainCall has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (29 pts), boolean chains 7, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 19). Of this number, 40 points are the body's own statements and 2 belong to one function literal 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.
TreeSitterExtractor.extractPascalDefProc (cognitive 42) src/extraction/tree-sitter.ts:8839— TreeSitterExtractor.extractPascalDefProc has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 2 (8 pts), boolean chains 4, ternaries 3 (nesting depth added 21). Of this number, 40 points are the body's own statements and 2 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.
tier-synthesizer.collectTestRequests (cognitive 42) REDACTED:1119— tier-synthesizer.collectTestRequests has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 9 (21 pts), if/else 13 (18 pts), boolean chains 2, loops 1 (nesting depth added 17). Most of this is not in the body itself: 10 of the 42 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 1167, add, a function literal at line 1152, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
callback-synthesizer.goListItems (cognitive 42) src/resolution/callback-synthesizer.ts:887— callback-synthesizer.goListItems has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (27 pts), boolean chains 8, loops 2 (4 pts), ternaries 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.
ReferenceResolver.hasAnyPossibleMatch (cognitive 42) REDACTED:1207— ReferenceResolver.hasAnyPossibleMatch has cognitive complexity 42 (threshold 15). Drivers by points: if/else 17 (33 pts), boolean chains 7, loops 1, ternaries 1 (nesting depth added 16). Of this number, 41 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.
strip-comments.stripCStyle (cognitive 41) src/resolution/strip-comments.ts:279— strip-comments.stripCStyle has cognitive complexity 41 (threshold 15). Drivers by points: if/else 7 (20 pts), boolean chains 11, loops 4 (10 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.
name-matcher.rustFieldChainAt (cognitive 41) src/resolution/name-matcher.ts:24655— name-matcher.rustFieldChainAt has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (29 pts), boolean chains 8, ternaries 1 (3 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
import-resolver.resolvePythonModule (cognitive 41) REDACTED:781— import-resolver.resolvePythonModule has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 8, loops 4 (5 pts), ternaries 2 (4 pts) (nesting depth added 14). Of this number, 39 points are the body's own statements and 2 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.
express.scanCall (cognitive 41) REDACTED:379— express.scanCall has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (26 pts), boolean chains 7, loops 2 (4 pts), ternaries 1 (4 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.
module-importers.reopenReferencesThroughBarrels (cognitive 41) src/resolution/module-importers.ts:371— module-importers.reopenReferencesThroughBarrels has cognitive complexity 41 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 6 (13 pts), boolean chains 3 (nesting depth added 23). Of this number, 40 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.
type-parameters.gateTypeParameter (cognitive 41) src/resolution/type-parameters.ts:50— type-parameters.gateTypeParameter has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 8, loops 3 (6 pts), ternaries 2 (6 pts) (nesting depth added 16). Of this number, 40 points are the body's own statements and 1 belongs to one function literal 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.
callback-synthesizer.erlangArityAt (cognitive 41) src/resolution/callback-synthesizer.ts:4537— callback-synthesizer.erlangArityAt has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (26 pts), boolean chains 7, loops 2 (4 pts), ternaries 1 (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.
ReferenceResolver.resolveCfmlComponentPath (cognitive 41) REDACTED:3582— ReferenceResolver.resolveCfmlComponentPath has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 9, loops 3 (5 pts), ternaries 2 (3 pts) (nesting depth added 14). Of this number, 38 points are the body's own statements and 3 belong to one function literal 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.
GraphTraverser.traverseBFS (cognitive 41) src/graph/traversal.ts:48— GraphTraverser.traverseBFS has cognitive complexity 41 (threshold 15). Drivers by points: if/else 9 (22 pts), ternaries 5 (12 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 21). Of this number, 33 points are the body's own statements and 8 belong to 3 function literals 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.
ToolHandler.handleNode (cognitive 41) REDACTED:7850— ToolHandler.handleNode has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 11, ternaries 6, loops 1 (nesting depth added 8). Of this number, 39 points are the body's own statements and 2 belong to 2 function literals 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.
steps.buildSteps.chainFor (cognitive 41) src/ui-server/api/steps.ts:602— steps.buildSteps.chainFor has cognitive complexity 41 (threshold 15). Drivers by points: if/else 9 (26 pts), loops 3 (10 pts), boolean chains 5 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
cobol.walkDataEntries (cognitive 40) src/extraction/languages/cobol.ts:177— cobol.walkDataEntries has cognitive complexity 40 (threshold 15). Drivers by points: if/else 9 (17 pts), ternaries 7 (13 pts), boolean chains 6, loops 4 (nesting depth added 14). Of this number, 26 points are the body's own statements and 14 belong to 4 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.
cpp-supertypes.cppClassWritten (cognitive 40) src/resolution/cpp-supertypes.ts:181— cpp-supertypes.cppClassWritten has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (25 pts), boolean chains 6, ternaries 4 (5 pts), loops 2 (4 pts) (nesting depth added 14). Of this number, 38 points are the body's own statements and 2 belong to 3 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.
angular-router.constantText (cognitive 40) src/resolution/frameworks/angular-router.ts:487— angular-router.constantText has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (22 pts), ternaries 5 (9 pts), boolean chains 7, loops 1 (2 pts) (nesting depth added 15). Of this number, 31 points are the body's own statements and 9 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
angular-router.angularRouteTable (cognitive 40) src/resolution/frameworks/angular-router.ts:704— angular-router.angularRouteTable has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 8 (10 pts), boolean chains 4, ternaries 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.
TreeSitterExtractor.extractPascalParenlessName (cognitive 40) src/extraction/tree-sitter.ts:9332— TreeSitterExtractor.extractPascalParenlessName has cognitive complexity 40 (threshold 15). Drivers by points: if/else 21 (28 pts), boolean chains 10, ternaries 2 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
branch-guards.abbreviateArgument (cognitive 40) src/graph/branch-guards.ts:670— branch-guards.abbreviateArgument has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (18 pts), ternaries 8 (16 pts), boolean chains 4, 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.
ambient-modules.scanNamespaceBlocks (cognitive 39) src/resolution/ambient-modules.ts:313— ambient-modules.scanNamespaceBlocks has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 14, ternaries 3 (8 pts) (nesting depth added 10). Most of this is not in the body itself: 1 of the 39 points is its own statement and the rest belongs to one function literal inside it that branches (line 324). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
rust-scopes.walkPattern (cognitive 39) src/resolution/rust-scopes.ts:305— rust-scopes.walkPattern has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 4 (10 pts), boolean chains 4 (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.
name-matcher.goSignature (cognitive 39) src/resolution/name-matcher.ts:2942— name-matcher.goSignature has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 10, loops 4 (nesting depth added 9). Of this number, 28 points are the body's own statements and 11 belong to 3 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.
name-matcher.rubyAncestry (cognitive 39) src/resolution/name-matcher.ts:7876— name-matcher.rubyAncestry has cognitive complexity 39 (threshold 15). Drivers by points: if/else 6 (14 pts), ternaries 3 (12 pts), loops 4 (10 pts), boolean chains 3 (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.
name-matcher.findBestMatch (cognitive 39) src/resolution/name-matcher.ts:26787— name-matcher.findBestMatch has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (31 pts), boolean chains 7, 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.
package-deps.declaredDependencies (cognitive 39) src/resolution/frameworks/package-deps.ts:38— package-deps.declaredDependencies has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 6 (11 pts), boolean chains 3, error handling 1 (2 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.
tree-sitter.extractFromSource (cognitive 39) src/extraction/tree-sitter.ts:9633— tree-sitter.extractFromSource has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (19 pts), ternaries 3 (10 pts), boolean chains 5, error handling 1 (3 pts), loops 1 (2 pts) (nesting depth added 14). Of this number, 36 points are the body's own statements and 3 belong to one function literal 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.
module-importers.importersOf (cognitive 39) src/resolution/module-importers.ts:515— module-importers.importersOf has cognitive complexity 39 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 5 (11 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 22). Of this number, 31 points are the body's own statements and 8 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.
trail-store.parseTrail (cognitive 39) src/ui-server/api/trail-store.ts:156— trail-store.parseTrail has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 12 (19 pts), boolean chains 10, if/else 6 (8 pts), error handling 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.
vue-template-calls.parseOpenTag (cognitive 38) src/extraction/vue-template-calls.ts:228— vue-template-calls.parseOpenTag has cognitive complexity 38 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 7 (13 pts), boolean chains 9, ternaries 1 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dart-libraries.addDirective (cognitive 38) src/resolution/dart-libraries.ts:251— dart-libraries.addDirective has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 6, loops 3 (5 pts), ternaries 2 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
object-literal.readFields (cognitive 38) src/resolution/frameworks/object-literal.ts:78— object-literal.readFields has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (31 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
react.readObjectPath (cognitive 38) REDACTED:431— react.readObjectPath has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (23 pts), ternaries 2 (7 pts), boolean chains 5, loops 3 (nesting depth added 17). Of this number, 20 points are the body's own statements and 18 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.
TreeSitterExtractor.flushFnRefCandidates (cognitive 38) src/extraction/tree-sitter.ts:1165— TreeSitterExtractor.flushFnRefCandidates has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 9, loops 4, ternaries 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.
module-importers.reopenNameMatchedImports (cognitive 38) src/resolution/module-importers.ts:301— module-importers.reopenNameMatchedImports has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 6, loops 3 (5 pts), ternaries 1 (3 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.
callback-synthesizer.rnCrossPlatformEdges (cognitive 38) src/resolution/callback-synthesizer.ts:3177— callback-synthesizer.rnCrossPlatformEdges has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 5 (11 pts), boolean chains 2, ternaries 1 (nesting depth added 21). Of this number, 36 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.
effects.responseStatus (cognitive 38) src/ui-server/api/effects.ts:428— effects.responseStatus has cognitive complexity 38 (threshold 15). Drivers by points: if/else 18 (28 pts), ternaries 2 (4 pts), boolean chains 3, 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.
pascal-preparse.scanParameterList (cognitive 37) src/extraction/languages/pascal-preparse.ts:307— pascal-preparse.scanParameterList has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (30 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.pythonExprScan (cognitive 37) src/resolution/name-matcher.ts:22888— name-matcher.pythonExprScan has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (21 pts), ternaries 2 (7 pts), boolean chains 5, loops 2 (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.
name-matcher.pythonFactoryTypeUncached (cognitive 37) src/resolution/name-matcher.ts:23561— name-matcher.pythonFactoryTypeUncached has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 8, loops 2, ternaries 1 (2 pts) (nesting depth added 10). Of this number, 35 points are the body's own statements and 2 belong to one function literal 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.
import-resolver.isExternalImport (cognitive 37) REDACTED:1114— import-resolver.isExternalImport has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (28 pts), boolean chains 4, loops 1 (3 pts), ternaries 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
import-resolver.resolveJavaImportedReference (cognitive 37) REDACTED:3818— import-resolver.resolveJavaImportedReference has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 3 (7 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
angular-router.routeFilesLoadedBy (cognitive 37) src/resolution/frameworks/angular-router.ts:439— angular-router.routeFilesLoadedBy has cognitive complexity 37 (threshold 15). Drivers by points: if/else 6 (21 pts), loops 4 (10 pts), boolean chains 5, ternaries 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tier-synthesizer.pairEvents (cognitive 37) REDACTED:854— tier-synthesizer.pairEvents has cognitive complexity 37 (threshold 15). Drivers by points: if/else 7 (18 pts), ternaries 2 (8 pts), loops 4 (7 pts), boolean chains 4 (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.
callback-synthesizer.arkuiRouterEdges (cognitive 37) src/resolution/callback-synthesizer.ts:688— callback-synthesizer.arkuiRouterEdges has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (27 pts), boolean chains 5, loops 3 (4 pts), ternaries 1 (nesting depth added 18). Of this number, 29 points are the body's own statements and 8 belong to 5 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.
callback-synthesizer.vuexDispatchEdges (cognitive 37) src/resolution/callback-synthesizer.ts:4004— callback-synthesizer.vuexDispatchEdges has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 3 (6 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 17). Of this number, 24 points are the body's own statements and 13 belong to 3 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.
ReferenceResolver.pythonAttrRetryCandidates (cognitive 37) REDACTED:1327— ReferenceResolver.pythonAttrRetryCandidates has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 6 (12 pts), boolean chains 6, ternaries 2 (3 pts) (nesting depth added 12). Of this number, 18 points are the body's own statements and 19 belong to 3 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.
named-symbol-flow.walkCalls (cognitive 37) src/graph/named-symbol-flow.ts:423— named-symbol-flow.walkCalls has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (22 pts), ternaries 3 (8 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
named-symbol-flow.resolveNamedSymbolFlow (cognitive 37) src/graph/named-symbol-flow.ts:603— named-symbol-flow.resolveNamedSymbolFlow has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 4 (8 pts), boolean chains 4, error handling 1, ternaries 1 (nesting depth added 16). Of this number, 36 points are the body's own statements and 1 belongs to one function literal 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.
ToolHandler.buildFlowFromNamedSymbols::collectSynthLinks (cognitive 37) REDACTED:3533— ToolHandler.buildFlowFromNamedSymbols::collectSynthLinks has cognitive complexity 37 (threshold 15). Drivers by points: if/else 7 (18 pts), ternaries 4 (11 pts), loops 4 (5 pts), boolean chains 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (ToolHandler.buildFlowFromNamedSymbols) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
codegraph.main::printIndexResult (cognitive 37) src/bin/codegraph.ts:418— codegraph.main::printIndexResult has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (25 pts), loops 3 (6 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
QueryBuilder.searchNodes (cognitive 36) src/db/queries.ts:1666— QueryBuilder.searchNodes has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 8, loops 2 (5 pts), ternaries 4 (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.
pascal-preparse.scanForInVariable (cognitive 36) src/extraction/languages/pascal-preparse.ts:363— pascal-preparse.scanForInVariable has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 5, 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.
cpp-macro-methods.bodyOpenAfter (cognitive 36) src/extraction/languages/cpp-macro-methods.ts:263— cpp-macro-methods.bodyOpenAfter has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (27 pts), boolean chains 5, loops 2 (4 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.
vbnet-receivers.supertypesOf (cognitive 36) REDACTED:526— vbnet-receivers.supertypesOf has cognitive complexity 36 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 4 (10 pts), ternaries 2 (8 pts), boolean chains 3 (nesting depth added 22). Of this number, 35 points are the body's own statements and 1 belongs to one function literal 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.
name-matcher.rustGoReceiverName (cognitive 36) src/resolution/name-matcher.ts:5803— name-matcher.rustGoReceiverName has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (22 pts), ternaries 2 (7 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.rustManifestDependencies (cognitive 36) src/resolution/name-matcher.ts:8189— name-matcher.rustManifestDependencies has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 6 (23 pts), if/else 7 (10 pts), boolean chains 2, loops 1 (nesting depth added 20). Of this number, 32 points are the body's own statements and 4 belong to 2 function items inside it that branch. 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.
name-matcher.goFieldTypeOf (cognitive 36) src/resolution/name-matcher.ts:22461— name-matcher.goFieldTypeOf has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 4 (9 pts), boolean chains 3 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
import-resolver.pythonPackageImporters (cognitive 36) REDACTED:934— import-resolver.pythonPackageImporters has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 4 (8 pts), boolean chains 4, ternaries 2 (nesting depth added 18). Of this number, 30 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
react.elementTags (cognitive 36) REDACTED:1451— react.elementTags has cognitive complexity 36 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 3 (7 pts), ternaries 2 (7 pts), boolean chains 4 (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.
expo-router.readStringAt (cognitive 36) REDACTED:239— expo-router.readStringAt has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (26 pts), loops 3 (8 pts), boolean chains 2 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
dead-code.overrideCandidates (cognitive 36) src/graph/dead-code.ts:850— dead-code.overrideCandidates has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 9 (15 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.
ContextBuilder.buildCallPathsSection (cognitive 36) src/context/index.ts:373— ContextBuilder.buildCallPathsSection has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (22 pts), loops 6, boolean chains 4, ternaries 3 (4 pts) (nesting depth added 9). Of this number, 27 points are the body's own statements and 9 belong to 5 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.
branch-guards.returnsInTree (cognitive 36) src/graph/branch-guards.ts:2123— branch-guards.returnsInTree has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 7, loops 5 (7 pts) (nesting depth added 14). Most of this is not in the body itself: 14 of the 36 points are its own statements and the rest belongs to 2 function items inside it that branch (visit, collect). 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.
ToolHandler.handleCallers (cognitive 36) REDACTED:3229— ToolHandler.handleCallers has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 6 (12 pts), loops 4 (6 pts), boolean chains 2 (nesting depth added 16). Of this number, 26 points are the body's own statements and 10 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. This shape REPEATS in the file: one other method here (ToolHandler.handleCallees) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ToolHandler.handleCallees (cognitive 36) REDACTED:3312— ToolHandler.handleCallees has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 6 (12 pts), loops 4 (6 pts), boolean chains 2 (nesting depth added 16). Of this number, 26 points are the body's own statements and 10 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. This shape REPEATS in the file: one other method here (ToolHandler.handleCallers) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
map.tarjan (cognitive 36) src/ui-server/api/map.ts:853— map.tarjan has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (29 pts), loops 3 (7 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.
cpp-macro-methods.cppDefinitionHeads (cognitive 35) src/extraction/languages/cpp-macro-methods.ts:304— cpp-macro-methods.cppDefinitionHeads has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (22 pts), ternaries 3 (7 pts), boolean chains 5, 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.
dart-local-scope.bindParameters (cognitive 35) src/resolution/dart-local-scope.ts:151— dart-local-scope.bindParameters has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 3 (7 pts), boolean chains 6, loops 3 (6 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.
vbnet-receivers.matchVbMemberRead (cognitive 35) REDACTED:1728— vbnet-receivers.matchVbMemberRead has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 11 (16 pts), if/else 11 (12 pts), boolean chains 7 (nesting depth added 6). Of this number, 25 points are the body's own statements and 10 belong to 6 function items inside it that branch. 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.
cpp-macro-visibility.directiveLines (cognitive 35) REDACTED:144— cpp-macro-visibility.directiveLines has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (26 pts), boolean chains 4, loops 2 (3 pts), ternaries 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.
name-matcher.blankGoCode (cognitive 35) src/resolution/name-matcher.ts:3118— name-matcher.blankGoCode has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (17 pts), ternaries 4 (12 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 19). Of this number, 33 points are the body's own statements and 2 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.
name-matcher.rustUsesOf (cognitive 35) src/resolution/name-matcher.ts:8377— name-matcher.rustUsesOf has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 8 (14 pts), boolean chains 5 (nesting depth added 13). Of this number, 34 points are the body's own statements and 1 belongs to one function literal 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.
name-matcher.matchByQualifiedName (cognitive 35) src/resolution/name-matcher.ts:12069— name-matcher.matchByQualifiedName has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 13, ternaries 3 (5 pts) (nesting depth added 7). Of this number, 28 points are the body's own statements and 7 belong to 4 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.
name-matcher.tsFieldDeclaration (cognitive 35) src/resolution/name-matcher.ts:25251— name-matcher.tsFieldDeclaration has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 3 (7 pts), ternaries 3 (7 pts), boolean chains 3 (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.
name-matcher.readDestructuredBindings (cognitive 35) src/resolution/name-matcher.ts:26305— name-matcher.readDestructuredBindings has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 5 (8 pts), boolean chains 4, ternaries 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.
vue-router.parseVueRoutes::visit (cognitive 35) src/resolution/frameworks/vue-router.ts:144— vue-router.parseVueRoutes::visit has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 5 (11 pts), boolean chains 5, loops 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
override-parameters.blankCsharpTrivia (cognitive 35) REDACTED:222— override-parameters.blankCsharpTrivia has cognitive complexity 35 (threshold 15). Drivers by points: if/else 4 (12 pts), ternaries 3 (10 pts), boolean chains 9, loops 2 (4 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
c-cpp.blankCppInlineAnnotationMacros (cognitive 34) REDACTED:1433— c-cpp.blankCppInlineAnnotationMacros has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 4 (9 pts), boolean chains 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sfc-script.foldScriptResult (cognitive 34) src/extraction/sfc-script.ts:87— sfc-script.foldScriptResult has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 7, loops 6 (7 pts) (nesting depth added 11). Of this number, 33 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.
dart-libraries.exportsOf (cognitive 34) src/resolution/dart-libraries.ts:639— dart-libraries.exportsOf has cognitive complexity 34 (threshold 15). Drivers by points: loops 7 (22 pts), if/else 4 (12 pts) (nesting depth added 23). 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.
vbnet-receivers.extensionFor (cognitive 34) REDACTED:1304— vbnet-receivers.extensionFor has cognitive complexity 34 (threshold 15). Drivers by points: loops 5 (17 pts), if/else 6 (9 pts), boolean chains 7, ternaries 1 (nesting depth added 15). Of this number, 30 points are the body's own statements and 4 belong to 2 function literals inside it that branch. 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.
name-matcher.kotlinLambdaReceiver (cognitive 34) src/resolution/name-matcher.ts:6291— name-matcher.kotlinLambdaReceiver has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 5, ternaries 3 (5 pts), loops 3 (4 pts) (nesting depth added 11). Of this number, 25 points are the body's own statements and 9 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
react.readObjectValue (cognitive 34) REDACTED:391— react.readObjectValue has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 5, loops 3, ternaries 1 (3 pts) (nesting depth added 14). Of this number, 16 points are the body's own statements and 18 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.
react.valueOf (cognitive 34) REDACTED:1809— react.valueOf has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (21 pts), ternaries 3 (7 pts), boolean chains 4, loops 2 (nesting depth added 12). Of this number, 31 points are the body's own statements and 3 belong to one function literal 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.
tanstack-router.parseTanstackRoutes (cognitive 34) src/resolution/frameworks/tanstack-router.ts:167— tanstack-router.parseTanstackRoutes has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (19 pts), ternaries 4 (9 pts), boolean chains 3, loops 3 (nesting depth added 14). Of this number, 33 points are the body's own statements and 1 belongs to one function literal 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.
TreeSitterExtractor.extractTypeAnnotations (cognitive 34) src/extraction/tree-sitter.ts:8211— TreeSitterExtractor.extractTypeAnnotations has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (25 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
type-parameters.declaredTypeParameters (cognitive 34) src/resolution/type-parameters.ts:172— type-parameters.declaredTypeParameters has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 3 (9 pts), boolean chains 6 (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.
angular-template-synthesizer.componentsIn (cognitive 34) src/resolution/angular-template-synthesizer.ts:80— angular-template-synthesizer.componentsIn has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (23 pts), ternaries 3 (8 pts), boolean chains 2, loops 1 (nesting depth added 18). Of this number, 33 points are the body's own statements and 1 belongs to one function literal 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.
angular-template-synthesizer.readMicrosyntax (cognitive 34) src/resolution/angular-template-synthesizer.ts:382— angular-template-synthesizer.readMicrosyntax has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 6, loops 2 (nesting depth added 14). Of this number, 28 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.
callback-synthesizer.constantEventName (cognitive 34) src/resolution/callback-synthesizer.ts:2837— callback-synthesizer.constantEventName has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 6 (14 pts), boolean chains 4 (nesting depth added 16). Of this number, 25 points are the body's own statements and 9 belong to 3 function items inside it that branch. 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.
when.annotateWhen (cognitive 34) src/ui-server/api/when.ts:58— when.annotateWhen has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 3 (8 pts), boolean chains 4, loops 3 (4 pts), error handling 1 (2 pts) (nesting depth added 15). Of this number, 31 points are the body's own statements and 3 belong to 2 function literals 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.
function-ref.normalizeValue (cognitive 33) src/extraction/function-ref.ts:551— function-ref.normalizeValue has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (21 pts), ternaries 3 (8 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
c-cpp.blankCFileScopePrefixedDeclMacros (cognitive 33) REDACTED:2352— c-cpp.blankCFileScopePrefixedDeclMacros has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 3 (7 pts), boolean chains 2, ternaries 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.
pascal-preparse.blankDuplicateBegins (cognitive 33) src/extraction/languages/pascal-preparse.ts:659— pascal-preparse.blankDuplicateBegins has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 5 (13 pts), boolean chains 4 (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.
erlang.moduleExports (cognitive 33) src/extraction/languages/erlang.ts:70— erlang.moduleExports has cognitive complexity 33 (threshold 15). Drivers by points: if/else 6 (15 pts), ternaries 3 (12 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
arkts.collectDecoratorNames (cognitive 33) src/extraction/languages/arkts.ts:48— arkts.collectDecoratorNames has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 4 (6 pts), boolean chains 2, ternaries 1 (nesting depth added 16). Of this number, 23 points are the body's own statements and 10 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.
RazorExtractor.matchBrace (cognitive 33) src/extraction/razor-extractor.ts:192— RazorExtractor.matchBrace has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 4 (10 pts), boolean chains 7 (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.
name-matcher.pythonConstructorCall (cognitive 33) src/resolution/name-matcher.ts:1033— name-matcher.pythonConstructorCall has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 5, loops 3 (4 pts), ternaries 1 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.matchDartAnnotation (cognitive 33) src/resolution/name-matcher.ts:5593— name-matcher.matchDartAnnotation has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 6 (11 pts), boolean chains 10 (nesting depth added 8). Of this number, 32 points are the body's own statements and 1 belongs to 3 function literals 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.
name-matcher.cppMethodOf (cognitive 33) src/resolution/name-matcher.ts:15293— name-matcher.cppMethodOf has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 4 (9 pts), boolean chains 8, loops 2 (3 pts) (nesting depth added 12). Of this number, 31 points are the body's own statements and 2 belong to 2 function literals 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.
python.extractFlaskUrlRules (cognitive 33) src/resolution/frameworks/python.ts:551— python.extractFlaskUrlRules has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (19 pts), ternaries 3 (7 pts), loops 3 (6 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.
terraform.resolveScopedModuleRef (cognitive 33) REDACTED:129— terraform.resolveScopedModuleRef has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (28 pts), boolean chains 5 (nesting depth added 12). Of this number, 30 points are the body's own statements and 3 belong to 2 function literals 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.
TreeSitterExtractor.findRtkEndpointsObject (cognitive 33) src/extraction/tree-sitter.ts:3601— TreeSitterExtractor.findRtkEndpointsObject has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 6, loops 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TreeSitterExtractor.extractTsTupleContractNames (cognitive 33) src/extraction/tree-sitter.ts:4667— TreeSitterExtractor.extractTsTupleContractNames has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 4 (7 pts), boolean chains 3 (nesting depth added 17). Of this number, 28 points are the body's own statements and 5 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.
cpp-constructor.matchCppConstructor (cognitive 33) src/resolution/cpp-constructor.ts:83— cpp-constructor.matchCppConstructor has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 4, loops 3 (4 pts), ternaries 2 (3 pts) (nesting depth added 12). Of this number, 29 points are the body's own statements and 4 belong to 3 function literals 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.
c-fnptr-synthesizer.evalConditionals (cognitive 33) REDACTED:234— c-fnptr-synthesizer.evalConditionals has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 5, ternaries 2 (4 pts), loops 1 (nesting depth added 13). Of this number, 30 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tier-synthesizer.collectQueue (cognitive 33) REDACTED:667— tier-synthesizer.collectQueue has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 5 (6 pts), boolean chains 4 (nesting depth added 14). Of this number, 32 points are the body's own statements and 1 belongs to one function literal 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.
callback-synthesizer.nixLeadingPlainSegments (cognitive 33) src/resolution/callback-synthesizer.ts:4601— callback-synthesizer.nixLeadingPlainSegments has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (23 pts), loops 3 (6 pts), boolean chains 4 (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.
index.runUpgrade (cognitive 33) src/upgrade/index.ts:421— index.runUpgrade has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 6 (11 pts), error handling 5 (10 pts), if/else 7 (9 pts), boolean chains 2, match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
effects.classifyEffect (cognitive 33) src/ui-server/api/effects.ts:296— effects.classifyEffect has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
steps.buildSteps.link (cognitive 33) src/ui-server/api/steps.ts:983— steps.buildSteps.link has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 10, ternaries 4 (nesting depth added 8). Of this number, 31 points are the body's own statements and 2 belong to 2 function literals 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.
flow.buildFlow (cognitive 33) src/ui-server/api/flow.ts:669— flow.buildFlow has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 11 (18 pts), if/else 5 (9 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 12). Of this number, 30 points are the body's own statements and 3 belong to one function literal 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.
offload-eval-cost.analyzeRun (cognitive 32) scripts/agent-eval/offload-eval-cost.mjs:38— offload-eval-cost.analyzeRun has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (17 pts), boolean chains 5, loops 3 (5 pts), ternaries 2 (3 pts), error handling 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
writer-lock.tryAcquireWriterLock (cognitive 32) src/mcp/writer-lock.ts:76— writer-lock.tryAcquireWriterLock has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (19 pts), error handling 5 (9 pts), boolean chains 4 (nesting depth added 14). Of this number, 18 points are the body's own statements and 14 belong to one function item inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
query-parser.parseQuery (cognitive 32) src/search/query-parser.ts:66— query-parser.parseQuery has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 4 (6 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pascal-preparse.recordEnd (cognitive 32) src/extraction/languages/pascal-preparse.ts:892— pascal-preparse.recordEnd has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (27 pts), boolean chains 4, loops 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
r.extractClassMembers (cognitive 32) src/extraction/languages/r.ts:110— r.extractClassMembers has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 4, loops 2 (4 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.
workspace-packages.expandWorkspaceGlob (cognitive 32) src/resolution/workspace-packages.ts:630— workspace-packages.expandWorkspaceGlob has cognitive complexity 32 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 3 (6 pts), ternaries 2 (5 pts), error handling 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.
name-matcher.dartLocalType (cognitive 32) src/resolution/name-matcher.ts:5160— name-matcher.dartLocalType has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 4 (9 pts), boolean chains 5, loops 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.kotlinBraceFrames (cognitive 32) src/resolution/name-matcher.ts:6237— name-matcher.kotlinBraceFrames has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (20 pts), ternaries 2 (7 pts), boolean chains 4, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.isScalaMemberInScope (cognitive 32) src/resolution/name-matcher.ts:6753— name-matcher.isScalaMemberInScope has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 8, ternaries 1 (3 pts), loops 1 (nesting depth added 7). Of this number, 31 points are the body's own statements and 1 belongs to one function literal 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.
name-matcher.objcMemberReceiverType (cognitive 32) src/resolution/name-matcher.ts:7600— name-matcher.objcMemberReceiverType has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 4 (8 pts), loops 4 (6 pts), boolean chains 4 (nesting depth added 12). Of this number, 22 points are the body's own statements and 10 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.
name-matcher.cppLibraryElementOf (cognitive 32) src/resolution/name-matcher.ts:14323— name-matcher.cppLibraryElementOf has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 16, if/else 9 (11 pts), ternaries 2 (5 pts) (nesting depth added 5). 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.
name-matcher.inferPhpAssignedPropertyType (cognitive 32) src/resolution/name-matcher.ts:19632— name-matcher.inferPhpAssignedPropertyType has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 4 (7 pts), boolean chains 4 (nesting depth added 15). Of this number, 30 points are the body's own statements and 2 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.
import-resolver.loadCppIncludeDirsFromCompileDB (cognitive 32) REDACTED:1572— import-resolver.loadCppIncludeDirsFromCompileDB has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 6, loops 3 (4 pts), ternaries 1 (4 pts), error handling 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.
react.ownReturns (cognitive 32) REDACTED:2292— react.ownReturns has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (22 pts), ternaries 3 (5 pts), boolean chains 4, loops 1 (nesting depth added 13). Of this number, 27 points are the body's own statements and 5 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.
TreeSitterExtractor.rtkEndpointHandler (cognitive 32) src/extraction/tree-sitter.ts:3681— TreeSitterExtractor.rtkEndpointHandler has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TreeSitterExtractor.extractTsTypeAliasMembers (cognitive 32) src/extraction/tree-sitter.ts:4591— TreeSitterExtractor.extractTsTypeAliasMembers has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 3 (10 pts), loops 3 (5 pts), boolean chains 2 (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.
callback-synthesizer.sidekiqDispatchEdges (cognitive 32) src/resolution/callback-synthesizer.ts:4429— callback-synthesizer.sidekiqDispatchEdges has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 6, loops 2 (3 pts), ternaries 1 (nesting depth added 12). Of this number, 21 points are the body's own statements and 11 belong to 5 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.
GraphTraverser.getImpactRecursive (cognitive 32) src/graph/traversal.ts:564— GraphTraverser.getImpactRecursive has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 2 (5 pts), boolean chains 1 (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.
CodeGraph.getSegmentMatches (cognitive 32) src/index.ts:2259— CodeGraph.getSegmentMatches has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 6 (10 pts), boolean chains 3 (nesting depth added 14). Of this number, 29 points are the body's own statements and 3 belong to 3 function literals 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.
screens.mentionsOf (cognitive 32) src/ui-server/api/screens.ts:581— screens.mentionsOf has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 7, loops 3 (6 pts), error handling 1 (2 pts) (nesting depth added 14). Of this number, 31 points are the body's own statements and 1 belongs to one function literal 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.
gen-go-stdlib-methods.methodsOf (cognitive 31) REDACTED:100— gen-go-stdlib-methods.methodsOf has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16 (25 pts), loops 4 (6 pts) (nesting depth added 11). Of this number, 21 points are the body's own statements and 10 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.
dart.dartCallee (cognitive 31) src/extraction/languages/dart.ts:461— dart.dartCallee has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (27 pts), boolean chains 4 (nesting depth added 17). Of this number, 30 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
cpp-macro-methods.qualifiedCallableAt (cognitive 31) src/extraction/languages/cpp-macro-methods.ts:224— cpp-macro-methods.qualifiedCallableAt has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (18 pts), ternaries 4 (8 pts), boolean chains 4, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
workspace-packages.loadWorkspacePackages (cognitive 31) src/resolution/workspace-packages.ts:116— workspace-packages.loadWorkspacePackages has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 7 (9 pts), ternaries 3, boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
laravel.routeFileMounts (cognitive 31) src/resolution/frameworks/laravel.ts:352— laravel.routeFileMounts has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 6 (10 pts), ternaries 2 (5 pts), boolean chains 1 (nesting depth added 15). 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.
dart-libraries.readString (cognitive 31) src/resolution/dart-libraries.ts:113— dart-libraries.readString has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 7, loops 2 (4 pts), ternaries 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.
cpp-raw-strings.cppLiteralsBlanked (cognitive 31) src/resolution/cpp-raw-strings.ts:115— cpp-raw-strings.cppLiteralsBlanked has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 5 (10 pts), boolean chains 8 (nesting depth added 11). Of this number, 30 points are the body's own statements and 1 belongs to one function literal 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.
name-matcher.pythonAssignment (cognitive 31) src/resolution/name-matcher.ts:517— name-matcher.pythonAssignment has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 7, loops 1, ternaries 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.
name-matcher.kotlinReceiverTypes (cognitive 31) src/resolution/name-matcher.ts:6129— name-matcher.kotlinReceiverTypes has cognitive complexity 31 (threshold 15). Drivers by points: loops 8 (15 pts), if/else 5 (12 pts), boolean chains 4 (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.
name-matcher.goClosingBracket (cognitive 31) src/resolution/name-matcher.ts:21748— name-matcher.goClosingBracket has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 7, loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.pythonParamAnnotation (cognitive 31) src/resolution/name-matcher.ts:23940— name-matcher.pythonParamAnnotation has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 10, 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.
import-resolver.pythonStarExports (cognitive 31) REDACTED:1004— import-resolver.pythonStarExports has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 4 (14 pts), if/else 5 (8 pts), loops 2 (5 pts), boolean chains 4 (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.
import-resolver.extractJSImports (cognitive 31) REDACTED:1976— import-resolver.extractJSImports has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 4 (8 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
module-importers.addPythonImporters (cognitive 31) src/resolution/module-importers.ts:630— module-importers.addPythonImporters has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 8 (12 pts), boolean chains 2, ternaries 1 (nesting depth added 11). Of this number, 26 points are the body's own statements and 5 belong to 3 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.
JsxLexer.tag (cognitive 31) src/resolution/jsx-code.ts:421— JsxLexer.tag has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (25 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReferenceResolver.resolveOneIn (cognitive 31) REDACTED:1423— ReferenceResolver.resolveOneIn has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 11, ternaries 4 (5 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.
FileWatcher.flush (cognitive 31) src/sync/watcher.ts:997— FileWatcher.flush has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 5, ternaries 2 (4 pts), error handling 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
symbol-lookup.matchesSymbol (cognitive 31) src/graph/symbol-lookup.ts:65— symbol-lookup.matchesSymbol has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 8, loops 1 (nesting depth added 5). Of this number, 29 points are the body's own statements and 2 belong to 2 function items inside it that branch. 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.
ToolHandler.handleStatus (cognitive 31) REDACTED:8278— ToolHandler.handleStatus has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 5 (9 pts), loops 3 (4 pts), boolean chains 2, error handling 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.
map.buildMap (cognitive 31) src/ui-server/api/map.ts:582— map.buildMap has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 6, boolean chains 4, ternaries 1 (nesting depth added 9). Of this number, 28 points are the body's own statements and 3 belong to 3 function literals 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.
pascal-preparse.openBlocks (cognitive 30) src/extraction/languages/pascal-preparse.ts:621— pascal-preparse.openBlocks has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (17 pts), ternaries 2 (11 pts), boolean chains 1, loops 1 (nesting depth added 20). 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.
name-matcher.pythonFieldType (cognitive 30) src/resolution/name-matcher.ts:1062— name-matcher.pythonFieldType has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 6, ternaries 3 (5 pts), loops 1 (nesting depth added 11). Of this number, 28 points are the body's own statements and 2 belong to 2 function literals 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.
name-matcher.javaAncestorNames (cognitive 30) src/resolution/name-matcher.ts:3201— name-matcher.javaAncestorNames has cognitive complexity 30 (threshold 15). Drivers by points: loops 6 (14 pts), if/else 6 (12 pts), boolean chains 4 (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.
name-matcher.isSwiftCallTarget (cognitive 30) src/resolution/name-matcher.ts:6666— name-matcher.isSwiftCallTarget has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 13, ternaries 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.
name-matcher.rustSiteType (cognitive 30) src/resolution/name-matcher.ts:10710— name-matcher.rustSiteType has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 9, ternaries 4 (6 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.
name-matcher.jsBodyEnd (cognitive 30) src/resolution/name-matcher.ts:11507— name-matcher.jsBodyEnd has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 10, loops 4 (8 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.matchDottedCallChain (cognitive 30) src/resolution/name-matcher.ts:17541— name-matcher.matchDottedCallChain has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (18 pts), ternaries 3 (7 pts), boolean chains 5 (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.
name-matcher.pythonClassNamed (cognitive 30) src/resolution/name-matcher.ts:23335— name-matcher.pythonClassNamed has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 5 (16 pts), if/else 6 (9 pts), boolean chains 4, loops 1 (nesting depth added 14). Of this number, 28 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
name-matcher.rustFieldDeclaration (cognitive 30) src/resolution/name-matcher.ts:24892— name-matcher.rustFieldDeclaration has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 4 (10 pts), boolean chains 4 (nesting depth added 16). Of this number, 28 points are the body's own statements and 2 belong to one function literal 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.
express.handlerRefs (cognitive 30) REDACTED:518— express.handlerRefs has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (15 pts), ternaries 5 (8 pts), boolean chains 6, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
swift.resolveVaporHandler (cognitive 30) REDACTED:492— swift.resolveVaporHandler has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 7, ternaries 3 (7 pts) (nesting depth added 10). Of this number, 15 points are the body's own statements and 15 belong to 7 function literals 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.
expo-modules.nativeBinding (cognitive 30) REDACTED:230— expo-modules.nativeBinding has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 6 (16 pts), if/else 7 (11 pts), boolean chains 3 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
TreeSitterExtractor.visitPascalBlock (cognitive 30) src/extraction/tree-sitter.ts:9258— TreeSitterExtractor.visitPascalBlock has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (27 pts), boolean chains 2, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TreeSitterExtractor.pascalNameMode (cognitive 30) src/extraction/tree-sitter.ts:9543— TreeSitterExtractor.pascalNameMode has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 10 (20 pts), boolean chains 7, if/else 1 (2 pts), match/switch 1 (nesting depth added 11). Of this number, 29 points are the body's own statements and 1 belongs to one function literal 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.
callback-synthesizer.reactRenderEdges (cognitive 30) src/resolution/callback-synthesizer.ts:395— callback-synthesizer.reactRenderEdges has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 4 (6 pts), boolean chains 3 (nesting depth added 14). Of this number, 29 points are the body's own statements and 1 belongs to one function literal 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.
callback-synthesizer.fabricNativeImplEdges (cognitive 30) src/resolution/callback-synthesizer.ts:3244— callback-synthesizer.fabricNativeImplEdges has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 5 (8 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
callback-synthesizer.mybatisJavaXmlEdges (cognitive 30) src/resolution/callback-synthesizer.ts:3313— callback-synthesizer.mybatisJavaXmlEdges has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 3, loops 3, ternaries 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.
ReferenceResolver.changedDefaultExports (cognitive 30) REDACTED:3184— ReferenceResolver.changedDefaultExports has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 6, loops 3 (5 pts) (nesting depth added 13). Of this number, 29 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.
query-paths.stripWrapping (cognitive 30) src/search/query-paths.ts:216— query-paths.stripWrapping has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 6, loops 2, ternaries 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.
ToolHandler.computeGraphRelevance (cognitive 30) REDACTED:4134— ToolHandler.computeGraphRelevance has cognitive complexity 30 (threshold 15). Drivers by points: loops 10 (15 pts), if/else 7 (14 pts), boolean chains 1 (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.
QueryBuilder.findNodesByExactName (cognitive 29) src/db/queries.ts:2150— QueryBuilder.findNodesByExactName has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 6 (10 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
kotlin.isFunInterfaceNode (cognitive 29) src/extraction/languages/kotlin.ts:139— kotlin.isFunInterfaceNode has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (20 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pascal-preparse.wrapAlternativeStatements (cognitive 29) src/extraction/languages/pascal-preparse.ts:800— pascal-preparse.wrapAlternativeStatements has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 4 (7 pts), boolean chains 5, ternaries 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.
dart-libraries.yamlPathDependencies (cognitive 29) src/resolution/dart-libraries.ts:466— dart-libraries.yamlPathDependencies has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (19 pts), ternaries 2 (6 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.dartFieldType (cognitive 29) src/resolution/name-matcher.ts:5308— name-matcher.dartFieldType has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 3 (6 pts), ternaries 1 (4 pts), boolean chains 3 (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.
name-matcher.dartMemberOf (cognitive 29) src/resolution/name-matcher.ts:5481— name-matcher.dartMemberOf has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (18 pts), ternaries 2 (7 pts), boolean chains 3, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.csharpAncestorNames (cognitive 29) src/resolution/name-matcher.ts:7262— name-matcher.csharpAncestorNames has cognitive complexity 29 (threshold 15). Drivers by points: loops 6 (14 pts), if/else 6 (12 pts), boolean chains 3 (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.
name-matcher.rustUseTreeBindings::read (cognitive 29) src/resolution/name-matcher.ts:8455— name-matcher.rustUseTreeBindings::read has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 5, loops 2 (4 pts), ternaries 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.
name-matcher.inferEsmAwaitedCallType (cognitive 29) src/resolution/name-matcher.ts:19072— name-matcher.inferEsmAwaitedCallType has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (24 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.goFileConstraint (cognitive 29) src/resolution/name-matcher.ts:21552— name-matcher.goFileConstraint has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 6, ternaries 4 (5 pts), loops 2 (nesting depth added 6). Of this number, 28 points are the body's own statements and 1 belongs to one function literal 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.
name-matcher.goTypeParamsAt (cognitive 29) src/resolution/name-matcher.ts:22662— name-matcher.goTypeParamsAt has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (17 pts), ternaries 3 (8 pts), boolean chains 3, loops 1 (nesting depth added 12). Of this number, 22 points are the body's own statements and 7 belong to 3 function literals 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.
import-resolver.resolveAliasedImport (cognitive 29) REDACTED:1284— import-resolver.resolveAliasedImport has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 3 (4 pts), ternaries 3 (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.
nestjs.readBootstrap (cognitive 29) REDACTED:363— nestjs.readBootstrap has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (16 pts), ternaries 3 (8 pts), loops 1 (4 pts), boolean chains 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.
index.collectGitFiles (cognitive 29) src/extraction/index.ts:1287— index.collectGitFiles has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 4 (5 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
angular-template-synthesizer.blankStrings (cognitive 29) src/resolution/angular-template-synthesizer.ts:264— angular-template-synthesizer.blankStrings has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (12 pts), ternaries 3 (11 pts), loops 2 (4 pts), boolean chains 2 (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.
tier-synthesizer.thisRootedCalls (cognitive 29) REDACTED:1093— tier-synthesizer.thisRootedCalls has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 5 (12 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.
ToolHandler.withStalenessNotice (cognitive 29) REDACTED:2796— ToolHandler.withStalenessNotice has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (17 pts), error handling 5 (7 pts), boolean chains 4, loops 1 (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.
ToolHandler.indirectTestNote (cognitive 29) REDACTED:4080— ToolHandler.indirectTestNote has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 3 (6 pts), ternaries 2 (4 pts), error handling 1 (3 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
node.buildNode (cognitive 29) src/ui-server/api/node.ts:77— node.buildNode has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 7, boolean chains 5, ternaries 3 (4 pts) (nesting depth added 5). Of this number, 20 points are the body's own statements and 9 belong to 3 function literals 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.
resolver-worker.port.on("message") (cognitive 29) src/resolution/resolver-worker.ts:50— resolver-worker.port.on("message") has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 5 (9 pts), ternaries 2 (5 pts), boolean chains 2, match/switch 1 (nesting depth added 13). Of this number, 24 points are the body's own statements and 5 belong to one function literal 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.
probe-allocation.evaluate (cognitive 28) REDACTED:129— probe-allocation.evaluate has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 7 (14 pts), loops 5 (6 pts), boolean chains 4, if/else 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
probe-allocation.main (cognitive 28) REDACTED:263— probe-allocation.main has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 4 (8 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 10). Of this number, 26 points are the body's own statements and 2 belong to 2 function literals 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.
seq-matrix.tag (cognitive 28) scripts/agent-eval/seq-matrix.mjs:26— seq-matrix.tag has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 7 (28 pts) (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
gen-go-stdlib-methods.pkg (cognitive 28) REDACTED:67— gen-go-stdlib-methods.pkg has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 4 (7 pts), boolean chains 4, ternaries 1 (nesting depth added 13). Of this number, 27 points are the body's own statements and 1 belongs to one function literal 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.
cpp-macro-methods.cppMacroMethods (cognitive 28) src/extraction/languages/cpp-macro-methods.ts:92— cpp-macro-methods.cppMacroMethods has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (6 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 13). Of this number, 26 points are the body's own statements and 2 belong to one function literal 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.
strip-comments.stripErlang (cognitive 28) src/resolution/strip-comments.ts:545— strip-comments.stripErlang has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3 (7 pts), boolean chains 5 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dart-libraries.importedFilters (cognitive 28) src/resolution/dart-libraries.ts:708— dart-libraries.importedFilters has cognitive complexity 28 (threshold 15). Drivers by points: loops 6 (17 pts), if/else 4 (9 pts), ternaries 1 (2 pts) (nesting depth added 17). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
cpp-namespaces.cppNamespaceMacros (cognitive 28) REDACTED:40— cpp-namespaces.cppNamespaceMacros has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 3 (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.
name-matcher.localDeclarationScope (cognitive 28) src/resolution/name-matcher.ts:1349— name-matcher.localDeclarationScope has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 8, loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.kotlinHierarchyAt (cognitive 28) src/resolution/name-matcher.ts:6191— name-matcher.kotlinHierarchyAt has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 6, loops 4 (5 pts), ternaries 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.
name-matcher.rustTraitImplemented (cognitive 28) src/resolution/name-matcher.ts:10921— name-matcher.rustTraitImplemented has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 6, ternaries 3 (5 pts), loops 2 (3 pts) (nesting depth added 8). Of this number, 23 points are the body's own statements and 5 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.
import-resolver.shlexSplit (cognitive 28) REDACTED:1644— import-resolver.shlexSplit has cognitive complexity 28 (threshold 15). Drivers by points: loops 5 (12 pts), if/else 6 (11 pts), boolean chains 5 (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.
import-resolver.stripJsComments (cognitive 28) REDACTED:2367— import-resolver.stripJsComments has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 7, loops 3 (7 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
angular-router.destinationOf (cognitive 28) src/resolution/frameworks/angular-router.ts:934— angular-router.destinationOf has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (15 pts), ternaries 4 (7 pts), boolean chains 6 (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.
TreeSitterExtractor.resolveErlangGenServerTarget (cognitive 28) src/extraction/tree-sitter.ts:5209— TreeSitterExtractor.resolveErlangGenServerTarget has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 5, loops 2 (4 pts), ternaries 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExtractionOrchestrator.storeExtractionResult (cognitive 28) src/extraction/index.ts:3041— ExtractionOrchestrator.storeExtractionResult has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 7, ternaries 4 (5 pts), loops 3 (4 pts) (nesting depth added 5). Of this number, 20 points are the body's own statements and 8 belong to 3 function literals inside it that branch. 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.
type-parameters.declaredValueParameters (cognitive 28) src/resolution/type-parameters.ts:223— type-parameters.declaredValueParameters has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 3 (10 pts), boolean chains 1 (nesting depth added 17). Of this number, 24 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.
tier-synthesizer.operandEnd (cognitive 28) REDACTED:1024— tier-synthesizer.operandEnd has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 9, loops 2 (4 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.
tier-synthesizer.crossTierEdges (cognitive 28) REDACTED:1228— tier-synthesizer.crossTierEdges has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 4, loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
callback-synthesizer.cppOverrideEdges (cognitive 28) src/resolution/callback-synthesizer.ts:763— callback-synthesizer.cppOverrideEdges has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 16). Of this number, 27 points are the body's own statements and 1 belongs to one function literal 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.
ToolHandler.formatFilesTree (cognitive 28) REDACTED:8542— ToolHandler.formatFilesTree has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 4 (6 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 10). Most of this is not in the body itself: 12 of the 28 points are its own statements and the rest belongs to 2 function items inside it that branch (renderNode, a function literal at line 8595). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
tools.allocateExploreBudget (cognitive 28) REDACTED:793— tools.allocateExploreBudget has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 5 (7 pts), ternaries 3 (4 pts), boolean chains 3 (nesting depth added 8). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
steps.buildSteps.stepFor (cognitive 28) src/ui-server/api/steps.ts:753— steps.buildSteps.stepFor has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 6 (9 pts), boolean chains 5 (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.
query-utils.getStemVariants (cognitive 27) src/search/query-utils.ts:85— query-utils.getStemVariants has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 13 (nesting depth added 3). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
generated-detection.hasGeneratedHeader (cognitive 27) src/extraction/generated-detection.ts:207— generated-detection.hasGeneratedHeader has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 3 (6 pts), boolean chains 1, ternaries 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.
tree-sitter-helpers.getPrecedingDocstring (cognitive 27) src/extraction/tree-sitter-helpers.ts:170— tree-sitter-helpers.getPrecedingDocstring has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 4 (7 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 9). Of this number, 26 points are the body's own statements and 1 belongs to one function literal 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.
java.synthesizeRecordComponents (cognitive 27) src/extraction/languages/java.ts:264— java.synthesizeRecordComponents has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (20 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.
terraform.emitModuleProvidersRefs (cognitive 27) src/extraction/languages/terraform.ts:603— terraform.emitModuleProvidersRefs has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 3 (6 pts), ternaries 1 (4 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
path-aliases.stripJsonc (cognitive 27) src/resolution/path-aliases.ts:78— path-aliases.stripJsonc has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (7 pts), boolean chains 6 (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.
path-aliases.loadProjectAliases (cognitive 27) src/resolution/path-aliases.ts:265— path-aliases.loadProjectAliases has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 10). Of this number, 23 points are the body's own statements and 4 belong to one function literal 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.
swift-type-visibility.resolveSwiftTypePathCall (cognitive 27) src/resolution/swift-type-visibility.ts:365— swift-type-visibility.resolveSwiftTypePathCall has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 9, ternaries 3, loops 1 (nesting depth added 5). Most of this is not in the body itself: 10 of the 27 points are its own statements and the rest belongs to 3 function items inside it that branch (onPath, a function literal at line 401, a function literal at line 392). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
dart-local-scope.matchBrackets (cognitive 27) src/resolution/dart-local-scope.ts:476— dart-local-scope.matchBrackets has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 4 (14 pts), if/else 3 (6 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.cppScopeMethod (cognitive 27) src/resolution/name-matcher.ts:15707— name-matcher.cppScopeMethod has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 9, loops 2 (3 pts), ternaries 3 (nesting depth added 7). Of this number, 20 points are the body's own statements and 7 belong to 3 function literals 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.
name-matcher.dynamicImportScan (cognitive 27) src/resolution/name-matcher.ts:20798— name-matcher.dynamicImportScan has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 4 (9 pts), ternaries 3 (5 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.matchTsThisFieldCall (cognitive 27) src/resolution/name-matcher.ts:25699— name-matcher.matchTsThisFieldCall has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 6, ternaries 4 (6 pts), loops 2 (nesting depth added 6). Most of this is not in the body itself: 9 of the 27 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 25749, a function literal at line 25724, held, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
import-resolver.resolveModuleImportToFile (cognitive 27) REDACTED:3602— import-resolver.resolveModuleImportToFile has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (21 pts), ternaries 1 (3 pts), boolean chains 2, 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.
react.statementEnd (cognitive 27) REDACTED:1785— react.statementEnd has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 6, loops 2 (4 pts), ternaries 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
react.exportedTable (cognitive 27) REDACTED:2100— react.exportedTable has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (19 pts), ternaries 3 (6 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
angular-router.staticString (cognitive 27) src/resolution/frameworks/angular-router.ts:132— angular-router.staticString has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 3 (7 pts), boolean chains 3, 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.
cpp-constructor.constructorShape (cognitive 27) src/resolution/cpp-constructor.ts:31— cpp-constructor.constructorShape has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 7, loops 1, ternaries 1 (nesting depth added 7). Of this number, 25 points are the body's own statements and 2 belong to 3 function literals 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.
tier-synthesizer.pairQueue (cognitive 27) REDACTED:726— tier-synthesizer.pairQueue has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 5, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 11). Of this number, 23 points are the body's own statements and 4 belong to 2 function literals 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.
callback-synthesizer.expoCrossPlatformEdges (cognitive 27) src/resolution/callback-synthesizer.ts:3128— callback-synthesizer.expoCrossPlatformEdges has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
callback-synthesizer.reduxThunkEdges (cognitive 27) src/resolution/callback-synthesizer.ts:3604— callback-synthesizer.reduxThunkEdges has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 7, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 11). Of this number, 26 points are the body's own statements and 1 belongs to one function literal 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.
synthesized-hop.describeSynthesizedHop (cognitive 27) src/graph/synthesized-hop.ts:39— synthesized-hop.describeSynthesizedHop has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 12 (22 pts), if/else 2 (3 pts), boolean chains 1, match/switch 1 (nesting depth added 11). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
index.extractSymbolsFromQuery (cognitive 27) src/context/index.ts:68— index.extractSymbolsFromQuery has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 7 (9 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dynamic-boundary-report.findDynamicBoundaries (cognitive 27) src/graph/dynamic-boundary-report.ts:132— dynamic-boundary-report.findDynamicBoundaries has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 4, error handling 2 (3 pts), loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
parse-run.computeAllocation (cognitive 26) scripts/agent-eval/parse-run.mjs:565— parse-run.computeAllocation has cognitive complexity 26 (threshold 15). Drivers by points: loops 7 (12 pts), if/else 2 (7 pts), ternaries 3 (6 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
query-utils.extractSearchTerms (cognitive 26) src/search/query-utils.ts:156— query-utils.extractSearchTerms has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 6 (10 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.
dart.dartMisparsedGenericCall (cognitive 26) src/extraction/languages/dart.ts:213— dart.dartMisparsedGenericCall has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 9, 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.
erlang.handleAppResourceTuple (cognitive 26) src/extraction/languages/erlang.ts:267— erlang.handleAppResourceTuple has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 6, loops 2 (4 pts) (nesting depth added 10). Of this number, 25 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CfmlExtractor.delegateScriptTag (cognitive 26) src/extraction/cfml-extractor.ts:632— CfmlExtractor.delegateScriptTag has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 7, loops 3 (nesting depth added 8). Of this number, 23 points are the body's own statements and 3 belong to 2 function literals 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.
dart-libraries.pathDependencies (cognitive 26) src/resolution/dart-libraries.ts:495— dart-libraries.pathDependencies has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 4 (10 pts), boolean chains 3, 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.
c-feature-variants.evaluate (cognitive 26) src/resolution/c-feature-variants.ts:189— c-feature-variants.evaluate has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 7, loops 3, ternaries 1 (nesting depth added 3). Most of this is not in the body itself: 2 of the 26 points are its own statements and the rest belongs to 5 function items inside it that branch (shape::term, term, shape, …). 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.
name-matcher.luaLocalDecl (cognitive 26) src/resolution/name-matcher.ts:2001— name-matcher.luaLocalDecl has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 8, loops 2 (3 pts) (nesting depth added 9). Of this number, 24 points are the body's own statements and 2 belong to 3 function literals 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.
name-matcher.typeDartLink (cognitive 26) src/resolution/name-matcher.ts:4977— name-matcher.typeDartLink has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 5 (11 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.scalaSupertypesOf (cognitive 26) src/resolution/name-matcher.ts:6905— name-matcher.scalaSupertypesOf has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 5, loops 3 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.csharpProjectUsings (cognitive 26) src/resolution/name-matcher.ts:7157— name-matcher.csharpProjectUsings has cognitive complexity 26 (threshold 15). Drivers by points: loops 4 (9 pts), if/else 4 (7 pts), ternaries 2 (5 pts), error handling 2 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.matchKotlinCallResultCall (cognitive 26) src/resolution/name-matcher.ts:17800— name-matcher.matchKotlinCallResultCall has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 10, if/else 6 (10 pts), ternaries 3 (6 pts) (nesting depth added 7). Of this number, 20 points are the body's own statements and 6 belong to 4 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.
name-matcher.rustWrittenCallReceiver (cognitive 26) src/resolution/name-matcher.ts:24719— name-matcher.rustWrittenCallReceiver has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 5, 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.
name-matcher.tsFieldElementType (cognitive 26) src/resolution/name-matcher.ts:25129— name-matcher.tsFieldElementType has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 8, ternaries 3 (6 pts), loops 1 (nesting depth added 6). Of this number, 24 points are the body's own statements and 2 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.
name-matcher.tsFieldCall (cognitive 26) src/resolution/name-matcher.ts:25871— name-matcher.tsFieldCall has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 7, loops 2 (4 pts), ternaries 2 (3 pts) (nesting depth added 7). Of this number, 18 points are the body's own statements and 8 belong to 4 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.
name-matcher.matchReference (cognitive 26) src/resolution/name-matcher.ts:27079— name-matcher.matchReference has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 12, ternaries 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.
name-matcher.cppOverloadParameters (cognitive 26) src/resolution/name-matcher.ts:27841— name-matcher.cppOverloadParameters has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (5 pts), boolean chains 4, ternaries 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.
react.blockValue (cognitive 26) REDACTED:1710— react.blockValue has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 5, ternaries 1 (3 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.
TreeSitterExtractor.vbReceiverPath (cognitive 26) src/extraction/tree-sitter.ts:6851— TreeSitterExtractor.vbReceiverPath has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 5 (9 pts), boolean chains 4, 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.
TreeSitterExtractor.extractDecoratorsFor::consider (cognitive 26) src/extraction/tree-sitter.ts:7028— TreeSitterExtractor.extractDecoratorsFor::consider has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (TreeSitterExtractor.extractDecoratorsFor) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
TreeSitterExtractor.extractPascalCall (cognitive 26) src/extraction/tree-sitter.ts:9061— TreeSitterExtractor.extractPascalCall has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pascal-scope.typesNamed (cognitive 26) REDACTED:1031— pascal-scope.typesNamed has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (10 pts), boolean chains 3 (nesting depth added 13). Of this number, 18 points are the body's own statements and 8 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.
tier-synthesizer.clientPath (cognitive 26) REDACTED:468— tier-synthesizer.clientPath has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (23 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.
JsxLexer.read (cognitive 26) src/resolution/jsx-code.ts:157— JsxLexer.read has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 3 (12 pts), if/else 4 (10 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
callback-synthesizer.arkuiStateBuildEdges (cognitive 26) src/resolution/callback-synthesizer.ts:513— callback-synthesizer.arkuiStateBuildEdges has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 12). Of this number, 24 points are the body's own statements and 2 belong to 2 function literals 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.
Daemon.start (cognitive 26) src/mcp/daemon.ts:251— Daemon.start has cognitive complexity 26 (threshold 15). Drivers by points: error handling 7 (13 pts), if/else 7 (9 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 10). Of this number, 20 points are the body's own statements and 6 belong to 2 function literals 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.
search.buildSearch (cognitive 26) src/ui-server/api/search.ts:94— search.buildSearch has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (13 pts), loops 6 (8 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 6). Of this number, 17 points are the body's own statements and 9 belong to 3 function items inside it that branch. 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.
node.summarizeTestCallers (cognitive 26) src/ui-server/api/node.ts:333— node.summarizeTestCallers has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3 (6 pts), error handling 1 (3 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.
route-roots.routeRoots (cognitive 26) src/ui-server/api/route-roots.ts:73— route-roots.routeRoots has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 8, ternaries 3 (6 pts), loops 2 (nesting depth added 7). Of this number, 14 points are the body's own statements and 12 belong to 6 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.
toml.layoutOf (cognitive 26) src/installer/targets/toml.ts:228— toml.layoutOf has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 3 (7 pts), boolean chains 4, loops 1 (nesting depth added 8). None of this is in the body itself: all 26 points belong to 2 function items inside it that branch (a function literal at line 241, blockOf). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
program-model.buildOrderModel (cognitive 26) ui/src/lib/program-model.ts:328— program-model.buildOrderModel has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 6, boolean chains 3, ternaries 2 (nesting depth added 6). Of this number, 22 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.
QueryBuilder.getRetryableFailedImports (cognitive 25) src/db/queries.ts:4606— QueryBuilder.getRetryableFailedImports has cognitive complexity 25 (threshold 15). Drivers by points: loops 7 (16 pts), if/else 3 (8 pts), ternaries 1 (nesting depth added 14). Of this number, 24 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
pascal-preparse.anonymousRecordDeclStart (cognitive 25) src/extraction/languages/pascal-preparse.ts:851— pascal-preparse.anonymousRecordDeclStart has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 7, 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.
terraform.providerSelectionFromExpr (cognitive 25) src/extraction/languages/terraform.ts:644— terraform.providerSelectionFromExpr has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (3 pts), ternaries 1 (3 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.
laravel.routeGroups (cognitive 25) src/resolution/frameworks/laravel.ts:308— laravel.routeGroups has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (21 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
swift-type-visibility.declarationFor (cognitive 25) src/resolution/swift-type-visibility.ts:276— swift-type-visibility.declarationFor has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (18 pts), ternaries 2 (3 pts), boolean chains 2, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.gateLanguageMatch (cognitive 25) src/resolution/name-matcher.ts:241— name-matcher.gateLanguageMatch has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (20 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
name-matcher.pythonFixtureReturnType (cognitive 25) src/resolution/name-matcher.ts:3935— name-matcher.pythonFixtureReturnType has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 6, ternaries 3 (6 pts) (nesting depth added 9). Of this number, 23 points are the body's own statements and 2 belong to 2 function literals 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.
name-matcher.rustWalkModules (cognitive 25) src/resolution/name-matcher.ts:8700— name-matcher.rustWalkModules has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 3 (10 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.
name-matcher.pythonDefStatements (cognitive 25) src/resolution/name-matcher.ts:23080— name-matcher.pythonDefStatements has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 4, loops 3 (4 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.
name-matcher.tsCallEndsStatement (cognitive 25) src/resolution/name-matcher.ts:25359— name-matcher.tsCallEndsStatement has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (7 pts), boolean chains 5 (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.
name-matcher.retargetSelfOverload (cognitive 25) src/resolution/name-matcher.ts:27204— name-matcher.retargetSelfOverload has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 6 (10 pts), boolean chains 5 (nesting depth added 5). Of this number, 20 points are the body's own statements and 5 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.
express.topLevelArgs (cognitive 25) REDACTED:470— express.topLevelArgs has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 6, loops 2 (4 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.
angular-router.commandsHref (cognitive 25) src/resolution/frameworks/angular-router.ts:804— angular-router.commandsHref has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 5, loops 1 (nesting depth added 7). Of this number, 22 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.
TreeSitterExtractor.extractEnum (cognitive 25) src/extraction/tree-sitter.ts:2965— TreeSitterExtractor.extractEnum has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (5 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TreeSitterExtractor.findVueStoreCollectionObjects (cognitive 25) src/extraction/tree-sitter.ts:3781— TreeSitterExtractor.findVueStoreCollectionObjects has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 5, loops 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
module-importers.outrankedImports (cognitive 25) src/resolution/module-importers.ts:445— module-importers.outrankedImports has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 3 (6 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.
dead-code.ancestorsOf (cognitive 25) src/graph/dead-code.ts:916— dead-code.ancestorsOf has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 4 (8 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.
branch-guards.callAt (cognitive 25) src/graph/branch-guards.ts:505— branch-guards.callAt has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (16 pts), ternaries 3 (5 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.
dynamic-boundaries.scanDynamicDispatch (cognitive 25) REDACTED:272— dynamic-boundaries.scanDynamicDispatch has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 3, loops 2 (3 pts), ternaries 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ToolHandler.buildBlastRadiusSection (cognitive 25) REDACTED:3971— ToolHandler.buildBlastRadiusSection has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 4 (7 pts), loops 2 (3 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 11). Of this number, 24 points are the body's own statements and 1 belongs to one function literal 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.
steps.buildSteps.effectLink (cognitive 25) src/ui-server/api/steps.ts:898— steps.buildSteps.effectLink has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10, ternaries 7 (9 pts), boolean chains 6 (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.
toml.scanTomlStatements (cognitive 25) src/installer/targets/toml.ts:301— toml.scanTomlStatements has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (14 pts), ternaries 3 (8 pts), boolean chains 2, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
toml.scanTomlLine (cognitive 25) src/installer/targets/toml.ts:459— toml.scanTomlLine has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 2 (5 pts), boolean chains 3, 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.
typescript.classifyTsClassMember (cognitive 24) src/extraction/languages/typescript.ts:29— typescript.classifyTsClassMember has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
c-cpp.blankLoneMacroLines (cognitive 24) REDACTED:1325— c-cpp.blankLoneMacroLines has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 5, ternaries 3 (5 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.
pascal-preparse.commentOrStringEnd (cognitive 24) src/extraction/languages/pascal-preparse.ts:141— pascal-preparse.commentOrStringEnd has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 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.
LiquidExtractor.findTagOccurrences (cognitive 24) REDACTED:187— LiquidExtractor.findTagOccurrences has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 3 (4 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.
dart-local-scope.splitParameters (cognitive 24) src/resolution/dart-local-scope.ts:277— dart-local-scope.splitParameters has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 2 (6 pts), boolean chains 5, 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.
vbnet-receivers.bindingOn (cognitive 24) REDACTED:267— vbnet-receivers.bindingOn has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 5 (9 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.
vbnet-receivers.memberOn (cognitive 24) REDACTED:1130— vbnet-receivers.memberOn has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 3 (12 pts), loops 3 (6 pts), if/else 1 (4 pts), boolean chains 2 (nesting depth added 15). Of this number, 19 points are the body's own statements and 5 belong to 2 function literals 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.
cpp-type-aliases.baseClassesOf (cognitive 24) src/resolution/cpp-type-aliases.ts:493— cpp-type-aliases.baseClassesOf has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 3, 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.
name-matcher.luaMemberIn (cognitive 24) src/resolution/name-matcher.ts:2097— name-matcher.luaMemberIn has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 7, ternaries 2 (4 pts) (nesting depth added 7). Of this number, 19 points are the body's own statements and 5 belong to 4 function literals 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.
name-matcher.typeDartHead (cognitive 24) src/resolution/name-matcher.ts:4917— name-matcher.typeDartHead has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 4 (8 pts), boolean chains 7 (nesting depth added 6). Of this number, 23 points are the body's own statements and 1 belongs to one function literal 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.
name-matcher.rustFunctionReturn (cognitive 24) src/resolution/name-matcher.ts:10339— name-matcher.rustFunctionReturn has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 5, ternaries 2 (3 pts) (nesting depth added 7). Of this number, 22 points are the body's own statements and 2 belong to 2 function literals 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.
name-matcher.bindsAtSites (cognitive 24) src/resolution/name-matcher.ts:11770— name-matcher.bindsAtSites has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 5 (6 pts), boolean chains 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.memberTypeThroughHierarchy (cognitive 24) src/resolution/name-matcher.ts:18532— name-matcher.memberTypeThroughHierarchy has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 3 (6 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.
name-matcher.jsScopeFile (cognitive 24) src/resolution/name-matcher.ts:19272— name-matcher.jsScopeFile has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 3 (9 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.pythonValueEvidence (cognitive 24) src/resolution/name-matcher.ts:22957— name-matcher.pythonValueEvidence has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 4 (10 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.matchPythonAttrCall (cognitive 24) src/resolution/name-matcher.ts:23733— name-matcher.matchPythonAttrCall has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 6, loops 1 (2 pts), ternaries 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.
name-matcher.matchRustSelfCall (cognitive 24) src/resolution/name-matcher.ts:24287— name-matcher.matchRustSelfCall has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 7 (nesting depth added 5). Of this number, 22 points are the body's own statements and 2 belong to 2 function literals 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.
import-resolver.pythonReopenScope (cognitive 24) REDACTED:886— import-resolver.pythonReopenScope has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 5 (7 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 10). Most of this is not in the body itself: 11 of the 24 points are its own statements and the rest belongs to 2 function items inside it that branch (moduleNames, a function literal at line 912). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
express.regexLiteralEndAt (cognitive 24) REDACTED:439— express.regexLiteralEndAt has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 10, loops 2, ternaries 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.
nestjs.decoratorChainStart (cognitive 24) REDACTED:443— nestjs.decoratorChainStart has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 4 (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.
nestjs.splitTopLevelObjects (cognitive 24) REDACTED:936— nestjs.splitTopLevelObjects has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (18 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.
expo-router.indexAtDepth0 (cognitive 24) REDACTED:303— expo-router.indexAtDepth0 has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 7, loops 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vue-router.vueRouteTable (cognitive 24) src/resolution/frameworks/vue-router.ts:253— vue-router.vueRouteTable has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 10). Of this number, 23 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.
angular-router.angularMounts (cognitive 24) src/resolution/frameworks/angular-router.ts:624— angular-router.angularMounts has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 4 (7 pts), boolean chains 4 (nesting depth added 9). Of this number, 21 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.
fabric.extractFabricNodes (cognitive 24) src/resolution/frameworks/fabric.ts:295— fabric.extractFabricNodes has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 7 (19 pts), loops 2 (3 pts), if/else 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TreeSitterExtractor.extract (cognitive 24) src/extraction/tree-sitter.ts:945— TreeSitterExtractor.extract has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 7, ternaries 1 (2 pts), error handling 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.
TreeSitterExtractor.extractObjectLiteralFunctions (cognitive 24) src/extraction/tree-sitter.ts:3473— TreeSitterExtractor.extractObjectLiteralFunctions has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (16 pts), ternaries 1 (4 pts), boolean chains 3, 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.
TreeSitterExtractor.functionReturnedObject (cognitive 24) src/extraction/tree-sitter.ts:3562— TreeSitterExtractor.functionReturnedObject has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 11). Of this number, 15 points are the body's own statements and 9 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TreeSitterExtractor.extractPascalParenlessCall (cognitive 24) src/extraction/tree-sitter.ts:9199— TreeSitterExtractor.extractPascalParenlessCall has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (13 pts), ternaries 4 (8 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.
TreeSitterExtractor.readPascalTextRoutines (cognitive 24) src/extraction/tree-sitter.ts:9495— TreeSitterExtractor.readPascalTextRoutines has cognitive complexity 24 (threshold 15). Drivers by points: loops 4 (8 pts), if/else 4 (7 pts), ternaries 3 (7 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
expo-router-synthesizer.expoRouterReturnEdges (cognitive 24) src/resolution/expo-router-synthesizer.ts:60— expo-router-synthesizer.expoRouterReturnEdges has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tier-synthesizer.collectEvents (cognitive 24) REDACTED:807— tier-synthesizer.collectEvents has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 5 (6 pts), boolean chains 3, ternaries 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.
callback-synthesizer.kotlinExpectActualEdges (cognitive 24) src/resolution/callback-synthesizer.ts:1425— callback-synthesizer.kotlinExpectActualEdges has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GraphTraverser.findPath (cognitive 24) src/graph/traversal.ts:642— GraphTraverser.findPath has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (14 pts), ternaries 2 (4 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 11). Of this number, 23 points are the body's own statements and 1 belongs to one function literal 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.
GraphQueryManager.getContext (cognitive 24) REDACTED:32— GraphQueryManager.getContext has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 5 (7 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.
formatter.formatContextAsMarkdown (cognitive 24) src/context/formatter.ts:18— formatter.formatContextAsMarkdown has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 5 (9 pts), loops 4 (8 pts), if/else 4 (6 pts), boolean chains 1 (nesting depth added 10). Of this number, 18 points are the body's own statements and 6 belong to 2 function literals 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.
ContextBuilder.extractCodeBlocks (cognitive 24) src/context/index.ts:1443— ContextBuilder.extractCodeBlocks has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 4, ternaries 1 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
branch-guards.guardsInTree (cognitive 24) src/graph/branch-guards.ts:1065— branch-guards.guardsInTree has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
answer-freshness.validateAnswerFiles (cognitive 24) src/mcp/answer-freshness.ts:18— answer-freshness.validateAnswerFiles has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 2, error handling 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.
wire.groupRelations (cognitive 24) src/ui-server/api/wire.ts:257— wire.groupRelations has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 4 (6 pts), boolean chains 4 (nesting depth added 10). Of this number, 23 points are the body's own statements and 1 belongs to one function literal 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.
parse-worker.….on("message") (cognitive 24) src/extraction/parse-worker.ts:70— parse-worker.….on("message") has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 2 (5 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
export-svg.capRows (cognitive 24) ui/src/lib/export-svg.ts:565— export-svg.capRows has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 5 (9 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 9). Of this number, 23 points are the body's own statements and 1 belongs to one function literal 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.
screens-model.buildScreensModel (cognitive 24) ui/src/lib/screens-model.ts:280— screens-model.buildScreensModel has cognitive complexity 24 (threshold 15). Drivers by points: loops 9 (10 pts), if/else 4 (8 pts), ternaries 2 (4 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.
QueryBuilder.searchNodesFuzzy (cognitive 23) src/db/queries.ts:1847— QueryBuilder.searchNodesFuzzy has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 3 (4 pts), boolean chains 2, ternaries 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.
kotlin.extractKotlinReturnType (cognitive 23) src/extraction/languages/kotlin.ts:17— kotlin.extractKotlinReturnType has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 3, ternaries 1 (3 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.
swift-type-visibility.inheritedTypeNames (cognitive 23) src/resolution/swift-type-visibility.ts:132— swift-type-visibility.inheritedTypeNames has cognitive complexity 23 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 4 (10 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dart-local-scope.typeArgumentsEnd (cognitive 23) src/resolution/dart-local-scope.ts:661— dart-local-scope.typeArgumentsEnd has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), ternaries 1 (4 pts), boolean chains 3, 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.
name-matcher.luaAliasExpr (cognitive 23) src/resolution/name-matcher.ts:2045— name-matcher.luaAliasExpr has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 5 (8 pts), boolean chains 7 (nesting depth added 4). Of this number, 17 points are the body's own statements and 6 belong to 2 function literals 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.
name-matcher.typeDartChain (cognitive 23) src/resolution/name-matcher.ts:4842— name-matcher.typeDartChain has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 6, ternaries 2 (4 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.csharpProjectStaticUsings (cognitive 23) src/resolution/name-matcher.ts:7083— name-matcher.csharpProjectStaticUsings has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 4 (8 pts), error handling 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.rustCodeBraces (cognitive 23) src/resolution/name-matcher.ts:8503— name-matcher.rustCodeBraces has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (8 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.
name-matcher.rustFirstArgIs (cognitive 23) src/resolution/name-matcher.ts:9282— name-matcher.rustFirstArgIs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 5, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.readRustDeclaredFields (cognitive 23) src/resolution/name-matcher.ts:10780— name-matcher.readRustDeclaredFields has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 6, loops 4 (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.
name-matcher.objectLiteralProperty (cognitive 23) src/resolution/name-matcher.ts:12351— name-matcher.objectLiteralProperty has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 3, loops 2, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.findInheritedClassMethod (cognitive 23) src/resolution/name-matcher.ts:18695— name-matcher.findInheritedClassMethod has cognitive complexity 23 (threshold 15). Drivers by points: if/else 2 (10 pts), loops 4 (10 pts), boolean chains 3 (nesting depth added 14). Of this number, 22 points are the body's own statements and 1 belongs to one function literal 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.
name-matcher.destructuredParameterBody (cognitive 23) src/resolution/name-matcher.ts:19425— name-matcher.destructuredParameterBody has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 6, loops 2, ternaries 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.
name-matcher.resolveGoMethodInPackage (cognitive 23) src/resolution/name-matcher.ts:20939— name-matcher.resolveGoMethodInPackage has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2 (3 pts), boolean chains 2, ternaries 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.
name-matcher.matchGoPackageValueCall (cognitive 23) src/resolution/name-matcher.ts:21308— name-matcher.matchGoPackageValueCall has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 8, loops 1, ternaries 1 (nesting depth added 2). Of this number, 21 points are the body's own statements and 2 belong to one function literal inside it that branches. 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.
name-matcher.pythonAssignTargets (cognitive 23) src/resolution/name-matcher.ts:23048— name-matcher.pythonAssignTargets has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 6, 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.
name-matcher.pythonAttrClassWalk (cognitive 23) src/resolution/name-matcher.ts:23663— name-matcher.pythonAttrClassWalk has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 3 (6 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 9). Of this number, 18 points are the body's own statements and 5 belong to one function literal 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.
name-matcher.splitCppTopLevel (cognitive 23) src/resolution/name-matcher.ts:27723— name-matcher.splitCppTopLevel has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 6, loops 2 (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.
react.functionBody (cognitive 23) REDACTED:2241— react.functionBody has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (19 pts), ternaries 2 (3 pts), boolean chains 1 (nesting depth added 7). 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.
TreeSitterExtractor.extractFunction (cognitive 23) src/extraction/tree-sitter.ts:2274— TreeSitterExtractor.extractFunction has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (20 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.
TreeSitterExtractor.extractMethod (cognitive 23) src/extraction/tree-sitter.ts:2744— TreeSitterExtractor.extractMethod has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 5, ternaries 2 (nesting depth added 5). Of this number, 21 points are the body's own statements and 2 belong to one function literal 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.
ParseWorkerPool.onMessage (cognitive 23) src/extraction/parse-pool.ts:311— ParseWorkerPool.onMessage has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 3 (10 pts), boolean chains 2 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ExtractionOrchestrator.indexAll::storeResult (cognitive 23) src/extraction/index.ts:2396— ExtractionOrchestrator.indexAll::storeResult has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (18 pts), ternaries 1 (3 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. This shape REPEATS in the file: one other method here (ExtractionOrchestrator.indexAll) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
index.findNestedGitRepos (cognitive 23) src/extraction/index.ts:855— index.findNestedGitRepos has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (3 pts), error handling 1 (2 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.
expo-router-synthesizer.screensInBody (cognitive 23) src/resolution/expo-router-synthesizer.ts:156— expo-router-synthesizer.screensInBody has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 5, ternaries 3 (4 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.
tier-synthesizer.argumentsAt (cognitive 23) REDACTED:122— tier-synthesizer.argumentsAt has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 6, loops 2 (4 pts) (nesting depth added 8). Of this number, 22 points are the body's own statements and 1 belongs to one function literal 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.
tier-synthesizer.isRequestHelper (cognitive 23) REDACTED:1064— tier-synthesizer.isRequestHelper has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 2 (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.
override-parameters.overrideFilter (cognitive 23) REDACTED:56— override-parameters.overrideFilter has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 3 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). None of this is in the body itself: all 23 points belong to 3 function items inside it that branch (a function literal at line 79, typesOf, scopeOf). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
callback-synthesizer.flutterBuildEdges (cognitive 23) src/resolution/callback-synthesizer.ts:451— callback-synthesizer.flutterBuildEdges has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 11). Of this number, 22 points are the body's own statements and 1 belongs to one function literal 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.
callback-synthesizer.jsxChild (cognitive 23) src/resolution/callback-synthesizer.ts:2015— callback-synthesizer.jsxChild has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (15 pts), ternaries 3 (6 pts), boolean chains 2 (nesting depth added 7). Of this number, 21 points are the body's own statements and 2 belong to 2 function literals 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.
ReferenceResolver.createEdges (cognitive 23) REDACTED:1917— ReferenceResolver.createEdges has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 8, ternaries 2 (nesting depth added 5). None of this is in the body itself: all 23 points belong to 2 function literals inside it that branch (lines 1918, 1982). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
claude.removeHookCommandsMatching (cognitive 23) src/installer/targets/claude.ts:363— claude.removeHookCommandsMatching has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
effects.modelOf (cognitive 23) src/ui-server/api/effects.ts:359— effects.modelOf has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 7, ternaries 3 (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.
export-svg.mapSvg (cognitive 23) ui/src/lib/export-svg.ts:886— export-svg.mapSvg has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 4 (9 pts), if/else 4 (7 pts), loops 4, boolean chains 3 (nesting depth added 8). Of this number, 18 points are the body's own statements and 5 belong to one function literal 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.
router.svelte.parseHash (cognitive 23) ui/src/lib/router.svelte.ts:127— router.svelte.parseHash has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 10, if/else 10, ternaries 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
check-grammar.judge (cognitive 22) scripts/add-lang/check-grammar.mjs:68— check-grammar.judge has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 4 (7 pts), boolean chains 5 (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.
QueryBuilder.getRetryableFailedReferences (cognitive 22) src/db/queries.ts:4501— QueryBuilder.getRetryableFailedReferences has cognitive complexity 22 (threshold 15). Drivers by points: loops 7 (12 pts), if/else 3 (5 pts), ternaries 3 (4 pts), boolean chains 1 (nesting depth added 8). Of this number, 14 points are the body's own statements and 8 belong to 4 function items inside it that branch. 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.
pascal-preparse.routineNameEnd (cognitive 22) src/extraction/languages/pascal-preparse.ts:273— pascal-preparse.routineNameEnd has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (4 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.
terraform.emitReferencesInBody (cognitive 22) src/extraction/languages/terraform.ts:515— terraform.emitReferencesInBody has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 10). Of this number, 18 points are the body's own statements and 4 belong to one function literal 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.
CfmlExtractor.tagAttrValueNode (cognitive 22) src/extraction/cfml-extractor.ts:777— CfmlExtractor.tagAttrValueNode has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 10). Of this number, 21 points are the body's own statements and 1 belongs to one function literal 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.
dart-libraries.skipTrivia (cognitive 22) src/resolution/dart-libraries.ts:82— dart-libraries.skipTrivia has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 7, loops 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dart-libraries.resolveDartUri (cognitive 22) src/resolution/dart-libraries.ts:517— dart-libraries.resolveDartUri has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 8). Of this number, 19 points are the body's own statements and 3 belong to 3 function literals 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.
cargo-workspace.getArrayValue (cognitive 22) src/resolution/frameworks/cargo-workspace.ts:85— cargo-workspace.getArrayValue has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 2, 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.
rust-scopes.rustBoundsOf (cognitive 22) src/resolution/rust-scopes.ts:742— rust-scopes.rustBoundsOf has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 5 (7 pts), boolean chains 3 (nesting depth added 9). Of this number, 18 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.
name-matcher.hasBridgeEvidence (cognitive 22) src/resolution/name-matcher.ts:194— name-matcher.hasBridgeEvidence has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 5 (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.
name-matcher.pythonStatementStarts (cognitive 22) src/resolution/name-matcher.ts:476— name-matcher.pythonStatementStarts has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 4, 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.
name-matcher.dartInitializerType (cognitive 22) src/resolution/name-matcher.ts:5261— name-matcher.dartInitializerType has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 7, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.resolveObjectLiteralBinding (cognitive 22) src/resolution/name-matcher.ts:12416— name-matcher.resolveObjectLiteralBinding has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 6, ternaries 3 (4 pts), loops 2 (nesting depth added 3). Of this number, 15 points are the body's own statements and 7 belong to 5 function items inside it that branch. 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.
name-matcher.goPackageValueType (cognitive 22) src/resolution/name-matcher.ts:21360— name-matcher.goPackageValueType has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 5, ternaries 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.
nestjs.matchingClose (cognitive 22) REDACTED:909— nestjs.matchingClose has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 4, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
expo-router.skipTemplate (cognitive 22) REDACTED:200— expo-router.skipTemplate has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (4 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.
python.extractDecoratorRoutes (cognitive 22) src/resolution/frameworks/python.ts:442— python.extractDecoratorRoutes has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 5, ternaries 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.
csharp.endpointGroupRoutes (cognitive 22) REDACTED:366— csharp.endpointGroupRoutes has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 3, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tree-sitter.rustReceiverChain (cognitive 22) src/extraction/tree-sitter.ts:568— tree-sitter.rustReceiverChain has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), ternaries 2 (4 pts), boolean chains 3, 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.
ExtractionOrchestrator.resurrectPythonPackageImporters (cognitive 22) src/extraction/index.ts:3457— ExtractionOrchestrator.resurrectPythonPackageImporters has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (4 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 9). Of this number, 21 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pascal-scope.nestedRoutineInScope (cognitive 22) REDACTED:329— pascal-scope.nestedRoutineInScope has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
type-parameters.scalaMemberInScope (cognitive 22) src/resolution/type-parameters.ts:117— type-parameters.scalaMemberInScope has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 7, loops 1, ternaries 1 (nesting depth added 3). Of this number, 19 points are the body's own statements and 3 belong to 3 function items inside it that branch. 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.
tier-synthesizer.templateEnd (cognitive 22) REDACTED:97— tier-synthesizer.templateEnd has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (4 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.
callback-synthesizer.celeryDispatchEdges (cognitive 22) src/resolution/callback-synthesizer.ts:4097— callback-synthesizer.celeryDispatchEdges has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (29 pts), boolean chains 6, loops 3 (6 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. This shape REPEATS in the file: one other method here (callback-synthesizer.celeryDispatchEdges::isCeleryTask) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
formatter.formatNodeTree (cognitive 22) src/context/formatter.ts:174— formatter.formatNodeTree has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 4 (7 pts), ternaries 3 (6 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ToolHandler.buildCopybookSection (cognitive 22) REDACTED:4041— ToolHandler.buildCopybookSection has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 6 (15 pts), if/else 2 (4 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daemon.readClientHello (cognitive 22) src/mcp/daemon.ts:978— daemon.readClientHello has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 6 (9 pts), error handling 2 (3 pts), boolean chains 1 (nesting depth added 5). None of this is in the body itself: all 22 points belong to 3 function literals inside it that branch (lines 1014, 985, 1040). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
entrypoints.swiftPreviewSpans (cognitive 22) src/ui-server/api/entrypoints.ts:322— entrypoints.swiftPreviewSpans has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 3 (6 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.
daemon-manager.runDaemonPicker (cognitive 22) src/mcp/daemon-manager.ts:83— daemon-manager.runDaemonPicker has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 2 (5 pts), boolean chains 2, loops 1 (nesting depth added 10). Of this number, 21 points are the body's own statements and 1 belongs to one function literal 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.
store-worker.port.on("message") (cognitive 22) src/extraction/store-worker.ts:78— store-worker.port.on("message") has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 2 (4 pts), error handling 2 (3 pts), boolean chains 1, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
export-svg.flowCapSvg (cognitive 22) ui/src/lib/export-svg.ts:625— export-svg.flowCapSvg has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 9 (18 pts), if/else 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
steps-model.kindWords (cognitive 22) ui/src/lib/steps-model.ts:196— steps-model.kindWords has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 7 (17 pts), if/else 2 (4 pts), match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
name-substring-index.searchNameSubstring (cognitive 21) REDACTED:183— name-substring-index.searchNameSubstring has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, loops 3 (5 pts), ternaries 1 (nesting depth added 7). Of this number, 19 points are the body's own statements and 2 belong to 2 function literals 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.
c-cpp.followsDeclaredName (cognitive 21) REDACTED:842— c-cpp.followsDeclaredName has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 10, if/else 6, loops 4 (5 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
cobol.collectRefs (cognitive 21) src/extraction/languages/cobol.ts:302— cobol.collectRefs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (5 pts), ternaries 1 (2 pts), match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
erlang.handleFunDecl (cognitive 21) src/extraction/languages/erlang.ts:134— erlang.handleFunDecl has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (5 pts), boolean chains 3, ternaries 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.
SvelteExtractor.extractTemplateCalls (cognitive 21) src/extraction/svelte-extractor.ts:199— SvelteExtractor.extractTemplateCalls has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 4 (7 pts), boolean chains 4 (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.
vue-options-api.matchClose (cognitive 21) REDACTED:62— vue-options-api.matchClose has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 5, 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.
drupal.extractDrupalRoutes (cognitive 21) src/resolution/frameworks/drupal.ts:97— drupal.extractDrupalRoutes has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, loops 2, ternaries 1 (nesting depth added 7). Of this number, 17 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.
laravel.splitArgs (cognitive 21) src/resolution/frameworks/laravel.ts:451— laravel.splitArgs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 6, loops 2 (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.
vbnet-receivers.ancestry (cognitive 21) REDACTED:575— vbnet-receivers.ancestry has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (6 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 11). Of this number, 17 points are the body's own statements and 4 belong to one function literal 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.
ambient-modules.scanGlobalScope (cognitive 21) src/resolution/ambient-modules.ts:250— ambient-modules.scanGlobalScope has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 8 (nesting depth added 2). None of this is in the body itself: all 21 points belong to one function literal inside it that branches (line 258). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
ambient-modules.scanned (cognitive 21) src/resolution/ambient-modules.ts:628— ambient-modules.scanned has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.scalaBlockOf (cognitive 21) src/resolution/name-matcher.ts:1370— name-matcher.scalaBlockOf has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 4 (6 pts), boolean chains 4, ternaries 1 (nesting depth added 6). Of this number, 19 points are the body's own statements and 2 belong to one function literal 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.
name-matcher.scalaAnonymousBases (cognitive 21) src/resolution/name-matcher.ts:6811— name-matcher.scalaAnonymousBases has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (8 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.
name-matcher.scalaReceiverName (cognitive 21) src/resolution/name-matcher.ts:6835— name-matcher.scalaReceiverName has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.isCppLocalCallableCall (cognitive 21) src/resolution/name-matcher.ts:16620— name-matcher.isCppLocalCallableCall has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 10, if/else 8 (10 pts), loops 1 (nesting depth added 2). Of this number, 20 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
name-matcher.inferJavaFieldReceiverType (cognitive 21) src/resolution/name-matcher.ts:17921— name-matcher.inferJavaFieldReceiverType has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 5, loops 1 (nesting depth added 5). Of this number, 20 points are the body's own statements and 1 belongs to one function literal 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.
name-matcher.goSignatureResultType (cognitive 21) src/resolution/name-matcher.ts:22285— name-matcher.goSignatureResultType has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, loops 1 (3 pts), ternaries 2 (3 pts) (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.
name-matcher.goDeclaredValueType (cognitive 21) src/resolution/name-matcher.ts:22387— name-matcher.goDeclaredValueType has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 3 (7 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.
name-matcher.goElementOf (cognitive 21) src/resolution/name-matcher.ts:22526— name-matcher.goElementOf has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 3 (6 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.goStructMembers (cognitive 21) src/resolution/name-matcher.ts:22628— name-matcher.goStructMembers has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (5 pts), boolean chains 2, ternaries 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.pythonConditionalArms (cognitive 21) src/resolution/name-matcher.ts:22926— name-matcher.pythonConditionalArms has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, loops 2 (4 pts), ternaries 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.resolveStoreAction (cognitive 21) src/resolution/name-matcher.ts:26128— name-matcher.resolveStoreAction has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 9 (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.
name-matcher.matchCppMacroNamespaced (cognitive 21) src/resolution/name-matcher.ts:27687— name-matcher.matchCppMacroNamespaced has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 4 (7 pts), boolean chains 3, loops 1 (nesting depth added 6). Of this number, 20 points are the body's own statements and 1 belongs to 2 function literals 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.
name-matcher.cppTemplateArgumentsEnd (cognitive 21) src/resolution/name-matcher.ts:27758— name-matcher.cppTemplateArgumentsEnd has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, loops 2 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
import-resolver.resolveCobolCopybook (cognitive 21) REDACTED:461— import-resolver.resolveCobolCopybook has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
react.mapsRouteFields (cognitive 21) REDACTED:1410— react.mapsRouteFields has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (nesting depth added 6). Of this number, 12 points are the body's own statements and 9 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.
react.routeRender (cognitive 21) REDACTED:1571— react.routeRender has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 5 (8 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.
expo-router.parseHrefExpression (cognitive 21) REDACTED:369— expo-router.parseHrefExpression has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 4 (11 pts), if/else 5 (8 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
angular-router.pathSegments (cognitive 21) src/resolution/frameworks/angular-router.ts:168— angular-router.pathSegments has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 7). Of this number, 19 points are the body's own statements and 2 belong to one function literal 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.
TreeSitterExtractor.extractInstantiation (cognitive 21) src/extraction/tree-sitter.ts:6509— TreeSitterExtractor.extractInstantiation has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (19 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.
ScopeIgnore.ignores (cognitive 21) src/extraction/index.ts:990— ScopeIgnore.ignores has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 6, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ResolverPool.constructor (cognitive 21) src/resolution/resolver-pool.ts:172— ResolverPool.constructor has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5, ternaries 1 (2 pts), loops 1 (nesting depth added 5). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 183, 222, 226). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
callback-synthesizer.spanTags (cognitive 21) src/resolution/callback-synthesizer.ts:2148— callback-synthesizer.spanTags has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 3 (7 pts), ternaries 1 (4 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.
callback-synthesizer.svelteKitLoadEdges (cognitive 21) src/resolution/callback-synthesizer.ts:3545— callback-synthesizer.svelteKitLoadEdges has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FileWatcher.refreshWatchTree (cognitive 21) src/sync/watcher.ts:486— FileWatcher.refreshWatchTree has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 2 (4 pts), loops 3, boolean chains 2 (nesting depth added 6). Most of this is not in the body itself: 6 of the 21 points are its own statements and the rest belongs to one function item inside it that branches (walk). 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.
branch-guards.decoratorsOn (cognitive 21) src/graph/branch-guards.ts:2247— branch-guards.decoratorsOn has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 9). Of this number, 14 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.
MCPServer.startDaemonProcess (cognitive 21) src/mcp/index.ts:650— MCPServer.startDaemonProcess has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 5, loops 1, ternaries 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.
steps.siteText (cognitive 21) src/ui-server/api/steps.ts:1704— steps.siteText has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 8 (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.
steps.hopLabel (cognitive 21) src/ui-server/api/steps.ts:1720— steps.hopLabel has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11, ternaries 4 (9 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
flow.toWireFlow (cognitive 21) src/ui-server/api/flow.ts:485— flow.toWireFlow has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 4 (9 pts), if/else 4 (8 pts), boolean chains 3, 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.
toml.decodeBasicString (cognitive 21) src/installer/targets/toml.ts:414— toml.decodeBasicString has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 4 (8 pts), boolean chains 3, 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.
render-check.main (cognitive 21) telemetry-dashboard/scripts/render-check.mjs:231— render-check.main has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 8, loops 1, ternaries 1 (nesting depth added 1). Of this number, 14 points are the body's own statements and 7 belong to 5 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.
api.breakdown (cognitive 21) telemetry-dashboard/src/api.ts:576— api.breakdown has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 5 (6 pts), boolean chains 5 (nesting depth added 2). Of this number, 19 points are the body's own statements and 2 belong to 2 function items inside it that branch. 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.
symbol-model.assignRefs (cognitive 21) ui/src/lib/symbol-model.ts:310— symbol-model.assignRefs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 3, loops 1 (nesting depth added 9). Of this number, 16 points are the body's own statements and 5 belong to one function literal 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.
map-model.moduleCycles (cognitive 21) ui/src/lib/map-model.ts:661— map-model.moduleCycles has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 5 (6 pts), boolean chains 1 (nesting depth added 8). Most of this is not in the body itself: 5 of the 21 points are its own statements and the rest belongs to 2 function items inside it that branch (strongconnect, a function literal at line 701). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
export-svg.flowSvg (cognitive 21) ui/src/lib/export-svg.ts:722— export-svg.flowSvg has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 7, if/else 4 (7 pts), loops 7 (nesting depth added 3). Of this number, 20 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.
screens-model.trackedCurves (cognitive 21) ui/src/lib/screens-model.ts:503— screens-model.trackedCurves has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 4 (7 pts), boolean chains 2, loops 2 (nesting depth added 9). Of this number, 16 points are the body's own statements and 5 belong to 2 function literals 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.
directory.planFrontload (cognitive 20) src/directory.ts:836— directory.planFrontload has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5, 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.
QueryBuilder.runBatched (cognitive 20) src/db/queries.ts:410— QueryBuilder.runBatched has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (12 pts), if/else 4 (8 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.
c-cpp.blankCDesignatedMacroArgs (cognitive 20) REDACTED:2519— c-cpp.blankCDesignatedMacroArgs has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pascal-preparse.conditionalGroups (cognitive 20) src/extraction/languages/pascal-preparse.ts:465— pascal-preparse.conditionalGroups has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, ternaries 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.
cobol.walkProcedureChildren (cognitive 20) src/extraction/languages/cobol.ts:376— cobol.walkProcedureChildren has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, loops 2 (nesting depth added 8). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
terraform.emitModuleWiring (cognitive 20) src/extraction/languages/terraform.ts:353— terraform.emitModuleWiring has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 2 (6 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.
cpp-macro-methods.cppMacroInvocations (cognitive 20) src/extraction/languages/cpp-macro-methods.ts:402— cpp-macro-methods.cppMacroInvocations has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, loops 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.
CfmlExtractor.visitTag (cognitive 20) src/extraction/cfml-extractor.ts:407— CfmlExtractor.visitTag has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, ternaries 1 (3 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
cpp-supertypes.usingsIn (cognitive 20) src/resolution/cpp-supertypes.ts:360— cpp-supertypes.usingsIn has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.pythonDynamicGlobalWrite (cognitive 20) src/resolution/name-matcher.ts:932— name-matcher.pythonDynamicGlobalWrite has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (5 pts), boolean chains 4, ternaries 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.
name-matcher.pythonLocalBinding (cognitive 20) src/resolution/name-matcher.ts:4011— name-matcher.pythonLocalBinding has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, loops 2 (4 pts), ternaries 1 (nesting depth added 5). Of this number, 18 points are the body's own statements and 2 belong to one function literal 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.
name-matcher.rustSelfParamBounds (cognitive 20) src/resolution/name-matcher.ts:10547— name-matcher.rustSelfParamBounds has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 5, loops 1, ternaries 1 (nesting depth added 2). Of this number, 16 points are the body's own statements and 4 belong to one function literal inside it that branches. 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.
name-matcher.cppDeclaratorType (cognitive 20) src/resolution/name-matcher.ts:13396— name-matcher.cppDeclaratorType has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, ternaries 2 (3 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.cppRangeElementOf (cognitive 20) src/resolution/name-matcher.ts:14250— name-matcher.cppRangeElementOf has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 7, if/else 6 (7 pts), ternaries 4 (6 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.
name-matcher.isCppLocalName (cognitive 20) src/resolution/name-matcher.ts:16393— name-matcher.isCppLocalName has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.matchCppConstruction (cognitive 20) src/resolution/name-matcher.ts:17322— name-matcher.matchCppConstruction has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 7 (11 pts), if/else 5, boolean chains 4 (nesting depth added 4). Of this number, 17 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.cppTypeWrittenAt (cognitive 20) src/resolution/name-matcher.ts:17398— name-matcher.cppTypeWrittenAt has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.pythonScopeBindings (cognitive 20) src/resolution/name-matcher.ts:23883— name-matcher.pythonScopeBindings has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (4 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 10). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to one function item inside it that branches (names). 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.
name-matcher.matchRustAsMutChainCall (cognitive 20) src/resolution/name-matcher.ts:24500— name-matcher.matchRustAsMutChainCall has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 5 (8 pts), boolean chains 4 (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.
name-matcher.matchDestructuredStoreCall (cognitive 20) src/resolution/name-matcher.ts:26171— name-matcher.matchDestructuredStoreCall has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 2 (nesting depth added 7). Of this number, 16 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.
alias-binding.extractLocalExportAliases (cognitive 20) src/resolution/alias-binding.ts:115— alias-binding.extractLocalExportAliases has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 5 (7 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.
import-resolver.statedDefaultExport (cognitive 20) REDACTED:208— import-resolver.statedDefaultExport has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 2 (4 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 9). Of this number, 18 points are the body's own statements and 2 belong to 2 function literals 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.
import-resolver.resolvePhpQualifiedClassRef (cognitive 20) REDACTED:2702— import-resolver.resolvePhpQualifiedClassRef has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 3). Of this number, 17 points are the body's own statements and 3 belong to 3 function literals inside it that branch. 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.
import-resolver.collectRustUseBindings::expand (cognitive 20) REDACTED:4232— import-resolver.collectRustUseBindings::expand has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 2, loops 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. This shape REPEATS in the file: one other method here (import-resolver.collectRustUseBindings) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
react.functionParts (cognitive 20) REDACTED:1648— react.functionParts has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (13 pts), ternaries 3 (5 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.
react.initializerAt (cognitive 20) REDACTED:1763— react.initializerAt has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 4, 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.
expo-router.matchParen (cognitive 20) REDACTED:173— expo-router.matchParen has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 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.
nextjs.nextRouteForFile (cognitive 20) src/resolution/frameworks/nextjs.ts:83— nextjs.nextRouteForFile has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 7). Of this number, 19 points are the body's own statements and 1 belongs to one function literal 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.
TreeSitterExtractor.extractPiniaSetupBody (cognitive 20) src/extraction/tree-sitter.ts:3851— TreeSitterExtractor.extractPiniaSetupBody has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 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.
module-importers.reopenReferencesThroughDeclaredPackages (cognitive 20) src/resolution/module-importers.ts:210— module-importers.reopenReferencesThroughDeclaredPackages has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (6 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
index.collectGitStatus (cognitive 20) src/extraction/index.ts:1570— index.collectGitStatus has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (11 pts), loops 5 (7 pts), boolean chains 2 (nesting depth added 4). Of this number, 13 points are the body's own statements and 7 belong to one function item inside it that branches. 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.
pascal-scope.headerClassAt (cognitive 20) REDACTED:270— pascal-scope.headerClassAt has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pascal-scope.includesOf (cognitive 20) REDACTED:797— pascal-scope.includesOf has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tier-synthesizer.closeParen (cognitive 20) REDACTED:70— tier-synthesizer.closeParen has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 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.
callback-synthesizer.synthesizeCallbackEdges::collectInputs (cognitive 20) src/resolution/callback-synthesizer.ts:5378— callback-synthesizer.synthesizeCallbackEdges::collectInputs has cognitive complexity 20 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 3 (8 pts), boolean chains 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. This shape REPEATS in the file: one other method here (callback-synthesizer.synthesizeCallbackEdges) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
callback-synthesizer.synthesizeCallbackEdges (cognitive 20) src/resolution/callback-synthesizer.ts:5226— callback-synthesizer.synthesizeCallbackEdges has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15 (25 pts), loops 10 (18 pts), boolean chains 11, ternaries 3 (6 pts), error handling 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. This shape REPEATS in the file: one other method here (callback-synthesizer.synthesizeCallbackEdges::collectInputs) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ReferenceResolver.classExpressions (cognitive 20) REDACTED:4287— ReferenceResolver.classExpressions has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (nesting depth added 6). Of this number, 19 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LineBasedJsonRpcTransport.handleLine (cognitive 20) src/mcp/transport.ts:162— LineBasedJsonRpcTransport.handleLine has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 1 (4 pts), error handling 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.
dynamic-boundary-report.continuationsFrom (cognitive 20) src/graph/dynamic-boundary-report.ts:320— dynamic-boundary-report.continuationsFrom has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 3 (6 pts), error handling 2 (3 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClaudeCodeTarget.uninstall (cognitive 20) src/installer/targets/claude.ts:175— ClaudeCodeTarget.uninstall has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (20 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.
ToolHandler.buildDynamicBoundaries (cognitive 20) REDACTED:3772— ToolHandler.buildDynamicBoundaries has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 3 (8 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
steps.buildSteps.springMvcReplies (cognitive 20) src/ui-server/api/steps.ts:876— steps.buildSteps.springMvcReplies has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 4 (5 pts), boolean chains 4, 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.
remove-binary.planBinaryRemoval (cognitive 20) src/upgrade/remove-binary.ts:134— remove-binary.planBinaryRemoval has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4, loops 1 (nesting depth added 6). Of this number, 19 points are the body's own statements and 1 belongs to one function literal 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.
check-grammar.runGrammar (cognitive 19) scripts/add-lang/check-grammar.mjs:150— check-grammar.runGrammar has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 3 (4 pts), boolean chains 2, loops 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.
utils.validatePathWithinRoot (cognitive 19) src/utils.ts:129— utils.validatePathWithinRoot has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 3 (4 pts), boolean chains 1, loops 1, ternaries 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.
WalCheckpointValve.backfillFully (cognitive 19) src/db/wal-valve.ts:249— WalCheckpointValve.backfillFully has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, 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.
function-ref.goScopedFnRefScopes (cognitive 19) src/extraction/function-ref.ts:1003— function-ref.goScopedFnRefScopes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 4 (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.
c-cpp.blankCCplusplusGuardBodies (cognitive 19) REDACTED:1860— c-cpp.blankCCplusplusGuardBodies has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (5 pts), ternaries 2, boolean chains 1 (nesting depth added 8). Of this number, 18 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
swift.extractSwiftReturnType (cognitive 19) src/extraction/languages/swift.ts:14— swift.extractSwiftReturnType has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nix.isReturnedAttrsetMember (cognitive 19) src/extraction/languages/nix.ts:58— nix.isReturnedAttrsetMember has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 5, 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.
cpp-brace-scopes.namespaceHead (cognitive 19) src/extraction/languages/cpp-brace-scopes.ts:172— cpp-brace-scopes.namespaceHead has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3, ternaries 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DfmExtractor.parseComponents (cognitive 19) src/extraction/dfm-extractor.ts:79— DfmExtractor.parseComponents has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (18 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.
VueExtractor.addOptionsMembers (cognitive 19) src/extraction/vue-extractor.ts:133— VueExtractor.addOptionsMembers has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 4, boolean chains 3, ternaries 1 (nesting depth added 5). Of this number, 13 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.
dart-libraries.readDirectiveTokens (cognitive 19) src/resolution/dart-libraries.ts:207— dart-libraries.readDirectiveTokens has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 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.
dart-local-scope.endOfConstructor (cognitive 19) src/resolution/dart-local-scope.ts:226— dart-local-scope.endOfConstructor has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, ternaries 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.
vbnet-receivers.vbCode (cognitive 19) REDACTED:177— vbnet-receivers.vbCode has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 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.
cpp-includers.cppIncluders (cognitive 19) src/resolution/cpp-includers.ts:141— cpp-includers.cppIncluders has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 3 (6 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.pythonGlobalReceiverTarget (cognitive 19) src/resolution/name-matcher.ts:970— name-matcher.pythonGlobalReceiverTarget has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 12, if/else 5, ternaries 2. Of this number, 14 points are the body's own statements and 5 belong to 4 function literals inside it that branch. 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.
name-matcher.withinCppTranslationUnit (cognitive 19) src/resolution/name-matcher.ts:1887— name-matcher.withinCppTranslationUnit has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 11, if/else 7 (8 pts) (nesting depth added 1). Of this number, 17 points are the body's own statements and 2 belong to 2 function literals inside it that branch. 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.
name-matcher.goScopesOf (cognitive 19) src/resolution/name-matcher.ts:3081— name-matcher.goScopesOf has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.matchDartChainLink (cognitive 19) src/resolution/name-matcher.ts:4561— name-matcher.matchDartChainLink has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6, ternaries 5 (6 pts), boolean chains 5, loops 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
name-matcher.isKotlinMemberReachable (cognitive 19) src/resolution/name-matcher.ts:6359— name-matcher.isKotlinMemberReachable has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 8, ternaries 1 (2 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.
name-matcher.scalaImportsOf (cognitive 19) src/resolution/name-matcher.ts:6977— name-matcher.scalaImportsOf 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.
name-matcher.parseRustImplHeader (cognitive 19) src/resolution/name-matcher.ts:9200— name-matcher.parseRustImplHeader has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, loops 2 (3 pts), ternaries 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.
name-matcher.matchRustSelfPath (cognitive 19) src/resolution/name-matcher.ts:9500— name-matcher.matchRustSelfPath has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (6 pts), ternaries 3 (4 pts), loops 1 (nesting depth added 2). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 3 function items inside it that branch (pick, a function literal at line 9513, a function literal at line 9511). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
name-matcher.expandRustUse (cognitive 19) src/resolution/name-matcher.ts:9915— name-matcher.expandRustUse has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, ternaries 2 (3 pts), 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.
name-matcher.rustAssociatedReturn (cognitive 19) src/resolution/name-matcher.ts:10308— name-matcher.rustAssociatedReturn has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (8 pts), if/else 7, boolean chains 4 (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.
name-matcher.resolveObjectLiteralMember (cognitive 19) src/resolution/name-matcher.ts:12283— name-matcher.resolveObjectLiteralMember has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 7, ternaries 3. Of this number, 10 points are the body's own statements and 9 belong to 6 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.
name-matcher.cppClassParenDepths (cognitive 19) src/resolution/name-matcher.ts:14099— name-matcher.cppClassParenDepths has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 2 (5 pts), ternaries 1 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.cppInheritedDataMember (cognitive 19) src/resolution/name-matcher.ts:14190— name-matcher.cppInheritedDataMember has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.cppProjectScopeNames (cognitive 19) src/resolution/name-matcher.ts:15225— name-matcher.cppProjectScopeNames has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.cppArgumentType (cognitive 19) src/resolution/name-matcher.ts:16076— name-matcher.cppArgumentType has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 4 (6 pts), boolean chains 5 (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.
name-matcher.classMemberLines (cognitive 19) src/resolution/name-matcher.ts:18776— name-matcher.classMemberLines has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.preferGoBuildTwin (cognitive 19) src/resolution/name-matcher.ts:21606— name-matcher.preferGoBuildTwin has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, ternaries 1 (3 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.pythonBoundInDef (cognitive 19) src/resolution/name-matcher.ts:23166— name-matcher.pythonBoundInDef has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.matchRustSelfFieldCall (cognitive 19) src/resolution/name-matcher.ts:24939— name-matcher.matchRustSelfFieldCall has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 6). Of this number, 17 points are the body's own statements and 2 belong to one function literal 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.
name-matcher.soliditySupertypesOf (cognitive 19) src/resolution/name-matcher.ts:27606— name-matcher.soliditySupertypesOf has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.cppOverloadFit (cognitive 19) src/resolution/name-matcher.ts:27897— name-matcher.cppOverloadFit has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 7, loops 1 (nesting depth added 3). Of this number, 18 points are the body's own statements and 1 belongs to one function literal 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.
import-resolver.getFileExportIndex (cognitive 19) REDACTED:263— import-resolver.getFileExportIndex has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 8). Of this number, 18 points are the body's own statements and 1 belongs to one function literal 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.
import-resolver.extractGoImports (cognitive 19) REDACTED:2163— import-resolver.extractGoImports has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (6 pts), loops 5 (6 pts), boolean chains 5, ternaries 2 (nesting depth added 4). Of this number, 13 points are the body's own statements and 6 belong to 3 function literals 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.
import-resolver.importBindingTail (cognitive 19) REDACTED:4400— import-resolver.importBindingTail has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 6, ternaries 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.
nestjs.readArgs (cognitive 19) REDACTED:553— nestjs.readArgs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (17 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.
nestjs.splitTopLevel (cognitive 19) REDACTED:884— nestjs.splitTopLevel has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, 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.
react.configHrefExpression (cognitive 19) REDACTED:333— react.configHrefExpression has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 3, ternaries 1 (nesting depth added 4). Of this number, 17 points are the body's own statements and 2 belong to one function literal 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.
csharp.fastEndpointConstantRoutes (cognitive 19) REDACTED:334— csharp.fastEndpointConstantRoutes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TreeSitterExtractor.curriedWrapperBoundName (cognitive 19) src/extraction/tree-sitter.ts:7368— TreeSitterExtractor.curriedWrapperBoundName has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 7, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
module-importers.bindingsOf (cognitive 19) src/resolution/module-importers.ts:692— module-importers.bindingsOf has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 8). Of this number, 13 points are the body's own statements and 6 belong to one function literal 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.
index.discoverEmbeddedRepoRoots::visit (cognitive 19) src/extraction/index.ts:1099— index.discoverEmbeddedRepoRoots::visit has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3, boolean chains 2, error handling 2, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ruby-constant-paths.matchRubyConstantPathRef (cognitive 19) src/resolution/ruby-constant-paths.ts:42— ruby-constant-paths.matchRubyConstantPathRef has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 4 (9 pts), if/else 5 (7 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.
tier-synthesizer.collectHttpSites (cognitive 19) REDACTED:531— tier-synthesizer.collectHttpSites has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 2, loops 2, ternaries 1 (2 pts) (nesting depth added 4). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to one function item inside it that branches (add). 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.
ReferenceResolver.runPostExtract (cognitive 19) REDACTED:415— ReferenceResolver.runPostExtract has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 2 (6 pts), if/else 3 (5 pts), error handling 2 (4 pts), loops 3 (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.
branch-guards.loopsInTree (cognitive 19) src/graph/branch-guards.ts:998— branch-guards.loopsInTree has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (16 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.
tools.exploreCompletenessNotes (cognitive 19) REDACTED:1380— tools.exploreCompletenessNotes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 3 (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.
map.pickDefaultDepth (cognitive 19) src/ui-server/api/map.ts:444— map.pickDefaultDepth has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 2, ternaries 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.
program.itemFor (cognitive 19) src/ui-server/api/program.ts:265— program.itemFor has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 5 (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.
trails.parseSaveRequest (cognitive 19) src/ui-server/api/trails.ts:397— trails.parseSaveRequest has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 4, ternaries 3 (4 pts), 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.
filecode-model.buildFileRefs (cognitive 19) ui/src/lib/filecode-model.ts:217— filecode-model.buildFileRefs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 4 (6 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 8). Of this number, 17 points are the body's own statements and 2 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.
export-svg.flowCardSvg (cognitive 19) ui/src/lib/export-svg.ts:357— export-svg.flowCardSvg has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 8 (11 pts), if/else 7, boolean chains 1 (nesting depth added 3). Of this number, 13 points are the body's own statements and 6 belong to 2 function literals inside it that branch. 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.
conditions.splitTop (cognitive 19) ui/src/lib/conditions.ts:20— conditions.splitTop has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, 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.
screens-model.placeLabels (cognitive 19) ui/src/lib/screens-model.ts:762— screens-model.placeLabels has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 7, if/else 4 (7 pts), ternaries 4, loops 1 (nesting depth added 3). Of this number, 11 points are the body's own statements and 8 belong to 4 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.
steps-model.buildStepsModel (cognitive 19) ui/src/lib/steps-model.ts:389— steps-model.buildStepsModel has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (8 pts), loops 5, if/else 3 (4 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
QueryBuilder.insertNodes (cognitive 18) src/db/queries.ts:641— QueryBuilder.insertNodes has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 8). None of this is in the body itself: all 18 points belong to one function literal inside it that branches (line 642). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
queries.foldModuleRows (cognitive 18) src/db/queries.ts:5492— queries.foldModuleRows has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 4 (5 pts), boolean chains 3 (nesting depth added 5). Of this number, 17 points are the body's own statements and 1 belongs to one function literal 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.
AstroExtractor.extractTemplateCalls (cognitive 18) src/extraction/astro-extractor.ts:249— AstroExtractor.extractTemplateCalls has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 4 (8 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vue-options-api.vueOptionsMembers (cognitive 18) REDACTED:182— vue-options-api.vueOptionsMembers has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
path-aliases.loadEffectiveOptions (cognitive 18) src/resolution/path-aliases.ts:186— path-aliases.loadEffectiveOptions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2, loops 1, ternaries 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.
dart-local-scope.gateDartLocal (cognitive 18) src/resolution/dart-local-scope.ts:54— dart-local-scope.gateDartLocal has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 7 (8 pts), loops 1, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
dart-local-scope.bindLocals (cognitive 18) src/resolution/dart-local-scope.ts:332— dart-local-scope.bindLocals has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 5 (6 pts), boolean chains 3 (nesting depth added 5). Of this number, 12 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dart-local-scope.blankTypeArguments (cognitive 18) src/resolution/dart-local-scope.ts:640— dart-local-scope.blankTypeArguments has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (5 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.
cpp-type-aliases.templateParametersAround (cognitive 18) src/resolution/cpp-type-aliases.ts:467— cpp-type-aliases.templateParametersAround has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cpp-namespaces.cppMacroNamespaceFrames (cognitive 18) REDACTED:94— cpp-namespaces.cppMacroNamespaceFrames has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 2 (5 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 6). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 107). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
name-matcher.goParamNames (cognitive 18) src/resolution/name-matcher.ts:2996— name-matcher.goParamNames has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.dartReturnType (cognitive 18) src/resolution/name-matcher.ts:5029— name-matcher.dartReturnType has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 3 (6 pts), boolean chains 3 (nesting depth added 6). Of this number, 17 points are the body's own statements and 1 belongs to one function literal 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.
name-matcher.csharpSupertypesOf (cognitive 18) src/resolution/name-matcher.ts:7040— name-matcher.csharpSupertypesOf has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.rustDeclaredItems (cognitive 18) src/resolution/name-matcher.ts:8731— name-matcher.rustDeclaredItems has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (9 pts), ternaries 2 (4 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.bindingScopes (cognitive 18) src/resolution/name-matcher.ts:12772— name-matcher.bindingScopes has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (10 pts), if/else 4 (6 pts), boolean chains 2 (nesting depth added 7). Of this number, 11 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
name-matcher.goSlicedType (cognitive 18) src/resolution/name-matcher.ts:22557— name-matcher.goSlicedType has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 3 (5 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.goTypeSpec (cognitive 18) src/resolution/name-matcher.ts:22589— name-matcher.goTypeSpec has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 1 (3 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 8). Of this number, 15 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.
name-matcher.goTypeTextEnd (cognitive 18) src/resolution/name-matcher.ts:22733— name-matcher.goTypeTextEnd has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 3 (6 pts), boolean chains 3, 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.
import-resolver.readDefaultExport (cognitive 18) REDACTED:160— import-resolver.readDefaultExport has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 3 (7 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
import-resolver.typeQualifier (cognitive 18) REDACTED:2801— import-resolver.typeQualifier has cognitive complexity 18 (threshold 15). Drivers by points: loops 4 (7 pts), boolean chains 5, if/else 3 (5 pts), ternaries 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.
import-resolver.importedTypeMember (cognitive 18) REDACTED:2827— import-resolver.importedTypeMember has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (9 pts), if/else 5 (6 pts), boolean chains 3 (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.
import-resolver.resolveRustModuleFile (cognitive 18) REDACTED:3753— import-resolver.resolveRustModuleFile has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 4). Of this number, 9 points are the body's own statements and 9 belong to one function item inside it that branches. 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.
express.matchDelim (cognitive 18) REDACTED:23— express.matchDelim has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
react.dropGluedTemplateHoles (cognitive 18) REDACTED:369— react.dropGluedTemplateHoles has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
react.loaderOf (cognitive 18) REDACTED:765— react.loaderOf has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 1 (3 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.
tanstack-router.chainAfter (cognitive 18) src/resolution/frameworks/tanstack-router.ts:262— tanstack-router.chainAfter has cognitive complexity 18 (threshold 15). Drivers by points: loops 4 (9 pts), if/else 3 (6 pts), boolean chains 3 (nesting depth added 8). 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.
angular-router.propertyInitializer (cognitive 18) src/resolution/frameworks/angular-router.ts:870— angular-router.propertyInitializer has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, 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.
python.balancedArgs (cognitive 18) src/resolution/frameworks/python.ts:612— python.balancedArgs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TreeSitterExtractor.visitPatternDefaults (cognitive 18) src/extraction/tree-sitter.ts:2404— TreeSitterExtractor.visitPatternDefaults has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
TreeSitterExtractor.walkPascalRoutine (cognitive 18) src/extraction/tree-sitter.ts:8926— TreeSitterExtractor.walkPascalRoutine has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pascal-scope.memberThroughPath (cognitive 18) REDACTED:461— pascal-scope.memberThroughPath has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 4 (7 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
type-parameters.collect (cognitive 18) src/resolution/type-parameters.ts:282— type-parameters.collect has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 2 (7 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.
callback-synthesizer.goCrossFileMethodContainsEdges (cognitive 18) src/resolution/callback-synthesizer.ts:1346— callback-synthesizer.goCrossFileMethodContainsEdges has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 7). Of this number, 15 points are the body's own statements and 3 belong to 3 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.
ReferenceResolver.resolveCfmlIncludePath (cognitive 18) REDACTED:3724— ReferenceResolver.resolveCfmlIncludePath has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 4 (6 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
claude.writePromptHookEntry (cognitive 18) src/installer/targets/claude.ts:458— claude.writePromptHookEntry has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (nesting depth added 5). Of this number, 17 points are the body's own statements and 1 belongs to one function literal 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.
index.detectInstallMethod (cognitive 18) src/upgrade/index.ts:109— index.detectInstallMethod has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 4 (5 pts), boolean chains 3 (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.
ToolHandler.handleImpact (cognitive 18) REDACTED:3392— ToolHandler.handleImpact has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (6 pts), loops 4 (6 pts), ternaries 3 (4 pts), boolean chains 2 (nesting depth added 5). Of this number, 10 points are the body's own statements and 8 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.
ToolHandler.buildPolymorphicBoundaries::memberOfSupertype::visit (cognitive 18) REDACTED:3851— ToolHandler.buildPolymorphicBoundaries::memberOfSupertype::visit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 2 (3 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (ToolHandler.buildPolymorphicBoundaries) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
index.toWireLines (cognitive 18) src/ui-server/highlight/index.ts:253— index.toWireLines has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
steps.buildSteps.firedByEffect (cognitive 18) src/ui-server/api/steps.ts:732— steps.buildSteps.firedByEffect has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 5, 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.
probe-file-spend.findStarvation (cognitive 17) scripts/agent-eval/probe-file-spend.mjs:85— probe-file-spend.findStarvation has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). Of this number, 16 points are the body's own statements and 1 belongs to one function literal 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.
daemon-registry.removeDaemonArtifacts (cognitive 17) src/mcp/daemon-registry.ts:183— daemon-registry.removeDaemonArtifacts has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), error handling 3 (6 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.
daemon-registry.daemonStopFailureMessage (cognitive 17) src/mcp/daemon-registry.ts:357— daemon-registry.daemonStopFailureMessage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 6, error handling 1, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
daemon-registry.stopVerifiedDaemon (cognitive 17) src/mcp/daemon-registry.ts:409— daemon-registry.stopVerifiedDaemon has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), error handling 3 (5 pts), boolean chains 1 (nesting depth added 7). Of this number, 16 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.
Telemetry.setEnabled (cognitive 17) src/telemetry/index.ts:263— Telemetry.setEnabled has cognitive complexity 17 (threshold 15). Drivers by points: error handling 2 (6 pts), if/else 2 (4 pts), ternaries 2 (3 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
generated-detection.isMinifiedContent (cognitive 17) src/extraction/generated-detection.ts:270— generated-detection.isMinifiedContent has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 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.
QueryBuilder.findNodesByNameSubstring (cognitive 17) src/db/queries.ts:2245— QueryBuilder.findNodesByNameSubstring has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 5 (6 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
grammars.detectLanguage (cognitive 17) src/extraction/grammars.ts:595— grammars.detectLanguage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 7 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
swift.joinSwiftCompositionContinuations (cognitive 17) src/extraction/languages/swift.ts:65— swift.joinSwiftCompositionContinuations has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 3 (5 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cfscript.cfmlCreatedComponent (cognitive 17) src/extraction/languages/cfscript.ts:69— cfscript.cfmlCreatedComponent has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 4, loops 1 (2 pts), ternaries 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
terraform.qualifyReference (cognitive 17) src/extraction/languages/terraform.ts:145— terraform.qualifyReference has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 3 (6 pts), boolean chains 2, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
vue-template-calls.rootTemplate (cognitive 17) src/extraction/vue-template-calls.ts:90— vue-template-calls.rootTemplate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, loops 1, ternaries 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.
VueExtractor.extractTemplateComponents (cognitive 17) src/extraction/vue-extractor.ts:287— VueExtractor.extractTemplateComponents 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.
path-aliases.applyAliases (cognitive 17) src/resolution/path-aliases.ts:345— path-aliases.applyAliases has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
drupal.extractDrupalHooks (cognitive 17) src/resolution/frameworks/drupal.ts:226— drupal.extractDrupalHooks has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (4 pts) (nesting depth added 8). Of this number, 16 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.
swift-type-visibility.gateSwiftTypeTarget (cognitive 17) src/resolution/swift-type-visibility.ts:327— swift-type-visibility.gateSwiftTypeTarget has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, ternaries 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.
dart-local-scope.endOfStatement (cognitive 17) src/resolution/dart-local-scope.ts:405— dart-local-scope.endOfStatement has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 3, loops 2 (3 pts), ternaries 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.
vbnet-receivers.typesNamedAt (cognitive 17) REDACTED:812— vbnet-receivers.typesNamedAt has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 3, ternaries 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.
vbnet-receivers.readExtension (cognitive 17) REDACTED:1222— vbnet-receivers.readExtension has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 4, boolean chains 2, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
vbnet-receivers.receiverAt (cognitive 17) REDACTED:1504— vbnet-receivers.receiverAt has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 5 (7 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cpp-macro-visibility.resolveInclude (cognitive 17) REDACTED:224— cpp-macro-visibility.resolveInclude has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 1 (3 pts), boolean chains 2, ternaries 1 (nesting depth added 7). Of this number, 16 points are the body's own statements and 1 belongs to one function literal 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.
name-matcher.pythonOwnGlobalWrites (cognitive 17) src/resolution/name-matcher.ts:728— name-matcher.pythonOwnGlobalWrites has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 7). None of this is in the body itself: all 17 points belong to one function literal inside it that branches (line 729). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
name-matcher.isSfcPrivate (cognitive 17) src/resolution/name-matcher.ts:3351— name-matcher.isSfcPrivate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6 (nesting depth added 3). Of this number, 10 points are the body's own statements and 7 belong to 2 function literals 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.
name-matcher.dartAnnotationAt (cognitive 17) src/resolution/name-matcher.ts:5656— name-matcher.dartAnnotationAt has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 3 (5 pts), boolean chains 3, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.rustCrateRootModule (cognitive 17) src/resolution/name-matcher.ts:8628— name-matcher.rustCrateRootModule has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (9 pts), boolean chains 4, if/else 4 (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.
name-matcher.isRustAssocBinding (cognitive 17) src/resolution/name-matcher.ts:9603— name-matcher.isRustAssocBinding has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 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.
name-matcher.readRustMethodReturn (cognitive 17) src/resolution/name-matcher.ts:10401— name-matcher.readRustMethodReturn has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 6, ternaries 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
name-matcher.rustOutsideTypeCall (cognitive 17) src/resolution/name-matcher.ts:11108— name-matcher.rustOutsideTypeCall has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 4, ternaries 2 (4 pts) (nesting depth added 5). Of this number, 13 points are the body's own statements and 4 belong to 4 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.
name-matcher.destructuresMember (cognitive 17) src/resolution/name-matcher.ts:12689— name-matcher.destructuresMember has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 2 (6 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.esInheritedMethod (cognitive 17) src/resolution/name-matcher.ts:13012— name-matcher.esInheritedMethod has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 4, loops 2, ternaries 1 (2 pts) (nesting depth added 5). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 3 function items inside it that branch (inherited, a function literal at line 13015, a function literal at line 13023). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
name-matcher.cppWrittenReturnType (cognitive 17) src/resolution/name-matcher.ts:13860— name-matcher.cppWrittenReturnType has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, loops 1 (2 pts), ternaries 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.
name-matcher.cppArgumentListFollows (cognitive 17) src/resolution/name-matcher.ts:15592— name-matcher.cppArgumentListFollows has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.cppUnqualifiedTypeFit (cognitive 17) src/resolution/name-matcher.ts:16254— name-matcher.cppUnqualifiedTypeFit has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 12, if/else 5. Of this number, 15 points are the body's own statements and 2 belong to 2 function items inside it that branch. 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.
name-matcher.kotlinLocalCallResultType (cognitive 17) src/resolution/name-matcher.ts:17846— name-matcher.kotlinLocalCallResultType has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 3 (6 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.inferMemberReceiverType (cognitive 17) src/resolution/name-matcher.ts:18487— name-matcher.inferMemberReceiverType has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 7, loops 1, ternaries 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.
name-matcher.goEmbeddedTypes (cognitive 17) src/resolution/name-matcher.ts:21043— name-matcher.goEmbeddedTypes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (4 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.goParseBuildExpr (cognitive 17) src/resolution/name-matcher.ts:21495— name-matcher.goParseBuildExpr has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, ternaries 3 (4 pts), if/else 2, loops 2 (nesting depth added 1). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 3 function items inside it that branch (not, or, and). 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.
name-matcher.goNamedTypeDecls (cognitive 17) src/resolution/name-matcher.ts:22114— name-matcher.goNamedTypeDecls has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 2 (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.
name-matcher.matchRustWrittenReceiverCall (cognitive 17) src/resolution/name-matcher.ts:24549— name-matcher.matchRustWrittenReceiverCall has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, ternaries 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.
name-matcher.tsClassTypeParameter (cognitive 17) src/resolution/name-matcher.ts:25662— name-matcher.tsClassTypeParameter has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, 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.
import-resolver.exportedByName (cognitive 17) REDACTED:322— import-resolver.exportedByName has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
react.conditionalBranches (cognitive 17) REDACTED:799— react.conditionalBranches has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 5, 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.
TreeSitterExtractor.extractRtkEndpoints (cognitive 17) src/extraction/tree-sitter.ts:3644— TreeSitterExtractor.extractRtkEndpoints has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 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.
pascal-scope.matchPascalParenlessRef (cognitive 17) REDACTED:71— pascal-scope.matchPascalParenlessRef has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, ternaries 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
pascal-scope.classNamed (cognitive 17) REDACTED:889— pascal-scope.classNamed has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (4 pts), boolean chains 3, ternaries 1 (nesting depth added 5). Of this number, 9 points are the body's own statements and 8 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.
type-parameters.matchingBracket (cognitive 17) src/resolution/type-parameters.ts:306— type-parameters.matchingBracket has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 3 (7 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.
react-router-synthesizer.linkWrappers (cognitive 17) REDACTED:78— react-router-synthesizer.linkWrappers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
angular-template-synthesizer.fieldValue (cognitive 17) src/resolution/angular-template-synthesizer.ts:173— angular-template-synthesizer.fieldValue has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 4, 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.
angular-template-synthesizer.expressionEnd (cognitive 17) src/resolution/angular-template-synthesizer.ts:333— angular-template-synthesizer.expressionEnd has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 6, 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.
angular-template-synthesizer.statementEnd (cognitive 17) src/resolution/angular-template-synthesizer.ts:442— angular-template-synthesizer.statementEnd has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
angular-template-synthesizer.memberShape (cognitive 17) src/resolution/angular-template-synthesizer.ts:575— angular-template-synthesizer.memberShape has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 2 (4 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.
tier-synthesizer.matchHttp (cognitive 17) REDACTED:438— tier-synthesizer.matchHttp has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 1, ternaries 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.
callback-synthesizer.bindingElementAt (cognitive 17) src/resolution/callback-synthesizer.ts:2278— callback-synthesizer.bindingElementAt has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6 (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.
ReferenceResolver.reconcileCrossFileNodes (cognitive 17) REDACTED:455— ReferenceResolver.reconcileCrossFileNodes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 4, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ContextBuilder.resolveImportsToDefinitions (cognitive 17) src/context/index.ts:1547— ContextBuilder.resolveImportsToDefinitions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (3 pts), boolean chains 2, ternaries 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.
FileWatcher.start (cognitive 17) src/sync/watcher.ts:394— FileWatcher.start has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 2 (3 pts), boolean chains 2, error handling 1, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
git-hooks.installGitSyncHook (cognitive 17) src/sync/git-hooks.ts:228— git-hooks.installGitSyncHook has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 2 (5 pts), error handling 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.
branch-guards.argumentsOf (cognitive 17) src/graph/branch-guards.ts:652— branch-guards.argumentsOf has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (4 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.
dynamic-boundaries.isRuntimeImportArgument (cognitive 17) REDACTED:90— dynamic-boundaries.isRuntimeImportArgument has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3 (4 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.
dynamic-boundaries.scanPythonGetattr (cognitive 17) REDACTED:330— dynamic-boundaries.scanPythonGetattr has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, ternaries 1 (2 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.
MCPSession.handleMessage (cognitive 17) src/mcp/session.ts:162— MCPSession.handleMessage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
filecode.buildCalls (cognitive 17) src/ui-server/api/filecode.ts:204— filecode.buildCalls has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 5 (7 pts), boolean chains 1 (nesting depth added 6). Of this number, 16 points are the body's own statements and 1 belongs to one function literal 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.
entrypoints.withoutPreviews (cognitive 17) src/ui-server/api/entrypoints.ts:288— entrypoints.withoutPreviews has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 5, ternaries 1 (2 pts), loops 1 (nesting depth added 5). Of this number, 13 points are the body's own statements and 4 belong to 2 function literals 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.
index.listenWithFallback (cognitive 17) REDACTED:405— index.listenWithFallback has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (8 pts), boolean chains 3, ternaries 2 (3 pts), error handling 1 (2 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.
index.writeToD1 (cognitive 17) telemetry-worker/src/index.ts:269— index.writeToD1 has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (6 pts), loops 3 (4 pts), ternaries 2 (4 pts), boolean chains 2, error handling 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.
steps-model.packStubs (cognitive 17) ui/src/lib/steps-model.ts:558— steps-model.packStubs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (6 pts), ternaries 3 (6 pts), boolean chains 3, loops 2 (nesting depth added 6). Of this number, 11 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.
FileLock.acquire (cognitive 16) src/utils.ts:283— FileLock.acquire has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), error handling 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.
Telemetry.flushNow (cognitive 16) src/telemetry/index.ts:333— Telemetry.flushNow has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), error handling 3 (5 pts), loops 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.
reference-tail.referenceNameTail (cognitive 16) src/db/reference-tail.ts:40— reference-tail.referenceNameTail has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
query-parser.boundedEditDistance (cognitive 16) src/search/query-parser.ts:157— query-parser.boundedEditDistance has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 3 (4 pts), ternaries 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
c-cpp.skipCppAngleArgs (cognitive 16) REDACTED:662— c-cpp.skipCppAngleArgs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 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.
c-cpp.firstCodeCharAfter (cognitive 16) REDACTED:1361— c-cpp.firstCodeCharAfter has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
kotlin.kotlinPropertyKind (cognitive 16) src/extraction/languages/kotlin.ts:87— kotlin.kotlinPropertyKind has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 4, ternaries 2 (3 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.
pascal-preparse.tokenEndBefore (cognitive 16) src/extraction/languages/pascal-preparse.ts:189— pascal-preparse.tokenEndBefore has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pascal-preparse.attributeEnd (cognitive 16) src/extraction/languages/pascal-preparse.ts:244— pascal-preparse.attributeEnd has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 1 (4 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.
RazorExtractor.extractDirectives (cognitive 16) src/extraction/razor-extractor.ts:148— RazorExtractor.extractDirectives has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (9 pts), if/else 3 (7 pts) (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
VueExtractor.extractTemplateCalls (cognitive 16) src/extraction/vue-extractor.ts:348— VueExtractor.extractTemplateCalls has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 4 (5 pts), boolean chains 2, ternaries 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.
path-aliases.resolveExtendsTarget (cognitive 16) src/resolution/path-aliases.ts:149— path-aliases.resolveExtendsTarget has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (5 pts), boolean chains 1, error handling 1 (nesting depth added 7). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
workspace-packages.readNpmPathDeps (cognitive 16) src/resolution/workspace-packages.ts:359— workspace-packages.readNpmPathDeps has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (3 pts), error handling 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.
laravel.matchParen (cognitive 16) src/resolution/frameworks/laravel.ts:436— laravel.matchParen has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 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.
laravel.resolveControllerMethod (cognitive 16) src/resolution/frameworks/laravel.ts:592— laravel.resolveControllerMethod has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 6). Of this number, 14 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dart-local-scope.parameterNames (cognitive 16) src/resolution/dart-local-scope.ts:253— dart-local-scope.parameterNames has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (4 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.
vbnet-receivers.valueBinding (cognitive 16) REDACTED:305— vbnet-receivers.valueBinding has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 4 (7 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.
vbnet-receivers.baseTypeNamesAround (cognitive 16) REDACTED:764— vbnet-receivers.baseTypeNamesAround has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cpp-type-aliases.cppTypeName (cognitive 16) src/resolution/cpp-type-aliases.ts:87— cpp-type-aliases.cppTypeName has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 4, loops 1, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
rust-scopes.walkTop (cognitive 16) src/resolution/rust-scopes.ts:224— rust-scopes.walkTop has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, 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.
name-matcher.goTypePositionTarget (cognitive 16) src/resolution/name-matcher.ts:2587— name-matcher.goTypePositionTarget has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, ternaries 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.
name-matcher.pluggedFixtureModules (cognitive 16) src/resolution/name-matcher.ts:3906— name-matcher.pluggedFixtureModules has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (7 pts), if/else 4 (6 pts), ternaries 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.rustGoCallShape (cognitive 16) src/resolution/name-matcher.ts:5745— name-matcher.rustGoCallShape has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 3 (4 pts), boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.rustModBlocks (cognitive 16) src/resolution/name-matcher.ts:8535— name-matcher.rustModBlocks has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 1 (3 pts), loops 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.
name-matcher.rustFieldValue (cognitive 16) src/resolution/name-matcher.ts:10512— name-matcher.rustFieldValue has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 3, ternaries 2 (nesting depth added 1). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
name-matcher.rustTraitMethods (cognitive 16) src/resolution/name-matcher.ts:11044— name-matcher.rustTraitMethods has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 7). Of this number, 15 points are the body's own statements and 1 belongs to one function literal 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.
name-matcher.jsBindingEnclosesReference (cognitive 16) src/resolution/name-matcher.ts:11441— name-matcher.jsBindingEnclosesReference has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 4, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.enclosingOpenParen (cognitive 16) src/resolution/name-matcher.ts:11750— name-matcher.enclosingOpenParen has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 4, ternaries 1 (4 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.holderScopeAt (cognitive 16) src/resolution/name-matcher.ts:12817— name-matcher.holderScopeAt has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 5, ternaries 3 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.resolveObjectPathMember (cognitive 16) src/resolution/name-matcher.ts:12894— name-matcher.resolveObjectPathMember has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, loops 1 (2 pts), ternaries 1 (nesting depth added 3). Of this number, 12 points are the body's own statements and 4 belong to 3 function literals 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.
name-matcher.cppRangeExpression (cognitive 16) src/resolution/name-matcher.ts:13696— name-matcher.cppRangeExpression has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.matchCppDeclaredTypeCall (cognitive 16) src/resolution/name-matcher.ts:15090— name-matcher.matchCppDeclaredTypeCall has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, boolean chains 6, ternaries 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
name-matcher.cppEnclosingClasses (cognitive 16) src/resolution/name-matcher.ts:15662— name-matcher.cppEnclosingClasses has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), boolean chains 5, ternaries 1 (3 pts), loops 1 (nesting depth added 6). Of this number, 14 points are the body's own statements and 2 belong to one function literal 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.
name-matcher.cppMacroTypeNames (cognitive 16) src/resolution/name-matcher.ts:16800— name-matcher.cppMacroTypeNames 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.
name-matcher.cppStructuredBindingType (cognitive 16) src/resolution/name-matcher.ts:17185— name-matcher.cppStructuredBindingType has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.jsDeclarationReading (cognitive 16) src/resolution/name-matcher.ts:19512— name-matcher.jsDeclarationReading has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 3, ternaries 2 (3 pts), 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.
name-matcher.goWrittenType (cognitive 16) src/resolution/name-matcher.ts:21126— name-matcher.goWrittenType has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 6). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
name-matcher.matchPythonFactoryChain (cognitive 16) src/resolution/name-matcher.ts:24087— name-matcher.matchPythonFactoryChain has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, ternaries 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.
name-matcher.tsMethodUpChain (cognitive 16) src/resolution/name-matcher.ts:25539— name-matcher.tsMethodUpChain has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 1 (nesting depth added 4). Of this number, 15 points are the body's own statements and 1 belongs to one function literal 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.
name-matcher.matchSelectedStoreCall (cognitive 16) src/resolution/name-matcher.ts:26528— name-matcher.matchSelectedStoreCall has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2, boolean chains 1 (nesting depth added 4). Of this number, 12 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
import-resolver.resolveImportedInstanceMember (cognitive 16) REDACTED:4157— import-resolver.resolveImportedInstanceMember has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, ternaries 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.
import-resolver.collectRustUseBindings (cognitive 16) REDACTED:4228— import-resolver.collectRustUseBindings has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (22 pts), ternaries 2 (6 pts), loops 4 (5 pts), boolean chains 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (import-resolver.collectRustUseBindings::expand) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
nestjs.methodNameAfter (cognitive 16) REDACTED:585— nestjs.methodNameAfter has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2, boolean chains 1, ternaries 1 (nesting depth added 6). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
react.declare (cognitive 16) REDACTED:1741— react.declare has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
react-router.reactRouterTable (cognitive 16) src/resolution/frameworks/react-router.ts:114— react-router.reactRouterTable has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (6 pts), boolean chains 4, loops 3 (4 pts), ternaries 1 (2 pts) (nesting depth added 4). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TreeSitterExtractor.extractGoInterfaceMethods (cognitive 16) src/extraction/tree-sitter.ts:4556— TreeSitterExtractor.extractGoInterfaceMethods has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (5 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.
TreeSitterExtractor.emitRustUseBindingRefs::collect (cognitive 16) src/extraction/tree-sitter.ts:5021— TreeSitterExtractor.emitRustUseBindingRefs::collect has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), ternaries 3 (6 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
TreeSitterExtractor.extractRustRouteMacro (cognitive 16) src/extraction/tree-sitter.ts:7186— TreeSitterExtractor.extractRustRouteMacro has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 1, loops 1 (nesting depth added 4). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParseWorkerPool.drain (cognitive 16) src/extraction/parse-pool.ts:461— ParseWorkerPool.drain has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (6 pts), boolean chains 5, if/else 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StoreWriter.constructor (cognitive 16) src/extraction/store-writer.ts:81— StoreWriter.constructor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 2, ternaries 1 (nesting depth added 3). None of this is in the body itself: all 16 points belong to 3 function literals inside it that branch (lines 91, 111, 107). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
index.collectIncludedFiles::consider (cognitive 16) src/extraction/index.ts:699— index.collectIncludedFiles::consider has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pascal-scope.declarationInScope (cognitive 16) REDACTED:434— pascal-scope.declarationInScope has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 1 (3 pts), boolean chains 1, ternaries 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.
pascal-scope.unitFileNamed (cognitive 16) REDACTED:858— pascal-scope.unitFileNamed has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 7). Of this number, 13 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.
tier-synthesizer.methodNameAfter (cognitive 16) REDACTED:193— tier-synthesizer.methodNameAfter has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2, boolean chains 1, ternaries 1 (nesting depth added 6). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
override-parameters.topLevelIndex (cognitive 16) REDACTED:358— override-parameters.topLevelIndex has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 6, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JsxLexer.children (cognitive 16) src/resolution/jsx-code.ts:490— JsxLexer.children has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, 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.
callback-synthesizer.celeryDispatchEdges::isCeleryTask (cognitive 16) src/resolution/callback-synthesizer.ts:4103— callback-synthesizer.celeryDispatchEdges::isCeleryTask has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (callback-synthesizer.celeryDispatchEdges) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
callback-synthesizer.hasSynthesisPattern (cognitive 16) src/resolution/callback-synthesizer.ts:5073— callback-synthesizer.hasSynthesisPattern has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 4, loops 1 (nesting depth added 1). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
GraphTraverser.dfsRecursive (cognitive 16) src/graph/traversal.ts:182— GraphTraverser.dfsRecursive has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 3 (4 pts), boolean chains 2, loops 1 (nesting depth added 5). Of this number, 15 points are the body's own statements and 1 belongs to one function literal 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.
GraphQueryManager.getFilteredSubgraph (cognitive 16) REDACTED:338— GraphQueryManager.getFilteredSubgraph has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 4 (8 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
query-paths.resolveSpan (cognitive 16) src/search/query-paths.ts:268— query-paths.resolveSpan has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
branch-guards.hasTopLevelOr (cognitive 16) src/graph/branch-guards.ts:119— branch-guards.hasTopLevelOr 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.
branch-guards.guardsForFileSync (cognitive 16) src/graph/branch-guards.ts:273— branch-guards.guardsForFileSync has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 2 (3 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
branch-guards.objectKeys (cognitive 16) src/graph/branch-guards.ts:722— branch-guards.objectKeys has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 2, loops 1, ternaries 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.
branch-guards.memberTypesInTree::visitParams (cognitive 16) src/graph/branch-guards.ts:2335— branch-guards.memberTypesInTree::visitParams has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, 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. This shape REPEATS in the file: one other method here (branch-guards.memberTypesInTree) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
index.compareVersions (cognitive 16) src/upgrade/index.ts:248— index.compareVersions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, ternaries 2 (5 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.
explore-diagnostics.attributeSourceBytes (cognitive 16) src/mcp/explore-diagnostics.ts:639— explore-diagnostics.attributeSourceBytes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 1 (nesting depth added 6). Of this number, 14 points are the body's own statements and 2 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.
tools.fitExploreEpilogue (cognitive 16) REDACTED:1434— tools.fitExploreEpilogue has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (6 pts), ternaries 4 (5 pts), boolean chains 4, loops 1 (nesting depth added 2). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to one function item inside it that branches (fitPointers). 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.
program.seal (cognitive 16) src/ui-server/api/program.ts:379— program.seal has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (4 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.
trail-store.listStoredTrails (cognitive 16) src/ui-server/api/trail-store.ts:217— trail-store.listStoredTrails has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 2 (3 pts), ternaries 2 (3 pts), loops 1 (nesting depth added 6). Of this number, 13 points are the body's own statements and 3 belong to one function literal 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.
flow.edgeBetween (cognitive 16) src/ui-server/api/flow.ts:627— flow.edgeBetween has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 4, loops 2, ternaries 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.
hermes.childrenOf (cognitive 16) src/installer/targets/hermes.ts:268— hermes.childrenOf has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 4 (5 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.
hermes.upsertCodeGraphServer (cognitive 16) src/installer/targets/hermes.ts:337— hermes.upsertCodeGraphServer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
remove-binary.executeBinaryRemoval (cognitive 16) src/upgrade/remove-binary.ts:263— remove-binary.executeBinaryRemoval has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 2 (5 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.
rollup.runNightly (cognitive 16) telemetry-worker/src/rollup.ts:462— rollup.runNightly has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), error handling 3 (4 pts), loops 2, ternaries 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
steps-model.stepSub (cognitive 16) ui/src/lib/steps-model.ts:264— steps-model.stepSub has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
program-model.withoutBackEdges (cognitive 16) ui/src/lib/program-model.ts:285— program-model.withoutBackEdges has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 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.
Change-coupling hub: grammars.ts → langs.rs, lib.rs, REDACTED, REDACTED src/extraction/grammars.ts— `src/extraction/grammars.ts` changes together with 4 other files — `codegraph-kernel/src/langs.rs`, `codegraph-kernel/src/lib.rs`, `src/extraction/kernel/index.ts`, `src/extraction/languages/index.ts` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
D4 · Code Duplication· Near-duplicate member family (14 members, 36 shared lines) · ×1
Near-duplicate member family (14 members, 36 shared lines) codegraph-kernel/src/ccpp/mod.rs:389— codegraph-kernel/src/ccpp/mod.rs:389-487 | codegraph-kernel/src/csharp.rs:147-245 | codegraph-kernel/src/dart.rs:226-300 | codegraph-kernel/src/go.rs:107-182 | codegraph-kernel/src/java.rs:146-253 | codegraph-kernel/src/kotlin.rs:207-312 | codegraph-kernel/src/lua.rs:87-159 | codegraph-kernel/src/php.rs:157-265 | codegraph-kernel/src/rlang.rs:77-143 | codegraph-kernel/src/ruby.rs:136-209 | codegraph-kernel/src/rustlang.rs:136-211 | codegraph-kernel/src/scala.rs:170-247 | codegraph-kernel/src/swift.rs:236-310 | codegraph-kernel/src/tsjs/mod.rs:224-319 — These 14 members are variants of one another: a block of 36 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 14 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 14 times.
D4 · Code Duplication· Near-duplicate member family (14 members, 27 shared lines) · ×1
Near-duplicate member family (14 members, 27 shared lines) codegraph-kernel/src/csharp.rs:147— codegraph-kernel/src/csharp.rs:147-245 | codegraph-kernel/src/dart.rs:226-300 | codegraph-kernel/src/go.rs:107-182 | codegraph-kernel/src/java.rs:146-253 | codegraph-kernel/src/kotlin.rs:207-312 | codegraph-kernel/src/lua.rs:87-159 | codegraph-kernel/src/php.rs:157-265 | codegraph-kernel/src/python.rs:157-232 | codegraph-kernel/src/rlang.rs:77-143 | codegraph-kernel/src/ruby.rs:136-209 | codegraph-kernel/src/rustlang.rs:136-211 | codegraph-kernel/src/scala.rs:170-247 | codegraph-kernel/src/swift.rs:236-310 | codegraph-kernel/src/tsjs/mod.rs:224-319 — These 14 members are variants of one another: a block of 27 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 14 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 14 times.
D4 · Code Duplication· Near-duplicate member family (12 members, 69 shared lines) · ×1
Near-duplicate member family (12 members, 69 shared lines) codegraph-kernel/src/ccpp/mod.rs:2348— codegraph-kernel/src/ccpp/mod.rs:2348-2442 | codegraph-kernel/src/csharp.rs:1606-1699 | codegraph-kernel/src/dart.rs:2074-2176 | codegraph-kernel/src/go.rs:1329-1438 | codegraph-kernel/src/java.rs:1318-1407 | codegraph-kernel/src/kotlin.rs:1646-1773 | codegraph-kernel/src/python.rs:1027-1131 | codegraph-kernel/src/ruby.rs:1025-1134 | codegraph-kernel/src/rustlang.rs:1513-1625 | codegraph-kernel/src/scala.rs:1387-1486 | codegraph-kernel/src/swift.rs:1550-1682 | codegraph-kernel/src/tsjs/mod.rs:509-603 — These 12 members are variants of one another: a block of 69 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 12 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 12 times.
D4 · Code Duplication· Near-duplicate member family (12 members, 45 shared lines) · ×1
Near-duplicate member family (12 members, 45 shared lines) codegraph-kernel/src/csharp.rs:1606— codegraph-kernel/src/csharp.rs:1606-1699 | codegraph-kernel/src/dart.rs:2074-2176 | codegraph-kernel/src/go.rs:1329-1438 | codegraph-kernel/src/java.rs:1318-1407 | codegraph-kernel/src/kotlin.rs:1646-1773 | codegraph-kernel/src/php.rs:1417-1477 | codegraph-kernel/src/python.rs:1027-1131 | codegraph-kernel/src/ruby.rs:1025-1134 | codegraph-kernel/src/rustlang.rs:1513-1625 | codegraph-kernel/src/scala.rs:1387-1486 | codegraph-kernel/src/swift.rs:1550-1682 | codegraph-kernel/src/tsjs/mod.rs:509-603 — These 12 members are variants of one another: a block of 45 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 12 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 12 times.
D4 · Code Duplication· Near-duplicate member family (11 members, 24 shared lines) · ×1
Near-duplicate member family (11 members, 24 shared lines) codegraph-kernel/src/csharp.rs:316— codegraph-kernel/src/csharp.rs:316-391 | codegraph-kernel/src/dart.rs:350-451 | codegraph-kernel/src/java.rs:304-381 | codegraph-kernel/src/kotlin.rs:383-499 | codegraph-kernel/src/lua.rs:203-277 | codegraph-kernel/src/php.rs:316-408 | codegraph-kernel/src/python.rs:277-371 | codegraph-kernel/src/rlang.rs:180-246 | codegraph-kernel/src/ruby.rs:260-350 | codegraph-kernel/src/scala.rs:297-391 | codegraph-kernel/src/swift.rs:401-498 — These 11 members are variants of one another: a block of 24 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 11 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 11 times.
D4 · Code Duplication· Near-duplicate member family (9 members, 22 shared lines) · ×1
Near-duplicate member family (9 members, 22 shared lines) codegraph-kernel/src/ccpp/mod.rs:532— codegraph-kernel/src/ccpp/mod.rs:532-634 | codegraph-kernel/src/dart.rs:350-451 | codegraph-kernel/src/go.rs:227-317 | codegraph-kernel/src/kotlin.rs:383-499 | codegraph-kernel/src/php.rs:316-408 | codegraph-kernel/src/ruby.rs:260-350 | codegraph-kernel/src/rustlang.rs:260-355 | codegraph-kernel/src/scala.rs:297-391 | codegraph-kernel/src/swift.rs:401-498 — These 9 members are variants of one another: a block of 22 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 9 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times.
D4 · Code Duplication· Near-duplicate member family (8 members, 30 shared lines) · ×1
Near-duplicate member family (8 members, 30 shared lines) codegraph-kernel/src/ccpp/mod.rs:532— codegraph-kernel/src/ccpp/mod.rs:532-634 | codegraph-kernel/src/go.rs:227-317 | codegraph-kernel/src/kotlin.rs:383-499 | codegraph-kernel/src/php.rs:316-408 | codegraph-kernel/src/python.rs:277-371 | codegraph-kernel/src/ruby.rs:260-350 | codegraph-kernel/src/rustlang.rs:260-355 | codegraph-kernel/src/swift.rs:401-498 — These 8 members are variants of one another: a block of 30 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication· Near-duplicate member family (8 members, 27 shared lines) · ×1
Near-duplicate member family (8 members, 27 shared lines) codegraph-kernel/src/dart.rs:350— codegraph-kernel/src/dart.rs:350-451 | codegraph-kernel/src/go.rs:227-317 | codegraph-kernel/src/kotlin.rs:383-499 | codegraph-kernel/src/php.rs:316-408 | codegraph-kernel/src/python.rs:277-371 | codegraph-kernel/src/ruby.rs:260-350 | codegraph-kernel/src/scala.rs:297-391 | codegraph-kernel/src/swift.rs:401-498 — These 8 members are variants of one another: a block of 27 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication· Near-duplicate member family (8 members, 20 shared lines) · ×1
Near-duplicate member family (8 members, 20 shared lines) codegraph-kernel/src/csharp.rs:316— codegraph-kernel/src/csharp.rs:316-391 | codegraph-kernel/src/go.rs:227-317 | codegraph-kernel/src/java.rs:304-381 | codegraph-kernel/src/php.rs:316-408 | codegraph-kernel/src/python.rs:277-371 | codegraph-kernel/src/ruby.rs:260-350 | codegraph-kernel/src/rustlang.rs:260-355 | codegraph-kernel/src/swift.rs:401-498 — These 8 members are variants of one another: a block of 20 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication· Near-duplicate member family (8 members, 19 shared lines) · ×1
Near-duplicate member family (8 members, 19 shared lines) codegraph-kernel/src/ccpp/mod.rs:532— codegraph-kernel/src/ccpp/mod.rs:532-634 | codegraph-kernel/src/csharp.rs:316-391 | codegraph-kernel/src/go.rs:227-317 | codegraph-kernel/src/java.rs:304-381 | codegraph-kernel/src/kotlin.rs:383-499 | codegraph-kernel/src/php.rs:316-408 | codegraph-kernel/src/rustlang.rs:260-355 | codegraph-kernel/src/swift.rs:401-498 — These 8 members are variants of one another: a block of 19 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication· Near-duplicate member family (8 members, 11 shared lines) · ×1
Near-duplicate member family (8 members, 11 shared lines) codegraph-kernel/src/csharp.rs:36— codegraph-kernel/src/csharp.rs:36-49 | codegraph-kernel/src/dart.rs:70-83 | codegraph-kernel/src/go.rs:1466-1479 | codegraph-kernel/src/java.rs:43-56 | codegraph-kernel/src/rustlang.rs:1759-1772 | codegraph-kernel/src/scala.rs:71-84 | codegraph-kernel/src/swift.rs:41-54 | codegraph-kernel/src/tsjs/mod.rs:120-133 — These 8 members are variants of one another: a block of 11 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication· Near-duplicate member family (7 members, 27 shared lines) · ×1
Near-duplicate member family (7 members, 27 shared lines) codegraph-kernel/src/csharp.rs:316— codegraph-kernel/src/csharp.rs:316-391 | codegraph-kernel/src/java.rs:304-381 | codegraph-kernel/src/kotlin.rs:383-499 | codegraph-kernel/src/php.rs:316-408 | codegraph-kernel/src/ruby.rs:260-350 | codegraph-kernel/src/rustlang.rs:260-355 | codegraph-kernel/src/swift.rs:401-498 — These 7 members are variants of one another: a block of 27 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication· Near-duplicate member family (6 members, 26 shared lines) · ×1
Near-duplicate member family (6 members, 26 shared lines) codegraph-kernel/src/csharp.rs:316— codegraph-kernel/src/csharp.rs:316-391 | codegraph-kernel/src/dart.rs:350-451 | codegraph-kernel/src/go.rs:227-317 | codegraph-kernel/src/php.rs:316-408 | codegraph-kernel/src/scala.rs:297-391 | codegraph-kernel/src/swift.rs:401-498 — These 6 members are variants of one another: a block of 26 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication· Near-duplicate member family (5 members, 26 shared lines) · ×1
Near-duplicate member family (5 members, 26 shared lines) codegraph-kernel/src/java.rs:1082— codegraph-kernel/src/java.rs:1082-1121 | codegraph-kernel/src/kotlin.rs:1377-1414 | codegraph-kernel/src/python.rs:803-834 | codegraph-kernel/src/swift.rs:1279-1318 | codegraph-kernel/src/tsjs/extractors.rs:1885-1926 — These 5 members are variants of one another: a block of 26 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication· Near-duplicate member family (4 members, 31 shared lines) · ×1
Near-duplicate member family (4 members, 31 shared lines) codegraph-kernel/src/java.rs:1082— codegraph-kernel/src/java.rs:1082-1121 | codegraph-kernel/src/kotlin.rs:1377-1414 | codegraph-kernel/src/swift.rs:1279-1318 | codegraph-kernel/src/tsjs/extractors.rs:1885-1926 — These 4 members are variants of one another: a block of 31 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Near-duplicate member family (4 members, 15 shared lines) · ×1
Near-duplicate member family (4 members, 15 shared lines) codegraph-kernel/src/ccpp/mod.rs:1791— codegraph-kernel/src/ccpp/mod.rs:1791-1823 | codegraph-kernel/src/python.rs:836-881 | codegraph-kernel/src/tsjs/extractors.rs:1845-1881 | codegraph-kernel/src/tsjs/extractors.rs:1928-1973 — These 4 members are variants of one another: a block of 15 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Members sharing a duplicated core (14 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (14 members, 50+ identical tokens) codegraph-kernel/src/ccpp/mod.rs:2305— codegraph-kernel/src/ccpp/mod.rs:2305-2344 | codegraph-kernel/src/csharp.rs:1570-1602 | codegraph-kernel/src/dart.rs:2041-2070 | codegraph-kernel/src/go.rs:1288-1325 | codegraph-kernel/src/java.rs:1283-1314 | codegraph-kernel/src/kotlin.rs:1613-1642 | codegraph-kernel/src/lua.rs:936-967 | codegraph-kernel/src/php.rs:1378-1413 | codegraph-kernel/src/python.rs:993-1023 | codegraph-kernel/src/ruby.rs:988-1021 | codegraph-kernel/src/rustlang.rs:1480-1509 | codegraph-kernel/src/scala.rs:1354-1383 | codegraph-kernel/src/swift.rs:1517-1546 | codegraph-kernel/src/tsjs/mod.rs:642-677 — These 14 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 14 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 14 times.
D4 · Code Duplication· Members sharing a duplicated core (9 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (9 members, 50+ identical tokens) codegraph-kernel/src/ccpp/mod.rs:2280— codegraph-kernel/src/ccpp/mod.rs:2280-2300 | codegraph-kernel/src/csharp.rs:1541-1568 | codegraph-kernel/src/go.rs:1262-1286 | codegraph-kernel/src/kotlin.rs:1584-1611 | codegraph-kernel/src/php.rs:1353-1376 | codegraph-kernel/src/python.rs:965-991 | codegraph-kernel/src/ruby.rs:964-986 | codegraph-kernel/src/rustlang.rs:1454-1478 | codegraph-kernel/src/swift.rs:1493-1515 — These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times.
D4 · Code Duplication· Members sharing a duplicated core (7 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (7 members, 50+ identical tokens) codegraph-kernel/src/ccpp/mod.rs:1977— codegraph-kernel/src/ccpp/mod.rs:1977-2019 | codegraph-kernel/src/csharp.rs:1250-1287 | codegraph-kernel/src/java.rs:990-1027 | codegraph-kernel/src/kotlin.rs:1292-1328 | codegraph-kernel/src/php.rs:1127-1170 | codegraph-kernel/src/scala.rs:974-1019 | codegraph-kernel/src/swift.rs:1177-1217 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (5 members, 50+ identical tokens) codegraph-kernel/src/csharp.rs:1527— codegraph-kernel/src/csharp.rs:1527-1539 | codegraph-kernel/src/kotlin.rs:1570-1582 | codegraph-kernel/src/php.rs:1338-1351 | codegraph-kernel/src/ruby.rs:950-962 | codegraph-kernel/src/swift.rs:1479-1491 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Duplicated block (38–41 lines × 13) codegraph-kernel/src/ccpp/mod.rs:2405— codegraph-kernel/src/ccpp/mod.rs:2405-2442 | codegraph-kernel/src/csharp.rs:1662-1699 | codegraph-kernel/src/dart.rs:2139-2176 | codegraph-kernel/src/go.rs:1401-1438 | codegraph-kernel/src/java.rs:1370-1407 | codegraph-kernel/src/kotlin.rs:1733-1773 | codegraph-kernel/src/php.rs:1437-1477 | codegraph-kernel/src/python.rs:1094-1131 | codegraph-kernel/src/ruby.rs:1095-1134 | codegraph-kernel/src/rustlang.rs:1588-1625 | codegraph-kernel/src/scala.rs:1449-1486 | codegraph-kernel/src/swift.rs:1645-1682 | codegraph-kernel/src/tsjs/mod.rs:566-603 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/csharp.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 346 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 (38 lines × 2) codegraph-kernel/src/dart.rs:402— codegraph-kernel/src/dart.rs:402-439 | codegraph-kernel/src/scala.rs:342-379 — before extracting anything, compare `codegraph-kernel/src/dart.rs` and `codegraph-kernel/src/scala.rs` as WHOLE FILES: this scan already matched 58 separate duplicated blocks between them, totalling at least 734 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (36 lines × 2) codegraph-kernel/src/csharp.rs:903— codegraph-kernel/src/csharp.rs:903-938 | codegraph-kernel/src/java.rs:755-790 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/java.rs` as WHOLE FILES: this scan already matched 62 separate duplicated blocks between them, totalling at least 770 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (27 lines × 2) codegraph-kernel/src/python.rs:1053— codegraph-kernel/src/python.rs:1053-1079 | codegraph-kernel/src/ruby.rs:1054-1080 — before extracting anything, compare `codegraph-kernel/src/python.rs` and `codegraph-kernel/src/ruby.rs` as WHOLE FILES: this scan already matched 43 separate duplicated blocks between them, totalling at least 523 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (26 lines × 5) codegraph-kernel/src/java.rs:1096— codegraph-kernel/src/java.rs:1096-1121 | codegraph-kernel/src/kotlin.rs:1389-1414 | codegraph-kernel/src/python.rs:809-834 | codegraph-kernel/src/swift.rs:1293-1318 | codegraph-kernel/src/tsjs/extractors.rs:1901-1926 — before extracting anything, compare `codegraph-kernel/src/java.rs` and `codegraph-kernel/src/kotlin.rs` as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 614 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (26 lines × 2) codegraph-kernel/src/dart.rs:1595— codegraph-kernel/src/dart.rs:1595-1620 | codegraph-kernel/src/scala.rs:1067-1092 — before extracting anything, compare `codegraph-kernel/src/dart.rs` and `codegraph-kernel/src/scala.rs` as WHOLE FILES: this scan already matched 58 separate duplicated blocks between them, totalling at least 734 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (25 lines × 2) codegraph-kernel/src/go.rs:1141— codegraph-kernel/src/go.rs:1141-1165 | codegraph-kernel/src/python.rs:897-921 — before extracting anything, compare `codegraph-kernel/src/go.rs` and `codegraph-kernel/src/python.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 431 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (22–25 lines × 2) codegraph-kernel/src/go.rs:1263— codegraph-kernel/src/go.rs:1263-1284 | codegraph-kernel/src/kotlin.rs:1585-1609 — before extracting anything, compare `codegraph-kernel/src/go.rs` and `codegraph-kernel/src/kotlin.rs` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 442 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (24 lines × 2) codegraph-kernel/src/go.rs:1363— codegraph-kernel/src/go.rs:1363-1386 | codegraph-kernel/src/rustlang.rs:1550-1573 — before extracting anything, compare `codegraph-kernel/src/go.rs` and `codegraph-kernel/src/rustlang.rs` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 618 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (20–23 lines × 2) codegraph-kernel/src/ccpp/mod.rs:2281— codegraph-kernel/src/ccpp/mod.rs:2281-2300 | codegraph-kernel/src/php.rs:1354-1376 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/php.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 341 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 (4–23 lines × 3) codegraph-kernel/src/csharp.rs:1449— codegraph-kernel/src/csharp.rs:1449-1471 | codegraph-kernel/src/kotlin.rs:1490-1493 | codegraph-kernel/src/swift.rs:1394-1414 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/kotlin.rs` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 601 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (19–22 lines × 7) codegraph-kernel/src/ccpp/mod.rs:602— codegraph-kernel/src/ccpp/mod.rs:602-622 | codegraph-kernel/src/go.rs:287-305 | codegraph-kernel/src/kotlin.rs:467-487 | codegraph-kernel/src/php.rs:375-396 | codegraph-kernel/src/ruby.rs:319-338 | codegraph-kernel/src/rustlang.rs:324-343 | codegraph-kernel/src/swift.rs:466-486 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/go.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 451 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 (22 lines × 5) codegraph-kernel/src/java.rs:1124— codegraph-kernel/src/java.rs:1124-1145 | codegraph-kernel/src/kotlin.rs:1417-1438 | codegraph-kernel/src/python.rs:837-858 | codegraph-kernel/src/swift.rs:1321-1342 | codegraph-kernel/src/tsjs/extractors.rs:1929-1950 — before extracting anything, compare `codegraph-kernel/src/java.rs` and `codegraph-kernel/src/kotlin.rs` as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 614 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (17–22 lines × 3) codegraph-kernel/src/csharp.rs:615— codegraph-kernel/src/csharp.rs:615-635 | codegraph-kernel/src/java.rs:526-542 | codegraph-kernel/src/php.rs:590-611 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/java.rs` as WHOLE FILES: this scan already matched 62 separate duplicated blocks between them, totalling at least 770 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12–22 lines × 2) codegraph-kernel/src/lua.rs:90— codegraph-kernel/src/lua.rs:90-101 | codegraph-kernel/src/tsjs/mod.rs:231-252 — before extracting anything, compare `codegraph-kernel/src/lua.rs` and `codegraph-kernel/src/tsjs/mod.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 143 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 (14–21 lines × 10) codegraph-kernel/src/ccpp/mod.rs:2356— codegraph-kernel/src/ccpp/mod.rs:2356-2371 | codegraph-kernel/src/csharp.rs:1611-1627 | codegraph-kernel/src/dart.rs:2079-2095 | codegraph-kernel/src/java.rs:1323-1336 | codegraph-kernel/src/kotlin.rs:1651-1668 | codegraph-kernel/src/python.rs:1032-1046 | codegraph-kernel/src/ruby.rs:1030-1047 | codegraph-kernel/src/scala.rs:1392-1408 | codegraph-kernel/src/swift.rs:1555-1575 | codegraph-kernel/src/tsjs/mod.rs:514-531 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/csharp.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 346 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (20–21 lines × 4) codegraph-kernel/src/dart.rs:1607— codegraph-kernel/src/dart.rs:1607-1626 | codegraph-kernel/src/python.rs:845-865 | codegraph-kernel/src/scala.rs:1079-1098 | codegraph-kernel/src/tsjs/extractors.rs:1937-1957 — before extracting anything, compare `codegraph-kernel/src/dart.rs` and `codegraph-kernel/src/python.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 369 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (18–21 lines × 2) codegraph-kernel/src/go.rs:842— codegraph-kernel/src/go.rs:842-859 | codegraph-kernel/src/rustlang.rs:912-932 — before extracting anything, compare `codegraph-kernel/src/go.rs` and `codegraph-kernel/src/rustlang.rs` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 618 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (21 lines × 2) codegraph-kernel/src/python.rs:318— codegraph-kernel/src/python.rs:318-338 | codegraph-kernel/src/ruby.rs:299-319 — before extracting anything, compare `codegraph-kernel/src/python.rs` and `codegraph-kernel/src/ruby.rs` as WHOLE FILES: this scan already matched 43 separate duplicated blocks between them, totalling at least 523 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (20 lines × 14) codegraph-kernel/src/ccpp/mod.rs:449— codegraph-kernel/src/ccpp/mod.rs:449-468 | codegraph-kernel/src/csharp.rs:185-204 | codegraph-kernel/src/dart.rs:263-282 | codegraph-kernel/src/go.rs:144-163 | codegraph-kernel/src/java.rs:184-203 | codegraph-kernel/src/kotlin.rs:246-265 | codegraph-kernel/src/lua.rs:122-141 | codegraph-kernel/src/php.rs:193-212 | codegraph-kernel/src/rlang.rs:107-126 | codegraph-kernel/src/ruby.rs:172-191 | codegraph-kernel/src/rustlang.rs:173-192 | codegraph-kernel/src/scala.rs:209-228 | codegraph-kernel/src/swift.rs:272-291 | codegraph-kernel/src/tsjs/mod.rs:280-299 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/csharp.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 346 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (18–20 lines × 2) codegraph-kernel/src/kotlin.rs:1238— codegraph-kernel/src/kotlin.rs:1238-1255 | codegraph-kernel/src/swift.rs:1114-1133 — before extracting anything, compare `codegraph-kernel/src/kotlin.rs` and `codegraph-kernel/src/swift.rs` as WHOLE FILES: this scan already matched 70 separate duplicated blocks between them, totalling at least 886 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (19 lines × 3) codegraph-kernel/src/csharp.rs:360— codegraph-kernel/src/csharp.rs:360-378 | codegraph-kernel/src/php.rs:357-375 | codegraph-kernel/src/swift.rs:448-466 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/php.rs` as WHOLE FILES: this scan already matched 64 separate duplicated blocks between them, totalling at least 732 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (19 lines × 2) codegraph-kernel/src/ccpp/mod.rs:2199— codegraph-kernel/src/ccpp/mod.rs:2199-2217 | codegraph-kernel/src/rustlang.rs:1396-1414 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/rustlang.rs` as WHOLE FILES: this scan already matched 41 separate duplicated blocks between them, totalling at least 493 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (16–18 lines × 8) codegraph-kernel/src/csharp.rs:1746— codegraph-kernel/src/csharp.rs:1746-1761 | codegraph-kernel/src/java.rs:1700-1715 | codegraph-kernel/src/kotlin.rs:1779-1794 | codegraph-kernel/src/php.rs:1515-1530 | codegraph-kernel/src/python.rs:860-875 | codegraph-kernel/src/swift.rs:1690-1705 | codegraph-kernel/src/tsjs/extractors.rs:1858-1875 | codegraph-kernel/src/tsjs/extractors.rs:1952-1967 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/java.rs` as WHOLE FILES: this scan already matched 62 separate duplicated blocks between them, totalling at least 770 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15–18 lines × 2) codegraph-kernel/src/tsjs/mod.rs:901— codegraph-kernel/src/tsjs/mod.rs:901-915 | codegraph-kernel/src/tsjs/mod.rs:954-971 — both copies are in the same file, so extract the block into 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–17 lines × 12) codegraph-kernel/src/csharp.rs:154— codegraph-kernel/src/csharp.rs:154-168 | codegraph-kernel/src/dart.rs:233-247 | codegraph-kernel/src/go.rs:114-128 | codegraph-kernel/src/java.rs:153-167 | codegraph-kernel/src/kotlin.rs:214-230 | codegraph-kernel/src/php.rs:164-178 | codegraph-kernel/src/python.rs:164-178 | codegraph-kernel/src/rlang.rs:84-98 | codegraph-kernel/src/ruby.rs:143-157 | codegraph-kernel/src/rustlang.rs:143-157 | codegraph-kernel/src/scala.rs:177-193 | codegraph-kernel/src/swift.rs:243-257 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/dart.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 429 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (17 lines × 7) codegraph-kernel/src/ccpp/mod.rs:1990— codegraph-kernel/src/ccpp/mod.rs:1990-2006 | codegraph-kernel/src/csharp.rs:1261-1277 | codegraph-kernel/src/java.rs:1001-1017 | codegraph-kernel/src/kotlin.rs:1302-1318 | codegraph-kernel/src/php.rs:1144-1160 | codegraph-kernel/src/scala.rs:992-1008 | codegraph-kernel/src/swift.rs:1188-1204 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/csharp.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 346 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (15–17 lines × 7) codegraph-kernel/src/ccpp/mod.rs:2375— codegraph-kernel/src/ccpp/mod.rs:2375-2389 | codegraph-kernel/src/csharp.rs:1631-1646 | codegraph-kernel/src/java.rs:1340-1354 | codegraph-kernel/src/kotlin.rs:1702-1718 | codegraph-kernel/src/scala.rs:1412-1426 | codegraph-kernel/src/swift.rs:1616-1630 | codegraph-kernel/src/tsjs/mod.rs:535-549 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/csharp.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 346 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 (17 lines × 4) codegraph-kernel/src/dart.rs:1986— codegraph-kernel/src/dart.rs:1986-2002 | codegraph-kernel/src/go.rs:1203-1219 | codegraph-kernel/src/lua.rs:881-897 | codegraph-kernel/src/scala.rs:1302-1318 — before extracting anything, compare `codegraph-kernel/src/dart.rs` and `codegraph-kernel/src/go.rs` as WHOLE FILES: this scan already matched 27 separate duplicated blocks between them, totalling at least 323 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (17 lines × 3) codegraph-kernel/src/ccpp/mod.rs:1341— codegraph-kernel/src/ccpp/mod.rs:1341-1357 | codegraph-kernel/src/go.rs:542-558 | codegraph-kernel/src/kotlin.rs:1012-1028 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/go.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 451 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 (17 lines × 2) codegraph-kernel/src/csharp.rs:676— codegraph-kernel/src/csharp.rs:676-692 | codegraph-kernel/src/php.rs:659-675 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/php.rs` as WHOLE FILES: this scan already matched 64 separate duplicated blocks between them, totalling at least 732 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15–16 lines × 4) codegraph-kernel/src/ccpp/mod.rs:552— codegraph-kernel/src/ccpp/mod.rs:552-566 | codegraph-kernel/src/go.rs:239-254 | codegraph-kernel/src/rustlang.rs:272-287 | codegraph-kernel/src/tsjs/mod.rs:414-429 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/go.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 451 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12–16 lines × 4) codegraph-kernel/src/ccpp/mod.rs:1796— codegraph-kernel/src/ccpp/mod.rs:1796-1808 | codegraph-kernel/src/dart.rs:1189-1200 | codegraph-kernel/src/rustlang.rs:1031-1043 | codegraph-kernel/src/tsjs/extractors.rs:1849-1864 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/dart.rs` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12–16 lines × 3) codegraph-kernel/src/csharp.rs:1192— codegraph-kernel/src/csharp.rs:1192-1207 | codegraph-kernel/src/java.rs:941-952 | codegraph-kernel/src/php.rs:1077-1088 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/java.rs` as WHOLE FILES: this scan already matched 62 separate duplicated blocks between them, totalling at least 770 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15–16 lines × 3) codegraph-kernel/src/dart.rs:327— codegraph-kernel/src/dart.rs:327-342 | codegraph-kernel/src/lua.rs:180-195 | codegraph-kernel/src/scala.rs:275-289 — before extracting anything, compare `codegraph-kernel/src/dart.rs` and `codegraph-kernel/src/lua.rs` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 279 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 13) codegraph-kernel/src/ccpp/mod.rs:2330— codegraph-kernel/src/ccpp/mod.rs:2330-2344 | codegraph-kernel/src/csharp.rs:1588-1602 | codegraph-kernel/src/dart.rs:2056-2070 | codegraph-kernel/src/go.rs:1311-1325 | codegraph-kernel/src/java.rs:1300-1314 | codegraph-kernel/src/kotlin.rs:1628-1642 | codegraph-kernel/src/lua.rs:953-967 | codegraph-kernel/src/php.rs:1399-1413 | codegraph-kernel/src/python.rs:1009-1023 | codegraph-kernel/src/ruby.rs:1007-1021 | codegraph-kernel/src/rustlang.rs:1495-1509 | codegraph-kernel/src/scala.rs:1369-1383 | codegraph-kernel/src/swift.rs:1532-1546 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/csharp.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 346 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8–15 lines × 12) codegraph-kernel/src/ccpp/mod.rs:2355— codegraph-kernel/src/ccpp/mod.rs:2355-2364 | codegraph-kernel/src/csharp.rs:1610-1620 | codegraph-kernel/src/dart.rs:2078-2088 | codegraph-kernel/src/go.rs:1333-1342 | codegraph-kernel/src/java.rs:1322-1329 | codegraph-kernel/src/kotlin.rs:1650-1661 | codegraph-kernel/src/python.rs:1031-1039 | codegraph-kernel/src/ruby.rs:1029-1040 | codegraph-kernel/src/rustlang.rs:1517-1527 | codegraph-kernel/src/scala.rs:1391-1401 | codegraph-kernel/src/swift.rs:1554-1568 | codegraph-kernel/src/tsjs/mod.rs:513-524 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/csharp.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 346 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (13–15 lines × 12) codegraph-kernel/src/ccpp/mod.rs:2391— codegraph-kernel/src/ccpp/mod.rs:2391-2403 | codegraph-kernel/src/csharp.rs:1648-1661 | codegraph-kernel/src/dart.rs:2118-2130 | codegraph-kernel/src/go.rs:1388-1400 | codegraph-kernel/src/java.rs:1356-1369 | codegraph-kernel/src/kotlin.rs:1720-1732 | codegraph-kernel/src/python.rs:1081-1093 | codegraph-kernel/src/ruby.rs:1082-1094 | codegraph-kernel/src/rustlang.rs:1575-1587 | codegraph-kernel/src/scala.rs:1428-1440 | codegraph-kernel/src/swift.rs:1632-1644 | codegraph-kernel/src/tsjs/mod.rs:551-565 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/csharp.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 346 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11–15 lines × 9) codegraph-kernel/src/csharp.rs:1573— codegraph-kernel/src/csharp.rs:1573-1586 | codegraph-kernel/src/dart.rs:2044-2054 | codegraph-kernel/src/java.rs:1286-1296 | codegraph-kernel/src/kotlin.rs:1616-1626 | codegraph-kernel/src/lua.rs:939-951 | codegraph-kernel/src/ruby.rs:991-1005 | codegraph-kernel/src/rustlang.rs:1483-1493 | codegraph-kernel/src/scala.rs:1357-1367 | codegraph-kernel/src/swift.rs:1520-1530 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/dart.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 429 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13–15 lines × 5) codegraph-kernel/src/ccpp/mod.rs:513— codegraph-kernel/src/ccpp/mod.rs:513-525 | codegraph-kernel/src/go.rs:208-220 | codegraph-kernel/src/python.rs:258-270 | codegraph-kernel/src/rustlang.rs:238-250 | codegraph-kernel/src/tsjs/mod.rs:353-367 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/go.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 451 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11–15 lines × 5) codegraph-kernel/src/csharp.rs:1438— codegraph-kernel/src/csharp.rs:1438-1448 | codegraph-kernel/src/dart.rs:1935-1949 | codegraph-kernel/src/kotlin.rs:1479-1489 | codegraph-kernel/src/scala.rs:1254-1268 | codegraph-kernel/src/swift.rs:1383-1393 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/dart.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 429 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13–15 lines × 3) codegraph-kernel/src/go.rs:898— codegraph-kernel/src/go.rs:898-911 | codegraph-kernel/src/python.rs:769-781 | codegraph-kernel/src/rustlang.rs:1007-1021 — before extracting anything, compare `codegraph-kernel/src/go.rs` and `codegraph-kernel/src/python.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 431 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 3) codegraph-kernel/src/rlang.rs:193— codegraph-kernel/src/rlang.rs:193-207 | codegraph-kernel/src/ruby.rs:272-286 | codegraph-kernel/src/scala.rs:310-324 — before extracting anything, compare `codegraph-kernel/src/rlang.rs` and `codegraph-kernel/src/ruby.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 134 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14–15 lines × 2) codegraph-kernel/src/dart.rs:1020— codegraph-kernel/src/dart.rs:1020-1033 | codegraph-kernel/src/scala.rs:800-814 — before extracting anything, compare `codegraph-kernel/src/dart.rs` and `codegraph-kernel/src/scala.rs` as WHOLE FILES: this scan already matched 58 separate duplicated blocks between them, totalling at least 734 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13–15 lines × 2) codegraph-kernel/src/kotlin.rs:907— codegraph-kernel/src/kotlin.rs:907-921 | codegraph-kernel/src/swift.rs:811-823 — before extracting anything, compare `codegraph-kernel/src/kotlin.rs` and `codegraph-kernel/src/swift.rs` as WHOLE FILES: this scan already matched 70 separate duplicated blocks between them, totalling at least 886 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 8) codegraph-kernel/src/ccpp/mod.rs:198— codegraph-kernel/src/ccpp/mod.rs:198-211 | codegraph-kernel/src/go.rs:1450-1463 | codegraph-kernel/src/kotlin.rs:51-64 | codegraph-kernel/src/python.rs:1174-1187 | codegraph-kernel/src/rustlang.rs:1742-1755 | codegraph-kernel/src/scala.rs:55-68 | codegraph-kernel/src/swift.rs:69-82 | codegraph-kernel/src/tsjs/mod.rs:104-117 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/go.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 451 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9–14 lines × 6) codegraph-kernel/src/csharp.rs:1189— codegraph-kernel/src/csharp.rs:1189-1197 | codegraph-kernel/src/go.rs:916-924 | codegraph-kernel/src/java.rs:938-946 | codegraph-kernel/src/php.rs:1069-1082 | codegraph-kernel/src/rustlang.rs:1028-1036 | codegraph-kernel/src/tsjs/extractors.rs:1846-1854 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/go.rs` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 385 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 3) codegraph-kernel/src/dart.rs:414— codegraph-kernel/src/dart.rs:414-427 | codegraph-kernel/src/lua.rs:259-272 | codegraph-kernel/src/scala.rs:354-367 — before extracting anything, compare `codegraph-kernel/src/dart.rs` and `codegraph-kernel/src/lua.rs` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 279 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12–14 lines × 2) codegraph-kernel/src/kotlin.rs:1223— codegraph-kernel/src/kotlin.rs:1223-1234 | codegraph-kernel/src/swift.rs:1096-1109 — before extracting anything, compare `codegraph-kernel/src/kotlin.rs` and `codegraph-kernel/src/swift.rs` as WHOLE FILES: this scan already matched 70 separate duplicated blocks between them, totalling at least 886 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12–13 lines × 11) codegraph-kernel/src/csharp.rs:326— codegraph-kernel/src/csharp.rs:326-337 | codegraph-kernel/src/dart.rs:359-370 | codegraph-kernel/src/java.rs:314-325 | codegraph-kernel/src/kotlin.rs:406-418 | codegraph-kernel/src/lua.rs:216-228 | codegraph-kernel/src/php.rs:326-337 | codegraph-kernel/src/python.rs:287-298 | codegraph-kernel/src/rlang.rs:191-202 | codegraph-kernel/src/ruby.rs:270-281 | codegraph-kernel/src/scala.rs:308-319 | codegraph-kernel/src/swift.rs:411-422 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/dart.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 429 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 11) codegraph-kernel/src/csharp.rs:396— codegraph-kernel/src/csharp.rs:396-408 | codegraph-kernel/src/dart.rs:433-445 | codegraph-kernel/src/go.rs:300-312 | codegraph-kernel/src/java.rs:386-398 | codegraph-kernel/src/kotlin.rs:482-494 | codegraph-kernel/src/php.rs:391-403 | codegraph-kernel/src/python.rs:354-366 | codegraph-kernel/src/ruby.rs:333-345 | codegraph-kernel/src/scala.rs:373-385 | codegraph-kernel/src/swift.rs:481-493 | codegraph-kernel/src/tsjs/mod.rs:489-501 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/dart.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 429 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12–13 lines × 9) codegraph-kernel/src/ccpp/mod.rs:595— codegraph-kernel/src/ccpp/mod.rs:595-606 | codegraph-kernel/src/csharp.rs:370-382 | codegraph-kernel/src/go.rs:280-291 | codegraph-kernel/src/java.rs:361-372 | codegraph-kernel/src/php.rs:367-379 | codegraph-kernel/src/python.rs:330-342 | codegraph-kernel/src/ruby.rs:311-323 | codegraph-kernel/src/rustlang.rs:317-328 | codegraph-kernel/src/swift.rs:458-470 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/csharp.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 346 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12–13 lines × 8) codegraph-kernel/src/csharp.rs:163— codegraph-kernel/src/csharp.rs:163-174 | codegraph-kernel/src/dart.rs:242-253 | codegraph-kernel/src/php.rs:173-184 | codegraph-kernel/src/python.rs:173-184 | codegraph-kernel/src/ruby.rs:152-163 | codegraph-kernel/src/scala.rs:188-199 | codegraph-kernel/src/swift.rs:252-263 | codegraph-kernel/src/tsjs/mod.rs:254-266 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/dart.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 429 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11–13 lines × 7) codegraph-kernel/src/csharp.rs:1115— codegraph-kernel/src/csharp.rs:1115-1127 | codegraph-kernel/src/java.rs:854-864 | codegraph-kernel/src/kotlin.rs:1165-1175 | codegraph-kernel/src/php.rs:904-914 | codegraph-kernel/src/php.rs:981-991 | codegraph-kernel/src/python.rs:619-629 | codegraph-kernel/src/swift.rs:1052-1062 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/java.rs` as WHOLE FILES: this scan already matched 62 separate duplicated blocks between them, totalling at least 770 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 6) codegraph-kernel/src/csharp.rs:291— codegraph-kernel/src/csharp.rs:291-303 | codegraph-kernel/src/java.rs:279-291 | codegraph-kernel/src/kotlin.rs:338-350 | codegraph-kernel/src/php.rs:291-303 | codegraph-kernel/src/ruby.rs:235-247 | codegraph-kernel/src/swift.rs:376-388 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/java.rs` as WHOLE FILES: this scan already matched 62 separate duplicated blocks between them, totalling at least 770 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 5) codegraph-kernel/src/csharp.rs:358— codegraph-kernel/src/csharp.rs:358-370 | codegraph-kernel/src/dart.rs:400-412 | codegraph-kernel/src/go.rs:266-278 | codegraph-kernel/src/php.rs:355-367 | codegraph-kernel/src/swift.rs:446-458 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/dart.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 429 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11–13 lines × 4) codegraph-kernel/src/ccpp/mod.rs:2206— codegraph-kernel/src/ccpp/mod.rs:2206-2216 | codegraph-kernel/src/go.rs:1173-1185 | codegraph-kernel/src/ruby.rs:876-886 | codegraph-kernel/src/rustlang.rs:1403-1413 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/go.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 451 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 4) codegraph-kernel/src/go.rs:1117— codegraph-kernel/src/go.rs:1117-1129 | codegraph-kernel/src/java.rs:1171-1183 | codegraph-kernel/src/rustlang.rs:1216-1228 | codegraph-kernel/src/swift.rs:1263-1275 — before extracting anything, compare `codegraph-kernel/src/go.rs` and `codegraph-kernel/src/java.rs` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 364 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7–12 lines × 8) codegraph-kernel/src/ccpp/mod.rs:1801— codegraph-kernel/src/ccpp/mod.rs:1801-1808 | codegraph-kernel/src/dart.rs:1194-1200 | codegraph-kernel/src/dart.rs:1620-1626 | codegraph-kernel/src/python.rs:858-866 | codegraph-kernel/src/rustlang.rs:1036-1043 | codegraph-kernel/src/scala.rs:1092-1098 | codegraph-kernel/src/tsjs/extractors.rs:1854-1865 | codegraph-kernel/src/tsjs/extractors.rs:1950-1958 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/dart.rs` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 6) codegraph-kernel/src/csharp.rs:359— codegraph-kernel/src/csharp.rs:359-370 | codegraph-kernel/src/dart.rs:401-412 | codegraph-kernel/src/go.rs:267-278 | codegraph-kernel/src/php.rs:356-367 | codegraph-kernel/src/scala.rs:341-352 | codegraph-kernel/src/swift.rs:447-458 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/dart.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 429 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 5) codegraph-kernel/src/csharp.rs:1557— codegraph-kernel/src/csharp.rs:1557-1568 | codegraph-kernel/src/go.rs:1275-1286 | codegraph-kernel/src/kotlin.rs:1600-1611 | codegraph-kernel/src/python.rs:980-991 | codegraph-kernel/src/rustlang.rs:1467-1478 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/go.rs` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 385 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11–12 lines × 4) codegraph-kernel/src/ccpp/mod.rs:2183— codegraph-kernel/src/ccpp/mod.rs:2183-2193 | codegraph-kernel/src/csharp.rs:1429-1439 | codegraph-kernel/src/rustlang.rs:1380-1390 | codegraph-kernel/src/tsjs/fnref.rs:57-68 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/csharp.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 346 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10–12 lines × 3) codegraph-kernel/src/ccpp/mod.rs:1328— codegraph-kernel/src/ccpp/mod.rs:1328-1339 | codegraph-kernel/src/go.rs:531-540 | codegraph-kernel/src/kotlin.rs:999-1010 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/go.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 451 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9–12 lines × 3) codegraph-kernel/src/csharp.rs:204— codegraph-kernel/src/csharp.rs:204-214 | codegraph-kernel/src/java.rs:208-216 | codegraph-kernel/src/php.rs:212-223 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/java.rs` as WHOLE FILES: this scan already matched 62 separate duplicated blocks between them, totalling at least 770 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 3) codegraph-kernel/src/dart.rs:2028— codegraph-kernel/src/dart.rs:2028-2039 | codegraph-kernel/src/lua.rs:923-934 | codegraph-kernel/src/scala.rs:1341-1352 — before extracting anything, compare `codegraph-kernel/src/dart.rs` and `codegraph-kernel/src/lua.rs` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 279 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9–12 lines × 2) codegraph-kernel/src/dart.rs:1471— codegraph-kernel/src/dart.rs:1471-1482 | codegraph-kernel/src/dart.rs:1826-1834 — both copies are in the same file, so extract the block into 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–12 lines × 2) codegraph-kernel/src/kotlin.rs:1213— codegraph-kernel/src/kotlin.rs:1213-1222 | codegraph-kernel/src/swift.rs:1084-1095 — before extracting anything, compare `codegraph-kernel/src/kotlin.rs` and `codegraph-kernel/src/swift.rs` as WHOLE FILES: this scan already matched 70 separate duplicated blocks between them, totalling at least 886 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11–12 lines × 2) codegraph-kernel/src/swift.rs:425— codegraph-kernel/src/swift.rs:425-435 | codegraph-kernel/src/tsjs/mod.rs:426-437 — before extracting anything, compare `codegraph-kernel/src/swift.rs` and `codegraph-kernel/src/tsjs/mod.rs` as WHOLE FILES: this scan already matched 32 separate duplicated blocks between them, totalling at least 374 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 (4–11 lines × 15) codegraph-kernel/src/ccpp/mod.rs:442— codegraph-kernel/src/ccpp/mod.rs:442-445 | codegraph-kernel/src/csharp.rs:170-180 | codegraph-kernel/src/dart.rs:249-258 | codegraph-kernel/src/go.rs:131-139 | codegraph-kernel/src/java.rs:170-179 | codegraph-kernel/src/kotlin.rs:233-241 | codegraph-kernel/src/lua.rs:114-118 | codegraph-kernel/src/php.rs:180-188 | codegraph-kernel/src/python.rs:180-188 | codegraph-kernel/src/rlang.rs:99-103 | codegraph-kernel/src/ruby.rs:159-167 | codegraph-kernel/src/rustlang.rs:160-168 | codegraph-kernel/src/scala.rs:195-204 | codegraph-kernel/src/swift.rs:259-267 | codegraph-kernel/src/tsjs/mod.rs:271-276 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/csharp.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 346 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6–11 lines × 11) codegraph-kernel/src/csharp.rs:1571— codegraph-kernel/src/csharp.rs:1571-1580 | codegraph-kernel/src/dart.rs:2042-2048 | codegraph-kernel/src/java.rs:1284-1290 | codegraph-kernel/src/kotlin.rs:1614-1620 | codegraph-kernel/src/lua.rs:937-945 | codegraph-kernel/src/php.rs:1379-1384 | codegraph-kernel/src/python.rs:994-1000 | codegraph-kernel/src/ruby.rs:989-999 | codegraph-kernel/src/rustlang.rs:1481-1487 | codegraph-kernel/src/scala.rs:1355-1361 | codegraph-kernel/src/swift.rs:1518-1524 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/dart.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 429 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 14) codegraph-kernel/src/csharp.rs:154— codegraph-kernel/src/csharp.rs:154-163 | codegraph-kernel/src/dart.rs:233-242 | codegraph-kernel/src/go.rs:114-123 | codegraph-kernel/src/java.rs:153-162 | codegraph-kernel/src/kotlin.rs:214-225 | codegraph-kernel/src/lua.rs:94-103 | codegraph-kernel/src/php.rs:164-173 | codegraph-kernel/src/python.rs:164-173 | codegraph-kernel/src/rlang.rs:84-93 | codegraph-kernel/src/ruby.rs:143-152 | codegraph-kernel/src/rustlang.rs:143-152 | codegraph-kernel/src/scala.rs:177-188 | codegraph-kernel/src/swift.rs:243-252 | codegraph-kernel/src/tsjs/mod.rs:235-254 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/dart.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 429 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8–10 lines × 11) codegraph-kernel/src/ccpp/mod.rs:519— codegraph-kernel/src/ccpp/mod.rs:519-526 | codegraph-kernel/src/csharp.rs:297-304 | codegraph-kernel/src/go.rs:214-221 | codegraph-kernel/src/java.rs:285-292 | codegraph-kernel/src/kotlin.rs:344-351 | codegraph-kernel/src/php.rs:297-304 | codegraph-kernel/src/python.rs:264-271 | codegraph-kernel/src/ruby.rs:241-248 | codegraph-kernel/src/rustlang.rs:244-251 | codegraph-kernel/src/swift.rs:382-389 | codegraph-kernel/src/tsjs/mod.rs:359-368 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/csharp.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 346 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 8) codegraph-kernel/src/ccpp/mod.rs:611— codegraph-kernel/src/ccpp/mod.rs:611-622 | codegraph-kernel/src/go.rs:296-305 | codegraph-kernel/src/kotlin.rs:476-487 | codegraph-kernel/src/php.rs:384-396 | codegraph-kernel/src/python.rs:349-359 | codegraph-kernel/src/ruby.rs:328-338 | codegraph-kernel/src/rustlang.rs:333-343 | codegraph-kernel/src/swift.rs:475-486 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/go.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 451 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 6) codegraph-kernel/src/ccpp/mod.rs:1707— codegraph-kernel/src/ccpp/mod.rs:1707-1716 | codegraph-kernel/src/go.rs:838-847 | codegraph-kernel/src/kotlin.rs:1230-1239 | codegraph-kernel/src/python.rs:713-722 | codegraph-kernel/src/rustlang.rs:908-917 | codegraph-kernel/src/scala.rs:894-903 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/go.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 451 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8–10 lines × 5) codegraph-kernel/src/csharp.rs:779— codegraph-kernel/src/csharp.rs:779-788 | codegraph-kernel/src/kotlin.rs:1087-1094 | codegraph-kernel/src/php.rs:769-778 | codegraph-kernel/src/rustlang.rs:682-689 | codegraph-kernel/src/swift.rs:953-962 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/kotlin.rs` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 601 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9–10 lines × 4) codegraph-kernel/src/csharp.rs:1426— codegraph-kernel/src/csharp.rs:1426-1434 | codegraph-kernel/src/rustlang.rs:1377-1385 | codegraph-kernel/src/swift.rs:1371-1379 | codegraph-kernel/src/tsjs/fnref.rs:53-62 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/rustlang.rs` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 499 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9–10 lines × 3) codegraph-kernel/src/python.rs:302— codegraph-kernel/src/python.rs:302-310 | codegraph-kernel/src/swift.rs:429-437 | codegraph-kernel/src/tsjs/mod.rs:430-439 — before extracting anything, compare `codegraph-kernel/src/python.rs` and `codegraph-kernel/src/swift.rs` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 572 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 12) codegraph-kernel/src/ccpp/mod.rs:2382— codegraph-kernel/src/ccpp/mod.rs:2382-2390 | codegraph-kernel/src/csharp.rs:1639-1647 | codegraph-kernel/src/dart.rs:2109-2117 | codegraph-kernel/src/go.rs:1379-1387 | codegraph-kernel/src/java.rs:1347-1355 | codegraph-kernel/src/kotlin.rs:1711-1719 | codegraph-kernel/src/python.rs:1072-1080 | codegraph-kernel/src/ruby.rs:1073-1081 | codegraph-kernel/src/rustlang.rs:1566-1574 | codegraph-kernel/src/scala.rs:1419-1427 | codegraph-kernel/src/swift.rs:1623-1631 | codegraph-kernel/src/tsjs/mod.rs:542-550 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/csharp.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 346 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 11) codegraph-kernel/src/ccpp/mod.rs:696— codegraph-kernel/src/ccpp/mod.rs:696-704 | codegraph-kernel/src/csharp.rs:503-511 | codegraph-kernel/src/go.rs:323-331 | codegraph-kernel/src/java.rs:482-490 | codegraph-kernel/src/kotlin.rs:512-520 | codegraph-kernel/src/php.rs:414-422 | codegraph-kernel/src/python.rs:377-385 | codegraph-kernel/src/ruby.rs:356-364 | codegraph-kernel/src/rustlang.rs:362-370 | codegraph-kernel/src/swift.rs:521-529 | codegraph-kernel/src/tsjs/mod.rs:1012-1020 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/csharp.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 346 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 9) codegraph-kernel/src/csharp.rs:164— codegraph-kernel/src/csharp.rs:164-172 | codegraph-kernel/src/dart.rs:243-251 | codegraph-kernel/src/lua.rs:105-113 | codegraph-kernel/src/php.rs:174-182 | codegraph-kernel/src/python.rs:174-182 | codegraph-kernel/src/ruby.rs:153-161 | codegraph-kernel/src/scala.rs:189-197 | codegraph-kernel/src/swift.rs:253-261 | codegraph-kernel/src/tsjs/mod.rs:256-264 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/dart.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 429 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6–9 lines × 8) codegraph-kernel/src/ccpp/mod.rs:1706— codegraph-kernel/src/ccpp/mod.rs:1706-1711 | codegraph-kernel/src/go.rs:837-842 | codegraph-kernel/src/kotlin.rs:1229-1234 | codegraph-kernel/src/python.rs:712-717 | codegraph-kernel/src/rustlang.rs:907-912 | codegraph-kernel/src/scala.rs:893-898 | codegraph-kernel/src/swift.rs:1102-1110 | codegraph-kernel/src/tsjs/extractors.rs:1624-1630 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/go.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 451 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 8) codegraph-kernel/src/csharp.rs:353— codegraph-kernel/src/csharp.rs:353-361 | codegraph-kernel/src/java.rs:342-350 | codegraph-kernel/src/kotlin.rs:441-449 | codegraph-kernel/src/php.rs:350-358 | codegraph-kernel/src/ruby.rs:294-302 | codegraph-kernel/src/rustlang.rs:298-306 | codegraph-kernel/src/swift.rs:441-449 | codegraph-kernel/src/tsjs/mod.rs:442-450 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/java.rs` as WHOLE FILES: this scan already matched 62 separate duplicated blocks between them, totalling at least 770 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8–9 lines × 5) codegraph-kernel/src/csharp.rs:777— codegraph-kernel/src/csharp.rs:777-784 | codegraph-kernel/src/php.rs:767-774 | codegraph-kernel/src/rustlang.rs:680-687 | codegraph-kernel/src/swift.rs:929-937 | codegraph-kernel/src/swift.rs:951-958 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/php.rs` as WHOLE FILES: this scan already matched 64 separate duplicated blocks between them, totalling at least 732 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8–9 lines × 4) codegraph-kernel/src/ccpp/mod.rs:421— codegraph-kernel/src/ccpp/mod.rs:421-429 | codegraph-kernel/src/go.rs:123-130 | codegraph-kernel/src/java.rs:162-169 | codegraph-kernel/src/rustlang.rs:152-159 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/go.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 451 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 (3–9 lines × 6) codegraph-kernel/src/go.rs:168— codegraph-kernel/src/go.rs:168-170 | codegraph-kernel/src/python.rs:211-218 | codegraph-kernel/src/ruby.rs:188-195 | codegraph-kernel/src/rustlang.rs:197-199 | codegraph-kernel/src/swift.rs:288-296 | codegraph-kernel/src/tsjs/mod.rs:296-303 — before extracting anything, compare `codegraph-kernel/src/go.rs` and `codegraph-kernel/src/python.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 431 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 3) codegraph-kernel/src/dart.rs:1203— codegraph-kernel/src/dart.rs:1203-1211 | codegraph-kernel/src/dart.rs:1629-1637 | codegraph-kernel/src/scala.rs:1101-1109 — before extracting anything, compare `codegraph-kernel/src/dart.rs` and `codegraph-kernel/src/scala.rs` as WHOLE FILES: this scan already matched 58 separate duplicated blocks between them, totalling at least 734 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 7) codegraph-kernel/src/dart.rs:277— codegraph-kernel/src/dart.rs:277-284 | codegraph-kernel/src/lua.rs:136-143 | codegraph-kernel/src/python.rs:209-216 | codegraph-kernel/src/ruby.rs:186-193 | codegraph-kernel/src/scala.rs:223-230 | codegraph-kernel/src/swift.rs:286-293 | codegraph-kernel/src/tsjs/mod.rs:294-301 — before extracting anything, compare `codegraph-kernel/src/dart.rs` and `codegraph-kernel/src/lua.rs` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 279 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (2–8 lines × 8) codegraph-kernel/src/ccpp/mod.rs:575— codegraph-kernel/src/ccpp/mod.rs:575-582 | codegraph-kernel/src/csharp.rs:352-359 | codegraph-kernel/src/go.rs:259-260 | codegraph-kernel/src/java.rs:336-337 | codegraph-kernel/src/kotlin.rs:440-447 | codegraph-kernel/src/php.rs:349-356 | codegraph-kernel/src/rustlang.rs:297-304 | codegraph-kernel/src/swift.rs:440-447 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/csharp.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 346 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 4) codegraph-kernel/src/ccpp/mod.rs:2192— codegraph-kernel/src/ccpp/mod.rs:2192-2199 | codegraph-kernel/src/go.rs:1159-1166 | codegraph-kernel/src/python.rs:915-922 | codegraph-kernel/src/rustlang.rs:1389-1396 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/go.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 451 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–8 lines × 3) codegraph-kernel/src/java.rs:597— codegraph-kernel/src/java.rs:597-603 | codegraph-kernel/src/kotlin.rs:1045-1051 | codegraph-kernel/src/swift.rs:911-918 — before extracting anything, compare `codegraph-kernel/src/java.rs` and `codegraph-kernel/src/kotlin.rs` as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 614 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 11) codegraph-kernel/src/csharp.rs:169— codegraph-kernel/src/csharp.rs:169-175 | codegraph-kernel/src/dart.rs:248-254 | codegraph-kernel/src/go.rs:130-136 | codegraph-kernel/src/java.rs:169-175 | codegraph-kernel/src/php.rs:179-185 | codegraph-kernel/src/python.rs:179-185 | codegraph-kernel/src/ruby.rs:158-164 | codegraph-kernel/src/rustlang.rs:159-165 | codegraph-kernel/src/scala.rs:194-200 | codegraph-kernel/src/swift.rs:258-264 | codegraph-kernel/src/tsjs/mod.rs:261-267 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/dart.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 429 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 10) codegraph-kernel/src/csharp.rs:1580— codegraph-kernel/src/csharp.rs:1580-1586 | codegraph-kernel/src/dart.rs:2048-2054 | codegraph-kernel/src/java.rs:1290-1296 | codegraph-kernel/src/kotlin.rs:1620-1626 | codegraph-kernel/src/lua.rs:945-951 | codegraph-kernel/src/ruby.rs:999-1005 | codegraph-kernel/src/rustlang.rs:1487-1493 | codegraph-kernel/src/scala.rs:1361-1367 | codegraph-kernel/src/swift.rs:1524-1530 | codegraph-kernel/src/tsjs/mod.rs:652-658 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/dart.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 429 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 7) codegraph-kernel/src/ccpp/mod.rs:2198— codegraph-kernel/src/ccpp/mod.rs:2198-2204 | codegraph-kernel/src/dart.rs:1949-1955 | codegraph-kernel/src/go.rs:1165-1171 | codegraph-kernel/src/lua.rs:853-859 | codegraph-kernel/src/python.rs:921-927 | codegraph-kernel/src/rustlang.rs:1395-1401 | codegraph-kernel/src/scala.rs:1268-1274 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/dart.rs` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 265 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 × 6) codegraph-kernel/src/go.rs:1107— codegraph-kernel/src/go.rs:1107-1113 | codegraph-kernel/src/java.rs:1161-1167 | codegraph-kernel/src/rustlang.rs:1206-1212 | codegraph-kernel/src/swift.rs:1253-1259 | codegraph-kernel/src/tsjs/extractors.rs:2056-2062 | codegraph-kernel/src/tsjs/extractors.rs:2068-2074 — before extracting anything, compare `codegraph-kernel/src/go.rs` and `codegraph-kernel/src/java.rs` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 364 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 3) codegraph-kernel/src/java.rs:226— codegraph-kernel/src/java.rs:226-232 | codegraph-kernel/src/kotlin.rs:285-291 | codegraph-kernel/src/php.rs:237-243 — before extracting anything, compare `codegraph-kernel/src/java.rs` and `codegraph-kernel/src/kotlin.rs` as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 614 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 14) codegraph-kernel/src/ccpp/mod.rs:525— codegraph-kernel/src/ccpp/mod.rs:525-530 | codegraph-kernel/src/csharp.rs:303-308 | codegraph-kernel/src/dart.rs:341-346 | codegraph-kernel/src/go.rs:220-225 | codegraph-kernel/src/java.rs:291-296 | codegraph-kernel/src/kotlin.rs:350-355 | codegraph-kernel/src/lua.rs:194-199 | codegraph-kernel/src/php.rs:303-308 | codegraph-kernel/src/python.rs:270-275 | codegraph-kernel/src/ruby.rs:247-252 | codegraph-kernel/src/rustlang.rs:250-258 | codegraph-kernel/src/scala.rs:288-293 | codegraph-kernel/src/swift.rs:388-393 | codegraph-kernel/src/tsjs/mod.rs:367-372 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/csharp.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 346 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 13) codegraph-kernel/src/ccpp/mod.rs:624— codegraph-kernel/src/ccpp/mod.rs:624-629 | codegraph-kernel/src/csharp.rs:403-408 | codegraph-kernel/src/dart.rs:440-445 | codegraph-kernel/src/go.rs:307-312 | codegraph-kernel/src/java.rs:393-398 | codegraph-kernel/src/kotlin.rs:489-494 | codegraph-kernel/src/php.rs:398-403 | codegraph-kernel/src/python.rs:361-366 | codegraph-kernel/src/ruby.rs:340-345 | codegraph-kernel/src/rustlang.rs:345-350 | codegraph-kernel/src/scala.rs:380-385 | codegraph-kernel/src/swift.rs:488-493 | codegraph-kernel/src/tsjs/mod.rs:496-501 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/csharp.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 346 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 4) codegraph-kernel/src/java.rs:930— codegraph-kernel/src/java.rs:930-935 | codegraph-kernel/src/kotlin.rs:1282-1287 | codegraph-kernel/src/php.rs:1061-1066 | codegraph-kernel/src/swift.rs:1168-1173 — before extracting anything, compare `codegraph-kernel/src/java.rs` and `codegraph-kernel/src/kotlin.rs` as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 614 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 3) codegraph-kernel/src/csharp.rs:1214— codegraph-kernel/src/csharp.rs:1214-1220 | codegraph-kernel/src/java.rs:956-961 | codegraph-kernel/src/php.rs:1094-1100 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/java.rs` as WHOLE FILES: this scan already matched 62 separate duplicated blocks between them, totalling at least 770 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 13) codegraph-kernel/src/ccpp/mod.rs:2330— codegraph-kernel/src/ccpp/mod.rs:2330-2334 | codegraph-kernel/src/csharp.rs:1588-1592 | codegraph-kernel/src/dart.rs:2056-2060 | codegraph-kernel/src/java.rs:1300-1304 | codegraph-kernel/src/kotlin.rs:1628-1632 | codegraph-kernel/src/lua.rs:953-957 | codegraph-kernel/src/php.rs:1399-1403 | codegraph-kernel/src/python.rs:1009-1013 | codegraph-kernel/src/ruby.rs:1007-1011 | codegraph-kernel/src/rustlang.rs:1495-1499 | codegraph-kernel/src/scala.rs:1369-1373 | codegraph-kernel/src/swift.rs:1532-1536 | codegraph-kernel/src/tsjs/mod.rs:663-667 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/csharp.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 346 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 (5 lines × 8) codegraph-kernel/src/csharp.rs:37— codegraph-kernel/src/csharp.rs:37-41 | codegraph-kernel/src/dart.rs:71-75 | codegraph-kernel/src/go.rs:1467-1471 | codegraph-kernel/src/java.rs:44-48 | codegraph-kernel/src/rustlang.rs:1760-1764 | codegraph-kernel/src/scala.rs:72-76 | codegraph-kernel/src/swift.rs:42-46 | codegraph-kernel/src/tsjs/mod.rs:121-125 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/dart.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 429 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 6) codegraph-kernel/src/csharp.rs:783— codegraph-kernel/src/csharp.rs:783-789 | codegraph-kernel/src/java.rs:700-704 | codegraph-kernel/src/kotlin.rs:1091-1095 | codegraph-kernel/src/php.rs:773-779 | codegraph-kernel/src/rustlang.rs:686-691 | codegraph-kernel/src/swift.rs:957-963 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/java.rs` as WHOLE FILES: this scan already matched 62 separate duplicated blocks between them, totalling at least 770 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (2–5 lines × 12) codegraph-kernel/src/ccpp/mod.rs:573— codegraph-kernel/src/ccpp/mod.rs:573-574 | codegraph-kernel/src/csharp.rs:350-351 | codegraph-kernel/src/dart.rs:385-386 | codegraph-kernel/src/go.rs:258-259 | codegraph-kernel/src/java.rs:335-336 | codegraph-kernel/src/kotlin.rs:434-438 | codegraph-kernel/src/lua.rs:229-234 | codegraph-kernel/src/php.rs:347-348 | codegraph-kernel/src/ruby.rs:282-287 | codegraph-kernel/src/rustlang.rs:294-295 | codegraph-kernel/src/scala.rs:320-325 | codegraph-kernel/src/swift.rs:438-439 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/csharp.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 346 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 × 13) codegraph-kernel/src/ccpp/mod.rs:187— codegraph-kernel/src/ccpp/mod.rs:187-193 | codegraph-kernel/src/csharp.rs:52-58 | codegraph-kernel/src/dart.rs:61-67 | codegraph-kernel/src/go.rs:1441-1447 | codegraph-kernel/src/kotlin.rs:41-47 | codegraph-kernel/src/lua.rs:38-44 | codegraph-kernel/src/php.rs:36-42 | codegraph-kernel/src/python.rs:1135-1141 | codegraph-kernel/src/ruby.rs:34-40 | codegraph-kernel/src/rustlang.rs:1628-1634 | codegraph-kernel/src/scala.rs:45-51 | codegraph-kernel/src/swift.rs:57-63 | codegraph-kernel/src/tsjs/fnref.rs:26-32 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/csharp.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 346 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 9) codegraph-kernel/src/csharp.rs:283— codegraph-kernel/src/csharp.rs:283-288 | codegraph-kernel/src/dart.rs:318-323 | codegraph-kernel/src/go.rs:200-205 | codegraph-kernel/src/php.rs:283-288 | codegraph-kernel/src/python.rs:250-255 | codegraph-kernel/src/ruby.rs:227-232 | codegraph-kernel/src/scala.rs:266-271 | codegraph-kernel/src/swift.rs:368-373 | codegraph-kernel/src/tsjs/mod.rs:345-350 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/dart.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 429 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 4) codegraph-kernel/src/ccpp/mod.rs:2281— codegraph-kernel/src/ccpp/mod.rs:2281-2295 | codegraph-kernel/src/php.rs:1354-1371 | codegraph-kernel/src/ruby.rs:965-981 | codegraph-kernel/src/swift.rs:1494-1510 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/php.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 341 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 4) codegraph-kernel/src/kotlin.rs:823— codegraph-kernel/src/kotlin.rs:823-834 | codegraph-kernel/src/python.rs:417-429 | codegraph-kernel/src/ruby.rs:475-488 | codegraph-kernel/src/swift.rs:637-648 — before extracting anything, compare `codegraph-kernel/src/kotlin.rs` and `codegraph-kernel/src/python.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 466 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 3) codegraph-kernel/src/kotlin.rs:1506— codegraph-kernel/src/kotlin.rs:1506-1518 | codegraph-kernel/src/php.rs:1266-1276 | codegraph-kernel/src/ruby.rs:899-909 — before extracting anything, compare `codegraph-kernel/src/kotlin.rs` and `codegraph-kernel/src/php.rs` as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 486 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 4) codegraph-kernel/src/ccpp/mod.rs:1437— codegraph-kernel/src/ccpp/mod.rs:1437-1445 | codegraph-kernel/src/csharp.rs:791-799 | codegraph-kernel/src/php.rs:781-789 | codegraph-kernel/src/swift.rs:965-973 — before extracting anything, compare `codegraph-kernel/src/ccpp/mod.rs` and `codegraph-kernel/src/csharp.rs` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 346 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 10) codegraph-kernel/src/csharp.rs:1581— codegraph-kernel/src/csharp.rs:1581-1586 | codegraph-kernel/src/dart.rs:2049-2054 | codegraph-kernel/src/java.rs:1291-1296 | codegraph-kernel/src/kotlin.rs:1621-1626 | codegraph-kernel/src/lua.rs:946-951 | codegraph-kernel/src/python.rs:1002-1007 | codegraph-kernel/src/ruby.rs:1000-1005 | codegraph-kernel/src/rustlang.rs:1488-1493 | codegraph-kernel/src/scala.rs:1362-1367 | codegraph-kernel/src/swift.rs:1525-1530 — before extracting anything, compare `codegraph-kernel/src/csharp.rs` and `codegraph-kernel/src/dart.rs` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 429 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 4) codegraph-kernel/src/java.rs:1084— codegraph-kernel/src/java.rs:1084-1088 | codegraph-kernel/src/kotlin.rs:1379-1383 | codegraph-kernel/src/swift.rs:1281-1285 | codegraph-kernel/src/tsjs/extractors.rs:1888-1892 — before extracting anything, compare `codegraph-kernel/src/java.rs` and `codegraph-kernel/src/kotlin.rs` as WHOLE FILES: this scan already matched 51 separate duplicated blocks between them, totalling at least 614 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.
Coverage not measured — JavaScript/TypeScript suite — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the repository root runs vitest but declares no coverage provider, so the suite can run and still produce no lcov — add `@vitest/coverage-v8` (or `@vitest/coverage-istanbul`) as a devDependency. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run.
Duplication concentrated across 10 sibling directories (46 clone groups) src/extraction/parse-pool.ts:39— 46 duplicated blocks under src/ have copies in at least two of the sibling directories context, db, extraction, graph, installer, mcp (+4 more sibling(s) not listed) — 35 of them are reported below, and 11 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 46 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 46 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 46 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 5 sibling directories (29 clone groups) src/ui-server/api/flow.ts:91— 29 duplicated blocks under the repository root have copies in at least two of the sibling directories scripts, src, telemetry-dashboard, telemetry-worker, ui — 15 of them are reported below, and 14 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 29 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 29 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 29 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication· Duplicated block with local edits (181 matched lines × 2 locations) · ×1
Duplicated block with local edits (181 matched lines × 2 locations) ui/src/views/ScreensView.svelte:41— ui/src/views/ScreensView.svelte:41 · ui/src/views/StepsView.svelte:72 — the two spans are one implementation copied and then locally edited — 1608 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (117 matched lines × 2 locations) · ×1
Duplicated block with local edits (117 matched lines × 2 locations) src/extraction/parse-pool.ts:39— src/extraction/parse-pool.ts:39 · src/mcp/query-pool.ts:40 — the two spans are one implementation copied and then locally edited — 987 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (103 matched lines × 2 locations) · ×1
Duplicated block with local edits (103 matched lines × 2 locations) src/extraction/astro-extractor.ts:72— src/extraction/astro-extractor.ts:72 · src/extraction/svelte-extractor.ts:66 — the two spans are one implementation copied and then locally edited — 833 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (91 matched lines × 2 locations) · ×1
Duplicated block with local edits (91 matched lines × 2 locations) src/installer/targets/copilot-jetbrains.ts:96— src/installer/targets/copilot-jetbrains.ts:96 · src/installer/targets/copilot-vscode.ts:65 — the two spans are one implementation copied and then locally edited — 762 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (88 matched lines × 2 locations) · ×1
Duplicated block with local edits (88 matched lines × 2 locations) src/extraction/svelte-extractor.ts:25— src/extraction/svelte-extractor.ts:25 · src/extraction/vue-extractor.ts:41 — the two spans are one implementation copied and then locally edited — 627 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (84 lines × 2 locations) src/ui-server/api/flow.ts:91— src/ui-server/api/flow.ts:91 · ui/src/lib/wire.ts:488 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
R10 · Code Duplication· Duplicated block with local edits (76 matched lines × 2 locations) · ×1
Duplicated block with local edits (76 matched lines × 2 locations) src/installer/targets/gemini.ts:48— src/installer/targets/gemini.ts:48 · src/installer/targets/kiro.ts:43 — the two spans are one implementation copied and then locally edited — 632 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (68 matched lines × 2 locations) · ×1
Duplicated block with local edits (68 matched lines × 2 locations) src/resolution/frameworks/svelte.ts:52— src/resolution/frameworks/svelte.ts:52 · src/resolution/frameworks/vue.ts:94 — the two spans are one implementation copied and then locally edited — 375 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (66 matched lines × 2 locations) · ×1
Duplicated block with local edits (66 matched lines × 2 locations) src/extraction/languages/javascript.ts:31— src/extraction/languages/javascript.ts:31 · src/extraction/languages/typescript.ts:211 — the two spans are one implementation copied and then locally edited — 441 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (63 matched lines × 2 locations) · ×1
Duplicated block with local edits (63 matched lines × 2 locations) src/ui-server/api/steps.ts:59— src/ui-server/api/steps.ts:59 · ui/src/lib/wire.ts:711 — the two spans are one implementation copied and then locally edited — 332 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (58 lines × 2 locations) REDACTED:3243— REDACTED:3243 · REDACTED:3326 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication· Duplicated block with local edits (56 matched lines × 2 locations) · ×1
Duplicated block with local edits (56 matched lines × 2 locations) REDACTED:42— REDACTED:42 · src/resolution/frameworks/object-literal.ts:40 — the two spans are one implementation copied and then locally edited — 399 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (52 matched lines × 2 locations) · ×1
Duplicated block with local edits (52 matched lines × 2 locations) src/resolution/callback-synthesizer.ts:4269— src/resolution/callback-synthesizer.ts:4269 · src/resolution/callback-synthesizer.ts:4857 — the two spans are one implementation copied and then locally edited — 400 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (51 matched lines × 2 locations) · ×1
Duplicated block with local edits (51 matched lines × 2 locations) REDACTED:734— REDACTED:734 · src/resolution/frameworks/nextjs.ts:221 — the two spans are one implementation copied and then locally edited — 365 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (50 lines × 2 locations) REDACTED:246— REDACTED:246 · REDACTED:319 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (48 matched lines × 2 locations) · ×1
Duplicated block with local edits (48 matched lines × 2 locations) ui/src/views/MapView.svelte:58— ui/src/views/MapView.svelte:58 · ui/src/views/ScreensView.svelte:52 — the two spans are one implementation copied and then locally edited — 304 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (46 matched lines × 2 locations) · ×1
Duplicated block with local edits (46 matched lines × 2 locations) ui/src/components/file/FileCodeBlock.svelte:37— ui/src/components/file/FileCodeBlock.svelte:37 · ui/src/components/symbol/SourceBlock.svelte:36 — the two spans are one implementation copied and then locally edited — 352 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (45 matched lines × 2 locations) · ×1
Duplicated block with local edits (45 matched lines × 2 locations) src/resolution/sveltekit-synthesizer.ts:47— src/resolution/sveltekit-synthesizer.ts:47 · src/resolution/tanstack-router-synthesizer.ts:41 — the two spans are one implementation copied and then locally edited — 471 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (44 matched lines × 2 locations) · ×1
Duplicated block with local edits (44 matched lines × 2 locations) ui/src/components/file/FileCodeOutline.svelte:25— ui/src/components/file/FileCodeOutline.svelte:25 · ui/src/components/file/FileOutline.svelte:39 — the two spans are one implementation copied and then locally edited — 368 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (42 lines × 2 locations) src/ui-server/api/screens.ts:44— src/ui-server/api/screens.ts:44 · ui/src/lib/wire.ts:660 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
Duplicated block (38 lines × 2 locations) src/ui-server/api/trails.ts:72— src/ui-server/api/trails.ts:72 · ui/src/lib/wire.ts:980 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
R10 · Code Duplication· Duplicated block with local edits (37 matched lines × 2 locations) · ×1
Duplicated block with local edits (37 matched lines × 2 locations) src/installer/targets/claude.ts:106— src/installer/targets/claude.ts:106 · src/installer/targets/cursor.ts:88 — the two spans are one implementation copied and then locally edited — 270 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (36 lines × 2 locations) src/extraction/dfm-extractor.ts:38— src/extraction/dfm-extractor.ts:38 · REDACTED:62 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (34 lines × 2 locations) src/db/queries.ts:2519— src/db/queries.ts:2519 · src/db/queries.ts:2575 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (33 matched lines × 2 locations) · ×1
Duplicated block with local edits (33 matched lines × 2 locations) src/resolution/frameworks/astro.ts:88— src/resolution/frameworks/astro.ts:88 · src/resolution/frameworks/svelte.ts:138 — the two spans are one implementation copied and then locally edited — 222 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (33 lines × 2 locations) src/ui-server/api/filecode.ts:81— src/ui-server/api/filecode.ts:81 · ui/src/lib/wire.ts:282 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
Duplicated block (32 lines × 2 locations) src/graph/traversal.ts:280— src/graph/traversal.ts:280 · src/graph/traversal.ts:338 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (30 lines × 2 locations) REDACTED:387— REDACTED:387 · REDACTED:427 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (29 matched lines × 2 locations) · ×1
Duplicated block with local edits (29 matched lines × 2 locations) ui/src/lib/map-model.ts:481— ui/src/lib/map-model.ts:481 · ui/src/lib/steps-model.ts:1060 — the two spans are one implementation copied and then locally edited — 291 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Complex function extractCall (cyclomatic 332, cognitive 742) src/extraction/tree-sitter.ts:5276— extractCall has cyclomatic complexity 332 and cognitive complexity 742; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function handleExplore (cyclomatic 324, cognitive 626) REDACTED:4200— handleExplore has cyclomatic complexity 324 and cognitive complexity 626; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function matchMethodCall (cyclomatic 257, cognitive 329) src/resolution/name-matcher.ts:19685— matchMethodCall has cyclomatic complexity 257 and cognitive complexity 329; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function buildSteps (cyclomatic 213, cognitive 528) src/ui-server/api/steps.ts:432— buildSteps has cyclomatic complexity 213 and cognitive complexity 528; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function cFnPointerDispatchEdges (cyclomatic 164, cognitive 418) REDACTED:434— cFnPointerDispatchEdges has cyclomatic complexity 164 and cognitive complexity 418; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function findRelevantContext (cyclomatic 160, cognitive 364) src/context/index.ts:477— findRelevantContext has cyclomatic complexity 160 and cognitive complexity 364; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function extractVariable (cyclomatic 140, cognitive 374) src/extraction/tree-sitter.ts:3884— extractVariable has cyclomatic complexity 140 and cognitive complexity 374; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function resolveOneInner (cyclomatic 134, cognitive 143) REDACTED:1505— resolveOneInner has cyclomatic complexity 134 and cognitive complexity 143; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function dispatchNode (cyclomatic 122, cognitive 188) src/extraction/tree-sitter.ts:1541— dispatchNode has cyclomatic complexity 122 and cognitive complexity 188; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function extractInheritance (cyclomatic 120, cognitive 294) src/extraction/tree-sitter.ts:7695— extractInheritance has cyclomatic complexity 120 and cognitive complexity 294; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 117, cognitive 56) src/resolution/name-matcher.ts:11907— (anonymous) has cyclomatic complexity 117 and cognitive complexity 56; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 111, cognitive 184) src/index.ts:927— (anonymous) has cyclomatic complexity 111 and cognitive complexity 184; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function matchReferenceInner (cyclomatic 101, cognitive 132) src/resolution/name-matcher.ts:27279— matchReferenceInner has cyclomatic complexity 101 and cognitive complexity 132; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function parseSession (cyclomatic 97, cognitive 155) scripts/agent-eval/parse-run.mjs:102— parseSession has cyclomatic complexity 97 and cognitive complexity 155; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function isRustNameInScope (cyclomatic 87, cognitive 94) src/resolution/name-matcher.ts:8961— isRustNameInScope has cyclomatic complexity 87 and cognitive complexity 94; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity· Complex function unit (cyclomatic 85, cognitive 126) · ×1
Complex function unit (cyclomatic 85, cognitive 126) REDACTED:1145— unit has cyclomatic complexity 85 and cognitive complexity 126; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function normalizeSpecial (cyclomatic 80, cognitive 121) src/extraction/function-ref.ts:638— normalizeSpecial has cyclomatic complexity 80 and cognitive complexity 121; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function inferCppReceiverType (cyclomatic 78, cognitive 127) src/resolution/name-matcher.ts:16827— inferCppReceiverType has cyclomatic complexity 78 and cognitive complexity 127; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function resolveViaImport (cyclomatic 77, cognitive 160) REDACTED:2981— resolveViaImport has cyclomatic complexity 77 and cognitive complexity 160; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function matchByExactName (cyclomatic 76, cognitive 66) src/resolution/name-matcher.ts:11825— matchByExactName has cyclomatic complexity 76 and cognitive complexity 66; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files· src/extraction/tree-sitter.ts · ×1
src/extraction/tree-sitter.ts: 9245 lines of code src/extraction/tree-sitter.ts:1— src/extraction/tree-sitter.ts has 9245 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 8412 lines of code REDACTED:1— REDACTED has 8412 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/resolution/callback-synthesizer.ts · ×1
src/resolution/callback-synthesizer.ts: 5238 lines of code src/resolution/callback-synthesizer.ts:1— src/resolution/callback-synthesizer.ts has 5238 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/db/queries.ts: 5237 lines of code src/db/queries.ts:1— src/db/queries.ts has 5237 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 4282 lines of code REDACTED:1— REDACTED has 4282 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 4186 lines of code REDACTED:1— REDACTED has 4186 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/extraction/index.ts: 3704 lines of code src/extraction/index.ts:1— src/extraction/index.ts has 3704 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/index.ts: 2644 lines of code src/index.ts:1— src/index.ts has 2644 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 2624 lines of code REDACTED:1— REDACTED has 2624 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 2376 lines of code REDACTED:1— REDACTED has 2376 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/graph/branch-guards.ts: 2242 lines of code src/graph/branch-guards.ts:1— src/graph/branch-guards.ts has 2242 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 1772 lines of code REDACTED:1— REDACTED has 1772 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/ui-server/api/steps.ts: 1670 lines of code src/ui-server/api/steps.ts:1— src/ui-server/api/steps.ts has 1670 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/context/index.ts: 1485 lines of code src/context/index.ts:1— src/context/index.ts has 1485 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 1384 lines of code REDACTED:1— REDACTED has 1384 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 1213 lines of code REDACTED:1— REDACTED has 1213 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
ui/src/lib/steps-model.ts: 1142 lines of code ui/src/lib/steps-model.ts:1— ui/src/lib/steps-model.ts has 1142 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· ui/src/views/StepsView.svelte · ×1
ui/src/views/StepsView.svelte: 1138 lines of code ui/src/views/StepsView.svelte:1— ui/src/views/StepsView.svelte has 1138 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/sync/watcher.ts: 1090 lines of code src/sync/watcher.ts:1— src/sync/watcher.ts has 1090 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/directory.ts: 1071 lines of code src/directory.ts:1— src/directory.ts has 1071 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/graph/dead-code.ts: 1048 lines of code src/graph/dead-code.ts:1— src/graph/dead-code.ts has 1048 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/resolution/frameworks/angular-router.ts · ×1
src/resolution/frameworks/angular-router.ts: 1045 lines of code src/resolution/frameworks/angular-router.ts:1— src/resolution/frameworks/angular-router.ts has 1045 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/extraction/languages/pascal-preparse.ts · ×1
src/extraction/languages/pascal-preparse.ts: 1044 lines of code src/extraction/languages/pascal-preparse.ts:1— src/extraction/languages/pascal-preparse.ts has 1044 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 1041 lines of code REDACTED:1— REDACTED has 1041 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/mcp/daemon.ts: 990 lines of code src/mcp/daemon.ts:1— src/mcp/daemon.ts has 990 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/extraction/function-ref.ts · ×1
src/extraction/function-ref.ts: 977 lines of code src/extraction/function-ref.ts:1— src/extraction/function-ref.ts has 977 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/db/index.ts: 962 lines of code src/db/index.ts:1— src/db/index.ts has 962 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
ui/src/lib/export-svg.ts: 915 lines of code ui/src/lib/export-svg.ts:1— ui/src/lib/export-svg.ts has 915 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 910 lines of code REDACTED:1— REDACTED has 910 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/upgrade/index.ts: 898 lines of code src/upgrade/index.ts:1— src/upgrade/index.ts has 898 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/extraction/grammars.ts: 893 lines of code src/extraction/grammars.ts:1— src/extraction/grammars.ts has 893 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/ui-server/api/map.ts: 873 lines of code src/ui-server/api/map.ts:1— src/ui-server/api/map.ts has 873 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
src/ui-server/api/flow.ts: 843 lines of code src/ui-server/api/flow.ts:1— src/ui-server/api/flow.ts has 843 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· telemetry-dashboard/src/api.ts · ×1
telemetry-dashboard/src/api.ts: 835 lines of code telemetry-dashboard/src/api.ts:1— telemetry-dashboard/src/api.ts has 835 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/resolution/ambient-modules.ts · ×1
src/resolution/ambient-modules.ts: 829 lines of code src/resolution/ambient-modules.ts:1— src/resolution/ambient-modules.ts has 829 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 827 lines of code REDACTED:1— REDACTED has 827 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/extraction/languages/dart.ts · ×1
src/extraction/languages/dart.ts: 794 lines of code src/extraction/languages/dart.ts:1— src/extraction/languages/dart.ts has 794 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/resolution/angular-template-synthesizer.ts · ×1
src/resolution/angular-template-synthesizer.ts: 790 lines of code src/resolution/angular-template-synthesizer.ts:1— src/resolution/angular-template-synthesizer.ts has 790 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· src/extraction/cfml-extractor.ts · ×1
src/extraction/cfml-extractor.ts: 788 lines of code src/extraction/cfml-extractor.ts:1— src/extraction/cfml-extractor.ts has 788 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· ui/src/lib/screens-model.ts · ×1
ui/src/lib/screens-model.ts: 786 lines of code ui/src/lib/screens-model.ts:1— ui/src/lib/screens-model.ts has 786 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R4 · Test Coverage· This test file cannot be loaded · ×1
This test file cannot be loaded __tests__/fixtures/kernel-parity/torture.tsx:5— __tests__/fixtures/kernel-parity/torture.tsx:5 imports './namespace-module', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (6 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
R6 · Tooling· The declared test suite includes a file that cannot be loaded · ×1
The declared test suite includes a file that cannot be loaded __tests__/fixtures/kernel-parity/torture.tsx:5— This repository declares test tooling, and the ✓ above records that declaration — but __tests__/fixtures/kernel-parity/torture.tsx cannot be loaded at all: it imports a module that names no file in this repository, so the runner throws while collecting it and none of its cases execute. The wiring is present and the suite it points at does not run as written, which is why the tooling tick must not be read as a statement that the tests pass. Fix the unloadable file(s) — each one is reported with its failing import under Test Coverage — then the declared script exercises what it claims to.
Dead file (~155 LoC) src/extraction/parse-worker.ts— no import path from any entry point (178 application, 55 tooling, 834 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~153 LoC) src/extraction/store-worker.ts— no import path from any entry point (178 application, 55 tooling, 834 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~151 LoC) src/ui/shimmer-progress.ts— no import path from any entry point (178 application, 55 tooling, 834 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~143 LoC) src/resolution/resolver-worker.ts— no import path from any entry point (178 application, 55 tooling, 834 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~134 LoC) src/ui/shimmer-worker.ts— no import path from any entry point (178 application, 55 tooling, 834 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~63 LoC) vitest.workspace.mts— no import path from any entry point (178 application, 55 tooling, 834 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~25 LoC) src/ui-server/highlight/tokenize-worker.ts— no import path from any entry point (178 application, 55 tooling, 834 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~8 LoC) src/ui/types.ts— no import path from any entry point (178 application, 55 tooling, 834 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (src/ui/shimmer-worker.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Unused dependency 'fast-string-width' — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'fast-wrap-ansi' — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'sisteransi' — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Silent fallback default in catch src/bin/fatal-handler.ts:50— `describeFatal` swallows every exception into `return '<unstringifiable value>'` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
Silent fallback default in catch src/mcp/daemon-registry.ts:120— `listDaemons` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
Silent fallback default in catch src/telemetry/index.ts:604— `packageVersion` swallows every exception into `return '0.0.0'` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
Silent fallback default in catch src/db/migrations.ts:328— `getCurrentVersion` swallows every exception into `return 0` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
Silent fallback default in catch src/db/index.ts:694— `getWalSizeBytes` swallows every exception into `return 0` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
Silent fallback default in catch src/db/index.ts:705— `getDbFileSizeBytes` swallows every exception into `return 0` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
Silent fallback default in catch src/resolution/workspace-packages.ts:363— `readNpmPathDeps` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
Silent fallback default in catch src/resolution/frameworks/index.ts:126— `detectFrameworks` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
Silent fallback default in catch src/extraction/index.ts:2027— `scopedSyncMatcher` swallows every exception into `return '-'` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
Silent fallback default in catch src/extraction/index.ts:2060— `fileExists` (in `buildDetectionContext`) swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
Silent fallback default in catch src/extraction/index.ts:2089— `listDirectories` (in `buildDetectionContext`) swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
Silent fallback default in catch src/extraction/index.ts:411— `readGitignorePatterns` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
Silent fallback default in catch src/extraction/index.ts:549— `listGitIgnoredDirectories` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
Silent fallback default in catch src/extraction/index.ts:800— `listIgnoredDirs` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
Silent fallback default in catch src/extraction/index.ts:1093— `discoverEmbeddedRepoRoots` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
Silent fallback default in catch src/extraction/index.ts:1171— `findUnindexedIgnoredRepos` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
Silent fallback default in catch src/resolution/memory-budget.ts:44— `readInactiveFile` swallows every exception into `return 0` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
Silent fallback default in catch src/graph/type-hierarchy.ts:336— `hierarchyEdges` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
Silent fallback default in catch src/graph/type-hierarchy.ts:441— `membersOf` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
Silent fallback default in catch src/graph/type-hierarchy.ts:479— `countImplementers` swallows every exception into `return 0` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
Silent fallback default in catch src/graph/dynamic-boundary-report.ts:142— `findDynamicBoundaries` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
Silent fallback default in catch REDACTED:3473— `whenLabel` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
Silent fallback default in catch REDACTED:4540— `callerCount` (in `handleExplore`) swallows every exception into `return 0` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
Silent fallback default in catch REDACTED:246— `filesDefiningSymbol` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
Silent fallback default in catch src/index.ts:256— `snapshot` (in `wireLayers`) swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
+ 3 more in this group — see findings.md.
P2 · Observability· Console output used as the logging channel · ×25
Console output used as the logging channel src/directory.ts:57— `src/directory.ts` reports through `console.*` at line 57 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/errors.ts:17— `src/errors.ts` reports through `console.*` at line 17 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/errors.ts:19— `src/errors.ts` reports through `console.*` at line 19 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/errors.ts:40— `src/errors.ts` reports through `console.*` at line 40 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/errors.ts:196— `src/errors.ts` reports through `console.*` at line 196 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/errors.ts:200— `src/errors.ts` reports through `console.*` at line 200 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/errors.ts:203— `src/errors.ts` reports through `console.*` at line 203 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/utils.ts:26— `src/utils.ts` reports through `console.*` at line 26 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel REDACTED:1445— `REDACTED` reports through `console.*` at line 1445 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/resolution/callback-synthesizer.ts:5284— `src/resolution/callback-synthesizer.ts` reports through `console.*` at line 5284 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/resolution/callback-synthesizer.ts:5343— `src/resolution/callback-synthesizer.ts` reports through `console.*` at line 5343 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/resolution/callback-synthesizer.ts:5407— `src/resolution/callback-synthesizer.ts` reports through `console.*` at line 5407 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/resolution/resolver-pool.ts:160— `src/resolution/resolver-pool.ts` reports through `console.*` at line 160 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/resolution/resolver-worker.ts:64— `src/resolution/resolver-worker.ts` reports through `console.*` at line 64 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/resolution/resolver-worker.ts:91— `src/resolution/resolver-worker.ts` reports through `console.*` at line 91 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/installer/targets/shared.ts:194— `src/installer/targets/shared.ts` reports through `console.*` at line 194 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/installer/targets/shared.ts:195— `src/installer/targets/shared.ts` reports through `console.*` at line 195 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/extraction/grammars.ts:543— `src/extraction/grammars.ts` reports through `console.*` at line 543 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/extraction/store-worker.ts:130— `src/extraction/store-worker.ts` reports through `console.*` at line 130 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/db/queries.ts:565— `src/db/queries.ts` reports through `console.*` at line 565 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/db/queries.ts:650— `src/db/queries.ts` reports through `console.*` at line 650 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/db/queries.ts:806— `src/db/queries.ts` reports through `console.*` at line 806 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/db/wal-valve.ts:143— `src/db/wal-valve.ts` reports through `console.*` at line 143 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/db/wal-valve.ts:165— `src/db/wal-valve.ts` reports through `console.*` at line 165 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel src/db/wal-valve.ts:295— `src/db/wal-valve.ts` reports through `console.*` at line 295 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Duplicated predicate src/ui-server/api/trail-store.ts:169— `!Array.isArray(value.hops) || value.hops.length === 0` appears character-identically in 2 files — src/ui-server/api/trail-store.ts, src/ui-server/api/trails.ts. 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 src/resolution/next-router-synthesizer.ts:49— `!JSX_FILE.test(file) || isTestPath(file)` appears character-identically in 3 files — src/resolution/next-router-synthesizer.ts, REDACTED, src/resolution/tanstack-router-synthesizer.ts. 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 src/mcp/ppid-watchdog.ts:93— `!Number.isInteger(parsed) || parsed <= 1` appears character-identically in 2 files — src/mcp/ppid-watchdog.ts, src/mcp/proxy.ts. 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 src/resolution/frameworks/angular-router.ts:1094— `!inner || n.startLine >= inner.startLine` appears character-identically in 2 files — src/resolution/frameworks/angular-router.ts, REDACTED. 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 src/extraction/parse-pool.ts:271— `!this.destroyed && this.totalCrashes < CRASH_BUDGET` appears character-identically in 2 files — src/extraction/parse-pool.ts, src/mcp/query-pool.ts. 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 src/extraction/languages/vbnet.ts:37— `!typeNode || typeNode.type === 'predefined_type' || typeNode.type === 'array_type'` appears character-identically in 2 files — src/extraction/languages/vbnet.ts, src/extraction/tree-sitter.ts. 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 src/resolution/go-func-field-synthesizer.ts:200— `(c === '\n' || c === ';') && depth === 0` appears character-identically in 2 files — src/resolution/go-func-field-synthesizer.ts, src/resolution/name-matcher.ts. 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 src/resolution/c-feature-variants.ts:269— `/\\\s*$/.test(lines[j]!) && j + 1 < lines.length` appears character-identically in 2 files — src/resolution/c-feature-variants.ts, REDACTED. 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 src/mcp/explore-dedup.ts:104— `Number.isFinite(r.start) && Number.isFinite(r.end) && r.end >= r.start && r.start >= 1` appears character-identically in 2 files — src/mcp/explore-dedup.ts, src/mcp/explore-session-state.ts. 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 REDACTED:504— `SWIFT_TYPE_KINDS.has(n.kind) && n.startLine <= ref.line && n.endLine >= ref.line` appears character-identically in 2 files — REDACTED, src/resolution/name-matcher.ts. 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 src/resolution/cpp-type-aliases.ts:673— `a.filePath.localeCompare(b.filePath) || a.startLine - b.startLine` appears character-identically in 2 files — src/resolution/cpp-type-aliases.ts, REDACTED. 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 ui/src/lib/map-model.ts:515— `a.other - b.other || a.id.localeCompare(b.id)` appears character-identically in 2 files — ui/src/lib/map-model.ts, ui/src/lib/steps-model.ts. 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 src/graph/dead-code.ts:677— `a.startLine - b.startLine || a.name.localeCompare(b.name)` appears character-identically in 2 files — src/graph/dead-code.ts, src/ui-server/api/file.ts. 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 src/extraction/index.ts:1952— `a.startLine - b.startLine || a.startColumn - b.startColumn` appears character-identically in 6 files — src/extraction/index.ts, src/resolution/ambient-modules.ts, REDACTED, src/resolution/js-super-calls.ts. 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 src/installer/targets/copilot-jetbrains.ts:220— `afterParsed.servers && typeof afterParsed.servers === 'object' && Object.keys(afterParsed.servers).length === 0` appears character-identically in 2 files — src/installer/targets/copilot-jetbrains.ts, src/installer/targets/copilot-vscode.ts. 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 src/extraction/languages/javascript.ts:51— `arg && (arg.type === 'arrow_function' || arg.type === 'function_expression')` appears character-identically in 2 files — src/extraction/languages/javascript.ts, src/extraction/languages/typescript.ts. 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 REDACTED:3744— `base === 'mod.rs' || base === 'lib.rs' || base === 'main.rs'` appears character-identically in 2 files — REDACTED, src/resolution/name-matcher.ts. 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 src/resolution/name-matcher.ts:13512— `c === ',' || c === ';' || c === ')' || c === ']' || c === '}'` appears character-identically in 2 files — src/resolution/name-matcher.ts, src/resolution/rust-scopes.ts. 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 src/resolution/callback-synthesizer.ts:893— `c === '/' && (text[i + 1] === '/' || text[i + 1] === '*')` appears character-identically in 2 files — src/resolution/callback-synthesizer.ts, REDACTED. 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 src/extraction/languages/cpp-brace-scopes.ts:122— `c === 47 && source.charCodeAt(i + 1) === 42` appears character-identically in 2 files — src/extraction/languages/cpp-brace-scopes.ts, src/extraction/languages/cpp-macro-methods.ts. 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 src/extraction/languages/cpp-brace-scopes.ts:121— `c === 47 && source.charCodeAt(i + 1) === 47` appears character-identically in 2 files — src/extraction/languages/cpp-brace-scopes.ts, src/extraction/languages/cpp-macro-methods.ts. 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 src/extraction/languages/javascript.ts:43— `child.type === 'arrow_function' || child.type === 'function_expression'` appears character-identically in 2 files — src/extraction/languages/javascript.ts, src/extraction/languages/typescript.ts. 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 REDACTED:463— `child.type === 'enum_specifier' && getChildByField(child, 'body')` appears character-identically in 2 files — REDACTED, src/extraction/languages/objc.ts. 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 REDACTED:465— `child.type === 'struct_specifier' && getChildByField(child, 'body')` appears character-identically in 2 files — REDACTED, src/extraction/languages/objc.ts. 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 REDACTED:469— `child.type === 'union_specifier' && getChildByField(child, 'body')` appears character-identically in 2 files — REDACTED, src/extraction/languages/objc.ts. 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.
README/code drift README.md:633— README.md names Node.js 22, but the repository declares engines `>=20.0.0 <25.0.0`. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift site/src/content/docs/reference/api.md:68— site/src/content/docs/reference/api.md names Node.js 22, but the repository declares engines `>=20.0.0 <25.0.0`. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 2 of 6 project(s) overshoot their size bounds, lowering Project Cohesion to 3.6/10. The most over is `(repository root)` (174371 LoC, 724 module-visible types across 26 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 — 1 of 328 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; 328 of the 357 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: src/resolution/frameworks/cargo-workspace.ts. 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.
Orphaned file src/resolution/frameworks/cargo-workspace.ts: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.
M2 · Architecture documentation· ADRs not easily discoverable · ×1
ADRs not easily discoverable — 3 ADR-shaped document(s) detected by content — `docs/design/native-extraction-kernel.md`, `docs/design/telemetry.md`, `docs/design/template-markup-parser.md`. They are not under a conventional ADR folder (docs/adr/) and are not named NNNN-title.md, and this check found them by their decision signature rather than by where they live — so a reader who does not already know these paths has no route to them. Detected by content signature only: records kept outside the repository, or written without a Status/Decision/Consequences shape, are not visible to this check and are not counted here.
Logging is not universal — Only 1/2 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`.
No SAST — No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 16007 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
R7 · Dead Code· Unused export 'writePermissions' · ×1
Unused export 'writePermissions' src/installer/config-writer.ts:38— Nothing ultimately consumes this binding: its only referrer is the re-export in src/installer/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in src/installer/index.ts in the same commit, or the barrel will import a name that no longer exists.
Unused export 'hasMcpConfig' src/installer/config-writer.ts:42— Nothing ultimately consumes this binding: its only referrer is the re-export in src/installer/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in src/installer/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code· Unused export 'hasPermissions' · ×1
Unused export 'hasPermissions' src/installer/config-writer.ts:52— Nothing ultimately consumes this binding: its only referrer is the re-export in src/installer/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in src/installer/index.ts in the same commit, or the barrel will import a name that no longer exists.
Unused export 'runInstaller' src/installer/index.ts:82— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'runUninstaller' · ×1
Unused export 'runUninstaller' src/installer/index.ts:464— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'offerWatchFallback' · ×1
Unused export 'offerWatchFallback' src/installer/index.ts:678— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'FACADE_MAPPINGS' · ×1
Unused export 'FACADE_MAPPINGS' src/resolution/frameworks/laravel.ts:16— Nothing ultimately consumes this binding: its only referrer is the re-export in src/resolution/frameworks/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in src/resolution/frameworks/index.ts in the same commit, or the barrel will import a name that no longer exists.
Unused export 'openBrowser' REDACTED:64— Nothing ultimately consumes this binding: its only referrer is the re-export in REDACTED, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in REDACTED in the same commit, or the barrel will import a name that no longer exists.
Unused export 'ViewName' ui/src/lib/router.svelte.ts:101— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused private field '#privateField' · ×1
Unused private field '#privateField' __tests__/fixtures/kernel-parity/torture.js:18— Nothing in its class reads or assigns this private field (for a constructor parameter property: it is stored and never read), and no string key or test reaches it by name. Remove it, or use it where it was meant to take effect.
R7 · Dead Code· Unused module-local declaration 'handlerMap' · ×1
Unused module-local declaration 'handlerMap' __tests__/fixtures/kernel-parity/torture.js:81— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'lazyList' · ×1
Unused module-local declaration 'lazyList' __tests__/fixtures/kernel-parity/torture.js:83— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'bucketChains' · ×1
Unused module-local declaration 'bucketChains' __tests__/fixtures/kernel-parity/torture.js:90— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'exprReceivers' · ×1
Unused module-local declaration 'exprReceivers' __tests__/fixtures/kernel-parity/torture.js:98— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'calleeShapes' · ×1
Unused module-local declaration 'calleeShapes' __tests__/fixtures/kernel-parity/torture.js:122— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'defaultsOf' · ×1
Unused module-local declaration 'defaultsOf' __tests__/fixtures/kernel-parity/torture.js:133— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'DefaultsHolder' · ×1
Unused module-local declaration 'DefaultsHolder' __tests__/fixtures/kernel-parity/torture.js:136— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'defaultsApi' · ×1
Unused module-local declaration 'defaultsApi' __tests__/fixtures/kernel-parity/torture.js:141— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'oldVar' · ×1
Unused module-local declaration 'oldVar' __tests__/fixtures/kernel-parity/torture.tsx:17— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'Plain' · ×1
Unused module-local declaration 'Plain' __tests__/fixtures/kernel-parity/torture.tsx:58— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'generatorFn' · ×1
Unused module-local declaration 'generatorFn' __tests__/fixtures/kernel-parity/torture.tsx:101— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R8 · Dependency Hygiene· Type-only dependency '@clack/prompts' in production deps · ×1
Type-only dependency '@clack/prompts' in production deps src/installer/beta-signup.ts:114— Every import is type-only — move it to devDependencies.
Nullable reference types not enabled everywhere — 0/1 NRT-eligible project(s) enable <Nullable>enable</Nullable> (projects targeting a pre-C#-8 framework are excluded — NRTs aren't available there). NRTs catch a whole class of null-deref bugs at compile time.
Subsumed condition operand codegraph-kernel/src/java.rs:1511— `class_anns.contains("SuperBuilder")` can never decide this `||` — every value satisfying `class_anns.contains("SuperBuilder")` also satisfies `class_anns.contains("Builder")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Skipped (documented): (unnamed test) __tests__/ambient-module-imports.test.ts:252— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): (unnamed test) __tests__/bundle-launcher.test.ts:77— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): (unnamed test) __tests__/bundle-launcher.test.ts:81— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): (unnamed test) __tests__/bundle-launcher.test.ts:85— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): (unnamed test) __tests__/bundle-launcher.test.ts:112— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): (unnamed test) __tests__/cli-ui-command.test.ts:183— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): (unnamed test) __tests__/cli-ui-command.test.ts:335— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): (unnamed test) __tests__/daemon-bind-failure.test.ts:32— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): (unnamed test) __tests__/daemon-lock-holder.test.ts:158— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): (unnamed test) __tests__/daemon-lock-refresh.test.ts:80— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): (unnamed test) __tests__/daemon-rendezvous-case.test.ts:68— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): (unnamed test) __tests__/daemon-rendezvous-case.test.ts:83— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): (unnamed test) __tests__/daemon-rendezvous-case.test.ts:105— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): (unnamed test) __tests__/daemon-socket-fallback.test.ts:74— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): (unnamed test) __tests__/daemon-socket-fallback.test.ts:83— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): (unnamed test) __tests__/daemon-socket-fallback.test.ts:91— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): (unnamed test) __tests__/daemon-socket-fallback.test.ts:101— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): (unnamed test) __tests__/daemon-socket-fallback.test.ts:204— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): (unnamed test) __tests__/daemon-socket-fallback.test.ts:219— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): (unnamed test) __tests__/daemon-socket-fallback.test.ts:236— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): (unnamed test) __tests__/db-reopen-on-replace.test.ts:25— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): (unnamed test) __tests__/db-reopen-on-replace.test.ts:26— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): (unnamed test) __tests__/dominant-file-cache.test.ts:131— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): (unnamed test) __tests__/git-hooks.test.ts:177— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): (unnamed test) __tests__/git-hooks.test.ts:262— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Outdated: cc — `cc` is locked at 1.2.67 but 1.10.0 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in codegraph-kernel/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p cc` and commit the updated Cargo.lock.
Outdated: libc — `libc` is locked at 0.2.186 but 0.2.191 is the current stable release on crates.io, and it already satisfies the `"0.2"` requirement declared in codegraph-kernel/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p libc` and commit the updated Cargo.lock.
Outdated: napi — `napi` is locked at 3.10.5 but 3.15.0 is the current stable release on crates.io, and it already satisfies the `"3"` requirement declared in codegraph-kernel/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p napi` and commit the updated Cargo.lock.
Outdated: napi-build — `napi-build` is locked at 2.3.2 but 2.6.0 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in codegraph-kernel/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p napi-build` and commit the updated Cargo.lock.
Outdated: napi-derive — `napi-derive` is locked at 3.5.10 but 3.6.13 is the current stable release on crates.io, and it already satisfies the `"3"` requirement declared in codegraph-kernel/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p napi-derive` and commit the updated Cargo.lock.
Outdated: tree-sitter-language — `tree-sitter-language` is locked at 0.1.7 but 0.1.9 is the current stable release on crates.io, and it already satisfies the `"0.1"` requirement declared in codegraph-kernel/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tree-sitter-language` and commit the updated Cargo.lock.
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.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 12 file(s) — `src/extraction/parse-worker.ts`, `src/extraction/vue-template-calls.ts`, `src/index.ts`, `src/resolution/angular-template-synthesizer.ts`, `src/resolution/types.ts`, … (+7 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a17852-7acb-7af4-a87b-b166f6804bfb · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 49 · Warnings: 2635 · Recommendations: 129 · Info: 124 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 26-10-2026 @ 13:07 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.