Public report of ZacSweers/metro, published 16 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 16 November 2026, 19:33 UTC · Survey ID cd_b213fc0f87334813826a859a5494aaf3
ZacSweers/metro
Measured 16 November 2026, 19:31 UTC, at code version de7c28f
First survey, so nothing to compare with yet
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
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: 134,352 lines of product code in 32 projects, tests not counted · Estimated rebuild effort: about 2.1 person-years · Weakest lens: Security and Compliance, 59.0
Findings by how serious they are
101 critical940 serious50 minor
13 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
16 November 2026, 19:31 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
57of 57 dimensions measured by tools.
1079of 1091 findings point to an exact file and line, so you can open each one in the code. The other 12 concern the repository as a whole, such as missing documentation.
57dimensions across 7 lenses, read from 134,352 lines of product code in 32 projects.
ZacSweers/metro falls short of our standard for production, in part because it has pipeline tools referenced by a changeable name. It scores 62.9 out of 100 and is rated Adequate, and 93 of its 101 critical findings are security problems in the build pipeline and in its servers and containers.
Security and Compliance, at 59.0, is the weakest lens and counts most in the score. The best first step is fixing focus, motion and contrast, worth about 2.5 points. Structuring the pages comes next, worth about 2.4 points. Raising Security and Compliance to 70 would lift the score to about 65.1.
Seventy-one pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Sixteen pipeline steps put outside input straight into a shell command, so an attacker can run commands in the build pipeline, and three pipeline steps run downloads nobody checks. Pinning each tool to an exact version, passing outside input through environment variables and checking each download against a checksum would close these risks. Limiting each secret to its own step would fix the two secrets exposed to more of the pipeline than needed, and the unsafe setting in infrastructure or container files needs changing to safe values. The four pages or frames without a title need a descriptive title.
The product code is 134,352 lines, about €310,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Security and Compliance rose from 59.0 to 70, the lowest score rated Strong, the score would rise from 62.9 to about 65.1.
Code composition: what the lines of code are
Product code 49%Tests 51%
Rebuild cost: about €310,000 · Estimate
Cost to rebuild
€100,000 to €520,000, for 1,718 to 5,449 hours of work, about 2.1 person-years for 1 to 5 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.9 at a score of 63. 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: 134,352 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €310,000 to build again, about 2.1 person-years of work. Its weakest lens is Security and Compliance, at 59.0 (Adequate). Security and Compliance is about how well the product is protected, and how it handles personal data. Because the weakest lens counts most in the score, work on Security and Compliance also moves the score most.
Based on: the rebuild estimate · the Security and Compliance grade · how much each lens counts
What to do: Start with the Security and Compliance actions in Top priorities.
If you do one thing first · First action
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1. Of all the actions in this report, it raises the score most for the work it takes: about 2.5 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.4 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 4% to 9% on every change. The history of the code shows how much it changes: about 220,305 lines over the last 90 days, which is about 893,459 lines a year. At that pace, the extra work comes to an estimated 89.1 to 534.4 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
437 modules, with 781 dependencies between them. 12 loops run through 96 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 397 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.
metro.compiler.compat.CompatContext uses metro.compiler.compat, so a change to metro.compiler.compat can break metro.compiler.compat.CompatContext, while a change to metro.compiler.compat.CompatContext can't break metro.compiler.compat.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
5→10 metro.compiler.diagnostics.render uses metro.compiler.diagnosticspart of a loop✕
Connections
14 pairs of types, where a type in metro.compiler.diagnostics.render uses a type in metro.compiler.diagnostics.
metro.compiler.diagnostics.render uses metro.compiler.diagnostics, so a change to metro.compiler.diagnostics can break metro.compiler.diagnostics.render, while a change to metro.compiler.diagnostics.render can't break metro.compiler.diagnostics.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
5→32 metro.compiler.diagnostics.render uses metro.compilerpart of a loop✕
Connections
1 pair of types, where a type in metro.compiler.diagnostics.render uses a type in metro.compiler.
metro.compiler.diagnostics.render uses metro.compiler, so a change to metro.compiler can break metro.compiler.diagnostics.render, while a change to metro.compiler.diagnostics.render can't break metro.compiler.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
6→32 metro.compiler.tracing uses metro.compilerpart of a loop✕
Connections
1 pair of types, where a type in metro.compiler.tracing uses a type in metro.compiler.
metro.compiler.tracing uses metro.compiler, so a change to metro.compiler can break metro.compiler.tracing, while a change to metro.compiler.tracing can't break metro.compiler.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
7→20 metro.idea.model.BindingIndex uses metro.idea.modelpart of a loop✕
Connections
16 pairs of types, where a type in metro.idea.model.BindingIndex uses a type in metro.idea.model.
metro.idea.model.BindingIndex uses metro.idea.model, so a change to metro.idea.model can break metro.idea.model.BindingIndex, while a change to metro.idea.model.BindingIndex can't break metro.idea.model.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
35 pairs of types, where a type in metro.internal uses a type in metro. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
metro.compiler.compat uses metro.compiler.compat.CompatContext, so a change to metro.compiler.compat.CompatContext can break metro.compiler.compat, while a change to metro.compiler.compat can't break metro.compiler.compat.CompatContext.
Position
Below the diagonal: metro.compiler.compat uses a module listed above it, which is the healthy direction.
metro.compiler.diagnostics uses metro.compiler.diagnostics.render, so a change to metro.compiler.diagnostics.render can break metro.compiler.diagnostics, while a change to metro.compiler.diagnostics can't break metro.compiler.diagnostics.render.
Position
Below the diagonal: metro.compiler.diagnostics uses a module listed above it, which is the healthy direction.
metro.idea.tracing uses metro.compiler.tracing, so a change to metro.compiler.tracing can break metro.idea.tracing, while a change to metro.idea.tracing can't break metro.compiler.tracing.
Position
Below the diagonal: metro.idea.tracing uses a module listed above it, which is the healthy direction.
metro.compiler.api.fir.MetroContributionExtension uses metro.compiler.compat, so a change to metro.compiler.compat can break metro.compiler.api.fir.MetroContributionExtension, while a change to metro.compiler.api.fir.MetroContributionExtension can't break metro.compiler.compat.
Position
Below the diagonal: metro.compiler.api.fir.MetroContributionExtension uses a module listed above it, which is the healthy direction.
12→18 metro.compiler.api.fir.MetroContributionExtension uses metro.compiler.api.firpart of a loop✕
Connections
1 pair of types, where a type in metro.compiler.api.fir.MetroContributionExtension uses a type in metro.compiler.api.fir.
metro.compiler.api.fir.MetroContributionExtension uses metro.compiler.api.fir, so a change to metro.compiler.api.fir can break metro.compiler.api.fir.MetroContributionExtension, while a change to metro.compiler.api.fir.MetroContributionExtension can't break metro.compiler.api.fir.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
12→32 metro.compiler.api.fir.MetroContributionExtension uses metro.compilerpart of a loop✕
Connections
1 pair of types, where a type in metro.compiler.api.fir.MetroContributionExtension uses a type in metro.compiler.
metro.compiler.api.fir.MetroContributionExtension uses metro.compiler, so a change to metro.compiler can break metro.compiler.api.fir.MetroContributionExtension, while a change to metro.compiler.api.fir.MetroContributionExtension can't break metro.compiler.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
metro.compiler.api.fir.MetroContributionHintExtension uses metro.compiler.compat, so a change to metro.compiler.compat can break metro.compiler.api.fir.MetroContributionHintExtension, while a change to metro.compiler.api.fir.MetroContributionHintExtension can't break metro.compiler.compat.
Position
Below the diagonal: metro.compiler.api.fir.MetroContributionHintExtension uses a module listed above it, which is the healthy direction.
13→18 metro.compiler.api.fir.MetroContributionHintExtension uses metro.compiler.api.firpart of a loop✕
Connections
1 pair of types, where a type in metro.compiler.api.fir.MetroContributionHintExtension uses a type in metro.compiler.api.fir.
metro.compiler.api.fir.MetroContributionHintExtension uses metro.compiler.api.fir, so a change to metro.compiler.api.fir can break metro.compiler.api.fir.MetroContributionHintExtension, while a change to metro.compiler.api.fir.MetroContributionHintExtension can't break metro.compiler.api.fir.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
13→32 metro.compiler.api.fir.MetroContributionHintExtension uses metro.compilerpart of a loop✕
Connections
1 pair of types, where a type in metro.compiler.api.fir.MetroContributionHintExtension uses a type in metro.compiler.
metro.compiler.api.fir.MetroContributionHintExtension uses metro.compiler, so a change to metro.compiler can break metro.compiler.api.fir.MetroContributionHintExtension, while a change to metro.compiler.api.fir.MetroContributionHintExtension can't break metro.compiler.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
metro.compiler.api.fir.MetroFirDeclarationGenerationExtension uses metro.compiler.compat, so a change to metro.compiler.compat can break metro.compiler.api.fir.MetroFirDeclarationGenerationExtension, while a change to metro.compiler.api.fir.MetroFirDeclarationGenerationExtension can't break metro.compiler.compat.
Position
Below the diagonal: metro.compiler.api.fir.MetroFirDeclarationGenerationExtension uses a module listed above it, which is the healthy direction.
14→18 metro.compiler.api.fir.MetroFirDeclarationGenerationExtension uses metro.compiler.api.firpart of a loop✕
Connections
1 pair of types, where a type in metro.compiler.api.fir.MetroFirDeclarationGenerationExtension uses a type in metro.compiler.api.fir.
metro.compiler.api.fir.MetroFirDeclarationGenerationExtension uses metro.compiler.api.fir, so a change to metro.compiler.api.fir can break metro.compiler.api.fir.MetroFirDeclarationGenerationExtension, while a change to metro.compiler.api.fir.MetroFirDeclarationGenerationExtension can't break metro.compiler.api.fir.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
14→32 metro.compiler.api.fir.MetroFirDeclarationGenerationExtension uses metro.compilerpart of a loop✕
Connections
1 pair of types, where a type in metro.compiler.api.fir.MetroFirDeclarationGenerationExtension uses a type in metro.compiler.
metro.compiler.api.fir.MetroFirDeclarationGenerationExtension uses metro.compiler, so a change to metro.compiler can break metro.compiler.api.fir.MetroFirDeclarationGenerationExtension, while a change to metro.compiler.api.fir.MetroFirDeclarationGenerationExtension can't break metro.compiler.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
metro.compiler.graph uses metro.compiler.graph.identity, so a change to metro.compiler.graph.identity can break metro.compiler.graph, while a change to metro.compiler.graph can't break metro.compiler.graph.identity.
Position
Below the diagonal: metro.compiler.graph uses a module listed above it, which is the healthy direction.
metro.compiler.graph uses metro.compiler.tracing, so a change to metro.compiler.tracing can break metro.compiler.graph, while a change to metro.compiler.graph can't break metro.compiler.tracing.
Position
Below the diagonal: metro.compiler.graph uses a module listed above it, which is the healthy direction.
metro.compiler.graph uses metro.compiler.diagnostics, so a change to metro.compiler.diagnostics can break metro.compiler.graph, while a change to metro.compiler.graph can't break metro.compiler.diagnostics.
Position
Below the diagonal: metro.compiler.graph uses a module listed above it, which is the healthy direction.
metro.compiler.ir.graph.IrBindingStack uses metro.compiler.diagnostics, so a change to metro.compiler.diagnostics can break metro.compiler.ir.graph.IrBindingStack, while a change to metro.compiler.ir.graph.IrBindingStack can't break metro.compiler.diagnostics.
Position
Below the diagonal: metro.compiler.ir.graph.IrBindingStack uses a module listed above it, which is the healthy direction.
16→30 metro.compiler.ir.graph.IrBindingStack uses metro.compiler.ir.graphpart of a loop✕
Connections
1 pair of types, where a type in metro.compiler.ir.graph.IrBindingStack uses a type in metro.compiler.ir.graph.
metro.compiler.ir.graph.IrBindingStack uses metro.compiler.ir.graph, so a change to metro.compiler.ir.graph can break metro.compiler.ir.graph.IrBindingStack, while a change to metro.compiler.ir.graph.IrBindingStack can't break metro.compiler.ir.graph.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
16→31 metro.compiler.ir.graph.IrBindingStack uses metro.compiler.irpart of a loop✕
Connections
2 pairs of types, where a type in metro.compiler.ir.graph.IrBindingStack uses a type in metro.compiler.ir.
metro.compiler.ir.graph.IrBindingStack uses metro.compiler.ir, so a change to metro.compiler.ir can break metro.compiler.ir.graph.IrBindingStack, while a change to metro.compiler.ir.graph.IrBindingStack can't break metro.compiler.ir.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
16→32 metro.compiler.ir.graph.IrBindingStack uses metro.compilerpart of a loop✕
Connections
1 pair of types, where a type in metro.compiler.ir.graph.IrBindingStack uses a type in metro.compiler.
metro.compiler.ir.graph.IrBindingStack uses metro.compiler, so a change to metro.compiler can break metro.compiler.ir.graph.IrBindingStack, while a change to metro.compiler.ir.graph.IrBindingStack can't break metro.compiler.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
metro.compiler.symbols uses metro.compiler.compat.CompatContext, so a change to metro.compiler.compat.CompatContext can break metro.compiler.symbols, while a change to metro.compiler.symbols can't break metro.compiler.compat.CompatContext.
Position
Below the diagonal: metro.compiler.symbols uses a module listed above it, which is the healthy direction.
metro.compiler.symbols uses metro.compiler.compat, so a change to metro.compiler.compat can break metro.compiler.symbols, while a change to metro.compiler.symbols can't break metro.compiler.compat.
Position
Below the diagonal: metro.compiler.symbols uses a module listed above it, which is the healthy direction.
17→31 metro.compiler.symbols uses metro.compiler.irpart of a loop✕
Connections
8 pairs of types, where a type in metro.compiler.symbols uses a type in metro.compiler.ir.
metro.compiler.symbols uses metro.compiler.ir, so a change to metro.compiler.ir can break metro.compiler.symbols, while a change to metro.compiler.symbols can't break metro.compiler.ir.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
17→32 metro.compiler.symbols uses metro.compilerpart of a loop✕
Connections
2 pairs of types, where a type in metro.compiler.symbols uses a type in metro.compiler.
metro.compiler.symbols uses metro.compiler, so a change to metro.compiler can break metro.compiler.symbols, while a change to metro.compiler.symbols can't break metro.compiler.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
metro.compiler.api.fir uses metro.compiler.api.fir.MetroContributionExtension, so a change to metro.compiler.api.fir.MetroContributionExtension can break metro.compiler.api.fir, while a change to metro.compiler.api.fir can't break metro.compiler.api.fir.MetroContributionExtension.
Position
Below the diagonal: metro.compiler.api.fir uses a module listed above it, which is the healthy direction.
metro.compiler.api.fir uses metro.compiler.api.fir.MetroContributionHintExtension, so a change to metro.compiler.api.fir.MetroContributionHintExtension can break metro.compiler.api.fir, while a change to metro.compiler.api.fir can't break metro.compiler.api.fir.MetroContributionHintExtension.
Position
Below the diagonal: metro.compiler.api.fir uses a module listed above it, which is the healthy direction.
metro.compiler.api.fir uses metro.compiler.api.fir.MetroFirDeclarationGenerationExtension, so a change to metro.compiler.api.fir.MetroFirDeclarationGenerationExtension can break metro.compiler.api.fir, while a change to metro.compiler.api.fir can't break metro.compiler.api.fir.MetroFirDeclarationGenerationExtension.
Position
Below the diagonal: metro.compiler.api.fir uses a module listed above it, which is the healthy direction.
metro.compiler.ir.parameters uses metro.compiler.symbols, so a change to metro.compiler.symbols can break metro.compiler.ir.parameters, while a change to metro.compiler.ir.parameters can't break metro.compiler.symbols.
Position
Below the diagonal: metro.compiler.ir.parameters uses a module listed above it, which is the healthy direction.
19→31 metro.compiler.ir.parameters uses metro.compiler.irpart of a loop✕
Connections
5 pairs of types, where a type in metro.compiler.ir.parameters uses a type in metro.compiler.ir.
metro.compiler.ir.parameters uses metro.compiler.ir, so a change to metro.compiler.ir can break metro.compiler.ir.parameters, while a change to metro.compiler.ir.parameters can't break metro.compiler.ir.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
19→32 metro.compiler.ir.parameters uses metro.compilerpart of a loop✕
Connections
1 pair of types, where a type in metro.compiler.ir.parameters uses a type in metro.compiler.
metro.compiler.ir.parameters uses metro.compiler, so a change to metro.compiler can break metro.compiler.ir.parameters, while a change to metro.compiler.ir.parameters can't break metro.compiler.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
metro.idea.model uses metro.compiler.graph.explanation, so a change to metro.compiler.graph.explanation can break metro.idea.model, while a change to metro.idea.model can't break metro.compiler.graph.explanation.
Position
Below the diagonal: metro.idea.model uses a module listed above it, which is the healthy direction.
metro.idea.model uses metro.compiler.graph.identity, so a change to metro.compiler.graph.identity can break metro.idea.model, while a change to metro.idea.model can't break metro.compiler.graph.identity.
Position
Below the diagonal: metro.idea.model uses a module listed above it, which is the healthy direction.
30 pairs of types, where a type in metro.idea.model uses a type in metro.idea.model.BindingIndex. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
metro.idea.model uses metro.idea.model.BindingIndex, so a change to metro.idea.model.BindingIndex can break metro.idea.model, while a change to metro.idea.model can't break metro.idea.model.BindingIndex.
Position
Below the diagonal: metro.idea.model uses a module listed above it, which is the healthy direction.
metro.idea.model uses metro.compiler.diagnostics, so a change to metro.compiler.diagnostics can break metro.idea.model, while a change to metro.idea.model can't break metro.compiler.diagnostics.
Position
Below the diagonal: metro.idea.model uses a module listed above it, which is the healthy direction.
metro.idea.model uses metro.compiler.graph, so a change to metro.compiler.graph can break metro.idea.model, while a change to metro.idea.model can't break metro.compiler.graph.
Position
Below the diagonal: metro.idea.model uses a module listed above it, which is the healthy direction.
metro.compiler.fir uses metro.compiler.graph.identity, so a change to metro.compiler.graph.identity can break metro.compiler.fir, while a change to metro.compiler.fir can't break metro.compiler.graph.identity.
Position
Below the diagonal: metro.compiler.fir uses a module listed above it, which is the healthy direction.
metro.compiler.fir uses metro.compiler.compat.CompatContext, so a change to metro.compiler.compat.CompatContext can break metro.compiler.fir, while a change to metro.compiler.fir can't break metro.compiler.compat.CompatContext.
Position
Below the diagonal: metro.compiler.fir uses a module listed above it, which is the healthy direction.
metro.compiler.fir uses metro.compiler.tracing, so a change to metro.compiler.tracing can break metro.compiler.fir, while a change to metro.compiler.fir can't break metro.compiler.tracing.
Position
Below the diagonal: metro.compiler.fir uses a module listed above it, which is the healthy direction.
metro.compiler.fir uses metro.compiler.compat, so a change to metro.compiler.compat can break metro.compiler.fir, while a change to metro.compiler.fir can't break metro.compiler.compat.
Position
Below the diagonal: metro.compiler.fir uses a module listed above it, which is the healthy direction.
metro.compiler.fir uses metro.compiler.graph, so a change to metro.compiler.graph can break metro.compiler.fir, while a change to metro.compiler.fir can't break metro.compiler.graph.
Position
Below the diagonal: metro.compiler.fir uses a module listed above it, which is the healthy direction.
metro.compiler.fir uses metro.compiler.api.fir, so a change to metro.compiler.api.fir can break metro.compiler.fir, while a change to metro.compiler.fir can't break metro.compiler.api.fir.
Position
Below the diagonal: metro.compiler.fir uses a module listed above it, which is the healthy direction.
21→32 metro.compiler.fir uses metro.compilerpart of a loop✕
Connections
11 pairs of types, where a type in metro.compiler.fir uses a type in metro.compiler.
metro.compiler.fir uses metro.compiler, so a change to metro.compiler can break metro.compiler.fir, while a change to metro.compiler.fir can't break metro.compiler.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
metro.compiler.ir.graph.GraphNode uses metro.compiler.graph.explanation, so a change to metro.compiler.graph.explanation can break metro.compiler.ir.graph.GraphNode, while a change to metro.compiler.ir.graph.GraphNode can't break metro.compiler.graph.explanation.
Position
Below the diagonal: metro.compiler.ir.graph.GraphNode uses a module listed above it, which is the healthy direction.
metro.compiler.ir.graph.GraphNode uses metro.compiler.ir.parameters, so a change to metro.compiler.ir.parameters can break metro.compiler.ir.graph.GraphNode, while a change to metro.compiler.ir.graph.GraphNode can't break metro.compiler.ir.parameters.
Position
Below the diagonal: metro.compiler.ir.graph.GraphNode uses a module listed above it, which is the healthy direction.
22→30 metro.compiler.ir.graph.GraphNode uses metro.compiler.ir.graphpart of a loop✕
Connections
7 pairs of types, where a type in metro.compiler.ir.graph.GraphNode uses a type in metro.compiler.ir.graph.
metro.compiler.ir.graph.GraphNode uses metro.compiler.ir.graph, so a change to metro.compiler.ir.graph can break metro.compiler.ir.graph.GraphNode, while a change to metro.compiler.ir.graph.GraphNode can't break metro.compiler.ir.graph.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
22→31 metro.compiler.ir.graph.GraphNode uses metro.compiler.irpart of a loop✕
Connections
15 pairs of types, where a type in metro.compiler.ir.graph.GraphNode uses a type in metro.compiler.ir.
metro.compiler.ir.graph.GraphNode uses metro.compiler.ir, so a change to metro.compiler.ir can break metro.compiler.ir.graph.GraphNode, while a change to metro.compiler.ir.graph.GraphNode can't break metro.compiler.ir.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
22→32 metro.compiler.ir.graph.GraphNode uses metro.compilerpart of a loop✕
Connections
1 pair of types, where a type in metro.compiler.ir.graph.GraphNode uses a type in metro.compiler.
metro.compiler.ir.graph.GraphNode uses metro.compiler, so a change to metro.compiler can break metro.compiler.ir.graph.GraphNode, while a change to metro.compiler.ir.graph.GraphNode can't break metro.compiler.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
metro.compiler.ir.graph.IrBinding uses metro.compiler.diagnostics, so a change to metro.compiler.diagnostics can break metro.compiler.ir.graph.IrBinding, while a change to metro.compiler.ir.graph.IrBinding can't break metro.compiler.diagnostics.
Position
Below the diagonal: metro.compiler.ir.graph.IrBinding uses a module listed above it, which is the healthy direction.
metro.compiler.ir.graph.IrBinding uses metro.compiler.graph, so a change to metro.compiler.graph can break metro.compiler.ir.graph.IrBinding, while a change to metro.compiler.ir.graph.IrBinding can't break metro.compiler.graph.
Position
Below the diagonal: metro.compiler.ir.graph.IrBinding uses a module listed above it, which is the healthy direction.
metro.compiler.ir.graph.IrBinding uses metro.compiler.ir.parameters, so a change to metro.compiler.ir.parameters can break metro.compiler.ir.graph.IrBinding, while a change to metro.compiler.ir.graph.IrBinding can't break metro.compiler.ir.parameters.
Position
Below the diagonal: metro.compiler.ir.graph.IrBinding uses a module listed above it, which is the healthy direction.
23→30 metro.compiler.ir.graph.IrBinding uses metro.compiler.ir.graphpart of a loop✕
Connections
16 pairs of types, where a type in metro.compiler.ir.graph.IrBinding uses a type in metro.compiler.ir.graph.
metro.compiler.ir.graph.IrBinding uses metro.compiler.ir.graph, so a change to metro.compiler.ir.graph can break metro.compiler.ir.graph.IrBinding, while a change to metro.compiler.ir.graph.IrBinding can't break metro.compiler.ir.graph.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
23→31 metro.compiler.ir.graph.IrBinding uses metro.compiler.irpart of a loop✕
Connections
45 pairs of types, where a type in metro.compiler.ir.graph.IrBinding uses a type in metro.compiler.ir. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
metro.compiler.ir.graph.IrBinding uses metro.compiler.ir, so a change to metro.compiler.ir can break metro.compiler.ir.graph.IrBinding, while a change to metro.compiler.ir.graph.IrBinding can't break metro.compiler.ir.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
23→32 metro.compiler.ir.graph.IrBinding uses metro.compilerpart of a loop✕
Connections
6 pairs of types, where a type in metro.compiler.ir.graph.IrBinding uses a type in metro.compiler.
metro.compiler.ir.graph.IrBinding uses metro.compiler, so a change to metro.compiler can break metro.compiler.ir.graph.IrBinding, while a change to metro.compiler.ir.graph.IrBinding can't break metro.compiler.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
metro.compiler.circuit uses metro.compiler.compat.CompatContext, so a change to metro.compiler.compat.CompatContext can break metro.compiler.circuit, while a change to metro.compiler.circuit can't break metro.compiler.compat.CompatContext.
Position
Below the diagonal: metro.compiler.circuit uses a module listed above it, which is the healthy direction.
metro.compiler.circuit uses metro.compiler.compat, so a change to metro.compiler.compat can break metro.compiler.circuit, while a change to metro.compiler.circuit can't break metro.compiler.compat.
Position
Below the diagonal: metro.compiler.circuit uses a module listed above it, which is the healthy direction.
metro.compiler.circuit uses metro.compiler.api.fir.MetroContributionExtension, so a change to metro.compiler.api.fir.MetroContributionExtension can break metro.compiler.circuit, while a change to metro.compiler.circuit can't break metro.compiler.api.fir.MetroContributionExtension.
Position
Below the diagonal: metro.compiler.circuit uses a module listed above it, which is the healthy direction.
metro.compiler.circuit uses metro.compiler.api.fir.MetroContributionHintExtension, so a change to metro.compiler.api.fir.MetroContributionHintExtension can break metro.compiler.circuit, while a change to metro.compiler.circuit can't break metro.compiler.api.fir.MetroContributionHintExtension.
Position
Below the diagonal: metro.compiler.circuit uses a module listed above it, which is the healthy direction.
metro.compiler.circuit uses metro.compiler.api.fir, so a change to metro.compiler.api.fir can break metro.compiler.circuit, while a change to metro.compiler.circuit can't break metro.compiler.api.fir.
Position
Below the diagonal: metro.compiler.circuit uses a module listed above it, which is the healthy direction.
metro.compiler.circuit uses metro.compiler.fir, so a change to metro.compiler.fir can break metro.compiler.circuit, while a change to metro.compiler.circuit can't break metro.compiler.fir.
Position
Below the diagonal: metro.compiler.circuit uses a module listed above it, which is the healthy direction.
metro.compiler.ir.graph.IrBindingGraph uses metro.compiler.diagnostics, so a change to metro.compiler.diagnostics can break metro.compiler.ir.graph.IrBindingGraph, while a change to metro.compiler.ir.graph.IrBindingGraph can't break metro.compiler.diagnostics.
Position
Below the diagonal: metro.compiler.ir.graph.IrBindingGraph uses a module listed above it, which is the healthy direction.
metro.compiler.ir.graph.IrBindingGraph uses metro.compiler.graph, so a change to metro.compiler.graph can break metro.compiler.ir.graph.IrBindingGraph, while a change to metro.compiler.ir.graph.IrBindingGraph can't break metro.compiler.graph.
Position
Below the diagonal: metro.compiler.ir.graph.IrBindingGraph uses a module listed above it, which is the healthy direction.
metro.compiler.ir.graph.IrBindingGraph uses metro.compiler.ir.graph.IrBinding, so a change to metro.compiler.ir.graph.IrBinding can break metro.compiler.ir.graph.IrBindingGraph, while a change to metro.compiler.ir.graph.IrBindingGraph can't break metro.compiler.ir.graph.IrBinding.
Position
Below the diagonal: metro.compiler.ir.graph.IrBindingGraph uses a module listed above it, which is the healthy direction.
25→30 metro.compiler.ir.graph.IrBindingGraph uses metro.compiler.ir.graphpart of a loop✕
Connections
1 pair of types, where a type in metro.compiler.ir.graph.IrBindingGraph uses a type in metro.compiler.ir.graph.
metro.compiler.ir.graph.IrBindingGraph uses metro.compiler.ir.graph, so a change to metro.compiler.ir.graph can break metro.compiler.ir.graph.IrBindingGraph, while a change to metro.compiler.ir.graph.IrBindingGraph can't break metro.compiler.ir.graph.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
25→31 metro.compiler.ir.graph.IrBindingGraph uses metro.compiler.irpart of a loop✕
Connections
3 pairs of types, where a type in metro.compiler.ir.graph.IrBindingGraph uses a type in metro.compiler.ir.
metro.compiler.ir.graph.IrBindingGraph uses metro.compiler.ir, so a change to metro.compiler.ir can break metro.compiler.ir.graph.IrBindingGraph, while a change to metro.compiler.ir.graph.IrBindingGraph can't break metro.compiler.ir.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
metro.compiler.ir.graph.expressions uses metro.compiler.tracing, so a change to metro.compiler.tracing can break metro.compiler.ir.graph.expressions, while a change to metro.compiler.ir.graph.expressions can't break metro.compiler.tracing.
Position
Below the diagonal: metro.compiler.ir.graph.expressions uses a module listed above it, which is the healthy direction.
metro.compiler.ir.graph.expressions uses metro.compiler.graph, so a change to metro.compiler.graph can break metro.compiler.ir.graph.expressions, while a change to metro.compiler.ir.graph.expressions can't break metro.compiler.graph.
Position
Below the diagonal: metro.compiler.ir.graph.expressions uses a module listed above it, which is the healthy direction.
metro.compiler.ir.graph.expressions uses metro.compiler.symbols, so a change to metro.compiler.symbols can break metro.compiler.ir.graph.expressions, while a change to metro.compiler.ir.graph.expressions can't break metro.compiler.symbols.
Position
Below the diagonal: metro.compiler.ir.graph.expressions uses a module listed above it, which is the healthy direction.
metro.compiler.ir.graph.expressions uses metro.compiler.ir.parameters, so a change to metro.compiler.ir.parameters can break metro.compiler.ir.graph.expressions, while a change to metro.compiler.ir.graph.expressions can't break metro.compiler.ir.parameters.
Position
Below the diagonal: metro.compiler.ir.graph.expressions uses a module listed above it, which is the healthy direction.
metro.compiler.ir.graph.expressions uses metro.compiler.ir.graph.GraphNode, so a change to metro.compiler.ir.graph.GraphNode can break metro.compiler.ir.graph.expressions, while a change to metro.compiler.ir.graph.expressions can't break metro.compiler.ir.graph.GraphNode.
Position
Below the diagonal: metro.compiler.ir.graph.expressions uses a module listed above it, which is the healthy direction.
metro.compiler.ir.graph.expressions uses metro.compiler.ir.graph.IrBinding, so a change to metro.compiler.ir.graph.IrBinding can break metro.compiler.ir.graph.expressions, while a change to metro.compiler.ir.graph.expressions can't break metro.compiler.ir.graph.IrBinding.
Position
Below the diagonal: metro.compiler.ir.graph.expressions uses a module listed above it, which is the healthy direction.
26→30 metro.compiler.ir.graph.expressions uses metro.compiler.ir.graphpart of a loop✕
Connections
9 pairs of types, where a type in metro.compiler.ir.graph.expressions uses a type in metro.compiler.ir.graph.
metro.compiler.ir.graph.expressions uses metro.compiler.ir.graph, so a change to metro.compiler.ir.graph can break metro.compiler.ir.graph.expressions, while a change to metro.compiler.ir.graph.expressions can't break metro.compiler.ir.graph.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
26→31 metro.compiler.ir.graph.expressions uses metro.compiler.irpart of a loop✕
Connections
17 pairs of types, where a type in metro.compiler.ir.graph.expressions uses a type in metro.compiler.ir.
metro.compiler.ir.graph.expressions uses metro.compiler.ir, so a change to metro.compiler.ir can break metro.compiler.ir.graph.expressions, while a change to metro.compiler.ir.graph.expressions can't break metro.compiler.ir.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
metro.compiler.ir.graph.reporting uses metro.compiler.graph.explanation, so a change to metro.compiler.graph.explanation can break metro.compiler.ir.graph.reporting, while a change to metro.compiler.ir.graph.reporting can't break metro.compiler.graph.explanation.
Position
Below the diagonal: metro.compiler.ir.graph.reporting uses a module listed above it, which is the healthy direction.
metro.compiler.ir.graph.reporting uses metro.compiler.ir.graph.IrBindingStack, so a change to metro.compiler.ir.graph.IrBindingStack can break metro.compiler.ir.graph.reporting, while a change to metro.compiler.ir.graph.reporting can't break metro.compiler.ir.graph.IrBindingStack.
Position
Below the diagonal: metro.compiler.ir.graph.reporting uses a module listed above it, which is the healthy direction.
metro.compiler.ir.graph.reporting uses metro.compiler.ir.graph.GraphNode, so a change to metro.compiler.ir.graph.GraphNode can break metro.compiler.ir.graph.reporting, while a change to metro.compiler.ir.graph.reporting can't break metro.compiler.ir.graph.GraphNode.
Position
Below the diagonal: metro.compiler.ir.graph.reporting uses a module listed above it, which is the healthy direction.
27→30 metro.compiler.ir.graph.reporting uses metro.compiler.ir.graphpart of a loop✕
Connections
2 pairs of types, where a type in metro.compiler.ir.graph.reporting uses a type in metro.compiler.ir.graph.
metro.compiler.ir.graph.reporting uses metro.compiler.ir.graph, so a change to metro.compiler.ir.graph can break metro.compiler.ir.graph.reporting, while a change to metro.compiler.ir.graph.reporting can't break metro.compiler.ir.graph.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
27→31 metro.compiler.ir.graph.reporting uses metro.compiler.irpart of a loop✕
Connections
5 pairs of types, where a type in metro.compiler.ir.graph.reporting uses a type in metro.compiler.ir.
metro.compiler.ir.graph.reporting uses metro.compiler.ir, so a change to metro.compiler.ir can break metro.compiler.ir.graph.reporting, while a change to metro.compiler.ir.graph.reporting can't break metro.compiler.ir.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
metro.compiler.ir.graph.expressions.GraphExpressionGenerator uses metro.compiler.tracing, so a change to metro.compiler.tracing can break metro.compiler.ir.graph.expressions.GraphExpressionGenerator, while a change to metro.compiler.ir.graph.expressions.GraphExpressionGenerator can't break metro.compiler.tracing.
Position
Below the diagonal: metro.compiler.ir.graph.expressions.GraphExpressionGenerator uses a module listed above it, which is the healthy direction.
metro.compiler.ir.graph.expressions.GraphExpressionGenerator uses metro.compiler.ir.graph.GraphNode, so a change to metro.compiler.ir.graph.GraphNode can break metro.compiler.ir.graph.expressions.GraphExpressionGenerator, while a change to metro.compiler.ir.graph.expressions.GraphExpressionGenerator can't break metro.compiler.ir.graph.GraphNode.
Position
Below the diagonal: metro.compiler.ir.graph.expressions.GraphExpressionGenerator uses a module listed above it, which is the healthy direction.
metro.compiler.ir.graph.expressions.GraphExpressionGenerator uses metro.compiler.ir.graph.expressions, so a change to metro.compiler.ir.graph.expressions can break metro.compiler.ir.graph.expressions.GraphExpressionGenerator, while a change to metro.compiler.ir.graph.expressions.GraphExpressionGenerator can't break metro.compiler.ir.graph.expressions.
Position
Below the diagonal: metro.compiler.ir.graph.expressions.GraphExpressionGenerator uses a module listed above it, which is the healthy direction.
28→30 metro.compiler.ir.graph.expressions.GraphExpressionGenerator uses metro.compiler.ir.graphpart of a loop✕
Connections
4 pairs of types, where a type in metro.compiler.ir.graph.expressions.GraphExpressionGenerator uses a type in metro.compiler.ir.graph.
metro.compiler.ir.graph.expressions.GraphExpressionGenerator uses metro.compiler.ir.graph, so a change to metro.compiler.ir.graph can break metro.compiler.ir.graph.expressions.GraphExpressionGenerator, while a change to metro.compiler.ir.graph.expressions.GraphExpressionGenerator can't break metro.compiler.ir.graph.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
28→31 metro.compiler.ir.graph.expressions.GraphExpressionGenerator uses metro.compiler.irpart of a loop✕
Connections
3 pairs of types, where a type in metro.compiler.ir.graph.expressions.GraphExpressionGenerator uses a type in metro.compiler.ir.
metro.compiler.ir.graph.expressions.GraphExpressionGenerator uses metro.compiler.ir, so a change to metro.compiler.ir can break metro.compiler.ir.graph.expressions.GraphExpressionGenerator, while a change to metro.compiler.ir.graph.expressions.GraphExpressionGenerator can't break metro.compiler.ir.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
metro.compiler.ir.transformers uses metro.compiler.tracing, so a change to metro.compiler.tracing can break metro.compiler.ir.transformers, while a change to metro.compiler.ir.transformers can't break metro.compiler.tracing.
Position
Below the diagonal: metro.compiler.ir.transformers uses a module listed above it, which is the healthy direction.
metro.compiler.ir.transformers uses metro.compiler.ir.parameters, so a change to metro.compiler.ir.parameters can break metro.compiler.ir.transformers, while a change to metro.compiler.ir.transformers can't break metro.compiler.ir.parameters.
Position
Below the diagonal: metro.compiler.ir.transformers uses a module listed above it, which is the healthy direction.
metro.compiler.ir.transformers uses metro.compiler.ir.graph.GraphNode, so a change to metro.compiler.ir.graph.GraphNode can break metro.compiler.ir.transformers, while a change to metro.compiler.ir.transformers can't break metro.compiler.ir.graph.GraphNode.
Position
Below the diagonal: metro.compiler.ir.transformers uses a module listed above it, which is the healthy direction.
metro.compiler.ir.transformers uses metro.compiler.ir.graph.IrBinding, so a change to metro.compiler.ir.graph.IrBinding can break metro.compiler.ir.transformers, while a change to metro.compiler.ir.transformers can't break metro.compiler.ir.graph.IrBinding.
Position
Below the diagonal: metro.compiler.ir.transformers uses a module listed above it, which is the healthy direction.
metro.compiler.ir.transformers uses metro.compiler.ir.graph.IrBindingGraph, so a change to metro.compiler.ir.graph.IrBindingGraph can break metro.compiler.ir.transformers, while a change to metro.compiler.ir.transformers can't break metro.compiler.ir.graph.IrBindingGraph.
Position
Below the diagonal: metro.compiler.ir.transformers uses a module listed above it, which is the healthy direction.
metro.compiler.ir.transformers uses metro.compiler.ir.graph.expressions, so a change to metro.compiler.ir.graph.expressions can break metro.compiler.ir.transformers, while a change to metro.compiler.ir.transformers can't break metro.compiler.ir.graph.expressions.
Position
Below the diagonal: metro.compiler.ir.transformers uses a module listed above it, which is the healthy direction.
29→30 metro.compiler.ir.transformers uses metro.compiler.ir.graphpart of a loop✕
Connections
7 pairs of types, where a type in metro.compiler.ir.transformers uses a type in metro.compiler.ir.graph.
metro.compiler.ir.transformers uses metro.compiler.ir.graph, so a change to metro.compiler.ir.graph can break metro.compiler.ir.transformers, while a change to metro.compiler.ir.transformers can't break metro.compiler.ir.graph.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
29→31 metro.compiler.ir.transformers uses metro.compiler.irpart of a loop✕
Connections
54 pairs of types, where a type in metro.compiler.ir.transformers uses a type in metro.compiler.ir. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
metro.compiler.ir.transformers uses metro.compiler.ir, so a change to metro.compiler.ir can break metro.compiler.ir.transformers, while a change to metro.compiler.ir.transformers can't break metro.compiler.ir.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
29→32 metro.compiler.ir.transformers uses metro.compilerpart of a loop✕
Connections
6 pairs of types, where a type in metro.compiler.ir.transformers uses a type in metro.compiler.
metro.compiler.ir.transformers uses metro.compiler, so a change to metro.compiler can break metro.compiler.ir.transformers, while a change to metro.compiler.ir.transformers can't break metro.compiler.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
metro.compiler.ir.graph uses metro.compiler.graph.identity, so a change to metro.compiler.graph.identity can break metro.compiler.ir.graph, while a change to metro.compiler.ir.graph can't break metro.compiler.graph.identity.
Position
Below the diagonal: metro.compiler.ir.graph uses a module listed above it, which is the healthy direction.
metro.compiler.ir.graph uses metro.compiler.tracing, so a change to metro.compiler.tracing can break metro.compiler.ir.graph, while a change to metro.compiler.ir.graph can't break metro.compiler.tracing.
Position
Below the diagonal: metro.compiler.ir.graph uses a module listed above it, which is the healthy direction.
metro.compiler.ir.graph uses metro.compiler.diagnostics, so a change to metro.compiler.diagnostics can break metro.compiler.ir.graph, while a change to metro.compiler.ir.graph can't break metro.compiler.diagnostics.
Position
Below the diagonal: metro.compiler.ir.graph uses a module listed above it, which is the healthy direction.
metro.compiler.ir.graph uses metro.compiler.graph, so a change to metro.compiler.graph can break metro.compiler.ir.graph, while a change to metro.compiler.ir.graph can't break metro.compiler.graph.
Position
Below the diagonal: metro.compiler.ir.graph uses a module listed above it, which is the healthy direction.
metro.compiler.ir.graph uses metro.compiler.ir.graph.IrBindingStack, so a change to metro.compiler.ir.graph.IrBindingStack can break metro.compiler.ir.graph, while a change to metro.compiler.ir.graph can't break metro.compiler.ir.graph.IrBindingStack.
Position
Below the diagonal: metro.compiler.ir.graph uses a module listed above it, which is the healthy direction.
metro.compiler.ir.graph uses metro.compiler.ir.parameters, so a change to metro.compiler.ir.parameters can break metro.compiler.ir.graph, while a change to metro.compiler.ir.graph can't break metro.compiler.ir.parameters.
Position
Below the diagonal: metro.compiler.ir.graph uses a module listed above it, which is the healthy direction.
metro.compiler.ir.graph uses metro.compiler.ir.graph.GraphNode, so a change to metro.compiler.ir.graph.GraphNode can break metro.compiler.ir.graph, while a change to metro.compiler.ir.graph can't break metro.compiler.ir.graph.GraphNode.
Position
Below the diagonal: metro.compiler.ir.graph uses a module listed above it, which is the healthy direction.
metro.compiler.ir.graph uses metro.compiler.ir.graph.IrBinding, so a change to metro.compiler.ir.graph.IrBinding can break metro.compiler.ir.graph, while a change to metro.compiler.ir.graph can't break metro.compiler.ir.graph.IrBinding.
Position
Below the diagonal: metro.compiler.ir.graph uses a module listed above it, which is the healthy direction.
metro.compiler.ir.graph uses metro.compiler.ir.graph.IrBindingGraph, so a change to metro.compiler.ir.graph.IrBindingGraph can break metro.compiler.ir.graph, while a change to metro.compiler.ir.graph can't break metro.compiler.ir.graph.IrBindingGraph.
Position
Below the diagonal: metro.compiler.ir.graph uses a module listed above it, which is the healthy direction.
metro.compiler.ir.graph uses metro.compiler.ir.graph.expressions, so a change to metro.compiler.ir.graph.expressions can break metro.compiler.ir.graph, while a change to metro.compiler.ir.graph can't break metro.compiler.ir.graph.expressions.
Position
Below the diagonal: metro.compiler.ir.graph uses a module listed above it, which is the healthy direction.
metro.compiler.ir.graph uses metro.compiler.ir.graph.reporting, so a change to metro.compiler.ir.graph.reporting can break metro.compiler.ir.graph, while a change to metro.compiler.ir.graph can't break metro.compiler.ir.graph.reporting.
Position
Below the diagonal: metro.compiler.ir.graph uses a module listed above it, which is the healthy direction.
metro.compiler.ir.graph uses metro.compiler.ir.graph.expressions.GraphExpressionGenerator, so a change to metro.compiler.ir.graph.expressions.GraphExpressionGenerator can break metro.compiler.ir.graph, while a change to metro.compiler.ir.graph can't break metro.compiler.ir.graph.expressions.GraphExpressionGenerator.
Position
Below the diagonal: metro.compiler.ir.graph uses a module listed above it, which is the healthy direction.
metro.compiler.ir.graph uses metro.compiler.ir.transformers, so a change to metro.compiler.ir.transformers can break metro.compiler.ir.graph, while a change to metro.compiler.ir.graph can't break metro.compiler.ir.transformers.
Position
Below the diagonal: metro.compiler.ir.graph uses a module listed above it, which is the healthy direction.
30→31 metro.compiler.ir.graph uses metro.compiler.irpart of a loop✕
Connections
120 pairs of types, where a type in metro.compiler.ir.graph uses a type in metro.compiler.ir. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
metro.compiler.ir.graph uses metro.compiler.ir, so a change to metro.compiler.ir can break metro.compiler.ir.graph, while a change to metro.compiler.ir.graph can't break metro.compiler.ir.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
30→32 metro.compiler.ir.graph uses metro.compilerpart of a loop✕
Connections
7 pairs of types, where a type in metro.compiler.ir.graph uses a type in metro.compiler.
metro.compiler.ir.graph uses metro.compiler, so a change to metro.compiler can break metro.compiler.ir.graph, while a change to metro.compiler.ir.graph can't break metro.compiler.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
metro.compiler.ir uses metro.compiler.graph.explanation, so a change to metro.compiler.graph.explanation can break metro.compiler.ir, while a change to metro.compiler.ir can't break metro.compiler.graph.explanation.
Position
Below the diagonal: metro.compiler.ir uses a module listed above it, which is the healthy direction.
metro.compiler.ir uses metro.compiler.graph.identity, so a change to metro.compiler.graph.identity can break metro.compiler.ir, while a change to metro.compiler.ir can't break metro.compiler.graph.identity.
Position
Below the diagonal: metro.compiler.ir uses a module listed above it, which is the healthy direction.
metro.compiler.ir uses metro.compiler.compat.CompatContext, so a change to metro.compiler.compat.CompatContext can break metro.compiler.ir, while a change to metro.compiler.ir can't break metro.compiler.compat.CompatContext.
Position
Below the diagonal: metro.compiler.ir uses a module listed above it, which is the healthy direction.
metro.compiler.ir uses metro.compiler.diagnostics.render, so a change to metro.compiler.diagnostics.render can break metro.compiler.ir, while a change to metro.compiler.ir can't break metro.compiler.diagnostics.render.
Position
Below the diagonal: metro.compiler.ir uses a module listed above it, which is the healthy direction.
metro.compiler.ir uses metro.compiler.tracing, so a change to metro.compiler.tracing can break metro.compiler.ir, while a change to metro.compiler.ir can't break metro.compiler.tracing.
Position
Below the diagonal: metro.compiler.ir uses a module listed above it, which is the healthy direction.
metro.compiler.ir uses metro.compiler.compat, so a change to metro.compiler.compat can break metro.compiler.ir, while a change to metro.compiler.ir can't break metro.compiler.compat.
Position
Below the diagonal: metro.compiler.ir uses a module listed above it, which is the healthy direction.
metro.compiler.ir uses metro.compiler.diagnostics, so a change to metro.compiler.diagnostics can break metro.compiler.ir, while a change to metro.compiler.ir can't break metro.compiler.diagnostics.
Position
Below the diagonal: metro.compiler.ir uses a module listed above it, which is the healthy direction.
metro.compiler.ir uses metro.compiler.graph, so a change to metro.compiler.graph can break metro.compiler.ir, while a change to metro.compiler.ir can't break metro.compiler.graph.
Position
Below the diagonal: metro.compiler.ir uses a module listed above it, which is the healthy direction.
metro.compiler.ir uses metro.compiler.symbols, so a change to metro.compiler.symbols can break metro.compiler.ir, while a change to metro.compiler.ir can't break metro.compiler.symbols.
Position
Below the diagonal: metro.compiler.ir uses a module listed above it, which is the healthy direction.
metro.compiler.ir uses metro.compiler.ir.parameters, so a change to metro.compiler.ir.parameters can break metro.compiler.ir, while a change to metro.compiler.ir can't break metro.compiler.ir.parameters.
Position
Below the diagonal: metro.compiler.ir uses a module listed above it, which is the healthy direction.
metro.compiler.ir uses metro.compiler.ir.graph.IrBinding, so a change to metro.compiler.ir.graph.IrBinding can break metro.compiler.ir, while a change to metro.compiler.ir can't break metro.compiler.ir.graph.IrBinding.
Position
Below the diagonal: metro.compiler.ir uses a module listed above it, which is the healthy direction.
metro.compiler.ir uses metro.compiler.ir.graph.expressions, so a change to metro.compiler.ir.graph.expressions can break metro.compiler.ir, while a change to metro.compiler.ir can't break metro.compiler.ir.graph.expressions.
Position
Below the diagonal: metro.compiler.ir uses a module listed above it, which is the healthy direction.
metro.compiler.ir uses metro.compiler.ir.transformers, so a change to metro.compiler.ir.transformers can break metro.compiler.ir, while a change to metro.compiler.ir can't break metro.compiler.ir.transformers.
Position
Below the diagonal: metro.compiler.ir uses a module listed above it, which is the healthy direction.
metro.compiler.ir uses metro.compiler.ir.graph, so a change to metro.compiler.ir.graph can break metro.compiler.ir, while a change to metro.compiler.ir can't break metro.compiler.ir.graph.
Position
Below the diagonal: metro.compiler.ir uses a module listed above it, which is the healthy direction.
31→32 metro.compiler.ir uses metro.compilerpart of a loop✕
Connections
18 pairs of types, where a type in metro.compiler.ir uses a type in metro.compiler.
metro.compiler.ir uses metro.compiler, so a change to metro.compiler can break metro.compiler.ir, while a change to metro.compiler.ir can't break metro.compiler.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
metro.compiler uses metro.compiler.compat, so a change to metro.compiler.compat can break metro.compiler, while a change to metro.compiler can't break metro.compiler.compat.
Position
Below the diagonal: metro.compiler uses a module listed above it, which is the healthy direction.
metro.compiler uses metro.compiler.fir, so a change to metro.compiler.fir can break metro.compiler, while a change to metro.compiler can't break metro.compiler.fir.
Position
Below the diagonal: metro.compiler uses a module listed above it, which is the healthy direction.
metro.compiler uses metro.compiler.ir, so a change to metro.compiler.ir can break metro.compiler, while a change to metro.compiler can't break metro.compiler.ir.
Position
Below the diagonal: metro.compiler uses a module listed above it, which is the healthy direction.
metro.compiler.hilt uses metro.compiler.compat, so a change to metro.compiler.compat can break metro.compiler.hilt, while a change to metro.compiler.hilt can't break metro.compiler.compat.
Position
Below the diagonal: metro.compiler.hilt uses a module listed above it, which is the healthy direction.
metro.compiler.hilt uses metro.compiler.api.fir.MetroContributionExtension, so a change to metro.compiler.api.fir.MetroContributionExtension can break metro.compiler.hilt, while a change to metro.compiler.hilt can't break metro.compiler.api.fir.MetroContributionExtension.
Position
Below the diagonal: metro.compiler.hilt uses a module listed above it, which is the healthy direction.
metro.compiler.hilt uses metro.compiler.api.fir.MetroContributionHintExtension, so a change to metro.compiler.api.fir.MetroContributionHintExtension can break metro.compiler.hilt, while a change to metro.compiler.hilt can't break metro.compiler.api.fir.MetroContributionHintExtension.
Position
Below the diagonal: metro.compiler.hilt uses a module listed above it, which is the healthy direction.
metro.compiler.hilt uses metro.compiler.api.fir.MetroFirDeclarationGenerationExtension, so a change to metro.compiler.api.fir.MetroFirDeclarationGenerationExtension can break metro.compiler.hilt, while a change to metro.compiler.hilt can't break metro.compiler.api.fir.MetroFirDeclarationGenerationExtension.
Position
Below the diagonal: metro.compiler.hilt uses a module listed above it, which is the healthy direction.
metro.compiler.hilt uses metro.compiler.api.fir, so a change to metro.compiler.api.fir can break metro.compiler.hilt, while a change to metro.compiler.hilt can't break metro.compiler.api.fir.
Position
Below the diagonal: metro.compiler.hilt uses a module listed above it, which is the healthy direction.
metro.compiler.hilt uses metro.compiler.fir, so a change to metro.compiler.fir can break metro.compiler.hilt, while a change to metro.compiler.hilt can't break metro.compiler.fir.
Position
Below the diagonal: metro.compiler.hilt uses a module listed above it, which is the healthy direction.
metro.compiler.hilt uses metro.compiler, so a change to metro.compiler can break metro.compiler.hilt, while a change to metro.compiler.hilt can't break metro.compiler.
Position
Below the diagonal: metro.compiler.hilt uses a module listed above it, which is the healthy direction.
metro.idea.graph uses metro.compiler.tracing, so a change to metro.compiler.tracing can break metro.idea.graph, while a change to metro.idea.graph can't break metro.compiler.tracing.
Position
Below the diagonal: metro.idea.graph uses a module listed above it, which is the healthy direction.
metro.idea.graph uses metro.idea.model.BindingIndex, so a change to metro.idea.model.BindingIndex can break metro.idea.graph, while a change to metro.idea.graph can't break metro.idea.model.BindingIndex.
Position
Below the diagonal: metro.idea.graph uses a module listed above it, which is the healthy direction.
metro.idea.graph uses metro.compiler.diagnostics, so a change to metro.compiler.diagnostics can break metro.idea.graph, while a change to metro.idea.graph can't break metro.compiler.diagnostics.
Position
Below the diagonal: metro.idea.graph uses a module listed above it, which is the healthy direction.
metro.idea.graph uses metro.idea.tracing, so a change to metro.idea.tracing can break metro.idea.graph, while a change to metro.idea.graph can't break metro.idea.tracing.
Position
Below the diagonal: metro.idea.graph uses a module listed above it, which is the healthy direction.
metro.idea.graph uses metro.compiler.graph, so a change to metro.compiler.graph can break metro.idea.graph, while a change to metro.idea.graph can't break metro.compiler.graph.
Position
Below the diagonal: metro.idea.graph uses a module listed above it, which is the healthy direction.
69 pairs of types, where a type in metro.idea.graph uses a type in metro.idea.model. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
metro.idea.graph uses metro.idea.model, so a change to metro.idea.model can break metro.idea.graph, while a change to metro.idea.graph can't break metro.idea.model.
Position
Below the diagonal: metro.idea.graph uses a module listed above it, which is the healthy direction.
metro.idea.graph uses metro.compiler, so a change to metro.compiler can break metro.idea.graph, while a change to metro.idea.graph can't break metro.compiler.
Position
Below the diagonal: metro.idea.graph uses a module listed above it, which is the healthy direction.
metro.compiler.fir.generators uses metro.compiler.compat.CompatContext, so a change to metro.compiler.compat.CompatContext can break metro.compiler.fir.generators, while a change to metro.compiler.fir.generators can't break metro.compiler.compat.CompatContext.
Position
Below the diagonal: metro.compiler.fir.generators uses a module listed above it, which is the healthy direction.
metro.compiler.fir.generators uses metro.compiler.compat, so a change to metro.compiler.compat can break metro.compiler.fir.generators, while a change to metro.compiler.fir.generators can't break metro.compiler.compat.
Position
Below the diagonal: metro.compiler.fir.generators uses a module listed above it, which is the healthy direction.
metro.compiler.fir.generators uses metro.compiler.api.fir, so a change to metro.compiler.api.fir can break metro.compiler.fir.generators, while a change to metro.compiler.fir.generators can't break metro.compiler.api.fir.
Position
Below the diagonal: metro.compiler.fir.generators uses a module listed above it, which is the healthy direction.
metro.compiler.fir.generators uses metro.compiler.fir, so a change to metro.compiler.fir can break metro.compiler.fir.generators, while a change to metro.compiler.fir.generators can't break metro.compiler.fir.
Position
Below the diagonal: metro.compiler.fir.generators uses a module listed above it, which is the healthy direction.
metro.compiler.fir.generators uses metro.compiler, so a change to metro.compiler can break metro.compiler.fir.generators, while a change to metro.compiler.fir.generators can't break metro.compiler.
Position
Below the diagonal: metro.compiler.fir.generators uses a module listed above it, which is the healthy direction.
metro.compiler.fir.generators uses metro.compiler.hilt, so a change to metro.compiler.hilt can break metro.compiler.fir.generators, while a change to metro.compiler.fir.generators can't break metro.compiler.hilt.
Position
Below the diagonal: metro.compiler.fir.generators uses a module listed above it, which is the healthy direction.
metro.idea.index.snapshot uses metro.idea.model.BindingIndex, so a change to metro.idea.model.BindingIndex can break metro.idea.index.snapshot, while a change to metro.idea.index.snapshot can't break metro.idea.model.BindingIndex.
Position
Below the diagonal: metro.idea.index.snapshot uses a module listed above it, which is the healthy direction.
metro.idea.index.snapshot uses metro.idea.tracing, so a change to metro.idea.tracing can break metro.idea.index.snapshot, while a change to metro.idea.index.snapshot can't break metro.idea.tracing.
Position
Below the diagonal: metro.idea.index.snapshot uses a module listed above it, which is the healthy direction.
71 pairs of types, where a type in metro.idea.index.snapshot uses a type in metro.idea.model. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
metro.idea.index.snapshot uses metro.idea.model, so a change to metro.idea.model can break metro.idea.index.snapshot, while a change to metro.idea.index.snapshot can't break metro.idea.model.
Position
Below the diagonal: metro.idea.index.snapshot uses a module listed above it, which is the healthy direction.
metro.idea.index.snapshot uses metro.compiler, so a change to metro.compiler can break metro.idea.index.snapshot, while a change to metro.idea.index.snapshot can't break metro.compiler.
Position
Below the diagonal: metro.idea.index.snapshot uses a module listed above it, which is the healthy direction.
metro.idea.index.snapshot uses metro.idea, so a change to metro.idea can break metro.idea.index.snapshot, while a change to metro.idea.index.snapshot can't break metro.idea.
Position
Below the diagonal: metro.idea.index.snapshot uses a module listed above it, which is the healthy direction.
38→39 metro.idea.index.snapshot uses metro.idea.indexpart of a loop✕
Connections
30 pairs of types, where a type in metro.idea.index.snapshot uses a type in metro.idea.index. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
metro.idea.index.snapshot uses metro.idea.index, so a change to metro.idea.index can break metro.idea.index.snapshot, while a change to metro.idea.index.snapshot can't break metro.idea.index.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
metro.idea.index uses metro.compiler.graph.identity, so a change to metro.compiler.graph.identity can break metro.idea.index, while a change to metro.idea.index can't break metro.compiler.graph.identity.
Position
Below the diagonal: metro.idea.index uses a module listed above it, which is the healthy direction.
metro.idea.index uses metro.idea.model.BindingIndex, so a change to metro.idea.model.BindingIndex can break metro.idea.index, while a change to metro.idea.index can't break metro.idea.model.BindingIndex.
Position
Below the diagonal: metro.idea.index uses a module listed above it, which is the healthy direction.
metro.idea.index uses metro.idea.tracing, so a change to metro.idea.tracing can break metro.idea.index, while a change to metro.idea.index can't break metro.idea.tracing.
Position
Below the diagonal: metro.idea.index uses a module listed above it, which is the healthy direction.
metro.idea.index uses metro.compiler.graph, so a change to metro.compiler.graph can break metro.idea.index, while a change to metro.idea.index can't break metro.compiler.graph.
Position
Below the diagonal: metro.idea.index uses a module listed above it, which is the healthy direction.
160 pairs of types, where a type in metro.idea.index uses a type in metro.idea.model. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
metro.idea.index uses metro.idea.model, so a change to metro.idea.model can break metro.idea.index, while a change to metro.idea.index can't break metro.idea.model.
Position
Below the diagonal: metro.idea.index uses a module listed above it, which is the healthy direction.
metro.idea.index uses metro.compiler, so a change to metro.compiler can break metro.idea.index, while a change to metro.idea.index can't break metro.compiler.
Position
Below the diagonal: metro.idea.index uses a module listed above it, which is the healthy direction.
metro.idea.index uses metro.idea.index.snapshot, so a change to metro.idea.index.snapshot can break metro.idea.index, while a change to metro.idea.index can't break metro.idea.index.snapshot.
Position
Below the diagonal: metro.idea.index uses a module listed above it, which is the healthy direction.
metro.idea.toolwindow uses metro.compiler.diagnostics, so a change to metro.compiler.diagnostics can break metro.idea.toolwindow, while a change to metro.idea.toolwindow can't break metro.compiler.diagnostics.
Position
Below the diagonal: metro.idea.toolwindow uses a module listed above it, which is the healthy direction.
metro.idea.toolwindow uses metro.idea.tracing, so a change to metro.idea.tracing can break metro.idea.toolwindow, while a change to metro.idea.toolwindow can't break metro.idea.tracing.
Position
Below the diagonal: metro.idea.toolwindow uses a module listed above it, which is the healthy direction.
32 pairs of types, where a type in metro.idea.toolwindow uses a type in metro.idea.model. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
metro.idea.toolwindow uses metro.idea.model, so a change to metro.idea.model can break metro.idea.toolwindow, while a change to metro.idea.toolwindow can't break metro.idea.model.
Position
Below the diagonal: metro.idea.toolwindow uses a module listed above it, which is the healthy direction.
metro.idea.toolwindow uses metro.compiler, so a change to metro.compiler can break metro.idea.toolwindow, while a change to metro.idea.toolwindow can't break metro.compiler.
Position
Below the diagonal: metro.idea.toolwindow uses a module listed above it, which is the healthy direction.
metro.idea.toolwindow uses metro.idea, so a change to metro.idea can break metro.idea.toolwindow, while a change to metro.idea.toolwindow can't break metro.idea.
Position
Below the diagonal: metro.idea.toolwindow uses a module listed above it, which is the healthy direction.
metro.idea.toolwindow uses metro.idea.graph, so a change to metro.idea.graph can break metro.idea.toolwindow, while a change to metro.idea.toolwindow can't break metro.idea.graph.
Position
Below the diagonal: metro.idea.toolwindow uses a module listed above it, which is the healthy direction.
metro.idea.toolwindow uses metro.idea.index, so a change to metro.idea.index can break metro.idea.toolwindow, while a change to metro.idea.toolwindow can't break metro.idea.index.
Position
Below the diagonal: metro.idea.toolwindow uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 66.1 · Adequate · gated by D2 ·
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
99
High / Critical
A03:2025 — Software Supply Chain Failures
15
Medium
A02:2025 — Security Misconfiguration
3
High / Critical
Roadmap
Top priorities: Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1; Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh; Resolve the 16 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (11), REDACTED (2), REDACTED (2).
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
Resolve the 8 REDACTED finding(s) charged to Static Analysis (SAST) — the other 63 are reported here at file:line but scored by D36 (supply-chain provenance), which charges them once.
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 — 101
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 — 940
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 — 50
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
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 57 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 57 dimensions across the health lenses
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, 1079 of 1091 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.kt) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.kt) and this repository declares a JVM test suite (repository root, Gradle), but it was not re-run: the analyzer environment could not run it. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
D12 Dependency Hygiene — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — 61 Maven/Gradle manifest(s) were read, stating a version for 86 dependency(ies) and leaving 7 to a parent or an imported BOM, but no build resolved the dependency graph, so the outdated signal was not established. NOT a finding that these dependencies are current or healthy.
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 (74 contributor(s) across 2746 commit(s) sampled, automation and bot accounts excluded). One of them holds 84% of the history; the other 73 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 — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is an ADMISSION gap, not an environment fault: it declares a published package (metrox-android/build.gradle.kts), but no published-package marker D22 reads admitted any project here. D22 DOES collect the public API of every language in this tree, and admits a project only when its manifest makes that ecosystem's publication act in a form the marker recognises — so what is missing is not a collector but an admission rule for the publication act this repository makes, if it makes one. The remedy is a better discriminator for that marker — not a collector, and no change to the scan image can close it. The marker's rules are measured to refuse applications, so one refused repository is the rule working as calibrated; several are the evidence that it is too strict. For npm the surface is what a published package.json's entry points (exports, main, module, types) export, followed through the source; an entry that names build output the tree does not commit (dist/, build/) is not followed back to source, because only a tsconfig outDir/rootDir pair states that mapping and a bundler's input lives in executable configuration this engine does not evaluate.
D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `benchmark/generate-projects.main.kts`, `benchmark/startup-multiplatform/build.gradle.kts`, `build-logic/src/main/kotlin/metro.yarnNode.gradle.kts`, `compiler-compat/k230/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k230/CompatContextImpl.kt`, `compiler-compat/k230/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k230/IrConstructorCallIrGeneratedDeclarationsRegistrarCompat.kt`, … (+175 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.
AX1 Captive dependencies — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository's container is Guice and Metro, whose lifetimes are not modelled yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via REDACTED (REDACTED). the image ran but published no HTTP port — nothing to crawl (EXPOSE the web port to unlock runtime evidence).
C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java source only, and this repository's Kotlin, Python is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby, Scala and Rust source only, and this repository's Kotlin, Python is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
P3 Security & performance tooling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. `renovate.json5` is not valid JSON (''' is an invalid start of a value. LineNumber: 14 | BytePositionInLine: 8.). Each was counted as dependency-update automation without being read, so whether it actually schedules updates is unverified: if it does not, the dep-scan credit on this card is not earned.
P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
Repo exclusion declarations: 5 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
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.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
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.
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.
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.
156 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was graph-viewer.paint at 201. A further 9 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 IdeTraceTimelineKt.ideTraceDisplayName at 78 — they are counted neither in the figure above nor in this dimension's score. 6 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: idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/tracing/IdeTraceTimeline.kt (IdeTraceTimelineKt.ideTraceDisplayName at 78), metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/explanation/BindingExplanationRenderer.kt (BindingExplanationRenderer.reason at 28), compiler-compat/k230/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k230/CompatContextImpl.kt (CompatContextImpl.withSeverityCompat at 17), compiler-compat/k2320/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k2320/CompatContextImpl.kt (CompatContextImpl.withSeverityCompat at 17), compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/FirIdentities.kt (FirAnnotationReader.constantNode at 17), and 1 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 128 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 1 body over 120 down to 120 or less in Cyclomatic Complexity — start with graph-viewer.paint (cyclomatic 201). — Refactoring it lifts Cyclomatic Complexity from 4.7 to about 5.4/10.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 230 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 6 bodies over 120 down to 120 or less in Cognitive Complexity — start with Builder.build (cognitive 338), paint (cognitive 241), BindingContainerCallableChecker.checkImpl (cognitive 197). — 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 6 together lifts Cognitive Complexity from 2.0 to about 3.6/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes7.7 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 47 MethodTooLong finding(s) in God Classes — start with IrGraphGenerator.kt (4), MetroResolutionService.kt (3), BindingGraphGenerator.kt (2). — One of this dimension's main actionable groups (47 warning-level).
Resolve the 45 FileTooLong finding(s) in God Classes — start with REDACTED, MetroResolutionService.kt, ir.kt. — One of this dimension's main actionable groups (45 warning-level).
Resolve the 30 ClassTooLong finding(s) in God Classes — start with MetroResolutionService.kt, BindingIndex.kt, IrGraphGenerator.kt. — One of this dimension's main actionable groups (30 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
36 duplicated block group(s) detected. 2.6 % of the production lines (3,487 of 134,352) are in a reported copy. A further 62 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 4 of the 98 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.
Edited copy of a member (9 corresponding lines) · ×5idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/snapshot/SourceSnapshot.kt:190
Edited copy of a member (12 corresponding lines) · ×5graph-viewer/src/commonMain/kotlin/dev/zacsweers/metro/gradle/analysis/GraphReportRenderer.kt:313
Edited copy of a member (27 corresponding lines) · ×4compiler/src/main/kotlin/dev/zacsweers/metro/compiler/symbols/ProviderFramework.kt:592
Edited copy of a member (18 corresponding lines) · ×4idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/graph/MetroGraphValidationService.kt:610
Edited copy of a member (8 corresponding lines) · ×4compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/irDeclarationRendering.kt:463
+ 55 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 5 Edited copy of a member (9 corresponding lines) finding(s) in Code Duplication — start with SourceSnapshot.kt, MetroResolutionService.kt, ir.kt. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 5 Edited copy of a member (12 corresponding lines) finding(s) in Code Duplication — start with GraphReportRenderer.kt, IrBindingStack.kt, TypeKeyIdentity.kt. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 4 Edited copy of a member (27 corresponding lines) finding(s) in Code Duplication — start with ProviderFramework.kt, BindingExtraction.kt, IrBindingGraph.kt. — One of this dimension's main actionable groups (4 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling9.3 / 10Stronggated by 3 serious findings✓ 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.
32 production modules (Gradle), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; edges a convention plugin adds from buildSrc or build-logic are not visible there; 3 module(s) off the main sequence, with abstractness counted on 30 of the 32 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
Off the main sequence: metro:graphs · ×3
What to do
Resolve the 3 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 1 Low cohesion finding(s) in Cohesion (LCOM4) — start with ContributionHintFirGenerator.kt. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
Secret scan ran and found no leaked secrets. 11 detection(s) were excluded as holding no minted credential in material that runs: a name, reference or comparison rather than a value, a readable phrase or pattern, a value that declares itself fake, or development, test, example, mock or demo material.
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 77 declared JVM dependency artifact(s) use a banned license. Licences were resolved from the POMs Maven Central publishes, over the coordinates this repository's 61 Maven/Gradle manifest(s) declare with a version resolvable from the manifest itself — the same declaration-site closure this analysis reads for dependency currency. The JVM has no lockfile a checkout is guaranteed to carry, so this is deliberately NOT the transitive closure. 7 further coordinate(s) are declared with no version at the declaration site — inherited from a parent POM, a BOM or an unresolved Gradle version reference — and are NOT graded: this verdict covers what the checkout pins, not the full transitive graph. A further 7 coordinate(s) are not published to Maven Central — another repository (Google's Maven hosts androidx), a SNAPSHOT, or a private artifact — so their licences are not readable from here and they are outside this verdict.
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.
Resolve the 43 Hotspot finding(s) in Churn × Complexity Hotspots — start with MetroOptions.kt, GraphExpressionGenerator.kt, GraphNodes.kt. — One of this dimension's main actionable groups (43 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.
252 deducted task-comment markers across 134352 LoC (0.2/KLoC) → score 9.6. 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 252 TodoComment finding(s) in Explicit Debt — start with betterDumpKotlinLike.kt (72), ir.kt (10), fir.kt (9). — One of this dimension's main actionable groups (252 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
1 of 1 documentation facets pass in full. 47 document(s) read across 1 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with build.gradle.kts. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.
1 naming inconsistencies among 62 declarations measured against a convention their peers follow.
`buildIROnlyFactoriesAnnotation` spells `IR` where 62 names in the project spell it `Ir`compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/ContributionsFirGenerator.kt:1329
What to do
Resolve the 1 `buildIROnlyFactoriesAnnotation` spells `IR` where 62 names in the… finding(s) in Naming Consistency — start with ContributionsFirGenerator.kt. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.
3 of 29 build units (Gradle) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion · ×3compiler/build.gradle.kts:1
What to do
Resolve the 3 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with build.gradle.kts (3). — One of this dimension's main actionable groups (3 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
29 % of calls cross a namespace and 17 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.
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).
99 finding(s): 0 critical, 92 high, 6 medium, 1 low. 63 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 24 file(s) — `REDACTED` (line 9, line 43), `benchmark/generate-projects.main.kts` (lines 1736–1737, line 1804, line 1814, …), `benchmark/gradlew` (line 74, line 178), `compiler-compat/resolve-ij-kotlin-version.sh` (line 120, line 281, line 337), `docs/site-assets/overrides/404.html` (lines 1–3, line 18), … (+19 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 7 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
+ 3 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 16 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (11), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (16 issue-level).
Resolve the 8 REDACTED finding(s) charged to Static Analysis (SAST) — the other 63 are reported here at file:line but scored by D36 (supply-chain provenance), which charges them once. — One of this dimension's main actionable groups (71 issue-level, 8 of them charged here).
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
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. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Resolve the 2 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-level).
Resolve the 2 Low CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 recommendation-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 1 High IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 2 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
4 of 395 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is metro-trace/src/main/kotlin/dev/zacsweers/metro/trace/internal/TraceTestUtil.kt. Counted over 395 of the 681 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.
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.
+ 4 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 3 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
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 14 platform declaration(s) and 87 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.
AC1 · Text alternatives10.0 / 10Exemplary○ Nothing flagged
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.
Do you agree with this assessment?
AC2 · Forms & labels10.0 / 10Exemplary○ Nothing flagged
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Do you agree with this assessment?
AC3 · Page structure3.4 / 10Weak✓ Tool-verified
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). (×4) — idea-plugin/src/main/resources/inspectionDescriptions/MetroContributeBinding.html:1, idea-plugin/src/main/resources/inspectionDescriptions/MetroGraph.html:1, idea-plugin/src/main/resources/inspectionDescriptions/MetroGraphWarning.html:1, …
A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>. (×4) — idea-plugin/src/main/resources/inspectionDescriptions/MetroContributeBinding.html:1, idea-plugin/src/main/resources/inspectionDescriptions/MetroGraph.html:1, idea-plugin/src/main/resources/inspectionDescriptions/MetroGraphWarning.html:1, …
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×4) — idea-plugin/src/main/resources/inspectionDescriptions/MetroContributeBinding.html:1, idea-plugin/src/main/resources/inspectionDescriptions/MetroGraph.html:1, idea-plugin/src/main/resources/inspectionDescriptions/MetroGraphWarning.html:1, …
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 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.
`.search-box input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — gradle-plugin/src/main/resources/dev/zacsweers/metro/gradle/analysis/graph-viewer.css:77
`.search-box input:focus-visible` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — gradle-plugin/src/main/resources/dev/zacsweers/metro/gradle/analysis/graph-viewer.css:78
What to do
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
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.
`CompatContext` declares 33 abstract methods: `createTypeResolutionConfigurationCompat`, `createCompilerConfigurationCompat`, `createTopLevelFunction`, `createMemberFunction`, `copyWithOverrideCompat`, `fakeElement`, `defaultValueSourceCompat`, `isNamedFunction`, `buildMemberFunction`, `addBackingFieldCompat`, `getEffectiveSeverityCompat`, `createCompat`, `withSeverityCompat`, `reportAt`, `registerFirExtensionCompat`, `registerIrExtensionCompat`, `createIrGeneratedDeclarationsRegistrar`, `irAnnotationCompat`, `clearTopLevelPluginFileMarkerCompat`, `annotationsCompat`, `replaceAnnotationsCompat`, `finderForBuiltinsCompat`, `finderForSourceCompat`, `evaluateAsCompat`, `getDeprecationsProviderCompat`, `getBooleanArgumentCompat`, `getStringArgumentCompat`, `buildValueParameterCopyCompat`, `dumpKotlinLikeCompat`, `messageCollectorCompat`, `buildResolvedQualifierCompat`, `createEmptyExternalPackageFragmentCompat`, `getAnnotationArgumentCompat`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — compiler-compat/src/main/kotlin/dev/zacsweers/metro/compiler/compat/CompatContext.kt:77
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Do you agree with this assessment?
P2 · Observability6.0 / 10Adequate✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
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 spotbugs with find-sec-bugs (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 12 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. — REDACTED:10
What to do
Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
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 · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.
Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
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.
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.
Other · Code Health — Whether async functions that make a cancellable request accept or pass on an AbortSignal (adoption curve).
Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. 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 question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.
Only 0/1 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
`readAsset` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:17
What to do
Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
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 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.
Do you agree with this assessment?
X27 · Collection changed while being enumerated7.4 / 10Strong✓ Tool-verified
Other · Code Health — Whether an enhanced `for` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is iterating invalidates the fail-fast iterator it is holding, so the next `next()` throws `ConcurrentModificationException` and the remaining elements are never seen. Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen. Whether a `for (x in c)` or `c.forEach { … }` leaves the collection it is walking alone — a `mutableListOf`/`ArrayList`, `mutableMapOf`/`HashMap` or `mutableSetOf`/`HashSet` is a `java.util` collection on the JVM and is walked by its own fail-fast iterator, so a body that adds to or removes from the very collection the loop is walking makes the next step throw `ConcurrentModificationException` and the remaining elements are never seen.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
`dependencies` is walked by the loop on line 380, and line 381 calls `dependencies +=` on `dependencies` inside the loop body — a structural change to a `ArrayList`. The loop's hidden iterator is fail-fast, so its next `next()` throws `ConcurrentModificationException`: every pass that reaches this call ends the loop by exception instead of by running out of elements, and the remaining elements are never seen. — idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/model/DerivedBindings.kt:380
What to do
Each finding names the two spans that cannot both stand — the enhanced `for` source, and the call inside the body that structurally changes that same collection. Confirm from those two, then pick one: remove through the iterator itself (`Iterator<T> it = c.iterator(); … it.remove();`) or replace the loop with `c.removeIf(…)`; iterate a copy (`for (T x : new ArrayList<>(c))`); collect what needs changing and apply it after the loop; or — where the loop was only ever meant to act on the first match — `break` immediately after the mutation, which is the one shape that is already safe. In Python: Each finding names the two lines that cannot both stand — the `for` over the collection (or its `keys()`/`values()`/`items()` view), and the call inside the body that changes its size. Confirm from those two, then pick one: walk a snapshot (`for k in list(d):`, `for x in s.copy():`); build the result instead of editing in place (`d = {k: v for k, v in d.items() if keep(v)}`); collect what needs removing and remove it after the loop; or — where only the first match was ever meant — `break` straight after the change, which is the one shape that is already safe. In Kotlin: Each finding names the two lines that cannot both stand — the loop over the collection, and the call inside its body that changes it. Confirm from those two, then pick one: change the collection in one call instead of in the loop (`list.removeAll { … }`, `list.retainAll { … }`, `map.entries.removeIf { … }`); walk a snapshot (`for (x in list.toList())`, `list.toList().forEach { … }`); build a new collection (`val kept = list.filter { … }`) instead of editing the one being walked; or — where only the first match was ever meant — leave the walk straight after the change (`break`, `return`), which is the one shape that is already safe.
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.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
`except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×2) — REDACTED:100, REDACTED:116
`catch (_: Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — compiler-compat/src/main/kotlin/dev/zacsweers/metro/compiler/compat/CompatContext.kt:121
`catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — build-logic/src/main/kotlin/GitCommitValueSource.kt:21
What to do
Swallowed exception (caught, then discarded)
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.
Other · Code Health — Whether Kotlin's null safety is not undermined by not-null assertions — `String` cannot hold null and `String?` must be checked before use in every Kotlin module, and each `!!` is a run-time `NullPointerException` the author has told the compiler cannot happen.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 13 of 55 WCAG 2.2 Level A/AA success criteria (24%; ≈26% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 42 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
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 — 2 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
P12 CI test-gate honesty — 1 observation(s) recorded · 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'.
X10 Duplicated predicate — 28 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 — 57 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
AX1 Captive dependencies — 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
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No class in this Java code is a Spring, JSR-330 or CDI singleton bean. No class in this Kotlin code is a Spring, JSR-330 or CDI singleton bean. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — the image ran but published no HTTP port — nothing to crawl (EXPOSE the web port to unlock 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 a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Room, JPA or MongoDB entity, an Exposed or Ktorm table, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (Room, Exposed, SQLDelight, Realm, JPA, JDBC, MongoDB, Firebase, …) imported either, so this repository keeps no data at rest for these controls to protect.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C3 Audit Trail — No personal data detected in a persisted data model — no PII-named column (email, first_name, date_of_birth, phone_number, …) or stored credential on a Room, JPA or MongoDB entity, an Exposed or Ktorm table, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (Room, Exposed, SQLDelight, Realm, JPA, JDBC, MongoDB, Firebase, …) imported either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Room, JPA or MongoDB entity, an Exposed or Ktorm table, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (Room, Exposed, SQLDelight, Realm, JPA, JDBC, MongoDB, Firebase, …) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Room, JPA or MongoDB entity, an Exposed or Ktorm table, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (Room, Exposed, SQLDelight, Realm, JPA, JDBC, MongoDB, Firebase, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
D10 Test Quality — ~140116 lines of test source are present (.kt) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D11 Test Reliability — Test reliability not included — the .kt suite was found but not re-run
D12 Dependency Hygiene — Not scored — 61 Maven/Gradle manifest(s) were read, stating a version for 86 dependency(ies) and leaving 7 to a parent or an imported BOM, but no build resolved the dependency graph, so the outdated signal was not established. NOT a finding that these dependencies are current or healthy.
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.
D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only; comments in this repository's .java, .kt, .py source were not judged.
D25 ADR Conformance — no ADRs to check
D32 Data Compliance (PII/GDPR) — 180 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.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not included — suite not readable by the collector
DM1 Domain Modelling — applicable but not scored (3 signals for this style, 3 needed — the count is met but a required primary signal is absent): 1 aggregate root(s) (entities that raise its domain events); 524 value object(s); 6 domain event(s); no aggregate is declared and no domain structure surrounds the state-guarding types: not claimed as DDD
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
M4 Documentation accuracy — Not applicable: the 47 current-state document(s) make no claim of a kind M4 checks. 70 claim(s) of kinds M4 does not check were not checked (path 17, command argument 39, environment variable 11, setting 3); M4 checks only links and versions and artefact counts.
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JVM, JavaScript/TypeScript, Python source, so there is no service whose uptime a failing dependency could take down
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — X24 reached only 6% of this repository's production lines — kotlin (133,000 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Kotlin was read, and it logs through none that an assembled message defeats: Android's `Log` and Timber, java.util.logging and log4j-api-kotlin take one finished message (as log4net does in C#), or it makes no call through a named logger at all. Calls made through SLF4J, log4j 2 or kotlin-logging (`LoggerFactory.getLogger`, `KotlinLogging.logger {}`) would be judged.
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X7 Silent fallback defaults — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
<html> without a lang idea-plugin/src/main/resources/inspectionDescriptions/MetroContributeBinding.html:1— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang idea-plugin/src/main/resources/inspectionDescriptions/MetroGraph.html:1— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang idea-plugin/src/main/resources/inspectionDescriptions/MetroGraphWarning.html:1— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang idea-plugin/src/main/resources/intentionDescriptions/MakeClassInjectableIntention/description.html:1— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
AC3 · Page structure· Document without a <title> · ×4
Document without a <title> idea-plugin/src/main/resources/inspectionDescriptions/MetroContributeBinding.html:1— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> idea-plugin/src/main/resources/inspectionDescriptions/MetroGraph.html:1— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> idea-plugin/src/main/resources/inspectionDescriptions/MetroGraphWarning.html:1— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> idea-plugin/src/main/resources/intentionDescriptions/MakeClassInjectableIntention/description.html:1— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
TodoComment samples/interop/dependencies-dagger/src/test/kotlin/dev/zacsweers/metro/sample/DaggerDependenciesTest.kt:23— // TODO KAPT/KSP are unreliable here, the generated code is not always linked :( — 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 samples/interop/dependencies-dagger/src/test/kotlin/dev/zacsweers/metro/sample/DaggerDependenciesTest.kt:42— // TODO KAPT/KSP are unreliable here, the generated code is not always linked :( — 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 samples/integration-tests/src/commonTest/kotlin/dev/zacsweers/metro/test/integration/CycleBreakingTests.kt:224— // TODO this wrapper is because of a strange bug in kotlinc where TypeResolverService — 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 samples/integration-tests/src/commonTest/kotlin/dev/zacsweers/metro/test/integration/CycleBreakingTests.kt:269— // TODO this wrapper is because of a strange bug in kotlinc where TypeResolverService — 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 samples/integration-tests/src/commonTest/kotlin/dev/zacsweers/metro/test/integration/CycleBreakingTests.kt:316— // TODO this wrapper is because of a strange bug in kotlinc where TypeResolverService — 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 samples/integration-tests/src/commonTest/kotlin/dev/zacsweers/metro/test/integration/CycleBreakingTests.kt:362— // TODO this wrapper is because of a strange bug in kotlinc where TypeResolverService — 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 samples/integration-tests/src/commonTest/kotlin/dev/zacsweers/metro/test/integration/DependencyGraphProcessingTest.kt:476— // TODO on the JVM we get Collections.singleton() but other platforms just us HashSet. Maybe we — 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 samples/integration-tests/src/commonTest/kotlin/dev/zacsweers/metro/test/integration/DependencyGraphProcessingTest.kt:726— // TODO Wasm annotation classes don't implement equals correctly — 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 samples/integration-tests/src/commonTest/kotlin/dev/zacsweers/metro/test/integration/DependencyGraphProcessingTest.kt:846— // TODO this needs more work to support — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment samples/circuit-app/src/commonMain/kotlin/dev/zacsweers/metro/sample/circuit/CounterApp.kt:12— // TODO move back to function injection once non-JVM platforms work with top-level FIR injections — 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 runtime/src/commonMain/kotlin/dev/zacsweers/metro/internal/MapProviderFactory.kt:36— // TODO are these overrides right? — 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 runtime/src/commonMain/kotlin/dev/zacsweers/metro/internal/SetFactory.kt:44— // TODO(ronshapiro): Store a List< extends Provider<T>> and avoid the cast to Provider<T> — 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 metro-common/src/test/kotlin/dev/zacsweers/metro/compiler/graph/MetroSortTest.kt:842— // TODO this is really just here for tests — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/BindingGraph.kt:53— // TODO instead of implementing BindingGraph, maybe just make this a builder and have build() — 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 ide-integration-tests/src/test/kotlin/dev/zacsweers/metro/ide/MetroIdeSmokeTest.kt:524— // TODO Assert on companion object inlay once we have a test case for it — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment gradle-plugin/src/main/kotlin/dev/zacsweers/metro/gradle/MetroGradleSubplugin.kt:126— // TODO should this use throwing() and fail the build instead? — 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 gradle-plugin/src/main/kotlin/dev/zacsweers/metro/gradle/artifacts/GenerateGraphMetadataTask.kt:70— // TODO sort outputs further? — 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 gradle-plugin/src/functionalTest/kotlin/dev/zacsweers/metro/gradle/InteropConfigurationTest.kt:59— // TODO invoke main()? — 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 gradle-plugin/src/functionalTest/kotlin/dev/zacsweers/metro/gradle/MetroArtifactsTest.kt:417— // TODO add more example outputs here. This'll probably churn a bit — 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 gradle-plugin/src/functionalTest/kotlin/dev/zacsweers/metro/gradle/testUtil.kt:29— // TODO dedupe with MetroCompilerTest — 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 gradle-plugin/src/functionalTest/kotlin/dev/zacsweers/metro/gradle/incremental/BaseIncrementalCompilationTest.kt:149— // TODO shared model? — 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 compiler-tests/src/test/kotlin/dev/zacsweers/metro/compiler/MetroDirectives.kt:21— // TODO eventually support multiple outputs — 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 compiler-tests/src/test/kotlin/dev/zacsweers/metro/compiler/MetroExtensionRegistrarConfigurator.kt:447— // TODO ever support this in tests? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment compiler-tests/src/test/kotlin/dev/zacsweers/metro/compiler/interop/Ksp2AdditionalSourceProvider.kt:124— // TODO this escapes other preprocessors but — 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 compiler-tests/src/test/kotlin/dev/zacsweers/metro/compiler/interop/Ksp2AdditionalSourceProvider.kt:147— // TODO is there a corresponding 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.
MethodTooLong: Builder.build compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/GraphNodes.kt:833— MethodTooLong — build runs 485 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 385 over it, 4.85× 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: BindingContainerCallableChecker.checkImpl compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/BindingContainerCallableChecker.kt:144— MethodTooLong — checkImpl runs 437 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 337 over it, 4.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: BindingGraphGenerator.generate compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingGraphGenerator.kt:83— MethodTooLong — generate runs 416 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 316 over it, 4.16× 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: DependencyGraphChecker.checkImpl compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/DependencyGraphChecker.kt:106— MethodTooLong — checkImpl runs 325 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 225 over it, 3.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: MembersInjectorTransformer.getOrGenerateInjector compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/MembersInjectorTransformer.kt:205— MethodTooLong — getOrGenerateInjector runs 255 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 155 over it, 2.55× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Companion.build idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/model/BindingIndexLookups.kt:75— MethodTooLong — build runs 252 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 152 over it, 2.52× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: DependencyGraphTransformer.prepareDependencyGraph compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/DependencyGraphTransformer.kt:493— MethodTooLong — prepareDependencyGraph runs 221 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 121 over it, 2.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ContributedInterfaceSupertypeGenerator.computeContributionSupertypes compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/ContributedInterfaceSupertypeGenerator.kt:403— MethodTooLong — computeContributionSupertypes runs 219 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 119 over it, 2.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: BindingContainerTransformer.getOrLookupProviderFactory compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/BindingContainerTransformer.kt:388— MethodTooLong — getOrLookupProviderFactory runs 214 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 114 over it, 2.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: InjectedClassTransformer.getOrGenerateFactory compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/InjectedClassTransformer.kt:135— MethodTooLong — getOrGenerateFactory 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.
MethodTooLong: IrBindingStack.copy compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBindingStack.kt:50— MethodTooLong — copy runs 208 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 108 over it, 2.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: DependencyGraphCreatorChecker.checkImpl compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/DependencyGraphCreatorChecker.kt:71— MethodTooLong — checkImpl 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.
MethodTooLong: IrGraphGenerator.implementOverrides compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrGraphGenerator.kt:2188— MethodTooLong — implementOverrides runs 184 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 84 over it, 1.84× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: BindingContainerTransformer.loadExternalBindingContainer compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/BindingContainerTransformer.kt:1095— MethodTooLong — loadExternalBindingContainer runs 182 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 82 over it, 1.82× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: MetroAnnotationsKt.metroAnnotations compiler/src/main/kotlin/dev/zacsweers/metro/compiler/MetroAnnotations.kt:257— MethodTooLong — metroAnnotations runs 169 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 69 over it, 1.69× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: AggregationChecker.checkBindingContribution compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/AggregationChecker.kt:294— MethodTooLong — checkBindingContribution 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.
MethodTooLong: MultibindsChecker.checkImpl compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/MultibindsChecker.kt:75— MethodTooLong — checkImpl runs 161 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 61 over it, 1.61× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: MetroResolutionService.buildResolutionCandidate idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt:1189— MethodTooLong — buildResolutionCandidate runs 161 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 61 over it, 1.61× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: MetroAnnotationsKt.metroAnnotations compiler/src/main/kotlin/dev/zacsweers/metro/compiler/MetroAnnotations.kt:551— MethodTooLong — metroAnnotations runs 160 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 60 over it, 1.60× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: IrGraphGenerator.collectShardPropertyInitializers compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrGraphGenerator.kt:1542— MethodTooLong — collectShardPropertyInitializers runs 152 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 52 over it, 1.52× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Builder.applyOptionValue metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/MetroOptions.kt:2031— MethodTooLong — applyOptionValue runs 145 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 45 over it, 1.45× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: MetroCompilerPluginRegistrar.registerExtensions compiler/src/main/kotlin/dev/zacsweers/metro/compiler/MetroCompilerPluginRegistrar.kt:33— MethodTooLong — registerExtensions runs 142 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 42 over it, 1.42× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: AggregationChecker.checkImpl compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/AggregationChecker.kt:104— MethodTooLong — checkImpl runs 135 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 35 over it, 1.35× 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: IrKt.materializeWrappedType compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/ir.kt:973— MethodTooLong — materializeWrappedType runs 132 significant lines (blank, comment-only and punctuation-only lines excluded) 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: BindingGraphGenerator.computeRawInheritedGraphData compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingGraphGenerator.kt:1008— MethodTooLong — computeRawInheritedGraphData runs 130 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 30 over it, 1.30× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FileTooLong: REDACTED REDACTED— FileTooLong — 3124 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 1500 significant lines; this is 1624 over it, 2.08× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: index/MetroResolutionService.kt idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt— FileTooLong — 2296 significant lines (blank, comment-only and punctuation-only lines excluded), about 83% of them inside a single declaration: MetroResolutionService (118-2788). The bar is 500 significant lines; this is 1796 over it, 4.59× 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: ir/ir.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/ir.kt— FileTooLong — 2198 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1698 over it, 4.40× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: compiler/MetroOptions.kt metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/MetroOptions.kt— FileTooLong — 1943 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1443 over it, 3.89× 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: model/BindingIndex.kt idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/model/BindingIndex.kt— FileTooLong — 1657 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: BindingIndex (26-2239). The bar is 500 significant lines; this is 1157 over it, 3.31× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: graph/IrGraphGenerator.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrGraphGenerator.kt— FileTooLong — 1641 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: IrGraphGenerator (134-2464). The bar is 500 significant lines; this is 1141 over it, 3.28× 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: graph/IrBindingGraph.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBindingGraph.kt— FileTooLong — 1412 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: IrBindingGraph (154-2145). The bar is 500 significant lines; this is 912 over it, 2.82× 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: analysis/GraphReportRenderer.kt graph-viewer/src/commonMain/kotlin/dev/zacsweers/metro/gradle/analysis/GraphReportRenderer.kt— FileTooLong — 1378 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: GraphReportRenderer (22-1673). The bar is 500 significant lines; this is 878 over it, 2.76× 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: expressions/GraphExpressionGenerator.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/expressions/GraphExpressionGenerator.kt— FileTooLong — 1325 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: GraphExpressionGenerator (73-2037). The bar is 500 significant lines; this is 825 over it, 2.65× 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: transformers/BindingContainerTransformer.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/BindingContainerTransformer.kt— FileTooLong — 1252 significant lines (blank, comment-only and punctuation-only lines excluded), about 80% of them inside a single declaration: BindingContainerTransformer (173-1614). The bar is 500 significant lines; this is 752 over it, 2.50× 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: fir/fir.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/fir.kt— FileTooLong — 1248 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 748 over it, 2.50× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: k230/betterDumpKotlinLike.kt compiler-compat/k230/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k230/betterDumpKotlinLike.kt— FileTooLong — 1220 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 720 over it, 2.44× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: graph/GraphNodes.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/GraphNodes.kt— FileTooLong — 1169 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: GraphNodes (130-1754). The bar is 500 significant lines; this is 669 over it, 2.34× 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: graph/BindingLookup.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingLookup.kt— FileTooLong — 968 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: BindingLookup (75-1676). The bar is 500 significant lines; this is 468 over it, 1.94× 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: generators/ContributionsFirGenerator.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/ContributionsFirGenerator.kt— FileTooLong — 955 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: ContributionsFirGenerator (119-1477). The bar is 500 significant lines; this is 455 over it, 1.91× 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: transformers/DependencyGraphTransformer.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/DependencyGraphTransformer.kt— FileTooLong — 922 significant lines (blank, comment-only and punctuation-only lines excluded), about 82% of them inside a single declaration: DependencyGraphTransformer (180-1403). The bar is 500 significant lines; this is 422 over it, 1.84× 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: circuit/CircuitIrExtension.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitIrExtension.kt— FileTooLong — 919 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 419 over it, 1.84× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: index/BindingExtraction.kt idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/BindingExtraction.kt— FileTooLong — 906 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 406 over it, 1.81× 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: transformers/ContributionIrTransformer.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/ContributionIrTransformer.kt— FileTooLong — 838 significant lines (blank, comment-only and punctuation-only lines excluded), about 85% of them inside a single declaration: ContributionIrTransformer (130-1199). The bar is 500 significant lines; this is 338 over it, 1.68× 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: graph/BindingGraphGenerator.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingGraphGenerator.kt— FileTooLong — 804 significant lines (blank, comment-only and punctuation-only lines excluded), about 85% of them inside a single declaration: BindingGraphGenerator (64-1217). The bar is 500 significant lines; this is 304 over it, 1.61× 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: graph/IrBinding.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBinding.kt— FileTooLong — 774 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: IrBinding (71-1162). The bar is 500 significant lines; this is 274 over it, 1.55× 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: expressions/MultibindingExpressionGenerator.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/expressions/MultibindingExpressionGenerator.kt— FileTooLong — 761 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: MultibindingExpressionGenerator (57-1142). The bar is 500 significant lines; this is 261 over it, 1.52× 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: checkers/BindingContainerCallableChecker.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/BindingContainerCallableChecker.kt— FileTooLong — 754 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 254 over it, 1.51× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: transformers/MembersInjectorTransformer.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/MembersInjectorTransformer.kt— FileTooLong — 734 significant lines (blank, comment-only and punctuation-only lines excluded), about 79% of them inside a single declaration: MembersInjectorTransformer (121-1027). The bar is 500 significant lines; this is 234 over it, 1.47× 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: index/FileShardBuilder.kt idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/FileShardBuilder.kt— FileTooLong — 734 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: FileShardBuilder (81-970). The bar is 500 significant lines; this is 234 over it, 1.47× 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.
Hotspot: metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/MetroOptions.kt metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/MetroOptions.kt:2031— metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/MetroOptions.kt changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 101 in Builder.applyOptionValue at line 2031. 1 of those changes was a fix/bug commit, and the other 17 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 12:20:00 -05:00' --until='2026-11-16 12:20:00 -05:00' --full-history --no-merges -- metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/MetroOptions.kt`: 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: compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/expressions/GraphExpressionGenerator.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/expressions/GraphExpressionGenerator.kt:173— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/expressions/GraphExpressionGenerator.kt changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 98 in GraphExpressionGenerator.generateBindingCode at line 173. 3 of those changes were fix/bug commits, and the other 11 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 12:20:00 -05:00' --until='2026-11-16 12:20:00 -05:00' --full-history --no-merges -- compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/expressions/GraphExpressionGenerator.kt`: 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: compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/GraphNodes.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/GraphNodes.kt:833— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/GraphNodes.kt changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 116 in Builder.build at line 833. 1 of those changes was a fix/bug commit, and the other 8 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 12:20:00 -05:00' --until='2026-11-16 12:20:00 -05:00' --full-history --no-merges -- compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/GraphNodes.kt`: 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: compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingGraphGenerator.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingGraphGenerator.kt:83— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingGraphGenerator.kt changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 86 in BindingGraphGenerator.generate at line 83. 4 of those changes were fix/bug commits, and the other 7 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 12:20:00 -05:00' --until='2026-11-16 12:20:00 -05:00' --full-history --no-merges -- compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingGraphGenerator.kt`: 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: compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/BindingContainerCallableChecker.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/BindingContainerCallableChecker.kt:144— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/BindingContainerCallableChecker.kt changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 110 in BindingContainerCallableChecker.checkImpl at line 144. 1 of those changes was a fix/bug commit, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 12:20:00 -05:00' --until='2026-11-16 12:20:00 -05:00' --full-history --no-merges -- compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/BindingContainerCallableChecker.kt`: 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: compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingPropertyCollector.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingPropertyCollector.kt:412— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingPropertyCollector.kt changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in BindingPropertyCollector.processBindingNode at line 412. 1 of those changes was a fix/bug commit, and the other 9 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 12:20:00 -05:00' --until='2026-11-16 12:20:00 -05:00' --full-history --no-merges -- compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingPropertyCollector.kt`: 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: compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/DependencyGraphTransformer.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/DependencyGraphTransformer.kt:493— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/DependencyGraphTransformer.kt changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in DependencyGraphTransformer.prepareDependencyGraph at line 493. 2 of those changes were fix/bug commits, and the other 11 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 12:20:00 -05:00' --until='2026-11-16 12:20:00 -05:00' --full-history --no-merges -- compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/DependencyGraphTransformer.kt`: 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: idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt:2490— idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in MetroResolutionService.classifyFileChange at line 2490. 1 of those changes was a fix/bug commit, and the other 12 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 12:20:00 -05:00' --until='2026-11-16 12:20:00 -05:00' --full-history --no-merges -- idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt`: 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: compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBindingGraph.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBindingGraph.kt:1517— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBindingGraph.kt changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in IrBindingGraph.validateBindings at line 1517. 3 of those changes were fix/bug commits, and the other 16 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 12:20:00 -05:00' --until='2026-11-16 12:20:00 -05:00' --full-history --no-merges -- compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBindingGraph.kt`: 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: idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/model/BindingIndex.kt idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/model/BindingIndex.kt:1516— idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/model/BindingIndex.kt changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in BindingIndex.bindingCandidateRejection at line 1516. 2 of those changes were fix/bug commits, and the other 9 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 12:20:00 -05:00' --until='2026-11-16 12:20:00 -05:00' --full-history --no-merges -- idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/model/BindingIndex.kt`: 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: compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/ContributedInterfaceSupertypeGenerator.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/ContributedInterfaceSupertypeGenerator.kt:403— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/ContributedInterfaceSupertypeGenerator.kt changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 52 in ContributedInterfaceSupertypeGenerator.computeContributionSupertypes at line 403. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 12:20:00 -05:00' --until='2026-11-16 12:20:00 -05:00' --full-history --no-merges -- compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/ContributedInterfaceSupertypeGenerator.kt`: 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: compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/DependencyGraphChecker.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/DependencyGraphChecker.kt:106— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/DependencyGraphChecker.kt changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 74 in DependencyGraphChecker.checkImpl at line 106. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 12:20:00 -05:00' --until='2026-11-16 12:20:00 -05:00' --full-history --no-merges -- compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/DependencyGraphChecker.kt`: 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: compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrGraphGenerator.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrGraphGenerator.kt:2188— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrGraphGenerator.kt changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in IrGraphGenerator.implementOverrides at line 2188. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 12:20:00 -05:00' --until='2026-11-16 12:20:00 -05:00' --full-history --no-merges -- compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrGraphGenerator.kt`: 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: compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/ir.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/ir.kt:528— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/ir.kt changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in IrKt.irInvokeResolved at line 528. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 12:20:00 -05:00' --until='2026-11-16 12:20:00 -05:00' --full-history --no-merges -- compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/ir.kt`: 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: compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/BindingContainerTransformer.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/BindingContainerTransformer.kt:1095— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/BindingContainerTransformer.kt changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in BindingContainerTransformer.loadExternalBindingContainer at line 1095. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 12:20:00 -05:00' --until='2026-11-16 12:20:00 -05:00' --full-history --no-merges -- compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/BindingContainerTransformer.kt`: 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: idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/BindingExtraction.kt idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/BindingExtraction.kt:635— idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/BindingExtraction.kt changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in BindingExtractionKt.classBindingData at line 635. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 12:20:00 -05:00' --until='2026-11-16 12:20:00 -05:00' --full-history --no-merges -- idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/BindingExtraction.kt`: 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: idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/FileShardBuilder.kt idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/FileShardBuilder.kt:338— idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/FileShardBuilder.kt changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in FileShardBuilder.processBindingCallable at line 338. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 12:20:00 -05:00' --until='2026-11-16 12:20:00 -05:00' --full-history --no-merges -- idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/FileShardBuilder.kt`: 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: compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/MembersInjectorTransformer.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/MembersInjectorTransformer.kt:205— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/MembersInjectorTransformer.kt changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in MembersInjectorTransformer.getOrGenerateInjector at line 205. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 12:20:00 -05:00' --until='2026-11-16 12:20:00 -05:00' --full-history --no-merges -- compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/MembersInjectorTransformer.kt`: 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:2488— REDACTED changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 73 in graph-viewer.renderDetails at line 2488. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 12:20:00 -05:00' --until='2026-11-16 12:20:00 -05: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: compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/expressions/MultibindingExpressionGenerator.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/expressions/MultibindingExpressionGenerator.kt:563— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/expressions/MultibindingExpressionGenerator.kt changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in MultibindingExpressionGenerator.generateMapMultibindingExpression at line 563. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 12:20:00 -05:00' --until='2026-11-16 12:20:00 -05:00' --full-history --no-merges -- compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/expressions/MultibindingExpressionGenerator.kt`: 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: metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/BindingGraph.kt metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/BindingGraph.kt:154— metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/BindingGraph.kt changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in MutableBindingGraph.prepareSeal at line 154. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 12:20:00 -05:00' --until='2026-11-16 12:20:00 -05:00' --full-history --no-merges -- metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/BindingGraph.kt`: 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: compiler/src/main/kotlin/dev/zacsweers/metro/compiler/MetroCompilerPluginRegistrar.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/MetroCompilerPluginRegistrar.kt:33— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/MetroCompilerPluginRegistrar.kt changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in MetroCompilerPluginRegistrar.registerExtensions at line 33. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 12:20:00 -05:00' --until='2026-11-16 12:20:00 -05:00' --full-history --no-merges -- compiler/src/main/kotlin/dev/zacsweers/metro/compiler/MetroCompilerPluginRegistrar.kt`: 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: compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/IrContributionMerger.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/IrContributionMerger.kt:173— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/IrContributionMerger.kt changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in IrContributionMerger.computeContributions at line 173. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 12:20:00 -05:00' --until='2026-11-16 12:20:00 -05:00' --full-history --no-merges -- compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/IrContributionMerger.kt`: 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: compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/InjectedClassTransformer.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/InjectedClassTransformer.kt:135— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/InjectedClassTransformer.kt changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in InjectedClassTransformer.getOrGenerateFactory at line 135. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 12:20:00 -05:00' --until='2026-11-16 12:20:00 -05:00' --full-history --no-merges -- compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/InjectedClassTransformer.kt`: 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: compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/GraphMetadataReporter.kt compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/GraphMetadataReporter.kt:339— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/GraphMetadataReporter.kt changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in GraphMetadataReporter.buildBindingJson at line 339. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 12:20:00 -05:00' --until='2026-11-16 12:20:00 -05:00' --full-history --no-merges -- compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/GraphMetadataReporter.kt`: 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.
ClassTooLong: MetroResolutionService idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt:118— ClassTooLong — 1902 significant lines (blank, comment-only and punctuation-only lines excluded), 116 methods. The bar is 400 significant lines; this is 1502 over it, 4.76× 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: BindingIndex idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/model/BindingIndex.kt:26— ClassTooLong — 1596 significant lines (blank, comment-only and punctuation-only lines excluded), 119 methods. The bar is 400 significant lines; this is 1196 over it, 3.99× 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: IrGraphGenerator compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrGraphGenerator.kt:134— ClassTooLong — 1511 significant lines (blank, comment-only and punctuation-only lines excluded), 46 methods. The bar is 400 significant lines; this is 1111 over it, 3.78× 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: GraphExpressionGenerator compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/expressions/GraphExpressionGenerator.kt:73— ClassTooLong — 1257 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 857 over it, 3.14× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: IrBindingGraph compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBindingGraph.kt:154— ClassTooLong — 1244 significant lines (blank, comment-only and punctuation-only lines excluded), 74 methods. The bar is 400 significant lines; this is 844 over it, 3.11× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: GraphReportRenderer graph-viewer/src/commonMain/kotlin/dev/zacsweers/metro/gradle/analysis/GraphReportRenderer.kt:22— ClassTooLong — 1224 significant lines (blank, comment-only and punctuation-only lines excluded), 7 methods. The bar is 400 significant lines; this is 824 over it, 3.06× 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: GraphNodes compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/GraphNodes.kt:130— ClassTooLong — 1030 significant lines (blank, comment-only and punctuation-only lines excluded), 4 methods. The bar is 400 significant lines; this is 630 over it, 2.58× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: BindingContainerTransformer compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/BindingContainerTransformer.kt:173— ClassTooLong — 996 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 596 over it, 2.49× 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: BindingLookup compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingLookup.kt:75— ClassTooLong — 854 significant lines (blank, comment-only and punctuation-only lines excluded), 49 methods. The bar is 400 significant lines; this is 454 over it, 2.14× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ContributionsFirGenerator compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/ContributionsFirGenerator.kt:119— ClassTooLong — 847 significant lines (blank, comment-only and punctuation-only lines excluded), 42 methods. The bar is 400 significant lines; this is 447 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: DependencyGraphTransformer compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/DependencyGraphTransformer.kt:180— ClassTooLong — 756 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 356 over it, 1.89× 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: ContributionIrTransformer compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/ContributionIrTransformer.kt:130— ClassTooLong — 714 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 314 over it, 1.79× 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: MultibindingExpressionGenerator compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/expressions/MultibindingExpressionGenerator.kt:57— ClassTooLong — 709 significant lines (blank, comment-only and punctuation-only lines excluded), 12 methods. The bar is 400 significant lines; this is 309 over it, 1.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: IrBinding compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBinding.kt:71— ClassTooLong — 708 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 308 over it, 1.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Symbols compiler/src/main/kotlin/dev/zacsweers/metro/compiler/symbols/Symbols.kt:45— ClassTooLong — 686 significant lines (blank, comment-only and punctuation-only lines excluded), 6 methods. The bar is 400 significant lines; this is 286 over it, 1.72× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: BindingGraphGenerator compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingGraphGenerator.kt:64— ClassTooLong — 683 significant lines (blank, comment-only and punctuation-only lines excluded), 8 methods. The bar is 400 significant lines; this is 283 over it, 1.71× 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: FileShardBuilder idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/FileShardBuilder.kt:81— ClassTooLong — 654 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 254 over it, 1.64× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: MetroGraphValidationService idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/graph/MetroGraphValidationService.kt:61— ClassTooLong — 645 significant lines (blank, comment-only and punctuation-only lines excluded), 46 methods. The bar is 400 significant lines; this is 245 over it, 1.61× 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: MembersInjectorTransformer compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/MembersInjectorTransformer.kt:121— ClassTooLong — 583 significant lines (blank, comment-only and punctuation-only lines excluded), 17 methods. The bar is 400 significant lines; this is 183 over it, 1.46× 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: InjectedClassFirGenerator compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/InjectedClassFirGenerator.kt:94— ClassTooLong — 545 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods. The bar is 400 significant lines; this is 145 over it, 1.36× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: KaBindingGraph idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/graph/KaBindingGraph.kt:74— ClassTooLong — 536 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 136 over it, 1.34× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: InjectedClassTransformer compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/InjectedClassTransformer.kt:101— ClassTooLong — 487 significant lines (blank, comment-only and punctuation-only lines excluded), 9 methods. The bar is 400 significant lines; this is 87 over it, 1.22× 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: CompatContext compiler-compat/src/main/kotlin/dev/zacsweers/metro/compiler/compat/CompatContext.kt:77— ClassTooLong — 486 significant lines (blank, comment-only and punctuation-only lines excluded), 41 methods. The bar is 400 significant lines; this is 86 over it, 1.22× 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: CircuitIrFactoryTransformer compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitIrExtension.kt:570— ClassTooLong — 463 significant lines (blank, comment-only and punctuation-only lines excluded), 17 methods. The bar is 400 significant lines; this is 63 over it, 1.16× 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: DiagnosticRenderer metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/diagnostics/render/DiagnosticRenderer.kt:34— ClassTooLong — 442 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 42 over it, 1.11× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: BindingIndex idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/model/BindingIndex.kt:26— TooManyMethods — 119 methods. The bar is 30 methods; this is 89 over it, 3.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: MetroResolutionService idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt:118— TooManyMethods — 116 methods. The bar is 30 methods; this is 86 over it, 3.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: BetterKotlinLikeDumper compiler-compat/k230/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k230/betterDumpKotlinLike.kt:170— TooManyMethods — 98 methods. The bar is 30 methods; this is 68 over it, 3.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: IrBindingGraph compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBindingGraph.kt:154— TooManyMethods — 74 methods. The bar is 30 methods; this is 44 over it, 2.47× 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: BindingLookup compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingLookup.kt:75— TooManyMethods — 49 methods. The bar is 30 methods; this is 19 over it, 1.63× 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: IrGraphGenerator compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrGraphGenerator.kt:134— 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: MetroGraphValidationService idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/graph/MetroGraphValidationService.kt:61— 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: ContributionsFirGenerator compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/ContributionsFirGenerator.kt:119— TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: CompatContextImpl compiler-compat/k230/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k230/CompatContextImpl.kt:129— TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. Most of these members implement compat.CompatContext (35 of 35 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: Builder metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/MetroOptions.kt:1674— TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: GraphDataBuilder graph-viewer/src/commonMain/kotlin/dev/zacsweers/metro/gradle/analysis/GraphReportRenderer.kt:704— TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: BindingResolutionSession idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/model/BindingResolutionSession.kt:18— TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
FunctionTooLong: graph-viewer.paint REDACTED:3146— FunctionTooLong — paint runs 308 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 208 over it, 3.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: startup-benchmark-report.html.renderBinaryMetrics docs/benchmark_assets/runs/2026-07-30/startup-benchmark-report.html:828— FunctionTooLong — renderBinaryMetrics runs 171 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 71 over it, 1.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: graph-viewer.renderDetails REDACTED:2488— FunctionTooLong — renderDetails 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: graph-viewer.layoutRegions REDACTED:551— FunctionTooLong — layoutRegions runs 117 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: graph-viewer.refreshView REDACTED:2035— FunctionTooLong — refreshView runs 112 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 12 over it, 1.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: graph-viewer.boundaryContour REDACTED:697— FunctionTooLong — boundaryContour runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×5
Edited copy of a member (9 corresponding lines) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/snapshot/SourceSnapshot.kt:190— idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/snapshot/SourceSnapshot.kt:190-198 | idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/snapshot/SourceSnapshot.kt:200-208 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt:1538— idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt:1538-1546 | idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/toolwindow/MetroTreeStructure.kt:398-414 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/ir.kt:1401— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/ir.kt:1401-1409 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/ir.kt:1417-1426 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/commonUtil.kt:47— metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/commonUtil.kt:47-55 | runtime/src/commonMain/kotlin/dev/zacsweers/metro/internal/MetroCollections.kt:47-55 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitIrExtension.kt:427— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitIrExtension.kt:427-436 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitSerializableIrExtension.kt:114-122 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×5
Edited copy of a member (12 corresponding lines) graph-viewer/src/commonMain/kotlin/dev/zacsweers/metro/gradle/analysis/GraphReportRenderer.kt:313— graph-viewer/src/commonMain/kotlin/dev/zacsweers/metro/gradle/analysis/GraphReportRenderer.kt:313-327 | graph-viewer/src/commonMain/kotlin/dev/zacsweers/metro/gradle/analysis/GraphReportRenderer.kt:330-341 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBindingStack.kt:502— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBindingStack.kt:502-513 | metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/BaseBindingStack.kt:27-38 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/identity/TypeKeyIdentity.kt:77— metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/identity/TypeKeyIdentity.kt:77-88 | metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/identity/TypeKeyIdentity.kt:172-183 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/hilt/HiltFirDeclarationExtension.kt:53— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/hilt/HiltFirDeclarationExtension.kt:53-65 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/hilt/HiltFirDeclarationExtension.kt:67-78 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) runtime-coroutines/src/commonMain/kotlin/dev/zacsweers/metro/internal/GraphCleanup.kt:57— runtime-coroutines/src/commonMain/kotlin/dev/zacsweers/metro/internal/GraphCleanup.kt:57-68 | runtime/src/commonMain/kotlin/dev/zacsweers/metro/internal/GraphLifecycleState.kt:66-77 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
AC3 · Page structure· Page without a main landmark · ×4
Page without a main landmark idea-plugin/src/main/resources/inspectionDescriptions/MetroContributeBinding.html:1— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark idea-plugin/src/main/resources/inspectionDescriptions/MetroGraph.html:1— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark idea-plugin/src/main/resources/inspectionDescriptions/MetroGraphWarning.html:1— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark idea-plugin/src/main/resources/intentionDescriptions/MakeClassInjectableIntention/description.html:1— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
D4 · Code Duplication· Edited copy of a member (27 corresponding lines) · ×4
Edited copy of a member (27 corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/symbols/ProviderFramework.kt:592— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/symbols/ProviderFramework.kt:592-624 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/symbols/ProviderFramework.kt:786-812 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/BindingExtraction.kt:597— idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/BindingExtraction.kt:597-623 | metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/DerivedBindingMatching.kt:379-408 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBindingGraph.kt:1629— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBindingGraph.kt:1629-1655 | idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/graph/KaBindingGraph.kt:483-513 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) compiler-compat/k230/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k230/CompatContextImpl.kt:296— compiler-compat/k230/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k230/CompatContextImpl.kt:296-322 | compiler-compat/k2320/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k2320/CompatContextImpl.kt:167-198 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×4
Edited copy of a member (18 corresponding lines) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/graph/MetroGraphValidationService.kt:610— idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/graph/MetroGraphValidationService.kt:610-627 | idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/graph/MetroGraphValidationService.kt:634-656 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/MetroFirExtensionRegistrar.kt:235— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/MetroFirExtensionRegistrar.kt:235-252 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/MetroFirExtensionRegistrar.kt:287-304 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitFirExtension.kt:397— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitFirExtension.kt:397-414 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitFirExtension.kt:425-442 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/symbols/ProviderFramework.kt:206— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/symbols/ProviderFramework.kt:206-229 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/symbols/ProviderFramework.kt:343-360 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×4
Edited copy of a member (8 corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/irDeclarationRendering.kt:463— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/irDeclarationRendering.kt:463-471 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/irDeclarationRendering.kt:475-482 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitFirExtension.kt:474— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitFirExtension.kt:474-481 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitIrExtension.kt:369-377 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitFirExtension.kt:495— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitFirExtension.kt:495-502 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitIrExtension.kt:391-398 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) runtime/src/commonMain/kotlin/dev/zacsweers/metro/internal/MapFactory.kt:33— runtime/src/commonMain/kotlin/dev/zacsweers/metro/internal/MapFactory.kt:33-40 | runtime/src/commonMain/kotlin/dev/zacsweers/metro/internal/MapLazyFactory.kt:32-39 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (12 lines × 2) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/GraphMetadataReporter.kt:137— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/GraphMetadataReporter.kt:137-148 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/GraphMetadataReporter.kt:159-170 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/GraphMetadataReporter.kt:137` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/GraphMetadataReporter.kt:171` calls `put`, `JsonPrimitive` and `compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/GraphMetadataReporter.kt:149` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 2) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt:1242— idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt:1242-1253 | idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt:1278-1289 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt:1242` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/DependencyGraphChecker.kt:666— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/DependencyGraphChecker.kt:666-677 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/DependencyGraphChecker.kt:685-696 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/DependencyGraphChecker.kt:666` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt:941— idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt:941-952 | idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt:1015-1026 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt:941` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/IrIdentities.kt:99— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/IrIdentities.kt:99-103 | idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/TypeKeyResolution.kt:224-228 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/IrIdentities.kt:99` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/BitField.kt:57— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/BitField.kt:57-61 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/BitField.kt:77-81 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/src/main/kotlin/dev/zacsweers/metro/compiler/BitField.kt:57` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) graph-viewer/src/commonMain/kotlin/dev/zacsweers/metro/gradle/analysis/GraphReportRenderer.kt:1153— graph-viewer/src/commonMain/kotlin/dev/zacsweers/metro/gradle/analysis/GraphReportRenderer.kt:1153-1157 | graph-viewer/src/commonMain/kotlin/dev/zacsweers/metro/gradle/analysis/GraphReportRenderer.kt:1272-1276 — both copies are in the same file, so extract the block into 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) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/graph/MetroGraphValidationService.kt:611— idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/graph/MetroGraphValidationService.kt:611-615 | idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/graph/MetroGraphValidationService.kt:636-640 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/graph/MetroGraphValidationService.kt:611` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/graph/MetroGraphValidationService.kt:635` calls `reportProgress` and `idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/graph/MetroGraphValidationService.kt:610` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Swallowed exception (caught, then discarded) REDACTED:100— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) REDACTED:116— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) compiler-compat/src/main/kotlin/dev/zacsweers/metro/compiler/compat/CompatContext.kt:121— `catch (_: Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) build-logic/src/main/kotlin/GitCommitValueSource.kt:21— `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Duplicated block (19 lines × 2) compiler-compat/k230/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k230/CompatContextImpl.kt:304— compiler-compat/k230/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k230/CompatContextImpl.kt:304-322 | compiler-compat/k2320/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k2320/CompatContextImpl.kt:180-198 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `compiler-compat/k230/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k230/CompatContextImpl.kt:304` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/expressions/GraphExpressionGenerator.kt:1416— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/expressions/GraphExpressionGenerator.kt:1416-1434 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/expressions/GraphExpressionGenerator.kt:1505-1523 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/expressions/GraphExpressionGenerator.kt:1416` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/tracing/IdeTraceOperation.kt:197— idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/tracing/IdeTraceOperation.kt:197-215 | idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/tracing/IdeTraceOperation.kt:250-268 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/tracing/IdeTraceOperation.kt:197` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `block` to `(IdeTraceOperation?` in one and `suspend (IdeTraceOperation?` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Off the main sequence: metro:graphs — metro:graphs: abstractness 0.01, instability 0.00, distance 0.99 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
Off the main sequence: metro:compiler-compat — metro:compiler-compat: abstractness 0.21, instability 0.00, distance 0.79 — zone of pain — concrete and depended on by 10 project(s), so it's rigid to change.
Off the main sequence: metro:metrox-android — metro:metrox-android: abstractness 0.75, instability 1.00, distance 0.75 — zone of uselessness — abstract and unstable, so it's likely unused.
AC6 · Visual & motion safety· Focus outline removed in CSS without a · ×2
Focus outline removed in CSS without a :focus replacement gradle-plugin/src/main/resources/dev/zacsweers/metro/gradle/analysis/graph-viewer.css:77— `.search-box input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement gradle-plugin/src/main/resources/dev/zacsweers/metro/gradle/analysis/graph-viewer.css:78— `.search-box input:focus-visible` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
IrKt.renderTo (cyclomatic 20) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/ir.kt:1720— IrKt.renderTo has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This shape REPEATS in the file: one other method here (IrKt.renderTo) 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.
IrKt.renderTo (cyclomatic 20) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/ir.kt:1733— IrKt.renderTo has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This shape REPEATS in the file: one other method here (IrKt.renderTo) 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.
startup-benchmark-report.html.renderMetadata (cyclomatic 19) docs/benchmark_assets/runs/2025-12-08/startup-benchmark-report.html:272— startup-benchmark-report.html.renderMetadata 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.
startup-benchmark-report.html.renderMetadata (cyclomatic 19) docs/benchmark_assets/startup-benchmark-report.html:272— startup-benchmark-report.html.renderMetadata 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.
build-benchmark-report.html.renderMetadata (cyclomatic 16) docs/benchmark_assets/build-benchmark-report.html:392— build-benchmark-report.html.renderMetadata 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.
build-benchmark-report.html.renderMetadata (cyclomatic 16) docs/benchmark_assets/runs/2025-12-08/build-benchmark-report.html:392— build-benchmark-report.html.renderMetadata 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.
IrKt.renderTo (cognitive 29) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/ir.kt:1720— IrKt.renderTo has cognitive complexity 29 (threshold 15). Drivers by points: match/switch 5 (15 pts), if/else 6 (10 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 16). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident. This shape REPEATS in the file: one other method here (IrKt.renderTo) 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.
IrKt.renderTo (cognitive 29) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/ir.kt:1733— IrKt.renderTo has cognitive complexity 29 (threshold 15). Drivers by points: match/switch 5 (15 pts), if/else 6 (10 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 16). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident. This shape REPEATS in the file: one other method here (IrKt.renderTo) 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.
startup-benchmark-report.html.renderMetadata (cognitive 17) docs/benchmark_assets/runs/2025-12-08/startup-benchmark-report.html:272— startup-benchmark-report.html.renderMetadata has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 16, if/else 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.
startup-benchmark-report.html.renderMetadata (cognitive 17) docs/benchmark_assets/startup-benchmark-report.html:272— startup-benchmark-report.html.renderMetadata has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 16, if/else 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.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (4 members, 50+ identical tokens) compiler-compat/k240/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k240/CompatContextImpl.kt:215— compiler-compat/k240/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k240/CompatContextImpl.kt:215-233 | compiler-compat/k240/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k240/IrConstructorCallIrGeneratedDeclarationsRegistrarCompat.kt:56-74 | compiler-compat/k240_dev_2124/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k240_dev_2124/IrConstructorCallIrGeneratedDeclarationsRegistrarCompat.kt:52-70 | compiler-compat/k2420_dev_6138/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k2420_dev_6138/IrAnnotationIrGeneratedDeclarationsRegistrarCompat.kt:77-95 — 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) compiler-tests/src/generator230/kotlin/dev/zacsweers/metro/compiler/GenerateTestsImpl.kt:23— compiler-tests/src/generator230/kotlin/dev/zacsweers/metro/compiler/GenerateTestsImpl.kt:23-68 | compiler-tests/src/generator2320/kotlin/dev/zacsweers/metro/compiler/GenerateTestsImpl.kt:23-68 | compiler-tests/src/generator240/kotlin/dev/zacsweers/metro/compiler/GenerateTestsImpl.kt:23-68 | compiler-tests/src/generator2420/kotlin/dev/zacsweers/metro/compiler/GenerateTestsImpl.kt:24-69 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×2
Edited copy of a member (21 corresponding lines) compiler-compat/k230/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k230/CompatContextImpl.kt:136— compiler-compat/k230/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k230/CompatContextImpl.kt:136-156 | compiler-compat/k2320/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k2320/CompatContextImpl.kt:76-97 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/BindingContainerCallableChecker.kt:112— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/BindingContainerCallableChecker.kt:112-141 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/MultibindsChecker.kt:52-72 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×2
Edited copy of a member (15 corresponding lines) compiler-compat/k230/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k230/betterDumpKotlinLike.kt:1407— compiler-compat/k230/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k230/betterDumpKotlinLike.kt:1407-1421 | compiler-compat/k230/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k230/betterDumpKotlinLike.kt:1427-1445 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/ConsumerExtraction.kt:26— idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/ConsumerExtraction.kt:26-41 | idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/GraphFactoryInputs.kt:353-367 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 18+ corresponding lines) · ×2
Edited copies of one member (3 members, 18+ corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitContributionExtension.kt:88— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitContributionExtension.kt:88-118 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitContributionExtension.kt:125-150 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitSerializableContributionExtension.kt:44-61 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 18+ corresponding lines) runtime-coroutines/src/jvmMain/kotlin/dev/zacsweers/metro/internal/SafePublicationSuspendLazy.kt:32— runtime-coroutines/src/jvmMain/kotlin/dev/zacsweers/metro/internal/SafePublicationSuspendLazy.kt:32-49 | runtime-coroutines/src/nativeMain/kotlin/dev/zacsweers/metro/internal/SafePublicationSuspendLazy.kt:29-46 | runtime-coroutines/src/webMain/kotlin/dev/zacsweers/metro/internal/SafePublicationSuspendLazy.kt:29-46 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×2
Edited copy of a member (14 corresponding lines) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/model/BindingIndex.kt:1712— idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/model/BindingIndex.kt:1712-1725 | idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/model/BindingIndex.kt:1788-1801 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/ContributionsFirGenerator.kt:164— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/ContributionsFirGenerator.kt:164-177 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/ContributionIrTransformer.kt:716-729 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×2
Edited copy of a member (10 corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/BitField.kt:56— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/BitField.kt:56-65 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/BitField.kt:76-85 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) metro-trace/src/main/kotlin/dev/zacsweers/metro/trace/internal/TracedProvider.kt:26— metro-trace/src/main/kotlin/dev/zacsweers/metro/trace/internal/TracedProvider.kt:26-35 | metro-trace/src/main/kotlin/dev/zacsweers/metro/trace/internal/TracedSuspendProvider.kt:30-39 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×2
Edited copy of a member (13 corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/CompositeMetroFirDeclarationGenerationExtension.kt:192— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/CompositeMetroFirDeclarationGenerationExtension.kt:192-204 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/CompositeMetroFirDeclarationGenerationExtension.kt:209-221 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/CompositeMetroFirDeclarationGenerationExtension.kt:126— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/CompositeMetroFirDeclarationGenerationExtension.kt:126-138 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/CompositeMetroFirDeclarationGenerationExtension.kt:165-177 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×2
Edited copy of a member (16 corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/CompositeMetroFirDeclarationGenerationExtension.kt:93— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/CompositeMetroFirDeclarationGenerationExtension.kt:93-108 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/CompositeMetroFirDeclarationGenerationExtension.kt:145-160 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrGraphGenerator.kt:616— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrGraphGenerator.kt:616-631 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrGraphGenerator.kt:640-660 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (21 lines × 2) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/MetroAnnotations.kt:313— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/MetroAnnotations.kt:313-333 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/MetroAnnotations.kt:613-633 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/src/main/kotlin/dev/zacsweers/metro/compiler/MetroAnnotations.kt:313` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21 lines × 2) compiler-tests/src/generator2320/kotlin/dev/zacsweers/metro/compiler/MetroDiagnosticsCompat.kt:53— compiler-tests/src/generator2320/kotlin/dev/zacsweers/metro/compiler/MetroDiagnosticsCompat.kt:53-73 | compiler-tests/src/generator240/kotlin/dev/zacsweers/metro/compiler/MetroDiagnosticsCompat.kt:53-73 — before extracting anything, compare `compiler-tests/src/generator2320/kotlin/dev/zacsweers/metro/compiler/MetroDiagnosticsCompat.kt` and `compiler-tests/src/generator240/kotlin/dev/zacsweers/metro/compiler/MetroDiagnosticsCompat.kt` as WHOLE FILES: 96% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (14 lines × 2) metro-trace/src/main/kotlin/dev/zacsweers/metro/trace/internal/MetroTraceContext.kt:63— metro-trace/src/main/kotlin/dev/zacsweers/metro/trace/internal/MetroTraceContext.kt:63-76 | metro-trace/src/main/kotlin/dev/zacsweers/metro/trace/internal/MetroTraceContext.kt:106-119 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `metro-trace/src/main/kotlin/dev/zacsweers/metro/trace/internal/MetroTraceContext.kt:63` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) samples/compose-viewmodels/screen-details/src/commonMain/kotlin/dev/zacsweers/metro/sample/composeviewmodels/details/DetailsScreen.kt:28— samples/compose-viewmodels/screen-details/src/commonMain/kotlin/dev/zacsweers/metro/sample/composeviewmodels/details/DetailsScreen.kt:28-41 | samples/compose-viewmodels/screen-home/src/commonMain/kotlin/dev/zacsweers/metro/sample/composeviewmodels/home/HomeScreen.kt:27-40 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `samples/compose-viewmodels/screen-details/src/commonMain/kotlin/dev/zacsweers/metro/sample/composeviewmodels/details/DetailsScreen.kt:28` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) compiler-compat/k230/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k230/betterDumpKotlinLike.kt:1407— compiler-compat/k230/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k230/betterDumpKotlinLike.kt:1407-1416 | compiler-compat/k230/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k230/betterDumpKotlinLike.kt:1427-1436 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler-compat/k230/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k230/betterDumpKotlinLike.kt:1407` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/graph/GraphMemberExtractor.kt:359— idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/graph/GraphMemberExtractor.kt:359-368 | idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/graph/GraphMemberExtractor.kt:433-442 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/graph/GraphMemberExtractor.kt:359` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBindingStack.kt:506— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBindingStack.kt:506-513 | metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/BaseBindingStack.kt:31-38 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBindingStack.kt:506` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt:897— idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt:897-904 | idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt:977-984 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt:897` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/SyntheticGraphGenerator.kt:415— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/SyntheticGraphGenerator.kt:415-421 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/SyntheticGraphGenerator.kt:443-450 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/SyntheticGraphGenerator.kt:415` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 2) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBindingStack.kt:418— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBindingStack.kt:418-425 | idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/graph/KaBindingStack.kt:55-61 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
graph-viewer.paint (cyclomatic 201) REDACTED:3146— graph-viewer.paint has cyclomatic complexity 201 (threshold 15). Of this number, 146 points are the body's own statements and 55 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.
Builder.build (cyclomatic 116) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/GraphNodes.kt:833— Builder.build has cyclomatic complexity 116 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BindingContainerCallableChecker.checkImpl (cyclomatic 110) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/BindingContainerCallableChecker.kt:144— BindingContainerCallableChecker.checkImpl has cyclomatic complexity 110 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Builder.applyOptionValue (cyclomatic 101) metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/MetroOptions.kt:2031— Builder.applyOptionValue has cyclomatic complexity 101 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
GraphExpressionGenerator.generateBindingCode (cyclomatic 98) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/expressions/GraphExpressionGenerator.kt:173— GraphExpressionGenerator.generateBindingCode has cyclomatic complexity 98 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BindingGraphGenerator.generate (cyclomatic 86) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingGraphGenerator.kt:83— BindingGraphGenerator.generate has cyclomatic complexity 86 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DependencyGraphChecker.checkImpl (cyclomatic 74) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/DependencyGraphChecker.kt:106— DependencyGraphChecker.checkImpl has cyclomatic complexity 74 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
renderDetails (cyclomatic 74) REDACTED:2488— renderDetails has cyclomatic complexity 74 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
graph-viewer.refreshView (cyclomatic 65) REDACTED:2035— graph-viewer.refreshView has cyclomatic complexity 65 (threshold 15). Of this number, 51 points are the body's own statements and 14 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.
startup-benchmark-report.html.renderBinaryMetrics (cyclomatic 62) docs/benchmark_assets/runs/2026-07-30/startup-benchmark-report.html:828— startup-benchmark-report.html.renderBinaryMetrics has cyclomatic complexity 62 (threshold 15). Of this number, 33 points are the body's own statements and 29 belong to 7 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.
indexGraph (cyclomatic 57) REDACTED:82— indexGraph has cyclomatic complexity 57 (threshold 15). Of this number, 56 points are the body's own statements and 1 belongs to 11 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.
boundaryContour (cyclomatic 54) REDACTED:697— boundaryContour has cyclomatic complexity 54 (threshold 15). Of this number, 40 points are the body's own statements and 14 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.
BindingPropertyCollector.processBindingNode (cyclomatic 53) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingPropertyCollector.kt:412— BindingPropertyCollector.processBindingNode 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.
ContributedInterfaceSupertypeGenerator.computeContributionSupertypes (cyclomatic 52) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/ContributedInterfaceSupertypeGenerator.kt:403— ContributedInterfaceSupertypeGenerator.computeContributionSupertypes has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
buildView (cyclomatic 49) REDACTED:1962— buildView has cyclomatic complexity 49 (threshold 15). Of this number, 28 points are the body's own statements and 21 belong to 8 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.
graph-viewer.layoutRegions (cyclomatic 48) REDACTED:551— graph-viewer.layoutRegions has cyclomatic complexity 48 (threshold 15). Of this number, 44 points are the body's own statements and 4 belong to 3 function items 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.
MetroAnnotationsKt.metroAnnotations (cyclomatic 47) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/MetroAnnotations.kt:257— MetroAnnotationsKt.metroAnnotations has cyclomatic complexity 47 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
MetroAnnotationsKt.metroAnnotations (cyclomatic 45) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/MetroAnnotations.kt:551— MetroAnnotationsKt.metroAnnotations has cyclomatic complexity 45 (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.
fetch-all-ide-kotlin-versions.main (cyclomatic 45) REDACTED:418— fetch-all-ide-kotlin-versions.main has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BindingContainerClassChecker.checkImpl (cyclomatic 43) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/BindingContainerClassChecker.kt:83— BindingContainerClassChecker.checkImpl 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.
BindingGraphGenerator.computeRawInheritedGraphData (cyclomatic 43) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingGraphGenerator.kt:1008— BindingGraphGenerator.computeRawInheritedGraphData 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.
BindingIndexLookups.build (cyclomatic 41) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/model/BindingIndexLookups.kt:75— BindingIndexLookups.build has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DependencyGraphTransformer.prepareDependencyGraph (cyclomatic 39) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/DependencyGraphTransformer.kt:493— DependencyGraphTransformer.prepareDependencyGraph 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.
MetroResolutionService.classifyFileChange (cyclomatic 39) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt:2490— MetroResolutionService.classifyFileChange 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.
BindingIndex.bindingCandidateRejection (cyclomatic 39) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/model/BindingIndex.kt:1516— BindingIndex.bindingCandidateRejection 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.
DependencyGraphCreatorChecker.checkImpl (cyclomatic 38) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/DependencyGraphCreatorChecker.kt:71— DependencyGraphCreatorChecker.checkImpl 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.
MultibindsChecker.checkImpl (cyclomatic 38) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/MultibindsChecker.kt:75— MultibindsChecker.checkImpl 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.
MetroResolutionService.drainCoordinatorEvents (cyclomatic 38) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt:391— MetroResolutionService.drainCoordinatorEvents 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.
startup-benchmark-report.html.renderMetadata (cyclomatic 33) docs/benchmark_assets/runs/2026-07-30/startup-benchmark-report.html:637— startup-benchmark-report.html.renderMetadata 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.
BetterKotlinLikeDumper.printMemberAccessExpressionWithNoIndent (cyclomatic 32) compiler-compat/k230/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k230/betterDumpKotlinLike.kt:1206— BetterKotlinLikeDumper.printMemberAccessExpressionWithNoIndent has cyclomatic complexity 32 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
AggregationChecker.checkBindingContribution (cyclomatic 31) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/AggregationChecker.kt:294— AggregationChecker.checkBindingContribution 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.
BindingExtractionKt.classBindingData (cyclomatic 31) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/BindingExtraction.kt:635— BindingExtractionKt.classBindingData has cyclomatic complexity 31 (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.
ResolutionInputCapture.capture (cyclomatic 31) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/snapshot/ResolutionInputCapture.kt:39— ResolutionInputCapture.capture has cyclomatic complexity 31 (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.
MultibindingExpressionGenerator.generateMapMultibindingExpression (cyclomatic 30) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/expressions/MultibindingExpressionGenerator.kt:563— MultibindingExpressionGenerator.generateMapMultibindingExpression 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.
build-benchmark-report.html.renderMetadata (cyclomatic 30) docs/benchmark_assets/runs/2026-07-30/build-benchmark-report.html:783— build-benchmark-report.html.renderMetadata has cyclomatic complexity 30 (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.
IrContributionMerger.computeContributions (cyclomatic 29) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/IrContributionMerger.kt:173— IrContributionMerger.computeContributions 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.
BindsMirrorClassTransformerKt.transformBindingDeclarations (cyclomatic 29) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/BindsMirrorClassTransformer.kt:191— BindsMirrorClassTransformerKt.transformBindingDeclarations 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.
MembersInjectorTransformer.getOrGenerateInjector (cyclomatic 29) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/MembersInjectorTransformer.kt:205— MembersInjectorTransformer.getOrGenerateInjector 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.
SourceLibraryInputsKt.libraryInputs (cyclomatic 29) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/snapshot/SourceLibraryInputs.kt:77— SourceLibraryInputsKt.libraryInputs 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.
MetroResolutionService.buildResolutionCandidate (cyclomatic 28) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt:1189— MetroResolutionService.buildResolutionCandidate has cyclomatic complexity 28 (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.
MembersInjectChecker.checkImpl (cyclomatic 27) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/MembersInjectChecker.kt:59— MembersInjectChecker.checkImpl 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.
MetroCompilerPluginRegistrar.registerExtensions (cyclomatic 26) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/MetroCompilerPluginRegistrar.kt:33— MetroCompilerPluginRegistrar.registerExtensions 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.
IrGraphGenerator.implementOverrides (cyclomatic 26) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrGraphGenerator.kt:2188— IrGraphGenerator.implementOverrides 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.
graph-viewer.offsetContour (cyclomatic 26) REDACTED:831— graph-viewer.offsetContour 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.
(anonymous) (cyclomatic 26) REDACTED:3— (anonymous) has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
IrBindingGraph.validateBindings (cyclomatic 25) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBindingGraph.kt:1517— IrBindingGraph.validateBindings 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.
BindingContainerTransformer.loadExternalBindingContainer (cyclomatic 25) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/BindingContainerTransformer.kt:1095— BindingContainerTransformer.loadExternalBindingContainer 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.
LibraryContributionScanner.processLibraryHint (cyclomatic 25) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/LibraryContributionScanner.kt:178— LibraryContributionScanner.processLibraryHint has cyclomatic complexity 25 (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.
graph-viewer.projectGraph (cyclomatic 25) REDACTED:174— graph-viewer.projectGraph 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.
graph-viewer.layoutNeighborhood (cyclomatic 25) REDACTED:1623— graph-viewer.layoutNeighborhood has cyclomatic complexity 25 (threshold 15). Of this number, 20 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.
FirAccessorOverrideStatusTransformer.needTransformStatus (cyclomatic 24) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/FirAccessorOverrideStatusTransformer.kt:48— FirAccessorOverrideStatusTransformer.needTransformStatus has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
IrBindingGraph.findSimilarBindings (cyclomatic 24) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBindingGraph.kt:1297— IrBindingGraph.findSimilarBindings 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.
ValidationSourceSnapshot.capture (cyclomatic 24) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/graph/ValidationSourceSnapshot.kt:91— ValidationSourceSnapshot.capture 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.
FileShardBuilder.processBindingCallable (cyclomatic 24) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/FileShardBuilder.kt:338— FileShardBuilder.processBindingCallable 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.
MetroSortKt.computeStronglyConnectedComponents (cyclomatic 24) metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/MetroSort.kt:663— MetroSortKt.computeStronglyConnectedComponents 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.
graph-viewer.document.addEventListener("keydown") (cyclomatic 24) REDACTED:3782— graph-viewer.document.addEventListener("keydown") has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
(anonymous) (cyclomatic 24) REDACTED:3782— (anonymous) 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.
AggregationChecker.checkImpl (cyclomatic 23) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/AggregationChecker.kt:104— AggregationChecker.checkImpl 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.
GraphLifecycleChecker.check (cyclomatic 23) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/GraphLifecycleChecker.kt:62— GraphLifecycleChecker.check has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
Builder.buildCreator (cyclomatic 23) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/GraphNodes.kt:421— Builder.buildCreator 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.
IrKt.materializeWrappedType (cyclomatic 23) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/ir.kt:973— IrKt.materializeWrappedType 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.
ContributionIrTransformer.generateContributionProviderFunctions (cyclomatic 23) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/ContributionIrTransformer.kt:464— ContributionIrTransformer.generateContributionProviderFunctions 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.
layoutBindings (cyclomatic 23) REDACTED:323— layoutBindings has cyclomatic complexity 23 (threshold 15). Of this number, 17 points are the body's own statements and 6 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.
InjectionSiteChecksKt.validateInjectionSiteType (cyclomatic 22) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/injectionSiteChecks.kt:115— InjectionSiteChecksKt.validateInjectionSiteType 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.
IrDeclarationRenderingKt.renderForDiagnosticImpl (cyclomatic 22) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/irDeclarationRendering.kt:232— IrDeclarationRenderingKt.renderForDiagnosticImpl 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.
LibraryIndexPostProcessor.bindingSeeds (cyclomatic 22) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/LibraryIndexPostProcessor.kt:245— LibraryIndexPostProcessor.bindingSeeds 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.
ContributionCandidateKt.contributionCandidate (cyclomatic 22) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/intentions/contributions/ContributionCandidate.kt:63— ContributionCandidateKt.contributionCandidate 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.
MetroValidationSelectionKt.validationSelectionVisitor (cyclomatic 22) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/toolwindow/MetroValidationSelection.kt:9— MetroValidationSelectionKt.validationSelectionVisitor 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.
build-benchmark-report.html.frameworkVersion (cyclomatic 22) docs/benchmark_assets/runs/2026-07-30/build-benchmark-report.html:561— build-benchmark-report.html.frameworkVersion 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.
DependencyGraphChecker.checkStaticCreatorCollisions (cyclomatic 21) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/DependencyGraphChecker.kt:739— DependencyGraphChecker.checkStaticCreatorCollisions 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.
GraphExpressionGenerator.generateBindingArguments (cyclomatic 21) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/expressions/GraphExpressionGenerator.kt:1583— GraphExpressionGenerator.generateBindingArguments 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.
ContributionEditKt.applyContribution (cyclomatic 21) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/intentions/contributions/ContributionEdit.kt:27— ContributionEditKt.applyContribution 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.
BindingIndex.selectedGraphComposition (cyclomatic 21) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/model/BindingIndex.kt:435— BindingIndex.selectedGraphComposition 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.
BindingIndex.isConsumerInContext (cyclomatic 21) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/model/BindingIndex.kt:1406— BindingIndex.isConsumerInContext 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.
AssistedInjectChecker.checkAssistedFactory (cyclomatic 20) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/AssistedInjectChecker.kt:94— AssistedInjectChecker.checkAssistedFactory 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.
IrGraphGenerator.collectShardPropertyInitializers (cyclomatic 20) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrGraphGenerator.kt:1542— IrGraphGenerator.collectShardPropertyInitializers 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.
BindingContainerTransformer.findContainer (cyclomatic 20) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/BindingContainerTransformer.kt:192— BindingContainerTransformer.findContainer 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.
MetroLineMarkerProvider.consumerMarker (cyclomatic 20) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroLineMarkerProvider.kt:370— MetroLineMarkerProvider.consumerMarker 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.
BindingExplanationKt.explainBindingSelection (cyclomatic 20) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/model/BindingExplanation.kt:49— BindingExplanationKt.explainBindingSelection has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
GraphMetadataReporter.buildBindingJson (cyclomatic 19) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/GraphMetadataReporter.kt:339— GraphMetadataReporter.buildBindingJson has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
BindingExplanationRenderingKt.selectionReason (cyclomatic 19) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/reporting/BindingExplanationRendering.kt:104— BindingExplanationRenderingKt.selectionReason has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
KaBindingLookup.delegateToParentIfScoped (cyclomatic 19) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/graph/KaBindingLookup.kt:336— KaBindingLookup.delegateToParentIfScoped 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.
MetroResolutionService.index (cyclomatic 19) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt:1802— MetroResolutionService.index 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.
InjectionTargetsKt.injectionAnnotationTargets (cyclomatic 19) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/intentions/injection/InjectionTargets.kt:20— InjectionTargetsKt.injectionAnnotationTargets 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.
SuspendBindingValidator.runtimeRequirement (cyclomatic 19) metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/SuspendBindingValidator.kt:493— SuspendBindingValidator.runtimeRequirement 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.
KotlinToolingVersion.compareTo (cyclomatic 18) compiler-compat/src/main/kotlin/dev/zacsweers/metro/compiler/compat/KotlinToolingVersion.kt:76— KotlinToolingVersion.compareTo has cyclomatic complexity 18 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
CircuitInjectClassChecker.checkImpl (cyclomatic 18) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitInjectChecker.kt:166— CircuitInjectClassChecker.checkImpl 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.
CircuitSerializableClassChecker.check (cyclomatic 18) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitSerializableChecker.kt:34— CircuitSerializableClassChecker.check 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.
BindingPropertyCollector.collect (cyclomatic 18) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingPropertyCollector.kt:256— BindingPropertyCollector.collect 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.
BindingPropertyCollector.knownPropertyType (cyclomatic 18) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingPropertyCollector.kt:625— BindingPropertyCollector.knownPropertyType 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.
ShardingDiagnostics.generateShardingPlanReport (cyclomatic 18) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/sharding/ShardingDiagnostics.kt:35— ShardingDiagnostics.generateShardingPlanReport 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.
CreateGraphTransformer.visitCall (cyclomatic 18) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/CreateGraphTransformer.kt:72— CreateGraphTransformer.visitCall 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.
InjectedClassTransformer.getOrGenerateFactory (cyclomatic 18) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/InjectedClassTransformer.kt:135— InjectedClassTransformer.getOrGenerateFactory 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.
GraphReportRendererKt.bindingType (cyclomatic 18) graph-viewer/src/commonMain/kotlin/dev/zacsweers/metro/gradle/analysis/GraphReportRenderer.kt:1875— GraphReportRendererKt.bindingType 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.
MetroLineMarkerProvider.collectNavigationMarkers (cyclomatic 18) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroLineMarkerProvider.kt:86— MetroLineMarkerProvider.collectNavigationMarkers 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.
GraphMemberExtractor.indexGraphCallable (cyclomatic 18) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/graph/GraphMemberExtractor.kt:344— GraphMemberExtractor.indexGraphCallable 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.
DiagnosticRenderer.render (cyclomatic 18) metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/diagnostics/render/DiagnosticRenderer.kt:43— DiagnosticRenderer.render 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.
graph-viewer.layoutRadial (cyclomatic 18) REDACTED:432— graph-viewer.layoutRadial has cyclomatic complexity 18 (threshold 15). Of this number, 14 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.
graph-viewer.groupPackages (cyclomatic 18) REDACTED:483— graph-viewer.groupPackages has cyclomatic complexity 18 (threshold 15). Of this number, 10 points are the body's own statements and 8 belong to 7 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.
graph-viewer.attentionFor (cyclomatic 18) REDACTED:1427— graph-viewer.attentionFor 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.
graph-viewer.renderExplanations (cyclomatic 18) REDACTED:2695— graph-viewer.renderExplanations has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
graph-viewer.canvas.addEventListener("pointermove") (cyclomatic 18) REDACTED:3849— graph-viewer.canvas.addEventListener("pointermove") 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.
(anonymous) (cyclomatic 18) REDACTED:3849— (anonymous) 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.
ContributionProviderNameIdentityKt.contributionProviderArgumentIdentity (cyclomatic 17) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ContributionProviderNameIdentity.kt:131— ContributionProviderNameIdentityKt.contributionProviderArgumentIdentity has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
CreateGraphChecker.checkImpl (cyclomatic 17) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/CreateGraphChecker.kt:43— CreateGraphChecker.checkImpl 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.
BindingLookup.deriveBinding (cyclomatic 17) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingLookup.kt:1108— BindingLookup.deriveBinding 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.
Builder.buildExternalGraphOrBindingContainer (cyclomatic 17) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/GraphNodes.kt:1638— Builder.buildExternalGraphOrBindingContainer 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.
IrBindingGraph.finishSeal (cyclomatic 17) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBindingGraph.kt:852— IrBindingGraph.finishSeal 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.
IrKt.irInvokeResolved (cyclomatic 17) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/ir.kt:528— IrKt.irInvokeResolved 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: IrKt.primitiveFactoryClassId (cyclomatic 18) 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.
FactoryIrUtilKt.generateMetadataVisibleDeclarationMirror (cyclomatic 17) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/factoryIrUtil.kt:369— FactoryIrUtilKt.generateMetadataVisibleDeclarationMirror 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.
FileShardBuilder.processInjectAnnotated (cyclomatic 17) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/FileShardBuilder.kt:478— FileShardBuilder.processInjectAnnotated 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.
LibraryIndexPostProcessor.resolveLibraryInjectBindings (cyclomatic 17) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/LibraryIndexPostProcessor.kt:82— LibraryIndexPostProcessor.resolveLibraryInjectBindings 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.
GraphDeclarationExtractor.extract (cyclomatic 17) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/graph/GraphDeclarationExtractor.kt:61— GraphDeclarationExtractor.extract 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.
ContributionMapKeysKt.mapKeyChoice (cyclomatic 17) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/intentions/contributions/ContributionMapKeys.kt:186— ContributionMapKeysKt.mapKeyChoice 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.
MutableBindingGraph.prepareSeal (cyclomatic 17) metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/BindingGraph.kt:154— MutableBindingGraph.prepareSeal 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.
graph-viewer.exploredNeighborhood (cyclomatic 17) REDACTED:1896— graph-viewer.exploredNeighborhood 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.
graph-viewer.renderBindings (cyclomatic 17) REDACTED:2399— graph-viewer.renderBindings has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 2413, 2403, 2429). 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.
createBindingRow (cyclomatic 17) REDACTED:2349— createBindingRow 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.
GraphLifecycleCheckerKt.checkGraphLifecycle (cyclomatic 16) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/GraphLifecycleChecker.kt:215— GraphLifecycleCheckerKt.checkGraphLifecycle 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.
ContributionsFirGenerator.generateFunctions (cyclomatic 16) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/ContributionsFirGenerator.kt:497— ContributionsFirGenerator.generateFunctions 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.
DependencyGraphFirGenerator.generateFunctions (cyclomatic 16) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/DependencyGraphFirGenerator.kt:731— DependencyGraphFirGenerator.generateFunctions 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.
InjectedClassFirGenerator.generateFunctions (cyclomatic 16) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/InjectedClassFirGenerator.kt:688— InjectedClassFirGenerator.generateFunctions 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.
BindingContainerTransformer.getOrLookupProviderFactory (cyclomatic 16) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/BindingContainerTransformer.kt:388— BindingContainerTransformer.getOrLookupProviderFactory 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.
ContributionIrTransformer.transformTopLevelContributionProvider (cyclomatic 16) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/ContributionIrTransformer.kt:770— ContributionIrTransformer.transformTopLevelContributionProvider 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.
MetroGradleSubplugin.applyToCompilation (cyclomatic 16) gradle-plugin/src/main/kotlin/dev/zacsweers/metro/gradle/MetroGradleSubplugin.kt:187— MetroGradleSubplugin.applyToCompilation 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.
ContributionMergingKt.applyExcludesAndReplaces (cyclomatic 16) metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/ContributionMerging.kt:140— ContributionMergingKt.applyExcludesAndReplaces 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.
BetterKotlinLikeDumper.printSimpleFunction (cyclomatic 16) compiler-compat/k230/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k230/betterDumpKotlinLike.kt:704— BetterKotlinLikeDumper.printSimpleFunction has cyclomatic complexity 16 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
startup-benchmark-report.html.frameworkVersion (cyclomatic 16) docs/benchmark_assets/runs/2026-07-30/startup-benchmark-report.html:516— startup-benchmark-report.html.frameworkVersion 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.
graph-viewer.rootConnections (cyclomatic 16) REDACTED:230— graph-viewer.rootConnections has cyclomatic complexity 16 (threshold 15). Of this number, 12 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.
graph-viewer.switchMode (cyclomatic 16) REDACTED:2175— graph-viewer.switchMode 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.
Builder.build (cognitive 338) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/GraphNodes.kt:833— Builder.build has cognitive complexity 338 (threshold 15). Drivers by points: if/else 92 (283 pts), loops 16 (32 pts), boolean chains 21, match/switch 1 (2 pts) (nesting depth added 208). 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.
paint (cognitive 241) REDACTED:3146— paint has cognitive complexity 241 (threshold 15). Drivers by points: ternaries 59 (116 pts), if/else 39 (59 pts), boolean chains 57, loops 7 (9 pts) (nesting depth added 79). Of this number, 202 points are the body's own statements and 39 belong to 23 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.
BindingContainerCallableChecker.checkImpl (cognitive 197) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/BindingContainerCallableChecker.kt:144— BindingContainerCallableChecker.checkImpl has cognitive complexity 197 (threshold 15). Drivers by points: if/else 87 (155 pts), boolean chains 27, match/switch 4 (11 pts), loops 2 (4 pts) (nesting depth added 77). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GraphExpressionGenerator.generateBindingCode (cognitive 160) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/expressions/GraphExpressionGenerator.kt:173— GraphExpressionGenerator.generateBindingCode has cognitive complexity 160 (threshold 15). Drivers by points: if/else 60 (116 pts), boolean chains 31, match/switch 4 (7 pts), loops 2 (6 pts) (nesting depth added 63). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BindingGraphGenerator.generate (cognitive 154) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingGraphGenerator.kt:83— BindingGraphGenerator.generate has cognitive complexity 154 (threshold 15). Drivers by points: if/else 52 (108 pts), loops 18 (24 pts), boolean chains 16, match/switch 2 (6 pts) (nesting depth added 66). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DependencyGraphChecker.checkImpl (cognitive 132) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/DependencyGraphChecker.kt:106— DependencyGraphChecker.checkImpl has cognitive complexity 132 (threshold 15). Drivers by points: if/else 45 (94 pts), boolean chains 18, match/switch 4 (11 pts), loops 6 (9 pts) (nesting depth added 59). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BindingGraphGenerator.computeRawInheritedGraphData (cognitive 107) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingGraphGenerator.kt:1008— BindingGraphGenerator.computeRawInheritedGraphData has cognitive complexity 107 (threshold 15). Drivers by points: if/else 20 (63 pts), loops 12 (32 pts), boolean chains 12 (nesting depth added 63). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
renderDetails (cognitive 100) REDACTED:2488— renderDetails has cognitive complexity 100 (threshold 15). Drivers by points: if/else 27 (32 pts), ternaries 15 (29 pts), boolean chains 20, loops 10 (18 pts), other 1 (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.
fetch-all-ide-kotlin-versions.main (cognitive 90) REDACTED:418— fetch-all-ide-kotlin-versions.main has cognitive complexity 90 (threshold 15). Drivers by points: if/else 22 (53 pts), loops 13 (24 pts), ternaries 5 (9 pts), boolean chains 3, error handling 1 (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BindingContainerTransformer.loadExternalBindingContainer (cognitive 88) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/BindingContainerTransformer.kt:1095— BindingContainerTransformer.loadExternalBindingContainer has cognitive complexity 88 (threshold 15). Drivers by points: if/else 21 (72 pts), boolean chains 6, match/switch 1 (6 pts), loops 1 (4 pts) (nesting depth added 59). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
indexGraph (cognitive 87) REDACTED:82— indexGraph has cognitive complexity 87 (threshold 15). Drivers by points: if/else 11 (32 pts), boolean chains 25, loops 13 (24 pts), ternaries 4 (6 pts) (nesting depth added 34). Of this number, 86 points are the body's own statements and 1 belongs to 11 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.
startup-benchmark-report.html.renderBinaryMetrics (cognitive 85) docs/benchmark_assets/runs/2026-07-30/startup-benchmark-report.html:828— startup-benchmark-report.html.renderBinaryMetrics has cognitive complexity 85 (threshold 15). Drivers by points: if/else 38 (68 pts), boolean chains 10, ternaries 4 (7 pts) (nesting depth added 33). Of this number, 40 points are the body's own statements and 45 belong to 7 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.
DependencyGraphTransformer.prepareDependencyGraph (cognitive 83) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/DependencyGraphTransformer.kt:493— DependencyGraphTransformer.prepareDependencyGraph has cognitive complexity 83 (threshold 15). Drivers by points: if/else 23 (54 pts), loops 10 (24 pts), boolean chains 5 (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.
ContributedInterfaceSupertypeGenerator.computeContributionSupertypes (cognitive 82) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/ContributedInterfaceSupertypeGenerator.kt:403— ContributedInterfaceSupertypeGenerator.computeContributionSupertypes has cognitive complexity 82 (threshold 15). Drivers by points: if/else 26 (42 pts), loops 19 (31 pts), boolean chains 9 (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.
BindingIndexLookups.build (cognitive 75) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/model/BindingIndexLookups.kt:75— BindingIndexLookups.build has cognitive complexity 75 (threshold 15). Drivers by points: if/else 19 (39 pts), loops 19 (32 pts), boolean chains 4 (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.
refreshView (cognitive 74) REDACTED:2035— refreshView has cognitive complexity 74 (threshold 15). Drivers by points: ternaries 20 (31 pts), boolean chains 22, if/else 20 (21 pts) (nesting depth added 12). Of this number, 57 points are the body's own statements and 17 belong to 7 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.
MultibindsChecker.checkImpl (cognitive 72) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/MultibindsChecker.kt:75— MultibindsChecker.checkImpl has cognitive complexity 72 (threshold 15). Drivers by points: if/else 31 (58 pts), boolean chains 11, match/switch 1 (3 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.
BindingContainerClassChecker.checkImpl (cognitive 71) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/BindingContainerClassChecker.kt:83— BindingContainerClassChecker.checkImpl has cognitive complexity 71 (threshold 15). Drivers by points: if/else 32 (58 pts), boolean chains 10, loops 2 (3 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.
boundaryContour (cognitive 71) REDACTED:697— boundaryContour has cognitive complexity 71 (threshold 15). Drivers by points: ternaries 22 (37 pts), if/else 12 (19 pts), boolean chains 7, loops 5 (7 pts), other 1 (nesting depth added 24). Of this number, 57 points are the body's own statements and 14 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.
BindingPropertyCollector.processBindingNode (cognitive 67) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingPropertyCollector.kt:412— BindingPropertyCollector.processBindingNode has cognitive complexity 67 (threshold 15). Drivers by points: boolean chains 36, if/else 21 (30 pts), loops 1 (nesting depth added 9). 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.
graph-viewer.layoutRegions (cognitive 65) REDACTED:551— graph-viewer.layoutRegions has cognitive complexity 65 (threshold 15). Drivers by points: boolean chains 19, if/else 9 (19 pts), loops 13 (18 pts), ternaries 7 (9 pts) (nesting depth added 17). Of this number, 61 points are the body's own statements and 4 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.
DependencyGraphCreatorChecker.checkImpl (cognitive 64) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/DependencyGraphCreatorChecker.kt:71— DependencyGraphCreatorChecker.checkImpl has cognitive complexity 64 (threshold 15). Drivers by points: if/else 25 (47 pts), boolean chains 7, loops 3 (5 pts), match/switch 2 (5 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.
MembersInjectorTransformer.getOrGenerateInjector (cognitive 62) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/MembersInjectorTransformer.kt:205— MembersInjectorTransformer.getOrGenerateInjector has cognitive complexity 62 (threshold 15). Drivers by points: if/else 32 (54 pts), loops 4 (6 pts), boolean chains 2 (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.
MetroResolutionService.classifyFileChange (cognitive 60) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt:2490— MetroResolutionService.classifyFileChange has cognitive complexity 60 (threshold 15). Drivers by points: if/else 27 (44 pts), boolean chains 16 (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.
AggregationChecker.checkImpl (cognitive 58) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/AggregationChecker.kt:104— AggregationChecker.checkImpl has cognitive complexity 58 (threshold 15). Drivers by points: if/else 18 (50 pts), loops 2 (5 pts), match/switch 1 (3 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SourceLibraryInputsKt.libraryInputs (cognitive 53) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/snapshot/SourceLibraryInputs.kt:77— SourceLibraryInputsKt.libraryInputs has cognitive complexity 53 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 10 (20 pts), boolean chains 8 (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.
AggregationChecker.checkBindingContribution (cognitive 52) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/AggregationChecker.kt:294— AggregationChecker.checkBindingContribution has cognitive complexity 52 (threshold 15). Drivers by points: if/else 25 (42 pts), boolean chains 6, loops 1 (2 pts), match/switch 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IrBindingGraph.finishSeal (cognitive 52) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBindingGraph.kt:852— IrBindingGraph.finishSeal has cognitive complexity 52 (threshold 15). Drivers by points: if/else 15 (41 pts), loops 2 (9 pts), boolean chains 2 (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.
Builder.buildCreator (cognitive 51) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/GraphNodes.kt:421— Builder.buildCreator has cognitive complexity 51 (threshold 15). Drivers by points: if/else 21 (43 pts), loops 3 (5 pts), boolean chains 3 (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.
ResolutionInputCapture.capture (cognitive 49) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/snapshot/ResolutionInputCapture.kt:39— ResolutionInputCapture.capture has cognitive complexity 49 (threshold 15). Drivers by points: loops 18 (35 pts), if/else 9 (10 pts), boolean chains 4 (nesting depth added 18). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
BetterKotlinLikeDumper.printMemberAccessExpressionWithNoIndent (cognitive 49) compiler-compat/k230/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k230/betterDumpKotlinLike.kt:1206— BetterKotlinLikeDumper.printMemberAccessExpressionWithNoIndent has cognitive complexity 49 (threshold 15). Drivers by points: if/else 20 (35 pts), match/switch 2 (6 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 20). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
MultibindingExpressionGenerator.generateMapMultibindingExpression (cognitive 48) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/expressions/MultibindingExpressionGenerator.kt:563— MultibindingExpressionGenerator.generateMapMultibindingExpression has cognitive complexity 48 (threshold 15). Drivers by points: if/else 24 (35 pts), boolean chains 6, match/switch 3 (5 pts), loops 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MetroResolutionService.drainCoordinatorEvents (cognitive 48) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt:391— MetroResolutionService.drainCoordinatorEvents has cognitive complexity 48 (threshold 15). Drivers by points: if/else 11 (30 pts), boolean chains 9, match/switch 3 (8 pts), loops 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FileShardBuilder.processBindingCallable (cognitive 47) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/FileShardBuilder.kt:338— FileShardBuilder.processBindingCallable has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (30 pts), loops 3 (8 pts), boolean chains 5, match/switch 3 (4 pts) (nesting depth added 23). 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.
MetroSortKt.computeStronglyConnectedComponents (cognitive 47) metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/MetroSort.kt:663— MetroSortKt.computeStronglyConnectedComponents has cognitive complexity 47 (threshold 15). Drivers by points: if/else 20 (38 pts), loops 6 (9 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.
MembersInjectChecker.checkImpl (cognitive 46) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/MembersInjectChecker.kt:59— MembersInjectChecker.checkImpl has cognitive complexity 46 (threshold 15). Drivers by points: if/else 18 (35 pts), boolean chains 7, loops 2 (4 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.
IrContributionMerger.computeContributions (cognitive 46) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/IrContributionMerger.kt:173— IrContributionMerger.computeContributions has cognitive complexity 46 (threshold 15). Drivers by points: if/else 14 (22 pts), loops 13 (20 pts), boolean chains 4 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
projectGraph (cognitive 46) REDACTED:174— projectGraph has cognitive complexity 46 (threshold 15). Drivers by points: if/else 6 (18 pts), ternaries 3 (10 pts), boolean chains 9, loops 5 (9 pts) (nesting depth added 23). Of this number, 44 points are the body's own statements and 2 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.
LibraryIndexPostProcessor.bindingSeeds (cognitive 45) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/LibraryIndexPostProcessor.kt:245— LibraryIndexPostProcessor.bindingSeeds has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (30 pts), loops 4 (9 pts), boolean chains 6 (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.
buildView (cognitive 45) REDACTED:1962— buildView has cognitive complexity 45 (threshold 15). Drivers by points: boolean chains 21, ternaries 11 (13 pts), if/else 10 (11 pts) (nesting depth added 3). Of this number, 28 points are the body's own statements and 17 belong to 8 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.
BindsMirrorClassTransformerKt.transformBindingDeclarations (cognitive 44) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/BindsMirrorClassTransformer.kt:191— BindsMirrorClassTransformerKt.transformBindingDeclarations has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (27 pts), boolean chains 9, match/switch 2 (5 pts), 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.
BindingExtractionKt.classBindingData (cognitive 44) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/BindingExtraction.kt:635— BindingExtractionKt.classBindingData has cognitive complexity 44 (threshold 15). Drivers by points: if/else 21 (26 pts), boolean chains 15, match/switch 1 (2 pts), 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.
MetroAnnotationsKt.metroAnnotations (cognitive 42) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/MetroAnnotations.kt:257— MetroAnnotationsKt.metroAnnotations has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (23 pts), match/switch 5 (12 pts), boolean chains 6, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IrGraphGenerator.implementOverrides (cognitive 42) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrGraphGenerator.kt:2188— IrGraphGenerator.implementOverrides has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (28 pts), boolean chains 9, loops 4 (5 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.
MetroAnnotationsKt.metroAnnotations (cognitive 41) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/MetroAnnotations.kt:551— MetroAnnotationsKt.metroAnnotations has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 9, match/switch 3 (8 pts), 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.
MetroCompilerPluginRegistrar.registerExtensions (cognitive 41) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/MetroCompilerPluginRegistrar.kt:33— MetroCompilerPluginRegistrar.registerExtensions has cognitive complexity 41 (threshold 15). Drivers by points: if/else 23 (37 pts), boolean chains 3, 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.
IrGraphGenerator.collectShardPropertyInitializers (cognitive 41) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrGraphGenerator.kt:1542— IrGraphGenerator.collectShardPropertyInitializers has cognitive complexity 41 (threshold 15). Drivers by points: if/else 21 (34 pts), boolean chains 6, 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.
LifecycleWarningsKt.reportLifecycleWarnings (cognitive 41) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/LifecycleWarnings.kt:37— LifecycleWarningsKt.reportLifecycleWarnings has cognitive complexity 41 (threshold 15). Drivers by points: if/else 16 (37 pts), loops 3 (4 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.
IrKt.materializeWrappedType (cognitive 41) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/ir.kt:973— IrKt.materializeWrappedType has cognitive complexity 41 (threshold 15). Drivers by points: if/else 23 (36 pts), boolean chains 4, 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.
BindingIndex.bindingCandidateRejection (cognitive 41) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/model/BindingIndex.kt:1516— BindingIndex.bindingCandidateRejection has cognitive complexity 41 (threshold 15). Drivers by points: if/else 20 (31 pts), boolean chains 6, match/switch 3 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AssistedInjectChecker.checkAssistedFactory (cognitive 40) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/AssistedInjectChecker.kt:94— AssistedInjectChecker.checkAssistedFactory has cognitive complexity 40 (threshold 15). Drivers by points: if/else 19 (31 pts), loops 2 (7 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.
IrDeclarationRenderingKt.renderForDiagnosticImpl (cognitive 40) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/irDeclarationRendering.kt:232— IrDeclarationRenderingKt.renderForDiagnosticImpl has cognitive complexity 40 (threshold 15). Drivers by points: if/else 23 (36 pts), boolean chains 3, 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.
layoutBindings (cognitive 40) REDACTED:323— layoutBindings has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 5 (18 pts), loops 8 (12 pts), if/else 3 (6 pts), boolean chains 3, other 1 (nesting depth added 20). Of this number, 33 points are the body's own statements and 7 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.
layoutNeighborhood (cognitive 39) REDACTED:1623— layoutNeighborhood has cognitive complexity 39 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 4 (11 pts), loops 6 (8 pts), boolean chains 7 (nesting depth added 15). Of this number, 30 points are the body's own statements and 9 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.
DependencyGraphChecker.checkStaticCreatorCollisions (cognitive 37) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/DependencyGraphChecker.kt:739— DependencyGraphChecker.checkStaticCreatorCollisions has cognitive complexity 37 (threshold 15). Drivers by points: if/else 20 (30 pts), boolean chains 3, loops 2 (3 pts), match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BindingPropertyCollector.collect (cognitive 37) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingPropertyCollector.kt:256— BindingPropertyCollector.collect has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (26 pts), loops 6 (10 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.
LibraryContributionScanner.processLibraryHint (cognitive 37) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/LibraryContributionScanner.kt:178— LibraryContributionScanner.processLibraryHint has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11, boolean chains 9, loops 5 (9 pts), match/switch 2 (8 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
offsetContour (cognitive 37) REDACTED:831— offsetContour has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (24 pts), loops 4 (7 pts), boolean chains 5, ternaries 1 (nesting depth added 13). Of this number, 32 points are the body's own statements and 5 belong to 11 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.
InjectedClassFirGenerator.generateFunctions (cognitive 36) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/InjectedClassFirGenerator.kt:688— InjectedClassFirGenerator.generateFunctions has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (25 pts), loops 4 (9 pts), match/switch 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.
ValidationSourceSnapshot.capture (cognitive 36) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/graph/ValidationSourceSnapshot.kt:91— ValidationSourceSnapshot.capture has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 8 (13 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LibraryIndexPostProcessor.resolveLibraryInjectBindings (cognitive 36) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/LibraryIndexPostProcessor.kt:82— LibraryIndexPostProcessor.resolveLibraryInjectBindings has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 5 (9 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.
BindingIndex.selectedGraphComposition (cognitive 36) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/model/BindingIndex.kt:435— BindingIndex.selectedGraphComposition has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (26 pts), loops 6 (9 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MetroLineMarkerProvider.consumerMarker (cognitive 35) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroLineMarkerProvider.kt:370— MetroLineMarkerProvider.consumerMarker has cognitive complexity 35 (threshold 15). Drivers by points: if/else 18 (29 pts), boolean chains 5, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
renderExplanations (cognitive 35) REDACTED:2695— renderExplanations has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 4 (14 pts), loops 5 (11 pts), boolean chains 6, if/else 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.
Builder.buildExternalGraphOrBindingContainer (cognitive 34) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/GraphNodes.kt:1638— Builder.buildExternalGraphOrBindingContainer has cognitive complexity 34 (threshold 15). Drivers by points: loops 9 (18 pts), if/else 8 (15 pts), boolean chains 1 (nesting depth added 16). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ShardingDiagnostics.generateShardingPlanReport (cognitive 34) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/sharding/ShardingDiagnostics.kt:35— ShardingDiagnostics.generateShardingPlanReport has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 8 (13 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CreateGraphChecker.checkImpl (cognitive 33) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/CreateGraphChecker.kt:43— CreateGraphChecker.checkImpl has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (29 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FirKt.argumentAsOrNull (cognitive 33) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/fir.kt:1297— FirKt.argumentAsOrNull has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (21 pts), match/switch 2 (7 pts), loops 2 (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.
IrBindingGraph.validateBindings (cognitive 33) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBindingGraph.kt:1517— IrBindingGraph.validateBindings has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 9, loops 1 (2 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ContributionIrTransformer.generateContributionProviderFunctions (cognitive 33) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/ContributionIrTransformer.kt:464— ContributionIrTransformer.generateContributionProviderFunctions has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (24 pts), match/switch 2 (4 pts), boolean chains 3, 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.
KaBindingLookup.delegateToParentIfScoped (cognitive 33) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/graph/KaBindingLookup.kt:336— KaBindingLookup.delegateToParentIfScoped has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (28 pts), boolean chains 5 (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.
InjectionSiteChecksKt.validateInjectionSiteType (cognitive 32) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/injectionSiteChecks.kt:115— InjectionSiteChecksKt.validateInjectionSiteType has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 6, match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GraphExpressionGenerator.generateBindingArguments (cognitive 32) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/expressions/GraphExpressionGenerator.kt:1583— GraphExpressionGenerator.generateBindingArguments has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (19 pts), loops 3 (8 pts), boolean chains 4, match/switch 1 (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
GraphReportRendererKt.bindingType (cognitive 32) graph-viewer/src/commonMain/kotlin/dev/zacsweers/metro/gradle/analysis/GraphReportRenderer.kt:1875— GraphReportRendererKt.bindingType has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 4 (8 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.
MutableBindingGraph.populateGraph (cognitive 32) metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/BindingGraph.kt:323— MutableBindingGraph.populateGraph has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 5 (12 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.
MapKeyChecker.check (cognitive 31) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/MapKeyChecker.kt:36— MapKeyChecker.check has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (27 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ContributionIrTransformer.transformTopLevelContributionProvider (cognitive 31) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/ContributionIrTransformer.kt:770— ContributionIrTransformer.transformTopLevelContributionProvider has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (26 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.
MetroResolutionService.buildResolutionCandidate (cognitive 31) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt:1189— MetroResolutionService.buildResolutionCandidate has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14, error handling 10, boolean chains 6, match/switch 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CircuitInjectClassChecker.checkImpl (cognitive 30) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitInjectChecker.kt:166— CircuitInjectClassChecker.checkImpl has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (20 pts), match/switch 3 (7 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.
BuildersKt.copyParameters (cognitive 30) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/builders.kt:85— BuildersKt.copyParameters has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (27 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GraphDeclarationExtractor.extract (cognitive 30) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/graph/GraphDeclarationExtractor.kt:61— GraphDeclarationExtractor.extract has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 4 (8 pts), boolean chains 2, match/switch 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.
startup-benchmark-report.html.renderMetadata (cognitive 30) docs/benchmark_assets/runs/2026-07-30/startup-benchmark-report.html:637— startup-benchmark-report.html.renderMetadata has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 29, if/else 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.
InjectedClassTransformer.getOrGenerateFactory (cognitive 29) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/InjectedClassTransformer.kt:135— InjectedClassTransformer.getOrGenerateFactory has cognitive complexity 29 (threshold 15). Drivers by points: if/else 17 (21 pts), match/switch 2 (5 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
MetroGradleSubplugin.applyToCompilation (cognitive 29) gradle-plugin/src/main/kotlin/dev/zacsweers/metro/gradle/MetroGradleSubplugin.kt:187— MetroGradleSubplugin.applyToCompilation has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (28 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.
MetroLineMarkerProvider.collectNavigationMarkers (cognitive 29) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroLineMarkerProvider.kt:86— MetroLineMarkerProvider.collectNavigationMarkers has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (24 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IrBindingGraph.findSimilarBindings (cognitive 28) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBindingGraph.kt:1297— IrBindingGraph.findSimilarBindings has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 5, loops 3, match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ContributionEditKt.applyContribution (cognitive 28) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/intentions/contributions/ContributionEdit.kt:27— ContributionEditKt.applyContribution has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 6, 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.
build-benchmark-report.html.renderMetadata (cognitive 28) docs/benchmark_assets/runs/2026-07-30/build-benchmark-report.html:783— build-benchmark-report.html.renderMetadata has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 27, if/else 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.
IrDiagnosticsKt.reportCompatImpl (cognitive 27) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/IrDiagnostics.kt:88— IrDiagnosticsKt.reportCompatImpl has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 5, loops 1 (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.
BindingContainerTransformer.getOrLookupProviderFactory (cognitive 27) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/BindingContainerTransformer.kt:388— BindingContainerTransformer.getOrLookupProviderFactory has cognitive complexity 27 (threshold 15). Drivers by points: if/else 21 (24 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
CreateGraphTransformer.visitCall (cognitive 27) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/CreateGraphTransformer.kt:72— CreateGraphTransformer.visitCall has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 6, 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.
MetroValidationSelectionKt.validationSelectionVisitor (cognitive 27) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/toolwindow/MetroValidationSelection.kt:9— MetroValidationSelectionKt.validationSelectionVisitor has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (17 pts), match/switch 3 (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.
FileShardBuilder.processInjectAnnotated (cognitive 26) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/FileShardBuilder.kt:478— FileShardBuilder.processInjectAnnotated has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 4, loops 1 (3 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
(anonymous) (cognitive 26) REDACTED:3— (anonymous) has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 11, if/else 6 (7 pts), loops 4, ternaries 3 (4 pts) (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FactoryIrUtilKt.generateMetadataVisibleDeclarationMirror (cognitive 25) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/factoryIrUtil.kt:369— FactoryIrUtilKt.generateMetadataVisibleDeclarationMirror has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17 (20 pts), boolean chains 4, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
DiagnosticRenderer.render (cognitive 25) metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/diagnostics/render/DiagnosticRenderer.kt:43— DiagnosticRenderer.render has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 5, loops 2 (3 pts), match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DefaultValuesUtilKt.copyParameterDefaultValues (cognitive 24) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/DefaultValuesUtil.kt:37— DefaultValuesUtilKt.copyParameterDefaultValues has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 3, 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.
Entry.injectedAt (cognitive 24) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBindingStack.kt:207— Entry.injectedAt has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MetroLineMarkerProvider.validateMarker (cognitive 24) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroLineMarkerProvider.kt:523— MetroLineMarkerProvider.validateMarker has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 1, 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.
MetroResolutionService.indexForToolWindow (cognitive 24) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt:1566— MetroResolutionService.indexForToolWindow has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 5 (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.
ContributionMapKeysKt.mapKeyChoice (cognitive 24) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/intentions/contributions/ContributionMapKeys.kt:186— ContributionMapKeysKt.mapKeyChoice has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (21 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.
BindingIndex.isConsumerInContext (cognitive 24) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/model/BindingIndex.kt:1406— BindingIndex.isConsumerInContext has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 6 (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.
IdeTraceTimeline.lanes (cognitive 24) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/tracing/IdeTraceTimeline.kt:143— IdeTraceTimeline.lanes has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (6 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.
MutableBindingGraph.prepareSeal (cognitive 24) metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/BindingGraph.kt:154— MutableBindingGraph.prepareSeal has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 6 (8 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
graph-viewer.groupPackages (cognitive 24) REDACTED:483— graph-viewer.groupPackages has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 6, loops 4 (5 pts), ternaries 2 (4 pts) (nesting depth added 7). Of this number, 15 points are the body's own statements and 9 belong to 7 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.
graph-viewer.exploredNeighborhood (cognitive 24) REDACTED:1896— graph-viewer.exploredNeighborhood has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 6 (10 pts), if/else 4 (7 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 8). 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.
(anonymous) (cognitive 24) REDACTED:3782— (anonymous) has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 8, ternaries 1 (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.
GraphLifecycleCheckerKt.checkGraphLifecycle (cognitive 23) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/GraphLifecycleChecker.kt:215— GraphLifecycleCheckerKt.checkGraphLifecycle has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (18 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.
MergedContributionChecker.checkImpl (cognitive 23) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/MergedContributionChecker.kt:48— MergedContributionChecker.checkImpl has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IrBindingGraph.findSimilarMultibindings (cognitive 23) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBindingGraph.kt:1106— IrBindingGraph.findSimilarMultibindings has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (22 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.
MultibindingExpressionGenerator.generateSetBuilderExpression (cognitive 23) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/expressions/MultibindingExpressionGenerator.kt:168— MultibindingExpressionGenerator.generateSetBuilderExpression has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (10 pts), boolean chains 1, match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
DeepTypeSubstitutor.remapType (cognitive 23) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/irTypes.kt:93— DeepTypeSubstitutor.remapType has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 3 (7 pts), boolean chains 2 (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.
FileShardBuilder.recordAnnotationDependencies (cognitive 23) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/FileShardBuilder.kt:931— FileShardBuilder.recordAnnotationDependencies has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (17 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.
InjectionTargetsKt.injectionAnnotationTargets (cognitive 23) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/intentions/injection/InjectionTargets.kt:20— InjectionTargetsKt.injectionAnnotationTargets has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 3, loops 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
graph-viewer.neighborhood (cognitive 23) REDACTED:296— graph-viewer.neighborhood has cognitive complexity 23 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (6 pts), ternaries 2 (5 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.
CircuitFirExtension.generateConstructors (cognitive 22) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitFirExtension.kt:219— CircuitFirExtension.generateConstructors has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (7 pts), match/switch 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.
ContributionsFirGenerator.generateFunctions (cognitive 22) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/ContributionsFirGenerator.kt:497— ContributionsFirGenerator.generateFunctions has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 1, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BindingPropertyCollector.knownPropertyType (cognitive 22) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingPropertyCollector.kt:625— BindingPropertyCollector.knownPropertyType has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 8, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BindingContainerTransformer.findContainer (cognitive 22) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/BindingContainerTransformer.kt:192— BindingContainerTransformer.findContainer has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 8, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
BindsMirrorCollector.add (cognitive 22) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/BindsMirrorCollector.kt:48— BindsMirrorCollector.add has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (19 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.
ContributionIrTransformer.collectContributionDataFromSourceClass (cognitive 22) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/ContributionIrTransformer.kt:253— ContributionIrTransformer.collectContributionDataFromSourceClass has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (21 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.
RegionBuilder.selectRegions (cognitive 22) graph-viewer/src/commonMain/kotlin/dev/zacsweers/metro/gradle/analysis/GraphReportRenderer.kt:208— RegionBuilder.selectRegions has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 4 (6 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MetroResolutionService.startPendingFilePresentationAnchors (cognitive 22) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt:964— MetroResolutionService.startPendingFilePresentationAnchors has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 3 (6 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.
ContributionMergingKt.applyExcludesAndReplaces (cognitive 22) metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/ContributionMerging.kt:140— ContributionMergingKt.applyExcludesAndReplaces has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 4 (6 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.
SuspendBindingValidator.runtimeRequirement (cognitive 22) metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/SuspendBindingValidator.kt:493— SuspendBindingValidator.runtimeRequirement has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 5, loops 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
SuspendBindingWorklist.expand (cognitive 22) metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/SuspendBindingWorklist.kt:148— SuspendBindingWorklist.expand has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
graph-viewer.projectBoundaryNode (cognitive 22) REDACTED:1007— graph-viewer.projectBoundaryNode has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 10). Of this number, 14 points are the body's own statements and 8 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.
(anonymous) (cognitive 22) REDACTED:3849— (anonymous) has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 7 (11 pts), if/else 5 (7 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CircuitInjectCallableChecker.checkTarget (cognitive 21) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitInjectChecker.kt:359— CircuitInjectCallableChecker.checkTarget has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (18 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.
InjectedClassFirGenerator.getNestedClassifiersNames (cognitive 21) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/InjectedClassFirGenerator.kt:419— InjectedClassFirGenerator.getNestedClassifiersNames has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 6 (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.
MetroLineMarkerProvider.specializedConsumerMarker (cognitive 21) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroLineMarkerProvider.kt:154— MetroLineMarkerProvider.specializedConsumerMarker has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (16 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.
MetroResolutionService.publishCompletedFilePresentationAnchors (cognitive 21) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt:1115— MetroResolutionService.publishCompletedFilePresentationAnchors has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 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.
ContributionCandidateKt.contributionCandidate (cognitive 21) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/intentions/contributions/ContributionCandidate.kt:63— ContributionCandidateKt.contributionCandidate has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, boolean chains 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.
BindingIndex.isSupersededByNearerInheritedBinding (cognitive 21) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/model/BindingIndex.kt:1754— BindingIndex.isSupersededByNearerInheritedBinding has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (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.
GraphPartitionerKt.partitionBySCCs (cognitive 21) metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/GraphPartitioner.kt:18— GraphPartitionerKt.partitionBySCCs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 4, 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.
SuspendBindingWorklist.buildWitnessEdges (cognitive 21) metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/SuspendBindingWorklist.kt:237— SuspendBindingWorklist.buildWitnessEdges has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (13 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.
graph-viewer.layoutRadial (cognitive 21) REDACTED:432— graph-viewer.layoutRadial has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 7, if/else 3 (7 pts), loops 4 (5 pts), ternaries 2 (nesting depth added 5). Of this number, 17 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.
graph-viewer.visibilityBoundaries (cognitive 21) REDACTED:1114— graph-viewer.visibilityBoundaries has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 2 (5 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 10). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
graph-viewer.attentionFor (cognitive 21) REDACTED:1427— graph-viewer.attentionFor has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 6, loops 1 (2 pts), ternaries 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.
graph-viewer.document.addEventListener("keydown") (cognitive 21) REDACTED:3782— graph-viewer.document.addEventListener("keydown") has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 8 (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.
ContributionProviderNamesKt.contributionProviderFunctionName (cognitive 20) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ContributionProviderNames.kt:63— ContributionProviderNamesKt.contributionProviderFunctionName has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 1, match/switch 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ContributesToBindingContainerChecker.hasSafeAncestors (cognitive 20) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/ContributesToBindingContainerChecker.kt:92— ContributesToBindingContainerChecker.hasSafeAncestors has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 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.
ParentContext.resolve (cognitive 20) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/ParentContext.kt:496— ParentContext.resolve has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 2, loops 1 (2 pts), match/switch 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
SyntheticGraphGenerator.validateOverrides (cognitive 20) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/SyntheticGraphGenerator.kt:384— SyntheticGraphGenerator.validateOverrides has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (18 pts), 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.
GraphExtensionExtractionKt.graphExtensionFactoryOwner (cognitive 20) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/graph/GraphExtensionExtraction.kt:35— GraphExtensionExtractionKt.graphExtensionFactoryOwner has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (17 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.
GraphMemberExtractor.indexGraphCallable (cognitive 20) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/graph/GraphMemberExtractor.kt:344— GraphMemberExtractor.indexGraphCallable has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 6, loops 1 (2 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.
DiagnosticRenderer.renderFrames (cognitive 20) metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/diagnostics/render/DiagnosticRenderer.kt:351— DiagnosticRenderer.renderFrames has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (17 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.
MetroSortKt.sortVerticesInSCC (cognitive 20) metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/MetroSort.kt:461— MetroSortKt.sortVerticesInSCC has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
build-benchmark-report.html.frameworkVersion (cognitive 20) docs/benchmark_assets/runs/2026-07-30/build-benchmark-report.html:561— build-benchmark-report.html.frameworkVersion has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 7, ternaries 1 (2 pts), match/switch 1 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
createBindingRow (cognitive 20) REDACTED:2349— createBindingRow has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 4 (7 pts), boolean chains 4 (nesting depth added 4). 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.
ArrayClassKeyValues.check (cognitive 19) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/ArrayClassKeyChecker.kt:177— ArrayClassKeyValues.check has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 1 (3 pts), match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
InjectConstructorChecker.checkImpl (cognitive 19) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/InjectConstructorChecker.kt:56— InjectConstructorChecker.checkImpl has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 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.
DependencyGraphFirGenerator.generateFunctions (cognitive 19) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/DependencyGraphFirGenerator.kt:731— DependencyGraphFirGenerator.generateFunctions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 6, 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.
GraphMetadataReporter.buildBindingJson (cognitive 19) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/GraphMetadataReporter.kt:339— GraphMetadataReporter.buildBindingJson has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, match/switch 4, boolean chains 3, loops 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
BindingExpressionGenerator.toTargetType (cognitive 19) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/expressions/BindingExpressionGenerator.kt:95— BindingExpressionGenerator.toTargetType has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (13 pts), match/switch 4 (6 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
IrKt.irInvokeResolved (cognitive 19) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/ir.kt:528— IrKt.irInvokeResolved has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, match/switch 2 (3 pts), 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.
FactoryIrUtilKt.addParameters (cognitive 19) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/factoryIrUtil.kt:882— FactoryIrUtilKt.addParameters has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RegionBuilder.findIncludedGraphs (cognitive 19) graph-viewer/src/commonMain/kotlin/dev/zacsweers/metro/gradle/analysis/GraphReportRenderer.kt:258— RegionBuilder.findIncludedGraphs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 8, 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.
MetroEditorDiagnosticKt.metroDiagnosticsForFile (cognitive 19) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/diagnostics/MetroEditorDiagnostic.kt:29— MetroEditorDiagnosticKt.metroDiagnosticsForFile has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (6 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.
GraphFactoryInputsKt.graphFactoryInputs (cognitive 19) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/GraphFactoryInputs.kt:45— GraphFactoryInputsKt.graphFactoryInputs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GraphFactoryInputsKt.includedGraphDependency (cognitive 19) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/GraphFactoryInputs.kt:129— GraphFactoryInputsKt.includedGraphDependency has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MetroResolutionService.index (cognitive 19) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt:1802— MetroResolutionService.index has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (16 pts), match/switch 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.
SourceSnapshotTransaction.snapshot (cognitive 19) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/snapshot/SourceSnapshot.kt:121— SourceSnapshotTransaction.snapshot has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 4 (6 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.
BindingIndex.consumersFor (cognitive 19) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/model/BindingIndex.kt:2102— BindingIndex.consumersFor has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (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.
MetroFindUsagesKt.collectMetroUsagesInReadAction (cognitive 19) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/usages/MetroFindUsages.kt:211— MetroFindUsagesKt.collectMetroUsagesInReadAction has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, 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.
BindingGraphValidator.validate (cognitive 19) metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/BindingGraphValidator.kt:39— BindingGraphValidator.validate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 3 (4 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.
graph-viewer.rootConnections (cognitive 19) REDACTED:230— graph-viewer.rootConnections has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 4 (6 pts), boolean chains 4, ternaries 1 (nesting depth added 6). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FunctionInjectionChecker.checkImpl (cognitive 18) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/FunctionInjectionChecker.kt:45— FunctionInjectionChecker.checkImpl has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 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.
ContributionsFirGenerator.getNestedClassifiersNames (cognitive 18) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/ContributionsFirGenerator.kt:1010— ContributionsFirGenerator.getNestedClassifiersNames has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), 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, 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.
DependencyGraphFirGenerator.computeCallableNames (cognitive 18) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/DependencyGraphFirGenerator.kt:366— DependencyGraphFirGenerator.computeCallableNames has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5 (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.
IrGraphGenerator.computeBindingMetadata (cognitive 18) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrGraphGenerator.kt:2009— IrGraphGenerator.computeBindingMetadata has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 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, 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.
GraphExpressionGenerator.generateNestedSuspendFactoryCall (cognitive 18) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/expressions/GraphExpressionGenerator.kt:1302— GraphExpressionGenerator.generateNestedSuspendFactoryCall has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IrKt.typeRemapperFor (cognitive 18) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/ir.kt:2324— IrKt.typeRemapperFor has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 3 (7 pts), boolean chains 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.
IrDeclarationRenderingKt.toUnknownLocationContext (cognitive 18) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/irDeclarationRendering.kt:131— IrDeclarationRenderingKt.toUnknownLocationContext has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (17 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.
BindingExtractionKt.bindingData (cognitive 18) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/BindingExtraction.kt:382— BindingExtractionKt.bindingData has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, match/switch 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.
ResolutionSnapshotBuilder.containsRelevantAnnotation (cognitive 18) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/snapshot/ResolutionSnapshotBuilder.kt:627— ResolutionSnapshotBuilder.containsRelevantAnnotation has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 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.
KaUtilKt.toKaAnnotationSnapshot (cognitive 18) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/kaUtil.kt:47— KaUtilKt.toKaAnnotationSnapshot has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (17 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.
BindingIndex.candidateContextsFor (cognitive 18) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/model/BindingIndex.kt:110— BindingIndex.candidateContextsFor 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.
DiagnosticRenderer.renderCycle (cognitive 18) metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/diagnostics/render/DiagnosticRenderer.kt:200— DiagnosticRenderer.renderCycle has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 3 (5 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SuspendBindingValidator.validateGraphRequests (cognitive 18) metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/SuspendBindingValidator.kt:272— SuspendBindingValidator.validateGraphRequests has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 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.
BetterKotlinLikeDumper.printSimpleFunction (cognitive 18) compiler-compat/k230/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k230/betterDumpKotlinLike.kt:704— BetterKotlinLikeDumper.printSimpleFunction has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5 (nesting depth added 3). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
graph-viewer.rootRoute (cognitive 18) REDACTED:263— graph-viewer.rootRoute has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (6 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.
orientPoint (cognitive 18) REDACTED:1352— orientPoint has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (10 pts), if/else 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.
KotlinToolingVersion.compareTo (cognitive 17) compiler-compat/src/main/kotlin/dev/zacsweers/metro/compiler/compat/KotlinToolingVersion.kt:76— KotlinToolingVersion.compareTo has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 8. This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
CircuitInjectCheckerKt.validateCircuitInjectParams (cognitive 17) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitInjectChecker.kt:61— CircuitInjectCheckerKt.validateCircuitInjectParams has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CircuitIrFactoryTransformer.generateFunctionFactoryCall (cognitive 17) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitIrExtension.kt:955— CircuitIrFactoryTransformer.generateFunctionFactoryCall has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2, boolean chains 1, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CircuitSerializableClassChecker.check (cognitive 17) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitSerializableChecker.kt:34— CircuitSerializableClassChecker.check has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, boolean chains 5. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
GraphLifecycleChecker.check (cognitive 17) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/GraphLifecycleChecker.kt:62— GraphLifecycleChecker.check has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, boolean chains 4, loops 2, match/switch 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ContributedInterfaceSupertypeGenerator.getScopedContributions (cognitive 17) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/ContributedInterfaceSupertypeGenerator.kt:218— ContributedInterfaceSupertypeGenerator.getScopedContributions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 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.
DependencyGraphFirGenerator.getNestedClassifiersNames (cognitive 17) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/DependencyGraphFirGenerator.kt:238— DependencyGraphFirGenerator.getNestedClassifiersNames has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InjectedClass.memberInjections (cognitive 17) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/InjectedClassFirGenerator.kt:310— InjectedClass.memberInjections has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 2, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GraphMetadataReporter.write (cognitive 17) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/GraphMetadataReporter.kt:42— GraphMetadataReporter.write has cognitive complexity 17 (threshold 15). Drivers by points: loops 9 (13 pts), if/else 3 (4 pts) (nesting depth added 5). 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.
CoreTransformers.visitClassInner (cognitive 17) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/CoreTransformers.kt:112— CoreTransformers.visitClassInner has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
DependencyGraphTransformer.reportUnusedInputs (cognitive 17) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/DependencyGraphTransformer.kt:897— DependencyGraphTransformer.reportUnusedInputs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 1, loops 1, match/switch 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.
FactoryIrUtilKt.generateCompatibilityBridges (cognitive 17) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/factoryIrUtil.kt:715— FactoryIrUtilKt.generateCompatibilityBridges has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 4, 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.
LongestPath.paths (cognitive 17) gradle-plugin/src/main/kotlin/dev/zacsweers/metro/gradle/analysis/LongestPath.kt:43— LongestPath.paths has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GraphReportImport.findMissingReports (cognitive 17) graph-viewer/src/commonMain/kotlin/dev/zacsweers/metro/viewer/GraphReportImport.kt:290— GraphReportImport.findMissingReports has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MetroGraphValidationService.validate (cognitive 17) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/graph/MetroGraphValidationService.kt:415— MetroGraphValidationService.validate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 2 (4 pts), match/switch 1 (2 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.
SharedDeclarationFingerprintKt.appendSharedDeclarations (cognitive 17) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/SharedDeclarationFingerprint.kt:73— SharedDeclarationFingerprintKt.appendSharedDeclarations has cognitive complexity 17 (threshold 15). Drivers by points: if/else 2 (8 pts), loops 2 (5 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BindingIndex.buildChains (cognitive 17) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/model/BindingIndex.kt:1014— BindingIndex.buildChains has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 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.
MetroTreeStructure.graphChildren (cognitive 17) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/toolwindow/MetroTreeStructure.kt:561— MetroTreeStructure.graphChildren has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 3, loops 2, match/switch 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Builder.applyOptionValue (cognitive 17) metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/MetroOptions.kt:2031— Builder.applyOptionValue 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.
MetroSortKt.findMinimalDeferralSet (cognitive 17) metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/MetroSort.kt:256— MetroSortKt.findMinimalDeferralSet has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BetweennessCentrality.compute (cognitive 17) gradle-plugin/src/main/java/dev/zacsweers/metro/gradle/analysis/BetweennessCentrality.java:153— BetweennessCentrality.compute has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 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.
graph-viewer.packageOverview (cognitive 17) REDACTED:1849— graph-viewer.packageOverview has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 5). 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.
graph-viewer.canvas.addEventListener("pointermove") (cognitive 17) REDACTED:3849— graph-viewer.canvas.addEventListener("pointermove") has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 3 (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.
graphBoundary (cognitive 17) REDACTED:976— graphBoundary has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 8 (11 pts), boolean chains 3, if/else 3 (nesting depth added 3). Of this number, 15 points are the body's own statements and 2 belong to 14 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.
renderBindings (cognitive 17) REDACTED:2399— renderBindings has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 3 (5 pts), boolean chains 4 (nesting depth added 3). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 2413, 2403, 2429, …). 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.
NameAllocatorKt.toSafeIdentifier (cognitive 16) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/NameAllocator.kt:305— NameAllocatorKt.toSafeIdentifier has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 7). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
CircuitFactorySupertypeGenerator.bfsForFactoryType (cognitive 16) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitFactorySupertypeGenerator.kt:115— CircuitFactorySupertypeGenerator.bfsForFactoryType has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), match/switch 2 (6 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.
DependencyGraphFirGenerator.unresolvedSuperClassOrNull (cognitive 16) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/DependencyGraphFirGenerator.kt:514— DependencyGraphFirGenerator.unresolvedSuperClassOrNull has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (14 pts), 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.
IrCallableMetadataKt.toIrCallableMetadata (cognitive 16) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/IrCallableMetadata.kt:135— IrCallableMetadataKt.toIrCallableMetadata has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 4 (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.
BindingPropertyCollector.markAccess (cognitive 16) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingPropertyCollector.kt:696— BindingPropertyCollector.markAccess has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, match/switch 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.
SyntheticGraphGenerator.checkOverrideCompatibility (cognitive 16) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/SyntheticGraphGenerator.kt:495— SyntheticGraphGenerator.checkOverrideCompatibility has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 3, loops 2 (3 pts), match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IrKt.typeAsProviderArgument (cognitive 16) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/ir.kt:870— IrKt.typeAsProviderArgument has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 5, match/switch 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
IrKt.isVisibleTo (cognitive 16) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/ir.kt:2922— IrKt.isVisibleTo has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 1 (3 pts), boolean chains 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IrTypesKt.hasErrorTypes (cognitive 16) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/irTypes.kt:254— IrTypesKt.hasErrorTypes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), 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.
MembersInjectorTransformer.getOrComputeMemberInjectParameters (cognitive 16) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/MembersInjectorTransformer.kt:638— MembersInjectorTransformer.getOrComputeMemberInjectParameters has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 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.
AnalysisEdgesKt.analysisEdges (cognitive 16) graphs/src/commonMain/kotlin/dev/zacsweers/metro/gradle/analysis/AnalysisEdges.kt:13— AnalysisEdgesKt.analysisEdges has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 5 (7 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FileShardBuilder.processDynamicGraphCall (cognitive 16) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/FileShardBuilder.kt:259— FileShardBuilder.processDynamicGraphCall has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2, boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MetroLineMarkerProvider.injectorMarker (cognitive 16) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroLineMarkerProvider.kt:276— MetroLineMarkerProvider.injectorMarker has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 2, match/switch 1 (2 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.
MetroResolutionService.completeSatisfiedBuildRequests (cognitive 16) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt:630— MetroResolutionService.completeSatisfiedBuildRequests has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, 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.
MetroResolutionService.startPendingFileBundles (cognitive 16) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt:877— MetroResolutionService.startPendingFileBundles has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), error handling 3 (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.
MetroResolutionService.sharedDeclarationChange (cognitive 16) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt:2281— MetroResolutionService.sharedDeclarationChange has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 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.
IdeTraceRecorder.own (cognitive 16) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/tracing/IdeTraceRecorder.kt:178— IdeTraceRecorder.own has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, error handling 4 (6 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
IdeTraceTimeline.writeTo (cognitive 16) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/tracing/IdeTraceTimeline.kt:185— IdeTraceTimeline.writeTo has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (13 pts), loops 2, boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
MetroIdeTracingService.captureFinished (cognitive 16) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/tracing/MetroIdeTracingService.kt:121— MetroIdeTracingService.captureFinished has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 2, error handling 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.
MetroFindUsagesKt.metroUsageRelations (cognitive 16) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/usages/MetroFindUsages.kt:156— MetroFindUsagesKt.metroUsageRelations has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (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.
DiagnosticRenderer.renderLocations (cognitive 16) metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/diagnostics/render/DiagnosticRenderer.kt:283— DiagnosticRenderer.renderLocations has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 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.
MetroSortKt.metroSort (cognitive 16) metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/MetroSort.kt:118— MetroSortKt.metroSort has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
build-benchmark-report.html.getSampleSeries (cognitive 16) docs/benchmark_assets/runs/2026-07-30/build-benchmark-report.html:592— build-benchmark-report.html.getSampleSeries has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 2 (6 pts), boolean chains 4, if/else 1 (3 pts), loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
graph-viewer.boundaryContour::fallback (cognitive 16) REDACTED:763— graph-viewer.boundaryContour::fallback has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 8 (12 pts), if/else 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.
annotationEnd (cognitive 16) REDACTED:13— annotationEnd has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, loops 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Edited copy of a member (221 corresponding lines) · ×1
Edited copy of a member (221 corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/MetroAnnotations.kt:261— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/MetroAnnotations.kt:261-503 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/MetroAnnotations.kt:555-775 — These two members are one piece of code written twice and then edited apart: 221 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (57 corresponding lines) · ×1
Edited copy of a member (57 corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/ContributionsFirGenerator.kt:350— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/ContributionsFirGenerator.kt:350-419 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/ContributionIrTransformer.kt:1126-1182 — These two members are one piece of code written twice and then edited apart: 57 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (52 corresponding lines) · ×1
Edited copy of a member (52 corresponding lines) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/tracing/IdeTraceOperation.kt:196— idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/tracing/IdeTraceOperation.kt:196-247 | idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/tracing/IdeTraceOperation.kt:249-300 — These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (49 corresponding lines) · ×1
Edited copy of a member (49 corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingLookup.kt:1343— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingLookup.kt:1343-1392 | idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/graph/KaBindingLookup.kt:281-329 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (42 corresponding lines) · ×1
Edited copy of a member (42 corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/symbols/ProviderFramework.kt:238— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/symbols/ProviderFramework.kt:238-279 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/symbols/ProviderFramework.kt:291-333 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (37 corresponding lines) · ×1
Edited copy of a member (37 corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitIrExtension.kt:212— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitIrExtension.kt:212-254 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitIrExtension.kt:259-295 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×1
Edited copy of a member (26 corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/FirIdentities.kt:65— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/FirIdentities.kt:65-90 | idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/TypeKeyResolution.kt:164-194 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (43 corresponding lines) · ×1
Edited copy of a member (43 corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/ir.kt:2324— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/ir.kt:2324-2372 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/irTypes.kt:93-135 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×1
Edited copy of a member (24 corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/hilt/HiltIrContributionExtension.kt:63— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/hilt/HiltIrContributionExtension.kt:63-86 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/hilt/HiltIrContributionExtension.kt:91-115 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (35 corresponding lines) · ×1
Edited copy of a member (35 corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/SwitchingProviderGenerator.kt:297— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/SwitchingProviderGenerator.kt:297-332 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/SwitchingProviderGenerator.kt:340-374 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (23 corresponding lines) · ×1
Edited copy of a member (23 corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/expressions/BindingExpressionDecorator.kt:396— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/expressions/BindingExpressionDecorator.kt:396-421 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/expressions/BindingExpressionDecorator.kt:427-449 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 16+ corresponding lines) · ×1
Edited copies of one member (3 members, 16+ corresponding lines) metro-trace/src/main/kotlin/dev/zacsweers/metro/trace/internal/MetroTraceContext.kt:53— metro-trace/src/main/kotlin/dev/zacsweers/metro/trace/internal/MetroTraceContext.kt:53-76 | metro-trace/src/main/kotlin/dev/zacsweers/metro/trace/internal/MetroTraceContext.kt:96-119 | metro-trace/src/main/kotlin/dev/zacsweers/metro/trace/internal/MetroTraceContext.kt:134-149 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×1
Edited copy of a member (19 corresponding lines) gradle-plugin/src/main/kotlin/dev/zacsweers/metro/gradle/analysis/GraphAnalyzer.kt:71— gradle-plugin/src/main/kotlin/dev/zacsweers/metro/gradle/analysis/GraphAnalyzer.kt:71-93 | gradle-plugin/src/main/kotlin/dev/zacsweers/metro/gradle/analysis/GraphAnalyzer.kt:99-117 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×1
Edited copy of a member (20 corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/ir.kt:1471— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/ir.kt:1471-1490 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/ir.kt:1494-1513 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 18+ corresponding lines) · ×1
Edited copies of one member (4 members, 18+ corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/MetroFirExtensionRegistrar.kt:312— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/MetroFirExtensionRegistrar.kt:312-330 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/MetroFirExtensionRegistrar.kt:337-354 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/MetroFirExtensionRegistrar.kt:360-377 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/IrDependencyGraph.kt:187-204 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×1
Edited copy of a member (11 corresponding lines) metro-trace/src/main/kotlin/dev/zacsweers/metro/trace/internal/TraceTestUtil.kt:56— metro-trace/src/main/kotlin/dev/zacsweers/metro/trace/internal/TraceTestUtil.kt:56-66 | metro-trace/src/main/kotlin/dev/zacsweers/metro/trace/internal/TraceTestUtil.kt:78-89 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 14+ corresponding lines) · ×1
Edited copies of one member (3 members, 14+ corresponding lines) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/toolwindow/MetroToolWindowPanel.kt:463— idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/toolwindow/MetroToolWindowPanel.kt:463-476 | idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/toolwindow/MetroToolWindowPanel.kt:559-574 | idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/toolwindow/MetroToolWindowPanel.kt:576-590 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 9+ corresponding lines) · ×1
Edited copies of one member (3 members, 9+ corresponding lines) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/explanation/MetroBindingExplanationPanel.kt:144— idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/explanation/MetroBindingExplanationPanel.kt:144-154 | idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/toolwindow/MetroToolWindowPanel.kt:593-601 | idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/toolwindow/MetroValidationResultPanel.kt:197-207 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 12+ corresponding lines) · ×1
Edited copies of one member (3 members, 12+ corresponding lines) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/graph/MetroGraphValidationService.kt:311— idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/graph/MetroGraphValidationService.kt:311-322 | idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/graph/MetroGraphValidationService.kt:523-534 | idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/graph/MetroGraphValidationService.kt:541-555 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 11+ corresponding lines) · ×1
Edited copies of one member (3 members, 11+ corresponding lines) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/tracing/IdeTraceRecorder.kt:276— idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/tracing/IdeTraceRecorder.kt:276-286 | idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/tracing/IdeTraceRecorder.kt:292-302 | idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/tracing/IdeTraceRecorder.kt:305-315 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 13+ corresponding lines) · ×1
Edited copies of one member (5 members, 13+ corresponding lines) metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/WrappedType.kt:57— metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/WrappedType.kt:57-69 | metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/WrappedType.kt:89-101 | metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/WrappedType.kt:121-133 | metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/WrappedType.kt:153-165 | metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/WrappedType.kt:186-198 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×1
Edited copy of a member (6 corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/FirTypeKey.kt:35— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/FirTypeKey.kt:35-40 | metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/identity/TypeKeyIdentity.kt:31-36 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×1
Edited copy of a member (4 corresponding lines) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/toolwindow/MetroToolWindowPanel.kt:478— idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/toolwindow/MetroToolWindowPanel.kt:478-481 | idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/toolwindow/MetroValidationResultPanel.kt:172-175 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (5 corresponding lines) · ×1
Edited copy of a member (5 corresponding lines) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBindingGraph.kt:749— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBindingGraph.kt:749-753 | idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/graph/KaBindingGraph.kt:159-165 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (31 lines × 2) idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/tracing/IdeTraceOperation.kt:217— idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/tracing/IdeTraceOperation.kt:217-247 | idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/tracing/IdeTraceOperation.kt:270-300 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/tracing/IdeTraceOperation.kt:217` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `block` to `(IdeTraceOperation?` in one and `suspend (IdeTraceOperation?` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (24–25 lines × 2) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingGraphGenerator.kt:318— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingGraphGenerator.kt:318-342 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingGraphGenerator.kt:410-433 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingGraphGenerator.kt:318` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (23 lines × 2) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/expressions/GraphExpressionGenerator.kt:1198— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/expressions/GraphExpressionGenerator.kt:1198-1220 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/expressions/GraphExpressionGenerator.kt:1314-1336 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (21–22 lines × 2) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/ir.kt:1042— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/ir.kt:1042-1062 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/ir.kt:1066-1087 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/ir.kt:1042` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14–20 lines × 2) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/IrContributionMerger.kt:312— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/IrContributionMerger.kt:312-331 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/IrContributionMerger.kt:428-441 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/IrContributionMerger.kt:312` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/IrContributionMerger.kt:311` calls `trace` and `compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/IrContributionMerger.kt:427` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (20 lines × 2) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/InjectedClassTransformer.kt:702— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/InjectedClassTransformer.kt:702-721 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/InjectedClassTransformer.kt:735-754 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/InjectedClassTransformer.kt:702` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 4) compiler-compat/k240/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k240/CompatContextImpl.kt:217— compiler-compat/k240/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k240/CompatContextImpl.kt:217-233 | compiler-compat/k240/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k240/IrConstructorCallIrGeneratedDeclarationsRegistrarCompat.kt:58-74 | compiler-compat/k240_dev_2124/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k240_dev_2124/IrConstructorCallIrGeneratedDeclarationsRegistrarCompat.kt:54-70 | compiler-compat/k2420_dev_6138/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k2420_dev_6138/IrAnnotationIrGeneratedDeclarationsRegistrarCompat.kt:79-95 — before extracting anything, compare `compiler-compat/k240/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k240/IrConstructorCallIrGeneratedDeclarationsRegistrarCompat.kt` and `compiler-compat/k240_dev_2124/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k240_dev_2124/IrConstructorCallIrGeneratedDeclarationsRegistrarCompat.kt` as WHOLE FILES: 87% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `compiler-compat/k240/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k240/CompatContextImpl.kt:217` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 2) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/MetroAnnotations.kt:418— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/MetroAnnotations.kt:418-433 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/MetroAnnotations.kt:711-726 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/src/main/kotlin/dev/zacsweers/metro/compiler/MetroAnnotations.kt:418` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/IrProviderFactory.kt:275— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/IrProviderFactory.kt:275-287 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/IrProviderFactory.kt:331-343 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/IrProviderFactory.kt:275` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/IrProviderFactory.kt:346` calls `join` and `compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/IrProviderFactory.kt:288` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10–11 lines × 2) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBindingGraph.kt:1126— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBindingGraph.kt:1126-1135 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBindingGraph.kt:1146-1156 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBindingGraph.kt:1126` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 2) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/symbols/ProviderFramework.kt:248— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/symbols/ProviderFramework.kt:248-256 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/symbols/ProviderFramework.kt:300-309 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/src/main/kotlin/dev/zacsweers/metro/compiler/symbols/ProviderFramework.kt:248` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 3) runtime-coroutines/src/jvmMain/kotlin/dev/zacsweers/metro/suspendLazyUtil.kt:14— runtime-coroutines/src/jvmMain/kotlin/dev/zacsweers/metro/suspendLazyUtil.kt:14-18 | runtime-coroutines/src/nativeMain/kotlin/dev/zacsweers/metro/suspendLazyUtil.kt:14-18 | runtime-coroutines/src/webMain/kotlin/dev/zacsweers/metro/suspendLazyUtil.kt:14-18 — before extracting anything, compare `runtime-coroutines/src/jvmMain/kotlin/dev/zacsweers/metro/suspendLazyUtil.kt` and `runtime-coroutines/src/nativeMain/kotlin/dev/zacsweers/metro/suspendLazyUtil.kt` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `runtime-coroutines/src/jvmMain/kotlin/dev/zacsweers/metro/suspendLazyUtil.kt:14` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/IrContributionMerger.kt:357— compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/IrContributionMerger.kt:357-371 | compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/IrContributionMerger.kt:450-464 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/IrContributionMerger.kt:357` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) REDACTED:141— REDACTED:141-158 | REDACTED:493-510 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (45 lines × 4) compiler-tests/src/generator230/kotlin/dev/zacsweers/metro/compiler/GenerateTestsImpl.kt:24— compiler-tests/src/generator230/kotlin/dev/zacsweers/metro/compiler/GenerateTestsImpl.kt:24-68 | compiler-tests/src/generator2320/kotlin/dev/zacsweers/metro/compiler/GenerateTestsImpl.kt:24-68 | compiler-tests/src/generator240/kotlin/dev/zacsweers/metro/compiler/GenerateTestsImpl.kt:24-68 | compiler-tests/src/generator2420/kotlin/dev/zacsweers/metro/compiler/GenerateTestsImpl.kt:25-69 — before extracting anything, compare `compiler-tests/src/generator230/kotlin/dev/zacsweers/metro/compiler/GenerateTestsImpl.kt` and `compiler-tests/src/generator2320/kotlin/dev/zacsweers/metro/compiler/GenerateTestsImpl.kt` as WHOLE FILES: 98% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Low cohesion: ContributionHintFirGenerator (LCOM4 4) compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/ContributionHintFirGenerator.kt:50— ContributionHintFirGenerator'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.
P12 · CI test-gate honesty· Test failure does not fail the CI gate · ×1
Test failure does not fail the CI gate REDACTED:748— `continue-on-error: true` lets the step or job that runs `./metrow publish` fail without failing the pipeline — the suite can go red and the change still merges. Remove it from the test step, or quarantine the specific failing tests instead.
X2 · Cancellation propagation· Async function without AbortSignal · ×1
Async function without AbortSignal: readAsset REDACTED:17— `readAsset` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
X27 · Collection changed while being enumerated· Collection is structurally changed while it is being enumerated · ×1
Collection is structurally changed while it is being enumerated idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/model/DerivedBindings.kt:380— `dependencies` is walked by the loop on line 380, and line 381 calls `dependencies +=` on `dependencies` inside the loop body — a structural change to a `ArrayList`. The loop's hidden iterator is fail-fast, so its next `next()` throws `ConcurrentModificationException`: every pass that reaches this call ends the loop by exception instead of by running out of elements, and the remaining elements are never seen.
Duplicated predicate compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitFirExtension.kt:70— `!generateClassesInIr || (generateContributionHints && generateContributionHintsInFir)` appears character-identically in 2 files — compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitFirExtension.kt, compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitSerializableFirExtension.kt. 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 idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/intentions/contributions/ContributionCandidate.kt:114— `!hasModifier(KtTokens.PRIVATE_KEYWORD) && !hasModifier(KtTokens.PROTECTED_KEYWORD)` appears character-identically in 2 files — idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/intentions/contributions/ContributionCandidate.kt, idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/intentions/injection/InjectionTargets.kt. 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 compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitContributionExtension.kt:158— `!options.enableCircuitCodegen || options.generateClassesInIr` appears character-identically in 2 files — compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitContributionExtension.kt, compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitSerializableContributionExtension.kt. 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 compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/BindingMirrorClassFirGenerator.kt:110— `annotations.isBinds || annotations.isMultibinds || annotations.isBindsOptionalOf` appears character-identically in 3 files — compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/BindingMirrorClassFirGenerator.kt, compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/GraphNodes.kt, compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/BindsMirrorClassTransformer.kt. 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 compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/BindingContainerCallableChecker.kt:858— `annotations.isProvides || annotations.isBinds` appears character-identically in 2 files — compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/BindingContainerCallableChecker.kt, compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/MultibindsChecker.kt. 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 compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/BindingContainerCallableChecker.kt:207— `annotations.isProvides || annotations.isBinds || annotations.isMultibinds || annotations.isBindsOptionalOf` appears character-identically in 2 files — compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/checkers/BindingContainerCallableChecker.kt, compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/BindingContainerTransformer.kt. 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 idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/explanation/BindingExplanationSources.kt:84— `basePath != null && file.path.startsWith("$basePath/")` appears character-identically in 2 files — idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/explanation/BindingExplanationSources.kt, idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/toolwindow/MetroGraphDebugExporter.kt. 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 compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingPropertyContext.kt:114— `binding == null || binding is IrBinding.Absent` appears character-identically in 2 files — compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingPropertyContext.kt, compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBindingGraph.kt. 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 compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingPropertyCollector.kt:445— `binding is IrBinding.ConstructorInjected && binding.isAssisted` appears character-identically in 4 files — compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingPropertyCollector.kt, compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/GraphMetadataReporter.kt, compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrBindingGraph.kt, compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrGraphGenerator.kt. 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 compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrGraphGenerator.kt:2259— `binding is IrBinding.GraphDependency && binding.canPassThrough(contextualTypeKey)` appears character-identically in 2 files — compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/IrGraphGenerator.kt, compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/expressions/GraphExpressionGenerator.kt. 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 idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/graph/KaBindingGraph.kt:138— `binding is KaBinding.AssistedFactory || binding is KaBinding.ConstructorInjected` appears character-identically in 3 files — idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/graph/KaBindingGraph.kt, idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/LibraryIndexPostProcessor.kt, idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/snapshot/SourceLibraryInputs.kt. 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 idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/LibraryIndexPostProcessor.kt:286— `binding is KaBinding.AssistedFactory || binding is KaBinding.ConstructorInjected || binding is KaBinding.Provided && binding.isClassContribu…` appears character-identically in 2 files — idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/LibraryIndexPostProcessor.kt, idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/snapshot/SourceLibraryInputs.kt. 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 idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/graph/KaBindingGraph.kt:517— `binding is KaBinding.ConstructorInjected && binding.isAssisted` appears character-identically in 2 files — idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/graph/KaBindingGraph.kt, idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/model/BindingExplanation.kt. 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 idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/intentions/contributions/ContributeBindingAction.kt:120— `candidate.existingMapKey || edit.boundType.hasMapKey` appears character-identically in 2 files — idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/intentions/contributions/ContributeBindingAction.kt, idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/intentions/contributions/ContributionEdit.kt. 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 idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/intentions/contributions/ContributeBindingAction.kt:121— `edit.kind == ContributionKind.MAP && !hasMapKey` appears character-identically in 2 files — idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/intentions/contributions/ContributeBindingAction.kt, idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/intentions/contributions/ContributionEdit.kt. 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 idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/toolwindow/MetroTreeStructure.kt:353— `element is MetroTreeNode.BindingRow || element is MetroTreeNode.StackEntry || element is MetroTreeNode.Summary` appears character-identically in 2 files — idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/toolwindow/MetroTreeStructure.kt, idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/toolwindow/MetroValidationResultPanel.kt. 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 idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/tracing/IdeTraceOperation.kt:105— `failure is CancellationException || failure is ProcessCanceledException` appears character-identically in 2 files — idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/tracing/IdeTraceOperation.kt, idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/tracing/IdeTraceWorkSummary.kt. 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 idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt:2396— `file.extension == "kt" || file.extension == "kts"` appears character-identically in 2 files — idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/MetroResolutionService.kt, idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/SourceFileArrivalListener.kt. 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 compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/IrBindsLikeCallable.kt:81— `functionTypeParameters.isNotEmpty() && functionTypeArguments == null` appears character-identically in 2 files — compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/IrBindsLikeCallable.kt, compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/IrProviderFactory.kt. 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 compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/BindingContainerTransformer.kt:1553— `hasContainerTypeParameters || hasFunctionTypeParameters` appears character-identically in 2 files — compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/BindingContainerTransformer.kt, compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/BindsMirrorClassTransformer.kt. 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 compiler/build.gradle.kts:275— `it is ExternalDependency && it.group == "dev.drewhamilton.poko"` appears character-identically in 2 files — compiler/build.gradle.kts, metro-common/build.gradle.kts. 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 build.gradle.kts:60— `it.isDirectory && it.name.startsWith("k") && File(it, "version.txt").exists()` appears character-identically in 3 files — build.gradle.kts, compiler/build.gradle.kts, settings.gradle.kts. 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 compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingGraphGenerator.kt:298— `providerFactory is ProviderFactory.Metro && providerFactory.isGeneric` appears character-identically in 2 files — compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/graph/BindingGraphGenerator.kt, compiler/src/main/kotlin/dev/zacsweers/metro/compiler/ir/transformers/DependencyGraphTransformer.kt. 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 idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/ClassBindingResolver.kt:46— `symbol.classKind == KaClassKind.OBJECT || symbol.classKind == KaClassKind.COMPANION_OBJECT` appears character-identically in 2 files — idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/ClassBindingResolver.kt, idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/SourceClassBindingPostProcessor.kt. 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 idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/BindingExtraction.kt:1116— `symbol.hasAnyAnnotation(injectIds) || symbol.backingFieldSymbol?.hasAnyAnnotation(injectIds) == true || symbol.setter?.hasAnyAnnotation(inje…` appears character-identically in 2 files — idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/BindingExtraction.kt, idea-plugin/src/main/kotlin/dev/zacsweers/metro/idea/index/FileShardBuilder.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Orphaned file metro-trace/src/main/kotlin/dev/zacsweers/metro/trace/internal/TraceTestUtil.kt:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file gradle-plugin/src/main/kotlin/dev/zacsweers/metro/gradle/artifacts/GenerateGraphMetadataTask.kt:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file gradle-plugin/src/main/kotlin/dev/zacsweers/metro/gradle/artifacts/MetroArtifactCopyTask.kt:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/GraphPartitioner.kt: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.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×3
Projects may be oversized for their cohesion compiler/build.gradle.kts:1— `compiler` (69434 LoC, 674 module-visible types across 20 directories) overshoots its size bounds. 3 of 29 build unit(s) (Gradle) overshoot their size bounds, lowering Project Cohesion to 7.9/10. 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.
Projects may be oversized for their cohesion idea-plugin/build.gradle.kts:1— `idea-plugin` (33060 LoC, 525 module-visible types across 18 directories) overshoots its size bounds. 3 of 29 build unit(s) (Gradle) overshoot their size bounds, lowering Project Cohesion to 7.9/10. 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.
Projects may be oversized for their cohesion metro-common/build.gradle.kts:1— `metro-common` (10595 LoC, 424 module-visible types across 11 directories) overshoots its size bounds. 3 of 29 build unit(s) (Gradle) overshoot their size bounds, lowering Project Cohesion to 7.9/10. 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.
Fat interface: CompatContext (33 abstract methods) compiler-compat/src/main/kotlin/dev/zacsweers/metro/compiler/compat/CompatContext.kt:77— `CompatContext` declares 33 abstract methods: `createTypeResolutionConfigurationCompat`, `createCompilerConfigurationCompat`, `createTopLevelFunction`, `createMemberFunction`, `copyWithOverrideCompat`, `fakeElement`, `defaultValueSourceCompat`, `isNamedFunction`, `buildMemberFunction`, `addBackingFieldCompat`, `getEffectiveSeverityCompat`, `createCompat`, `withSeverityCompat`, `reportAt`, `registerFirExtensionCompat`, `registerIrExtensionCompat`, `createIrGeneratedDeclarationsRegistrar`, `irAnnotationCompat`, `clearTopLevelPluginFileMarkerCompat`, `annotationsCompat`, `replaceAnnotationsCompat`, `finderForBuiltinsCompat`, `finderForSourceCompat`, `evaluateAsCompat`, `getDeprecationsProviderCompat`, `getBooleanArgumentCompat`, `getStringArgumentCompat`, `buildValueParameterCopyCompat`, `dumpKotlinLikeCompat`, `messageCollectorCompat`, `buildResolvedQualifierCompat`, `createEmptyExternalPackageFragmentCompat`, `getAnnotationArgumentCompat`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
No ADRs found compiler-tests/build.gradle.kts:358— No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `compiler-tests/build.gradle.kts` makes this repository a deployable product (line 358).
D21 · Naming Consistency· `buildIROnlyFactoriesAnnotation` spells `IR` where 62 names in the project spell it `Ir` · ×1
`buildIROnlyFactoriesAnnotation` spells `IR` where 62 names in the project spell it `Ir` compiler/src/main/kotlin/dev/zacsweers/metro/compiler/fir/generators/ContributionsFirGenerator.kt:1329— 62 of 63 names in project compiler spell the token `Ir` (62 of 63; unit: names in project compiler containing `Ir`). Peers: MetroAnnotationsKt.mirrorIrConstructorCalls (compiler/src/main/kotlin/dev/zacsweers/metro/compiler/MetroAnnotations.kt:784); dev.zacsweers.metro.compiler.api.ir.MetroIrContributionExtension (compiler/src/main/kotlin/dev/zacsweers/metro/compiler/api/ir/MetroIrContributionExtension.kt:31); dev.zacsweers.metro.compiler.circuit.CircuitIrExtensionKt (compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitIrExtension.kt:1); dev.zacsweers.metro.compiler.circuit.CircuitIrDeclarationGenerationExtension (compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitIrExtension.kt:94); dev.zacsweers.metro.compiler.circuit.CircuitIrExtension (compiler/src/main/kotlin/dev/zacsweers/metro/compiler/circuit/CircuitIrExtension.kt:145). Rename to `buildIrOnlyFactoriesAnnotation`. [rule N6]
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 4 of 395 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; 395 of the 681 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: metro-trace/src/main/kotlin/dev/zacsweers/metro/trace/internal/TraceTestUtil.kt, gradle-plugin/src/main/kotlin/dev/zacsweers/metro/gradle/artifacts/GenerateGraphMetadataTask.kt, gradle-plugin/src/main/kotlin/dev/zacsweers/metro/gradle/artifacts/MetroArtifactCopyTask.kt, metro-common/src/main/kotlin/dev/zacsweers/metro/compiler/graph/GraphPartitioner.kt. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
Logging is not universal — Only 2/3 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`.
No SAST REDACTED:10— No static application security testing detected. For this repository's stack, add spotbugs with find-sec-bugs (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 12 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.
X2 · Cancellation propagation· Not all async functions that make a request accept an AbortSignal · ×1
Not all async functions that make a request accept an AbortSignal — Only 0/1 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
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 180 file(s) — `benchmark/generate-projects.main.kts`, `benchmark/startup-multiplatform/build.gradle.kts`, `build-logic/src/main/kotlin/metro.yarnNode.gradle.kts`, `compiler-compat/k230/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k230/CompatContextImpl.kt`, `compiler-compat/k230/src/main/kotlin/dev/zacsweers/metro/compiler/compat/k230/IrConstructorCallIrGeneratedDeclarationsRegistrarCompat.kt`, … (+175 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 01a1e5d7-890f-75fd-9a73-faf8049f9a8b · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 101 · Warnings: 940 · Recommendations: 50 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 16-11-2026 @ 19:31 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.