Public report of scala/scala3, published 26 October 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). 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, 26 October 2026, 06:28 UTC · Survey ID cd_883bdc5b878441808b847c203770dee3
scala/scala3
Measured 26 October 2026, 06:22 UTC, at code version 0aeb2c3
No regression since the last survey
A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
Up 1 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 339,569 lines of product code in 2 projects, tests not counted · Estimated rebuild effort: about 5.8 person-years · Weakest lens: Code Health, 53
Findings by how serious they are
20 critical2339 serious177 minor
10 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
26 October 2026, 06:22 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds Watchdog. It is open to any tool that
implements it, and today Watchdog is the only one that does.
The score is deterministic, which means the same code always gets the same score. Watchdog works it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
72of 72 dimensions measured by tools.
2518of 2536 findings point to an exact file and line, so you can open each one in the code. The other 18 concern the repository as a whole, such as missing documentation.
72dimensions across 6 lenses, read from 339,569 lines of product code in 2 projects.
scala/scala3 falls short of our standard for production, held back most by its Code Health lens, the quality of the code itself. It scores 61 out of 100 and is rated Adequate, and 17 of its 20 critical findings are security problems.
Code Health, at 53, is the weakest lens and counts most in the score. The best first step is adding type checking, worth about 7 points. Recording design decisions comes next, worth about 2 points. Raising Code Health to 70 would lift the score to about 68.
Twelve secrets can leak from the build pipeline. Two pipeline steps install packages that can change without warning, and three parts of the code are no longer understood by anyone working on it. Limiting each secret to its own step, pinning what the pipeline installs and having someone learn the forgotten files would close these risks. Setting a waiting period for automatic updates would fix the automatic dependency update that takes a new release at once, and the password or key in the code's history needs replacing, with the old one switched off.
The product code is 339,569 lines, about €850,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.
Watchdog compares every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 29 findings
These 29 critical or serious findings were in the previous survey, on 12 October 2026, and are gone from this one.
Explicit Debt · TodoComment repeated across 16 files tests/disabled/reflect/run/t6259.scala
Explicit Debt · TodoComment repeated across 16 files tests/old-tasty-interpreter-prototype/Test.scala
Rebuild cost: about €850,000 · Estimate
Cost to rebuild
€280,000 to €1,400,000, for 4,683 to 14,858 hours of work, about 5.8 person-years for 3 to 12 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.8 at a score of 61. 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: 339,569 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: Watchdog prices the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
Raises the score by about 7 points · Medium effort · Type Safety
2
Resolve the 1 No ADRs found finding(s) in ADR Quality.
Raises the score by about 2 points · Low effort · ADR Quality
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 €850,000 to build again, about 5.8 person-years of work. Its weakest lens is Code Health, at 53 (Adequate). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up. Of all the actions in this report, it raises the score most for the work it takes: about 7 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 Watchdog estimates the extra work at 4% to 9% on every change. The history of the code shows how much it changes: about 58,716 lines over the last 90 days, which is about 238,126 lines a year. At that pace, the extra work comes to an estimated 24.1 to 144.5 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
680 modules, with 2842 dependencies between them. 3 loops run through 233 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 640 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.
dotty.tools.dotc.interactive.Interactive.Include uses scala, so a change to scala can break dotty.tools.dotc.interactive.Interactive.Include, while a change to dotty.tools.dotc.interactive.Interactive.Include can't break scala.
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.
2→13 dotty.tools.dotc.util.Spans uses scalapart of a loop✕
Connections
5 pairs of types, where a type in dotty.tools.dotc.util.Spans uses a type in scala.
The types involved
dotty.tools.dotc.util.Spans.Coord → scala.Boolean
dotty.tools.dotc.util.Spans.Coord → scala.Int
dotty.tools.dotc.util.Spans.Span → scala.Boolean
dotty.tools.dotc.util.Spans.Span → scala.Int
dotty.tools.dotc.util.Spans.Span → scala.Long
Direction
dotty.tools.dotc.util.Spans uses scala, so a change to scala can break dotty.tools.dotc.util.Spans, while a change to dotty.tools.dotc.util.Spans can't break scala.
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.
scala.collection.mutable uses dotty.tools.dotc.interactive.Interactive.Include, so a change to dotty.tools.dotc.interactive.Interactive.Include can break scala.collection.mutable, while a change to scala.collection.mutable can't break dotty.tools.dotc.interactive.Interactive.Include.
Position
Below the diagonal: scala.collection.mutable uses a module listed above it, which is the healthy direction.
3→13 scala.collection.mutable uses scalapart of a loop✕
Connections
16 pairs of types, where a type in scala.collection.mutable uses a type in scala.
scala.collection.mutable uses scala, so a change to scala can break scala.collection.mutable, while a change to scala.collection.mutable can't break scala.
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.
dotty.tools.io uses scala.collection.mutable, so a change to scala.collection.mutable can break dotty.tools.io, while a change to dotty.tools.io can't break scala.collection.mutable.
Position
Below the diagonal: dotty.tools.io uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.util uses dotty.tools.dotc.util.Spans, so a change to dotty.tools.dotc.util.Spans can break dotty.tools.dotc.util, while a change to dotty.tools.dotc.util can't break dotty.tools.dotc.util.Spans.
Position
Below the diagonal: dotty.tools.dotc.util uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.util uses scala.collection.mutable, so a change to scala.collection.mutable can break dotty.tools.dotc.util, while a change to dotty.tools.dotc.util can't break scala.collection.mutable.
Position
Below the diagonal: dotty.tools.dotc.util uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.util uses dotty.tools.io, so a change to dotty.tools.io can break dotty.tools.dotc.util, while a change to dotty.tools.dotc.util can't break dotty.tools.io.
Position
Below the diagonal: dotty.tools.dotc.util uses a module listed above it, which is the healthy direction.
5→12 dotty.tools.dotc.util uses dotty.tools.dotc.transform.init.Objectspart of a loop✕
Connections
4 pairs of types, where a type in dotty.tools.dotc.util uses a type in dotty.tools.dotc.transform.init.Objects.
dotty.tools.dotc.util uses dotty.tools.dotc.transform.init.Objects, so a change to dotty.tools.dotc.transform.init.Objects can break dotty.tools.dotc.util, while a change to dotty.tools.dotc.util can't break dotty.tools.dotc.transform.init.Objects.
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→13 dotty.tools.dotc.util uses scalapart of a loop✕
Connections
60 pairs of types, where a type in dotty.tools.dotc.util uses a type in scala. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dotty.tools.dotc.util uses dotty.tools.dotc.printing.Texts, so a change to dotty.tools.dotc.printing.Texts can break dotty.tools.dotc.util, while a change to dotty.tools.dotc.util can't break dotty.tools.dotc.printing.Texts.
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→16 dotty.tools.dotc.util uses dotty.tools.dotc.printingpart of a loop✕
Connections
1 pair of types, where a type in dotty.tools.dotc.util uses a type in dotty.tools.dotc.printing.
dotty.tools.dotc.util uses dotty.tools.dotc.printing, so a change to dotty.tools.dotc.printing can break dotty.tools.dotc.util, while a change to dotty.tools.dotc.util can't break dotty.tools.dotc.printing.
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→17 dotty.tools.dotc.util uses dotty.tools.dotc.core.Namespart of a loop✕
Connections
4 pairs of types, where a type in dotty.tools.dotc.util uses a type in dotty.tools.dotc.core.Names.
dotty.tools.dotc.util uses dotty.tools.dotc.core.Names, so a change to dotty.tools.dotc.core.Names can break dotty.tools.dotc.util, while a change to dotty.tools.dotc.util can't break dotty.tools.dotc.core.Names.
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→18 dotty.tools.dotc.util uses dotty.tools.dotc.core.Denotationspart of a loop✕
Connections
2 pairs of types, where a type in dotty.tools.dotc.util uses a type in dotty.tools.dotc.core.Denotations.
dotty.tools.dotc.util uses dotty.tools.dotc.core.Denotations, so a change to dotty.tools.dotc.core.Denotations can break dotty.tools.dotc.util, while a change to dotty.tools.dotc.util can't break dotty.tools.dotc.core.Denotations.
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→19 dotty.tools.dotc.util uses dotty.tools.dotc.core.Typespart of a loop✕
Connections
3 pairs of types, where a type in dotty.tools.dotc.util uses a type in dotty.tools.dotc.core.Types.
dotty.tools.dotc.util uses dotty.tools.dotc.core.Types, so a change to dotty.tools.dotc.core.Types can break dotty.tools.dotc.util, while a change to dotty.tools.dotc.util can't break dotty.tools.dotc.core.Types.
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→27 dotty.tools.dotc.util uses dotty.tools.dotc.corepart of a loop✕
Connections
1 pair of types, where a type in dotty.tools.dotc.util uses a type in dotty.tools.dotc.core.
dotty.tools.dotc.util uses dotty.tools.dotc.core, so a change to dotty.tools.dotc.core can break dotty.tools.dotc.util, while a change to dotty.tools.dotc.util can't break dotty.tools.dotc.core.
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→29 dotty.tools.dotc.util uses dotty.tools.dotc.core.Contextspart of a loop✕
Connections
6 pairs of types, where a type in dotty.tools.dotc.util uses a type in dotty.tools.dotc.core.Contexts.
dotty.tools.dotc.util uses dotty.tools.dotc.core.Contexts, so a change to dotty.tools.dotc.core.Contexts can break dotty.tools.dotc.util, while a change to dotty.tools.dotc.util can't break dotty.tools.dotc.core.Contexts.
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 dotty.tools.dotc.util uses dotty.tools.dotc.astpart of a loop✕
Connections
1 pair of types, where a type in dotty.tools.dotc.util uses a type in dotty.tools.dotc.ast.
dotty.tools.dotc.util uses dotty.tools.dotc.ast, so a change to dotty.tools.dotc.ast can break dotty.tools.dotc.util, while a change to dotty.tools.dotc.util can't break dotty.tools.dotc.ast.
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→33 dotty.tools.dotc.util uses dotty.tools.dotc.ast.Treespart of a loop✕
Connections
2 pairs of types, where a type in dotty.tools.dotc.util uses a type in dotty.tools.dotc.ast.Trees.
dotty.tools.dotc.util uses dotty.tools.dotc.ast.Trees, so a change to dotty.tools.dotc.ast.Trees can break dotty.tools.dotc.util, while a change to dotty.tools.dotc.util can't break dotty.tools.dotc.ast.Trees.
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.
dotty.tools.dotc.reporting uses dotty.tools.dotc.interactive.Interactive.Include, so a change to dotty.tools.dotc.interactive.Interactive.Include can break dotty.tools.dotc.reporting, while a change to dotty.tools.dotc.reporting can't break dotty.tools.dotc.interactive.Interactive.Include.
Position
Below the diagonal: dotty.tools.dotc.reporting uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.reporting uses dotty.tools.dotc.util.Spans, so a change to dotty.tools.dotc.util.Spans can break dotty.tools.dotc.reporting, while a change to dotty.tools.dotc.reporting can't break dotty.tools.dotc.util.Spans.
Position
Below the diagonal: dotty.tools.dotc.reporting uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.reporting uses dotty.tools.dotc.util, so a change to dotty.tools.dotc.util can break dotty.tools.dotc.reporting, while a change to dotty.tools.dotc.reporting can't break dotty.tools.dotc.util.
Position
Below the diagonal: dotty.tools.dotc.reporting uses a module listed above it, which is the healthy direction.
6→13 dotty.tools.dotc.reporting uses scalapart of a loop✕
Connections
33 pairs of types, where a type in dotty.tools.dotc.reporting uses a type in scala. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dotty.tools.dotc.reporting uses scala, so a change to scala can break dotty.tools.dotc.reporting, while a change to dotty.tools.dotc.reporting can't break scala.
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→17 dotty.tools.dotc.reporting uses dotty.tools.dotc.core.Namespart of a loop✕
Connections
5 pairs of types, where a type in dotty.tools.dotc.reporting uses a type in dotty.tools.dotc.core.Names.
dotty.tools.dotc.reporting uses dotty.tools.dotc.core.Names, so a change to dotty.tools.dotc.core.Names can break dotty.tools.dotc.reporting, while a change to dotty.tools.dotc.reporting can't break dotty.tools.dotc.core.Names.
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→18 dotty.tools.dotc.reporting uses dotty.tools.dotc.core.Denotationspart of a loop✕
Connections
2 pairs of types, where a type in dotty.tools.dotc.reporting uses a type in dotty.tools.dotc.core.Denotations.
dotty.tools.dotc.reporting uses dotty.tools.dotc.core.Denotations, so a change to dotty.tools.dotc.core.Denotations can break dotty.tools.dotc.reporting, while a change to dotty.tools.dotc.reporting can't break dotty.tools.dotc.core.Denotations.
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→19 dotty.tools.dotc.reporting uses dotty.tools.dotc.core.Typespart of a loop✕
Connections
5 pairs of types, where a type in dotty.tools.dotc.reporting uses a type in dotty.tools.dotc.core.Types.
dotty.tools.dotc.reporting uses dotty.tools.dotc.core.Types, so a change to dotty.tools.dotc.core.Types can break dotty.tools.dotc.reporting, while a change to dotty.tools.dotc.reporting can't break dotty.tools.dotc.core.Types.
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→23 dotty.tools.dotc.reporting uses dotty.tools.dotc.core.Symbolspart of a loop✕
Connections
8 pairs of types, where a type in dotty.tools.dotc.reporting uses a type in dotty.tools.dotc.core.Symbols.
dotty.tools.dotc.reporting uses dotty.tools.dotc.core.Symbols, so a change to dotty.tools.dotc.core.Symbols can break dotty.tools.dotc.reporting, while a change to dotty.tools.dotc.reporting can't break dotty.tools.dotc.core.Symbols.
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→27 dotty.tools.dotc.reporting uses dotty.tools.dotc.corepart of a loop✕
Connections
8 pairs of types, where a type in dotty.tools.dotc.reporting uses a type in dotty.tools.dotc.core.
dotty.tools.dotc.reporting uses dotty.tools.dotc.core, so a change to dotty.tools.dotc.core can break dotty.tools.dotc.reporting, while a change to dotty.tools.dotc.reporting can't break dotty.tools.dotc.core.
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→29 dotty.tools.dotc.reporting uses dotty.tools.dotc.core.Contextspart of a loop✕
Connections
242 pairs of types, where a type in dotty.tools.dotc.reporting uses a type in dotty.tools.dotc.core.Contexts. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dotty.tools.dotc.reporting uses dotty.tools.dotc.core.Contexts, so a change to dotty.tools.dotc.core.Contexts can break dotty.tools.dotc.reporting, while a change to dotty.tools.dotc.reporting can't break dotty.tools.dotc.core.Contexts.
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→33 dotty.tools.dotc.reporting uses dotty.tools.dotc.ast.Treespart of a loop✕
Connections
1 pair of types, where a type in dotty.tools.dotc.reporting uses a type in dotty.tools.dotc.ast.Trees.
dotty.tools.dotc.reporting uses dotty.tools.dotc.ast.Trees, so a change to dotty.tools.dotc.ast.Trees can break dotty.tools.dotc.reporting, while a change to dotty.tools.dotc.reporting can't break dotty.tools.dotc.ast.Trees.
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→35 dotty.tools.dotc.reporting uses dotty.tools.dotcpart of a loop✕
Connections
3 pairs of types, where a type in dotty.tools.dotc.reporting uses a type in dotty.tools.dotc.
dotty.tools.dotc.reporting uses dotty.tools.dotc, so a change to dotty.tools.dotc can break dotty.tools.dotc.reporting, while a change to dotty.tools.dotc.reporting can't break dotty.tools.dotc.
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.
scala.quoted.runtime.impl.QuotesImpl.reflect uses dotty.tools.dotc.util, so a change to dotty.tools.dotc.util can break scala.quoted.runtime.impl.QuotesImpl.reflect, while a change to scala.quoted.runtime.impl.QuotesImpl.reflect can't break dotty.tools.dotc.util.
Position
Below the diagonal: scala.quoted.runtime.impl.QuotesImpl.reflect uses a module listed above it, which is the healthy direction.
7→13 scala.quoted.runtime.impl.QuotesImpl.reflect uses scalapart of a loop✕
Connections
15 pairs of types, where a type in scala.quoted.runtime.impl.QuotesImpl.reflect uses a type in scala.
scala.quoted.runtime.impl.QuotesImpl.reflect uses scala, so a change to scala can break scala.quoted.runtime.impl.QuotesImpl.reflect, while a change to scala.quoted.runtime.impl.QuotesImpl.reflect can't break scala.
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→19 scala.quoted.runtime.impl.QuotesImpl.reflect uses dotty.tools.dotc.core.Typespart of a loop✕
Connections
22 pairs of types, where a type in scala.quoted.runtime.impl.QuotesImpl.reflect uses a type in dotty.tools.dotc.core.Types.
scala.quoted.runtime.impl.QuotesImpl.reflect uses dotty.tools.dotc.core.Types, so a change to dotty.tools.dotc.core.Types can break scala.quoted.runtime.impl.QuotesImpl.reflect, while a change to scala.quoted.runtime.impl.QuotesImpl.reflect can't break dotty.tools.dotc.core.Types.
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 scala.quoted.runtime.impl.QuotesImpl.reflect uses dotty.tools.dotc.core.Constantspart of a loop✕
Connections
15 pairs of types, where a type in scala.quoted.runtime.impl.QuotesImpl.reflect uses a type in dotty.tools.dotc.core.Constants.
scala.quoted.runtime.impl.QuotesImpl.reflect uses dotty.tools.dotc.core.Constants, so a change to dotty.tools.dotc.core.Constants can break scala.quoted.runtime.impl.QuotesImpl.reflect, while a change to scala.quoted.runtime.impl.QuotesImpl.reflect can't break dotty.tools.dotc.core.Constants.
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→23 scala.quoted.runtime.impl.QuotesImpl.reflect uses dotty.tools.dotc.core.Symbolspart of a loop✕
Connections
16 pairs of types, where a type in scala.quoted.runtime.impl.QuotesImpl.reflect uses a type in dotty.tools.dotc.core.Symbols.
scala.quoted.runtime.impl.QuotesImpl.reflect uses dotty.tools.dotc.core.Symbols, so a change to dotty.tools.dotc.core.Symbols can break scala.quoted.runtime.impl.QuotesImpl.reflect, while a change to scala.quoted.runtime.impl.QuotesImpl.reflect can't break dotty.tools.dotc.core.Symbols.
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→27 scala.quoted.runtime.impl.QuotesImpl.reflect uses dotty.tools.dotc.corepart of a loop✕
Connections
4 pairs of types, where a type in scala.quoted.runtime.impl.QuotesImpl.reflect uses a type in dotty.tools.dotc.core.
scala.quoted.runtime.impl.QuotesImpl.reflect uses dotty.tools.dotc.core, so a change to dotty.tools.dotc.core can break scala.quoted.runtime.impl.QuotesImpl.reflect, while a change to scala.quoted.runtime.impl.QuotesImpl.reflect can't break dotty.tools.dotc.core.
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→33 scala.quoted.runtime.impl.QuotesImpl.reflect uses dotty.tools.dotc.ast.Treespart of a loop✕
Connections
163 pairs of types, where a type in scala.quoted.runtime.impl.QuotesImpl.reflect uses a type in dotty.tools.dotc.ast.Trees. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
scala.quoted.runtime.impl.QuotesImpl.reflect uses dotty.tools.dotc.ast.Trees, so a change to dotty.tools.dotc.ast.Trees can break scala.quoted.runtime.impl.QuotesImpl.reflect, while a change to scala.quoted.runtime.impl.QuotesImpl.reflect can't break dotty.tools.dotc.ast.Trees.
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.
dotty.tools.dotc.typer uses dotty.tools.dotc.interactive.Interactive.Include, so a change to dotty.tools.dotc.interactive.Interactive.Include can break dotty.tools.dotc.typer, while a change to dotty.tools.dotc.typer can't break dotty.tools.dotc.interactive.Interactive.Include.
Position
Below the diagonal: dotty.tools.dotc.typer uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.typer uses dotty.tools.dotc.util.Spans, so a change to dotty.tools.dotc.util.Spans can break dotty.tools.dotc.typer, while a change to dotty.tools.dotc.typer can't break dotty.tools.dotc.util.Spans.
Position
Below the diagonal: dotty.tools.dotc.typer uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.typer uses dotty.tools.dotc.util, so a change to dotty.tools.dotc.util can break dotty.tools.dotc.typer, while a change to dotty.tools.dotc.typer can't break dotty.tools.dotc.util.
Position
Below the diagonal: dotty.tools.dotc.typer uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.typer uses dotty.tools.dotc.reporting, so a change to dotty.tools.dotc.reporting can break dotty.tools.dotc.typer, while a change to dotty.tools.dotc.typer can't break dotty.tools.dotc.reporting.
Position
Below the diagonal: dotty.tools.dotc.typer uses a module listed above it, which is the healthy direction.
8→10 dotty.tools.dotc.typer uses dotty.tools.dotc.core.Phasespart of a loop✕
Connections
1 pair of types, where a type in dotty.tools.dotc.typer uses a type in dotty.tools.dotc.core.Phases.
dotty.tools.dotc.typer uses dotty.tools.dotc.core.Phases, so a change to dotty.tools.dotc.core.Phases can break dotty.tools.dotc.typer, while a change to dotty.tools.dotc.typer can't break dotty.tools.dotc.core.Phases.
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.
8→11 dotty.tools.dotc.typer uses dotty.tools.dotc.transform.initpart of a loop✕
Connections
1 pair of types, where a type in dotty.tools.dotc.typer uses a type in dotty.tools.dotc.transform.init.
dotty.tools.dotc.typer uses dotty.tools.dotc.transform.init, so a change to dotty.tools.dotc.transform.init can break dotty.tools.dotc.typer, while a change to dotty.tools.dotc.typer can't break dotty.tools.dotc.transform.init.
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.
8→12 dotty.tools.dotc.typer uses dotty.tools.dotc.transform.init.Objectspart of a loop✕
Connections
2 pairs of types, where a type in dotty.tools.dotc.typer uses a type in dotty.tools.dotc.transform.init.Objects.
dotty.tools.dotc.typer uses dotty.tools.dotc.transform.init.Objects, so a change to dotty.tools.dotc.transform.init.Objects can break dotty.tools.dotc.typer, while a change to dotty.tools.dotc.typer can't break dotty.tools.dotc.transform.init.Objects.
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.
8→13 dotty.tools.dotc.typer uses scalapart of a loop✕
Connections
49 pairs of types, where a type in dotty.tools.dotc.typer uses a type in scala. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dotty.tools.dotc.typer uses dotty.tools.dotc.core.Scopes, so a change to dotty.tools.dotc.core.Scopes can break dotty.tools.dotc.typer, while a change to dotty.tools.dotc.typer can't break dotty.tools.dotc.core.Scopes.
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.
8→17 dotty.tools.dotc.typer uses dotty.tools.dotc.core.Namespart of a loop✕
Connections
11 pairs of types, where a type in dotty.tools.dotc.typer uses a type in dotty.tools.dotc.core.Names.
dotty.tools.dotc.typer uses dotty.tools.dotc.core.Names, so a change to dotty.tools.dotc.core.Names can break dotty.tools.dotc.typer, while a change to dotty.tools.dotc.typer can't break dotty.tools.dotc.core.Names.
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.
8→18 dotty.tools.dotc.typer uses dotty.tools.dotc.core.Denotationspart of a loop✕
Connections
2 pairs of types, where a type in dotty.tools.dotc.typer uses a type in dotty.tools.dotc.core.Denotations.
dotty.tools.dotc.typer uses dotty.tools.dotc.core.Denotations, so a change to dotty.tools.dotc.core.Denotations can break dotty.tools.dotc.typer, while a change to dotty.tools.dotc.typer can't break dotty.tools.dotc.core.Denotations.
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.
8→19 dotty.tools.dotc.typer uses dotty.tools.dotc.core.Typespart of a loop✕
Connections
49 pairs of types, where a type in dotty.tools.dotc.typer uses a type in dotty.tools.dotc.core.Types. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dotty.tools.dotc.typer uses dotty.tools.dotc.core.Types, so a change to dotty.tools.dotc.core.Types can break dotty.tools.dotc.typer, while a change to dotty.tools.dotc.typer can't break dotty.tools.dotc.core.Types.
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.
8→20 dotty.tools.dotc.typer uses dotty.tools.dotc.core.Constantspart of a loop✕
Connections
1 pair of types, where a type in dotty.tools.dotc.typer uses a type in dotty.tools.dotc.core.Constants.
dotty.tools.dotc.typer uses dotty.tools.dotc.core.Constants, so a change to dotty.tools.dotc.core.Constants can break dotty.tools.dotc.typer, while a change to dotty.tools.dotc.typer can't break dotty.tools.dotc.core.Constants.
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.
8→23 dotty.tools.dotc.typer uses dotty.tools.dotc.core.Symbolspart of a loop✕
Connections
20 pairs of types, where a type in dotty.tools.dotc.typer uses a type in dotty.tools.dotc.core.Symbols.
dotty.tools.dotc.typer uses dotty.tools.dotc.core.Symbols, so a change to dotty.tools.dotc.core.Symbols can break dotty.tools.dotc.typer, while a change to dotty.tools.dotc.typer can't break dotty.tools.dotc.core.Symbols.
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.
8→27 dotty.tools.dotc.typer uses dotty.tools.dotc.corepart of a loop✕
Connections
2 pairs of types, where a type in dotty.tools.dotc.typer uses a type in dotty.tools.dotc.core.
dotty.tools.dotc.typer uses dotty.tools.dotc.core, so a change to dotty.tools.dotc.core can break dotty.tools.dotc.typer, while a change to dotty.tools.dotc.typer can't break dotty.tools.dotc.core.
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.
8→29 dotty.tools.dotc.typer uses dotty.tools.dotc.core.Contextspart of a loop✕
Connections
36 pairs of types, where a type in dotty.tools.dotc.typer uses a type in dotty.tools.dotc.core.Contexts. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dotty.tools.dotc.typer uses dotty.tools.dotc.core.Contexts, so a change to dotty.tools.dotc.core.Contexts can break dotty.tools.dotc.typer, while a change to dotty.tools.dotc.typer can't break dotty.tools.dotc.core.Contexts.
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.
8→30 dotty.tools.dotc.typer uses dotty.tools.dotc.ast.untpdpart of a loop✕
Connections
5 pairs of types, where a type in dotty.tools.dotc.typer uses a type in dotty.tools.dotc.ast.untpd.
dotty.tools.dotc.typer uses dotty.tools.dotc.ast.untpd, so a change to dotty.tools.dotc.ast.untpd can break dotty.tools.dotc.typer, while a change to dotty.tools.dotc.typer can't break dotty.tools.dotc.ast.untpd.
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.
8→32 dotty.tools.dotc.typer uses dotty.tools.dotc.astpart of a loop✕
Connections
2 pairs of types, where a type in dotty.tools.dotc.typer uses a type in dotty.tools.dotc.ast.
dotty.tools.dotc.typer uses dotty.tools.dotc.ast, so a change to dotty.tools.dotc.ast can break dotty.tools.dotc.typer, while a change to dotty.tools.dotc.typer can't break dotty.tools.dotc.ast.
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.
8→33 dotty.tools.dotc.typer uses dotty.tools.dotc.ast.Treespart of a loop✕
Connections
118 pairs of types, where a type in dotty.tools.dotc.typer uses a type in dotty.tools.dotc.ast.Trees. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dotty.tools.dotc.typer uses dotty.tools.dotc.ast.Trees, so a change to dotty.tools.dotc.ast.Trees can break dotty.tools.dotc.typer, while a change to dotty.tools.dotc.typer can't break dotty.tools.dotc.ast.Trees.
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.
8→35 dotty.tools.dotc.typer uses dotty.tools.dotcpart of a loop✕
Connections
1 pair of types, where a type in dotty.tools.dotc.typer uses a type in dotty.tools.dotc.
dotty.tools.dotc.typer uses dotty.tools.dotc, so a change to dotty.tools.dotc can break dotty.tools.dotc.typer, while a change to dotty.tools.dotc.typer can't break dotty.tools.dotc.
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.
dotty.tools.dotc.transform uses dotty.tools.dotc.interactive.Interactive.Include, so a change to dotty.tools.dotc.interactive.Interactive.Include can break dotty.tools.dotc.transform, while a change to dotty.tools.dotc.transform can't break dotty.tools.dotc.interactive.Interactive.Include.
Position
Below the diagonal: dotty.tools.dotc.transform uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.transform uses dotty.tools.dotc.util.Spans, so a change to dotty.tools.dotc.util.Spans can break dotty.tools.dotc.transform, while a change to dotty.tools.dotc.transform can't break dotty.tools.dotc.util.Spans.
Position
Below the diagonal: dotty.tools.dotc.transform uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.transform uses scala.collection.mutable, so a change to scala.collection.mutable can break dotty.tools.dotc.transform, while a change to dotty.tools.dotc.transform can't break scala.collection.mutable.
Position
Below the diagonal: dotty.tools.dotc.transform uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.transform uses dotty.tools.dotc.util, so a change to dotty.tools.dotc.util can break dotty.tools.dotc.transform, while a change to dotty.tools.dotc.transform can't break dotty.tools.dotc.util.
Position
Below the diagonal: dotty.tools.dotc.transform uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.transform uses scala.quoted.runtime.impl.QuotesImpl.reflect, so a change to scala.quoted.runtime.impl.QuotesImpl.reflect can break dotty.tools.dotc.transform, while a change to dotty.tools.dotc.transform can't break scala.quoted.runtime.impl.QuotesImpl.reflect.
Position
Below the diagonal: dotty.tools.dotc.transform uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.transform uses dotty.tools.dotc.typer, so a change to dotty.tools.dotc.typer can break dotty.tools.dotc.transform, while a change to dotty.tools.dotc.transform can't break dotty.tools.dotc.typer.
Position
Below the diagonal: dotty.tools.dotc.transform uses a module listed above it, which is the healthy direction.
9→10 dotty.tools.dotc.transform uses dotty.tools.dotc.core.Phasespart of a loop✕
Connections
7 pairs of types, where a type in dotty.tools.dotc.transform uses a type in dotty.tools.dotc.core.Phases.
dotty.tools.dotc.transform uses dotty.tools.dotc.core.Phases, so a change to dotty.tools.dotc.core.Phases can break dotty.tools.dotc.transform, while a change to dotty.tools.dotc.transform can't break dotty.tools.dotc.core.Phases.
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.
9→13 dotty.tools.dotc.transform uses scalapart of a loop✕
Connections
88 pairs of types, where a type in dotty.tools.dotc.transform uses a type in scala. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dotty.tools.dotc.transform uses scala, so a change to scala can break dotty.tools.dotc.transform, while a change to dotty.tools.dotc.transform can't break scala.
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.
9→17 dotty.tools.dotc.transform uses dotty.tools.dotc.core.Namespart of a loop✕
Connections
10 pairs of types, where a type in dotty.tools.dotc.transform uses a type in dotty.tools.dotc.core.Names.
dotty.tools.dotc.transform uses dotty.tools.dotc.core.Names, so a change to dotty.tools.dotc.core.Names can break dotty.tools.dotc.transform, while a change to dotty.tools.dotc.transform can't break dotty.tools.dotc.core.Names.
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.
9→18 dotty.tools.dotc.transform uses dotty.tools.dotc.core.Denotationspart of a loop✕
Connections
3 pairs of types, where a type in dotty.tools.dotc.transform uses a type in dotty.tools.dotc.core.Denotations.
dotty.tools.dotc.transform uses dotty.tools.dotc.core.Denotations, so a change to dotty.tools.dotc.core.Denotations can break dotty.tools.dotc.transform, while a change to dotty.tools.dotc.transform can't break dotty.tools.dotc.core.Denotations.
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.
9→19 dotty.tools.dotc.transform uses dotty.tools.dotc.core.Typespart of a loop✕
Connections
23 pairs of types, where a type in dotty.tools.dotc.transform uses a type in dotty.tools.dotc.core.Types.
dotty.tools.dotc.transform uses dotty.tools.dotc.core.Types, so a change to dotty.tools.dotc.core.Types can break dotty.tools.dotc.transform, while a change to dotty.tools.dotc.transform can't break dotty.tools.dotc.core.Types.
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.
9→21 dotty.tools.dotc.transform uses dotty.tools.dotc.core.Annotationspart of a loop✕
Connections
2 pairs of types, where a type in dotty.tools.dotc.transform uses a type in dotty.tools.dotc.core.Annotations.
dotty.tools.dotc.transform uses dotty.tools.dotc.core.Annotations, so a change to dotty.tools.dotc.core.Annotations can break dotty.tools.dotc.transform, while a change to dotty.tools.dotc.transform can't break dotty.tools.dotc.core.Annotations.
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.
9→22 dotty.tools.dotc.transform uses dotty.tools.dotc.core.SymDenotationspart of a loop✕
Connections
8 pairs of types, where a type in dotty.tools.dotc.transform uses a type in dotty.tools.dotc.core.SymDenotations.
dotty.tools.dotc.transform uses dotty.tools.dotc.core.SymDenotations, so a change to dotty.tools.dotc.core.SymDenotations can break dotty.tools.dotc.transform, while a change to dotty.tools.dotc.transform can't break dotty.tools.dotc.core.SymDenotations.
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.
9→23 dotty.tools.dotc.transform uses dotty.tools.dotc.core.Symbolspart of a loop✕
Connections
47 pairs of types, where a type in dotty.tools.dotc.transform uses a type in dotty.tools.dotc.core.Symbols. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dotty.tools.dotc.transform uses dotty.tools.dotc.core.Symbols, so a change to dotty.tools.dotc.core.Symbols can break dotty.tools.dotc.transform, while a change to dotty.tools.dotc.transform can't break dotty.tools.dotc.core.Symbols.
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.
9→28 dotty.tools.dotc.transform uses dotty.tools.dotc.configpart of a loop✕
Connections
1 pair of types, where a type in dotty.tools.dotc.transform uses a type in dotty.tools.dotc.config.
dotty.tools.dotc.transform uses dotty.tools.dotc.config, so a change to dotty.tools.dotc.config can break dotty.tools.dotc.transform, while a change to dotty.tools.dotc.transform can't break dotty.tools.dotc.config.
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.
9→29 dotty.tools.dotc.transform uses dotty.tools.dotc.core.Contextspart of a loop✕
Connections
89 pairs of types, where a type in dotty.tools.dotc.transform uses a type in dotty.tools.dotc.core.Contexts. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dotty.tools.dotc.transform uses dotty.tools.dotc.core.Contexts, so a change to dotty.tools.dotc.core.Contexts can break dotty.tools.dotc.transform, while a change to dotty.tools.dotc.transform can't break dotty.tools.dotc.core.Contexts.
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.
9→33 dotty.tools.dotc.transform uses dotty.tools.dotc.ast.Treespart of a loop✕
Connections
189 pairs of types, where a type in dotty.tools.dotc.transform uses a type in dotty.tools.dotc.ast.Trees. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dotty.tools.dotc.transform uses dotty.tools.dotc.ast.Trees, so a change to dotty.tools.dotc.ast.Trees can break dotty.tools.dotc.transform, while a change to dotty.tools.dotc.transform can't break dotty.tools.dotc.ast.Trees.
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.
9→35 dotty.tools.dotc.transform uses dotty.tools.dotcpart of a loop✕
Connections
2 pairs of types, where a type in dotty.tools.dotc.transform uses a type in dotty.tools.dotc.
dotty.tools.dotc.transform uses dotty.tools.dotc, so a change to dotty.tools.dotc can break dotty.tools.dotc.transform, while a change to dotty.tools.dotc.transform can't break dotty.tools.dotc.
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.
9→37 dotty.tools.dotc.transform uses dotty.tools.backend.jvmpart of a loop✕
Connections
1 pair of types, where a type in dotty.tools.dotc.transform uses a type in dotty.tools.backend.jvm.
dotty.tools.dotc.transform uses dotty.tools.backend.jvm, so a change to dotty.tools.backend.jvm can break dotty.tools.dotc.transform, while a change to dotty.tools.dotc.transform can't break dotty.tools.backend.jvm.
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.
dotty.tools.dotc.core.Phases uses dotty.tools.dotc.interactive.Interactive.Include, so a change to dotty.tools.dotc.interactive.Interactive.Include can break dotty.tools.dotc.core.Phases, while a change to dotty.tools.dotc.core.Phases can't break dotty.tools.dotc.interactive.Interactive.Include.
Position
Below the diagonal: dotty.tools.dotc.core.Phases uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Phases uses dotty.tools.dotc.transform, so a change to dotty.tools.dotc.transform can break dotty.tools.dotc.core.Phases, while a change to dotty.tools.dotc.core.Phases can't break dotty.tools.dotc.transform.
Position
Below the diagonal: dotty.tools.dotc.core.Phases uses a module listed above it, which is the healthy direction.
10→13 dotty.tools.dotc.core.Phases uses scalapart of a loop✕
Connections
8 pairs of types, where a type in dotty.tools.dotc.core.Phases uses a type in scala.
dotty.tools.dotc.core.Phases uses scala, so a change to scala can break dotty.tools.dotc.core.Phases, while a change to dotty.tools.dotc.core.Phases can't break scala.
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.
10→18 dotty.tools.dotc.core.Phases uses dotty.tools.dotc.core.Denotationspart of a loop✕
Connections
1 pair of types, where a type in dotty.tools.dotc.core.Phases uses a type in dotty.tools.dotc.core.Denotations.
dotty.tools.dotc.core.Phases uses dotty.tools.dotc.core.Denotations, so a change to dotty.tools.dotc.core.Denotations can break dotty.tools.dotc.core.Phases, while a change to dotty.tools.dotc.core.Phases can't break dotty.tools.dotc.core.Denotations.
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.
10→29 dotty.tools.dotc.core.Phases uses dotty.tools.dotc.core.Contextspart of a loop✕
Connections
6 pairs of types, where a type in dotty.tools.dotc.core.Phases uses a type in dotty.tools.dotc.core.Contexts.
dotty.tools.dotc.core.Phases uses dotty.tools.dotc.core.Contexts, so a change to dotty.tools.dotc.core.Contexts can break dotty.tools.dotc.core.Phases, while a change to dotty.tools.dotc.core.Phases can't break dotty.tools.dotc.core.Contexts.
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.
10→33 dotty.tools.dotc.core.Phases uses dotty.tools.dotc.ast.Treespart of a loop✕
Connections
1 pair of types, where a type in dotty.tools.dotc.core.Phases uses a type in dotty.tools.dotc.ast.Trees.
dotty.tools.dotc.core.Phases uses dotty.tools.dotc.ast.Trees, so a change to dotty.tools.dotc.ast.Trees can break dotty.tools.dotc.core.Phases, while a change to dotty.tools.dotc.core.Phases can't break dotty.tools.dotc.ast.Trees.
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.
10→35 dotty.tools.dotc.core.Phases uses dotty.tools.dotcpart of a loop✕
Connections
1 pair of types, where a type in dotty.tools.dotc.core.Phases uses a type in dotty.tools.dotc.
dotty.tools.dotc.core.Phases uses dotty.tools.dotc, so a change to dotty.tools.dotc can break dotty.tools.dotc.core.Phases, while a change to dotty.tools.dotc.core.Phases can't break dotty.tools.dotc.
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.
dotty.tools.dotc.transform.init uses dotty.tools.dotc.interactive.Interactive.Include, so a change to dotty.tools.dotc.interactive.Interactive.Include can break dotty.tools.dotc.transform.init, while a change to dotty.tools.dotc.transform.init can't break dotty.tools.dotc.interactive.Interactive.Include.
Position
Below the diagonal: dotty.tools.dotc.transform.init uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.transform.init uses dotty.tools.dotc.util, so a change to dotty.tools.dotc.util can break dotty.tools.dotc.transform.init, while a change to dotty.tools.dotc.transform.init can't break dotty.tools.dotc.util.
Position
Below the diagonal: dotty.tools.dotc.transform.init uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.transform.init uses dotty.tools.dotc.reporting, so a change to dotty.tools.dotc.reporting can break dotty.tools.dotc.transform.init, while a change to dotty.tools.dotc.transform.init can't break dotty.tools.dotc.reporting.
Position
Below the diagonal: dotty.tools.dotc.transform.init uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.transform.init uses dotty.tools.dotc.core.Phases, so a change to dotty.tools.dotc.core.Phases can break dotty.tools.dotc.transform.init, while a change to dotty.tools.dotc.transform.init can't break dotty.tools.dotc.core.Phases.
Position
Below the diagonal: dotty.tools.dotc.transform.init uses a module listed above it, which is the healthy direction.
11→12 dotty.tools.dotc.transform.init uses dotty.tools.dotc.transform.init.Objectspart of a loop✕
Connections
3 pairs of types, where a type in dotty.tools.dotc.transform.init uses a type in dotty.tools.dotc.transform.init.Objects.
dotty.tools.dotc.transform.init uses dotty.tools.dotc.transform.init.Objects, so a change to dotty.tools.dotc.transform.init.Objects can break dotty.tools.dotc.transform.init, while a change to dotty.tools.dotc.transform.init can't break dotty.tools.dotc.transform.init.Objects.
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.
11→13 dotty.tools.dotc.transform.init uses scalapart of a loop✕
Connections
10 pairs of types, where a type in dotty.tools.dotc.transform.init uses a type in scala.
dotty.tools.dotc.transform.init uses scala, so a change to scala can break dotty.tools.dotc.transform.init, while a change to dotty.tools.dotc.transform.init can't break scala.
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.
11→15 dotty.tools.dotc.transform.init uses dotty.tools.dotc.core.Scopespart of a loop✕
Connections
1 pair of types, where a type in dotty.tools.dotc.transform.init uses a type in dotty.tools.dotc.core.Scopes.
dotty.tools.dotc.transform.init uses dotty.tools.dotc.core.Scopes, so a change to dotty.tools.dotc.core.Scopes can break dotty.tools.dotc.transform.init, while a change to dotty.tools.dotc.transform.init can't break dotty.tools.dotc.core.Scopes.
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.
11→19 dotty.tools.dotc.transform.init uses dotty.tools.dotc.core.Typespart of a loop✕
Connections
6 pairs of types, where a type in dotty.tools.dotc.transform.init uses a type in dotty.tools.dotc.core.Types.
dotty.tools.dotc.transform.init uses dotty.tools.dotc.core.Types, so a change to dotty.tools.dotc.core.Types can break dotty.tools.dotc.transform.init, while a change to dotty.tools.dotc.transform.init can't break dotty.tools.dotc.core.Types.
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.
11→23 dotty.tools.dotc.transform.init uses dotty.tools.dotc.core.Symbolspart of a loop✕
Connections
5 pairs of types, where a type in dotty.tools.dotc.transform.init uses a type in dotty.tools.dotc.core.Symbols.
dotty.tools.dotc.transform.init uses dotty.tools.dotc.core.Symbols, so a change to dotty.tools.dotc.core.Symbols can break dotty.tools.dotc.transform.init, while a change to dotty.tools.dotc.transform.init can't break dotty.tools.dotc.core.Symbols.
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.
11→28 dotty.tools.dotc.transform.init uses dotty.tools.dotc.configpart of a loop✕
Connections
1 pair of types, where a type in dotty.tools.dotc.transform.init uses a type in dotty.tools.dotc.config.
dotty.tools.dotc.transform.init uses dotty.tools.dotc.config, so a change to dotty.tools.dotc.config can break dotty.tools.dotc.transform.init, while a change to dotty.tools.dotc.transform.init can't break dotty.tools.dotc.config.
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.
11→29 dotty.tools.dotc.transform.init uses dotty.tools.dotc.core.Contextspart of a loop✕
Connections
6 pairs of types, where a type in dotty.tools.dotc.transform.init uses a type in dotty.tools.dotc.core.Contexts.
dotty.tools.dotc.transform.init uses dotty.tools.dotc.core.Contexts, so a change to dotty.tools.dotc.core.Contexts can break dotty.tools.dotc.transform.init, while a change to dotty.tools.dotc.transform.init can't break dotty.tools.dotc.core.Contexts.
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.
11→33 dotty.tools.dotc.transform.init uses dotty.tools.dotc.ast.Treespart of a loop✕
Connections
7 pairs of types, where a type in dotty.tools.dotc.transform.init uses a type in dotty.tools.dotc.ast.Trees.
dotty.tools.dotc.transform.init uses dotty.tools.dotc.ast.Trees, so a change to dotty.tools.dotc.ast.Trees can break dotty.tools.dotc.transform.init, while a change to dotty.tools.dotc.transform.init can't break dotty.tools.dotc.ast.Trees.
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.
11→35 dotty.tools.dotc.transform.init uses dotty.tools.dotcpart of a loop✕
Connections
1 pair of types, where a type in dotty.tools.dotc.transform.init uses a type in dotty.tools.dotc.
dotty.tools.dotc.transform.init uses dotty.tools.dotc, so a change to dotty.tools.dotc can break dotty.tools.dotc.transform.init, while a change to dotty.tools.dotc.transform.init can't break dotty.tools.dotc.
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.
dotty.tools.dotc.transform.init.Objects uses dotty.tools.dotc.interactive.Interactive.Include, so a change to dotty.tools.dotc.interactive.Interactive.Include can break dotty.tools.dotc.transform.init.Objects, while a change to dotty.tools.dotc.transform.init.Objects can't break dotty.tools.dotc.interactive.Interactive.Include.
Position
Below the diagonal: dotty.tools.dotc.transform.init.Objects uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.transform.init.Objects uses dotty.tools.dotc.util, so a change to dotty.tools.dotc.util can break dotty.tools.dotc.transform.init.Objects, while a change to dotty.tools.dotc.transform.init.Objects can't break dotty.tools.dotc.util.
Position
Below the diagonal: dotty.tools.dotc.transform.init.Objects uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.transform.init.Objects uses dotty.tools.dotc.transform.init, so a change to dotty.tools.dotc.transform.init can break dotty.tools.dotc.transform.init.Objects, while a change to dotty.tools.dotc.transform.init.Objects can't break dotty.tools.dotc.transform.init.
Position
Below the diagonal: dotty.tools.dotc.transform.init.Objects uses a module listed above it, which is the healthy direction.
12→13 dotty.tools.dotc.transform.init.Objects uses scalapart of a loop✕
Connections
12 pairs of types, where a type in dotty.tools.dotc.transform.init.Objects uses a type in scala.
dotty.tools.dotc.transform.init.Objects uses scala, so a change to scala can break dotty.tools.dotc.transform.init.Objects, while a change to dotty.tools.dotc.transform.init.Objects can't break scala.
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→15 dotty.tools.dotc.transform.init.Objects uses dotty.tools.dotc.core.Scopespart of a loop✕
Connections
3 pairs of types, where a type in dotty.tools.dotc.transform.init.Objects uses a type in dotty.tools.dotc.core.Scopes.
dotty.tools.dotc.transform.init.Objects uses dotty.tools.dotc.core.Scopes, so a change to dotty.tools.dotc.core.Scopes can break dotty.tools.dotc.transform.init.Objects, while a change to dotty.tools.dotc.transform.init.Objects can't break dotty.tools.dotc.core.Scopes.
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→23 dotty.tools.dotc.transform.init.Objects uses dotty.tools.dotc.core.Symbolspart of a loop✕
Connections
16 pairs of types, where a type in dotty.tools.dotc.transform.init.Objects uses a type in dotty.tools.dotc.core.Symbols.
dotty.tools.dotc.transform.init.Objects uses dotty.tools.dotc.core.Symbols, so a change to dotty.tools.dotc.core.Symbols can break dotty.tools.dotc.transform.init.Objects, while a change to dotty.tools.dotc.transform.init.Objects can't break dotty.tools.dotc.core.Symbols.
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→29 dotty.tools.dotc.transform.init.Objects uses dotty.tools.dotc.core.Contextspart of a loop✕
Connections
15 pairs of types, where a type in dotty.tools.dotc.transform.init.Objects uses a type in dotty.tools.dotc.core.Contexts.
dotty.tools.dotc.transform.init.Objects uses dotty.tools.dotc.core.Contexts, so a change to dotty.tools.dotc.core.Contexts can break dotty.tools.dotc.transform.init.Objects, while a change to dotty.tools.dotc.transform.init.Objects can't break dotty.tools.dotc.core.Contexts.
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→33 dotty.tools.dotc.transform.init.Objects uses dotty.tools.dotc.ast.Treespart of a loop✕
Connections
4 pairs of types, where a type in dotty.tools.dotc.transform.init.Objects uses a type in dotty.tools.dotc.ast.Trees.
dotty.tools.dotc.transform.init.Objects uses dotty.tools.dotc.ast.Trees, so a change to dotty.tools.dotc.ast.Trees can break dotty.tools.dotc.transform.init.Objects, while a change to dotty.tools.dotc.transform.init.Objects can't break dotty.tools.dotc.ast.Trees.
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.
scala uses scala.collection.mutable, so a change to scala.collection.mutable can break scala, while a change to scala can't break scala.collection.mutable.
Position
Below the diagonal: scala uses a module listed above it, which is the healthy direction.
scala uses dotty.tools.dotc.transform.init.Objects, so a change to dotty.tools.dotc.transform.init.Objects can break scala, while a change to scala can't break dotty.tools.dotc.transform.init.Objects.
Position
Below the diagonal: scala uses a module listed above it, which is the healthy direction.
13→21 scala uses dotty.tools.dotc.core.Annotationspart of a loop✕
Connections
2 pairs of types, where a type in scala uses a type in dotty.tools.dotc.core.Annotations.
scala uses dotty.tools.dotc.core.Annotations, so a change to dotty.tools.dotc.core.Annotations can break scala, while a change to scala can't break dotty.tools.dotc.core.Annotations.
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→23 scala uses dotty.tools.dotc.core.Symbolspart of a loop✕
Connections
1 pair of types, where a type in scala uses a type in dotty.tools.dotc.core.Symbols.
scala uses dotty.tools.dotc.core.Symbols, so a change to dotty.tools.dotc.core.Symbols can break scala, while a change to scala can't break dotty.tools.dotc.core.Symbols.
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.
dotty.tools.dotc.printing.Texts uses scala, so a change to scala can break dotty.tools.dotc.printing.Texts, while a change to dotty.tools.dotc.printing.Texts can't break scala.
Position
Below the diagonal: dotty.tools.dotc.printing.Texts uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Scopes uses scala, so a change to scala can break dotty.tools.dotc.core.Scopes, while a change to dotty.tools.dotc.core.Scopes can't break scala.
Position
Below the diagonal: dotty.tools.dotc.core.Scopes uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Scopes uses dotty.tools.dotc.printing.Texts, so a change to dotty.tools.dotc.printing.Texts can break dotty.tools.dotc.core.Scopes, while a change to dotty.tools.dotc.core.Scopes can't break dotty.tools.dotc.printing.Texts.
Position
Below the diagonal: dotty.tools.dotc.core.Scopes uses a module listed above it, which is the healthy direction.
15→16 dotty.tools.dotc.core.Scopes uses dotty.tools.dotc.printingpart of a loop✕
Connections
1 pair of types, where a type in dotty.tools.dotc.core.Scopes uses a type in dotty.tools.dotc.printing.
dotty.tools.dotc.core.Scopes uses dotty.tools.dotc.printing, so a change to dotty.tools.dotc.printing can break dotty.tools.dotc.core.Scopes, while a change to dotty.tools.dotc.core.Scopes can't break dotty.tools.dotc.printing.
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.
15→17 dotty.tools.dotc.core.Scopes uses dotty.tools.dotc.core.Namespart of a loop✕
Connections
4 pairs of types, where a type in dotty.tools.dotc.core.Scopes uses a type in dotty.tools.dotc.core.Names.
dotty.tools.dotc.core.Scopes uses dotty.tools.dotc.core.Names, so a change to dotty.tools.dotc.core.Names can break dotty.tools.dotc.core.Scopes, while a change to dotty.tools.dotc.core.Scopes can't break dotty.tools.dotc.core.Names.
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.
15→18 dotty.tools.dotc.core.Scopes uses dotty.tools.dotc.core.Denotationspart of a loop✕
Connections
1 pair of types, where a type in dotty.tools.dotc.core.Scopes uses a type in dotty.tools.dotc.core.Denotations.
dotty.tools.dotc.core.Scopes uses dotty.tools.dotc.core.Denotations, so a change to dotty.tools.dotc.core.Denotations can break dotty.tools.dotc.core.Scopes, while a change to dotty.tools.dotc.core.Scopes can't break dotty.tools.dotc.core.Denotations.
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.
15→19 dotty.tools.dotc.core.Scopes uses dotty.tools.dotc.core.Typespart of a loop✕
Connections
2 pairs of types, where a type in dotty.tools.dotc.core.Scopes uses a type in dotty.tools.dotc.core.Types.
dotty.tools.dotc.core.Scopes uses dotty.tools.dotc.core.Types, so a change to dotty.tools.dotc.core.Types can break dotty.tools.dotc.core.Scopes, while a change to dotty.tools.dotc.core.Scopes can't break dotty.tools.dotc.core.Types.
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.
15→23 dotty.tools.dotc.core.Scopes uses dotty.tools.dotc.core.Symbolspart of a loop✕
Connections
4 pairs of types, where a type in dotty.tools.dotc.core.Scopes uses a type in dotty.tools.dotc.core.Symbols.
dotty.tools.dotc.core.Scopes uses dotty.tools.dotc.core.Symbols, so a change to dotty.tools.dotc.core.Symbols can break dotty.tools.dotc.core.Scopes, while a change to dotty.tools.dotc.core.Scopes can't break dotty.tools.dotc.core.Symbols.
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.
15→29 dotty.tools.dotc.core.Scopes uses dotty.tools.dotc.core.Contextspart of a loop✕
Connections
3 pairs of types, where a type in dotty.tools.dotc.core.Scopes uses a type in dotty.tools.dotc.core.Contexts.
dotty.tools.dotc.core.Scopes uses dotty.tools.dotc.core.Contexts, so a change to dotty.tools.dotc.core.Contexts can break dotty.tools.dotc.core.Scopes, while a change to dotty.tools.dotc.core.Scopes can't break dotty.tools.dotc.core.Contexts.
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.
dotty.tools.dotc.printing uses dotty.tools.dotc.interactive.Interactive.Include, so a change to dotty.tools.dotc.interactive.Interactive.Include can break dotty.tools.dotc.printing, while a change to dotty.tools.dotc.printing can't break dotty.tools.dotc.interactive.Interactive.Include.
Position
Below the diagonal: dotty.tools.dotc.printing uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.printing uses scala.collection.mutable, so a change to scala.collection.mutable can break dotty.tools.dotc.printing, while a change to dotty.tools.dotc.printing can't break scala.collection.mutable.
Position
Below the diagonal: dotty.tools.dotc.printing uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.printing uses dotty.tools.dotc.util, so a change to dotty.tools.dotc.util can break dotty.tools.dotc.printing, while a change to dotty.tools.dotc.printing can't break dotty.tools.dotc.util.
Position
Below the diagonal: dotty.tools.dotc.printing uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.printing uses scala.quoted.runtime.impl.QuotesImpl.reflect, so a change to scala.quoted.runtime.impl.QuotesImpl.reflect can break dotty.tools.dotc.printing, while a change to dotty.tools.dotc.printing can't break scala.quoted.runtime.impl.QuotesImpl.reflect.
Position
Below the diagonal: dotty.tools.dotc.printing uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.printing uses dotty.tools.dotc.typer, so a change to dotty.tools.dotc.typer can break dotty.tools.dotc.printing, while a change to dotty.tools.dotc.printing can't break dotty.tools.dotc.typer.
Position
Below the diagonal: dotty.tools.dotc.printing uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.printing uses scala, so a change to scala can break dotty.tools.dotc.printing, while a change to dotty.tools.dotc.printing can't break scala.
Position
Below the diagonal: dotty.tools.dotc.printing uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.printing uses dotty.tools.dotc.printing.Texts, so a change to dotty.tools.dotc.printing.Texts can break dotty.tools.dotc.printing, while a change to dotty.tools.dotc.printing can't break dotty.tools.dotc.printing.Texts.
Position
Below the diagonal: dotty.tools.dotc.printing uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.printing uses dotty.tools.dotc.core.Scopes, so a change to dotty.tools.dotc.core.Scopes can break dotty.tools.dotc.printing, while a change to dotty.tools.dotc.printing can't break dotty.tools.dotc.core.Scopes.
Position
Below the diagonal: dotty.tools.dotc.printing uses a module listed above it, which is the healthy direction.
16→17 dotty.tools.dotc.printing uses dotty.tools.dotc.core.Namespart of a loop✕
Connections
4 pairs of types, where a type in dotty.tools.dotc.printing uses a type in dotty.tools.dotc.core.Names.
dotty.tools.dotc.printing uses dotty.tools.dotc.core.Names, so a change to dotty.tools.dotc.core.Names can break dotty.tools.dotc.printing, while a change to dotty.tools.dotc.printing can't break dotty.tools.dotc.core.Names.
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→18 dotty.tools.dotc.printing uses dotty.tools.dotc.core.Denotationspart of a loop✕
Connections
5 pairs of types, where a type in dotty.tools.dotc.printing uses a type in dotty.tools.dotc.core.Denotations.
dotty.tools.dotc.printing uses dotty.tools.dotc.core.Denotations, so a change to dotty.tools.dotc.core.Denotations can break dotty.tools.dotc.printing, while a change to dotty.tools.dotc.printing can't break dotty.tools.dotc.core.Denotations.
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→19 dotty.tools.dotc.printing uses dotty.tools.dotc.core.Typespart of a loop✕
Connections
25 pairs of types, where a type in dotty.tools.dotc.printing uses a type in dotty.tools.dotc.core.Types.
dotty.tools.dotc.printing uses dotty.tools.dotc.core.Types, so a change to dotty.tools.dotc.core.Types can break dotty.tools.dotc.printing, while a change to dotty.tools.dotc.printing can't break dotty.tools.dotc.core.Types.
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→20 dotty.tools.dotc.printing uses dotty.tools.dotc.core.Constantspart of a loop✕
Connections
3 pairs of types, where a type in dotty.tools.dotc.printing uses a type in dotty.tools.dotc.core.Constants.
dotty.tools.dotc.printing uses dotty.tools.dotc.core.Constants, so a change to dotty.tools.dotc.core.Constants can break dotty.tools.dotc.printing, while a change to dotty.tools.dotc.printing can't break dotty.tools.dotc.core.Constants.
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→21 dotty.tools.dotc.printing uses dotty.tools.dotc.core.Annotationspart of a loop✕
Connections
3 pairs of types, where a type in dotty.tools.dotc.printing uses a type in dotty.tools.dotc.core.Annotations.
dotty.tools.dotc.printing uses dotty.tools.dotc.core.Annotations, so a change to dotty.tools.dotc.core.Annotations can break dotty.tools.dotc.printing, while a change to dotty.tools.dotc.printing can't break dotty.tools.dotc.core.Annotations.
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→23 dotty.tools.dotc.printing uses dotty.tools.dotc.core.Symbolspart of a loop✕
Connections
6 pairs of types, where a type in dotty.tools.dotc.printing uses a type in dotty.tools.dotc.core.Symbols.
dotty.tools.dotc.printing uses dotty.tools.dotc.core.Symbols, so a change to dotty.tools.dotc.core.Symbols can break dotty.tools.dotc.printing, while a change to dotty.tools.dotc.printing can't break dotty.tools.dotc.core.Symbols.
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→24 dotty.tools.dotc.printing uses dotty.tools.dotc.cc.Capabilitiespart of a loop✕
Connections
2 pairs of types, where a type in dotty.tools.dotc.printing uses a type in dotty.tools.dotc.cc.Capabilities.
dotty.tools.dotc.printing uses dotty.tools.dotc.cc.Capabilities, so a change to dotty.tools.dotc.cc.Capabilities can break dotty.tools.dotc.printing, while a change to dotty.tools.dotc.printing can't break dotty.tools.dotc.cc.Capabilities.
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→26 dotty.tools.dotc.printing uses dotty.tools.dotc.ccpart of a loop✕
Connections
2 pairs of types, where a type in dotty.tools.dotc.printing uses a type in dotty.tools.dotc.cc.
dotty.tools.dotc.printing uses dotty.tools.dotc.cc, so a change to dotty.tools.dotc.cc can break dotty.tools.dotc.printing, while a change to dotty.tools.dotc.printing can't break dotty.tools.dotc.cc.
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→27 dotty.tools.dotc.printing uses dotty.tools.dotc.corepart of a loop✕
Connections
4 pairs of types, where a type in dotty.tools.dotc.printing uses a type in dotty.tools.dotc.core.
dotty.tools.dotc.printing uses dotty.tools.dotc.core, so a change to dotty.tools.dotc.core can break dotty.tools.dotc.printing, while a change to dotty.tools.dotc.printing can't break dotty.tools.dotc.core.
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→29 dotty.tools.dotc.printing uses dotty.tools.dotc.core.Contextspart of a loop✕
Connections
11 pairs of types, where a type in dotty.tools.dotc.printing uses a type in dotty.tools.dotc.core.Contexts.
dotty.tools.dotc.printing uses dotty.tools.dotc.core.Contexts, so a change to dotty.tools.dotc.core.Contexts can break dotty.tools.dotc.printing, while a change to dotty.tools.dotc.printing can't break dotty.tools.dotc.core.Contexts.
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→30 dotty.tools.dotc.printing uses dotty.tools.dotc.ast.untpdpart of a loop✕
Connections
1 pair of types, where a type in dotty.tools.dotc.printing uses a type in dotty.tools.dotc.ast.untpd.
dotty.tools.dotc.printing uses dotty.tools.dotc.ast.untpd, so a change to dotty.tools.dotc.ast.untpd can break dotty.tools.dotc.printing, while a change to dotty.tools.dotc.printing can't break dotty.tools.dotc.ast.untpd.
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→33 dotty.tools.dotc.printing uses dotty.tools.dotc.ast.Treespart of a loop✕
Connections
11 pairs of types, where a type in dotty.tools.dotc.printing uses a type in dotty.tools.dotc.ast.Trees.
dotty.tools.dotc.printing uses dotty.tools.dotc.ast.Trees, so a change to dotty.tools.dotc.ast.Trees can break dotty.tools.dotc.printing, while a change to dotty.tools.dotc.printing can't break dotty.tools.dotc.ast.Trees.
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.
dotty.tools.dotc.core.Names uses scala, so a change to scala can break dotty.tools.dotc.core.Names, while a change to dotty.tools.dotc.core.Names can't break scala.
Position
Below the diagonal: dotty.tools.dotc.core.Names uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Names uses dotty.tools.dotc.printing.Texts, so a change to dotty.tools.dotc.printing.Texts can break dotty.tools.dotc.core.Names, while a change to dotty.tools.dotc.core.Names can't break dotty.tools.dotc.printing.Texts.
Position
Below the diagonal: dotty.tools.dotc.core.Names uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Names uses dotty.tools.dotc.printing, so a change to dotty.tools.dotc.printing can break dotty.tools.dotc.core.Names, while a change to dotty.tools.dotc.core.Names can't break dotty.tools.dotc.printing.
Position
Below the diagonal: dotty.tools.dotc.core.Names uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Denotations uses scala, so a change to scala can break dotty.tools.dotc.core.Denotations, while a change to dotty.tools.dotc.core.Denotations can't break scala.
Position
Below the diagonal: dotty.tools.dotc.core.Denotations uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Denotations uses dotty.tools.dotc.printing.Texts, so a change to dotty.tools.dotc.printing.Texts can break dotty.tools.dotc.core.Denotations, while a change to dotty.tools.dotc.core.Denotations can't break dotty.tools.dotc.printing.Texts.
Position
Below the diagonal: dotty.tools.dotc.core.Denotations uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Denotations uses dotty.tools.dotc.printing, so a change to dotty.tools.dotc.printing can break dotty.tools.dotc.core.Denotations, while a change to dotty.tools.dotc.core.Denotations can't break dotty.tools.dotc.printing.
Position
Below the diagonal: dotty.tools.dotc.core.Denotations uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Denotations uses dotty.tools.dotc.core.Names, so a change to dotty.tools.dotc.core.Names can break dotty.tools.dotc.core.Denotations, while a change to dotty.tools.dotc.core.Denotations can't break dotty.tools.dotc.core.Names.
Position
Below the diagonal: dotty.tools.dotc.core.Denotations uses a module listed above it, which is the healthy direction.
18→19 dotty.tools.dotc.core.Denotations uses dotty.tools.dotc.core.Typespart of a loop✕
Connections
12 pairs of types, where a type in dotty.tools.dotc.core.Denotations uses a type in dotty.tools.dotc.core.Types.
dotty.tools.dotc.core.Denotations uses dotty.tools.dotc.core.Types, so a change to dotty.tools.dotc.core.Types can break dotty.tools.dotc.core.Denotations, while a change to dotty.tools.dotc.core.Denotations can't break dotty.tools.dotc.core.Types.
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.
18→22 dotty.tools.dotc.core.Denotations uses dotty.tools.dotc.core.SymDenotationspart of a loop✕
Connections
2 pairs of types, where a type in dotty.tools.dotc.core.Denotations uses a type in dotty.tools.dotc.core.SymDenotations.
dotty.tools.dotc.core.Denotations uses dotty.tools.dotc.core.SymDenotations, so a change to dotty.tools.dotc.core.SymDenotations can break dotty.tools.dotc.core.Denotations, while a change to dotty.tools.dotc.core.Denotations can't break dotty.tools.dotc.core.SymDenotations.
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.
18→23 dotty.tools.dotc.core.Denotations uses dotty.tools.dotc.core.Symbolspart of a loop✕
Connections
9 pairs of types, where a type in dotty.tools.dotc.core.Denotations uses a type in dotty.tools.dotc.core.Symbols.
dotty.tools.dotc.core.Denotations uses dotty.tools.dotc.core.Symbols, so a change to dotty.tools.dotc.core.Symbols can break dotty.tools.dotc.core.Denotations, while a change to dotty.tools.dotc.core.Denotations can't break dotty.tools.dotc.core.Symbols.
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.
18→27 dotty.tools.dotc.core.Denotations uses dotty.tools.dotc.corepart of a loop✕
Connections
5 pairs of types, where a type in dotty.tools.dotc.core.Denotations uses a type in dotty.tools.dotc.core.
dotty.tools.dotc.core.Denotations uses dotty.tools.dotc.core, so a change to dotty.tools.dotc.core can break dotty.tools.dotc.core.Denotations, while a change to dotty.tools.dotc.core.Denotations can't break dotty.tools.dotc.core.
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.
18→29 dotty.tools.dotc.core.Denotations uses dotty.tools.dotc.core.Contextspart of a loop✕
Connections
12 pairs of types, where a type in dotty.tools.dotc.core.Denotations uses a type in dotty.tools.dotc.core.Contexts.
dotty.tools.dotc.core.Denotations uses dotty.tools.dotc.core.Contexts, so a change to dotty.tools.dotc.core.Contexts can break dotty.tools.dotc.core.Denotations, while a change to dotty.tools.dotc.core.Denotations can't break dotty.tools.dotc.core.Contexts.
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.
dotty.tools.dotc.core.Types uses dotty.tools.dotc.interactive.Interactive.Include, so a change to dotty.tools.dotc.interactive.Interactive.Include can break dotty.tools.dotc.core.Types, while a change to dotty.tools.dotc.core.Types can't break dotty.tools.dotc.interactive.Interactive.Include.
Position
Below the diagonal: dotty.tools.dotc.core.Types uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Types uses scala.collection.mutable, so a change to scala.collection.mutable can break dotty.tools.dotc.core.Types, while a change to dotty.tools.dotc.core.Types can't break scala.collection.mutable.
Position
Below the diagonal: dotty.tools.dotc.core.Types uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Types uses dotty.tools.dotc.reporting, so a change to dotty.tools.dotc.reporting can break dotty.tools.dotc.core.Types, while a change to dotty.tools.dotc.core.Types can't break dotty.tools.dotc.reporting.
Position
Below the diagonal: dotty.tools.dotc.core.Types uses a module listed above it, which is the healthy direction.
112 pairs of types, where a type in dotty.tools.dotc.core.Types uses a type in scala. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dotty.tools.dotc.core.Types uses scala, so a change to scala can break dotty.tools.dotc.core.Types, while a change to dotty.tools.dotc.core.Types can't break scala.
Position
Below the diagonal: dotty.tools.dotc.core.Types uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Types uses dotty.tools.dotc.printing.Texts, so a change to dotty.tools.dotc.printing.Texts can break dotty.tools.dotc.core.Types, while a change to dotty.tools.dotc.core.Types can't break dotty.tools.dotc.printing.Texts.
Position
Below the diagonal: dotty.tools.dotc.core.Types uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Types uses dotty.tools.dotc.core.Scopes, so a change to dotty.tools.dotc.core.Scopes can break dotty.tools.dotc.core.Types, while a change to dotty.tools.dotc.core.Types can't break dotty.tools.dotc.core.Scopes.
Position
Below the diagonal: dotty.tools.dotc.core.Types uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Types uses dotty.tools.dotc.printing, so a change to dotty.tools.dotc.printing can break dotty.tools.dotc.core.Types, while a change to dotty.tools.dotc.core.Types can't break dotty.tools.dotc.printing.
Position
Below the diagonal: dotty.tools.dotc.core.Types uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Types uses dotty.tools.dotc.core.Names, so a change to dotty.tools.dotc.core.Names can break dotty.tools.dotc.core.Types, while a change to dotty.tools.dotc.core.Types can't break dotty.tools.dotc.core.Names.
Position
Below the diagonal: dotty.tools.dotc.core.Types uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Types uses dotty.tools.dotc.core.Denotations, so a change to dotty.tools.dotc.core.Denotations can break dotty.tools.dotc.core.Types, while a change to dotty.tools.dotc.core.Types can't break dotty.tools.dotc.core.Denotations.
Position
Below the diagonal: dotty.tools.dotc.core.Types uses a module listed above it, which is the healthy direction.
19→20 dotty.tools.dotc.core.Types uses dotty.tools.dotc.core.Constantspart of a loop✕
Connections
1 pair of types, where a type in dotty.tools.dotc.core.Types uses a type in dotty.tools.dotc.core.Constants.
dotty.tools.dotc.core.Types uses dotty.tools.dotc.core.Constants, so a change to dotty.tools.dotc.core.Constants can break dotty.tools.dotc.core.Types, while a change to dotty.tools.dotc.core.Types can't break dotty.tools.dotc.core.Constants.
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→21 dotty.tools.dotc.core.Types uses dotty.tools.dotc.core.Annotationspart of a loop✕
Connections
5 pairs of types, where a type in dotty.tools.dotc.core.Types uses a type in dotty.tools.dotc.core.Annotations.
dotty.tools.dotc.core.Types uses dotty.tools.dotc.core.Annotations, so a change to dotty.tools.dotc.core.Annotations can break dotty.tools.dotc.core.Types, while a change to dotty.tools.dotc.core.Types can't break dotty.tools.dotc.core.Annotations.
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→22 dotty.tools.dotc.core.Types uses dotty.tools.dotc.core.SymDenotationspart of a loop✕
Connections
2 pairs of types, where a type in dotty.tools.dotc.core.Types uses a type in dotty.tools.dotc.core.SymDenotations.
dotty.tools.dotc.core.Types uses dotty.tools.dotc.core.SymDenotations, so a change to dotty.tools.dotc.core.SymDenotations can break dotty.tools.dotc.core.Types, while a change to dotty.tools.dotc.core.Types can't break dotty.tools.dotc.core.SymDenotations.
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→23 dotty.tools.dotc.core.Types uses dotty.tools.dotc.core.Symbolspart of a loop✕
Connections
13 pairs of types, where a type in dotty.tools.dotc.core.Types uses a type in dotty.tools.dotc.core.Symbols.
dotty.tools.dotc.core.Types uses dotty.tools.dotc.core.Symbols, so a change to dotty.tools.dotc.core.Symbols can break dotty.tools.dotc.core.Types, while a change to dotty.tools.dotc.core.Types can't break dotty.tools.dotc.core.Symbols.
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→24 dotty.tools.dotc.core.Types uses dotty.tools.dotc.cc.Capabilitiespart of a loop✕
Connections
8 pairs of types, where a type in dotty.tools.dotc.core.Types uses a type in dotty.tools.dotc.cc.Capabilities.
dotty.tools.dotc.core.Types uses dotty.tools.dotc.cc.Capabilities, so a change to dotty.tools.dotc.cc.Capabilities can break dotty.tools.dotc.core.Types, while a change to dotty.tools.dotc.core.Types can't break dotty.tools.dotc.cc.Capabilities.
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→26 dotty.tools.dotc.core.Types uses dotty.tools.dotc.ccpart of a loop✕
Connections
2 pairs of types, where a type in dotty.tools.dotc.core.Types uses a type in dotty.tools.dotc.cc.
dotty.tools.dotc.core.Types uses dotty.tools.dotc.cc, so a change to dotty.tools.dotc.cc can break dotty.tools.dotc.core.Types, while a change to dotty.tools.dotc.core.Types can't break dotty.tools.dotc.cc.
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→27 dotty.tools.dotc.core.Types uses dotty.tools.dotc.corepart of a loop✕
Connections
14 pairs of types, where a type in dotty.tools.dotc.core.Types uses a type in dotty.tools.dotc.core.
dotty.tools.dotc.core.Types uses dotty.tools.dotc.core, so a change to dotty.tools.dotc.core can break dotty.tools.dotc.core.Types, while a change to dotty.tools.dotc.core.Types can't break dotty.tools.dotc.core.
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→29 dotty.tools.dotc.core.Types uses dotty.tools.dotc.core.Contextspart of a loop✕
Connections
71 pairs of types, where a type in dotty.tools.dotc.core.Types uses a type in dotty.tools.dotc.core.Contexts. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dotty.tools.dotc.core.Types uses dotty.tools.dotc.core.Contexts, so a change to dotty.tools.dotc.core.Contexts can break dotty.tools.dotc.core.Types, while a change to dotty.tools.dotc.core.Types can't break dotty.tools.dotc.core.Contexts.
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→33 dotty.tools.dotc.core.Types uses dotty.tools.dotc.ast.Treespart of a loop✕
Connections
6 pairs of types, where a type in dotty.tools.dotc.core.Types uses a type in dotty.tools.dotc.ast.Trees.
dotty.tools.dotc.core.Types uses dotty.tools.dotc.ast.Trees, so a change to dotty.tools.dotc.ast.Trees can break dotty.tools.dotc.core.Types, while a change to dotty.tools.dotc.core.Types can't break dotty.tools.dotc.ast.Trees.
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→37 dotty.tools.dotc.core.Types uses dotty.tools.backend.jvmpart of a loop✕
Connections
6 pairs of types, where a type in dotty.tools.dotc.core.Types uses a type in dotty.tools.backend.jvm.
dotty.tools.dotc.core.Types uses dotty.tools.backend.jvm, so a change to dotty.tools.backend.jvm can break dotty.tools.dotc.core.Types, while a change to dotty.tools.dotc.core.Types can't break dotty.tools.backend.jvm.
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.
dotty.tools.dotc.core.Constants uses scala, so a change to scala can break dotty.tools.dotc.core.Constants, while a change to dotty.tools.dotc.core.Constants can't break scala.
Position
Below the diagonal: dotty.tools.dotc.core.Constants uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Constants uses dotty.tools.dotc.printing.Texts, so a change to dotty.tools.dotc.printing.Texts can break dotty.tools.dotc.core.Constants, while a change to dotty.tools.dotc.core.Constants can't break dotty.tools.dotc.printing.Texts.
Position
Below the diagonal: dotty.tools.dotc.core.Constants uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Constants uses dotty.tools.dotc.printing, so a change to dotty.tools.dotc.printing can break dotty.tools.dotc.core.Constants, while a change to dotty.tools.dotc.core.Constants can't break dotty.tools.dotc.printing.
Position
Below the diagonal: dotty.tools.dotc.core.Constants uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Constants uses dotty.tools.dotc.core.Types, so a change to dotty.tools.dotc.core.Types can break dotty.tools.dotc.core.Constants, while a change to dotty.tools.dotc.core.Constants can't break dotty.tools.dotc.core.Types.
Position
Below the diagonal: dotty.tools.dotc.core.Constants uses a module listed above it, which is the healthy direction.
20→29 dotty.tools.dotc.core.Constants uses dotty.tools.dotc.core.Contextspart of a loop✕
Connections
1 pair of types, where a type in dotty.tools.dotc.core.Constants uses a type in dotty.tools.dotc.core.Contexts.
dotty.tools.dotc.core.Constants uses dotty.tools.dotc.core.Contexts, so a change to dotty.tools.dotc.core.Contexts can break dotty.tools.dotc.core.Constants, while a change to dotty.tools.dotc.core.Constants can't break dotty.tools.dotc.core.Contexts.
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.
dotty.tools.dotc.core.Annotations uses dotty.tools.dotc.interactive.Interactive.Include, so a change to dotty.tools.dotc.interactive.Interactive.Include can break dotty.tools.dotc.core.Annotations, while a change to dotty.tools.dotc.core.Annotations can't break dotty.tools.dotc.interactive.Interactive.Include.
Position
Below the diagonal: dotty.tools.dotc.core.Annotations uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Annotations uses dotty.tools.dotc.util.Spans, so a change to dotty.tools.dotc.util.Spans can break dotty.tools.dotc.core.Annotations, while a change to dotty.tools.dotc.core.Annotations can't break dotty.tools.dotc.util.Spans.
Position
Below the diagonal: dotty.tools.dotc.core.Annotations uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Annotations uses scala, so a change to scala can break dotty.tools.dotc.core.Annotations, while a change to dotty.tools.dotc.core.Annotations can't break scala.
Position
Below the diagonal: dotty.tools.dotc.core.Annotations uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Annotations uses dotty.tools.dotc.printing.Texts, so a change to dotty.tools.dotc.printing.Texts can break dotty.tools.dotc.core.Annotations, while a change to dotty.tools.dotc.core.Annotations can't break dotty.tools.dotc.printing.Texts.
Position
Below the diagonal: dotty.tools.dotc.core.Annotations uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Annotations uses dotty.tools.dotc.printing, so a change to dotty.tools.dotc.printing can break dotty.tools.dotc.core.Annotations, while a change to dotty.tools.dotc.core.Annotations can't break dotty.tools.dotc.printing.
Position
Below the diagonal: dotty.tools.dotc.core.Annotations uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Annotations uses dotty.tools.dotc.core.Types, so a change to dotty.tools.dotc.core.Types can break dotty.tools.dotc.core.Annotations, while a change to dotty.tools.dotc.core.Annotations can't break dotty.tools.dotc.core.Types.
Position
Below the diagonal: dotty.tools.dotc.core.Annotations uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Annotations uses dotty.tools.dotc.core.Constants, so a change to dotty.tools.dotc.core.Constants can break dotty.tools.dotc.core.Annotations, while a change to dotty.tools.dotc.core.Annotations can't break dotty.tools.dotc.core.Constants.
Position
Below the diagonal: dotty.tools.dotc.core.Annotations uses a module listed above it, which is the healthy direction.
21→23 dotty.tools.dotc.core.Annotations uses dotty.tools.dotc.core.Symbolspart of a loop✕
Connections
4 pairs of types, where a type in dotty.tools.dotc.core.Annotations uses a type in dotty.tools.dotc.core.Symbols.
dotty.tools.dotc.core.Annotations uses dotty.tools.dotc.core.Symbols, so a change to dotty.tools.dotc.core.Symbols can break dotty.tools.dotc.core.Annotations, while a change to dotty.tools.dotc.core.Annotations can't break dotty.tools.dotc.core.Symbols.
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.
21→29 dotty.tools.dotc.core.Annotations uses dotty.tools.dotc.core.Contextspart of a loop✕
Connections
10 pairs of types, where a type in dotty.tools.dotc.core.Annotations uses a type in dotty.tools.dotc.core.Contexts.
dotty.tools.dotc.core.Annotations uses dotty.tools.dotc.core.Contexts, so a change to dotty.tools.dotc.core.Contexts can break dotty.tools.dotc.core.Annotations, while a change to dotty.tools.dotc.core.Annotations can't break dotty.tools.dotc.core.Contexts.
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.
21→33 dotty.tools.dotc.core.Annotations uses dotty.tools.dotc.ast.Treespart of a loop✕
Connections
7 pairs of types, where a type in dotty.tools.dotc.core.Annotations uses a type in dotty.tools.dotc.ast.Trees.
dotty.tools.dotc.core.Annotations uses dotty.tools.dotc.ast.Trees, so a change to dotty.tools.dotc.ast.Trees can break dotty.tools.dotc.core.Annotations, while a change to dotty.tools.dotc.core.Annotations can't break dotty.tools.dotc.ast.Trees.
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.
dotty.tools.dotc.core.SymDenotations uses dotty.tools.dotc.interactive.Interactive.Include, so a change to dotty.tools.dotc.interactive.Interactive.Include can break dotty.tools.dotc.core.SymDenotations, while a change to dotty.tools.dotc.core.SymDenotations can't break dotty.tools.dotc.interactive.Interactive.Include.
Position
Below the diagonal: dotty.tools.dotc.core.SymDenotations uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.SymDenotations uses dotty.tools.dotc.util, so a change to dotty.tools.dotc.util can break dotty.tools.dotc.core.SymDenotations, while a change to dotty.tools.dotc.core.SymDenotations can't break dotty.tools.dotc.util.
Position
Below the diagonal: dotty.tools.dotc.core.SymDenotations uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.SymDenotations uses dotty.tools.dotc.reporting, so a change to dotty.tools.dotc.reporting can break dotty.tools.dotc.core.SymDenotations, while a change to dotty.tools.dotc.core.SymDenotations can't break dotty.tools.dotc.reporting.
Position
Below the diagonal: dotty.tools.dotc.core.SymDenotations uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.SymDenotations uses scala.quoted.runtime.impl.QuotesImpl.reflect, so a change to scala.quoted.runtime.impl.QuotesImpl.reflect can break dotty.tools.dotc.core.SymDenotations, while a change to dotty.tools.dotc.core.SymDenotations can't break scala.quoted.runtime.impl.QuotesImpl.reflect.
Position
Below the diagonal: dotty.tools.dotc.core.SymDenotations uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.SymDenotations uses dotty.tools.dotc.core.Phases, so a change to dotty.tools.dotc.core.Phases can break dotty.tools.dotc.core.SymDenotations, while a change to dotty.tools.dotc.core.SymDenotations can't break dotty.tools.dotc.core.Phases.
Position
Below the diagonal: dotty.tools.dotc.core.SymDenotations uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.SymDenotations uses scala, so a change to scala can break dotty.tools.dotc.core.SymDenotations, while a change to dotty.tools.dotc.core.SymDenotations can't break scala.
Position
Below the diagonal: dotty.tools.dotc.core.SymDenotations uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.SymDenotations uses dotty.tools.dotc.core.Scopes, so a change to dotty.tools.dotc.core.Scopes can break dotty.tools.dotc.core.SymDenotations, while a change to dotty.tools.dotc.core.SymDenotations can't break dotty.tools.dotc.core.Scopes.
Position
Below the diagonal: dotty.tools.dotc.core.SymDenotations uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.SymDenotations uses dotty.tools.dotc.core.Names, so a change to dotty.tools.dotc.core.Names can break dotty.tools.dotc.core.SymDenotations, while a change to dotty.tools.dotc.core.SymDenotations can't break dotty.tools.dotc.core.Names.
Position
Below the diagonal: dotty.tools.dotc.core.SymDenotations uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.SymDenotations uses dotty.tools.dotc.core.Denotations, so a change to dotty.tools.dotc.core.Denotations can break dotty.tools.dotc.core.SymDenotations, while a change to dotty.tools.dotc.core.SymDenotations can't break dotty.tools.dotc.core.Denotations.
Position
Below the diagonal: dotty.tools.dotc.core.SymDenotations uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.SymDenotations uses dotty.tools.dotc.core.Types, so a change to dotty.tools.dotc.core.Types can break dotty.tools.dotc.core.SymDenotations, while a change to dotty.tools.dotc.core.SymDenotations can't break dotty.tools.dotc.core.Types.
Position
Below the diagonal: dotty.tools.dotc.core.SymDenotations uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.SymDenotations uses dotty.tools.dotc.core.Annotations, so a change to dotty.tools.dotc.core.Annotations can break dotty.tools.dotc.core.SymDenotations, while a change to dotty.tools.dotc.core.SymDenotations can't break dotty.tools.dotc.core.Annotations.
Position
Below the diagonal: dotty.tools.dotc.core.SymDenotations uses a module listed above it, which is the healthy direction.
22→23 dotty.tools.dotc.core.SymDenotations uses dotty.tools.dotc.core.Symbolspart of a loop✕
Connections
12 pairs of types, where a type in dotty.tools.dotc.core.SymDenotations uses a type in dotty.tools.dotc.core.Symbols.
dotty.tools.dotc.core.SymDenotations uses dotty.tools.dotc.core.Symbols, so a change to dotty.tools.dotc.core.Symbols can break dotty.tools.dotc.core.SymDenotations, while a change to dotty.tools.dotc.core.SymDenotations can't break dotty.tools.dotc.core.Symbols.
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→29 dotty.tools.dotc.core.SymDenotations uses dotty.tools.dotc.core.Contextspart of a loop✕
Connections
16 pairs of types, where a type in dotty.tools.dotc.core.SymDenotations uses a type in dotty.tools.dotc.core.Contexts.
dotty.tools.dotc.core.SymDenotations uses dotty.tools.dotc.core.Contexts, so a change to dotty.tools.dotc.core.Contexts can break dotty.tools.dotc.core.SymDenotations, while a change to dotty.tools.dotc.core.SymDenotations can't break dotty.tools.dotc.core.Contexts.
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→33 dotty.tools.dotc.core.SymDenotations uses dotty.tools.dotc.ast.Treespart of a loop✕
Connections
1 pair of types, where a type in dotty.tools.dotc.core.SymDenotations uses a type in dotty.tools.dotc.ast.Trees.
dotty.tools.dotc.core.SymDenotations uses dotty.tools.dotc.ast.Trees, so a change to dotty.tools.dotc.ast.Trees can break dotty.tools.dotc.core.SymDenotations, while a change to dotty.tools.dotc.core.SymDenotations can't break dotty.tools.dotc.ast.Trees.
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→37 dotty.tools.dotc.core.SymDenotations uses dotty.tools.backend.jvmpart of a loop✕
Connections
1 pair of types, where a type in dotty.tools.dotc.core.SymDenotations uses a type in dotty.tools.backend.jvm.
dotty.tools.dotc.core.SymDenotations uses dotty.tools.backend.jvm, so a change to dotty.tools.backend.jvm can break dotty.tools.dotc.core.SymDenotations, while a change to dotty.tools.dotc.core.SymDenotations can't break dotty.tools.backend.jvm.
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.
dotty.tools.dotc.core.Symbols uses dotty.tools.dotc.util.Spans, so a change to dotty.tools.dotc.util.Spans can break dotty.tools.dotc.core.Symbols, while a change to dotty.tools.dotc.core.Symbols can't break dotty.tools.dotc.util.Spans.
Position
Below the diagonal: dotty.tools.dotc.core.Symbols uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Symbols uses dotty.tools.io, so a change to dotty.tools.io can break dotty.tools.dotc.core.Symbols, while a change to dotty.tools.dotc.core.Symbols can't break dotty.tools.io.
Position
Below the diagonal: dotty.tools.dotc.core.Symbols uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Symbols uses dotty.tools.dotc.util, so a change to dotty.tools.dotc.util can break dotty.tools.dotc.core.Symbols, while a change to dotty.tools.dotc.core.Symbols can't break dotty.tools.dotc.util.
Position
Below the diagonal: dotty.tools.dotc.core.Symbols uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Symbols uses scala, so a change to scala can break dotty.tools.dotc.core.Symbols, while a change to dotty.tools.dotc.core.Symbols can't break scala.
Position
Below the diagonal: dotty.tools.dotc.core.Symbols uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Symbols uses dotty.tools.dotc.printing.Texts, so a change to dotty.tools.dotc.printing.Texts can break dotty.tools.dotc.core.Symbols, while a change to dotty.tools.dotc.core.Symbols can't break dotty.tools.dotc.printing.Texts.
Position
Below the diagonal: dotty.tools.dotc.core.Symbols uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Symbols uses dotty.tools.dotc.printing, so a change to dotty.tools.dotc.printing can break dotty.tools.dotc.core.Symbols, while a change to dotty.tools.dotc.core.Symbols can't break dotty.tools.dotc.printing.
Position
Below the diagonal: dotty.tools.dotc.core.Symbols uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Symbols uses dotty.tools.dotc.core.Types, so a change to dotty.tools.dotc.core.Types can break dotty.tools.dotc.core.Symbols, while a change to dotty.tools.dotc.core.Symbols can't break dotty.tools.dotc.core.Types.
Position
Below the diagonal: dotty.tools.dotc.core.Symbols uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Symbols uses dotty.tools.dotc.core.SymDenotations, so a change to dotty.tools.dotc.core.SymDenotations can break dotty.tools.dotc.core.Symbols, while a change to dotty.tools.dotc.core.Symbols can't break dotty.tools.dotc.core.SymDenotations.
Position
Below the diagonal: dotty.tools.dotc.core.Symbols uses a module listed above it, which is the healthy direction.
23→27 dotty.tools.dotc.core.Symbols uses dotty.tools.dotc.corepart of a loop✕
Connections
3 pairs of types, where a type in dotty.tools.dotc.core.Symbols uses a type in dotty.tools.dotc.core.
dotty.tools.dotc.core.Symbols uses dotty.tools.dotc.core, so a change to dotty.tools.dotc.core can break dotty.tools.dotc.core.Symbols, while a change to dotty.tools.dotc.core.Symbols can't break dotty.tools.dotc.core.
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→29 dotty.tools.dotc.core.Symbols uses dotty.tools.dotc.core.Contextspart of a loop✕
Connections
5 pairs of types, where a type in dotty.tools.dotc.core.Symbols uses a type in dotty.tools.dotc.core.Contexts.
dotty.tools.dotc.core.Symbols uses dotty.tools.dotc.core.Contexts, so a change to dotty.tools.dotc.core.Contexts can break dotty.tools.dotc.core.Symbols, while a change to dotty.tools.dotc.core.Symbols can't break dotty.tools.dotc.core.Contexts.
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→33 dotty.tools.dotc.core.Symbols uses dotty.tools.dotc.ast.Treespart of a loop✕
Connections
2 pairs of types, where a type in dotty.tools.dotc.core.Symbols uses a type in dotty.tools.dotc.ast.Trees.
dotty.tools.dotc.core.Symbols uses dotty.tools.dotc.ast.Trees, so a change to dotty.tools.dotc.ast.Trees can break dotty.tools.dotc.core.Symbols, while a change to dotty.tools.dotc.core.Symbols can't break dotty.tools.dotc.ast.Trees.
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.
dotty.tools.dotc.cc.Capabilities uses dotty.tools.dotc.util, so a change to dotty.tools.dotc.util can break dotty.tools.dotc.cc.Capabilities, while a change to dotty.tools.dotc.cc.Capabilities can't break dotty.tools.dotc.util.
Position
Below the diagonal: dotty.tools.dotc.cc.Capabilities uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.cc.Capabilities uses scala, so a change to scala can break dotty.tools.dotc.cc.Capabilities, while a change to dotty.tools.dotc.cc.Capabilities can't break scala.
Position
Below the diagonal: dotty.tools.dotc.cc.Capabilities uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.cc.Capabilities uses dotty.tools.dotc.printing.Texts, so a change to dotty.tools.dotc.printing.Texts can break dotty.tools.dotc.cc.Capabilities, while a change to dotty.tools.dotc.cc.Capabilities can't break dotty.tools.dotc.printing.Texts.
Position
Below the diagonal: dotty.tools.dotc.cc.Capabilities uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.cc.Capabilities uses dotty.tools.dotc.printing, so a change to dotty.tools.dotc.printing can break dotty.tools.dotc.cc.Capabilities, while a change to dotty.tools.dotc.cc.Capabilities can't break dotty.tools.dotc.printing.
Position
Below the diagonal: dotty.tools.dotc.cc.Capabilities uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.cc.Capabilities uses dotty.tools.dotc.core.Types, so a change to dotty.tools.dotc.core.Types can break dotty.tools.dotc.cc.Capabilities, while a change to dotty.tools.dotc.cc.Capabilities can't break dotty.tools.dotc.core.Types.
Position
Below the diagonal: dotty.tools.dotc.cc.Capabilities uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.cc.Capabilities uses dotty.tools.dotc.core.Symbols, so a change to dotty.tools.dotc.core.Symbols can break dotty.tools.dotc.cc.Capabilities, while a change to dotty.tools.dotc.cc.Capabilities can't break dotty.tools.dotc.core.Symbols.
Position
Below the diagonal: dotty.tools.dotc.cc.Capabilities uses a module listed above it, which is the healthy direction.
24→26 dotty.tools.dotc.cc.Capabilities uses dotty.tools.dotc.ccpart of a loop✕
Connections
1 pair of types, where a type in dotty.tools.dotc.cc.Capabilities uses a type in dotty.tools.dotc.cc.
dotty.tools.dotc.cc.Capabilities uses dotty.tools.dotc.cc, so a change to dotty.tools.dotc.cc can break dotty.tools.dotc.cc.Capabilities, while a change to dotty.tools.dotc.cc.Capabilities can't break dotty.tools.dotc.cc.
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.
24→29 dotty.tools.dotc.cc.Capabilities uses dotty.tools.dotc.core.Contextspart of a loop✕
Connections
7 pairs of types, where a type in dotty.tools.dotc.cc.Capabilities uses a type in dotty.tools.dotc.core.Contexts.
dotty.tools.dotc.cc.Capabilities uses dotty.tools.dotc.core.Contexts, so a change to dotty.tools.dotc.core.Contexts can break dotty.tools.dotc.cc.Capabilities, while a change to dotty.tools.dotc.cc.Capabilities can't break dotty.tools.dotc.core.Contexts.
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.
dotty.tools.dotc.core.tasty uses dotty.tools.dotc.interactive.Interactive.Include, so a change to dotty.tools.dotc.interactive.Interactive.Include can break dotty.tools.dotc.core.tasty, while a change to dotty.tools.dotc.core.tasty can't break dotty.tools.dotc.interactive.Interactive.Include.
Position
Below the diagonal: dotty.tools.dotc.core.tasty uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.tasty uses dotty.tools.dotc.util.Spans, so a change to dotty.tools.dotc.util.Spans can break dotty.tools.dotc.core.tasty, while a change to dotty.tools.dotc.core.tasty can't break dotty.tools.dotc.util.Spans.
Position
Below the diagonal: dotty.tools.dotc.core.tasty uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.tasty uses dotty.tools.dotc.util, so a change to dotty.tools.dotc.util can break dotty.tools.dotc.core.tasty, while a change to dotty.tools.dotc.core.tasty can't break dotty.tools.dotc.util.
Position
Below the diagonal: dotty.tools.dotc.core.tasty uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.tasty uses dotty.tools.dotc.reporting, so a change to dotty.tools.dotc.reporting can break dotty.tools.dotc.core.tasty, while a change to dotty.tools.dotc.core.tasty can't break dotty.tools.dotc.reporting.
Position
Below the diagonal: dotty.tools.dotc.core.tasty uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.tasty uses scala, so a change to scala can break dotty.tools.dotc.core.tasty, while a change to dotty.tools.dotc.core.tasty can't break scala.
Position
Below the diagonal: dotty.tools.dotc.core.tasty uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.tasty uses dotty.tools.dotc.core.Names, so a change to dotty.tools.dotc.core.Names can break dotty.tools.dotc.core.tasty, while a change to dotty.tools.dotc.core.tasty can't break dotty.tools.dotc.core.Names.
Position
Below the diagonal: dotty.tools.dotc.core.tasty uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.tasty uses dotty.tools.dotc.core.Types, so a change to dotty.tools.dotc.core.Types can break dotty.tools.dotc.core.tasty, while a change to dotty.tools.dotc.core.tasty can't break dotty.tools.dotc.core.Types.
Position
Below the diagonal: dotty.tools.dotc.core.tasty uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.tasty uses dotty.tools.dotc.core.Constants, so a change to dotty.tools.dotc.core.Constants can break dotty.tools.dotc.core.tasty, while a change to dotty.tools.dotc.core.tasty can't break dotty.tools.dotc.core.Constants.
Position
Below the diagonal: dotty.tools.dotc.core.tasty uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.tasty uses dotty.tools.dotc.core.Annotations, so a change to dotty.tools.dotc.core.Annotations can break dotty.tools.dotc.core.tasty, while a change to dotty.tools.dotc.core.tasty can't break dotty.tools.dotc.core.Annotations.
Position
Below the diagonal: dotty.tools.dotc.core.tasty uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.tasty uses dotty.tools.dotc.core.SymDenotations, so a change to dotty.tools.dotc.core.SymDenotations can break dotty.tools.dotc.core.tasty, while a change to dotty.tools.dotc.core.tasty can't break dotty.tools.dotc.core.SymDenotations.
Position
Below the diagonal: dotty.tools.dotc.core.tasty uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.tasty uses dotty.tools.dotc.core.Symbols, so a change to dotty.tools.dotc.core.Symbols can break dotty.tools.dotc.core.tasty, while a change to dotty.tools.dotc.core.tasty can't break dotty.tools.dotc.core.Symbols.
Position
Below the diagonal: dotty.tools.dotc.core.tasty uses a module listed above it, which is the healthy direction.
25→27 dotty.tools.dotc.core.tasty uses dotty.tools.dotc.corepart of a loop✕
Connections
1 pair of types, where a type in dotty.tools.dotc.core.tasty uses a type in dotty.tools.dotc.core.
dotty.tools.dotc.core.tasty uses dotty.tools.dotc.core, so a change to dotty.tools.dotc.core can break dotty.tools.dotc.core.tasty, while a change to dotty.tools.dotc.core.tasty can't break dotty.tools.dotc.core.
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→29 dotty.tools.dotc.core.tasty uses dotty.tools.dotc.core.Contextspart of a loop✕
Connections
3 pairs of types, where a type in dotty.tools.dotc.core.tasty uses a type in dotty.tools.dotc.core.Contexts.
dotty.tools.dotc.core.tasty uses dotty.tools.dotc.core.Contexts, so a change to dotty.tools.dotc.core.Contexts can break dotty.tools.dotc.core.tasty, while a change to dotty.tools.dotc.core.tasty can't break dotty.tools.dotc.core.Contexts.
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→30 dotty.tools.dotc.core.tasty uses dotty.tools.dotc.ast.untpdpart of a loop✕
Connections
1 pair of types, where a type in dotty.tools.dotc.core.tasty uses a type in dotty.tools.dotc.ast.untpd.
dotty.tools.dotc.core.tasty uses dotty.tools.dotc.ast.untpd, so a change to dotty.tools.dotc.ast.untpd can break dotty.tools.dotc.core.tasty, while a change to dotty.tools.dotc.core.tasty can't break dotty.tools.dotc.ast.untpd.
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→32 dotty.tools.dotc.core.tasty uses dotty.tools.dotc.astpart of a loop✕
Connections
2 pairs of types, where a type in dotty.tools.dotc.core.tasty uses a type in dotty.tools.dotc.ast.
dotty.tools.dotc.core.tasty uses dotty.tools.dotc.ast, so a change to dotty.tools.dotc.ast can break dotty.tools.dotc.core.tasty, while a change to dotty.tools.dotc.core.tasty can't break dotty.tools.dotc.ast.
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→33 dotty.tools.dotc.core.tasty uses dotty.tools.dotc.ast.Treespart of a loop✕
Connections
7 pairs of types, where a type in dotty.tools.dotc.core.tasty uses a type in dotty.tools.dotc.ast.Trees.
dotty.tools.dotc.core.tasty uses dotty.tools.dotc.ast.Trees, so a change to dotty.tools.dotc.ast.Trees can break dotty.tools.dotc.core.tasty, while a change to dotty.tools.dotc.core.tasty can't break dotty.tools.dotc.ast.Trees.
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→35 dotty.tools.dotc.core.tasty uses dotty.tools.dotcpart of a loop✕
Connections
1 pair of types, where a type in dotty.tools.dotc.core.tasty uses a type in dotty.tools.dotc.
dotty.tools.dotc.core.tasty uses dotty.tools.dotc, so a change to dotty.tools.dotc can break dotty.tools.dotc.core.tasty, while a change to dotty.tools.dotc.core.tasty can't break dotty.tools.dotc.
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.
dotty.tools.dotc.cc uses dotty.tools.dotc.util, so a change to dotty.tools.dotc.util can break dotty.tools.dotc.cc, while a change to dotty.tools.dotc.cc can't break dotty.tools.dotc.util.
Position
Below the diagonal: dotty.tools.dotc.cc uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.cc uses dotty.tools.dotc.reporting, so a change to dotty.tools.dotc.reporting can break dotty.tools.dotc.cc, while a change to dotty.tools.dotc.cc can't break dotty.tools.dotc.reporting.
Position
Below the diagonal: dotty.tools.dotc.cc uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.cc uses dotty.tools.dotc.printing.Texts, so a change to dotty.tools.dotc.printing.Texts can break dotty.tools.dotc.cc, while a change to dotty.tools.dotc.cc can't break dotty.tools.dotc.printing.Texts.
Position
Below the diagonal: dotty.tools.dotc.cc uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.cc uses dotty.tools.dotc.printing, so a change to dotty.tools.dotc.printing can break dotty.tools.dotc.cc, while a change to dotty.tools.dotc.cc can't break dotty.tools.dotc.printing.
Position
Below the diagonal: dotty.tools.dotc.cc uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.cc uses dotty.tools.dotc.core.Names, so a change to dotty.tools.dotc.core.Names can break dotty.tools.dotc.cc, while a change to dotty.tools.dotc.cc can't break dotty.tools.dotc.core.Names.
Position
Below the diagonal: dotty.tools.dotc.cc uses a module listed above it, which is the healthy direction.
28 pairs of types, where a type in dotty.tools.dotc.cc uses a type in dotty.tools.dotc.core.Types. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dotty.tools.dotc.cc uses dotty.tools.dotc.core.Types, so a change to dotty.tools.dotc.core.Types can break dotty.tools.dotc.cc, while a change to dotty.tools.dotc.cc can't break dotty.tools.dotc.core.Types.
Position
Below the diagonal: dotty.tools.dotc.cc uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.cc uses dotty.tools.dotc.core.Annotations, so a change to dotty.tools.dotc.core.Annotations can break dotty.tools.dotc.cc, while a change to dotty.tools.dotc.cc can't break dotty.tools.dotc.core.Annotations.
Position
Below the diagonal: dotty.tools.dotc.cc uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.cc uses dotty.tools.dotc.core.SymDenotations, so a change to dotty.tools.dotc.core.SymDenotations can break dotty.tools.dotc.cc, while a change to dotty.tools.dotc.cc can't break dotty.tools.dotc.core.SymDenotations.
Position
Below the diagonal: dotty.tools.dotc.cc uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.cc uses dotty.tools.dotc.core.Symbols, so a change to dotty.tools.dotc.core.Symbols can break dotty.tools.dotc.cc, while a change to dotty.tools.dotc.cc can't break dotty.tools.dotc.core.Symbols.
Position
Below the diagonal: dotty.tools.dotc.cc uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.cc uses dotty.tools.dotc.cc.Capabilities, so a change to dotty.tools.dotc.cc.Capabilities can break dotty.tools.dotc.cc, while a change to dotty.tools.dotc.cc can't break dotty.tools.dotc.cc.Capabilities.
Position
Below the diagonal: dotty.tools.dotc.cc uses a module listed above it, which is the healthy direction.
26→29 dotty.tools.dotc.cc uses dotty.tools.dotc.core.Contextspart of a loop✕
Connections
20 pairs of types, where a type in dotty.tools.dotc.cc uses a type in dotty.tools.dotc.core.Contexts.
dotty.tools.dotc.cc uses dotty.tools.dotc.core.Contexts, so a change to dotty.tools.dotc.core.Contexts can break dotty.tools.dotc.cc, while a change to dotty.tools.dotc.cc can't break dotty.tools.dotc.core.Contexts.
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→33 dotty.tools.dotc.cc uses dotty.tools.dotc.ast.Treespart of a loop✕
Connections
8 pairs of types, where a type in dotty.tools.dotc.cc uses a type in dotty.tools.dotc.ast.Trees.
dotty.tools.dotc.cc uses dotty.tools.dotc.ast.Trees, so a change to dotty.tools.dotc.ast.Trees can break dotty.tools.dotc.cc, while a change to dotty.tools.dotc.cc can't break dotty.tools.dotc.ast.Trees.
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.
dotty.tools.dotc.core uses dotty.tools.dotc.interactive.Interactive.Include, so a change to dotty.tools.dotc.interactive.Interactive.Include can break dotty.tools.dotc.core, while a change to dotty.tools.dotc.core can't break dotty.tools.dotc.interactive.Interactive.Include.
Position
Below the diagonal: dotty.tools.dotc.core uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core uses dotty.tools.dotc.util.Spans, so a change to dotty.tools.dotc.util.Spans can break dotty.tools.dotc.core, while a change to dotty.tools.dotc.core can't break dotty.tools.dotc.util.Spans.
Position
Below the diagonal: dotty.tools.dotc.core uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core uses scala.collection.mutable, so a change to scala.collection.mutable can break dotty.tools.dotc.core, while a change to dotty.tools.dotc.core can't break scala.collection.mutable.
Position
Below the diagonal: dotty.tools.dotc.core uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core uses dotty.tools.io, so a change to dotty.tools.io can break dotty.tools.dotc.core, while a change to dotty.tools.dotc.core can't break dotty.tools.io.
Position
Below the diagonal: dotty.tools.dotc.core uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core uses dotty.tools.dotc.util, so a change to dotty.tools.dotc.util can break dotty.tools.dotc.core, while a change to dotty.tools.dotc.core can't break dotty.tools.dotc.util.
Position
Below the diagonal: dotty.tools.dotc.core uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core uses dotty.tools.dotc.reporting, so a change to dotty.tools.dotc.reporting can break dotty.tools.dotc.core, while a change to dotty.tools.dotc.core can't break dotty.tools.dotc.reporting.
Position
Below the diagonal: dotty.tools.dotc.core uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core uses dotty.tools.dotc.core.Phases, so a change to dotty.tools.dotc.core.Phases can break dotty.tools.dotc.core, while a change to dotty.tools.dotc.core can't break dotty.tools.dotc.core.Phases.
Position
Below the diagonal: dotty.tools.dotc.core uses a module listed above it, which is the healthy direction.
62 pairs of types, where a type in dotty.tools.dotc.core uses a type in scala. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dotty.tools.dotc.core uses dotty.tools.dotc.core.Scopes, so a change to dotty.tools.dotc.core.Scopes can break dotty.tools.dotc.core, while a change to dotty.tools.dotc.core can't break dotty.tools.dotc.core.Scopes.
Position
Below the diagonal: dotty.tools.dotc.core uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core uses dotty.tools.dotc.printing, so a change to dotty.tools.dotc.printing can break dotty.tools.dotc.core, while a change to dotty.tools.dotc.core can't break dotty.tools.dotc.printing.
Position
Below the diagonal: dotty.tools.dotc.core uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core uses dotty.tools.dotc.core.Names, so a change to dotty.tools.dotc.core.Names can break dotty.tools.dotc.core, while a change to dotty.tools.dotc.core can't break dotty.tools.dotc.core.Names.
Position
Below the diagonal: dotty.tools.dotc.core uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core uses dotty.tools.dotc.core.Denotations, so a change to dotty.tools.dotc.core.Denotations can break dotty.tools.dotc.core, while a change to dotty.tools.dotc.core can't break dotty.tools.dotc.core.Denotations.
Position
Below the diagonal: dotty.tools.dotc.core uses a module listed above it, which is the healthy direction.
62 pairs of types, where a type in dotty.tools.dotc.core uses a type in dotty.tools.dotc.core.Types. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dotty.tools.dotc.core uses dotty.tools.dotc.core.Types, so a change to dotty.tools.dotc.core.Types can break dotty.tools.dotc.core, while a change to dotty.tools.dotc.core can't break dotty.tools.dotc.core.Types.
Position
Below the diagonal: dotty.tools.dotc.core uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core uses dotty.tools.dotc.core.Constants, so a change to dotty.tools.dotc.core.Constants can break dotty.tools.dotc.core, while a change to dotty.tools.dotc.core can't break dotty.tools.dotc.core.Constants.
Position
Below the diagonal: dotty.tools.dotc.core uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core uses dotty.tools.dotc.core.Annotations, so a change to dotty.tools.dotc.core.Annotations can break dotty.tools.dotc.core, while a change to dotty.tools.dotc.core can't break dotty.tools.dotc.core.Annotations.
Position
Below the diagonal: dotty.tools.dotc.core uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core uses dotty.tools.dotc.core.SymDenotations, so a change to dotty.tools.dotc.core.SymDenotations can break dotty.tools.dotc.core, while a change to dotty.tools.dotc.core can't break dotty.tools.dotc.core.SymDenotations.
Position
Below the diagonal: dotty.tools.dotc.core uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core uses dotty.tools.dotc.core.Symbols, so a change to dotty.tools.dotc.core.Symbols can break dotty.tools.dotc.core, while a change to dotty.tools.dotc.core can't break dotty.tools.dotc.core.Symbols.
Position
Below the diagonal: dotty.tools.dotc.core uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core uses dotty.tools.dotc.core.tasty, so a change to dotty.tools.dotc.core.tasty can break dotty.tools.dotc.core, while a change to dotty.tools.dotc.core can't break dotty.tools.dotc.core.tasty.
Position
Below the diagonal: dotty.tools.dotc.core uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core uses dotty.tools.dotc.cc, so a change to dotty.tools.dotc.cc can break dotty.tools.dotc.core, while a change to dotty.tools.dotc.core can't break dotty.tools.dotc.cc.
Position
Below the diagonal: dotty.tools.dotc.core uses a module listed above it, which is the healthy direction.
27→29 dotty.tools.dotc.core uses dotty.tools.dotc.core.Contextspart of a loop✕
Connections
43 pairs of types, where a type in dotty.tools.dotc.core uses a type in dotty.tools.dotc.core.Contexts. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dotty.tools.dotc.core uses dotty.tools.dotc.core.Contexts, so a change to dotty.tools.dotc.core.Contexts can break dotty.tools.dotc.core, while a change to dotty.tools.dotc.core can't break dotty.tools.dotc.core.Contexts.
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→32 dotty.tools.dotc.core uses dotty.tools.dotc.astpart of a loop✕
Connections
1 pair of types, where a type in dotty.tools.dotc.core uses a type in dotty.tools.dotc.ast.
dotty.tools.dotc.core uses dotty.tools.dotc.ast, so a change to dotty.tools.dotc.ast can break dotty.tools.dotc.core, while a change to dotty.tools.dotc.core can't break dotty.tools.dotc.ast.
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→33 dotty.tools.dotc.core uses dotty.tools.dotc.ast.Treespart of a loop✕
Connections
4 pairs of types, where a type in dotty.tools.dotc.core uses a type in dotty.tools.dotc.ast.Trees.
dotty.tools.dotc.core uses dotty.tools.dotc.ast.Trees, so a change to dotty.tools.dotc.ast.Trees can break dotty.tools.dotc.core, while a change to dotty.tools.dotc.core can't break dotty.tools.dotc.ast.Trees.
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→37 dotty.tools.dotc.core uses dotty.tools.backend.jvmpart of a loop✕
Connections
1 pair of types, where a type in dotty.tools.dotc.core uses a type in dotty.tools.backend.jvm.
dotty.tools.dotc.core uses dotty.tools.backend.jvm, so a change to dotty.tools.backend.jvm can break dotty.tools.dotc.core, while a change to dotty.tools.dotc.core can't break dotty.tools.backend.jvm.
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.
dotty.tools.dotc.config uses dotty.tools.dotc.interactive.Interactive.Include, so a change to dotty.tools.dotc.interactive.Interactive.Include can break dotty.tools.dotc.config, while a change to dotty.tools.dotc.config can't break dotty.tools.dotc.interactive.Interactive.Include.
Position
Below the diagonal: dotty.tools.dotc.config uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.config uses dotty.tools.io, so a change to dotty.tools.io can break dotty.tools.dotc.config, while a change to dotty.tools.dotc.config can't break dotty.tools.io.
Position
Below the diagonal: dotty.tools.dotc.config uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.config uses dotty.tools.dotc.util, so a change to dotty.tools.dotc.util can break dotty.tools.dotc.config, while a change to dotty.tools.dotc.config can't break dotty.tools.dotc.util.
Position
Below the diagonal: dotty.tools.dotc.config uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.config uses dotty.tools.dotc.reporting, so a change to dotty.tools.dotc.reporting can break dotty.tools.dotc.config, while a change to dotty.tools.dotc.config can't break dotty.tools.dotc.reporting.
Position
Below the diagonal: dotty.tools.dotc.config uses a module listed above it, which is the healthy direction.
32 pairs of types, where a type in dotty.tools.dotc.config uses a type in scala. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dotty.tools.dotc.config uses scala, so a change to scala can break dotty.tools.dotc.config, while a change to dotty.tools.dotc.config can't break scala.
Position
Below the diagonal: dotty.tools.dotc.config uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.config uses dotty.tools.dotc.core.Names, so a change to dotty.tools.dotc.core.Names can break dotty.tools.dotc.config, while a change to dotty.tools.dotc.config can't break dotty.tools.dotc.core.Names.
Position
Below the diagonal: dotty.tools.dotc.config uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.config uses dotty.tools.dotc.core.Types, so a change to dotty.tools.dotc.core.Types can break dotty.tools.dotc.config, while a change to dotty.tools.dotc.config can't break dotty.tools.dotc.core.Types.
Position
Below the diagonal: dotty.tools.dotc.config uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.config uses dotty.tools.dotc.core.Symbols, so a change to dotty.tools.dotc.core.Symbols can break dotty.tools.dotc.config, while a change to dotty.tools.dotc.config can't break dotty.tools.dotc.core.Symbols.
Position
Below the diagonal: dotty.tools.dotc.config uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.config uses dotty.tools.dotc.core, so a change to dotty.tools.dotc.core can break dotty.tools.dotc.config, while a change to dotty.tools.dotc.config can't break dotty.tools.dotc.core.
Position
Below the diagonal: dotty.tools.dotc.config uses a module listed above it, which is the healthy direction.
28→29 dotty.tools.dotc.config uses dotty.tools.dotc.core.Contextspart of a loop✕
Connections
10 pairs of types, where a type in dotty.tools.dotc.config uses a type in dotty.tools.dotc.core.Contexts.
dotty.tools.dotc.config uses dotty.tools.dotc.core.Contexts, so a change to dotty.tools.dotc.core.Contexts can break dotty.tools.dotc.config, while a change to dotty.tools.dotc.config can't break dotty.tools.dotc.core.Contexts.
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→30 dotty.tools.dotc.config uses dotty.tools.dotc.ast.untpdpart of a loop✕
Connections
1 pair of types, where a type in dotty.tools.dotc.config uses a type in dotty.tools.dotc.ast.untpd.
dotty.tools.dotc.config uses dotty.tools.dotc.ast.untpd, so a change to dotty.tools.dotc.ast.untpd can break dotty.tools.dotc.config, while a change to dotty.tools.dotc.config can't break dotty.tools.dotc.ast.untpd.
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.
dotty.tools.dotc.core.Contexts uses dotty.tools.io, so a change to dotty.tools.io can break dotty.tools.dotc.core.Contexts, while a change to dotty.tools.dotc.core.Contexts can't break dotty.tools.io.
Position
Below the diagonal: dotty.tools.dotc.core.Contexts uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Contexts uses dotty.tools.dotc.util, so a change to dotty.tools.dotc.util can break dotty.tools.dotc.core.Contexts, while a change to dotty.tools.dotc.core.Contexts can't break dotty.tools.dotc.util.
Position
Below the diagonal: dotty.tools.dotc.core.Contexts uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Contexts uses dotty.tools.dotc.reporting, so a change to dotty.tools.dotc.reporting can break dotty.tools.dotc.core.Contexts, while a change to dotty.tools.dotc.core.Contexts can't break dotty.tools.dotc.reporting.
Position
Below the diagonal: dotty.tools.dotc.core.Contexts uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Contexts uses dotty.tools.dotc.typer, so a change to dotty.tools.dotc.typer can break dotty.tools.dotc.core.Contexts, while a change to dotty.tools.dotc.core.Contexts can't break dotty.tools.dotc.typer.
Position
Below the diagonal: dotty.tools.dotc.core.Contexts uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Contexts uses dotty.tools.dotc.core.Phases, so a change to dotty.tools.dotc.core.Phases can break dotty.tools.dotc.core.Contexts, while a change to dotty.tools.dotc.core.Contexts can't break dotty.tools.dotc.core.Phases.
Position
Below the diagonal: dotty.tools.dotc.core.Contexts uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Contexts uses scala, so a change to scala can break dotty.tools.dotc.core.Contexts, while a change to dotty.tools.dotc.core.Contexts can't break scala.
Position
Below the diagonal: dotty.tools.dotc.core.Contexts uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Contexts uses dotty.tools.dotc.core.Scopes, so a change to dotty.tools.dotc.core.Scopes can break dotty.tools.dotc.core.Contexts, while a change to dotty.tools.dotc.core.Contexts can't break dotty.tools.dotc.core.Scopes.
Position
Below the diagonal: dotty.tools.dotc.core.Contexts uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Contexts uses dotty.tools.dotc.core.Names, so a change to dotty.tools.dotc.core.Names can break dotty.tools.dotc.core.Contexts, while a change to dotty.tools.dotc.core.Contexts can't break dotty.tools.dotc.core.Names.
Position
Below the diagonal: dotty.tools.dotc.core.Contexts uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Contexts uses dotty.tools.dotc.core.Types, so a change to dotty.tools.dotc.core.Types can break dotty.tools.dotc.core.Contexts, while a change to dotty.tools.dotc.core.Contexts can't break dotty.tools.dotc.core.Types.
Position
Below the diagonal: dotty.tools.dotc.core.Contexts uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Contexts uses dotty.tools.dotc.core.Symbols, so a change to dotty.tools.dotc.core.Symbols can break dotty.tools.dotc.core.Contexts, while a change to dotty.tools.dotc.core.Contexts can't break dotty.tools.dotc.core.Symbols.
Position
Below the diagonal: dotty.tools.dotc.core.Contexts uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Contexts uses dotty.tools.dotc.core, so a change to dotty.tools.dotc.core can break dotty.tools.dotc.core.Contexts, while a change to dotty.tools.dotc.core.Contexts can't break dotty.tools.dotc.core.
Position
Below the diagonal: dotty.tools.dotc.core.Contexts uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.core.Contexts uses dotty.tools.dotc.config, so a change to dotty.tools.dotc.config can break dotty.tools.dotc.core.Contexts, while a change to dotty.tools.dotc.core.Contexts can't break dotty.tools.dotc.config.
Position
Below the diagonal: dotty.tools.dotc.core.Contexts uses a module listed above it, which is the healthy direction.
29→33 dotty.tools.dotc.core.Contexts uses dotty.tools.dotc.ast.Treespart of a loop✕
Connections
3 pairs of types, where a type in dotty.tools.dotc.core.Contexts uses a type in dotty.tools.dotc.ast.Trees.
dotty.tools.dotc.core.Contexts uses dotty.tools.dotc.ast.Trees, so a change to dotty.tools.dotc.ast.Trees can break dotty.tools.dotc.core.Contexts, while a change to dotty.tools.dotc.core.Contexts can't break dotty.tools.dotc.ast.Trees.
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→35 dotty.tools.dotc.core.Contexts uses dotty.tools.dotcpart of a loop✕
Connections
2 pairs of types, where a type in dotty.tools.dotc.core.Contexts uses a type in dotty.tools.dotc.
dotty.tools.dotc.core.Contexts uses dotty.tools.dotc, so a change to dotty.tools.dotc can break dotty.tools.dotc.core.Contexts, while a change to dotty.tools.dotc.core.Contexts can't break dotty.tools.dotc.
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.
dotty.tools.dotc.ast.untpd uses dotty.tools.dotc.util.Spans, so a change to dotty.tools.dotc.util.Spans can break dotty.tools.dotc.ast.untpd, while a change to dotty.tools.dotc.ast.untpd can't break dotty.tools.dotc.util.Spans.
Position
Below the diagonal: dotty.tools.dotc.ast.untpd uses a module listed above it, which is the healthy direction.
27 pairs of types, where a type in dotty.tools.dotc.ast.untpd uses a type in dotty.tools.dotc.util. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dotty.tools.dotc.ast.untpd uses dotty.tools.dotc.util, so a change to dotty.tools.dotc.util can break dotty.tools.dotc.ast.untpd, while a change to dotty.tools.dotc.ast.untpd can't break dotty.tools.dotc.util.
Position
Below the diagonal: dotty.tools.dotc.ast.untpd uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast.untpd uses scala.quoted.runtime.impl.QuotesImpl.reflect, so a change to scala.quoted.runtime.impl.QuotesImpl.reflect can break dotty.tools.dotc.ast.untpd, while a change to dotty.tools.dotc.ast.untpd can't break scala.quoted.runtime.impl.QuotesImpl.reflect.
Position
Below the diagonal: dotty.tools.dotc.ast.untpd uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast.untpd uses scala, so a change to scala can break dotty.tools.dotc.ast.untpd, while a change to dotty.tools.dotc.ast.untpd can't break scala.
Position
Below the diagonal: dotty.tools.dotc.ast.untpd uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast.untpd uses dotty.tools.dotc.core.Names, so a change to dotty.tools.dotc.core.Names can break dotty.tools.dotc.ast.untpd, while a change to dotty.tools.dotc.ast.untpd can't break dotty.tools.dotc.core.Names.
Position
Below the diagonal: dotty.tools.dotc.ast.untpd uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast.untpd uses dotty.tools.dotc.core.Symbols, so a change to dotty.tools.dotc.core.Symbols can break dotty.tools.dotc.ast.untpd, while a change to dotty.tools.dotc.ast.untpd can't break dotty.tools.dotc.core.Symbols.
Position
Below the diagonal: dotty.tools.dotc.ast.untpd uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast.untpd uses dotty.tools.dotc.core.Contexts, so a change to dotty.tools.dotc.core.Contexts can break dotty.tools.dotc.ast.untpd, while a change to dotty.tools.dotc.ast.untpd can't break dotty.tools.dotc.core.Contexts.
Position
Below the diagonal: dotty.tools.dotc.ast.untpd uses a module listed above it, which is the healthy direction.
30→31 dotty.tools.dotc.ast.untpd uses dotty.tools.dotc.ast.Trees.Instancepart of a loop✕
Connections
3 pairs of types, where a type in dotty.tools.dotc.ast.untpd uses a type in dotty.tools.dotc.ast.Trees.Instance.
dotty.tools.dotc.ast.untpd uses dotty.tools.dotc.ast.Trees.Instance, so a change to dotty.tools.dotc.ast.Trees.Instance can break dotty.tools.dotc.ast.untpd, while a change to dotty.tools.dotc.ast.untpd can't break dotty.tools.dotc.ast.Trees.Instance.
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 dotty.tools.dotc.ast.untpd uses dotty.tools.dotc.astpart of a loop✕
Connections
1 pair of types, where a type in dotty.tools.dotc.ast.untpd uses a type in dotty.tools.dotc.ast.
dotty.tools.dotc.ast.untpd uses dotty.tools.dotc.ast, so a change to dotty.tools.dotc.ast can break dotty.tools.dotc.ast.untpd, while a change to dotty.tools.dotc.ast.untpd can't break dotty.tools.dotc.ast.
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→33 dotty.tools.dotc.ast.untpd uses dotty.tools.dotc.ast.Treespart of a loop✕
Connections
66 pairs of types, where a type in dotty.tools.dotc.ast.untpd uses a type in dotty.tools.dotc.ast.Trees. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dotty.tools.dotc.ast.untpd uses dotty.tools.dotc.ast.Trees, so a change to dotty.tools.dotc.ast.Trees can break dotty.tools.dotc.ast.untpd, while a change to dotty.tools.dotc.ast.untpd can't break dotty.tools.dotc.ast.Trees.
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.
dotty.tools.dotc.ast.Trees.Instance uses dotty.tools.dotc.util, so a change to dotty.tools.dotc.util can break dotty.tools.dotc.ast.Trees.Instance, while a change to dotty.tools.dotc.ast.Trees.Instance can't break dotty.tools.dotc.util.
Position
Below the diagonal: dotty.tools.dotc.ast.Trees.Instance uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast.Trees.Instance uses scala.quoted.runtime.impl.QuotesImpl.reflect, so a change to scala.quoted.runtime.impl.QuotesImpl.reflect can break dotty.tools.dotc.ast.Trees.Instance, while a change to dotty.tools.dotc.ast.Trees.Instance can't break scala.quoted.runtime.impl.QuotesImpl.reflect.
Position
Below the diagonal: dotty.tools.dotc.ast.Trees.Instance uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast.Trees.Instance uses scala, so a change to scala can break dotty.tools.dotc.ast.Trees.Instance, while a change to dotty.tools.dotc.ast.Trees.Instance can't break scala.
Position
Below the diagonal: dotty.tools.dotc.ast.Trees.Instance uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast.Trees.Instance uses dotty.tools.dotc.core.Names, so a change to dotty.tools.dotc.core.Names can break dotty.tools.dotc.ast.Trees.Instance, while a change to dotty.tools.dotc.ast.Trees.Instance can't break dotty.tools.dotc.core.Names.
Position
Below the diagonal: dotty.tools.dotc.ast.Trees.Instance uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast.Trees.Instance uses dotty.tools.dotc.core.Types, so a change to dotty.tools.dotc.core.Types can break dotty.tools.dotc.ast.Trees.Instance, while a change to dotty.tools.dotc.ast.Trees.Instance can't break dotty.tools.dotc.core.Types.
Position
Below the diagonal: dotty.tools.dotc.ast.Trees.Instance uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast.Trees.Instance uses dotty.tools.dotc.core.Constants, so a change to dotty.tools.dotc.core.Constants can break dotty.tools.dotc.ast.Trees.Instance, while a change to dotty.tools.dotc.ast.Trees.Instance can't break dotty.tools.dotc.core.Constants.
Position
Below the diagonal: dotty.tools.dotc.ast.Trees.Instance uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast.Trees.Instance uses dotty.tools.dotc.core.Symbols, so a change to dotty.tools.dotc.core.Symbols can break dotty.tools.dotc.ast.Trees.Instance, while a change to dotty.tools.dotc.ast.Trees.Instance can't break dotty.tools.dotc.core.Symbols.
Position
Below the diagonal: dotty.tools.dotc.ast.Trees.Instance uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast.Trees.Instance uses dotty.tools.dotc.core.Contexts, so a change to dotty.tools.dotc.core.Contexts can break dotty.tools.dotc.ast.Trees.Instance, while a change to dotty.tools.dotc.ast.Trees.Instance can't break dotty.tools.dotc.core.Contexts.
Position
Below the diagonal: dotty.tools.dotc.ast.Trees.Instance uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast.Trees.Instance uses dotty.tools.dotc.ast.untpd, so a change to dotty.tools.dotc.ast.untpd can break dotty.tools.dotc.ast.Trees.Instance, while a change to dotty.tools.dotc.ast.Trees.Instance can't break dotty.tools.dotc.ast.untpd.
Position
Below the diagonal: dotty.tools.dotc.ast.Trees.Instance uses a module listed above it, which is the healthy direction.
31→33 dotty.tools.dotc.ast.Trees.Instance uses dotty.tools.dotc.ast.Treespart of a loop✕
Connections
60 pairs of types, where a type in dotty.tools.dotc.ast.Trees.Instance uses a type in dotty.tools.dotc.ast.Trees. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dotty.tools.dotc.ast.Trees.Instance uses dotty.tools.dotc.ast.Trees, so a change to dotty.tools.dotc.ast.Trees can break dotty.tools.dotc.ast.Trees.Instance, while a change to dotty.tools.dotc.ast.Trees.Instance can't break dotty.tools.dotc.ast.Trees.
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.
dotty.tools.dotc.ast uses dotty.tools.dotc.interactive.Interactive.Include, so a change to dotty.tools.dotc.interactive.Interactive.Include can break dotty.tools.dotc.ast, while a change to dotty.tools.dotc.ast can't break dotty.tools.dotc.interactive.Interactive.Include.
Position
Below the diagonal: dotty.tools.dotc.ast uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast uses dotty.tools.dotc.util.Spans, so a change to dotty.tools.dotc.util.Spans can break dotty.tools.dotc.ast, while a change to dotty.tools.dotc.ast can't break dotty.tools.dotc.util.Spans.
Position
Below the diagonal: dotty.tools.dotc.ast uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast uses scala.collection.mutable, so a change to scala.collection.mutable can break dotty.tools.dotc.ast, while a change to dotty.tools.dotc.ast can't break scala.collection.mutable.
Position
Below the diagonal: dotty.tools.dotc.ast uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast uses dotty.tools.dotc.util, so a change to dotty.tools.dotc.util can break dotty.tools.dotc.ast, while a change to dotty.tools.dotc.ast can't break dotty.tools.dotc.util.
Position
Below the diagonal: dotty.tools.dotc.ast uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast uses scala.quoted.runtime.impl.QuotesImpl.reflect, so a change to scala.quoted.runtime.impl.QuotesImpl.reflect can break dotty.tools.dotc.ast, while a change to dotty.tools.dotc.ast can't break scala.quoted.runtime.impl.QuotesImpl.reflect.
Position
Below the diagonal: dotty.tools.dotc.ast uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast uses dotty.tools.dotc.core.Names, so a change to dotty.tools.dotc.core.Names can break dotty.tools.dotc.ast, while a change to dotty.tools.dotc.ast can't break dotty.tools.dotc.core.Names.
Position
Below the diagonal: dotty.tools.dotc.ast uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast uses dotty.tools.dotc.core.Types, so a change to dotty.tools.dotc.core.Types can break dotty.tools.dotc.ast, while a change to dotty.tools.dotc.ast can't break dotty.tools.dotc.core.Types.
Position
Below the diagonal: dotty.tools.dotc.ast uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast uses dotty.tools.dotc.core.Constants, so a change to dotty.tools.dotc.core.Constants can break dotty.tools.dotc.ast, while a change to dotty.tools.dotc.ast can't break dotty.tools.dotc.core.Constants.
Position
Below the diagonal: dotty.tools.dotc.ast uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast uses dotty.tools.dotc.core.Annotations, so a change to dotty.tools.dotc.core.Annotations can break dotty.tools.dotc.ast, while a change to dotty.tools.dotc.ast can't break dotty.tools.dotc.core.Annotations.
Position
Below the diagonal: dotty.tools.dotc.ast uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast uses dotty.tools.dotc.core.Symbols, so a change to dotty.tools.dotc.core.Symbols can break dotty.tools.dotc.ast, while a change to dotty.tools.dotc.ast can't break dotty.tools.dotc.core.Symbols.
Position
Below the diagonal: dotty.tools.dotc.ast uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast uses dotty.tools.dotc.core, so a change to dotty.tools.dotc.core can break dotty.tools.dotc.ast, while a change to dotty.tools.dotc.ast can't break dotty.tools.dotc.core.
Position
Below the diagonal: dotty.tools.dotc.ast uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast uses dotty.tools.dotc.core.Contexts, so a change to dotty.tools.dotc.core.Contexts can break dotty.tools.dotc.ast, while a change to dotty.tools.dotc.ast can't break dotty.tools.dotc.core.Contexts.
Position
Below the diagonal: dotty.tools.dotc.ast uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast uses dotty.tools.dotc.ast.untpd, so a change to dotty.tools.dotc.ast.untpd can break dotty.tools.dotc.ast, while a change to dotty.tools.dotc.ast can't break dotty.tools.dotc.ast.untpd.
Position
Below the diagonal: dotty.tools.dotc.ast uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast uses dotty.tools.dotc.ast.Trees.Instance, so a change to dotty.tools.dotc.ast.Trees.Instance can break dotty.tools.dotc.ast, while a change to dotty.tools.dotc.ast can't break dotty.tools.dotc.ast.Trees.Instance.
Position
Below the diagonal: dotty.tools.dotc.ast uses a module listed above it, which is the healthy direction.
32→33 dotty.tools.dotc.ast uses dotty.tools.dotc.ast.Treespart of a loop✕
Connections
144 pairs of types, where a type in dotty.tools.dotc.ast uses a type in dotty.tools.dotc.ast.Trees. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dotty.tools.dotc.ast uses dotty.tools.dotc.ast.Trees, so a change to dotty.tools.dotc.ast.Trees can break dotty.tools.dotc.ast, while a change to dotty.tools.dotc.ast can't break dotty.tools.dotc.ast.Trees.
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.
dotty.tools.dotc.ast.Trees uses dotty.tools.dotc.util.Spans, so a change to dotty.tools.dotc.util.Spans can break dotty.tools.dotc.ast.Trees, while a change to dotty.tools.dotc.ast.Trees can't break dotty.tools.dotc.util.Spans.
Position
Below the diagonal: dotty.tools.dotc.ast.Trees uses a module listed above it, which is the healthy direction.
51 pairs of types, where a type in dotty.tools.dotc.ast.Trees uses a type in dotty.tools.dotc.util. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dotty.tools.dotc.ast.Trees uses dotty.tools.dotc.util, so a change to dotty.tools.dotc.util can break dotty.tools.dotc.ast.Trees, while a change to dotty.tools.dotc.ast.Trees can't break dotty.tools.dotc.util.
Position
Below the diagonal: dotty.tools.dotc.ast.Trees uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast.Trees uses scala.quoted.runtime.impl.QuotesImpl.reflect, so a change to scala.quoted.runtime.impl.QuotesImpl.reflect can break dotty.tools.dotc.ast.Trees, while a change to dotty.tools.dotc.ast.Trees can't break scala.quoted.runtime.impl.QuotesImpl.reflect.
Position
Below the diagonal: dotty.tools.dotc.ast.Trees uses a module listed above it, which is the healthy direction.
28 pairs of types, where a type in dotty.tools.dotc.ast.Trees uses a type in scala. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dotty.tools.dotc.ast.Trees uses scala, so a change to scala can break dotty.tools.dotc.ast.Trees, while a change to dotty.tools.dotc.ast.Trees can't break scala.
Position
Below the diagonal: dotty.tools.dotc.ast.Trees uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast.Trees uses dotty.tools.dotc.printing.Texts, so a change to dotty.tools.dotc.printing.Texts can break dotty.tools.dotc.ast.Trees, while a change to dotty.tools.dotc.ast.Trees can't break dotty.tools.dotc.printing.Texts.
Position
Below the diagonal: dotty.tools.dotc.ast.Trees uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast.Trees uses dotty.tools.dotc.printing, so a change to dotty.tools.dotc.printing can break dotty.tools.dotc.ast.Trees, while a change to dotty.tools.dotc.ast.Trees can't break dotty.tools.dotc.printing.
Position
Below the diagonal: dotty.tools.dotc.ast.Trees uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast.Trees uses dotty.tools.dotc.core.Names, so a change to dotty.tools.dotc.core.Names can break dotty.tools.dotc.ast.Trees, while a change to dotty.tools.dotc.ast.Trees can't break dotty.tools.dotc.core.Names.
Position
Below the diagonal: dotty.tools.dotc.ast.Trees uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast.Trees uses dotty.tools.dotc.core.Denotations, so a change to dotty.tools.dotc.core.Denotations can break dotty.tools.dotc.ast.Trees, while a change to dotty.tools.dotc.ast.Trees can't break dotty.tools.dotc.core.Denotations.
Position
Below the diagonal: dotty.tools.dotc.ast.Trees uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast.Trees uses dotty.tools.dotc.core.Types, so a change to dotty.tools.dotc.core.Types can break dotty.tools.dotc.ast.Trees, while a change to dotty.tools.dotc.ast.Trees can't break dotty.tools.dotc.core.Types.
Position
Below the diagonal: dotty.tools.dotc.ast.Trees uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast.Trees uses dotty.tools.dotc.core.Constants, so a change to dotty.tools.dotc.core.Constants can break dotty.tools.dotc.ast.Trees, while a change to dotty.tools.dotc.ast.Trees can't break dotty.tools.dotc.core.Constants.
Position
Below the diagonal: dotty.tools.dotc.ast.Trees uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast.Trees uses dotty.tools.dotc.core.Symbols, so a change to dotty.tools.dotc.core.Symbols can break dotty.tools.dotc.ast.Trees, while a change to dotty.tools.dotc.ast.Trees can't break dotty.tools.dotc.core.Symbols.
Position
Below the diagonal: dotty.tools.dotc.ast.Trees uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast.Trees uses dotty.tools.dotc.core, so a change to dotty.tools.dotc.core can break dotty.tools.dotc.ast.Trees, while a change to dotty.tools.dotc.ast.Trees can't break dotty.tools.dotc.core.
Position
Below the diagonal: dotty.tools.dotc.ast.Trees uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast.Trees uses dotty.tools.dotc.core.Contexts, so a change to dotty.tools.dotc.core.Contexts can break dotty.tools.dotc.ast.Trees, while a change to dotty.tools.dotc.ast.Trees can't break dotty.tools.dotc.core.Contexts.
Position
Below the diagonal: dotty.tools.dotc.ast.Trees uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast.Trees uses dotty.tools.dotc.ast.untpd, so a change to dotty.tools.dotc.ast.untpd can break dotty.tools.dotc.ast.Trees, while a change to dotty.tools.dotc.ast.Trees can't break dotty.tools.dotc.ast.untpd.
Position
Below the diagonal: dotty.tools.dotc.ast.Trees uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast.Trees uses dotty.tools.dotc.ast.Trees.Instance, so a change to dotty.tools.dotc.ast.Trees.Instance can break dotty.tools.dotc.ast.Trees, while a change to dotty.tools.dotc.ast.Trees can't break dotty.tools.dotc.ast.Trees.Instance.
Position
Below the diagonal: dotty.tools.dotc.ast.Trees uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.ast.Trees uses dotty.tools.dotc.ast, so a change to dotty.tools.dotc.ast can break dotty.tools.dotc.ast.Trees, while a change to dotty.tools.dotc.ast.Trees can't break dotty.tools.dotc.ast.
Position
Below the diagonal: dotty.tools.dotc.ast.Trees uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.semanticdb uses dotty.tools.dotc.util.Spans, so a change to dotty.tools.dotc.util.Spans can break dotty.tools.dotc.semanticdb, while a change to dotty.tools.dotc.semanticdb can't break dotty.tools.dotc.util.Spans.
Position
Below the diagonal: dotty.tools.dotc.semanticdb uses a module listed above it, which is the healthy direction.
30 pairs of types, where a type in dotty.tools.dotc.semanticdb uses a type in scala.collection.mutable. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dotty.tools.dotc.semanticdb uses scala.collection.mutable, so a change to scala.collection.mutable can break dotty.tools.dotc.semanticdb, while a change to dotty.tools.dotc.semanticdb can't break scala.collection.mutable.
Position
Below the diagonal: dotty.tools.dotc.semanticdb uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.semanticdb uses dotty.tools.io, so a change to dotty.tools.io can break dotty.tools.dotc.semanticdb, while a change to dotty.tools.dotc.semanticdb can't break dotty.tools.io.
Position
Below the diagonal: dotty.tools.dotc.semanticdb uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.semanticdb uses dotty.tools.dotc.util, so a change to dotty.tools.dotc.util can break dotty.tools.dotc.semanticdb, while a change to dotty.tools.dotc.semanticdb can't break dotty.tools.dotc.util.
Position
Below the diagonal: dotty.tools.dotc.semanticdb uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.semanticdb uses dotty.tools.dotc.reporting, so a change to dotty.tools.dotc.reporting can break dotty.tools.dotc.semanticdb, while a change to dotty.tools.dotc.semanticdb can't break dotty.tools.dotc.reporting.
Position
Below the diagonal: dotty.tools.dotc.semanticdb uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.semanticdb uses dotty.tools.dotc.core.Phases, so a change to dotty.tools.dotc.core.Phases can break dotty.tools.dotc.semanticdb, while a change to dotty.tools.dotc.semanticdb can't break dotty.tools.dotc.core.Phases.
Position
Below the diagonal: dotty.tools.dotc.semanticdb uses a module listed above it, which is the healthy direction.
142 pairs of types, where a type in dotty.tools.dotc.semanticdb uses a type in scala. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dotty.tools.dotc.semanticdb uses scala, so a change to scala can break dotty.tools.dotc.semanticdb, while a change to dotty.tools.dotc.semanticdb can't break scala.
Position
Below the diagonal: dotty.tools.dotc.semanticdb uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.semanticdb uses dotty.tools.dotc.core.Scopes, so a change to dotty.tools.dotc.core.Scopes can break dotty.tools.dotc.semanticdb, while a change to dotty.tools.dotc.semanticdb can't break dotty.tools.dotc.core.Scopes.
Position
Below the diagonal: dotty.tools.dotc.semanticdb uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.semanticdb uses dotty.tools.dotc.core.Names, so a change to dotty.tools.dotc.core.Names can break dotty.tools.dotc.semanticdb, while a change to dotty.tools.dotc.semanticdb can't break dotty.tools.dotc.core.Names.
Position
Below the diagonal: dotty.tools.dotc.semanticdb uses a module listed above it, which is the healthy direction.
44 pairs of types, where a type in dotty.tools.dotc.semanticdb uses a type in dotty.tools.dotc.core.Types. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dotty.tools.dotc.semanticdb uses dotty.tools.dotc.core.Types, so a change to dotty.tools.dotc.core.Types can break dotty.tools.dotc.semanticdb, while a change to dotty.tools.dotc.semanticdb can't break dotty.tools.dotc.core.Types.
Position
Below the diagonal: dotty.tools.dotc.semanticdb uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.semanticdb uses dotty.tools.dotc.core.Constants, so a change to dotty.tools.dotc.core.Constants can break dotty.tools.dotc.semanticdb, while a change to dotty.tools.dotc.semanticdb can't break dotty.tools.dotc.core.Constants.
Position
Below the diagonal: dotty.tools.dotc.semanticdb uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.semanticdb uses dotty.tools.dotc.core.Annotations, so a change to dotty.tools.dotc.core.Annotations can break dotty.tools.dotc.semanticdb, while a change to dotty.tools.dotc.semanticdb can't break dotty.tools.dotc.core.Annotations.
Position
Below the diagonal: dotty.tools.dotc.semanticdb uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.semanticdb uses dotty.tools.dotc.core.Symbols, so a change to dotty.tools.dotc.core.Symbols can break dotty.tools.dotc.semanticdb, while a change to dotty.tools.dotc.semanticdb can't break dotty.tools.dotc.core.Symbols.
Position
Below the diagonal: dotty.tools.dotc.semanticdb uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.semanticdb uses dotty.tools.dotc.core, so a change to dotty.tools.dotc.core can break dotty.tools.dotc.semanticdb, while a change to dotty.tools.dotc.semanticdb can't break dotty.tools.dotc.core.
Position
Below the diagonal: dotty.tools.dotc.semanticdb uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.semanticdb uses dotty.tools.dotc.core.Contexts, so a change to dotty.tools.dotc.core.Contexts can break dotty.tools.dotc.semanticdb, while a change to dotty.tools.dotc.semanticdb can't break dotty.tools.dotc.core.Contexts.
Position
Below the diagonal: dotty.tools.dotc.semanticdb uses a module listed above it, which is the healthy direction.
dotty.tools.dotc.semanticdb uses dotty.tools.dotc.ast.Trees, so a change to dotty.tools.dotc.ast.Trees can break dotty.tools.dotc.semanticdb, while a change to dotty.tools.dotc.semanticdb can't break dotty.tools.dotc.ast.Trees.
Position
Below the diagonal: dotty.tools.dotc.semanticdb uses a module listed above it, which is the healthy direction.
34→35 dotty.tools.dotc.semanticdb uses dotty.tools.dotcpart of a loop✕
Connections
1 pair of types, where a type in dotty.tools.dotc.semanticdb uses a type in dotty.tools.dotc.
dotty.tools.dotc.semanticdb uses dotty.tools.dotc, so a change to dotty.tools.dotc can break dotty.tools.dotc.semanticdb, while a change to dotty.tools.dotc.semanticdb can't break dotty.tools.dotc.
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.
dotty.tools.dotc uses dotty.tools.dotc.interactive.Interactive.Include, so a change to dotty.tools.dotc.interactive.Interactive.Include can break dotty.tools.dotc, while a change to dotty.tools.dotc can't break dotty.tools.dotc.interactive.Interactive.Include.
Position
Below the diagonal: dotty.tools.dotc uses a module listed above it, which is the healthy direction.
dotty.tools.dotc uses dotty.tools.dotc.util.Spans, so a change to dotty.tools.dotc.util.Spans can break dotty.tools.dotc, while a change to dotty.tools.dotc can't break dotty.tools.dotc.util.Spans.
Position
Below the diagonal: dotty.tools.dotc uses a module listed above it, which is the healthy direction.
dotty.tools.dotc uses dotty.tools.io, so a change to dotty.tools.io can break dotty.tools.dotc, while a change to dotty.tools.dotc can't break dotty.tools.io.
Position
Below the diagonal: dotty.tools.dotc uses a module listed above it, which is the healthy direction.
dotty.tools.dotc uses dotty.tools.dotc.util, so a change to dotty.tools.dotc.util can break dotty.tools.dotc, while a change to dotty.tools.dotc can't break dotty.tools.dotc.util.
Position
Below the diagonal: dotty.tools.dotc uses a module listed above it, which is the healthy direction.
dotty.tools.dotc uses dotty.tools.dotc.reporting, so a change to dotty.tools.dotc.reporting can break dotty.tools.dotc, while a change to dotty.tools.dotc can't break dotty.tools.dotc.reporting.
Position
Below the diagonal: dotty.tools.dotc uses a module listed above it, which is the healthy direction.
dotty.tools.dotc uses dotty.tools.dotc.typer, so a change to dotty.tools.dotc.typer can break dotty.tools.dotc, while a change to dotty.tools.dotc can't break dotty.tools.dotc.typer.
Position
Below the diagonal: dotty.tools.dotc uses a module listed above it, which is the healthy direction.
dotty.tools.dotc uses dotty.tools.dotc.core.Phases, so a change to dotty.tools.dotc.core.Phases can break dotty.tools.dotc, while a change to dotty.tools.dotc can't break dotty.tools.dotc.core.Phases.
Position
Below the diagonal: dotty.tools.dotc uses a module listed above it, which is the healthy direction.
dotty.tools.dotc uses dotty.tools.dotc.core.Names, so a change to dotty.tools.dotc.core.Names can break dotty.tools.dotc, while a change to dotty.tools.dotc can't break dotty.tools.dotc.core.Names.
Position
Below the diagonal: dotty.tools.dotc uses a module listed above it, which is the healthy direction.
dotty.tools.dotc uses dotty.tools.dotc.core.Symbols, so a change to dotty.tools.dotc.core.Symbols can break dotty.tools.dotc, while a change to dotty.tools.dotc can't break dotty.tools.dotc.core.Symbols.
Position
Below the diagonal: dotty.tools.dotc uses a module listed above it, which is the healthy direction.
dotty.tools.dotc uses dotty.tools.dotc.cc, so a change to dotty.tools.dotc.cc can break dotty.tools.dotc, while a change to dotty.tools.dotc can't break dotty.tools.dotc.cc.
Position
Below the diagonal: dotty.tools.dotc uses a module listed above it, which is the healthy direction.
dotty.tools.dotc uses dotty.tools.dotc.core, so a change to dotty.tools.dotc.core can break dotty.tools.dotc, while a change to dotty.tools.dotc can't break dotty.tools.dotc.core.
Position
Below the diagonal: dotty.tools.dotc uses a module listed above it, which is the healthy direction.
dotty.tools.dotc uses dotty.tools.dotc.config, so a change to dotty.tools.dotc.config can break dotty.tools.dotc, while a change to dotty.tools.dotc can't break dotty.tools.dotc.config.
Position
Below the diagonal: dotty.tools.dotc uses a module listed above it, which is the healthy direction.
dotty.tools.dotc uses dotty.tools.dotc.core.Contexts, so a change to dotty.tools.dotc.core.Contexts can break dotty.tools.dotc, while a change to dotty.tools.dotc can't break dotty.tools.dotc.core.Contexts.
Position
Below the diagonal: dotty.tools.dotc uses a module listed above it, which is the healthy direction.
dotty.tools.dotc uses dotty.tools.dotc.ast.Trees, so a change to dotty.tools.dotc.ast.Trees can break dotty.tools.dotc, while a change to dotty.tools.dotc can't break dotty.tools.dotc.ast.Trees.
Position
Below the diagonal: dotty.tools.dotc uses a module listed above it, which is the healthy direction.
dotty.tools.dotc uses dotty.tools.dotc.semanticdb, so a change to dotty.tools.dotc.semanticdb can break dotty.tools.dotc, while a change to dotty.tools.dotc can't break dotty.tools.dotc.semanticdb.
Position
Below the diagonal: dotty.tools.dotc uses a module listed above it, which is the healthy direction.
dotty.tools.pc uses dotty.tools.dotc.interactive.Interactive.Include, so a change to dotty.tools.dotc.interactive.Interactive.Include can break dotty.tools.pc, while a change to dotty.tools.pc can't break dotty.tools.dotc.interactive.Interactive.Include.
Position
Below the diagonal: dotty.tools.pc uses a module listed above it, which is the healthy direction.
dotty.tools.pc uses dotty.tools.dotc.util.Spans, so a change to dotty.tools.dotc.util.Spans can break dotty.tools.pc, while a change to dotty.tools.pc can't break dotty.tools.dotc.util.Spans.
Position
Below the diagonal: dotty.tools.pc uses a module listed above it, which is the healthy direction.
dotty.tools.pc uses scala.collection.mutable, so a change to scala.collection.mutable can break dotty.tools.pc, while a change to dotty.tools.pc can't break scala.collection.mutable.
Position
Below the diagonal: dotty.tools.pc uses a module listed above it, which is the healthy direction.
dotty.tools.pc uses dotty.tools.io, so a change to dotty.tools.io can break dotty.tools.pc, while a change to dotty.tools.pc can't break dotty.tools.io.
Position
Below the diagonal: dotty.tools.pc uses a module listed above it, which is the healthy direction.
dotty.tools.pc uses dotty.tools.dotc.util, so a change to dotty.tools.dotc.util can break dotty.tools.pc, while a change to dotty.tools.pc can't break dotty.tools.dotc.util.
Position
Below the diagonal: dotty.tools.pc uses a module listed above it, which is the healthy direction.
dotty.tools.pc uses dotty.tools.dotc.reporting, so a change to dotty.tools.dotc.reporting can break dotty.tools.pc, while a change to dotty.tools.pc can't break dotty.tools.dotc.reporting.
Position
Below the diagonal: dotty.tools.pc uses a module listed above it, which is the healthy direction.
dotty.tools.pc uses scala.quoted.runtime.impl.QuotesImpl.reflect, so a change to scala.quoted.runtime.impl.QuotesImpl.reflect can break dotty.tools.pc, while a change to dotty.tools.pc can't break scala.quoted.runtime.impl.QuotesImpl.reflect.
Position
Below the diagonal: dotty.tools.pc uses a module listed above it, which is the healthy direction.
44 pairs of types, where a type in dotty.tools.pc uses a type in scala. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dotty.tools.pc uses dotty.tools.dotc.printing.Texts, so a change to dotty.tools.dotc.printing.Texts can break dotty.tools.pc, while a change to dotty.tools.pc can't break dotty.tools.dotc.printing.Texts.
Position
Below the diagonal: dotty.tools.pc uses a module listed above it, which is the healthy direction.
dotty.tools.pc uses dotty.tools.dotc.core.Names, so a change to dotty.tools.dotc.core.Names can break dotty.tools.pc, while a change to dotty.tools.pc can't break dotty.tools.dotc.core.Names.
Position
Below the diagonal: dotty.tools.pc uses a module listed above it, which is the healthy direction.
dotty.tools.pc uses dotty.tools.dotc.core.Types, so a change to dotty.tools.dotc.core.Types can break dotty.tools.pc, while a change to dotty.tools.pc can't break dotty.tools.dotc.core.Types.
Position
Below the diagonal: dotty.tools.pc uses a module listed above it, which is the healthy direction.
dotty.tools.pc uses dotty.tools.dotc.core.Symbols, so a change to dotty.tools.dotc.core.Symbols can break dotty.tools.pc, while a change to dotty.tools.pc can't break dotty.tools.dotc.core.Symbols.
Position
Below the diagonal: dotty.tools.pc uses a module listed above it, which is the healthy direction.
dotty.tools.pc uses dotty.tools.dotc.core, so a change to dotty.tools.dotc.core can break dotty.tools.pc, while a change to dotty.tools.pc can't break dotty.tools.dotc.core.
Position
Below the diagonal: dotty.tools.pc uses a module listed above it, which is the healthy direction.
27 pairs of types, where a type in dotty.tools.pc uses a type in dotty.tools.dotc.core.Contexts. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dotty.tools.pc uses dotty.tools.dotc.core.Contexts, so a change to dotty.tools.dotc.core.Contexts can break dotty.tools.pc, while a change to dotty.tools.pc can't break dotty.tools.dotc.core.Contexts.
Position
Below the diagonal: dotty.tools.pc uses a module listed above it, which is the healthy direction.
29 pairs of types, where a type in dotty.tools.pc uses a type in dotty.tools.dotc.ast.Trees. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dotty.tools.pc uses dotty.tools.dotc.ast.Trees, so a change to dotty.tools.dotc.ast.Trees can break dotty.tools.pc, while a change to dotty.tools.pc can't break dotty.tools.dotc.ast.Trees.
Position
Below the diagonal: dotty.tools.pc uses a module listed above it, which is the healthy direction.
dotty.tools.pc uses dotty.tools.dotc.semanticdb, so a change to dotty.tools.dotc.semanticdb can break dotty.tools.pc, while a change to dotty.tools.pc can't break dotty.tools.dotc.semanticdb.
Position
Below the diagonal: dotty.tools.pc uses a module listed above it, which is the healthy direction.
dotty.tools.backend.jvm uses scala.collection.mutable, so a change to scala.collection.mutable can break dotty.tools.backend.jvm, while a change to dotty.tools.backend.jvm can't break scala.collection.mutable.
Position
Below the diagonal: dotty.tools.backend.jvm uses a module listed above it, which is the healthy direction.
dotty.tools.backend.jvm uses dotty.tools.dotc.util, so a change to dotty.tools.dotc.util can break dotty.tools.backend.jvm, while a change to dotty.tools.backend.jvm can't break dotty.tools.dotc.util.
Position
Below the diagonal: dotty.tools.backend.jvm uses a module listed above it, which is the healthy direction.
dotty.tools.backend.jvm uses dotty.tools.dotc.core.Phases, so a change to dotty.tools.dotc.core.Phases can break dotty.tools.backend.jvm, while a change to dotty.tools.backend.jvm can't break dotty.tools.dotc.core.Phases.
Position
Below the diagonal: dotty.tools.backend.jvm uses a module listed above it, which is the healthy direction.
39 pairs of types, where a type in dotty.tools.backend.jvm uses a type in scala. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dotty.tools.backend.jvm uses scala, so a change to scala can break dotty.tools.backend.jvm, while a change to dotty.tools.backend.jvm can't break scala.
Position
Below the diagonal: dotty.tools.backend.jvm uses a module listed above it, which is the healthy direction.
dotty.tools.backend.jvm uses dotty.tools.dotc.core.Names, so a change to dotty.tools.dotc.core.Names can break dotty.tools.backend.jvm, while a change to dotty.tools.backend.jvm can't break dotty.tools.dotc.core.Names.
Position
Below the diagonal: dotty.tools.backend.jvm uses a module listed above it, which is the healthy direction.
dotty.tools.backend.jvm uses dotty.tools.dotc.core.Types, so a change to dotty.tools.dotc.core.Types can break dotty.tools.backend.jvm, while a change to dotty.tools.backend.jvm can't break dotty.tools.dotc.core.Types.
Position
Below the diagonal: dotty.tools.backend.jvm uses a module listed above it, which is the healthy direction.
dotty.tools.backend.jvm uses dotty.tools.dotc.core.Symbols, so a change to dotty.tools.dotc.core.Symbols can break dotty.tools.backend.jvm, while a change to dotty.tools.backend.jvm can't break dotty.tools.dotc.core.Symbols.
Position
Below the diagonal: dotty.tools.backend.jvm uses a module listed above it, which is the healthy direction.
dotty.tools.backend.jvm uses dotty.tools.dotc.core.Contexts, so a change to dotty.tools.dotc.core.Contexts can break dotty.tools.backend.jvm, while a change to dotty.tools.backend.jvm can't break dotty.tools.dotc.core.Contexts.
Position
Below the diagonal: dotty.tools.backend.jvm uses a module listed above it, which is the healthy direction.
dotty.tools.backend.jvm uses dotty.tools.dotc.ast.Trees, so a change to dotty.tools.dotc.ast.Trees can break dotty.tools.backend.jvm, while a change to dotty.tools.backend.jvm can't break dotty.tools.dotc.ast.Trees.
Position
Below the diagonal: dotty.tools.backend.jvm uses a module listed above it, which is the healthy direction.
dotty.tools.backend.jvm uses dotty.tools.dotc, so a change to dotty.tools.dotc can break dotty.tools.backend.jvm, while a change to dotty.tools.backend.jvm can't break dotty.tools.dotc.
Position
Below the diagonal: dotty.tools.backend.jvm uses a module listed above it, which is the healthy direction.
dotty.tools.pc.completions uses dotty.tools.dotc.interactive.Interactive.Include, so a change to dotty.tools.dotc.interactive.Interactive.Include can break dotty.tools.pc.completions, while a change to dotty.tools.pc.completions can't break dotty.tools.dotc.interactive.Interactive.Include.
Position
Below the diagonal: dotty.tools.pc.completions uses a module listed above it, which is the healthy direction.
dotty.tools.pc.completions uses scala.collection.mutable, so a change to scala.collection.mutable can break dotty.tools.pc.completions, while a change to dotty.tools.pc.completions can't break scala.collection.mutable.
Position
Below the diagonal: dotty.tools.pc.completions uses a module listed above it, which is the healthy direction.
dotty.tools.pc.completions uses dotty.tools.io, so a change to dotty.tools.io can break dotty.tools.pc.completions, while a change to dotty.tools.pc.completions can't break dotty.tools.io.
Position
Below the diagonal: dotty.tools.pc.completions uses a module listed above it, which is the healthy direction.
dotty.tools.pc.completions uses dotty.tools.dotc.util, so a change to dotty.tools.dotc.util can break dotty.tools.pc.completions, while a change to dotty.tools.pc.completions can't break dotty.tools.dotc.util.
Position
Below the diagonal: dotty.tools.pc.completions uses a module listed above it, which is the healthy direction.
dotty.tools.pc.completions uses scala, so a change to scala can break dotty.tools.pc.completions, while a change to dotty.tools.pc.completions can't break scala.
Position
Below the diagonal: dotty.tools.pc.completions uses a module listed above it, which is the healthy direction.
dotty.tools.pc.completions uses dotty.tools.dotc.core.Names, so a change to dotty.tools.dotc.core.Names can break dotty.tools.pc.completions, while a change to dotty.tools.pc.completions can't break dotty.tools.dotc.core.Names.
Position
Below the diagonal: dotty.tools.pc.completions uses a module listed above it, which is the healthy direction.
dotty.tools.pc.completions uses dotty.tools.dotc.core.Denotations, so a change to dotty.tools.dotc.core.Denotations can break dotty.tools.pc.completions, while a change to dotty.tools.pc.completions can't break dotty.tools.dotc.core.Denotations.
Position
Below the diagonal: dotty.tools.pc.completions uses a module listed above it, which is the healthy direction.
dotty.tools.pc.completions uses dotty.tools.dotc.core.Types, so a change to dotty.tools.dotc.core.Types can break dotty.tools.pc.completions, while a change to dotty.tools.pc.completions can't break dotty.tools.dotc.core.Types.
Position
Below the diagonal: dotty.tools.pc.completions uses a module listed above it, which is the healthy direction.
dotty.tools.pc.completions uses dotty.tools.dotc.core.Constants, so a change to dotty.tools.dotc.core.Constants can break dotty.tools.pc.completions, while a change to dotty.tools.pc.completions can't break dotty.tools.dotc.core.Constants.
Position
Below the diagonal: dotty.tools.pc.completions uses a module listed above it, which is the healthy direction.
dotty.tools.pc.completions uses dotty.tools.dotc.core.SymDenotations, so a change to dotty.tools.dotc.core.SymDenotations can break dotty.tools.pc.completions, while a change to dotty.tools.pc.completions can't break dotty.tools.dotc.core.SymDenotations.
Position
Below the diagonal: dotty.tools.pc.completions uses a module listed above it, which is the healthy direction.
dotty.tools.pc.completions uses dotty.tools.dotc.core.Symbols, so a change to dotty.tools.dotc.core.Symbols can break dotty.tools.pc.completions, while a change to dotty.tools.pc.completions can't break dotty.tools.dotc.core.Symbols.
Position
Below the diagonal: dotty.tools.pc.completions uses a module listed above it, which is the healthy direction.
dotty.tools.pc.completions uses dotty.tools.dotc.core.Contexts, so a change to dotty.tools.dotc.core.Contexts can break dotty.tools.pc.completions, while a change to dotty.tools.pc.completions can't break dotty.tools.dotc.core.Contexts.
Position
Below the diagonal: dotty.tools.pc.completions uses a module listed above it, which is the healthy direction.
dotty.tools.pc.completions uses dotty.tools.dotc.ast.untpd, so a change to dotty.tools.dotc.ast.untpd can break dotty.tools.pc.completions, while a change to dotty.tools.pc.completions can't break dotty.tools.dotc.ast.untpd.
Position
Below the diagonal: dotty.tools.pc.completions uses a module listed above it, which is the healthy direction.
dotty.tools.pc.completions uses dotty.tools.dotc.ast.Trees, so a change to dotty.tools.dotc.ast.Trees can break dotty.tools.pc.completions, while a change to dotty.tools.pc.completions can't break dotty.tools.dotc.ast.Trees.
Position
Below the diagonal: dotty.tools.pc.completions uses a module listed above it, which is the healthy direction.
dotty.tools.pc.completions uses dotty.tools.pc, so a change to dotty.tools.pc can break dotty.tools.pc.completions, while a change to dotty.tools.pc.completions can't break dotty.tools.pc.
Position
Below the diagonal: dotty.tools.pc.completions uses a module listed above it, which is the healthy direction.
dotty.tools.repl uses dotty.tools.dotc.interactive.Interactive.Include, so a change to dotty.tools.dotc.interactive.Interactive.Include can break dotty.tools.repl, while a change to dotty.tools.repl can't break dotty.tools.dotc.interactive.Interactive.Include.
Position
Below the diagonal: dotty.tools.repl uses a module listed above it, which is the healthy direction.
dotty.tools.repl uses dotty.tools.dotc.util.Spans, so a change to dotty.tools.dotc.util.Spans can break dotty.tools.repl, while a change to dotty.tools.repl can't break dotty.tools.dotc.util.Spans.
Position
Below the diagonal: dotty.tools.repl uses a module listed above it, which is the healthy direction.
dotty.tools.repl uses scala.collection.mutable, so a change to scala.collection.mutable can break dotty.tools.repl, while a change to dotty.tools.repl can't break scala.collection.mutable.
Position
Below the diagonal: dotty.tools.repl uses a module listed above it, which is the healthy direction.
dotty.tools.repl uses dotty.tools.io, so a change to dotty.tools.io can break dotty.tools.repl, while a change to dotty.tools.repl can't break dotty.tools.io.
Position
Below the diagonal: dotty.tools.repl uses a module listed above it, which is the healthy direction.
dotty.tools.repl uses dotty.tools.dotc.util, so a change to dotty.tools.dotc.util can break dotty.tools.repl, while a change to dotty.tools.repl can't break dotty.tools.dotc.util.
Position
Below the diagonal: dotty.tools.repl uses a module listed above it, which is the healthy direction.
dotty.tools.repl uses dotty.tools.dotc.reporting, so a change to dotty.tools.dotc.reporting can break dotty.tools.repl, while a change to dotty.tools.repl can't break dotty.tools.dotc.reporting.
Position
Below the diagonal: dotty.tools.repl uses a module listed above it, which is the healthy direction.
dotty.tools.repl uses dotty.tools.dotc.core.Phases, so a change to dotty.tools.dotc.core.Phases can break dotty.tools.repl, while a change to dotty.tools.repl can't break dotty.tools.dotc.core.Phases.
Position
Below the diagonal: dotty.tools.repl uses a module listed above it, which is the healthy direction.
26 pairs of types, where a type in dotty.tools.repl uses a type in scala. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dotty.tools.repl uses dotty.tools.dotc.printing.Texts, so a change to dotty.tools.dotc.printing.Texts can break dotty.tools.repl, while a change to dotty.tools.repl can't break dotty.tools.dotc.printing.Texts.
Position
Below the diagonal: dotty.tools.repl uses a module listed above it, which is the healthy direction.
dotty.tools.repl uses dotty.tools.dotc.core.Names, so a change to dotty.tools.dotc.core.Names can break dotty.tools.repl, while a change to dotty.tools.repl can't break dotty.tools.dotc.core.Names.
Position
Below the diagonal: dotty.tools.repl uses a module listed above it, which is the healthy direction.
dotty.tools.repl uses dotty.tools.dotc.core.Denotations, so a change to dotty.tools.dotc.core.Denotations can break dotty.tools.repl, while a change to dotty.tools.repl can't break dotty.tools.dotc.core.Denotations.
Position
Below the diagonal: dotty.tools.repl uses a module listed above it, which is the healthy direction.
dotty.tools.repl uses dotty.tools.dotc.core.Symbols, so a change to dotty.tools.dotc.core.Symbols can break dotty.tools.repl, while a change to dotty.tools.repl can't break dotty.tools.dotc.core.Symbols.
Position
Below the diagonal: dotty.tools.repl uses a module listed above it, which is the healthy direction.
dotty.tools.repl uses dotty.tools.dotc.core, so a change to dotty.tools.dotc.core can break dotty.tools.repl, while a change to dotty.tools.repl can't break dotty.tools.dotc.core.
Position
Below the diagonal: dotty.tools.repl uses a module listed above it, which is the healthy direction.
dotty.tools.repl uses dotty.tools.dotc.config, so a change to dotty.tools.dotc.config can break dotty.tools.repl, while a change to dotty.tools.repl can't break dotty.tools.dotc.config.
Position
Below the diagonal: dotty.tools.repl uses a module listed above it, which is the healthy direction.
dotty.tools.repl uses dotty.tools.dotc.core.Contexts, so a change to dotty.tools.dotc.core.Contexts can break dotty.tools.repl, while a change to dotty.tools.repl can't break dotty.tools.dotc.core.Contexts.
Position
Below the diagonal: dotty.tools.repl uses a module listed above it, which is the healthy direction.
dotty.tools.repl uses dotty.tools.dotc.ast.Trees, so a change to dotty.tools.dotc.ast.Trees can break dotty.tools.repl, while a change to dotty.tools.repl can't break dotty.tools.dotc.ast.Trees.
Position
Below the diagonal: dotty.tools.repl uses a module listed above it, which is the healthy direction.
dotty.tools.repl uses dotty.tools.dotc, so a change to dotty.tools.dotc can break dotty.tools.repl, while a change to dotty.tools.repl can't break dotty.tools.dotc.
Position
Below the diagonal: dotty.tools.repl uses a module listed above it, which is the healthy direction.
dotty.tools.scaladoc uses dotty.tools.dotc.interactive.Interactive.Include, so a change to dotty.tools.dotc.interactive.Interactive.Include can break dotty.tools.scaladoc, while a change to dotty.tools.scaladoc can't break dotty.tools.dotc.interactive.Interactive.Include.
Position
Below the diagonal: dotty.tools.scaladoc uses a module listed above it, which is the healthy direction.
dotty.tools.scaladoc uses scala.collection.mutable, so a change to scala.collection.mutable can break dotty.tools.scaladoc, while a change to dotty.tools.scaladoc can't break scala.collection.mutable.
Position
Below the diagonal: dotty.tools.scaladoc uses a module listed above it, which is the healthy direction.
dotty.tools.scaladoc uses dotty.tools.io, so a change to dotty.tools.io can break dotty.tools.scaladoc, while a change to dotty.tools.scaladoc can't break dotty.tools.io.
Position
Below the diagonal: dotty.tools.scaladoc uses a module listed above it, which is the healthy direction.
dotty.tools.scaladoc uses dotty.tools.dotc.reporting, so a change to dotty.tools.dotc.reporting can break dotty.tools.scaladoc, while a change to dotty.tools.scaladoc can't break dotty.tools.dotc.reporting.
Position
Below the diagonal: dotty.tools.scaladoc uses a module listed above it, which is the healthy direction.
dotty.tools.scaladoc uses dotty.tools.dotc.typer, so a change to dotty.tools.dotc.typer can break dotty.tools.scaladoc, while a change to dotty.tools.scaladoc can't break dotty.tools.dotc.typer.
Position
Below the diagonal: dotty.tools.scaladoc uses a module listed above it, which is the healthy direction.
30 pairs of types, where a type in dotty.tools.scaladoc uses a type in scala. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
dotty.tools.scaladoc uses dotty.tools.dotc.core.Annotations, so a change to dotty.tools.dotc.core.Annotations can break dotty.tools.scaladoc, while a change to dotty.tools.scaladoc can't break dotty.tools.dotc.core.Annotations.
Position
Below the diagonal: dotty.tools.scaladoc uses a module listed above it, which is the healthy direction.
dotty.tools.scaladoc uses dotty.tools.dotc.cc.Capabilities, so a change to dotty.tools.dotc.cc.Capabilities can break dotty.tools.scaladoc, while a change to dotty.tools.scaladoc can't break dotty.tools.dotc.cc.Capabilities.
Position
Below the diagonal: dotty.tools.scaladoc uses a module listed above it, which is the healthy direction.
dotty.tools.scaladoc uses dotty.tools.dotc.core, so a change to dotty.tools.dotc.core can break dotty.tools.scaladoc, while a change to dotty.tools.scaladoc can't break dotty.tools.dotc.core.
Position
Below the diagonal: dotty.tools.scaladoc uses a module listed above it, which is the healthy direction.
dotty.tools.scaladoc uses dotty.tools.dotc.config, so a change to dotty.tools.dotc.config can break dotty.tools.scaladoc, while a change to dotty.tools.scaladoc can't break dotty.tools.dotc.config.
Position
Below the diagonal: dotty.tools.scaladoc uses a module listed above it, which is the healthy direction.
dotty.tools.scaladoc uses dotty.tools.dotc.core.Contexts, so a change to dotty.tools.dotc.core.Contexts can break dotty.tools.scaladoc, while a change to dotty.tools.scaladoc can't break dotty.tools.dotc.core.Contexts.
Position
Below the diagonal: dotty.tools.scaladoc uses a module listed above it, which is the healthy direction.
dotty.tools.scaladoc uses dotty.tools.pc, so a change to dotty.tools.pc can break dotty.tools.scaladoc, while a change to dotty.tools.scaladoc can't break dotty.tools.pc.
Position
Below the diagonal: dotty.tools.scaladoc uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 53% · Adequate · gated by D2, R1 ·
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
23
High / Critical
A07:2025 — Authentication Failures
2
High / Critical
Roadmap
Begin by establishing type safety in the frontend by integrating a TypeScript check into the build process, prioritizing high-traffic modules. Simultaneously, address the 39 instances of swallowed exceptions and resolve the single missing architectural decision record to improve code reliability and documentation. Next, clear the 599 explicit debt comments, starting with the identified high-count files, to reduce technical clutter. Finally, implement a static analysis security step in CI to prevent security regressions from reaching production.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
Add a SAST step to CI running what this repository's stack ships: scalafix or scapegoat — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
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 — 20
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 — 2339
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 — 177
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 10
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 72 of 72 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); none rely on LLM judgement. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 72 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, 2518 of 2536 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.scala, .java) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo. To have real coverage read, produce a coverage report in a standard format (`addSbtPlugin("org.scoverage" % "sbt-scoverage" % "<version>")` in `project/plugins.sbt`, then `sbt clean coverage test coverageReport`, or JaCoCo XML — `mvn jacoco:report` or the Gradle `jacocoTestReport` task) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (`addSbtPlugin("org.scoverage" % "sbt-scoverage" % "<version>")` in `project/plugins.sbt`, then `sbt clean coverage test coverageReport`, or JaCoCo XML — `mvn jacoco:report` or the Gradle `jacocoTestReport` task) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.scala, .java) and this repository declares an sbt build (repository root, 29 test files), but it was not re-run: no test result was produced. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares an sbt build (build.sbt), but the licence verdict published here was taken over its gem dependencies. Nothing was read about its sbt dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D19 Documentation Quality — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This 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 — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 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: 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
D27 Navigability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `bench-run/src/main/scala/dotty/tools/benchmarks/tuples/Map.scala`, `bench-run/src/main/scala/dotty/tools/benchmarks/tuples/TupleOps.scala`, `community-build/src/scala/dotty/communitybuild/Main.scala`, `community-build/src/scala/dotty/communitybuild/projects.scala`, `compiler/src/dotty/tools/MainGenericCompiler.scala`, … (+475 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
AXR1 Runtime accessibility — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DockerCompose (docs/_spec/docker-compose.yml). compose up failed (exit 17 — an image could not be built) — time="2026-10-26T06:22:57Z" level=warning msg="The \"UID\" variable is not set. Defaulting to a blank string." failed to solve: ruby:2.7: failed to resolve source metadata for docker.io/library/ruby:2.7: failed to do request: Head "https://registry-1.docker.io/v2/library/ruby/manifests/2.7": Forbidden; runtime evidence skipped.
C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data 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 personal data controls.
C2 Access Controls — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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.
IC1 Incompleteness & stubs — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 53 further occurrence(s) are not listed individually; the score already reflects all 93.
M4 Documentation accuracy — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9). Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
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.
M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
414 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was TypeComparer.recur at 421. A further 33 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 TastyFormat.astTagToString at 147 — they are counted neither in the figure above nor in this dimension's score. 18 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: tasty/src/dotty/tools/tasty/TastyFormat.scala (TastyFormat.astTagToString at 147), library/src/scala/quoted/Quotes.scala (TreeAccumulator.foldOverTree at 50), compiler/src/dotty/tools/dotc/ast/untpd.scala (UntypedTreeAccumulator.foldMoreCases at 28), scaladoc/src/dotty/tools/scaladoc/renderers/DocRenderer.scala (DocRender.renderElement at 27), library/src/scala/quoted/Expr.scala (Expr.ofTupleFromSeq at 24), and 13 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.
+ 407 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 1 body over 240 down to 240 or less in Cyclomatic Complexity — start with TypeComparer.recur (cyclomatic 421). — Refactoring it lifts Cyclomatic Complexity from 4.5 to about 5.1/10.
Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 765 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 4 bodies over 240 down to 240 or less in Cognitive Complexity — start with TypeComparer.recur (cognitive 614), Typer.adapt1 (cognitive 357), RefChecks.checkAllOverrides (cognitive 322). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 4 together lifts Cognitive Complexity from 2.0 to about 3.2/10, projected with the scoring formula itself and assuming each lands exactly at 240; a cleaner split scores higher.
Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.2 / 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 92 TooManyMethods finding(s) in God Classes — start with Types.scala (3), SymDenotations.scala (2), tpd.scala (2). — One of this dimension's main actionable groups (92 warning-level).
Resolve the 74 FileTooLong finding(s) in God Classes — start with Inliner.scala (2), Types.scala, Typer.scala. — One of this dimension's main actionable groups (74 warning-level).
Resolve the 22 MethodTooLong finding(s) in God Classes — start with PlainPrinter.scala (4), ErrorReporting.scala (3), PrepareInlineable.scala (3). — One of this dimension's main actionable groups (22 warning-level).
Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
107 duplicated block group(s) detected. A further 9 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.
+ 46 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 13 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with ProdConsAnalyzer.scala, Periods.scala, Types.scala. — One of this dimension's main actionable groups (13 warning-level).
Resolve the 11 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with NumericRange.scala (3), JavaScanners.scala, SemanticdbOutputStream.scala. — One of this dimension's main actionable groups (11 warning-level).
Resolve the 6 Members sharing a duplicated core (4 members, 50+ identical tokens) finding(s) in Code Duplication — start with AnyAccumulator.scala (3), JavaScanners.scala, IteratorStepper.scala. — One of this dimension's main actionable groups (6 warning-level).
Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
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 29 Low cohesion finding(s) in Cohesion (LCOM4) — start with SymDenotations.scala (2), Scanners.scala (2), TreeChecker.scala. — One of this dimension's main actionable groups (29 warning-level).
Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
6192 test methods: 6169 unit, 2 integration, 0 BDD, 21 e2e. The Scala suite contributes 6192 test case(s) across 548 file(s) in a test source set declaring at least one — every `test("…")`, `it("…")`, `property("…")` and `"…" in {…}` registration and every JUnit `@Test`, which is how munit, ScalaTest, utest, ZIO Test and specs2 declare a case; a case registered under a computed name is not counted, so this is a floor. Its tier split is INFERRED from paths and file names, except sbt's src/it source set, which the build declares.
What it measures: Whether dependencies are current, secure, and not bloated.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.
3 outdated direct gem(s), 0 pinning defect(s). 4 declaration(s) graded against rubygems.org, 4 of them against a version resolved in a committed Gemfile.lock. Whether any of these gems is DEPRECATED or YANKED is not graded — rubygems.org publishes no deprecation marker, and a yank removes a version rather than flagging it. Whether any is UNMAINTAINED is not graded either: no registry publishes a maintenance status, and release age does not stand in for one. Whether any is UNUSED is a source question, not a registry one. Known CVEs in this dependency graph are D30's question, read from the manifest there.
Outdated: jekyll · ×3
✓ On the Gold path — maintain.
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
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 31 shipped gem(s) use a banned license. Licences were resolved from rubygems.org over the 31 gem(s) a consumer installs — this repository's runtime declarations closed transitively over its committed Gemfile.lock. Development-group and `add_development_dependency` gems are excluded: they are not distributed with this repository. ★ COVERAGE OF THIS VERDICT: it grades this repository's gem dependencies and nothing else. The repository also declares an sbt build (build.sbt), and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Resolve the 50 Hotspot finding(s) in Churn × Complexity Hotspots — start with Inliner.scala (2), TypeComparer.scala, Typer.scala. — One of this dimension's main actionable groups (50 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.2 / 10Exemplary✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
71 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is compiler/src/dotty/tools/backend/jvm/opt/Inliner.scala. Counted over 867 of the 1629 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1 · ×5
Further sole-owners (lower concentration)
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
732 deducted task-comment markers across 339569 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.
TodoComment repeated across 16 files · ×2tests/run-tasty-inspector/i10359.scala:26
What to do
Resolve the 599 TodoComment finding(s) in Explicit Debt — start with t8549.scala (15), QuotesImpl.scala (15), CompletionExtraConstructorSuite.scala (12). — One of this dimension's main actionable groups (599 warning-level).
Resolve the 61 FixmeComment finding(s) in Explicit Debt — start with SourceTree.scala (4), sep-paths-derivedcaps-consume.scala (3), Macro_1.scala (2). — One of this dimension's main actionable groups (61 warning-level).
Resolve the 16 HackComment finding(s) in Explicit Debt — start with tcpoly_seq.scala (2), tcpoly_seq_typealias.scala (2), ClasspathFromClassloader.scala (2). — One of this dimension's main actionable groups (16 warning-level).
Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
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: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.
1 of 2 build units (sbt) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: REDACTED 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.
1 finding(s): 0 critical, 1 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
What to do
Resolve the 1 REDACTED finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
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).
24 finding(s): 0 critical, 16 high, 8 medium, 0 low. semgrep hit a parse error in 480 file(s) — `bench-micro/src/main/scala/dotty/tools/benchmarks/specializedtraits/MatrixMultiplication.scala`, `bench-micro/src/main/scala/dotty/tools/benchmarks/specializedtraits/MatrixMultiplicationPoly.scala`, `bench-micro/src/main/scala/dotty/tools/benchmarks/specializedtraits/PairHashing.scala`, `bench-micro/src/main/scala/dotty/tools/benchmarks/specializedtraits/PairHashingPoly.scala`, `bench-micro/src/main/scala/dotty/tools/benchmarks/specializedtraits/VectorDotProduct.scala`, … (+475 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 6 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 3 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 11 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (6), REDACTED (5). — One of this dimension's main actionable groups (11 issue-level).
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).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 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.
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.
78 of 867 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is compiler/src/dotty/tools/dotc/transform/init/Semantic.scala. Counted over 867 of the 1629 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Resolve the 3 Orphaned knowledge finding(s) in Knowledge Freshness — start with Semantic.scala, Manifest.scala, Parser.scala. — One of this dimension's main actionable groups (3 issue-level).
Resolve the 75 Orphaned file finding(s) in Knowledge Freshness — start with package.scala (2), Extractors.scala, InkuireSupport.scala. — One of this dimension's main actionable groups (75 recommendation-level).
Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. SCORED, not informational.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 0 platform declaration(s) and 4 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.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.
Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.
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.
`Product16[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16]` declares 16 abstract members: `_1`, `_2`, `_3`, `_4`, `_5`, `_6`, `_7`, `_8`, `_9`, `_10`, `_11`, `_12`, `_13`, `_14`, `_15`, `_16`. Counted over its ABSTRACT members — a `def` with no body or a `val`/`var` with no initializer, once per signature; concrete members, private and protected members, and members of a companion `object` 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. — library/src/scala/Product16.scala:41
`Product17[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17]` declares 17 abstract members: `_1`, `_2`, `_3`, `_4`, `_5`, `_6`, `_7`, `_8`, `_9`, `_10`, `_11`, `_12`, `_13`, `_14`, `_15`, `_16`, `_17`. Counted over its ABSTRACT members — a `def` with no body or a `val`/`var` with no initializer, once per signature; concrete members, private and protected members, and members of a companion `object` 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. — library/src/scala/Product17.scala:42
`Product18[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18]` declares 18 abstract members: `_1`, `_2`, `_3`, `_4`, `_5`, `_6`, `_7`, `_8`, `_9`, `_10`, `_11`, `_12`, `_13`, `_14`, `_15`, `_16`, `_17`, `_18`. Counted over its ABSTRACT members — a `def` with no body or a `val`/`var` with no initializer, once per signature; concrete members, private and protected members, and members of a companion `object` 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. — library/src/scala/Product18.scala:43
`Product19[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19]` declares 19 abstract members: `_1`, `_2`, `_3`, `_4`, `_5`, `_6`, `_7`, `_8`, `_9`, `_10`, `_11`, `_12`, `_13`, `_14`, `_15`, `_16`, `_17`, `_18`, `_19`. Counted over its ABSTRACT members — a `def` with no body or a `val`/`var` with no initializer, once per signature; concrete members, private and protected members, and members of a companion `object` 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. — library/src/scala/Product19.scala:44
`Product20[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20]` declares 20 abstract members: `_1`, `_2`, `_3`, `_4`, `_5`, `_6`, `_7`, `_8`, `_9`, `_10`, `_11`, `_12`, `_13`, `_14`, `_15`, `_16`, `_17`, `_18`, `_19`, `_20`. Counted over its ABSTRACT members — a `def` with no body or a `val`/`var` with no initializer, once per signature; concrete members, private and protected members, and members of a companion `object` 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. — library/src/scala/Product20.scala:45
`Product21[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21]` declares 21 abstract members: `_1`, `_2`, `_3`, `_4`, `_5`, `_6`, `_7`, `_8`, `_9`, `_10`, `_11`, `_12`, `_13`, `_14`, `_15`, `_16`, `_17`, `_18`, `_19`, `_20`, `_21`. Counted over its ABSTRACT members — a `def` with no body or a `val`/`var` with no initializer, once per signature; concrete members, private and protected members, and members of a companion `object` 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. — library/src/scala/Product21.scala:46
`Product22[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22]` declares 22 abstract members: `_1`, `_2`, `_3`, `_4`, `_5`, `_6`, `_7`, `_8`, `_9`, `_10`, `_11`, `_12`, `_13`, `_14`, `_15`, `_16`, `_17`, `_18`, `_19`, `_20`, `_21`, `_22`. Counted over its ABSTRACT members — a `def` with no body or a `val`/`var` with no initializer, once per signature; concrete members, private and protected members, and members of a companion `object` 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. — library/src/scala/Product22.scala:47
`reflectModule` declares 111 abstract members: `CompilationInfo`, `Tree`, `PackageClause`, `Import`, `Export`, `Definition`, `ClassDef`, `DefDef`, `ValDef`, `TypeDef`, `Term`, `Ref`, `Ident`, `Wildcard`, `Select`, `Literal`, `This`, `New`, `NamedArg`, `Apply`, `TypeApply`, `Super`, `Typed`, `Assign`, `Block`, `Closure`, `Lambda`, `If`, `Match`, `SummonFrom`, `Try`, `Return`, `Repeated`, `Inlined`, `SelectOuter`, `While`, `TypedOrTest`, `TypeTree`, `Inferred`, `TypeIdent`, and 71 more. Counted over its ABSTRACT members — a `def` with no body or a `val`/`var` with no initializer, once per signature; concrete members, private and protected members, and members of a companion `object` 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. — library/src/scala/quoted/Quotes.scala:269
`SymbolModule` declares 18 abstract members under just 15 distinct name(s): `spliceOwner`, `requiredPackage`, `requiredClass`, `requiredModule`, `requiredMethod`, `classSymbol`, `newClass`, `newClass`, `newClass`, `newModule`, `newMethod`, `newMethod`, `newVal`, `newBind`, `newTypeAlias`, `newBoundedType`, `noSymbol`, `freshName`. Counted over its ABSTRACT members — a `def` with no body or a `val`/`var` with no initializer, once per signature; concrete members, private and protected members, and members of a companion `object` are not counted, because no implementer is forced to write them. That is an OVERLOAD SET, not 18 separate responsibilities: a caller binds to 15 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller's side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER's — all 18 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface. — library/src/scala/quoted/Quotes.scala:4362
`defnModule` declares 46 abstract members: `RootPackage`, `RootClass`, `EmptyPackageClass`, `ScalaPackage`, `ScalaPackageClass`, `AnyClass`, `MatchableClass`, `AnyValClass`, `ObjectClass`, `AnyRefClass`, `NullClass`, `NothingClass`, `UnitClass`, `ByteClass`, `ShortClass`, `CharClass`, `IntClass`, `LongClass`, `FloatClass`, `DoubleClass`, `BooleanClass`, `StringClass`, `ClassClass`, `ArrayClass`, `PredefModule`, `Predef_classOf`, `JavaLangPackage`, `ArrayModule`, `Array_apply`, `Array_clone`, `Array_length`, `Array_update`, `RepeatedParamClass`, `RepeatedAnnot`, `OptionClass`, `NoneModule`, `SomeModule`, `ProductClass`, `FunctionClass`, `FunctionClass`, and 6 more. Counted over its ABSTRACT members — a `def` with no body or a `val`/`var` with no initializer, once per signature; concrete members, private and protected members, and members of a companion `object` are not counted, because no implementer is forced to write them. Those 46 declarations carry 44 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 44 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. 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. — library/src/scala/quoted/Quotes.scala:5200
`FlagsModule` declares 47 abstract members: `Abstract`, `AbsOverride`, `Artifact`, `Case`, `CaseAccessor`, `Contravariant`, `Covariant`, `Deferred`, `EmptyFlags`, `Enum`, `Erased`, `Exported`, `ExtensionMethod`, `FieldAccessor`, `Final`, `Given`, `HasDefault`, `Implicit`, `Infix`, `Inline`, `Invisible`, `JavaDefined`, `JavaStatic`, `JavaAnnotation`, `Lazy`, `Local`, `Macro`, `Method`, `Module`, `Mutable`, `NoInits`, `Opaque`, `Open`, `Override`, `Package`, `Param`, `ParamAccessor`, `Private`, `PrivateLocal`, `Protected`, and 7 more. Counted over its ABSTRACT members — a `def` with no body or a `val`/`var` with no initializer, once per signature; concrete members, private and protected members, and members of a companion `object` 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. — library/src/scala/quoted/Quotes.scala:5405
`ProcessBuilder` declares 35 abstract members under just 15 distinct name(s): `!!`, `!!`, `!!<`, `!!<`, `lazyLines`, `lazyLines`, `lazyLines`, `lazyLines`, `lazyLines_!`, `lazyLines_!`, `lazyLines_!`, `lazyLines_!`, `lineStream`, `lineStream`, `lineStream`, `lineStream`, `lineStream_!`, `lineStream_!`, `lineStream_!`, `lineStream_!`, `!`, `!`, `!<`, `!<`, `run`, `run`, `run`, `run`, `run`, `#&&`, `#||`, `#|`, `###`, `canPipeTo`, `hasExitValue`. Counted over its ABSTRACT members — a `def` with no body or a `val`/`var` with no initializer, once per signature; concrete members, private and protected members, and members of a companion `object` are not counted, because no implementer is forced to write them. That is an OVERLOAD SET, not 35 separate responsibilities: a caller binds to 15 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller's side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER's — all 35 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface. — library/src/scala/sys/process/ProcessBuilder.scala:138
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
Where the width is an overload set rather than separate responsibilities, collapse the overloads instead — segregating those relieves no caller.
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.
Other · Code Health — Unreviewed-generation residue in this repository's Scala: methods whose whole body is still `???` or a "not implemented" throw where nothing overrides them, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings of non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.
Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.
`patternConstrStr` is a shipped member whose whole body is still `???`, and nothing in the repository overrides it — generated scaffolding that was never completed. Implement it or remove the dead surface. — compiler/src/dotty/tools/dotc/typer/ErrorReporting.scala:170
`parseLinkDefinition` is a shipped member whose whole body is still `???`, and nothing in the repository overrides it — generated scaffolding that was never completed. Implement it or remove the dead surface. — scaladoc/src/dotty/tools/scaladoc/SourceLinks.scala:66
`setValue` is a shipped member whose whole body is still `???`, and nothing in the repository overrides it — generated scaffolding that was never completed. Implement it or remove the dead surface. — scaladoc/src/dotty/tools/scaladoc/site/LoadedTemplate.scala:14
What to do
Finish or delete the members whose body is still `???` or a "not implemented" throw where nothing overrides them, and replace placeholder text before shipping.
Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's Scala: methods whose body is `???` or only throws a "not implemented" error, methods that take inputs and return a constant or do nothing, dead `if (false)` branches, and skeleton classes most of whose methods are holes.
Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.
`enableAliasing` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — compiler/src/dotty/tools/dotc/semanticdb/internal/SemanticdbInputStream.scala:785
`patternConstrStr` is a shipped method whose whole body is `???` (or throws NotImplementedError), and nothing in the repository overrides it — scaffolding that was never completed. Implement it or remove the dead surface. — compiler/src/dotty/tools/dotc/typer/ErrorReporting.scala:170
`parseLinkDefinition` is a shipped method whose whole body is `???` (or throws NotImplementedError), and nothing in the repository overrides it — scaffolding that was never completed. Implement it or remove the dead surface. — scaladoc/src/dotty/tools/scaladoc/SourceLinks.scala:66
`setValue` is a shipped method whose whole body is `???` (or throws NotImplementedError), and nothing in the repository overrides it — scaffolding that was never completed. Implement it or remove the dead surface. — scaladoc/src/dotty/tools/scaladoc/site/LoadedTemplate.scala:14
A bare `// scalastyle:off`, `// scalafix:off` or `@nowarn` (or Wartremover's `warts.All`) switches every rule or warning off — hidden debt. Suppress the specific rule on the specific line, with a justification, instead. (×8) — compiler/src/dotty/tools/dotc/profile/Profiler.scala:198, library/src/scala/io/Position.scala:104, library/src/scala/jdk/DoubleAccumulator.scala:256, …
A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something. (×28) — compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala:131, compiler/test/dotty/tools/dotc/DeterminismTest.scala:294, compiler/test/dotty/tools/dotc/DeterminismTest.scala:318, …
What to do
Finish or delete the unfinished stubs (functions that throw "not implemented", or whose body is empty or a bare constant) — they are dead surface that looks live.
Clear the softer debt: re-enable or delete `ignore`d and `pending` tests, decide whether each empty method or UnsupportedOperationException is deliberate (and say so in a comment), and replace a bare `// scalastyle:off` or `@nowarn` with targeted, justified suppressions.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
The root README is 108 words, against a bar of 120. Of the three newcomer-critical sections this check looks for by heading, it found no a build/run or getting-started section, no a testing section, no an architecture or project-map section. Sections are matched on HEADING text only, so material written under a heading this check does not recognise — or with no heading at all — is not seen and this row may understate what the document covers.
What to do
Expand the README with getting-started, architecture overview and a project map.
Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
Add a README to the 1 of 1 project(s) that lack one — worth up to 2 pts.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
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 README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
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 & versioning6.0 / 10Adequate✓ Tool-verified
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
87/99 types (88%) declared in the published library are public. For a library, every public type is a stability contract — keep implementation types off the surface and expose only the intended API.
What to do
Keep implementation types off the public surface (Java: package-private (no modifier), or leave its package out of `module-info` exports) so internals can change without breaking consumers.
Do you agree with this assessment?
P2 · Observability7.0 / 10Strong✓ 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 scalafix or scapegoat (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 119940 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
What to do
Add a SAST step to CI running what this repository's stack ships: scalafix or scapegoat — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Dependabot is configured but does not watch `gitsubmodule` — add that `package-ecosystem` entry to REDACTED so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
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.
A JMH/Jetpack Benchmark suite exists but nothing turns on its allocation measurement — allocations (the main way hot code pressures a garbage collector or allocator) aren't being measured. — bench-run/src/main/scala/tuples/Drop.scala
What to do
Run JMH with the GC profiler (`-prof gc`, or addProfiler(GCProfiler.class)) so allocation rate regressions are visible, not just time.
Readiness · Performance — Whether the code is written to minimise allocations so it doesn't pressure its host's memory manager — buffer/slice views over copies, object pooling, stack or value-type allocation, and buffer writers. Reward-only: credited where present, never penalised where a simpler style is fine.
Method: Production-source scan: density (per 1k LoC) of allocation-aware APIs — in .NET Span/Memory, ArrayPool/ObjectPool, stackalloc, ValueTask, value-type structs, IBufferWriter, string.Create, SkipLocalsInit; off .NET, with comments and strings blanked, Go's sync.Pool, preallocated slices/maps, Grow, strconv.Append* and buf[:0] reuse; the JVM's NIO buffer views, MemorySegment, primitive collections, pools and literal presizes (plus Kotlin primitive arrays and value classes, Scala AnyVal and @specialized); Swift's reserveCapacity, ContiguousArray, withUnsafe* access and ~Copyable. Activated off .NET on the same floor (400 lines, and benchmarks or 8 uses); Rust and garbage-collected scripting languages are not applicable. Reward-only. Deterministic, syntax/text detection.
What to do
Raise allocation-aware density on the hot paths — currently 162 use(s) across 381,368 production line(s) (~0.4/1k). More of the idioms below on the allocation-heavy paths climbs this toward 10.
Java: on hot paths, work through buffer views (ByteBuffer/LongBuffer slices, MemorySegment) instead of copies, avoid boxing with primitive collections (fastutil, Eclipse Collections, HPPC, Trove), presize collections and StringBuilders, and pool expensive buffers (Netty's pooled allocator, commons-pool).
Scala: on hot paths, make small wrappers value classes (extends AnyVal), @specialized generic code over primitives, use primitive collections, and presize builders.
Do you agree with this assessment?
R1 · Type Safety0.0 / 10Critical✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
0 typed · 13 plain JS — the untyped files are REDACTED, scaladoc/resources/dotty_res/scripts/common/component.js, scaladoc/resources/dotty_res/scripts/common/utils.js, scaladoc/resources/dotty_res/scripts/components/DocumentableList.js, scaladoc/resources/dotty_res/scripts/components/Filter.js, scaladoc/resources/dotty_res/scripts/components/FilterBar.js (+7 more).
What to do
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
React / JS · Code Health — Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm over JS/TS tokens, D-386): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.
Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Deterministic.
REDACTED:310 · REDACTED:451 — all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — REDACTED:310
scaladoc/resources/dotty_res/scripts/featureToggles.js:14 · scaladoc/resources/dotty_res/scripts/theme.js:1 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — scaladoc/resources/dotty_res/scripts/featureToggles.js:14
scaladoc/resources/dotty_res/scripts/ux.js:653 · scaladoc/resources/dotty_res/scripts/ux.js:665 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — scaladoc/resources/dotty_res/scripts/ux.js:653
What to do
Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.
Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.
t has cyclomatic complexity 24 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:116
x has cyclomatic complexity 18 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:193
attachAllListeners has cyclomatic complexity 17 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scaladoc/resources/dotty_res/scripts/ux.js:52
b has cyclomatic complexity 14 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:187
(anonymous) has cyclomatic complexity 11 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:198
What to do
Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
Do you agree with this assessment?
R3 · Large Files6.9 / 10Adequate✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
REDACTED has 1064 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
Other · Security — Read from this repository's Scala source and the Java beside it: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS (certificate validation, protocol version) — facts about code that hold whether or not it serves anything itself. This repository builds on an HTTP-server library (sbt-test/scala2-compat/akka/build.sbt:5 — depends on `akka-http`) but serves no HTTP of its own: its production source starts no server (no `newServerAt`/`bindAndHandle`, server builder, `Server.serve`, `Http.serve`, tapir server interpreter or Netty HTTP pipeline), declares no application one runs (no Play application, servlet, cask `MainRoutes`, `HttpApp` or twitter-server), so it is a library whose server controls belong to the application that serves it — HTTPS enforcement, HSTS, cookie flags and input validation are N/A here, as they are for a C# library.
Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.
MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`MessageDigest.getInstance("SHA-256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call. (×2) — compiler/src/dotty/tools/dotc/core/NameOps.scala:18, compiler/src/dotty/tools/dotc/semanticdb/internal/MD5.scala:12
What to do
Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key. This repository constructs a collision-broken hash (MD5/SHA1) at 2 sites, not one: `compiler/src/dotty/tools/dotc/core/NameOps.scala:18` (MessageDigest.getInstance("MD5")), `compiler/src/dotty/tools/dotc/semanticdb/internal/MD5.scala:12` (MessageDigest.getInstance("MD5")). Each is a separate decision — fixing only the line this row cites leaves the others in place.
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.
Do you agree with this assessment?
X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.
Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.
Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.
Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X17 · Uncapped recursion over a caller-supplied document10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.
Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.
Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.
`Files.walk(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.iterator` through it and drops it, so this expression both creates the value and is the last place that can release it, and does not. Every call leaks one more open handle until the collector happens to reach it: `Too many open files` under load, and on Windows a file that cannot be replaced or deleted while it is held. Open it with `scala.util.Using.resource(Files.walk(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`. (×2) — project/ScalaLibraryPlugin.scala:78, compiler/src/dotty/tools/dotc/classpath/DirectoryClassPath.scala:223
`scala.io.Source.fromFile(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.mkString` through it and drops it, so this expression both creates the value and is the last place that can release it, and does not. Every call leaks one more open handle until the collector happens to reach it: `Too many open files` under load, and on Windows a file that cannot be replaced or deleted while it is held. Open it with `scala.util.Using.resource(scala.io.Source.fromFile(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`. — project/scripts/bisect.scala:199
`Files.newDirectoryStream(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.iterator` through it and drops it, so this expression both creates the value and is the last place that can release it, and does not. Every call leaks one more open handle until the collector happens to reach it: `Too many open files` under load, and on Windows a file that cannot be replaced or deleted while it is held. Open it with `scala.util.Using.resource(Files.newDirectoryStream(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`. — compiler/src/dotty/tools/dotc/classpath/DirectoryClassPath.scala:211
`Files.list(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.iterator` through it and drops it, so this expression both creates the value and is the last place that can release it, and does not. Every call leaks one more open handle until the collector happens to reach it: `Too many open files` under load, and on Windows a file that cannot be replaced or deleted while it is held. Open it with `scala.util.Using.resource(Files.list(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`. — compiler/src/dotty/tools/dotc/classpath/DirectoryClassPath.scala:241
What to do
Each finding names the value and the span that decides who owns it — the `new` that created it, or the constructor parameter that handed it over. Confirm ownership from that span, then make the disposal match it: release what this type created, leave what it was injected with to whoever created THAT, and drop a finalizer whose type holds nothing unmanaged to release.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `NullPointerException` (Java, Kotlin, Scala), `ArgumentError.notNull` (Dart) or `ArgumentNullException` (F#'s `nullArg`) tells the caller a parameter was null when it provably was not.
Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements controlled by an `if`, whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`). Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
The `if` guard on line 5084 (`case wtp: MethodType if wtp.isImplicitMethod && ({ resMatch = constrainResult(tree.symbol, wtp, sharpenedPt); resMatch } || !functionExpected) && !ctx.mode.is(Mode.InQuotePatternHoasArgs) =>`) changes `resMatch` with `resMatch = …` while the match is deciding whether that case applies. Scala tests a guard during PATTERN MATCHING — after the case's pattern has matched and before the case is chosen, going on to the next case when it is false — so the change lands whenever this case is merely TESTED, whether or not it is then chosen, and never once an earlier case has matched. And `&&` can skip it, so it does not happen at all whenever what decides first already answers the guard. The accounting therefore depends on evaluation order and on how many cases the subject was tested against, not on any statement a reader can point at: a counter kept this way misses exactly the path the deciding operand rules out, so it cannot reach a limit it is checked against on that path. Move the change out of the guard — leave it reading only (`if resMatch + 1 >= limit`) and put the assignment in the case's BODY, where it runs precisely when the case is chosen, or hoist it above the `match` if it must happen for every subject. — compiler/src/dotty/tools/dotc/typer/Typer.scala:5084
What to do
Each finding names the mutation inside the `case` label or `when` guard and the short-circuiting operator that decides whether it happens at all. Confirm from the two, then move the change out of the label: a JavaScript or PHP `case` expression, a PHP `match` arm's conditions, a Java `when` guard, a Kotlin `when` branch's conditions, a Ruby `when` clause or `in … if` guard, a Python `case … if` guard, a Dart `when` guard, a Rust `match` guard and a Scala `case … if` guard are evaluated while the switch is still MATCHING — on labels that are then not selected, and not at all once an earlier label has matched or an operand to its left has answered. Leave the label reading only and put the increment in the arm's BODY, where it runs exactly when the arm is chosen, or hoist it above the switch if it must happen on every subject.
Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.
Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.
Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.
`fine` at line 743 is called with an argument built by `ex.getStackTrace().mkString("…")` (line 744), whose cost grows with the collection it walks. Scala evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because fine is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: the logger takes a built `String` (SLF4J, Akka/Pekko `LoggingAdapter`, `context.log`), and there is no `isDebugEnabled`/`isTraceEnabled` test and no debug flag. — compiler/src/dotty/tools/dotc/interactive/Completion.scala:743
What to do
In Scala, put the construction behind the logger's own check (`if (log.isDebugEnabled)`), or log through a logger that takes the message by name or by macro and so builds it only when the level is on — scala-logging's `LazyLogging`/`StrictLogging` (`logger.debug(s"rows: ${rows.mkString(", ")}")` expands to that check), log4s or log4cats. Interpolating into an `s"…"` is not the fix on SLF4J or Akka's `LoggingAdapter`: their `debug` takes a `String`, so the interpolation and every `mkString` inside it run before the call is entered.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped5.0 / 10Adequate✓ Tool-verified
Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.
Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.
`e.innerHTML.replace(/\n/g,"").replace(/<br[ /]*>/g,"\n")` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:237
`a.value` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — REDACTED:239, REDACTED:241
`htmlToString(html)` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — scaladoc/resources/dotty_res/scripts/common/utils.js:14
`saved.mainDiv` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — scaladoc/resources/dotty_res/scripts/ux.js:42
`saved.leftColumn` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — scaladoc/resources/dotty_res/scripts/ux.js:44
What to do
Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.
Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
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` comprehension or `foreach` leaves the mutable collection it is walking alone — an `ArrayBuffer` or `ListBuffer` counts its changes and its iterator checks the count, an `ArrayDeque` (and `mutable.Queue`/`mutable.Stack`) is walked by index up to its starting length, and a `java.util` collection walked through `asScala` is fail-fast, so a body that adds to or removes from the very collection the loop is walking makes a later step throw `ConcurrentModificationException` (`IndexOutOfBoundsException` for a deque) 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.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard4.8 / 10Weak✓ Tool-verified
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.
This condition tests `first` for emptiness and then indexes it on a branch that test does not reach. `first(0)` is evaluated whenever the guarded half is false — which includes the case the guard exists to anticipate, `first` being empty — so an empty `first` indexes position 0 of nothing and throws. This same condition already shows the intended bracketing: `first(1)` sits INSIDE the guard. Either the guard is load-bearing, in which case this access escapes it and crashes, or `first` cannot be empty here, in which case the guard beside it is dead code — the condition is wrong under both readings. Move the parenthesis so the emptiness test brackets every access to `first`. — compiler/src/dotty/tools/dotc/core/NameOps.scala:389
What to do
Each finding names the index access that escapes the guard and the line of the correctly bracketed access beside it. Compare the two: they differ only in where one parenthesis sits. Move it so the emptiness test brackets every access to that symbol — and if the value provably cannot be empty at this point, delete the test rather than leave a condition that guards one access and not its neighbour.
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.
`case _` 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. (×3) — scaladoc-js/common/src/utils/SafeLocalStorage.scala:17, scaladoc-js/common/src/utils/SafeLocalStorage.scala:27, presentation-compiler/src/main/dotty/tools/pc/completions/Completions.scala:837
`case NonFatal(_)` 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. (×14) — scaladoc/src/dotty/tools/scaladoc/tasty/TypesSupport.scala:570, repl/src/dotty/tools/repl/Rendering.scala:119, repl/src/dotty/tools/repl/ReplBytecodeAnalysis.scala:65, …
`case _: 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. (×9) — scaladoc/src/dotty/tools/scaladoc/tasty/comments/MemberLookup.scala:348, scaladoc/src/dotty/tools/scaladoc/snippets/SnippetExpectations.scala:137, repl/src/dotty/tools/repl/JLineTerminal.scala:171, …
`case ex: 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. (×6) — repl/src/dotty/tools/repl/ReplBytecodeInstrumentation.scala:21, compiler/src/dotty/tools/dotc/reporting/DidYouMean.scala:137, compiler/src/dotty/tools/dotc/reporting/messages.scala:802, …
`case _: 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. (×2) — library-js/src/scala/MatchError.scala:34, bench-run/src/main/scala/dotty/tools/benchmarks/Main.scala:20
`case _: RuntimeException` 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. — library/src/scala/concurrent/duration/Duration.scala:117
`case e: 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. — compiler/src/dotty/tools/dotc/semanticdb/SemanticSymbolBuilder.scala:205
An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×3) — compiler/src/dotty/tools/dotc/interactive/LogicalPackagesProvider.scala:31, compiler/src/dotty/tools/dotc/interactive/LogicalPackagesProvider.scala:53, compiler/src/dotty/tools/dotc/interactive/LogicalPackagesProvider.scala:66
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 Scala's null is held to the type system and not undermined by assertions — a file compiled with `-Yexplicit-nulls` is one where `String` excludes null and `String | Null` admits it, a file under WartRemover's `Null` wart or Scalafix's `DisableSyntax.noNulls` is one whose code cannot write `null` and must say `Option`, and each `.nn`, `import scala.language.unsafeNulls` or null-lint suppression is the author overruling that.
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?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 3 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X6 Hand-rolled structured-format parsing — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 9 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 — 55 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — Frontend below the scale floor (8 DOM element(s) < 25) — too little surface to assess accessibility.
AC2 Forms & labels — Frontend below the scale floor (8 DOM element(s) < 25) — too little surface to assess accessibility.
AC3 Page structure — Frontend below the scale floor (8 DOM element(s) < 25) — too little surface to assess accessibility.
AC4 Keyboard semantics — Frontend below the scale floor (8 DOM element(s) < 25) — too little surface to assess accessibility.
AC5 ARIA correctness — Frontend below the scale floor (8 DOM element(s) < 25) — too little surface to assess accessibility.
AC6 Visual & motion safety — Frontend below the scale floor (8 DOM element(s) < 25) — too little surface to assess accessibility.
AC7 A11y enforcement — Frontend below the scale floor (8 DOM element(s) < 25) — too little surface to assess accessibility.
AX1 Captive dependencies — Not applicable: this repository's Java imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Scala imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
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 — compose up failed (exit 17 — an image could not be built) — time="2026-10-26T06:22:57Z" level=warning msg="The \"UID\" variable is not set. Defaulting to a blank string." failed to solve: ruby:2.7: failed to resolve source metadata for docker.io/library/ruby:2.7: failed to do request: Head "https://registry-1.docker.io/v2/library/ruby/manifests/2.7": Forbidden; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — Not assessed: these personal data 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 personal data 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.
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 Slick table or in a SQL migration's CREATE TABLE or ALTER TABLE — and no database client (Slick, Doobie, Quill, ScalikeJDBC, Anorm, Skunk, a MongoDB or Cassandra driver, JDBC) 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 Slick table or in a SQL migration's CREATE TABLE or ALTER TABLE — and no database or data-store client (Slick, Doobie, Quill, ScalikeJDBC, Anorm, Skunk, JDBC, MongoDB, Cassandra, …) 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 Slick table or in a SQL migration's CREATE TABLE or ALTER TABLE — and no database or data-store client (Slick, Doobie, Quill, ScalikeJDBC, Anorm, Skunk, JDBC, MongoDB, Cassandra, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
D10 Test Quality — ~428461 lines of test source are present (.scala, .java) 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 .scala suite was found but not re-run
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D19 Documentation Quality — D19 withholds "Documentation: empty section": 4 candidate(s) were measured and not published.
D21 Naming Consistency — Naming consistency is measured on C# only; Java, JavaScript, Scala, sc not measured.
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+ projects each declaring an entity of their own. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — D24 reads C# and Visual Basic comments only — this repository's production source is .java, .scala, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D25 ADR Conformance — no ADRs to check
D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.scala), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D32 Data Compliance (PII/GDPR) — 480 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D5 Coupling — Not applicable — this sbt build ships 1 production module(s), so there is no coupling BETWEEN modules to measure. (Its test and non-production modules are not part of the shipped graph.)
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 (2 signals for this style, 2 needed — the count is met but a required primary signal is absent): 454 value object(s); 12 domain event(s); its domain events are published by services or handlers — no domain entity raises one
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
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JVM, JavaScript/TypeScript source, so there is no service whose uptime a failing dependency could take down
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (`addSbtPlugin("org.scoverage" % "sbt-scoverage" % "<version>")` in `project/plugins.sbt`, then `sbt clean coverage test coverageReport`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
PF3 Async & latency hygiene — Not applicable: this repository declares no async functions, so there is no asynchronous code for a blocking call to stall.
R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
R4 Test Coverage — the JS/TS workspace (13 production file(s)) has no JavaScript/TypeScript test, but it is 0.99% of this repository's production source and the other 99.01% carries 428,461 line(s) of test code this pass cannot read — an incidental frontend's reachability is not the repository's test posture, so it is not scored as one
R5 Dependency Freshness — no package-lock.json — dependency freshness not measured (would require an npm lockfile); JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
R6 Tooling — no package.json in the repository — test/lint/typecheck wiring is read from package.json scripts (corroborated against CI), so this project's own toolchain isn't measured here
R7 Dead Code — Not measured — no application, tooling or test entry point was detected, so no file can be shown to be reachable or unreachable. Declare an entry (package.json main/module/exports, src/index.*, or an index.html script) to enable reachability.
R8 Dependency Hygiene — Not measured — no package.json declares any dependency, so there is nothing to check imports against (imports may resolve through a host runtime rather than node).
X2 Cancellation propagation — no C# was loaded; this repository's Scala and Java were read, and no request in it can be cancelled by a caller — a Scala request takes no token: a Future cannot be cancelled, and cats-effect, ZIO and Monix interrupt the fiber that made the request from outside the call, not through a parameter; a Java request off Android takes no token: it is cancelled through the handle it returns (Future.cancel, Call.cancel, a Disposable), ambiently (io.grpc.Context) or by interrupting its thread, not through a parameter
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 Java was read, and it logs through none that an assembled message defeats: java.util.logging's level methods, log4j 1, commons-logging, JBoss Logging and Flogger take one finished message (as log4net does in C#), or it makes no call through a named logger at all. Calls made through SLF4J or log4j 2 (`org.slf4j.Logger`, `org.apache.logging.log4j.Logger`, Lombok's `@Slf4j`) would be judged.
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.
Orphaned knowledge compiler/src/dotty/tools/dotc/transform/init/Semantic.scala:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge library-js/src/scala/reflect/Manifest.scala:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge scaladoc/src/dotty/tools/scaladoc/tasty/comments/wiki/Parser.scala:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
TodoComment tests/warn/i16639a.scala:6— // warn TODO: could warn — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/warn/t11681.scala:70— // TODO: check — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/warn/unused-privates.scala:290— // TODO warn — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/warn/unused-privates.scala:291— // TODO warn — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/warn/unused-privates.scala:292— // TODO warn — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/warn/unused-privates.scala:295— // TODO warn as we cannot distinguish unqualified private at top level — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/untried/neg/found-req-variance.scala:73— // TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/run-staging/unliftables.scala:64— // TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/run-staging/unliftables.scala:70— // TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/run-staging/unliftables.scala:100— // TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/run-macros/gestalt-type-toolbox-reflect/Test_2.scala:33— // TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/run-macros/gestalt-type-toolbox-reflect/Test_2.scala:41— // TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/run-macros/gestalt-type-toolbox-reflect/Test_2.scala:68— // TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/pending/run/name-based-patmat.scala:93— // TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/old-tasty-interpreter-prototype/interpreter/TreeInterpreter.scala:27— // TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/disabled/partest/run/t5717.scala:11— // TODO — 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 scaladoc/src/dotty/tools/scaladoc/tasty/comments/Comments.scala:280— // TODO — 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 repl/src/dotty/tools/repl/ReplDriver.scala:452— // TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/untried/neg/tcpoly_ticket2101.scala:24— // val tpsFresh = cloneSymbols(tparams1) // @M cloneSymbols(tparams2) should be equivalent -- TODO: check — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/run-staging/i3847-b.scala:10— // TODO add elements — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/run-staging/i3847.scala:10— // TODO add elements — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/run-staging/i3876-b.scala:16— // TODO improve printer — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/run-staging/i3876-c.scala:15— // TODO improve printer — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/run-staging/unliftables.scala:26— // TODO? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tests/run-staging/staged-tuples/StagedTuple.scala:212— // TODO remove ascriptions when #6126 is fixed
TooManyMethods: Parser compiler/src/dotty/tools/dotc/parsing/Parsers.scala:200— TooManyMethods — 286 methods. The bar is 30 methods; this is 256 over it, 9.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: SymDenotation compiler/src/dotty/tools/dotc/core/SymDenotations.scala:37— TooManyMethods — 237 methods. The bar is 30 methods; this is 207 over it, 7.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Type compiler/src/dotty/tools/dotc/core/Types.scala:99— TooManyMethods — 199 methods. The bar is 30 methods; this is 169 over it, 6.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: Definitions compiler/src/dotty/tools/dotc/core/Definitions.scala:53— TooManyMethods — 147 methods. The bar is 30 methods; this is 117 over it, 4.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: JSCodeGen compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala:57— TooManyMethods — 132 methods. The bar is 30 methods; this is 102 over it, 4.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: Typer compiler/src/dotty/tools/dotc/typer/Typer.scala:171— TooManyMethods — 124 methods. The bar is 30 methods; this is 94 over it, 4.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: tpd compiler/src/dotty/tools/dotc/ast/tpd.scala:20— TooManyMethods — 115 methods. The bar is 30 methods; this is 85 over it, 3.83× 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: Byte library/src/scala/Byte.scala:24— TooManyMethods — 109 methods. The bar is 30 methods; this is 79 over it, 3.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: Char library/src/scala/Char.scala:26— TooManyMethods — 109 methods. The bar is 30 methods; this is 79 over it, 3.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: Int library/src/scala/Int.scala:24— TooManyMethods — 109 methods. The bar is 30 methods; this is 79 over it, 3.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: Long library/src/scala/Long.scala:26— TooManyMethods — 109 methods. The bar is 30 methods; this is 79 over it, 3.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: Short library/src/scala/Short.scala:24— TooManyMethods — 109 methods. The bar is 30 methods; this is 79 over it, 3.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: untpd compiler/src/dotty/tools/dotc/ast/untpd.scala:15— TooManyMethods — 103 methods. The bar is 30 methods; this is 73 over it, 3.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: JSDefinitions compiler/src/dotty/tools/backend/sjs/JSDefinitions.scala:21— TooManyMethods — 102 methods. The bar is 30 methods; this is 72 over it, 3.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: TypeComparer compiler/src/dotty/tools/dotc/core/TypeComparer.scala:37— TooManyMethods — 97 methods. The bar is 30 methods; this is 67 over it, 3.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: PlainPrinter compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala:22— TooManyMethods — 95 methods. The bar is 30 methods; this is 65 over it, 3.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Context compiler/src/dotty/tools/dotc/core/Contexts.scala:129— TooManyMethods — 94 methods. The bar is 30 methods; this is 64 over it, 3.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Double library/src/scala/Double.scala:24— TooManyMethods — 87 methods. The bar is 30 methods; this is 57 over it, 2.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Float library/src/scala/Float.scala:24— TooManyMethods — 87 methods. The bar is 30 methods; this is 57 over it, 2.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: MegaPhase compiler/src/dotty/tools/dotc/transform/MegaPhase.scala:145— TooManyMethods — 82 methods. The bar is 30 methods; this is 52 over it, 2.73× 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: Scanner compiler/src/dotty/tools/dotc/parsing/Scanners.scala:187— TooManyMethods — 81 methods. The bar is 30 methods; this is 51 over it, 2.70× 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: MiniPhase compiler/src/dotty/tools/dotc/transform/MegaPhase.scala:34— TooManyMethods — 77 methods. The bar is 30 methods; this is 47 over it, 2.57× 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: math library/src/scala/math/package.scala:89— TooManyMethods — 76 methods. The bar is 30 methods; this is 46 over it, 2.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: desugar compiler/src/dotty/tools/dotc/ast/Desugar.scala:26— TooManyMethods — 68 methods. The bar is 30 methods; this is 38 over it, 2.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: TreeReader compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala:173— TooManyMethods — 68 methods. The bar is 30 methods; this is 38 over it, 2.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
FileTooLong: core/Types.scala compiler/src/dotty/tools/dotc/core/Types.scala— FileTooLong — 4286 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3786 over it, 8.57× 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: typer/Typer.scala compiler/src/dotty/tools/dotc/typer/Typer.scala— FileTooLong — 3812 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3312 over it, 7.62× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: parsing/Parsers.scala compiler/src/dotty/tools/dotc/parsing/Parsers.scala— FileTooLong — 3747 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3247 over it, 7.49× 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: reporting/messages.scala compiler/src/dotty/tools/dotc/reporting/messages.scala— FileTooLong — 3328 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2828 over it, 6.66× 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: sjs/JSCodeGen.scala compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala— FileTooLong — 3069 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: JSCodeGen (57-5251). The bar is 500 significant lines; this is 2569 over it, 6.14× 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: impl/QuotesImpl.scala compiler/src/scala/quoted/runtime/impl/QuotesImpl.scala— FileTooLong — 2968 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2468 over it, 5.94× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: core/TypeComparer.scala compiler/src/dotty/tools/dotc/core/TypeComparer.scala— FileTooLong — 2596 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2096 over it, 5.19× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: quoted/Quotes.scala library/src/scala/quoted/Quotes.scala— FileTooLong — 1928 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1428 over it, 3.86× 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: core/SymDenotations.scala compiler/src/dotty/tools/dotc/core/SymDenotations.scala— FileTooLong — 1874 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1374 over it, 3.75× 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: core/Definitions.scala compiler/src/dotty/tools/dotc/core/Definitions.scala— FileTooLong — 1863 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: Definitions (53-2621). The bar is 500 significant lines; this is 1363 over it, 3.73× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: cc/CheckCaptures.scala compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala— FileTooLong — 1637 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1137 over it, 3.27× 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: ast/Desugar.scala compiler/src/dotty/tools/dotc/ast/Desugar.scala— FileTooLong — 1633 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1133 over it, 3.27× 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: typer/Namer.scala compiler/src/dotty/tools/dotc/typer/Namer.scala— FileTooLong — 1512 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1012 over it, 3.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: tasty/TreeUnpickler.scala compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala— FileTooLong — 1484 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: TreeUnpickler (59-1971). The bar is 500 significant lines; this is 984 over it, 2.97× 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: init/Objects.scala compiler/src/dotty/tools/dotc/transform/init/Objects.scala— FileTooLong — 1467 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 967 over it, 2.93× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: typer/Implicits.scala compiler/src/dotty/tools/dotc/typer/Implicits.scala— FileTooLong — 1419 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 919 over it, 2.84× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: typer/Checking.scala compiler/src/dotty/tools/dotc/typer/Checking.scala— FileTooLong — 1310 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 810 over it, 2.62× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: parsing/Scanners.scala compiler/src/dotty/tools/dotc/parsing/Scanners.scala— FileTooLong — 1309 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 809 over it, 2.62× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: jvm/BCodeBodyBuilder.scala compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala— FileTooLong — 1210 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 710 over it, 2.42× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: ast/Trees.scala compiler/src/dotty/tools/dotc/ast/Trees.scala— FileTooLong — 1207 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 707 over it, 2.41× 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: printers/SourceCode.scala compiler/src/scala/quoted/runtime/impl/printers/SourceCode.scala— FileTooLong — 1163 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 663 over it, 2.33× 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: cc/CaptureSet.scala compiler/src/dotty/tools/dotc/cc/CaptureSet.scala— FileTooLong — 1113 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 613 over it, 2.23× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: printing/RefinedPrinter.scala compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala— FileTooLong — 1046 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: RefinedPrinter (38-1296). The bar is 500 significant lines; this is 546 over it, 2.09× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: ast/tpd.scala compiler/src/dotty/tools/dotc/ast/tpd.scala— FileTooLong — 1026 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 526 over it, 2.05× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: transform/CheckUnused.scala compiler/src/dotty/tools/dotc/transform/CheckUnused.scala— FileTooLong — 1008 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 508 over it, 2.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FixmeComment tests/run-staging/shonan-hmm/MVmult.scala:158— // FIXME used genlet v — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/run-macros/gestalt-optional-staging/Macro_1.scala:19— // FIXME fix issue #5097 and enable private
FixmeComment tests/run-macros/gestalt-optional-staging/Macro_1.scala:24— // FIXME fix issue #5097 and enable private
FixmeComment tests/run-macros/expr-map-1/Test_2.scala:112— // FIXME should print fed — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/run-macros/annot-memo/Test_2.scala:17— //> private val fibCache$macro$1: mutable.Map[(n : Int), Int] = mutable.Map.empty[(n : Int), Int] // FIXME: leaks (n : Int) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/run-deep-subtype/Tuple-apply.scala:122— // FIXME performance — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/run-deep-subtype/Tuple-apply.scala:149— // FIXME performance — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/run/Tuple-fromProduct.scala:32— // FIXME ProductN for N > 22 does not extends product — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/run/UnrolledBuffer.scala:61— // Dotty FIXME: type argument should not be needed — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/run/case-class-toString.scala:9— // FIXME: case objects are not handled like Scala 2 currently, see #723
FixmeComment tests/run/i5340.scala:21— // i // FIXME: See #5350
FixmeComment tests/run/numbereq.scala:5— // FIXME: breaks ycheck, broken type inferencing. Gets a large union type — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/run/numbereq.scala:24— // FIXME: breaks ycheck, broken type inferencing. Gets a large union type — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/run/scala2-library-test/Main.scala:52— // val _: java.math.BigDecimal = BigDecimal(1).underlying // FIXME: inferred result type of non-private method — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/run/errorhandling/Validator.scala:29— // FIXME: would prefer to do scp.result(step) but this breaks capture checking error messages — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/pos-macros/quote-this.scala:19— // FIXME — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/link/strawman/nil.scala:3— // FIXME — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment library/src/scala/quoted/ExprMap.scala:102— // FIXME — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/pos-macros/power-macro/PowerInlined-1k_2.scala:4— // FIXME Sometimes stack overflows in CI — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/pos-macros/i7592/Macros_1.scala:11— // FIXME: very wrong — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/pos-custom-args/captures/i21313.scala:5— // FIXME: this is an irregularity: it works if we write caps.Contains[Cap, this.type], but we should expect to write caps.Contains[{Cap}, this.type]! — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/pos-custom-args/captures/i21313.scala:9— // FIXME dito — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/pos/i16777.scala:12— // FIXME: Scala 3.1.4 bug: false unexhaustive match warning — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment tests/pos/pos_valueclasses/nullAsInstanceOfVC.scala:4— // FIXME: Make this a run test once we have run 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.
Hotspot: compiler/src/dotty/tools/dotc/core/TypeComparer.scala compiler/src/dotty/tools/dotc/core/TypeComparer.scala:293— compiler/src/dotty/tools/dotc/core/TypeComparer.scala changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 421 in TypeComparer.recur at line 293. 4 of those changes were fix/bug commits, and the other 15 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 22:26:25 +02:00' --until='2026-10-23 22:26:25 +02:00' --full-history --no-merges -- compiler/src/dotty/tools/dotc/core/TypeComparer.scala`: 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/dotty/tools/dotc/typer/Typer.scala compiler/src/dotty/tools/dotc/typer/Typer.scala:4580— compiler/src/dotty/tools/dotc/typer/Typer.scala changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 188 in Typer.adapt1 at line 4580. 2 of those changes were fix/bug commits, and the other 19 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 22:26:25 +02:00' --until='2026-10-23 22:26:25 +02:00' --full-history --no-merges -- compiler/src/dotty/tools/dotc/typer/Typer.scala`: 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/dotty/tools/dotc/typer/RefChecks.scala compiler/src/dotty/tools/dotc/typer/RefChecks.scala:353— compiler/src/dotty/tools/dotc/typer/RefChecks.scala changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 187 in RefChecks.checkAllOverrides at line 353. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 22:26:25 +02:00' --until='2026-10-23 22:26:25 +02:00' --full-history --no-merges -- compiler/src/dotty/tools/dotc/typer/RefChecks.scala`: 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/dotty/tools/dotc/transform/CheckUnused.scala compiler/src/dotty/tools/dotc/transform/CheckUnused.scala:649— compiler/src/dotty/tools/dotc/transform/CheckUnused.scala changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 124 in CheckUnused.warnings at line 649. 1 of those changes was a fix/bug commit, and the other 11 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 22:26:25 +02:00' --until='2026-10-23 22:26:25 +02:00' --full-history --no-merges -- compiler/src/dotty/tools/dotc/transform/CheckUnused.scala`: 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/dotty/tools/dotc/core/tasty/TreeUnpickler.scala compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala:1326— compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 102 in TreeReader.readTree at line 1326. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 22:26:25 +02:00' --until='2026-10-23 22:26:25 +02:00' --full-history --no-merges -- compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala`: 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: repl/src/dotty/tools/repl/ReplDriver.scala repl/src/dotty/tools/repl/ReplDriver.scala:634— repl/src/dotty/tools/repl/ReplDriver.scala changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in ReplDriver.interpretCommand at line 634. 4 of those changes were fix/bug commits, 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 22:26:25 +02:00' --until='2026-10-23 22:26:25 +02:00' --full-history --no-merges -- repl/src/dotty/tools/repl/ReplDriver.scala`: 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/dotty/tools/dotc/typer/Namer.scala compiler/src/dotty/tools/dotc/typer/Namer.scala:1252— compiler/src/dotty/tools/dotc/typer/Namer.scala changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 84 in ClassCompleter.exportForwarders at line 1252. 2 of those changes were fix/bug commits, and the other 7 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 22:26:25 +02:00' --until='2026-10-23 22:26:25 +02:00' --full-history --no-merges -- compiler/src/dotty/tools/dotc/typer/Namer.scala`: 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/dotty/tools/backend/jvm/BCodeSkelBuilder.scala compiler/src/dotty/tools/backend/jvm/BCodeSkelBuilder.scala:884— compiler/src/dotty/tools/backend/jvm/BCodeSkelBuilder.scala changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in PlainSkelBuilder.genDefDef at line 884. 1 of those changes was a fix/bug commit, and the other 25 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 22:26:25 +02:00' --until='2026-10-23 22:26:25 +02:00' --full-history --no-merges -- compiler/src/dotty/tools/backend/jvm/BCodeSkelBuilder.scala`: 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/dotty/tools/backend/jvm/BCodeBodyBuilder.scala compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala:316— compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in PlainBodyBuilder.genLoadTo at line 316. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 22:26:25 +02:00' --until='2026-10-23 22:26:25 +02:00' --full-history --no-merges -- compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala`: 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/dotty/tools/dotc/transform/PostTyper.scala compiler/src/dotty/tools/dotc/transform/PostTyper.scala:559— compiler/src/dotty/tools/dotc/transform/PostTyper.scala changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 67 in PostTyperTransformer.transform at line 559. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 22:26:25 +02:00' --until='2026-10-23 22:26:25 +02:00' --full-history --no-merges -- compiler/src/dotty/tools/dotc/transform/PostTyper.scala`: 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/dotty/tools/backend/jvm/GenericSignatures.scala compiler/src/dotty/tools/backend/jvm/GenericSignatures.scala:56— compiler/src/dotty/tools/backend/jvm/GenericSignatures.scala changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 83 in GenericSignatures.javaSig0 at line 56. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 22:26:25 +02:00' --until='2026-10-23 22:26:25 +02:00' --full-history --no-merges -- compiler/src/dotty/tools/backend/jvm/GenericSignatures.scala`: 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/dotty/tools/dotc/core/tasty/TreePickler.scala compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala:419— compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 105 in TreePickler.pickleTree at line 419. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 22:26:25 +02:00' --until='2026-10-23 22:26:25 +02:00' --full-history --no-merges -- compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala`: 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: scaladoc/src/dotty/tools/scaladoc/tasty/TypesSupport.scala scaladoc/src/dotty/tools/scaladoc/tasty/TypesSupport.scala:117— scaladoc/src/dotty/tools/scaladoc/tasty/TypesSupport.scala changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 104 in TypesSupport.inner at line 117. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 22:26:25 +02:00' --until='2026-10-23 22:26:25 +02:00' --full-history --no-merges -- scaladoc/src/dotty/tools/scaladoc/tasty/TypesSupport.scala`: 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/dotty/tools/dotc/core/TypeErasure.scala compiler/src/dotty/tools/dotc/core/TypeErasure.scala:784— compiler/src/dotty/tools/dotc/core/TypeErasure.scala changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 68 in TypeErasure.apply at line 784. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 22:26:25 +02:00' --until='2026-10-23 22:26:25 +02:00' --full-history --no-merges -- compiler/src/dotty/tools/dotc/core/TypeErasure.scala`: 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/dotty/tools/dotc/core/TypeOps.scala compiler/src/dotty/tools/dotc/core/TypeOps.scala:787— compiler/src/dotty/tools/dotc/core/TypeOps.scala changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in TypeOps.instantiateToSubType at line 787. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 22:26:25 +02:00' --until='2026-10-23 22:26:25 +02:00' --full-history --no-merges -- compiler/src/dotty/tools/dotc/core/TypeOps.scala`: 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/dotty/tools/dotc/inlines/Inliner.scala compiler/src/dotty/tools/dotc/inlines/Inliner.scala:1300— compiler/src/dotty/tools/dotc/inlines/Inliner.scala changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in Inliner.dropUnusedDefs at line 1300. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 22:26:25 +02:00' --until='2026-10-23 22:26:25 +02:00' --full-history --no-merges -- compiler/src/dotty/tools/dotc/inlines/Inliner.scala`: 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/dotty/tools/backend/jvm/opt/LocalOptimizer.scala compiler/src/dotty/tools/backend/jvm/opt/LocalOptimizer.scala:390— compiler/src/dotty/tools/backend/jvm/opt/LocalOptimizer.scala changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 57 in LocalOptimizer.nullnessOptimizations at line 390. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 22:26:25 +02:00' --until='2026-10-23 22:26:25 +02:00' --full-history --no-merges -- compiler/src/dotty/tools/backend/jvm/opt/LocalOptimizer.scala`: 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/dotty/tools/dotc/semanticdb/ExtractSemanticDB.scala compiler/src/dotty/tools/dotc/semanticdb/ExtractSemanticDB.scala:296— compiler/src/dotty/tools/dotc/semanticdb/ExtractSemanticDB.scala changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 66 in Extractor.traverse at line 296. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 22:26:25 +02:00' --until='2026-10-23 22:26:25 +02:00' --full-history --no-merges -- compiler/src/dotty/tools/dotc/semanticdb/ExtractSemanticDB.scala`: 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/dotty/tools/backend/jvm/opt/CopyProp.scala compiler/src/dotty/tools/backend/jvm/opt/CopyProp.scala:300— compiler/src/dotty/tools/backend/jvm/opt/CopyProp.scala changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 55 in CopyProp.eliminatePushPop at line 300. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 22:26:25 +02:00' --until='2026-10-23 22:26:25 +02:00' --full-history --no-merges -- compiler/src/dotty/tools/backend/jvm/opt/CopyProp.scala`: 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/dotty/tools/dotc/inlines/Inlines.scala compiler/src/dotty/tools/dotc/inlines/Inlines.scala:751— compiler/src/dotty/tools/dotc/inlines/Inlines.scala changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in InlineCall.expand at line 751. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 22:26:25 +02:00' --until='2026-10-23 22:26:25 +02:00' --full-history --no-merges -- compiler/src/dotty/tools/dotc/inlines/Inlines.scala`: 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/dotty/tools/dotc/cc/CheckCaptures.scala compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala:1996— compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in CaptureChecker.adaptBoxed at line 1996. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 22:26:25 +02:00' --until='2026-10-23 22:26:25 +02:00' --full-history --no-merges -- compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala`: 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/dotty/tools/dotc/transform/Erasure.scala compiler/src/dotty/tools/dotc/transform/Erasure.scala:654— compiler/src/dotty/tools/dotc/transform/Erasure.scala changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in Typer.typedSelect at line 654. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 22:26:25 +02:00' --until='2026-10-23 22:26:25 +02:00' --full-history --no-merges -- compiler/src/dotty/tools/dotc/transform/Erasure.scala`: 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/dotty/tools/dotc/transform/SyntheticMembers.scala compiler/src/dotty/tools/dotc/transform/SyntheticMembers.scala:97— compiler/src/dotty/tools/dotc/transform/SyntheticMembers.scala changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in SyntheticMembers.caseAndValueMethods at line 97. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 22:26:25 +02:00' --until='2026-10-23 22:26:25 +02:00' --full-history --no-merges -- compiler/src/dotty/tools/dotc/transform/SyntheticMembers.scala`: 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/dotty/tools/dotc/parsing/Parsers.scala compiler/src/dotty/tools/dotc/parsing/Parsers.scala:3062— compiler/src/dotty/tools/dotc/parsing/Parsers.scala changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in Parser.simpleExprRest at line 3062. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 22:26:25 +02:00' --until='2026-10-23 22:26:25 +02:00' --full-history --no-merges -- compiler/src/dotty/tools/dotc/parsing/Parsers.scala`: 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/dotty/tools/backend/jvm/opt/BoxUnbox.scala compiler/src/dotty/tools/backend/jvm/opt/BoxUnbox.scala:181— compiler/src/dotty/tools/backend/jvm/opt/BoxUnbox.scala changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 54 in BoxUnbox.boxUnboxElimination at line 181. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 22:26:25 +02:00' --until='2026-10-23 22:26:25 +02:00' --full-history --no-merges -- compiler/src/dotty/tools/backend/jvm/opt/BoxUnbox.scala`: 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.
Swallowed exception (caught, then discarded) scaladoc-js/common/src/utils/SafeLocalStorage.scala:17— `case _` 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) scaladoc-js/common/src/utils/SafeLocalStorage.scala:27— `case _` 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) scaladoc/src/dotty/tools/scaladoc/tasty/TypesSupport.scala:570— `case NonFatal(_)` 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) scaladoc/src/dotty/tools/scaladoc/tasty/comments/MemberLookup.scala:348— `case _: 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) scaladoc/src/dotty/tools/scaladoc/snippets/SnippetExpectations.scala:137— `case _: 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) repl/src/dotty/tools/repl/JLineTerminal.scala:171— `case _: 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) repl/src/dotty/tools/repl/Rendering.scala:119— `case NonFatal(_)` 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) repl/src/dotty/tools/repl/ReplBytecodeAnalysis.scala:65— `case NonFatal(_)` 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) repl/src/dotty/tools/repl/ReplBytecodeInstrumentation.scala:21— `case ex: 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) repl/src/dotty/tools/repl/ScalaClassLoader.scala:23— `case NonFatal(_)` 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) presentation-compiler/src/main/dotty/tools/pc/SymbolInformationProvider.scala:126— `case NonFatal(_)` 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) presentation-compiler/src/main/dotty/tools/pc/utils/InteractiveEnrichments.scala:288— `case NonFatal(_)` 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) presentation-compiler/src/main/dotty/tools/pc/completions/CompletionProvider.scala:225— `case NonFatal(_)` 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) presentation-compiler/src/main/dotty/tools/pc/completions/CompletionProvider.scala:229— `case NonFatal(_)` 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) presentation-compiler/src/main/dotty/tools/pc/completions/Completions.scala:240— `case NonFatal(_)` 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) presentation-compiler/src/main/dotty/tools/pc/completions/Completions.scala:289— `case NonFatal(_)` 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) presentation-compiler/src/main/dotty/tools/pc/completions/Completions.scala:301— `case NonFatal(_)` 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) presentation-compiler/src/main/dotty/tools/pc/completions/Completions.scala:771— `case NonFatal(_)` 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) presentation-compiler/src/main/dotty/tools/pc/completions/Completions.scala:837— `case _` 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) library-js/src/scala/MatchError.scala:34— `case _: 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) library/src/scala/MatchError.scala:35— `case NonFatal(_)` 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) library/src/scala/sys/process/ProcessBuilderImpl.scala:201— `case NonFatal(_)` 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) library/src/scala/concurrent/duration/Duration.scala:117— `case _: RuntimeException` 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/src/dotty/tools/io/VirtualFile.scala:32— `case _: 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/src/dotty/tools/dotc/semanticdb/SemanticSymbolBuilder.scala:123— `case _: 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.
Low cohesion: Checker (LCOM4 13) compiler/src/dotty/tools/dotc/transform/TreeChecker.scala:278— Checker's methods fall into 13 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 13 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: SingleDenotation (LCOM4 10) compiler/src/dotty/tools/dotc/core/Denotations.scala:586— SingleDenotation's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: ClassDenotation (LCOM4 10) compiler/src/dotty/tools/dotc/core/SymDenotations.scala:1927— ClassDenotation's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: DoubleAccumulator (LCOM4 10) library/src/scala/jdk/DoubleAccumulator.scala:27— DoubleAccumulator's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: IntAccumulator (LCOM4 10) library/src/scala/jdk/IntAccumulator.scala:28— IntAccumulator's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: LongAccumulator (LCOM4 10) library/src/scala/jdk/LongAccumulator.scala:28— LongAccumulator's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: OptimizerKnownBTypes (LCOM4 7) compiler/src/dotty/tools/backend/jvm/opt/OptimizerKnownBTypes.scala:16— OptimizerKnownBTypes's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Var (LCOM4 6) compiler/src/dotty/tools/dotc/cc/CaptureSet.scala:787— Var's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: PackageClassDenotation (LCOM4 5) compiler/src/dotty/tools/dotc/core/SymDenotations.scala:2630— PackageClassDenotation's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Scanner (LCOM4 5) compiler/src/dotty/tools/dotc/parsing/Scanners.scala:187— Scanner's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Region (LCOM4 5) compiler/src/dotty/tools/dotc/parsing/Scanners.scala:1643— Region's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: ExtractorsPrinter (LCOM4 5) compiler/src/scala/quoted/runtime/impl/printers/Extractors.scala:67— ExtractorsPrinter's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: AnyAccumulator (LCOM4 5) library/src/scala/jdk/AnyAccumulator.scala:28— AnyAccumulator's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Tuple2Zipped (LCOM4 5) library/src/scala/runtime/Tuple2Zipped.scala:43— Tuple2Zipped's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Tuple3Zipped (LCOM4 5) library/src/scala/runtime/Tuple3Zipped.scala:41— Tuple3Zipped's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CopyProp (LCOM4 4) compiler/src/dotty/tools/backend/jvm/opt/CopyProp.scala:30— CopyProp's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: InsertExpression (LCOM4 4) compiler/src/dotty/tools/debug/InsertExpression.scala:42— InsertExpression's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CompilationUnit (LCOM4 4) compiler/src/dotty/tools/dotc/CompilationUnit.scala:22— CompilationUnit's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CaptureChecker (LCOM4 4) compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala:296— CaptureChecker's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: NamedType (LCOM4 4) compiler/src/dotty/tools/dotc/core/Types.scala:2330— NamedType's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: TreeBuffer (LCOM4 4) compiler/src/dotty/tools/dotc/core/tasty/TreeBuffer.scala:15— TreeBuffer's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Reporter (LCOM4 4) compiler/src/dotty/tools/dotc/reporting/Reporter.scala:69— Reporter's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: ForwardDepChecks (LCOM4 4) compiler/src/dotty/tools/dotc/transform/ForwardDepChecks.scala:58— ForwardDepChecks's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: PostTyper (LCOM4 4) compiler/src/dotty/tools/dotc/transform/PostTyper.scala:72— PostTyper's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Synthesizer (LCOM4 4) compiler/src/dotty/tools/dotc/typer/Synthesizer.scala:26— Synthesizer'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.
MethodTooLong: Typ.canDecompose compiler/src/dotty/tools/dotc/transform/patmat/Space.scala:100— MethodTooLong — canDecompose runs 709 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 609 over it, 7.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Typ.decompose compiler/src/dotty/tools/dotc/transform/patmat/Space.scala:102— MethodTooLong — decompose runs 708 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 608 over it, 7.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: TreeChecker.checkParents compiler/src/dotty/tools/dotc/transform/TreeChecker.scala:241— MethodTooLong — checkParents runs 447 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 347 over it, 4.47× 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: TreeNodeChecker.traverse compiler/src/dotty/tools/dotc/transform/TreeChecker.scala:259— MethodTooLong — traverse runs 435 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 335 over it, 4.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: GenericSignatures.javaSig0 compiler/src/dotty/tools/backend/jvm/GenericSignatures.scala:56— MethodTooLong — javaSig0 runs 250 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 150 over it, 2.50× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PostTyperTransformer.flattenSpreads compiler/src/dotty/tools/dotc/transform/PostTyper.scala:522— MethodTooLong — flattenSpreads runs 220 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 120 over it, 2.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ErrorReporting.wrongNumberOfTypeArgs compiler/src/dotty/tools/dotc/typer/ErrorReporting.scala:43— MethodTooLong — wrongNumberOfTypeArgs runs 220 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 120 over it, 2.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ErrorReporting.missingArgs compiler/src/dotty/tools/dotc/typer/ErrorReporting.scala:46— MethodTooLong — missingArgs runs 218 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 118 over it, 2.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ErrorReporting.matchReductionAddendum compiler/src/dotty/tools/dotc/typer/ErrorReporting.scala:66— MethodTooLong — matchReductionAddendum runs 200 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 100 over it, 2.00× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PlainPrinter.toTextRetainedElem compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala:183— MethodTooLong — toTextRetainedElem runs 164 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 64 over it, 1.64× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SyntheticMembers.existingDef compiler/src/dotty/tools/dotc/transform/SyntheticMembers.scala:81— MethodTooLong — existingDef runs 162 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 62 over it, 1.62× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PlainPrinter.toTextRetainedElems compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala:190— MethodTooLong — toTextRetainedElems runs 158 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 58 over it, 1.58× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PlainPrinter.isElidableUniversal compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala:195— MethodTooLong — isElidableUniversal runs 155 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 55 over it, 1.55× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SyntheticMembers.synthesizeDef compiler/src/dotty/tools/dotc/transform/SyntheticMembers.scala:91— MethodTooLong — synthesizeDef runs 153 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 53 over it, 1.53× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PlainPrinter.toTextGeneralCaptureSet compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala:206— MethodTooLong — toTextGeneralCaptureSet 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: WrappedSourceFile.sourcePos compiler/src/dotty/tools/dotc/util/SourceFile.scala:33— MethodTooLong — sourcePos 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.
MethodTooLong: WrappedSourceFile.lookupMagicHeader compiler/src/dotty/tools/dotc/util/SourceFile.scala:39— MethodTooLong — lookupMagicHeader runs 139 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 39 over it, 1.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TextMacros.generate repl/src/sourcecode/Macros.scala:60— MethodTooLong — generate runs 133 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 33 over it, 1.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: GlobalOptimizer.runInliner compiler/src/dotty/tools/backend/jvm/opt/Inliner.scala:82— MethodTooLong — runInliner runs 119 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 19 over it, 1.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: PrepareInlineable.initContext compiler/src/dotty/tools/dotc/inlines/PrepareInlineable.scala:33— MethodTooLong — initContext runs 108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 8 over it, 1.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PrepareInlineable.makeInlineable compiler/src/dotty/tools/dotc/inlines/PrepareInlineable.scala:36— MethodTooLong — makeInlineable runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PrepareInlineable.addAccessorDefs compiler/src/dotty/tools/dotc/inlines/PrepareInlineable.scala:39— MethodTooLong — addAccessorDefs runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
HackComment tests/run/tcpoly_parseridioms.scala:64— // hack for Mirrors: allow passing of method names — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment tests/pos-macros/i10151/Macro_1.scala:59— // hacky workaround to missing owner tracking in transform — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment tests/pos/tcpoly_seq.scala:70— // hack: ::'s tail will actually be last — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment tests/pos/tcpoly_seq_typealias.scala:72— // hack: ::'s tail will actually be last — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment tests/pos/tcpoly_seq.scala:128— // hack — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment tests/pos/tcpoly_seq_typealias.scala:132— // hack — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment presentation-compiler/test/dotty/tools/pc/tests/info/InfoSuite.scala:167— // hacky way to add a source file to the presentation compiler sources — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment library/src/scala/collection/immutable/IntMap.scala:405— //hack to preserve sharing — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment library/src/scala/collection/immutable/LongMap.scala:387— //hack to preserve sharing — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment library/src/scala/collection/immutable/TreeSeqMap.scala:643— // hack to preserve sharing — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment compiler/src/dotty/tools/dotc/util/ClasspathFromClassloader.scala:34— // HACK: We can't just collect the classpath from arbitrary parent — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment compiler/src/dotty/tools/dotc/util/ClasspathFromClassloader.scala:45— // HACK: For Java 9+, if the classloader is an AppClassLoader then use the classpath from the system — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment compiler/src/dotty/tools/dotc/semanticdb/ExtractSemanticDB.scala:293— // hack for inline code — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment compiler/src/dotty/tools/dotc/sbt/ExtractAPI.scala:522— // Hack to represent dotty types which don't have an equivalent in xsbti — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment compiler/src/dotty/tools/dotc/core/NameKinds.scala:270— // Hack to make super accessors from traits work. They would otherwise fail because of #765 — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment compiler/src/dotty/tools/backend/jvm/analysis/AliasingAnalyzer.scala:600— // hacky side effect, used for performance of AliasingFrame.merge. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
Duplicated block (6 lines × 2) compiler/src/dotty/tools/backend/jvm/analysis/ProdConsAnalyzer.scala:370— compiler/src/dotty/tools/backend/jvm/analysis/ProdConsAnalyzer.scala:370-375 | compiler/src/dotty/tools/backend/jvm/analysis/ProdConsAnalyzer.scala:389-394 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/src/dotty/tools/backend/jvm/analysis/ProdConsAnalyzer.scala:370` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) compiler/src/dotty/tools/dotc/core/Periods.scala:171— compiler/src/dotty/tools/dotc/core/Periods.scala:171-176 | compiler/src/dotty/tools/dotc/core/Periods.scala:179-184 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) compiler/src/dotty/tools/dotc/core/Types.scala:3513— compiler/src/dotty/tools/dotc/core/Types.scala:3513-3518 | compiler/src/dotty/tools/dotc/core/Types.scala:3603-3608 — both copies are in the same file, so extract the 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/dotty/tools/dotc/core/Types.scala:3513` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) compiler/src/dotty/tools/dotc/interactive/Interactive.scala:203— compiler/src/dotty/tools/dotc/interactive/Interactive.scala:203-208 | presentation-compiler/src/main/dotty/tools/pc/MetalsInteractive.scala:32-42 — 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/dotty/tools/dotc/interactive/Interactive.scala:203` 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 (6 lines × 2) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:3835— compiler/src/dotty/tools/dotc/parsing/Parsers.scala:3835-3840 | compiler/src/dotty/tools/dotc/parsing/Parsers.scala:4106-4111 — both copies are in the same file, so extract the 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/dotty/tools/dotc/parsing/Parsers.scala:3835` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) compiler/src/dotty/tools/dotc/transform/init/Objects.scala:1667— compiler/src/dotty/tools/dotc/transform/init/Objects.scala:1667-1672 | compiler/src/dotty/tools/dotc/transform/init/Semantic.scala:1307-1312 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/src/dotty/tools/dotc/transform/init/Objects.scala:1667` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) presentation-compiler/src/main/dotty/tools/pc/AutoImportsProvider.scala:34— presentation-compiler/src/main/dotty/tools/pc/AutoImportsProvider.scala:34-39 | presentation-compiler/src/main/dotty/tools/pc/ConvertToNamedArgumentsProvider.scala:26-31 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) library-js/src/scala/collection/immutable/NumericRange.scala:330— library-js/src/scala/collection/immutable/NumericRange.scala:330-335 | library/src/scala/collection/immutable/NumericRange.scala:387-392 — before extracting anything, compare `library-js/src/scala/collection/immutable/NumericRange.scala` and `library/src/scala/collection/immutable/NumericRange.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 238 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) library/src/scala/collection/convert/impl/ChampStepper.scala:47— library/src/scala/collection/convert/impl/ChampStepper.scala:47-52 | library/src/scala/collection/immutable/ChampCommon.scala:126-131 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) library/src/scala/collection/mutable/IndexedSeq.scala:41— library/src/scala/collection/mutable/IndexedSeq.scala:41-46 | library/src/scala/collection/mutable/Seq.scala:64-69 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) compiler/src/dotty/tools/backend/jvm/opt/OptimizerKnownBTypes.scala:74— compiler/src/dotty/tools/backend/jvm/opt/OptimizerKnownBTypes.scala:74-79 | compiler/src/dotty/tools/backend/jvm/opt/OptimizerKnownBTypes.scala:134-139 — both copies are in the same file, so extract the 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/dotty/tools/backend/jvm/opt/OptimizerKnownBTypes.scala:74` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) compiler/src/dotty/tools/dotc/util/NameTransformer.scala:108— compiler/src/dotty/tools/dotc/util/NameTransformer.scala:108-113 | library/src/scala/reflect/NameTransformer.scala:136-141 — before extracting anything, compare `compiler/src/dotty/tools/dotc/util/NameTransformer.scala` and `library/src/scala/reflect/NameTransformer.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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/src/dotty/tools/dotc/util/NameTransformer.scala:108` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) library/src/scala/jdk/DoubleAccumulator.scala:50— library/src/scala/jdk/DoubleAccumulator.scala:50-55 | library/src/scala/jdk/LongAccumulator.scala:51-56 — before extracting anything, compare `library/src/scala/jdk/DoubleAccumulator.scala` and `library/src/scala/jdk/LongAccumulator.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala:596— compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala:596-600 | compiler/src/dotty/tools/dotc/parsing/Scanners.scala:1495-1499 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala:596` 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/dotty/tools/dotc/parsing/Scanners.scala:1494` calls `checkNoTrailingSeparator` and `compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala:595` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) compiler/src/dotty/tools/dotc/semanticdb/internal/SemanticdbOutputStream.scala:194— compiler/src/dotty/tools/dotc/semanticdb/internal/SemanticdbOutputStream.scala:194-198 | compiler/src/dotty/tools/dotc/semanticdb/internal/SemanticdbOutputStream.scala:207-211 — both copies are in the same file, so extract the 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/dotty/tools/dotc/semanticdb/internal/SemanticdbOutputStream.scala:194` 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 (5 lines × 2) compiler/src/scala/quoted/runtime/impl/printers/Extractors.scala:22— compiler/src/scala/quoted/runtime/impl/printers/Extractors.scala:22-26 | compiler/src/scala/quoted/runtime/impl/printers/SourceCode.scala:27-31 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) library/src/scala/runtime/VarArgsBuilder.scala:15— library/src/scala/runtime/VarArgsBuilder.scala:15-19 | library/src/scala/runtime/VarArgsBuilder.scala:34-39 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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 × 2) compiler/src/dotty/tools/dotc/util/NameTransformer.scala:22— compiler/src/dotty/tools/dotc/util/NameTransformer.scala:22-26 | library/src/scala/reflect/NameTransformer.scala:40-44 — before extracting anything, compare `compiler/src/dotty/tools/dotc/util/NameTransformer.scala` and `library/src/scala/reflect/NameTransformer.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) library-js/src/scala/collection/immutable/NumericRange.scala:220— library-js/src/scala/collection/immutable/NumericRange.scala:220-224 | library/src/scala/collection/immutable/NumericRange.scala:269-273 — before extracting anything, compare `library-js/src/scala/collection/immutable/NumericRange.scala` and `library/src/scala/collection/immutable/NumericRange.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 238 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) library-js/src/scala/collection/immutable/NumericRange.scala:226— library-js/src/scala/collection/immutable/NumericRange.scala:226-230 | library/src/scala/collection/immutable/NumericRange.scala:275-279 — before extracting anything, compare `library-js/src/scala/collection/immutable/NumericRange.scala` and `library/src/scala/collection/immutable/NumericRange.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 238 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) presentation-compiler/src/main/dotty/tools/pc/RawScalaPresentationCompiler.scala:128— presentation-compiler/src/main/dotty/tools/pc/RawScalaPresentationCompiler.scala:128-132 | presentation-compiler/src/main/dotty/tools/pc/ScalaPresentationCompiler.scala:165-169 — before extracting anything, compare `presentation-compiler/src/main/dotty/tools/pc/RawScalaPresentationCompiler.scala` and `presentation-compiler/src/main/dotty/tools/pc/ScalaPresentationCompiler.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) scaladoc/src/scala/tasty/inspector/TastyInspector.scala:144— scaladoc/src/scala/tasty/inspector/TastyInspector.scala:144-148 | tasty-inspector/src/scala/tasty/inspector/TastyInspector.scala:115-119 — before extracting anything, compare `scaladoc/src/scala/tasty/inspector/TastyInspector.scala` and `tasty-inspector/src/scala/tasty/inspector/TastyInspector.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) compiler/src/dotty/tools/dotc/core/Symbols.scala:650— compiler/src/dotty/tools/dotc/core/Symbols.scala:650-654 | compiler/src/dotty/tools/dotc/core/Symbols.scala:753-757 — both copies are in the same file, so extract the 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/dotty/tools/dotc/core/Symbols.scala:650` 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) library-js/src/scala/collection/immutable/NumericRange.scala:60— library-js/src/scala/collection/immutable/NumericRange.scala:60-64 | library/src/scala/collection/immutable/NumericRange.scala:63-67 — before extracting anything, compare `library-js/src/scala/collection/immutable/NumericRange.scala` and `library/src/scala/collection/immutable/NumericRange.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 238 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library-js/src/scala/collection/immutable/NumericRange.scala:60` 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.
ClassTooLong: RefinedPrinter compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala:38— ClassTooLong — 1012 significant lines (blank, comment-only and punctuation-only lines excluded), 42 methods. The bar is 400 significant lines; this is 612 over it, 2.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: TreePickler compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala:23— ClassTooLong — 777 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 400 significant lines; this is 377 over it, 1.94× 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: PlainPrinter compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala:22— ClassTooLong — 672 significant lines (blank, comment-only and punctuation-only lines excluded), 95 methods. The bar is 400 significant lines; this is 272 over it, 1.68× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: JSExportsGen compiler/src/dotty/tools/backend/sjs/JSExportsGen.scala:34— ClassTooLong — 599 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 400 significant lines; this is 199 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: GlobalOptimizer compiler/src/dotty/tools/backend/jvm/opt/Inliner.scala:34— ClassTooLong — 504 significant lines (blank, comment-only and punctuation-only lines excluded), 7 methods. The bar is 400 significant lines; this is 104 over it, 1.26× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: BoxesRunTime library/src/scala/runtime/BoxesRunTime.java:28— ClassTooLong — 496 significant lines (blank, comment-only and punctuation-only lines excluded), 59 methods. The bar is 400 significant lines; this is 96 over it, 1.24× 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: BoxUnbox compiler/src/dotty/tools/backend/jvm/opt/BoxUnbox.scala:30— ClassTooLong — 463 significant lines (blank, comment-only and punctuation-only lines excluded), 3 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: CopyProp compiler/src/dotty/tools/backend/jvm/opt/CopyProp.scala:30— ClassTooLong — 415 significant lines (blank, comment-only and punctuation-only lines excluded), 5 methods. The bar is 400 significant lines; this is 15 over it, 1.04× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ExtractAPICollector compiler/src/dotty/tools/dotc/sbt/ExtractAPI.scala:201— ClassTooLong — 409 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 9 over it, 1.02× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×6
Members sharing a duplicated core (4 members, 50+ identical tokens) compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala:62— compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala:62-356 | compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala:378-413 | compiler/src/dotty/tools/dotc/parsing/Scanners.scala:878-1024 | compiler/src/dotty/tools/dotc/parsing/Scanners.scala:1137-1170 — 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) library/src/scala/collection/convert/impl/IteratorStepper.scala:29— library/src/scala/collection/convert/impl/IteratorStepper.scala:29-44 | library/src/scala/collection/convert/impl/IteratorStepper.scala:54-69 | library/src/scala/collection/convert/impl/IteratorStepper.scala:79-94 | library/src/scala/collection/convert/impl/IteratorStepper.scala:104-119 — 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) library/src/scala/jdk/AnyAccumulator.scala:87— library/src/scala/jdk/AnyAccumulator.scala:87-132 | library/src/scala/jdk/DoubleAccumulator.scala:85-139 | library/src/scala/jdk/IntAccumulator.scala:88-145 | library/src/scala/jdk/LongAccumulator.scala:86-140 — 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) library/src/scala/jdk/AnyAccumulator.scala:216— library/src/scala/jdk/AnyAccumulator.scala:216-234 | library/src/scala/jdk/DoubleAccumulator.scala:278-296 | library/src/scala/jdk/IntAccumulator.scala:284-302 | library/src/scala/jdk/LongAccumulator.scala:279-297 — 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) library/src/scala/jdk/AnyAccumulator.scala:370— library/src/scala/jdk/AnyAccumulator.scala:370-392 | library/src/scala/jdk/DoubleAccumulator.scala:428-450 | library/src/scala/jdk/IntAccumulator.scala:434-456 | library/src/scala/jdk/LongAccumulator.scala:429-451 — 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) library/src/scala/runtime/BoxesRunTime.java:553— library/src/scala/runtime/BoxesRunTime.java:553-578 | library/src/scala/runtime/BoxesRunTime.java:580-605 | library/src/scala/runtime/BoxesRunTime.java:607-632 | library/src/scala/runtime/BoxesRunTime.java:634-659 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Duplicated block (8 lines × 3) compiler/src/dotty/tools/dotc/util/EqHashSet.scala:74— compiler/src/dotty/tools/dotc/util/EqHashSet.scala:74-81 | compiler/src/dotty/tools/dotc/util/GenericHashSet.scala:101-108 | compiler/src/dotty/tools/dotc/util/HashSet.scala:77-84 — before extracting anything, compare `compiler/src/dotty/tools/dotc/util/EqHashSet.scala` and `compiler/src/dotty/tools/dotc/util/GenericHashSet.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. 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 × 3) compiler/src/dotty/tools/dotc/util/EqHashSet.scala:95— compiler/src/dotty/tools/dotc/util/EqHashSet.scala:95-102 | compiler/src/dotty/tools/dotc/util/GenericHashSet.scala:152-159 | compiler/src/dotty/tools/dotc/util/HashSet.scala:98-105 — before extracting anything, compare `compiler/src/dotty/tools/dotc/util/EqHashSet.scala` and `compiler/src/dotty/tools/dotc/util/GenericHashSet.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 3) compiler/src/dotty/tools/dotc/util/EqHashMap.scala:37— compiler/src/dotty/tools/dotc/util/EqHashMap.scala:37-44 | compiler/src/dotty/tools/dotc/util/GenericHashMap.scala:80-87 | compiler/src/dotty/tools/dotc/util/HashMap.scala:40-47 — before extracting anything, compare `compiler/src/dotty/tools/dotc/util/EqHashMap.scala` and `compiler/src/dotty/tools/dotc/util/GenericHashMap.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. 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 × 3) compiler/src/dotty/tools/dotc/util/EqHashMap.scala:78— compiler/src/dotty/tools/dotc/util/EqHashMap.scala:78-85 | compiler/src/dotty/tools/dotc/util/GenericHashMap.scala:150-157 | compiler/src/dotty/tools/dotc/util/HashMap.scala:81-88 — before extracting anything, compare `compiler/src/dotty/tools/dotc/util/EqHashMap.scala` and `compiler/src/dotty/tools/dotc/util/GenericHashMap.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 3) compiler/src/dotty/tools/dotc/util/EqHashSet.scala:44— compiler/src/dotty/tools/dotc/util/EqHashSet.scala:44-51 | compiler/src/dotty/tools/dotc/util/GenericHashSet.scala:71-78 | compiler/src/dotty/tools/dotc/util/HashSet.scala:48-55 — before extracting anything, compare `compiler/src/dotty/tools/dotc/util/EqHashSet.scala` and `compiler/src/dotty/tools/dotc/util/GenericHashSet.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. 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 × 3) library/src/scala/runtime/BoxesRunTime.java:454— library/src/scala/runtime/BoxesRunTime.java:454-461 | library/src/scala/runtime/BoxesRunTime.java:474-481 | library/src/scala/runtime/BoxesRunTime.java:494-501 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `library/src/scala/runtime/BoxesRunTime.java:454` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) compiler/src/dotty/tools/dotc/core/Types.scala:3561— compiler/src/dotty/tools/dotc/core/Types.scala:3561-3567 | compiler/src/dotty/tools/dotc/core/Types.scala:3710-3716 — both copies are in the same file, so extract the 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/dotty/tools/dotc/core/Types.scala:3561` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) compiler/src/dotty/tools/dotc/transform/init/Objects.scala:1619— compiler/src/dotty/tools/dotc/transform/init/Objects.scala:1619-1625 | compiler/src/dotty/tools/dotc/transform/init/Semantic.scala:1267-1273 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/src/dotty/tools/dotc/transform/init/Objects.scala:1619` 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 first that the copies are not typed on the same thing: the declarations holding them bind `klass` to `ClassSymbol): Contextual[Value] = log("evaluating " + expr.show + "` in one and `ClassSymbol` 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 (7 lines × 2) compiler/src/dotty/tools/dotc/transform/localopt/FormatChecker.scala:231— compiler/src/dotty/tools/dotc/transform/localopt/FormatChecker.scala:231-237 | compiler/src/dotty/tools/dotc/transform/localopt/StringInterpolatorOpt.scala:117-123 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/src/dotty/tools/dotc/transform/localopt/FormatChecker.scala:231` 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) scaladoc/src/dotty/tools/scaladoc/tasty/comments/Preparser.scala:46— scaladoc/src/dotty/tools/scaladoc/tasty/comments/Preparser.scala:46-52 | scaladoc/src/dotty/tools/scaladoc/tasty/comments/Preparser.scala:65-71 — both copies are in the same file, so extract the 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 `scaladoc/src/dotty/tools/scaladoc/tasty/comments/Preparser.scala:46` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) library-js/src/scala/collection/immutable/NumericRange.scala:235— library-js/src/scala/collection/immutable/NumericRange.scala:235-241 | library/src/scala/collection/immutable/NumericRange.scala:284-290 — before extracting anything, compare `library-js/src/scala/collection/immutable/NumericRange.scala` and `library/src/scala/collection/immutable/NumericRange.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 238 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) library-js/src/scala/collection/immutable/NumericRange.scala:507— library-js/src/scala/collection/immutable/NumericRange.scala:507-513 | library/src/scala/collection/immutable/NumericRange.scala:566-572 — before extracting anything, compare `library-js/src/scala/collection/immutable/NumericRange.scala` and `library/src/scala/collection/immutable/NumericRange.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 238 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
X24 · Document value interpolated into markup unescaped· Untrusted text written into markup unescaped · ×6
Untrusted text written into markup unescaped REDACTED:237— `e.innerHTML.replace(/\n/g,"").replace(/<br[ /]*>/g,"\n")` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped REDACTED:239— `a.value` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped REDACTED:241— `a.value` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped scaladoc/resources/dotty_res/scripts/common/utils.js:14— `htmlToString(html)` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped scaladoc/resources/dotty_res/scripts/ux.js:42— `saved.mainDiv` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped scaladoc/resources/dotty_res/scripts/ux.js:44— `saved.leftColumn` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
XxxComment tests/pos/t2795-new.scala:11— // XXX Following works fine: — 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.
XxxComment tests/pos/t2795-old.scala:9— // XXX Following works fine: — 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.
XxxComment compiler/src/dotty/tools/dotc/plugins/Plugin.scala:142— // XXX Return to this once we have more ARM 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.
XxxComment compiler/src/dotty/tools/dotc/parsing/xml/SymbolicXMLBuilder.scala:229— // XXX this is where we'd like to put Select(value, nme.toString_) for #1787
XxxComment compiler/src/dotty/tools/dotc/config/PathResolver.scala:98— // XXX It must be time for someone to figure out what all these things — 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.
Duplicated block (10 lines × 2) compiler/src/dotty/tools/dotc/core/Substituters.scala:59— compiler/src/dotty/tools/dotc/core/Substituters.scala:59-68 | compiler/src/dotty/tools/dotc/core/Types.scala:3884-3893 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/src/dotty/tools/dotc/core/Substituters.scala:59` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) compiler/src/dotty/tools/dotc/reporting/messages.scala:2163— compiler/src/dotty/tools/dotc/reporting/messages.scala:2163-2172 | compiler/src/dotty/tools/dotc/reporting/messages.scala:2509-2518 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) compiler/src/dotty/tools/dotc/transform/init/Objects.scala:1641— compiler/src/dotty/tools/dotc/transform/init/Objects.scala:1641-1650 | compiler/src/dotty/tools/dotc/transform/init/Semantic.scala:1277-1286 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/src/dotty/tools/dotc/transform/init/Objects.scala:1641` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) compiler/src/dotty/tools/dotc/transform/init/Objects.scala:2124— compiler/src/dotty/tools/dotc/transform/init/Objects.scala:2124-2133 | compiler/src/dotty/tools/dotc/transform/init/Semantic.scala:1553-1562 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/src/dotty/tools/dotc/transform/init/Objects.scala:2124` 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 first that the copies are not typed on the same thing: the declarations holding them bind `klass` to `ClassSymbol): Contextual[Ref] = log("init " + klass.show` in one and `ClassSymbol): Contextual[Value] = log("init " + klass.show` 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 (10 lines × 2) compiler/src/dotty/tools/tasty/besteffort/BestEffortTastyHeaderUnpickler.scala:157— compiler/src/dotty/tools/tasty/besteffort/BestEffortTastyHeaderUnpickler.scala:157-166 | tasty/src/dotty/tools/tasty/TastyHeaderUnpickler.scala:211-220 — before extracting anything, compare `compiler/src/dotty/tools/tasty/besteffort/BestEffortTastyHeaderUnpickler.scala` and `tasty/src/dotty/tools/tasty/TastyHeaderUnpickler.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) compiler/src/dotty/tools/dotc/util/NameTransformer.scala:116— compiler/src/dotty/tools/dotc/util/NameTransformer.scala:116-124 | library/src/scala/reflect/NameTransformer.scala:144-152 — before extracting anything, compare `compiler/src/dotty/tools/dotc/util/NameTransformer.scala` and `library/src/scala/reflect/NameTransformer.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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/src/dotty/tools/dotc/util/NameTransformer.scala:116` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) presentation-compiler/src/main/dotty/tools/pc/InferredMethodProvider.scala:56— presentation-compiler/src/main/dotty/tools/pc/InferredMethodProvider.scala:56-64 | presentation-compiler/src/main/dotty/tools/pc/InferredTypeProvider.scala:60-68 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9 lines × 2) library-js/src/scala/collection/immutable/NumericRange.scala:121— library-js/src/scala/collection/immutable/NumericRange.scala:121-129 | library/src/scala/collection/immutable/NumericRange.scala:125-133 — before extracting anything, compare `library-js/src/scala/collection/immutable/NumericRange.scala` and `library/src/scala/collection/immutable/NumericRange.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 238 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) library/src/scala/collection/convert/impl/InOrderStepperBase.scala:49— library/src/scala/collection/convert/impl/InOrderStepperBase.scala:49-57 | library/src/scala/collection/convert/impl/IndexedStepperBase.scala:38-46 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9 lines × 2) presentation-compiler/src/main/dotty/tools/pc/RawScalaPresentationCompiler.scala:55— presentation-compiler/src/main/dotty/tools/pc/RawScalaPresentationCompiler.scala:55-63 | presentation-compiler/src/main/dotty/tools/pc/ScalaPresentationCompiler.scala:67-75 — before extracting anything, compare `presentation-compiler/src/main/dotty/tools/pc/RawScalaPresentationCompiler.scala` and `presentation-compiler/src/main/dotty/tools/pc/ScalaPresentationCompiler.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `presentation-compiler/src/main/dotty/tools/pc/RawScalaPresentationCompiler.scala:51` calls `this` and `presentation-compiler/src/main/dotty/tools/pc/ScalaPresentationCompiler.scala:63` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 3) compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala:69— compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala:69-75 | compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala:379-385 | compiler/src/dotty/tools/dotc/parsing/Scanners.scala:1137-1143 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala:69` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 3) compiler/src/dotty/tools/dotc/util/EqHashSet.scala:86— compiler/src/dotty/tools/dotc/util/EqHashSet.scala:86-92 | compiler/src/dotty/tools/dotc/util/GenericHashSet.scala:143-149 | compiler/src/dotty/tools/dotc/util/HashSet.scala:89-95 — before extracting anything, compare `compiler/src/dotty/tools/dotc/util/EqHashSet.scala` and `compiler/src/dotty/tools/dotc/util/GenericHashSet.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 3) library/src/scala/jdk/DoubleAccumulator.scala:70— library/src/scala/jdk/DoubleAccumulator.scala:70-76 | library/src/scala/jdk/IntAccumulator.scala:73-79 | library/src/scala/jdk/LongAccumulator.scala:71-77 — before extracting anything, compare `library/src/scala/jdk/DoubleAccumulator.scala` and `library/src/scala/jdk/IntAccumulator.scala` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 3) library/src/scala/jdk/DoubleAccumulator.scala:185— library/src/scala/jdk/DoubleAccumulator.scala:185-191 | library/src/scala/jdk/IntAccumulator.scala:191-197 | library/src/scala/jdk/LongAccumulator.scala:186-192 — before extracting anything, compare `library/src/scala/jdk/DoubleAccumulator.scala` and `library/src/scala/jdk/IntAccumulator.scala` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 3) library/src/scala/jdk/DoubleAccumulator.scala:193— library/src/scala/jdk/DoubleAccumulator.scala:193-199 | library/src/scala/jdk/IntAccumulator.scala:199-205 | library/src/scala/jdk/LongAccumulator.scala:194-200 — before extracting anything, compare `library/src/scala/jdk/DoubleAccumulator.scala` and `library/src/scala/jdk/IntAccumulator.scala` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
X18 · Disposal-pattern correctness· Disposable created and abandoned in the function that made it · ×5
Disposable created and abandoned in the function that made it project/ScalaLibraryPlugin.scala:78— `Files.walk(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.iterator` through it and drops it, so this expression both creates the value and is the last place that can release it, and does not. Every call leaks one more open handle until the collector happens to reach it: `Too many open files` under load, and on Windows a file that cannot be replaced or deleted while it is held. Open it with `scala.util.Using.resource(Files.walk(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`.
Disposable created and abandoned in the function that made it project/scripts/bisect.scala:199— `scala.io.Source.fromFile(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.mkString` through it and drops it, so this expression both creates the value and is the last place that can release it, and does not. Every call leaks one more open handle until the collector happens to reach it: `Too many open files` under load, and on Windows a file that cannot be replaced or deleted while it is held. Open it with `scala.util.Using.resource(scala.io.Source.fromFile(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`.
Disposable created and abandoned in the function that made it compiler/src/dotty/tools/dotc/classpath/DirectoryClassPath.scala:211— `Files.newDirectoryStream(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.iterator` through it and drops it, so this expression both creates the value and is the last place that can release it, and does not. Every call leaks one more open handle until the collector happens to reach it: `Too many open files` under load, and on Windows a file that cannot be replaced or deleted while it is held. Open it with `scala.util.Using.resource(Files.newDirectoryStream(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`.
Disposable created and abandoned in the function that made it compiler/src/dotty/tools/dotc/classpath/DirectoryClassPath.scala:223— `Files.walk(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.iterator` through it and drops it, so this expression both creates the value and is the last place that can release it, and does not. Every call leaks one more open handle until the collector happens to reach it: `Too many open files` under load, and on Windows a file that cannot be replaced or deleted while it is held. Open it with `scala.util.Using.resource(Files.walk(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`.
Disposable created and abandoned in the function that made it compiler/src/dotty/tools/dotc/classpath/DirectoryClassPath.scala:241— `Files.list(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.iterator` through it and drops it, so this expression both creates the value and is the last place that can release it, and does not. Every call leaks one more open handle until the collector happens to reach it: `Too many open files` under load, and on Windows a file that cannot be replaced or deleted while it is held. Open it with `scala.util.Using.resource(Files.list(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`.
Duplicated block (9 lines × 3) compiler/src/dotty/tools/dotc/util/EqHashSet.scala:63— compiler/src/dotty/tools/dotc/util/EqHashSet.scala:63-71 | compiler/src/dotty/tools/dotc/util/GenericHashSet.scala:90-98 | compiler/src/dotty/tools/dotc/util/HashSet.scala:66-74 — before extracting anything, compare `compiler/src/dotty/tools/dotc/util/EqHashSet.scala` and `compiler/src/dotty/tools/dotc/util/GenericHashSet.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. 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 (9 lines × 3) bench-run/src/main/scala/tuples/Drop.scala:14— bench-run/src/main/scala/tuples/Drop.scala:14-22 | bench-run/src/main/scala/tuples/Split.scala:14-22 | bench-run/src/main/scala/tuples/Take.scala:14-22 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (9 lines × 3) library/src/scala/jdk/DoubleAccumulator.scala:201— library/src/scala/jdk/DoubleAccumulator.scala:201-209 | library/src/scala/jdk/IntAccumulator.scala:207-215 | library/src/scala/jdk/LongAccumulator.scala:202-210 — before extracting anything, compare `library/src/scala/jdk/DoubleAccumulator.scala` and `library/src/scala/jdk/IntAccumulator.scala` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 3) library/src/scala/jdk/DoubleAccumulator.scala:211— library/src/scala/jdk/DoubleAccumulator.scala:211-219 | library/src/scala/jdk/IntAccumulator.scala:217-225 | library/src/scala/jdk/LongAccumulator.scala:212-220 — before extracting anything, compare `library/src/scala/jdk/DoubleAccumulator.scala` and `library/src/scala/jdk/IntAccumulator.scala` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) compiler/src/dotty/tools/debug/ResolveReflectEval.scala:100— compiler/src/dotty/tools/debug/ResolveReflectEval.scala:100-107 | compiler/src/dotty/tools/debug/ResolveReflectEval.scala:123-130 — both copies are in the same file, so extract the 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/dotty/tools/debug/ResolveReflectEval.scala:100` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) compiler/src/dotty/tools/dotc/util/EqHashMap.scala:88— compiler/src/dotty/tools/dotc/util/EqHashMap.scala:88-95 | compiler/src/dotty/tools/dotc/util/HashMap.scala:91-98 — before extracting anything, compare `compiler/src/dotty/tools/dotc/util/EqHashMap.scala` and `compiler/src/dotty/tools/dotc/util/HashMap.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) scaladoc/src/scala/tasty/inspector/TastyInspector.scala:47— scaladoc/src/scala/tasty/inspector/TastyInspector.scala:47-54 | tasty-inspector/src/scala/tasty/inspector/TastyInspector.scala:50-57 — before extracting anything, compare `scaladoc/src/scala/tasty/inspector/TastyInspector.scala` and `tasty-inspector/src/scala/tasty/inspector/TastyInspector.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) library/src/scala/jdk/DoubleAccumulator.scala:418— library/src/scala/jdk/DoubleAccumulator.scala:418-425 | library/src/scala/jdk/LongAccumulator.scala:419-426 — before extracting anything, compare `library/src/scala/jdk/DoubleAccumulator.scala` and `library/src/scala/jdk/LongAccumulator.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 4) compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala:70— compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala:70-75 | compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala:380-385 | compiler/src/dotty/tools/dotc/parsing/Scanners.scala:886-891 | compiler/src/dotty/tools/dotc/parsing/Scanners.scala:1138-1143 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala:70` 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 (6 lines × 4) library/src/scala/jdk/AnyAccumulator.scala:102— library/src/scala/jdk/AnyAccumulator.scala:102-107 | library/src/scala/jdk/DoubleAccumulator.scala:101-106 | library/src/scala/jdk/IntAccumulator.scala:104-109 | library/src/scala/jdk/LongAccumulator.scala:102-107 — before extracting anything, compare `library/src/scala/jdk/AnyAccumulator.scala` and `library/src/scala/jdk/DoubleAccumulator.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/src/scala/jdk/AnyAccumulator.scala:102` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 4) library/src/scala/jdk/AnyAccumulator.scala:346— library/src/scala/jdk/AnyAccumulator.scala:346-351 | library/src/scala/jdk/DoubleAccumulator.scala:404-409 | library/src/scala/jdk/IntAccumulator.scala:410-415 | library/src/scala/jdk/LongAccumulator.scala:405-410 — before extracting anything, compare `library/src/scala/jdk/AnyAccumulator.scala` and `library/src/scala/jdk/DoubleAccumulator.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 4) library/src/scala/runtime/BoxesRunTime.java:554— library/src/scala/runtime/BoxesRunTime.java:554-559 | library/src/scala/runtime/BoxesRunTime.java:581-586 | library/src/scala/runtime/BoxesRunTime.java:608-613 | library/src/scala/runtime/BoxesRunTime.java:635-640 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `library/src/scala/runtime/BoxesRunTime.java:554` 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 × 3) compiler/src/dotty/tools/dotc/util/EqHashMap.scala:47— compiler/src/dotty/tools/dotc/util/EqHashMap.scala:47-59 | compiler/src/dotty/tools/dotc/util/GenericHashMap.scala:90-102 | compiler/src/dotty/tools/dotc/util/HashMap.scala:50-62 — before extracting anything, compare `compiler/src/dotty/tools/dotc/util/EqHashMap.scala` and `compiler/src/dotty/tools/dotc/util/GenericHashMap.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. 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 (13 lines × 3) compiler/src/dotty/tools/dotc/util/EqHashMap.scala:63— compiler/src/dotty/tools/dotc/util/EqHashMap.scala:63-75 | compiler/src/dotty/tools/dotc/util/GenericHashMap.scala:135-147 | compiler/src/dotty/tools/dotc/util/HashMap.scala:66-78 — before extracting anything, compare `compiler/src/dotty/tools/dotc/util/EqHashMap.scala` and `compiler/src/dotty/tools/dotc/util/GenericHashMap.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. 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 (13 lines × 3) library/src/scala/jdk/DoubleAccumulator.scala:494— library/src/scala/jdk/DoubleAccumulator.scala:494-506 | library/src/scala/jdk/IntAccumulator.scala:500-512 | library/src/scala/jdk/LongAccumulator.scala:495-507 — before extracting anything, compare `library/src/scala/jdk/DoubleAccumulator.scala` and `library/src/scala/jdk/IntAccumulator.scala` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/src/scala/jdk/DoubleAccumulator.scala:494` 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 first that the copies are not typed on the same thing: the declarations holding them bind `c` to `DoubleConsumer): Unit = while (N > 0` in one and `IntConsumer): Unit = while (N > 0` 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 (12 lines × 2) compiler/src/dotty/tools/tasty/besteffort/BestEffortTastyHeaderUnpickler.scala:56— compiler/src/dotty/tools/tasty/besteffort/BestEffortTastyHeaderUnpickler.scala:56-67 | tasty/src/dotty/tools/tasty/TastyHeaderUnpickler.scala:111-122 — before extracting anything, compare `compiler/src/dotty/tools/tasty/besteffort/BestEffortTastyHeaderUnpickler.scala` and `tasty/src/dotty/tools/tasty/TastyHeaderUnpickler.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) library-js/src/scala/collection/immutable/NumericRange.scala:150— library-js/src/scala/collection/immutable/NumericRange.scala:150-161 | library/src/scala/collection/immutable/NumericRange.scala:199-210 — before extracting anything, compare `library-js/src/scala/collection/immutable/NumericRange.scala` and `library/src/scala/collection/immutable/NumericRange.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 238 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library-js/src/scala/collection/immutable/NumericRange.scala:150` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (12 lines × 2) library-js/src/scala/collection/immutable/NumericRange.scala:346— library-js/src/scala/collection/immutable/NumericRange.scala:346-357 | library/src/scala/collection/immutable/NumericRange.scala:403-414 — before extracting anything, compare `library-js/src/scala/collection/immutable/NumericRange.scala` and `library/src/scala/collection/immutable/NumericRange.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 238 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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.
Unfinished stub — body is `???` compiler/src/dotty/tools/dotc/typer/ErrorReporting.scala:170— `patternConstrStr` is a shipped member whose whole body is still `???`, and nothing in the repository overrides it — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — body is `???` scaladoc/src/dotty/tools/scaladoc/SourceLinks.scala:66— `parseLinkDefinition` is a shipped member whose whole body is still `???`, and nothing in the repository overrides it — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — body is `???` scaladoc/src/dotty/tools/scaladoc/site/LoadedTemplate.scala:14— `setValue` is a shipped member whose whole body is still `???`, and nothing in the repository overrides it — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — body is ??? / NotImplementedError compiler/src/dotty/tools/dotc/typer/ErrorReporting.scala:170— `patternConstrStr` is a shipped method whose whole body is `???` (or throws NotImplementedError), and nothing in the repository overrides it — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — body is ??? / NotImplementedError scaladoc/src/dotty/tools/scaladoc/SourceLinks.scala:66— `parseLinkDefinition` is a shipped method whose whole body is `???` (or throws NotImplementedError), and nothing in the repository overrides it — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — body is ??? / NotImplementedError scaladoc/src/dotty/tools/scaladoc/site/LoadedTemplate.scala:14— `setValue` is a shipped method whose whole body is `???` (or throws NotImplementedError), and nothing in the repository overrides it — scaffolding that was never completed. Implement it or remove the dead surface.
Duplicated block (11 lines × 2 locations) REDACTED:310— REDACTED:310 · REDACTED:451 — all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
Duplicated block (11 lines × 2 locations) scaladoc/resources/dotty_res/scripts/featureToggles.js:14— scaladoc/resources/dotty_res/scripts/featureToggles.js:14 · scaladoc/resources/dotty_res/scripts/theme.js:1 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (11 lines × 2 locations) scaladoc/resources/dotty_res/scripts/ux.js:653— scaladoc/resources/dotty_res/scripts/ux.js:653 · scaladoc/resources/dotty_res/scripts/ux.js:665 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Swallowed exception (empty catch) compiler/src/dotty/tools/dotc/interactive/LogicalPackagesProvider.scala:31— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) compiler/src/dotty/tools/dotc/interactive/LogicalPackagesProvider.scala:53— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) compiler/src/dotty/tools/dotc/interactive/LogicalPackagesProvider.scala:66— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
NumericRange.count (cyclomatic 26) library-js/src/scala/collection/immutable/NumericRange.scala:371— NumericRange.count 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.
NumericRange.count (cyclomatic 26) library/src/scala/collection/immutable/NumericRange.scala:428— NumericRange.count 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.
NumericRange.crossesTheEndAfterN (cyclomatic 16) library-js/src/scala/collection/immutable/NumericRange.scala:145— NumericRange.crossesTheEndAfterN 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.
NumericRange.crossesTheEndAfterN (cyclomatic 16) library/src/scala/collection/immutable/NumericRange.scala:194— NumericRange.crossesTheEndAfterN 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.
TodoComment repeated across 16 files tests/run-tasty-inspector/i10359.scala:26— The identical TodoComment appears in 16 files (17 occurrences) — almost certainly one boilerplate line from a single migration or decision, not 17 independent debts. Fix the systemic cause once rather than file-by-file. Text: "// TODO improve infrastructure to avoid needing this code on each test". Source code is not a task system: track the cleanup where tasks live. (Every occurrence still counts toward the score and metrics.)
TodoComment repeated across 16 files tests/pos/needstypeearly.scala:5— The identical TodoComment appears in 16 files (34 occurrences) — almost certainly one boilerplate line from a single migration or decision, not 34 independent debts. Fix the systemic cause once rather than file-by-file. Text: "// TODO NEEDS MANUAL CHANGE (early initializers)". Source code is not a task system: track the cleanup where tasks live. (Every occurrence still counts toward the score and metrics.)
NumericRange.count (cognitive 71) library-js/src/scala/collection/immutable/NumericRange.scala:371— NumericRange.count has cognitive complexity 71 (threshold 15). Drivers by points: if/else 32 (65 pts), boolean chains 6 (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.
NumericRange.count (cognitive 71) library/src/scala/collection/immutable/NumericRange.scala:428— NumericRange.count has cognitive complexity 71 (threshold 15). Drivers by points: if/else 32 (65 pts), boolean chains 6 (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.
NumericRange.crossesTheEndAfterN (cognitive 31) library-js/src/scala/collection/immutable/NumericRange.scala:145— NumericRange.crossesTheEndAfterN has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (25 pts), boolean chains 6 (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.
NumericRange.crossesTheEndAfterN (cognitive 31) library/src/scala/collection/immutable/NumericRange.scala:194— NumericRange.crossesTheEndAfterN has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (25 pts), boolean chains 6 (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.
Duplicated block (11 lines × 2) library/src/scala/collection/StringParsers.scala:128— library/src/scala/collection/StringParsers.scala:128-138 | library/src/scala/collection/StringParsers.scala:163-173 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `library/src/scala/collection/StringParsers.scala:128` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) library/src/scala/collection/convert/impl/ChampStepper.scala:64— library/src/scala/collection/convert/impl/ChampStepper.scala:64-74 | library/src/scala/collection/immutable/ChampCommon.scala:145-155 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9–10 lines × 2) compiler/src/dotty/tools/debug/ResolveReflectEval.scala:242— compiler/src/dotty/tools/debug/ResolveReflectEval.scala:242-251 | compiler/src/dotty/tools/debug/ResolveReflectEval.scala:256-264 — both copies are in the same file, so extract the 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/dotty/tools/debug/ResolveReflectEval.scala:242` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9–10 lines × 2) compiler/src/dotty/tools/dotc/transform/DropBreaks.scala:211— compiler/src/dotty/tools/dotc/transform/DropBreaks.scala:211-220 | compiler/src/dotty/tools/dotc/transform/DropBreaks.scala:241-249 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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) library/src/scala/jdk/DoubleAccumulator.scala:108— library/src/scala/jdk/DoubleAccumulator.scala:108-112 | library/src/scala/jdk/IntAccumulator.scala:111-115 | library/src/scala/jdk/LongAccumulator.scala:109-113 — before extracting anything, compare `library/src/scala/jdk/DoubleAccumulator.scala` and `library/src/scala/jdk/IntAccumulator.scala` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/src/scala/jdk/DoubleAccumulator.scala:108` 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 × 3) library/src/scala/jdk/DoubleAccumulator.scala:169— library/src/scala/jdk/DoubleAccumulator.scala:169-173 | library/src/scala/jdk/IntAccumulator.scala:175-179 | library/src/scala/jdk/LongAccumulator.scala:170-174 — before extracting anything, compare `library/src/scala/jdk/DoubleAccumulator.scala` and `library/src/scala/jdk/IntAccumulator.scala` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/src/scala/jdk/DoubleAccumulator.scala:169` 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.
Weak hash algorithm compiler/src/dotty/tools/dotc/core/NameOps.scala:18— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`MessageDigest.getInstance("SHA-256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm compiler/src/dotty/tools/dotc/semanticdb/internal/MD5.scala:12— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`MessageDigest.getInstance("SHA-256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
TypeComparer.recur (cyclomatic 421) compiler/src/dotty/tools/dotc/core/TypeComparer.scala:293— TypeComparer.recur has cyclomatic complexity 421 (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.
Typer.adapt1 (cyclomatic 188) compiler/src/dotty/tools/dotc/typer/Typer.scala:4580— Typer.adapt1 has cyclomatic complexity 188 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RefChecks.checkAllOverrides (cyclomatic 187) compiler/src/dotty/tools/dotc/typer/RefChecks.scala:353— RefChecks.checkAllOverrides has cyclomatic complexity 187 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RefinedPrinter.toTextCore (cyclomatic 182) compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala:413— RefinedPrinter.toTextCore has cyclomatic complexity 182 (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.
SourceCodePrinter.printTree (cyclomatic 139) compiler/src/scala/quoted/runtime/impl/printers/SourceCode.scala:110— SourceCodePrinter.printTree has cyclomatic complexity 139 (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.
TypeEval.tryCompiletimeConstantFold (cyclomatic 132) compiler/src/dotty/tools/dotc/core/TypeEval.scala:16— TypeEval.tryCompiletimeConstantFold has cyclomatic complexity 132 (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.
CheckUnused.warnings (cyclomatic 124) compiler/src/dotty/tools/dotc/transform/CheckUnused.scala:649— CheckUnused.warnings has cyclomatic complexity 124 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Typer.findRef (cyclomatic 107) compiler/src/dotty/tools/dotc/typer/Typer.scala:227— Typer.findRef has cyclomatic complexity 107 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
desugar.classDef (cyclomatic 105) compiler/src/dotty/tools/dotc/ast/Desugar.scala:690— desugar.classDef has cyclomatic complexity 105 (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.
TreePickler.pickleTree (cyclomatic 105) compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala:419— TreePickler.pickleTree has cyclomatic complexity 105 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TypesSupport.inner (cyclomatic 104) scaladoc/src/dotty/tools/scaladoc/tasty/TypesSupport.scala:117— TypesSupport.inner has cyclomatic complexity 104 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TreeReader.readTree (cyclomatic 102) compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala:1326— TreeReader.readTree has cyclomatic complexity 102 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
InstructionStackEffect.computeConsProd (cyclomatic 96) compiler/src/dotty/tools/backend/jvm/analysis/InstructionStackEffect.scala:88— InstructionStackEffect.computeConsProd has cyclomatic complexity 96 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
JSCodeGen.genSimpleBinaryOp (cyclomatic 85) compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala:2754— JSCodeGen.genSimpleBinaryOp has cyclomatic complexity 85 (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.
ClassCompleter.exportForwarders (cyclomatic 84) compiler/src/dotty/tools/dotc/typer/Namer.scala:1252— ClassCompleter.exportForwarders has cyclomatic complexity 84 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GenericSignatures.javaSig0 (cyclomatic 83) compiler/src/dotty/tools/backend/jvm/GenericSignatures.scala:56— GenericSignatures.javaSig0 has cyclomatic complexity 83 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MatchReducer.matchCases (cyclomatic 83) compiler/src/dotty/tools/dotc/core/TypeComparer.scala:3714— MatchReducer.matchCases has cyclomatic complexity 83 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Checking.checkWellFormed (cyclomatic 81) compiler/src/dotty/tools/dotc/typer/Checking.scala:603— Checking.checkWellFormed has cyclomatic complexity 81 (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.
Typer.typedUnadapted (cyclomatic 73) compiler/src/dotty/tools/dotc/typer/Typer.scala:3976— Typer.typedUnadapted has cyclomatic complexity 73 (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.
JavaScanner.fetchToken (cyclomatic 72) compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala:62— JavaScanner.fetchToken has cyclomatic complexity 72 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Setup.setupTraverser (cyclomatic 71) compiler/src/dotty/tools/dotc/cc/Setup.scala:597— Setup.setupTraverser has cyclomatic complexity 71 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
desugar.apply (cyclomatic 70) compiler/src/dotty/tools/dotc/ast/Desugar.scala:2125— desugar.apply has cyclomatic complexity 70 (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.
ImplicitSearch.searchImplicit (cyclomatic 70) compiler/src/dotty/tools/dotc/typer/Implicits.scala:1327— ImplicitSearch.searchImplicit has cyclomatic complexity 70 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TypeErasure.apply (cyclomatic 68) compiler/src/dotty/tools/dotc/core/TypeErasure.scala:784— TypeErasure.apply has cyclomatic complexity 68 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PostTyperTransformer.transform (cyclomatic 67) compiler/src/dotty/tools/dotc/transform/PostTyper.scala:559— PostTyperTransformer.transform has cyclomatic complexity 67 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Typer.typedClassDef (cyclomatic 67) compiler/src/dotty/tools/dotc/typer/Typer.scala:3341— Typer.typedClassDef has cyclomatic complexity 67 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Extractor.traverse (cyclomatic 66) compiler/src/dotty/tools/dotc/semanticdb/ExtractSemanticDB.scala:296— Extractor.traverse has cyclomatic complexity 66 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ScalaJSPrepJSInteropTransformer.transformValOrDefDefInJSType (cyclomatic 63) compiler/src/dotty/tools/dotc/transform/sjs/PrepJSInterop.scala:780— ScalaJSPrepJSInteropTransformer.transformValOrDefDefInJSType has cyclomatic complexity 63 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
InlineReducer.reduceInlineMatch (cyclomatic 60) compiler/src/dotty/tools/dotc/inlines/InlineReducer.scala:172— InlineReducer.reduceInlineMatch has cyclomatic complexity 60 (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.
Setting.tryToSet (cyclomatic 59) compiler/src/dotty/tools/dotc/config/Settings.scala:156— Setting.tryToSet has cyclomatic complexity 59 (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.
Constructors.transformTemplate (cyclomatic 58) compiler/src/dotty/tools/dotc/transform/Constructors.scala:142— Constructors.transformTemplate has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PrepJSExports.exportsOf (cyclomatic 58) compiler/src/dotty/tools/dotc/transform/sjs/PrepJSExports.scala:73— PrepJSExports.exportsOf has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GlobalOptimizer.inlineCallsite (cyclomatic 57) compiler/src/dotty/tools/backend/jvm/opt/Inliner.scala:384— GlobalOptimizer.inlineCallsite has cyclomatic complexity 57 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LocalOptimizer.nullnessOptimizations (cyclomatic 57) compiler/src/dotty/tools/backend/jvm/opt/LocalOptimizer.scala:390— LocalOptimizer.nullnessOptimizations has cyclomatic complexity 57 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Denotation.meet (cyclomatic 56) compiler/src/dotty/tools/dotc/core/Denotations.scala:402— Denotation.meet has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PlainPrinter.toText (cyclomatic 56) compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala:220— PlainPrinter.toText has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Typer.typedFunctionValue (cyclomatic 56) compiler/src/dotty/tools/dotc/typer/Typer.scala:1917— Typer.typedFunctionValue has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CopyProp.eliminatePushPop (cyclomatic 55) compiler/src/dotty/tools/backend/jvm/opt/CopyProp.scala:300— CopyProp.eliminatePushPop has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
JSCodeGen.genStatOrExpr (cyclomatic 55) compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala:1898— JSCodeGen.genStatOrExpr has cyclomatic complexity 55 (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.
TypeComparer.provablyDisjoint (cyclomatic 55) compiler/src/dotty/tools/dotc/core/TypeComparer.scala:3128— TypeComparer.provablyDisjoint has cyclomatic complexity 55 (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.
Type.findMember (cyclomatic 55) compiler/src/dotty/tools/dotc/core/Types.scala:821— Type.findMember has cyclomatic complexity 55 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
BoxUnbox.boxUnboxElimination (cyclomatic 54) compiler/src/dotty/tools/backend/jvm/opt/BoxUnbox.scala:181— BoxUnbox.boxUnboxElimination has cyclomatic complexity 54 (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.
TypeOps.orDominator (cyclomatic 54) compiler/src/dotty/tools/dotc/core/TypeOps.scala:226— TypeOps.orDominator has cyclomatic complexity 54 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ClassfileParser.sigToType (cyclomatic 53) compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala:575— ClassfileParser.sigToType has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SourceCodePrinter.printType (cyclomatic 53) compiler/src/scala/quoted/runtime/impl/printers/SourceCode.scala:1099— SourceCodePrinter.printType has cyclomatic complexity 53 (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.
CommentExtractor.extract (cyclomatic 53) directives-parser/src/main/scala/dotty/tools/directives/CommentExtractor.scala:32— CommentExtractor.extract has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TreeMap.transform (cyclomatic 52) compiler/src/dotty/tools/dotc/ast/Trees.scala:1555— TreeMap.transform has cyclomatic complexity 52 (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.
RefinedPrinter.toText (cyclomatic 52) compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala:243— RefinedPrinter.toText has cyclomatic complexity 52 (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.
TreePickler.pickleNewType (cyclomatic 51) compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala:185— TreePickler.pickleNewType has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Translator.patternPlan (cyclomatic 51) compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala:249— Translator.patternPlan has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Objects.cases (cyclomatic 51) compiler/src/dotty/tools/dotc/transform/init/Objects.scala:1607— Objects.cases has cyclomatic complexity 51 (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.
TreeReader.readType (cyclomatic 50) compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala:349— TreeReader.readType has cyclomatic complexity 50 (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.
Parser.termParamClause (cyclomatic 50) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:3952— Parser.termParamClause has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Namer.index (cyclomatic 50) compiler/src/dotty/tools/dotc/typer/Namer.scala:592— Namer.index has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Scala2Unpickler.readDisambiguatedSymbol (cyclomatic 49) compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala:343— Scala2Unpickler.readDisambiguatedSymbol has cyclomatic complexity 49 (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.
Scala2Unpickler.readTree (cyclomatic 49) compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala:1101— Scala2Unpickler.readTree has cyclomatic complexity 49 (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.
SyntheticMembers.caseAndValueMethods (cyclomatic 49) compiler/src/dotty/tools/dotc/transform/SyntheticMembers.scala:97— SyntheticMembers.caseAndValueMethods has cyclomatic complexity 49 (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.
StringParsers.checkFloatFormat (cyclomatic 49) library/src/scala/collection/StringParsers.scala:176— StringParsers.checkFloatFormat has cyclomatic complexity 49 (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.
PlainBodyBuilder.genLoadTo (cyclomatic 48) compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala:316— PlainBodyBuilder.genLoadTo has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ClassDenotation.baseTypeOf (cyclomatic 48) compiler/src/dotty/tools/dotc/core/SymDenotations.scala:2372— ClassDenotation.baseTypeOf has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ReplDriver.interpretCommand (cyclomatic 48) repl/src/dotty/tools/repl/ReplDriver.scala:634— ReplDriver.interpretCommand has cyclomatic complexity 48 (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.
TreeReader.readModifiers (cyclomatic 47) compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala:732— TreeReader.readModifiers 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.
Parser.givenDef (cyclomatic 47) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:4720— Parser.givenDef has cyclomatic complexity 47 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Scanner.fetchToken (cyclomatic 47) compiler/src/dotty/tools/dotc/parsing/Scanners.scala:878— Scanner.fetchToken has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TailRecElimination.transform (cyclomatic 47) compiler/src/dotty/tools/dotc/transform/TailRec.scala:294— TailRecElimination.transform has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LocalOptimizer.methodOptimizations (cyclomatic 46) compiler/src/dotty/tools/backend/jvm/opt/LocalOptimizer.scala:180— LocalOptimizer.methodOptimizations has cyclomatic complexity 46 (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.
JSCodeGen.genJSPrimitive (cyclomatic 46) compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala:4037— JSCodeGen.genJSPrimitive has cyclomatic complexity 46 (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.
MetalsInteractive.enclosingSymbolsWithExpressionType (cyclomatic 46) presentation-compiler/src/main/dotty/tools/pc/MetalsInteractive.scala:113— MetalsInteractive.enclosingSymbolsWithExpressionType has cyclomatic complexity 46 (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.
Semantic.cases (cyclomatic 45) compiler/src/dotty/tools/dotc/transform/init/Semantic.scala:1256— Semantic.cases has cyclomatic complexity 45 (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.
CheckUnused.resolveUsage (cyclomatic 44) compiler/src/dotty/tools/dotc/transform/CheckUnused.scala:374— CheckUnused.resolveUsage has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Typer.typedDefDef (cyclomatic 44) compiler/src/dotty/tools/dotc/typer/Typer.scala:3173— Typer.typedDefDef has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TreePickler.pickleFlags (cyclomatic 43) compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala:858— TreePickler.pickleFlags 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.
Mixin.transformTemplate (cyclomatic 43) compiler/src/dotty/tools/dotc/transform/Mixin.scala:224— Mixin.transformTemplate 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.
ProtoTypes.wildApprox (cyclomatic 43) compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala:952— ProtoTypes.wildApprox 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.
PickleQuotes.pickle (cyclomatic 41) compiler/src/dotty/tools/dotc/transform/PickleQuotes.scala:214— PickleQuotes.pickle has cyclomatic complexity 41 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ShowPickled.printFile (cyclomatic 41) compiler/src/dotty/tools/dotc/util/ShowPickled.scala:116— ShowPickled.printFile has cyclomatic complexity 41 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: ShowPickled.tag2string (cyclomatic 45) 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.
Extractors.showFlags (cyclomatic 41) compiler/src/scala/quoted/runtime/impl/printers/Extractors.scala:21— Extractors.showFlags has cyclomatic complexity 41 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: ExtractorsPrinter.visitTree (cyclomatic 52) 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.
Preparser.preparse (cyclomatic 41) scaladoc/src/dotty/tools/scaladoc/tasty/comments/Preparser.scala:12— Preparser.preparse has cyclomatic complexity 41 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
PatternTypeConstrainer.constrainPatternType (cyclomatic 40) compiler/src/dotty/tools/dotc/core/PatternTypeConstrainer.scala:76— PatternTypeConstrainer.constrainPatternType has cyclomatic complexity 40 (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.
Scanner.handleNewLine (cyclomatic 40) compiler/src/dotty/tools/dotc/parsing/Scanners.scala:569— Scanner.handleNewLine has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MegaPhase.transformTree (cyclomatic 40) compiler/src/dotty/tools/dotc/transform/MegaPhase.scala:231— MegaPhase.transformTree has cyclomatic complexity 40 (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.
SourceCode.showFlags (cyclomatic 40) compiler/src/scala/quoted/runtime/impl/printers/SourceCode.scala:26— SourceCode.showFlags has cyclomatic complexity 40 (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.
Completions.completionOrdering (cyclomatic 40) presentation-compiler/src/main/dotty/tools/pc/completions/Completions.scala:968— Completions.completionOrdering has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CopyProp.eliminateStaleStoresAndRewriteSomeIntrinsics (cyclomatic 39) compiler/src/dotty/tools/backend/jvm/opt/CopyProp.scala:149— CopyProp.eliminateStaleStoresAndRewriteSomeIntrinsics 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.
LocalOptImpls.simplifyJumps (cyclomatic 39) compiler/src/dotty/tools/backend/jvm/opt/LocalOptimizer.scala:1035— LocalOptImpls.simplifyJumps 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.
InfoPrinter.pprint (cyclomatic 39) compiler/src/dotty/tools/dotc/semanticdb/PPrint.scala:37— InfoPrinter.pprint has cyclomatic complexity 39 (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.
Typer.typedIdent (cyclomatic 39) compiler/src/dotty/tools/dotc/typer/Typer.scala:656— Typer.typedIdent 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.
InferredMethodProvider.inferredMethodEdits (cyclomatic 39) presentation-compiler/src/main/dotty/tools/pc/InferredMethodProvider.scala:53— InferredMethodProvider.inferredMethodEdits has cyclomatic complexity 39 (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.
Parser.typ (cyclomatic 38) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:1866— Parser.typ 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.
Objects.call (cyclomatic 38) compiler/src/dotty/tools/dotc/transform/init/Objects.scala:1057— Objects.call 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.
ImplicitRunInfo.computeIScope (cyclomatic 38) compiler/src/dotty/tools/dotc/typer/Implicits.scala:650— ImplicitRunInfo.computeIScope 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.
Namer.createSymbol (cyclomatic 38) compiler/src/dotty/tools/dotc/typer/Namer.scala:234— Namer.createSymbol 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.
ClassCompleter.completeInCreationContext (cyclomatic 38) compiler/src/dotty/tools/dotc/typer/Namer.scala:1683— ClassCompleter.completeInCreationContext 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.
NavigateAST.pathTo (cyclomatic 37) compiler/src/dotty/tools/dotc/ast/NavigateAST.scala:60— NavigateAST.pathTo has cyclomatic complexity 37 (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.
Setup.transformExplicitType (cyclomatic 37) compiler/src/dotty/tools/dotc/cc/Setup.scala:424— Setup.transformExplicitType has cyclomatic complexity 37 (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.
TypeComparer.isSubArgs (cyclomatic 37) compiler/src/dotty/tools/dotc/core/TypeComparer.scala:1849— TypeComparer.isSubArgs has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SpaceEngine.decompose (cyclomatic 37) compiler/src/dotty/tools/dotc/transform/patmat/Space.scala:678— SpaceEngine.decompose has cyclomatic complexity 37 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Checking.checkIrrefutable (cyclomatic 37) compiler/src/dotty/tools/dotc/typer/Checking.scala:1047— Checking.checkIrrefutable has cyclomatic complexity 37 (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.
ImplicitRefs.filterMatching (cyclomatic 37) compiler/src/dotty/tools/dotc/typer/Implicits.scala:121— ImplicitRefs.filterMatching has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Lexer.tokenize (cyclomatic 37) directives-parser/src/main/scala/dotty/tools/directives/Lexer.scala:26— Lexer.tokenize has cyclomatic complexity 37 (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.
Scala2Unpickler.readType (cyclomatic 36) compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala:805— Scala2Unpickler.readType has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SyncAndTryBuilder.genLoadTry (cyclomatic 35) compiler/src/dotty/tools/backend/jvm/BCodeSyncAndTry.scala:182— SyncAndTryBuilder.genLoadTry has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TypeOps.instantiateToSubType (cyclomatic 35) compiler/src/dotty/tools/dotc/core/TypeOps.scala:787— TypeOps.instantiateToSubType has cyclomatic complexity 35 (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.
Rechecker.recheckStart (cyclomatic 35) compiler/src/dotty/tools/dotc/transform/Recheck.scala:546— Rechecker.recheckStart has cyclomatic complexity 35 (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.
Namer.inferredResultType (cyclomatic 35) compiler/src/dotty/tools/dotc/typer/Namer.scala:2170— Namer.inferredResultType has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GlobalOptimizer.findIllegalAccess (cyclomatic 34) compiler/src/dotty/tools/backend/jvm/opt/Inliner.scala:795— GlobalOptimizer.findIllegalAccess has cyclomatic complexity 34 (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.
CheckNonCyclicMap.apply (cyclomatic 34) compiler/src/dotty/tools/dotc/typer/Checking.scala:322— CheckNonCyclicMap.apply has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CaseKeywordCompletion.contribute (cyclomatic 34) presentation-compiler/src/main/dotty/tools/pc/completions/MatchCaseCompletions.scala:59— CaseKeywordCompletion.contribute has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CrossStageSafety.transform (cyclomatic 33) compiler/src/dotty/tools/dotc/staging/CrossStageSafety.scala:59— CrossStageSafety.transform has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Typer.typedSelect (cyclomatic 33) compiler/src/dotty/tools/dotc/transform/Erasure.scala:654— Typer.typedSelect has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ScalaJSPrepJSInteropTransformer.transformJSClassDef (cyclomatic 33) compiler/src/dotty/tools/dotc/transform/sjs/PrepJSInterop.scala:430— ScalaJSPrepJSInteropTransformer.transformJSClassDef has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AppToMain.wrapIntoMain (cyclomatic 33) compiler/src/dotty/tools/dotc/typer/Migrations.scala:351— AppToMain.wrapIntoMain has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ExprMap.transformChildren (cyclomatic 33) library/src/scala/quoted/ExprMap.scala:26— ExprMap.transformChildren has cyclomatic complexity 33 (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.
PlainBodyBuilder.genApply (cyclomatic 32) compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala:765— PlainBodyBuilder.genApply has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ProdConsAnalyzer.copyOperationSourceValue (cyclomatic 32) compiler/src/dotty/tools/backend/jvm/analysis/ProdConsAnalyzer.scala:180— ProdConsAnalyzer.copyOperationSourceValue has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ProdConsAnalyzer.copyOperationProducedValueSlots (cyclomatic 32) compiler/src/dotty/tools/backend/jvm/analysis/ProdConsAnalyzer.scala:277— ProdConsAnalyzer.copyOperationProducedValueSlots has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GlobalOptimizer.runInliner (cyclomatic 32) compiler/src/dotty/tools/backend/jvm/opt/Inliner.scala:82— GlobalOptimizer.runInliner has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CoverageTransformer.transform (cyclomatic 32) compiler/src/dotty/tools/dotc/transform/InstrumentCoverage.scala:476— CoverageTransformer.transform has cyclomatic complexity 32 (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.
ApplyArgsExtractor.getArgsAndParams (cyclomatic 32) presentation-compiler/src/main/dotty/tools/pc/ApplyArgsExtractor.scala:45— ApplyArgsExtractor.getArgsAndParams has cyclomatic complexity 32 (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.
InlinerHeuristics.inlineRequest (cyclomatic 31) compiler/src/dotty/tools/backend/jvm/opt/InlinerHeuristics.scala:153— InlinerHeuristics.inlineRequest 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.
LocalOptimizer.eliminateRedundantCastsAndRewriteSomeIntrinsics (cyclomatic 31) compiler/src/dotty/tools/backend/jvm/opt/LocalOptimizer.scala:535— LocalOptimizer.eliminateRedundantCastsAndRewriteSomeIntrinsics 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.
ExpressionTransformer.transform (cyclomatic 31) compiler/src/dotty/tools/debug/ExtractExpression.scala:100— ExpressionTransformer.transform 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.
desugar.makePatDef (cyclomatic 31) compiler/src/dotty/tools/dotc/ast/Desugar.scala:1516— desugar.makePatDef 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.
desugar.getVariables (cyclomatic 31) compiler/src/dotty/tools/dotc/ast/Desugar.scala:2632— desugar.getVariables has cyclomatic complexity 31 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
InlineCall.expand (cyclomatic 31) compiler/src/dotty/tools/dotc/inlines/Inlines.scala:751— InlineCall.expand 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.
Parser.literal (cyclomatic 31) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:1409— Parser.literal 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.
Typer.typedSelectWithAdapt (cyclomatic 31) compiler/src/dotty/tools/dotc/typer/Typer.scala:832— Typer.typedSelectWithAdapt 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.
JavaScanner.getTextBlock (cyclomatic 30) compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala:479— JavaScanner.getTextBlock 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.
Hoister.hoistSuperArg (cyclomatic 30) compiler/src/dotty/tools/dotc/transform/HoistSuperArgs.scala:74— Hoister.hoistSuperArg has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Cleaner.cleanHtml (cyclomatic 30) scaladoc/src/dotty/tools/scaladoc/tasty/comments/Cleaner.scala:20— Cleaner.cleanHtml 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.
PlainSkelBuilder.genDefDef (cyclomatic 29) compiler/src/dotty/tools/backend/jvm/BCodeSkelBuilder.scala:884— PlainSkelBuilder.genDefDef 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.
CopyProp.eliminateStoreLoad (cyclomatic 29) compiler/src/dotty/tools/backend/jvm/opt/CopyProp.scala:642— CopyProp.eliminateStoreLoad 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.
TypeOps.simplify (cyclomatic 29) compiler/src/dotty/tools/dotc/core/TypeOps.scala:132— TypeOps.simplify 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.
TypeOps.boundsViolations (cyclomatic 29) compiler/src/dotty/tools/dotc/core/TypeOps.scala:605— TypeOps.boundsViolations 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.
TypeAccumulator.foldOver (cyclomatic 29) compiler/src/dotty/tools/dotc/core/Types.scala:6831— TypeAccumulator.foldOver has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
SyntaxHighlighting.highlight (cyclomatic 29) compiler/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala:33— SyntaxHighlighting.highlight 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.
ExtractAPICollector.computeType (cyclomatic 29) compiler/src/dotty/tools/dotc/sbt/ExtractAPI.scala:532— ExtractAPICollector.computeType has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Conversion.verify (cyclomatic 29) compiler/src/dotty/tools/dotc/transform/localopt/FormatChecker.scala:167— Conversion.verify has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
StringInterpolatorOpt.transformApply (cyclomatic 29) compiler/src/dotty/tools/dotc/transform/localopt/StringInterpolatorOpt.scala:99— StringInterpolatorOpt.transformApply has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Completions.computeRelevancePenalty (cyclomatic 29) presentation-compiler/src/main/dotty/tools/pc/completions/Completions.scala:825— Completions.computeRelevancePenalty has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CaptureChecker.recheckClosureBlock (cyclomatic 28) compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala:1141— CaptureChecker.recheckClosureBlock has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CaptureChecker.adaptBoxed (cyclomatic 28) compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala:1996— CaptureChecker.adaptBoxed has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TypeMap.mapOver (cyclomatic 28) compiler/src/dotty/tools/dotc/core/Types.scala:6316— TypeMap.mapOver has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
TreeReader.readNewDef (cyclomatic 28) compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala:909— TreeReader.readNewDef has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Inlines.inlineCall (cyclomatic 28) compiler/src/dotty/tools/dotc/inlines/Inlines.scala:179— Inlines.inlineCall has cyclomatic complexity 28 (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.
Parser.importExpr (cyclomatic 28) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:4198— Parser.importExpr has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Objects.select (cyclomatic 28) compiler/src/dotty/tools/dotc/transform/init/Objects.scala:1265— Objects.select has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Objects.patternMatch (cyclomatic 28) compiler/src/dotty/tools/dotc/transform/init/Objects.scala:1827— Objects.patternMatch has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Inferencing.instantiateTypeVars (cyclomatic 28) compiler/src/dotty/tools/dotc/typer/Inferencing.scala:706— Inferencing.instantiateTypeVars has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
InferredTypeProvider.inferredTypeEdits (cyclomatic 28) presentation-compiler/src/main/dotty/tools/pc/InferredTypeProvider.scala:57— InferredTypeProvider.inferredTypeEdits has cyclomatic complexity 28 (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.
PlainBodyBuilder.genMatchTo (cyclomatic 27) compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala:980— PlainBodyBuilder.genMatchTo 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.
PrimitiveBType.maxValueType (cyclomatic 27) compiler/src/dotty/tools/backend/jvm/BTypes.scala:232— PrimitiveBType.maxValueType has cyclomatic complexity 27 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
BCodeRepository.methodNode (cyclomatic 27) compiler/src/dotty/tools/backend/jvm/opt/BCodeRepository.scala:152— BCodeRepository.methodNode 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.
LocalOptImpls.removeUnreachableCodeImpl (cyclomatic 27) compiler/src/dotty/tools/backend/jvm/opt/LocalOptimizer.scala:694— LocalOptImpls.removeUnreachableCodeImpl 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.
Run.compileUnits (cyclomatic 27) compiler/src/dotty/tools/dotc/Run.scala:367— Run.compileUnits 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.
SepCheck.checkType (cyclomatic 27) compiler/src/dotty/tools/dotc/cc/SepCheck.scala:749— SepCheck.checkType 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.
ImplicitSearch.searchImplicit (cyclomatic 27) compiler/src/dotty/tools/dotc/typer/Implicits.scala:1686— ImplicitSearch.searchImplicit 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.
Typer.typedNumber (cyclomatic 27) compiler/src/dotty/tools/dotc/typer/Typer.scala:1208— Typer.typedNumber 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.
PcSemanticTokensProvider.makeNode (cyclomatic 27) presentation-compiler/src/main/dotty/tools/pc/PcSemanticTokensProvider.scala:91— PcSemanticTokensProvider.makeNode has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MethodMax.computeMaxLocalsMaxStack (cyclomatic 26) compiler/src/dotty/tools/backend/jvm/opt/MethodMax.scala:38— MethodMax.computeMaxLocalsMaxStack 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.
JSCodeGen.genCompilationUnit (cyclomatic 26) compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala:205— JSCodeGen.genCompilationUnit 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.
JSCodeGen.genLinkTimeExpr (cyclomatic 26) compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala:4403— JSCodeGen.genLinkTimeExpr has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
SepCheck.traverse (cyclomatic 26) compiler/src/dotty/tools/dotc/cc/SepCheck.scala:1066— SepCheck.traverse 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.
JavaParser.annotation (cyclomatic 26) compiler/src/dotty/tools/dotc/parsing/JavaParsers.scala:381— JavaParser.annotation has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Dependencies.process (cyclomatic 26) compiler/src/dotty/tools/dotc/transform/Dependencies.scala:176— Dependencies.process 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.
ScalaJSPrepJSInteropTransformer.transformStatOrExpr (cyclomatic 26) compiler/src/dotty/tools/dotc/transform/sjs/PrepJSInterop.scala:270— ScalaJSPrepJSInteropTransformer.transformStatOrExpr has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
MirrorSource.reduce (cyclomatic 26) compiler/src/dotty/tools/dotc/typer/Synthesizer.scala:387— MirrorSource.reduce 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.
InkuireSupport.inner (cyclomatic 26) scaladoc/src/dotty/tools/scaladoc/tasty/InkuireSupport.scala:300— InkuireSupport.inner has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
JCodeMethodN.emitT2T (cyclomatic 25) compiler/src/dotty/tools/backend/jvm/BCodeIdiomatic.scala:138— JCodeMethodN.emitT2T has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
AliasingFrame.execute (cyclomatic 25) compiler/src/dotty/tools/backend/jvm/analysis/AliasingAnalyzer.scala:104— AliasingFrame.execute 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.
ExpressionTransformer.transform (cyclomatic 25) compiler/src/dotty/tools/debug/ResolveReflectEval.scala:43— ExpressionTransformer.transform 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.
CaptureChecker.checkOverrides (cyclomatic 25) compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala:2171— CaptureChecker.checkOverrides 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.
TypeApplications.appliedTo (cyclomatic 25) compiler/src/dotty/tools/dotc/core/TypeApplications.scala:411— TypeApplications.appliedTo 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.
Inliner.dropUnusedDefs (cyclomatic 25) compiler/src/dotty/tools/dotc/inlines/Inliner.scala:1300— Inliner.dropUnusedDefs 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.
Scanner.getStringPart (cyclomatic 25) compiler/src/dotty/tools/dotc/parsing/Scanners.scala:1253— Scanner.getStringPart 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.
CheckLoopingImplicits.transform (cyclomatic 25) compiler/src/dotty/tools/dotc/transform/CheckLoopingImplicits.scala:45— CheckLoopingImplicits.transform has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ExplicitOuter.referencesOuter (cyclomatic 25) compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala:279— ExplicitOuter.referencesOuter has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
SpaceEngine.computeIsSubspace (cyclomatic 25) compiler/src/dotty/tools/dotc/transform/patmat/Space.scala:207— SpaceEngine.computeIsSubspace has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
SpaceEngine.minus (cyclomatic 25) compiler/src/dotty/tools/dotc/transform/patmat/Space.scala:269— SpaceEngine.minus 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.
Typer.typedMatch (cyclomatic 25) compiler/src/dotty/tools/dotc/typer/Typer.scala:2229— Typer.typedMatch 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.
Transformation.run (cyclomatic 25) library/src/scala/concurrent/impl/Promise.scala:516— Transformation.run 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.
Resources.searchData (cyclomatic 25) scaladoc/src/dotty/tools/scaladoc/renderers/Resources.scala:120— Resources.searchData has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
JSCodeGen.genScalaClass (cyclomatic 24) compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala:395— JSCodeGen.genScalaClass 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.
JSCodeGen.genConversion (cyclomatic 24) compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala:2915— JSCodeGen.genConversion 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.
Constant.convertTo (cyclomatic 24) compiler/src/dotty/tools/dotc/core/Constants.scala:151— Constant.convertTo 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.
TypeErasure.isGenericArrayElement (cyclomatic 24) compiler/src/dotty/tools/dotc/core/TypeErasure.scala:338— TypeErasure.isGenericArrayElement 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.
ClassfileParser.parseAttributes (cyclomatic 24) compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala:983— ClassfileParser.parseAttributes has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
Parser.checkEndMarker (cyclomatic 24) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:1732— Parser.checkEndMarker 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.
SemanticSymbolBuilder.addSymName (cyclomatic 24) compiler/src/dotty/tools/dotc/semanticdb/SemanticSymbolBuilder.scala:214— SemanticSymbolBuilder.addSymName 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.
CheckUnused.transformOther (cyclomatic 24) compiler/src/dotty/tools/dotc/transform/CheckUnused.scala:254— CheckUnused.transformOther 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.
Splicer.checkValidMacroBody (cyclomatic 24) compiler/src/dotty/tools/dotc/transform/Splicer.scala:158— Splicer.checkValidMacroBody 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.
TailRec.transformDefDef (cyclomatic 24) compiler/src/dotty/tools/dotc/transform/TailRec.scala:116— TailRec.transformDefDef 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.
SpaceEngine.display (cyclomatic 24) compiler/src/dotty/tools/dotc/transform/patmat/Space.scala:871— SpaceEngine.display 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.
Implicits.typedImplicit (cyclomatic 24) compiler/src/dotty/tools/dotc/typer/Implicits.scala:1169— Implicits.typedImplicit 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.
Typer.typedAppliedTypeTree (cyclomatic 24) compiler/src/dotty/tools/dotc/typer/Typer.scala:2784— Typer.typedAppliedTypeTree 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.
SourceCodePrinter.printTypeTree (cyclomatic 24) compiler/src/scala/quoted/runtime/impl/printers/SourceCode.scala:1005— SourceCodePrinter.printTypeTree 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.
HoverProvider.hover (cyclomatic 24) presentation-compiler/src/main/dotty/tools/pc/HoverProvider.scala:32— HoverProvider.hover 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.
PcCollector.traverseSought (cyclomatic 24) presentation-compiler/src/main/dotty/tools/pc/PcCollector.scala:85— PcCollector.traverseSought has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
CompletionProvider.completionItems (cyclomatic 24) presentation-compiler/src/main/dotty/tools/pc/completions/CompletionProvider.scala:204— CompletionProvider.completionItems 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.
Parser.table (cyclomatic 24) scaladoc/src/dotty/tools/scaladoc/tasty/comments/wiki/Parser.scala:157— Parser.table 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.
Origin.explanation (cyclomatic 23) compiler/src/dotty/tools/dotc/cc/Capability.scala:1168— Origin.explanation has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
TypeErasure.sigName (cyclomatic 23) compiler/src/dotty/tools/dotc/core/TypeErasure.scala:1115— TypeErasure.sigName 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.
ClassfileParser.unpickleOrParseInnerClasses (cyclomatic 23) compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala:1163— ClassfileParser.unpickleOrParseInnerClasses 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.
isElideableExpr.apply (cyclomatic 23) compiler/src/dotty/tools/dotc/inlines/Inliner.scala:53— isElideableExpr.apply 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.
JavaScanner.getlitch (cyclomatic 23) compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala:426— JavaScanner.getlitch 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.
RefinedPrinter.toText (cyclomatic 23) compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala:882— RefinedPrinter.toText 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.
InfoPrinter.pprint (cyclomatic 23) compiler/src/dotty/tools/dotc/semanticdb/PPrint.scala:145— InfoPrinter.pprint has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
PrepJSExports.checkExportTarget (cyclomatic 23) compiler/src/dotty/tools/dotc/transform/sjs/PrepJSExports.scala:322— PrepJSExports.checkExportTarget has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Checking.checkEnum (cyclomatic 23) compiler/src/dotty/tools/dotc/typer/Checking.scala:1557— Checking.checkEnum 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.
Dynamic.handleStructural (cyclomatic 23) compiler/src/dotty/tools/dotc/typer/Dynamic.scala:186— Dynamic.handleStructural has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Typer.typedAssign (cyclomatic 23) compiler/src/dotty/tools/dotc/typer/Typer.scala:1488— Typer.typedAssign has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Typer.tryExtensionOrConversion (cyclomatic 23) compiler/src/dotty/tools/dotc/typer/Typer.scala:4447— Typer.tryExtensionOrConversion 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.
Signatures.toApplySignature (cyclomatic 23) compiler/src/dotty/tools/dotc/util/Signatures.scala:483— Signatures.toApplySignature has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Parser.parse (cyclomatic 23) directives-parser/src/main/scala/dotty/tools/directives/Parser.scala:19— Parser.parse has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ScalaRunTime.stringOf (cyclomatic 23) library-js/src/scala/runtime/ScalaRunTime.scala:204— ScalaRunTime.stringOf has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
NameTransformer.decode (cyclomatic 23) library/src/scala/reflect/NameTransformer.scala:121— NameTransformer.decode 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.
AutoImports.autoImportPosition (cyclomatic 23) presentation-compiler/src/main/dotty/tools/pc/AutoImports.scala:281— AutoImports.autoImportPosition has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
InferCompletionType.inferType (cyclomatic 23) presentation-compiler/src/main/dotty/tools/pc/InferExpectedType.scala:59— InferCompletionType.inferType has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
CopyProp.classTagNewArrayInstr (cyclomatic 22) compiler/src/dotty/tools/backend/jvm/opt/CopyProp.scala:92— CopyProp.classTagNewArrayInstr 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.
IncludeFailure.render (cyclomatic 22) compiler/src/dotty/tools/dotc/cc/CaptureSet.scala:1485— IncludeFailure.render 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.
Mutability.adaptReadOnlyToExpected (cyclomatic 22) compiler/src/dotty/tools/dotc/cc/Mutability.scala:160— Mutability.adaptReadOnlyToExpected 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.
CommentExpander.expandVariables (cyclomatic 22) compiler/src/dotty/tools/dotc/core/Comments.scala:380— CommentExpander.expandVariables 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.
ImplicitNullMap.apply (cyclomatic 22) compiler/src/dotty/tools/dotc/core/ImplicitNullInterop.scala:176— ImplicitNullMap.apply has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
TypeComparer.lub (cyclomatic 22) compiler/src/dotty/tools/dotc/core/TypeComparer.scala:2642— TypeComparer.lub 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.
MatchTypeCaseSpec.tryConvertToSpecPattern (cyclomatic 22) compiler/src/dotty/tools/dotc/core/Types.scala:5396— MatchTypeCaseSpec.tryConvertToSpecPattern 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.
Parser.expr1 (cyclomatic 22) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:2665— Parser.expr1 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.
Parser.forExpr (cyclomatic 22) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:3338— Parser.forExpr 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.
Parser.defDefOrDcl (cyclomatic 22) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:4386— Parser.defDefOrDcl 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.
Scanner.postProcessToken (cyclomatic 22) compiler/src/dotty/tools/dotc/parsing/Scanners.scala:756— Scanner.postProcessToken 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.
PlainPrinter.kindString (cyclomatic 22) compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala:639— PlainPrinter.kindString 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.
Interpreter.paramsSig (cyclomatic 22) compiler/src/dotty/tools/dotc/quoted/Interpreter.scala:270— Interpreter.paramsSig 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.
QuotePatterns.checkPattern (cyclomatic 22) compiler/src/dotty/tools/dotc/quoted/QuotePatterns.scala:29— QuotePatterns.checkPattern 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.
DesugarSpecializedTraits.collectReferencedSpecializations (cyclomatic 22) compiler/src/dotty/tools/dotc/transform/DesugarSpecializedTraits.scala:417— DesugarSpecializedTraits.collectReferencedSpecializations 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.
SpliceTransformer.transform (cyclomatic 22) compiler/src/dotty/tools/dotc/transform/Splicing.scala:185— SpliceTransformer.transform 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.
SuperAccessors.transformSuperSelect (cyclomatic 22) compiler/src/dotty/tools/dotc/transform/SuperAccessors.scala:103— SuperAccessors.transformSuperSelect 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.
ScalaJSPrepJSInteropTransformer.checkJSNativeLoadSpecOf (cyclomatic 22) compiler/src/dotty/tools/dotc/transform/sjs/PrepJSInterop.scala:609— ScalaJSPrepJSInteropTransformer.checkJSNativeLoadSpecOf 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.
NameTransformer.decode (cyclomatic 22) compiler/src/dotty/tools/dotc/util/NameTransformer.scala:95— NameTransformer.decode 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.
Parser.tokenize (cyclomatic 22) library/src/scala/sys/process/Parser.scala:30— Parser.tokenize 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.
ExtractMethodProvider.extractMethod (cyclomatic 22) presentation-compiler/src/main/dotty/tools/pc/ExtractMethodProvider.scala:37— ExtractMethodProvider.extractMethod has cyclomatic complexity 22 (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.
Scaladoc2AnchorCreator.signatureAnchor (cyclomatic 22) scaladoc/src/dotty/tools/scaladoc/tasty/Scaladoc2AnchorCreator.scala:20— Scaladoc2AnchorCreator.signatureAnchor has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
MemberLookup.downwardLookup (cyclomatic 22) scaladoc/src/dotty/tools/scaladoc/tasty/comments/MemberLookup.scala:174— MemberLookup.downwardLookup 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.
InlineSourceMatcher.parse (cyclomatic 21) compiler/src/dotty/tools/backend/jvm/opt/InlinerHeuristics.scala:299— InlineSourceMatcher.parse 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.
CaptureChecker.checkEscapingUses (cyclomatic 21) compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala:2390— CaptureChecker.checkEscapingUses has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
CommandLineParser.tokenize (cyclomatic 21) compiler/src/dotty/tools/dotc/config/CommandLineParser.scala:28— CommandLineParser.tokenize 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.
TermLambda.depStatus (cyclomatic 21) compiler/src/dotty/tools/dotc/core/Types.scala:4049— TermLambda.depStatus 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.
MatchType.reduced (cyclomatic 21) compiler/src/dotty/tools/dotc/core/Types.scala:5195— MatchType.reduced 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.
PositionPickler.picklePositions (cyclomatic 21) compiler/src/dotty/tools/dotc/core/tasty/PositionPickler.scala:32— PositionPickler.picklePositions 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.
TreeReader.createMemberSymbol (cyclomatic 21) compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala:642— TreeReader.createMemberSymbol 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.
Parser.indentedToBraces (cyclomatic 21) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:750— Parser.indentedToBraces 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.
Interpreter.interpretTree (cyclomatic 21) compiler/src/dotty/tools/dotc/quoted/Interpreter.scala:62— Interpreter.interpretTree 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.
DidYouMean.inScopeCandidates (cyclomatic 21) compiler/src/dotty/tools/dotc/reporting/DidYouMean.scala:40— DidYouMean.inScopeCandidates 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.
Erasure.transform (cyclomatic 21) compiler/src/dotty/tools/dotc/transform/Erasure.scala:54— Erasure.transform 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.
ConstFold.foldLongOp (cyclomatic 21) compiler/src/dotty/tools/dotc/typer/ConstFold.scala:137— ConstFold.foldLongOp has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ImportSuggestions.suggestionRoots (cyclomatic 21) compiler/src/dotty/tools/dotc/typer/ImportSuggestions.scala:58— ImportSuggestions.suggestionRoots 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.
QuotesAndSplices.typedQuotePattern (cyclomatic 21) compiler/src/dotty/tools/dotc/typer/QuotesAndSplices.scala:247— QuotesAndSplices.typedQuotePattern 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.
Synthesizer.sumMirror (cyclomatic 21) compiler/src/dotty/tools/dotc/typer/Synthesizer.scala:542— Synthesizer.sumMirror 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.
Typer.typedSelect (cyclomatic 21) compiler/src/dotty/tools/dotc/typer/Typer.scala:1102— Typer.typedSelect 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.
PcSymbolSearch.soughtSymbols (cyclomatic 21) presentation-compiler/src/main/dotty/tools/pc/PcSymbolSearch.scala:50— PcSymbolSearch.soughtSymbols has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
NamedArgCompletions.contribute (cyclomatic 21) presentation-compiler/src/main/dotty/tools/pc/completions/NamedArgCompletions.scala:57— NamedArgCompletions.contribute has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
PlainBodyBuilder.genArithmeticOp (cyclomatic 20) compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala:135— PlainBodyBuilder.genArithmeticOp 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.
JSCodeGen.genMethodWithCurrentLocalNameScope (cyclomatic 20) compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala:1615— JSCodeGen.genMethodWithCurrentLocalNameScope 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.
TypedTreeInfo.exprPurity (cyclomatic 20) compiler/src/dotty/tools/dotc/ast/TreeInfo.scala:643— TypedTreeInfo.exprPurity 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.
TypeErasure.compareErasedGlb (cyclomatic 20) compiler/src/dotty/tools/dotc/core/TypeErasure.scala:523— TypeErasure.compareErasedGlb 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.
MethodOrPoly.signature (cyclomatic 20) compiler/src/dotty/tools/dotc/core/Types.scala:3961— MethodOrPoly.signature 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.
InlineTyper.typedMatchFinish (cyclomatic 20) compiler/src/dotty/tools/dotc/inlines/Inliner.scala:1160— InlineTyper.typedMatchFinish 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.
JavaParser.modifiers (cyclomatic 20) compiler/src/dotty/tools/dotc/parsing/JavaParsers.scala:466— JavaParser.modifiers 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.
Scanner.getFraction (cyclomatic 20) compiler/src/dotty/tools/dotc/parsing/Scanners.scala:1488— Scanner.getFraction has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
PlainPrinter.toTextCapability (cyclomatic 20) compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala:462— PlainPrinter.toTextCapability 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.
PlainPrinter.toTextRHS (cyclomatic 20) compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala:590— PlainPrinter.toTextRHS 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.
ActiveProfile.printSummary (cyclomatic 20) compiler/src/dotty/tools/dotc/reporting/Profile.scala:75— ActiveProfile.printSummary 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.
SemanticSymbolBuilder.inverseSymbol (cyclomatic 20) compiler/src/dotty/tools/dotc/semanticdb/SemanticSymbolBuilder.scala:107— SemanticSymbolBuilder.inverseSymbol 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.
BetaReduce.reduceApplication (cyclomatic 20) compiler/src/dotty/tools/dotc/transform/BetaReduce.scala:119— BetaReduce.reduceApplication 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.
Memoize.transformDefDef (cyclomatic 20) compiler/src/dotty/tools/dotc/transform/Memoize.scala:101— Memoize.transformDefDef 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.
Checking.checkNoPrivateLeaks (cyclomatic 20) compiler/src/dotty/tools/dotc/typer/Checking.scala:761— Checking.checkNoPrivateLeaks 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.
Typer.typedBind (cyclomatic 20) compiler/src/dotty/tools/dotc/typer/Typer.scala:2973— Typer.typedBind 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.
Typer.typedStats (cyclomatic 20) compiler/src/dotty/tools/dotc/typer/Typer.scala:4199— Typer.typedStats 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.
PcInlayHintsProvider.collectDecorationsImpl (cyclomatic 20) presentation-compiler/src/main/dotty/tools/pc/PcInlayHintsProvider.scala:75— PcInlayHintsProvider.collectDecorationsImpl 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.
Parameters.unapply (cyclomatic 20) presentation-compiler/src/main/dotty/tools/pc/PcInlayHintsProvider.scala:464— Parameters.unapply has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
BCAnnotGen.emitArgument (cyclomatic 19) compiler/src/dotty/tools/backend/jvm/BCodeHelpers.scala:158— BCAnnotGen.emitArgument 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.
AliasSet.-= (cyclomatic 19) compiler/src/dotty/tools/backend/jvm/analysis/AliasingAnalyzer.scala:464— AliasSet.-= 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.
BTypesFromClassfile.computeClassInfoFromClassNode (cyclomatic 19) compiler/src/dotty/tools/backend/jvm/opt/BTypesFromClassfile.scala:82— BTypesFromClassfile.computeClassInfoFromClassNode 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.
checker.traverse (cyclomatic 19) compiler/src/dotty/tools/dotc/cc/SafeRefs.scala:204— checker.traverse 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.
Setup.transformSym (cyclomatic 19) compiler/src/dotty/tools/dotc/cc/Setup.scala:190— Setup.transformSym 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.
Synthetics.transform (cyclomatic 19) compiler/src/dotty/tools/dotc/cc/Synthetics.scala:63— Synthetics.transform 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.
Denotations.infoMeet (cyclomatic 19) compiler/src/dotty/tools/dotc/core/Denotations.scala:541— Denotations.infoMeet 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.
OrderingConstraint.checkWellFormed (cyclomatic 19) compiler/src/dotty/tools/dotc/core/OrderingConstraint.scala:910— OrderingConstraint.checkWellFormed 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.
TypeErasure.erasedLub (cyclomatic 19) compiler/src/dotty/tools/dotc/core/TypeErasure.scala:430— TypeErasure.erasedLub 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.
ClassfileParser.parseAnnotArg (cyclomatic 19) compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala:805— ClassfileParser.parseAnnotArg 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.
TreeSectionUnpickler.unpickle0 (cyclomatic 19) compiler/src/dotty/tools/dotc/core/tasty/TastyPrinter.scala:136— TreeSectionUnpickler.unpickle0 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.
Inliner.inlined (cyclomatic 19) compiler/src/dotty/tools/dotc/inlines/Inliner.scala:784— Inliner.inlined 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.
AlreadyDefined.msg (cyclomatic 19) compiler/src/dotty/tools/dotc/reporting/messages.scala:2157— AlreadyDefined.msg 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.
DoubleDefinition.msg (cyclomatic 19) compiler/src/dotty/tools/dotc/reporting/messages.scala:2446— DoubleDefinition.msg 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.
CannotBeIncluded.msg (cyclomatic 19) compiler/src/dotty/tools/dotc/reporting/messages.scala:3834— CannotBeIncluded.msg 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.
RefInfos.register (cyclomatic 19) compiler/src/dotty/tools/dotc/transform/CheckUnused.scala:578— RefInfos.register 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.
Translator.emitCondition (cyclomatic 19) compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala:826— Translator.emitCondition 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.
Objects.init (cyclomatic 19) compiler/src/dotty/tools/dotc/transform/init/Objects.scala:2112— Objects.init 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.
Semantic.init (cyclomatic 19) compiler/src/dotty/tools/dotc/transform/init/Semantic.scala:1542— Semantic.init 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.
Implicits.inferImplicit (cyclomatic 19) compiler/src/dotty/tools/dotc/typer/Implicits.scala:1100— Implicits.inferImplicit 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.
Namer.valOrDefDefSig (cyclomatic 19) compiler/src/dotty/tools/dotc/typer/Namer.scala:1943— Namer.valOrDefDefSig 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.
Symbol.newClass (cyclomatic 19) compiler/src/scala/quoted/runtime/impl/QuotesImpl.scala:2802— Symbol.newClass 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.
FromDigits.integerFromDigits (cyclomatic 19) library/src/scala/util/FromDigits.scala:101— FromDigits.integerFromDigits 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.
Completions.findSuffix (cyclomatic 19) presentation-compiler/src/main/dotty/tools/pc/completions/Completions.scala:243— Completions.findSuffix 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.
InkuireSupport.doInkuireStuff (cyclomatic 19) scaladoc/src/dotty/tools/scaladoc/tasty/InkuireSupport.scala:26— InkuireSupport.doInkuireStuff 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.
PlainBodyBuilder.genCond (cyclomatic 18) compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala:1589— PlainBodyBuilder.genCond 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.
PlainBodyBuilder.genInvokeDynamicLambda (cyclomatic 18) compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala:1760— PlainBodyBuilder.genInvokeDynamicLambda 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.
InlineRequest.logText (cyclomatic 18) compiler/src/dotty/tools/backend/jvm/opt/InlinerHeuristics.scala:366— InlineRequest.logText has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
JSCodeGen.genClosure (cyclomatic 18) compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala:3673— JSCodeGen.genClosure 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.
Capability.subsumes (cyclomatic 18) compiler/src/dotty/tools/dotc/cc/Capability.scala:847— Capability.subsumes has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
SepCheck.sepApplyError (cyclomatic 18) compiler/src/dotty/tools/dotc/cc/SepCheck.scala:393— SepCheck.sepApplyError 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.
SepCheck.checkApply (cyclomatic 18) compiler/src/dotty/tools/dotc/cc/SepCheck.scala:519— SepCheck.checkApply 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.
SepCheck.checkConsumedRefs (cyclomatic 18) compiler/src/dotty/tools/dotc/cc/SepCheck.scala:700— SepCheck.checkConsumedRefs 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.
SymDenotation.isAccessibleFrom (cyclomatic 18) compiler/src/dotty/tools/dotc/core/SymDenotations.scala:987— SymDenotation.isAccessibleFrom has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
TypeComparer.glb (cyclomatic 18) compiler/src/dotty/tools/dotc/core/TypeComparer.scala:2595— TypeComparer.glb 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.
Type.testProvisional (cyclomatic 18) compiler/src/dotty/tools/dotc/core/Types.scala:121— Type.testProvisional 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.
NamedType.computeDenot (cyclomatic 18) compiler/src/dotty/tools/dotc/core/Types.scala:2479— NamedType.computeDenot 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.
TypeMap.mapCapability (cyclomatic 18) compiler/src/dotty/tools/dotc/core/Types.scala:6264— TypeMap.mapCapability has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Parser.simpleExprRest (cyclomatic 18) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:3062— Parser.simpleExprRest has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: Parser.modOfToken (cyclomatic 20) 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.
Seen.record (cyclomatic 18) compiler/src/dotty/tools/dotc/reporting/Message.scala:112— Seen.record has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
WConf.parseFilter (cyclomatic 18) compiler/src/dotty/tools/dotc/reporting/WConf.scala:84— WConf.parseFilter has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
CoverageTransformer.needsLift (cyclomatic 18) compiler/src/dotty/tools/dotc/transform/InstrumentCoverage.scala:778— CoverageTransformer.needsLift has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
SpaceEngine.project (cyclomatic 18) compiler/src/dotty/tools/dotc/transform/patmat/Space.scala:380— SpaceEngine.project 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.
SpaceEngine.checkReachability (cyclomatic 18) compiler/src/dotty/tools/dotc/transform/patmat/Space.scala:1119— SpaceEngine.checkReachability 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.
Namer.checkDefName (cyclomatic 18) compiler/src/dotty/tools/dotc/typer/Namer.scala:183— Namer.checkDefName has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
RefChecks.checkExtensionMethods (cyclomatic 18) compiler/src/dotty/tools/dotc/typer/RefChecks.scala:1188— RefChecks.checkExtensionMethods 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.
Typer.typedTyped (cyclomatic 18) compiler/src/dotty/tools/dotc/typer/Typer.scala:1340— Typer.typedTyped 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.
WithCompilationUnit.symbolAlternatives (cyclomatic 18) presentation-compiler/src/main/dotty/tools/pc/WithCompilationUnit.scala:46— WithCompilationUnit.symbolAlternatives 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.
Completions.completionsWithAffix (cyclomatic 18) presentation-compiler/src/main/dotty/tools/pc/completions/Completions.scala:293— Completions.completionsWithAffix 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.
Completions.enrichWithSymbolSearch (cyclomatic 18) presentation-compiler/src/main/dotty/tools/pc/completions/Completions.scala:623— Completions.enrichWithSymbolSearch 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.
BType.conformsTo (cyclomatic 17) compiler/src/dotty/tools/backend/jvm/BTypes.scala:85— BType.conformsTo 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.
JSCodeGen.genApplyJSMethodGeneric (cyclomatic 17) compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala:3286— JSCodeGen.genApplyJSMethodGeneric 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.
CheckCaptures.checkWellformedRetains (cyclomatic 17) compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala:115— CheckCaptures.checkWellformedRetains has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
ConstraintHandling.addConstraint (cyclomatic 17) compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala:833— ConstraintHandling.addConstraint 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.
OrderingConstraint.validBoundFor (cyclomatic 17) compiler/src/dotty/tools/dotc/core/OrderingConstraint.scala:537— OrderingConstraint.validBoundFor 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.
OrderingConstraint.replace (cyclomatic 17) compiler/src/dotty/tools/dotc/core/OrderingConstraint.scala:672— OrderingConstraint.replace 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.
TypeComparer.liftToThis (cyclomatic 17) compiler/src/dotty/tools/dotc/core/TypeComparer.scala:1742— TypeComparer.liftToThis 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.
AsSeenFromMap.apply (cyclomatic 17) compiler/src/dotty/tools/dotc/core/TypeOps.scala:69— AsSeenFromMap.apply 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.
Type.derivesFrom (cyclomatic 17) compiler/src/dotty/tools/dotc/core/Types.scala:282— Type.derivesFrom has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
Type.classSymbol (cyclomatic 17) compiler/src/dotty/tools/dotc/core/Types.scala:630— Type.classSymbol 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.
NamedType.infoDependsOnPrefix (cyclomatic 17) compiler/src/dotty/tools/dotc/core/Types.scala:2684— NamedType.infoDependsOnPrefix 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.
TreeReader.normalizeFlags (cyclomatic 17) compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala:558— TreeReader.normalizeFlags 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.
Interactive.contextOfPath (cyclomatic 17) compiler/src/dotty/tools/dotc/interactive/Interactive.scala:213— Interactive.contextOfPath has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
JavaParser.termDecl (cyclomatic 17) compiler/src/dotty/tools/dotc/parsing/JavaParsers.scala:612— JavaParser.termDecl 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.
JavaScanner.getFraction (cyclomatic 17) compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala:590— JavaScanner.getFraction 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.
Parser.patDefOrDcl (cyclomatic 17) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:4324— Parser.patDefOrDcl 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: Parser.modOfToken (cyclomatic 20) 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.
Scanner.isLeadingInfixOperator (cyclomatic 17) compiler/src/dotty/tools/dotc/parsing/Scanners.scala:432— Scanner.isLeadingInfixOperator has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
RefinedPrinter.toTextTemplate (cyclomatic 17) compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala:1088— RefinedPrinter.toTextTemplate 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.
QuotePatterns.decode (cyclomatic 17) compiler/src/dotty/tools/dotc/quoted/QuotePatterns.scala:292— QuotePatterns.decode 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.
CannotBeAccessed.msg (cyclomatic 17) compiler/src/dotty/tools/dotc/reporting/messages.scala:3302— CannotBeAccessed.msg 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.
InfoPrinter.pprint (cyclomatic 17) compiler/src/dotty/tools/dotc/semanticdb/PPrint.scala:100— InfoPrinter.pprint 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.
SyntheticsExtractor.tryFindSynthetic (cyclomatic 17) compiler/src/dotty/tools/dotc/semanticdb/SyntheticsExtractor.scala:16— SyntheticsExtractor.tryFindSynthetic 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.
Dependencies.markFree (cyclomatic 17) compiler/src/dotty/tools/dotc/transform/Dependencies.scala:134— Dependencies.markFree 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.
Deriver.processDerivedInstance (cyclomatic 17) compiler/src/dotty/tools/dotc/typer/Deriving.scala:93— Deriver.processDerivedInstance 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.
Linter.warnOnImplausiblePattern (cyclomatic 17) compiler/src/dotty/tools/dotc/typer/Linter.scala:76— Linter.warnOnImplausiblePattern has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
ClassCompleter.processExports (cyclomatic 17) compiler/src/dotty/tools/dotc/typer/Namer.scala:1588— ClassCompleter.processExports 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.
Nullables.postProcessByNameArgs (cyclomatic 17) compiler/src/dotty/tools/dotc/typer/Nullables.scala:574— Nullables.postProcessByNameArgs 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.
Synthesizer.manifestFactoryOf (cyclomatic 17) compiler/src/dotty/tools/dotc/typer/Synthesizer.scala:716— Synthesizer.manifestFactoryOf 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.
Stream.addStringNoForce (cyclomatic 17) library/src/scala/collection/immutable/Stream.scala:252— Stream.addStringNoForce 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.
HoverProvider.fallbackToDynamics (cyclomatic 17) presentation-compiler/src/main/dotty/tools/pc/HoverProvider.scala:209— HoverProvider.fallbackToDynamics 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.
ReplDriver.renderDefinitions (cyclomatic 17) repl/src/dotty/tools/repl/ReplDriver.scala:523— ReplDriver.renderDefinitions 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.
HtmlRenderer.buildNavigation (cyclomatic 17) scaladoc/src/dotty/tools/scaladoc/renderers/HtmlRenderer.scala:134— HtmlRenderer.buildNavigation 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.
ClassLikeSupport.parseMember (cyclomatic 17) scaladoc/src/dotty/tools/scaladoc/tasty/ClassLikeSupport.scala:214— ClassLikeSupport.parseMember 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.
ScaladocTastyInspector.inspect (cyclomatic 17) scaladoc/src/dotty/tools/scaladoc/tasty/TastyParser.scala:34— ScaladocTastyInspector.inspect 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.
Parser.getInline (cyclomatic 17) scaladoc/src/dotty/tools/scaladoc/tasty/comments/wiki/Parser.scala:467— Parser.getInline 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.
PlainBodyBuilder.genConstant (cyclomatic 16) compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala:565— PlainBodyBuilder.genConstant has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
BCodeUtils.substituteLabel (cyclomatic 16) compiler/src/dotty/tools/backend/jvm/BCodeUtils.scala:320— BCodeUtils.substituteLabel has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: BCodeUtils.negateJumpOpcode (cyclomatic 17) 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.
ClosureOptimizer.rewriteClosureApplyInvocation (cyclomatic 16) compiler/src/dotty/tools/backend/jvm/opt/ClosureOptimizer.scala:343— ClosureOptimizer.rewriteClosureApplyInvocation 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.
OptimizerCallGraph.addMethod (cyclomatic 16) compiler/src/dotty/tools/backend/jvm/opt/OptimizerCallGraph.scala:138— OptimizerCallGraph.addMethod 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.
JSCodeGen.genNonNativeJSClass (cyclomatic 16) compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala:572— JSCodeGen.genNonNativeJSClass 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.
JSEncoding.toTypeRefInternal (cyclomatic 16) compiler/src/dotty/tools/backend/sjs/JSEncoding.scala:343— JSEncoding.toTypeRefInternal 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.
TreeTypeMap.transform (cyclomatic 16) compiler/src/dotty/tools/dotc/ast/TreeTypeMap.scala:99— TreeTypeMap.transform has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Capability.maxSubsumes (cyclomatic 16) compiler/src/dotty/tools/dotc/cc/Capability.scala:936— Capability.maxSubsumes 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.
CaptureSet.map (cyclomatic 16) compiler/src/dotty/tools/dotc/cc/CaptureSet.scala:445— CaptureSet.map 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.
CaptureSet.ofType (cyclomatic 16) compiler/src/dotty/tools/dotc/cc/CaptureSet.scala:1816— CaptureSet.ofType has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Denotations.staticRef (cyclomatic 16) compiler/src/dotty/tools/dotc/core/Denotations.scala:1324— Denotations.staticRef 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.
PackageClassDenotation.computeMembersNamed (cyclomatic 16) compiler/src/dotty/tools/dotc/core/SymDenotations.scala:2688— PackageClassDenotation.computeMembersNamed has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: SymDenotation.hasSkolems (cyclomatic 17) 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.
SymbolLoaders.enterToplevelsFromSource (cyclomatic 16) compiler/src/dotty/tools/dotc/core/SymbolLoaders.scala:134— SymbolLoaders.enterToplevelsFromSource 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.
SymbolLoader.complete (cyclomatic 16) compiler/src/dotty/tools/dotc/core/SymbolLoaders.scala:416— SymbolLoader.complete 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.
TypeApplications.typeParams (cyclomatic 16) compiler/src/dotty/tools/dotc/core/TypeApplications.scala:206— TypeApplications.typeParams 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.
TypeComparer.hasMatchingMember (cyclomatic 16) compiler/src/dotty/tools/dotc/core/TypeComparer.scala:2290— TypeComparer.hasMatchingMember 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.
TypeComparer.distributeAnd (cyclomatic 16) compiler/src/dotty/tools/dotc/core/TypeComparer.scala:2886— TypeComparer.distributeAnd 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.
TyperState.mergeConstraintWith (cyclomatic 16) compiler/src/dotty/tools/dotc/core/TyperState.scala:238— TyperState.mergeConstraintWith 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.
Type.atoms (cyclomatic 16) compiler/src/dotty/tools/dotc/core/Types.scala:1508— Type.atoms has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ApproximatingTypeMap.derivedAppliedType (cyclomatic 16) compiler/src/dotty/tools/dotc/core/Types.scala:6649— ApproximatingTypeMap.derivedAppliedType 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.
LocalUnpickler.complete (cyclomatic 16) compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala:618— LocalUnpickler.complete 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.
Inliner.paramBindingDef (cyclomatic 16) compiler/src/dotty/tools/dotc/inlines/Inliner.scala:322— Inliner.paramBindingDef 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.
Intrinsics.compileForErrors (cyclomatic 16) compiler/src/dotty/tools/dotc/inlines/Inlines.scala:602— Intrinsics.compileForErrors 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.
JavaParser.compilationUnit (cyclomatic 16) compiler/src/dotty/tools/dotc/parsing/JavaParsers.scala:1119— JavaParser.compilationUnit 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.
Parser.bracesToIndented (cyclomatic 16) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:853— Parser.bracesToIndented 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. This is NOT this file's highest cyclomatic complexity: Parser.modOfToken (cyclomatic 20) 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.
Parser.followingIsLambdaAfterColon (cyclomatic 16) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:1111— Parser.followingIsLambdaAfterColon has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Parser.modOfToken (cyclomatic 20) 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.
PlainPrinter.homogenize (cyclomatic 16) compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala:61— PlainPrinter.homogenize has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
AbstractExtractDependenciesCollector.recordTree (cyclomatic 16) compiler/src/dotty/tools/dotc/sbt/ExtractDependencies.scala:230— AbstractExtractDependenciesCollector.recordTree 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.
Translator.emit (cyclomatic 16) compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala:1015— Translator.emit 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.
Pickler.run (cyclomatic 16) compiler/src/dotty/tools/dotc/transform/Pickler.scala:442— Pickler.run 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.
Objects.readLocal (cyclomatic 16) compiler/src/dotty/tools/dotc/transform/init/Objects.scala:1463— Objects.readLocal 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.
TypedFormatChecker.checked (cyclomatic 16) compiler/src/dotty/tools/dotc/transform/localopt/FormatChecker.scala:68— TypedFormatChecker.checked 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.
SpaceEngine.intersect (cyclomatic 16) compiler/src/dotty/tools/dotc/transform/patmat/Space.scala:244— SpaceEngine.intersect 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.
Checking.checkAndAdaptExperimentalImports (cyclomatic 16) compiler/src/dotty/tools/dotc/typer/Checking.scala:925— Checking.checkAndAdaptExperimentalImports 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.
ImplicitRunInfo.implicitScope (cyclomatic 16) compiler/src/dotty/tools/dotc/typer/Implicits.scala:820— ImplicitRunInfo.implicitScope 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.
Implicits.missingArgMsg (cyclomatic 16) compiler/src/dotty/tools/dotc/typer/Implicits.scala:970— Implicits.missingArgMsg 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.
ImportSuggestions.importSuggestions (cyclomatic 16) compiler/src/dotty/tools/dotc/typer/ImportSuggestions.scala:153— ImportSuggestions.importSuggestions 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.
Inferencing.instDecision (cyclomatic 16) compiler/src/dotty/tools/dotc/typer/Inferencing.scala:444— Inferencing.instDecision 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.
AppToMain.rewrite (cyclomatic 16) compiler/src/dotty/tools/dotc/typer/Migrations.scala:258— AppToMain.rewrite 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.
Namer.checkNoConflict (cyclomatic 16) compiler/src/dotty/tools/dotc/typer/Namer.scala:138— Namer.checkNoConflict 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.
Typer.typedCBSelect (cyclomatic 16) compiler/src/dotty/tools/dotc/typer/Typer.scala:1039— Typer.typedCBSelect 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.
Signatures.applyCallInfo (cyclomatic 16) compiler/src/dotty/tools/dotc/util/Signatures.scala:200— Signatures.applyCallInfo 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.
StringContext.replace (cyclomatic 16) library/src/scala/StringContext.scala:384— StringContext.replace 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.
PropertiesTrait.isJavaAtLeast (cyclomatic 16) library/src/scala/util/Properties.scala:189— PropertiesTrait.isJavaAtLeast 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.
CompletionItemResolver.fullDocstring (cyclomatic 16) presentation-compiler/src/main/dotty/tools/pc/CompletionItemResolver.scala:46— CompletionItemResolver.fullDocstring 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.
ReplBytecodeAnalysis.isScalaRunTimeProductToString (cyclomatic 16) repl/src/dotty/tools/repl/ReplBytecodeAnalysis.scala:23— ReplBytecodeAnalysis.isScalaRunTimeProductToString 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.
ClassLikeSupport.parseMethod (cyclomatic 16) scaladoc/src/dotty/tools/scaladoc/tasty/ClassLikeSupport.scala:385— ClassLikeSupport.parseMethod has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
TypeComparer.recur (cognitive 614) compiler/src/dotty/tools/dotc/core/TypeComparer.scala:293— TypeComparer.recur has cognitive complexity 614 (threshold 15). Drivers by points: if/else 186 (294 pts), boolean chains 184, match/switch 66 (134 pts), error handling 1 (2 pts) (nesting depth added 177). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Typer.adapt1 (cognitive 357) compiler/src/dotty/tools/dotc/typer/Typer.scala:4580— Typer.adapt1 has cognitive complexity 357 (threshold 15). Drivers by points: if/else 141 (201 pts), match/switch 50 (103 pts), boolean chains 51, error handling 1 (2 pts) (nesting depth added 114). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RefChecks.checkAllOverrides (cognitive 322) compiler/src/dotty/tools/dotc/typer/RefChecks.scala:353— RefChecks.checkAllOverrides has cognitive complexity 322 (threshold 15). Drivers by points: if/else 116 (184 pts), boolean chains 69, loops 16 (41 pts), match/switch 10 (27 pts), error handling 1 (nesting depth added 110). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CheckUnused.warnings (cognitive 258) compiler/src/dotty/tools/dotc/transform/CheckUnused.scala:649— CheckUnused.warnings has cognitive complexity 258 (threshold 15). Drivers by points: if/else 89 (192 pts), boolean chains 37, loops 7 (19 pts), match/switch 6 (10 pts) (nesting depth added 119). 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.
Typer.findRef (cognitive 222) compiler/src/dotty/tools/dotc/typer/Typer.scala:227— Typer.findRef has cognitive complexity 222 (threshold 15). Drivers by points: if/else 81 (159 pts), boolean chains 46, match/switch 8 (17 pts) (nesting depth added 87). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TreePickler.pickleTree (cognitive 215) compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala:419— TreePickler.pickleTree has cognitive complexity 215 (threshold 15). Drivers by points: if/else 67 (154 pts), match/switch 11 (42 pts), loops 3 (11 pts), boolean chains 4, error handling 2 (4 pts) (nesting depth added 128). 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.
RefinedPrinter.toTextCore (cognitive 205) compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala:413— RefinedPrinter.toTextCore has cognitive complexity 205 (threshold 15). Drivers by points: if/else 97 (132 pts), match/switch 24 (44 pts), boolean chains 27, error handling 1 (2 pts) (nesting depth added 56). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClassCompleter.exportForwarders (cognitive 193) compiler/src/dotty/tools/dotc/typer/Namer.scala:1252— ClassCompleter.exportForwarders has cognitive complexity 193 (threshold 15). Drivers by points: if/else 69 (125 pts), match/switch 15 (36 pts), boolean chains 19, loops 5 (13 pts) (nesting depth added 85). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SourceCodePrinter.printTree (cognitive 172) compiler/src/scala/quoted/runtime/impl/printers/SourceCode.scala:110— SourceCodePrinter.printTree has cognitive complexity 172 (threshold 15). Drivers by points: if/else 54 (92 pts), match/switch 27 (61 pts), boolean chains 12, loops 3 (7 pts) (nesting depth added 76). 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.
desugar.classDef (cognitive 168) compiler/src/dotty/tools/dotc/ast/Desugar.scala:690— desugar.classDef has cognitive complexity 168 (threshold 15). Drivers by points: if/else 93 (109 pts), match/switch 23 (30 pts), boolean chains 19, loops 5 (10 pts) (nesting depth added 28). 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.
TypesSupport.inner (cognitive 159) scaladoc/src/dotty/tools/scaladoc/tasty/TypesSupport.scala:117— TypesSupport.inner has cognitive complexity 159 (threshold 15). Drivers by points: if/else 56 (93 pts), match/switch 21 (51 pts), boolean chains 13, error handling 1 (2 pts) (nesting depth added 68). 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.
MatchReducer.matchCases (cognitive 155) compiler/src/dotty/tools/dotc/core/TypeComparer.scala:3714— MatchReducer.matchCases has cognitive complexity 155 (threshold 15). Drivers by points: if/else 62 (89 pts), match/switch 25 (59 pts), boolean chains 7 (nesting depth added 61). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ImplicitSearch.searchImplicit (cognitive 142) compiler/src/dotty/tools/dotc/typer/Implicits.scala:1327— ImplicitSearch.searchImplicit has cognitive complexity 142 (threshold 15). Drivers by points: if/else 52 (92 pts), match/switch 13 (30 pts), boolean chains 11, loops 4 (7 pts), error handling 1 (2 pts) (nesting depth added 61). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GenericSignatures.javaSig0 (cognitive 139) compiler/src/dotty/tools/backend/jvm/GenericSignatures.scala:56— GenericSignatures.javaSig0 has cognitive complexity 139 (threshold 15). Drivers by points: if/else 61 (96 pts), match/switch 11 (24 pts), boolean chains 14, loops 3 (5 pts) (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Typer.typedDefDef (cognitive 131) compiler/src/dotty/tools/dotc/typer/Typer.scala:3173— Typer.typedDefDef has cognitive complexity 131 (threshold 15). Drivers by points: if/else 30 (83 pts), loops 7 (29 pts), match/switch 4 (14 pts), boolean chains 5 (nesting depth added 85). 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.
ClassfileParser.sigToType (cognitive 130) compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala:575— ClassfileParser.sigToType has cognitive complexity 130 (threshold 15). Drivers by points: if/else 44 (88 pts), loops 10 (20 pts), match/switch 5 (17 pts), boolean chains 5 (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.
Extractor.traverse (cognitive 122) compiler/src/dotty/tools/dotc/semanticdb/ExtractSemanticDB.scala:296— Extractor.traverse has cognitive complexity 122 (threshold 15). Drivers by points: if/else 32 (65 pts), match/switch 12 (29 pts), loops 4 (12 pts), boolean chains 10, error handling 1 (6 pts) (nesting depth added 63). 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.
Setup.setupTraverser (cognitive 120) compiler/src/dotty/tools/dotc/cc/Setup.scala:597— Setup.setupTraverser has cognitive complexity 120 (threshold 15). Drivers by points: if/else 44 (76 pts), match/switch 11 (19 pts), boolean chains 16, loops 4 (8 pts), error handling 1 (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TreeReader.readTree (cognitive 119) compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala:1326— TreeReader.readTree has cognitive complexity 119 (threshold 15). Drivers by points: if/else 65 (91 pts), match/switch 12 (22 pts), boolean chains 6 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CopyProp.eliminatePushPop (cognitive 118) compiler/src/dotty/tools/backend/jvm/opt/CopyProp.scala:300— CopyProp.eliminatePushPop has cognitive complexity 118 (threshold 15). Drivers by points: if/else 39 (82 pts), match/switch 7 (21 pts), loops 4 (8 pts), boolean chains 7 (nesting depth added 61). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Typer.typedClassDef (cognitive 117) compiler/src/dotty/tools/dotc/typer/Typer.scala:3341— Typer.typedClassDef has cognitive complexity 117 (threshold 15). Drivers by points: if/else 50 (70 pts), boolean chains 21, match/switch 9 (19 pts), loops 3 (7 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PostTyperTransformer.transform (cognitive 116) compiler/src/dotty/tools/dotc/transform/PostTyper.scala:559— PostTyperTransformer.transform has cognitive complexity 116 (threshold 15). Drivers by points: if/else 37 (79 pts), match/switch 8 (19 pts), loops 4 (13 pts), boolean chains 5 (nesting depth added 62). 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.
JavaScanner.fetchToken (cognitive 114) compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala:62— JavaScanner.fetchToken has cognitive complexity 114 (threshold 15). Drivers by points: if/else 44 (102 pts), boolean chains 5, loops 1 (4 pts), match/switch 2 (3 pts) (nesting depth added 62). 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.
InstructionStackEffect.computeConsProd (cognitive 113) compiler/src/dotty/tools/backend/jvm/analysis/InstructionStackEffect.scala:88— InstructionStackEffect.computeConsProd has cognitive complexity 113 (threshold 15). Drivers by points: if/else 62 (101 pts), boolean chains 8, match/switch 2 (4 pts) (nesting depth added 41). 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.
LocalOptimizer.nullnessOptimizations (cognitive 113) compiler/src/dotty/tools/backend/jvm/opt/LocalOptimizer.scala:390— LocalOptimizer.nullnessOptimizations has cognitive complexity 113 (threshold 15). Drivers by points: if/else 20 (57 pts), boolean chains 28, loops 8 (25 pts), match/switch 2 (3 pts) (nesting depth added 55). 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.
PrepJSExports.exportsOf (cognitive 111) compiler/src/dotty/tools/dotc/transform/sjs/PrepJSExports.scala:73— PrepJSExports.exportsOf has cognitive complexity 111 (threshold 15). Drivers by points: if/else 41 (80 pts), boolean chains 19, loops 3 (6 pts), match/switch 2 (6 pts) (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BoxUnbox.boxUnboxElimination (cognitive 109) compiler/src/dotty/tools/backend/jvm/opt/BoxUnbox.scala:181— BoxUnbox.boxUnboxElimination has cognitive complexity 109 (threshold 15). Drivers by points: if/else 27 (49 pts), match/switch 13 (28 pts), loops 12 (25 pts), boolean chains 7 (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Typer.typedFunctionValue (cognitive 108) compiler/src/dotty/tools/dotc/typer/Typer.scala:1917— Typer.typedFunctionValue has cognitive complexity 108 (threshold 15). Drivers by points: if/else 46 (71 pts), match/switch 11 (19 pts), boolean chains 11, loops 3 (7 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.
Namer.index (cognitive 106) compiler/src/dotty/tools/dotc/typer/Namer.scala:592— Namer.index has cognitive complexity 106 (threshold 15). Drivers by points: if/else 29 (61 pts), match/switch 9 (23 pts), loops 8 (15 pts), boolean chains 7 (nesting depth added 53). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
GlobalOptimizer.runInliner (cognitive 105) compiler/src/dotty/tools/backend/jvm/opt/Inliner.scala:82— GlobalOptimizer.runInliner has cognitive complexity 105 (threshold 15). Drivers by points: if/else 22 (62 pts), match/switch 7 (28 pts), loops 4 (11 pts), boolean chains 4 (nesting depth added 68). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Setting.tryToSet (cognitive 105) compiler/src/dotty/tools/dotc/config/Settings.scala:156— Setting.tryToSet has cognitive complexity 105 (threshold 15). Drivers by points: if/else 53 (68 pts), match/switch 13 (24 pts), boolean chains 13 (nesting depth added 26). 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.
TypeEval.tryCompiletimeConstantFold (cognitive 103) compiler/src/dotty/tools/dotc/core/TypeEval.scala:16— TypeEval.tryCompiletimeConstantFold has cognitive complexity 103 (threshold 15). Drivers by points: if/else 33 (43 pts), match/switch 13 (35 pts), loops 6 (19 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 46). 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.
Constructors.transformTemplate (cognitive 103) compiler/src/dotty/tools/dotc/transform/Constructors.scala:142— Constructors.transformTemplate has cognitive complexity 103 (threshold 15). Drivers by points: if/else 42 (72 pts), boolean chains 17, match/switch 9 (12 pts), loops 2 (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.
GlobalOptimizer.inlineCallsite (cognitive 99) compiler/src/dotty/tools/backend/jvm/opt/Inliner.scala:384— GlobalOptimizer.inlineCallsite has cognitive complexity 99 (threshold 15). Drivers by points: if/else 49 (76 pts), match/switch 6 (10 pts), loops 5 (7 pts), boolean chains 6 (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.
TypeErasure.apply (cognitive 99) compiler/src/dotty/tools/dotc/core/TypeErasure.scala:784— TypeErasure.apply has cognitive complexity 99 (threshold 15). Drivers by points: if/else 41 (68 pts), boolean chains 18, match/switch 5 (13 pts) (nesting depth added 35). 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.
CommentExtractor.extract (cognitive 99) directives-parser/src/main/scala/dotty/tools/directives/CommentExtractor.scala:32— CommentExtractor.extract has cognitive complexity 99 (threshold 15). Drivers by points: if/else 32 (67 pts), boolean chains 20, loops 6 (12 pts) (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Completions.completionOrdering (cognitive 98) presentation-compiler/src/main/dotty/tools/pc/completions/Completions.scala:968— Completions.completionOrdering has cognitive complexity 98 (threshold 15). Drivers by points: if/else 39 (87 pts), boolean chains 7, match/switch 4 (nesting depth added 48). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
CopyProp.eliminateStaleStoresAndRewriteSomeIntrinsics (cognitive 97) compiler/src/dotty/tools/backend/jvm/opt/CopyProp.scala:149— CopyProp.eliminateStaleStoresAndRewriteSomeIntrinsics has cognitive complexity 97 (threshold 15). Drivers by points: if/else 23 (57 pts), match/switch 5 (18 pts), loops 6 (14 pts), boolean chains 8 (nesting depth added 55). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Checking.checkWellFormed (cognitive 97) compiler/src/dotty/tools/dotc/typer/Checking.scala:603— Checking.checkWellFormed has cognitive complexity 97 (threshold 15). Drivers by points: if/else 50 (62 pts), boolean chains 33, loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
CaseKeywordCompletion.contribute (cognitive 96) presentation-compiler/src/main/dotty/tools/pc/completions/MatchCaseCompletions.scala:59— CaseKeywordCompletion.contribute has cognitive complexity 96 (threshold 15). Drivers by points: if/else 29 (66 pts), match/switch 9 (24 pts), boolean chains 6 (nesting depth added 52). 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.
Parser.termParamClause (cognitive 94) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:3952— Parser.termParamClause has cognitive complexity 94 (threshold 15). Drivers by points: if/else 41 (71 pts), boolean chains 13, match/switch 4 (7 pts), loops 1 (3 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InlineReducer.reduceInlineMatch (cognitive 93) compiler/src/dotty/tools/dotc/inlines/InlineReducer.scala:172— InlineReducer.reduceInlineMatch has cognitive complexity 93 (threshold 15). Drivers by points: if/else 32 (47 pts), match/switch 16 (27 pts), boolean chains 13, loops 3 (6 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.
Translator.patternPlan (cognitive 93) compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala:249— Translator.patternPlan has cognitive complexity 93 (threshold 15). Drivers by points: if/else 44 (63 pts), match/switch 11 (19 pts), boolean chains 11 (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.
Denotation.meet (cognitive 91) compiler/src/dotty/tools/dotc/core/Denotations.scala:402— Denotation.meet has cognitive complexity 91 (threshold 15). Drivers by points: if/else 52 (73 pts), boolean chains 14, match/switch 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.
ClassDenotation.baseTypeOf (cognitive 89) compiler/src/dotty/tools/dotc/core/SymDenotations.scala:2372— ClassDenotation.baseTypeOf has cognitive complexity 89 (threshold 15). Drivers by points: if/else 36 (59 pts), match/switch 10 (20 pts), boolean chains 9, error handling 1 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ScalaJSPrepJSInteropTransformer.transformValOrDefDefInJSType (cognitive 87) compiler/src/dotty/tools/dotc/transform/sjs/PrepJSInterop.scala:780— ScalaJSPrepJSInteropTransformer.transformValOrDefDefInJSType has cognitive complexity 87 (threshold 15). Drivers by points: if/else 32 (56 pts), match/switch 6 (16 pts), boolean chains 15 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
desugar.apply (cognitive 84) compiler/src/dotty/tools/dotc/ast/Desugar.scala:2125— desugar.apply has cognitive complexity 84 (threshold 15). Drivers by points: if/else 38 (52 pts), match/switch 17 (22 pts), boolean chains 10 (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.
Mixin.transformTemplate (cognitive 81) compiler/src/dotty/tools/dotc/transform/Mixin.scala:224— Mixin.transformTemplate has cognitive complexity 81 (threshold 15). Drivers by points: if/else 37 (59 pts), match/switch 7 (10 pts), boolean chains 9, loops 3 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GlobalOptimizer.findIllegalAccess (cognitive 80) compiler/src/dotty/tools/backend/jvm/opt/Inliner.scala:795— GlobalOptimizer.findIllegalAccess has cognitive complexity 80 (threshold 15). Drivers by points: loops 10 (37 pts), if/else 10 (30 pts), match/switch 6 (13 pts) (nesting depth added 54). 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.
TypeOps.orDominator (cognitive 80) compiler/src/dotty/tools/dotc/core/TypeOps.scala:226— TypeOps.orDominator has cognitive complexity 80 (threshold 15). Drivers by points: if/else 37 (41 pts), match/switch 17 (31 pts), boolean chains 8 (nesting depth added 18). 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.
ImplicitSearch.searchImplicit (cognitive 80) compiler/src/dotty/tools/dotc/typer/Implicits.scala:1686— ImplicitSearch.searchImplicit has cognitive complexity 80 (threshold 15). Drivers by points: if/else 26 (44 pts), match/switch 8 (31 pts), boolean chains 5 (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PlainBodyBuilder.genMatchTo (cognitive 78) compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala:980— PlainBodyBuilder.genMatchTo has cognitive complexity 78 (threshold 15). Drivers by points: if/else 16 (32 pts), match/switch 6 (24 pts), loops 7 (22 pts) (nesting depth added 49). 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.
Namer.inferredResultType (cognitive 78) compiler/src/dotty/tools/dotc/typer/Namer.scala:2170— Namer.inferredResultType has cognitive complexity 78 (threshold 15). Drivers by points: if/else 36 (51 pts), match/switch 9 (22 pts), boolean chains 5 (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.
Type.findMember (cognitive 76) compiler/src/dotty/tools/dotc/core/Types.scala:821— Type.findMember has cognitive complexity 76 (threshold 15). Drivers by points: if/else 40 (53 pts), match/switch 9 (14 pts), boolean chains 8, error handling 1 (nesting depth added 18). 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.
desugar.makePatDef (cognitive 75) compiler/src/dotty/tools/dotc/ast/Desugar.scala:1516— desugar.makePatDef has cognitive complexity 75 (threshold 15). Drivers by points: if/else 23 (36 pts), match/switch 12 (31 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 36). 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.
Parser.givenDef (cognitive 75) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:4720— Parser.givenDef has cognitive complexity 75 (threshold 15). Drivers by points: if/else 39 (51 pts), boolean chains 21, match/switch 2 (3 pts) (nesting depth added 13). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ReplDriver.interpretCommand (cognitive 74) repl/src/dotty/tools/repl/ReplDriver.scala:634— ReplDriver.interpretCommand has cognitive complexity 74 (threshold 15). Drivers by points: if/else 24 (38 pts), error handling 5 (15 pts), match/switch 7 (13 pts), loops 3 (8 pts) (nesting depth added 35). 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.
SyncAndTryBuilder.genLoadTry (cognitive 73) compiler/src/dotty/tools/backend/jvm/BCodeSyncAndTry.scala:182— SyncAndTryBuilder.genLoadTry has cognitive complexity 73 (threshold 15). Drivers by points: if/else 20 (41 pts), match/switch 5 (15 pts), loops 5 (13 pts), boolean chains 4 (nesting depth added 39). 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.
MethodMax.computeMaxLocalsMaxStack (cognitive 73) compiler/src/dotty/tools/backend/jvm/opt/MethodMax.scala:38— MethodMax.computeMaxLocalsMaxStack has cognitive complexity 73 (threshold 15). Drivers by points: if/else 17 (48 pts), loops 4 (14 pts), match/switch 2 (8 pts), boolean chains 3 (nesting depth added 47). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
TreePickler.pickleNewType (cognitive 73) compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala:185— TreePickler.pickleNewType has cognitive complexity 73 (threshold 15). Drivers by points: if/else 33 (62 pts), match/switch 3 (6 pts), boolean chains 5 (nesting depth added 32). 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.
LocalOptimizer.eliminateRedundantCastsAndRewriteSomeIntrinsics (cognitive 72) compiler/src/dotty/tools/backend/jvm/opt/LocalOptimizer.scala:535— LocalOptimizer.eliminateRedundantCastsAndRewriteSomeIntrinsics has cognitive complexity 72 (threshold 15). Drivers by points: if/else 16 (48 pts), boolean chains 9, match/switch 3 (8 pts), loops 3 (7 pts) (nesting depth added 41). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
CheckUnused.resolveUsage (cognitive 72) compiler/src/dotty/tools/dotc/transform/CheckUnused.scala:374— CheckUnused.resolveUsage has cognitive complexity 72 (threshold 15). Drivers by points: if/else 25 (50 pts), boolean chains 20, loops 1, match/switch 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Objects.call (cognitive 72) compiler/src/dotty/tools/dotc/transform/init/Objects.scala:1057— Objects.call has cognitive complexity 72 (threshold 15). Drivers by points: if/else 36 (60 pts), match/switch 3 (9 pts), boolean chains 3 (nesting depth added 30). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
TypeComparer.isSubArgs (cognitive 71) compiler/src/dotty/tools/dotc/core/TypeComparer.scala:1849— TypeComparer.isSubArgs has cognitive complexity 71 (threshold 15). Drivers by points: if/else 20 (34 pts), boolean chains 19, match/switch 5 (14 pts), error handling 1 (4 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TypeOps.boundsViolations (cognitive 70) compiler/src/dotty/tools/dotc/core/TypeOps.scala:605— TypeOps.boundsViolations has cognitive complexity 70 (threshold 15). Drivers by points: if/else 19 (34 pts), match/switch 11 (28 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TailRecElimination.transform (cognitive 70) compiler/src/dotty/tools/dotc/transform/TailRec.scala:294— TailRecElimination.transform has cognitive complexity 70 (threshold 15). Drivers by points: if/else 29 (39 pts), match/switch 8 (18 pts), loops 2 (7 pts), boolean chains 6 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Lexer.tokenize (cognitive 70) directives-parser/src/main/scala/dotty/tools/directives/Lexer.scala:26— Lexer.tokenize has cognitive complexity 70 (threshold 15). Drivers by points: if/else 19 (29 pts), match/switch 4 (17 pts), loops 4 (10 pts), boolean chains 8, error handling 1 (6 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ImplicitRefs.filterMatching (cognitive 69) compiler/src/dotty/tools/dotc/typer/Implicits.scala:121— ImplicitRefs.filterMatching has cognitive complexity 69 (threshold 15). Drivers by points: if/else 38 (53 pts), match/switch 7 (10 pts), boolean chains 6 (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.
Scanner.handleNewLine (cognitive 68) compiler/src/dotty/tools/dotc/parsing/Scanners.scala:569— Scanner.handleNewLine has cognitive complexity 68 (threshold 15). Drivers by points: if/else 23 (45 pts), boolean chains 17, match/switch 3 (6 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Namer.createSymbol (cognitive 68) compiler/src/dotty/tools/dotc/typer/Namer.scala:234— Namer.createSymbol has cognitive complexity 68 (threshold 15). Drivers by points: if/else 30 (47 pts), match/switch 6 (12 pts), boolean chains 9 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LocalOptImpls.simplifyJumps (cognitive 67) compiler/src/dotty/tools/backend/jvm/opt/LocalOptimizer.scala:1035— LocalOptImpls.simplifyJumps has cognitive complexity 67 (threshold 15). Drivers by points: if/else 27 (37 pts), match/switch 11 (16 pts), boolean chains 12, loops 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Typer.typedMatch (cognitive 67) compiler/src/dotty/tools/dotc/typer/Typer.scala:2229— Typer.typedMatch has cognitive complexity 67 (threshold 15). Drivers by points: if/else 18 (32 pts), match/switch 12 (32 pts), boolean chains 3 (nesting depth added 34). 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.
RefinedPrinter.toText (cognitive 65) compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala:243— RefinedPrinter.toText has cognitive complexity 65 (threshold 15). Drivers by points: if/else 27 (35 pts), match/switch 8 (15 pts), boolean chains 11, error handling 2 (4 pts) (nesting depth added 17). 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.
ClassCompleter.completeInCreationContext (cognitive 65) compiler/src/dotty/tools/dotc/typer/Namer.scala:1683— ClassCompleter.completeInCreationContext has cognitive complexity 65 (threshold 15). Drivers by points: if/else 32 (44 pts), match/switch 6 (11 pts), boolean chains 9, 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.
StringParsers.checkFloatFormat (cognitive 65) library/src/scala/collection/StringParsers.scala:176— StringParsers.checkFloatFormat has cognitive complexity 65 (threshold 15). Drivers by points: boolean chains 34, if/else 24 (31 pts) (nesting depth added 7). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
InlineSourceMatcher.parse (cognitive 64) compiler/src/dotty/tools/backend/jvm/opt/InlinerHeuristics.scala:299— InlineSourceMatcher.parse has cognitive complexity 64 (threshold 15). Drivers by points: if/else 18 (49 pts), loops 3 (9 pts), boolean chains 6 (nesting depth added 37). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Scala2Unpickler.readDisambiguatedSymbol (cognitive 64) compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala:343— Scala2Unpickler.readDisambiguatedSymbol has cognitive complexity 64 (threshold 15). Drivers by points: if/else 38 (47 pts), boolean chains 14, match/switch 3 (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.
PlainPrinter.toText (cognitive 64) compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala:220— PlainPrinter.toText has cognitive complexity 64 (threshold 15). Drivers by points: if/else 28 (44 pts), match/switch 5 (10 pts), boolean chains 8, error handling 1 (2 pts) (nesting depth added 22). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Typer.typedIdent (cognitive 64) compiler/src/dotty/tools/dotc/typer/Typer.scala:656— Typer.typedIdent has cognitive complexity 64 (threshold 15). Drivers by points: if/else 32 (43 pts), match/switch 7 (12 pts), boolean chains 9 (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.
Typer.typedSelectWithAdapt (cognitive 64) compiler/src/dotty/tools/dotc/typer/Typer.scala:832— Typer.typedSelectWithAdapt has cognitive complexity 64 (threshold 15). Drivers by points: if/else 41 (48 pts), match/switch 4 (10 pts), boolean chains 6 (nesting depth added 13). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ProdConsAnalyzer.copyOperationProducedValueSlots (cognitive 62) compiler/src/dotty/tools/backend/jvm/analysis/ProdConsAnalyzer.scala:277— ProdConsAnalyzer.copyOperationProducedValueSlots has cognitive complexity 62 (threshold 15). Drivers by points: if/else 18 (42 pts), match/switch 6 (20 pts) (nesting depth added 38). 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.
JSCodeGen.genStatOrExpr (cognitive 62) compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala:1898— JSCodeGen.genStatOrExpr has cognitive complexity 62 (threshold 15). Drivers by points: if/else 29 (43 pts), match/switch 8 (15 pts), boolean chains 4 (nesting depth added 21). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Implicits.typedImplicit (cognitive 62) compiler/src/dotty/tools/dotc/typer/Implicits.scala:1169— Implicits.typedImplicit has cognitive complexity 62 (threshold 15). Drivers by points: if/else 23 (47 pts), match/switch 3 (9 pts), boolean chains 6 (nesting depth added 30). 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.
InlinerHeuristics.inlineRequest (cognitive 61) compiler/src/dotty/tools/backend/jvm/opt/InlinerHeuristics.scala:153— InlinerHeuristics.inlineRequest has cognitive complexity 61 (threshold 15). Drivers by points: if/else 25 (43 pts), match/switch 4 (11 pts), boolean chains 7 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CaptureChecker.checkOverrides (cognitive 61) compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala:2171— CaptureChecker.checkOverrides has cognitive complexity 61 (threshold 15). Drivers by points: match/switch 9 (27 pts), if/else 18 (26 pts), boolean chains 5, 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.
TreePickler.pickleFlags (cognitive 61) compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala:858— TreePickler.pickleFlags has cognitive complexity 61 (threshold 15). Drivers by points: if/else 43 (61 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.
Parser.typ (cognitive 61) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:1866— Parser.typ has cognitive complexity 61 (threshold 15). Drivers by points: if/else 34 (48 pts), boolean chains 6, match/switch 3 (5 pts), loops 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ScalaJSPrepJSInteropTransformer.transformJSClassDef (cognitive 61) compiler/src/dotty/tools/dotc/transform/sjs/PrepJSInterop.scala:430— ScalaJSPrepJSInteropTransformer.transformJSClassDef has cognitive complexity 61 (threshold 15). Drivers by points: if/else 27 (50 pts), boolean chains 7, loops 2, match/switch 1 (2 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TypeComparer.provablyDisjoint (cognitive 59) compiler/src/dotty/tools/dotc/core/TypeComparer.scala:3128— TypeComparer.provablyDisjoint has cognitive complexity 59 (threshold 15). Drivers by points: if/else 22 (37 pts), boolean chains 13, match/switch 5 (9 pts) (nesting depth added 19). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Scanner.fetchToken (cognitive 59) compiler/src/dotty/tools/dotc/parsing/Scanners.scala:878— Scanner.fetchToken has cognitive complexity 59 (threshold 15). Drivers by points: if/else 32 (46 pts), match/switch 4 (8 pts), boolean chains 5 (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.
DidYouMean.inScopeCandidates (cognitive 59) compiler/src/dotty/tools/dotc/reporting/DidYouMean.scala:40— DidYouMean.inScopeCandidates has cognitive complexity 59 (threshold 15). Drivers by points: if/else 14 (28 pts), loops 5 (24 pts), boolean chains 4, match/switch 1 (3 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Mutability.adaptReadOnlyToExpected (cognitive 58) compiler/src/dotty/tools/dotc/cc/Mutability.scala:160— Mutability.adaptReadOnlyToExpected has cognitive complexity 58 (threshold 15). Drivers by points: if/else 16 (30 pts), loops 2 (13 pts), match/switch 6 (13 pts), boolean chains 2 (nesting depth added 32). 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.
InlineCall.expand (cognitive 58) compiler/src/dotty/tools/dotc/inlines/Inlines.scala:751— InlineCall.expand has cognitive complexity 58 (threshold 15). Drivers by points: if/else 30 (39 pts), match/switch 7 (15 pts), boolean chains 4 (nesting depth added 17). 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.
CaptureChecker.adaptBoxed (cognitive 57) compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala:1996— CaptureChecker.adaptBoxed has cognitive complexity 57 (threshold 15). Drivers by points: if/else 32 (44 pts), match/switch 5 (7 pts), boolean chains 6 (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.
PlainBodyBuilder.genApply (cognitive 55) compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala:765— PlainBodyBuilder.genApply has cognitive complexity 55 (threshold 15). Drivers by points: if/else 20 (40 pts), boolean chains 8, match/switch 4 (7 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.
LocalOptimizer.methodOptimizations (cognitive 55) compiler/src/dotty/tools/backend/jvm/opt/LocalOptimizer.scala:180— LocalOptimizer.methodOptimizations has cognitive complexity 55 (threshold 15). Drivers by points: boolean chains 31, if/else 21 (23 pts), match/switch 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
TypeApplications.appliedTo (cognitive 55) compiler/src/dotty/tools/dotc/core/TypeApplications.scala:411— TypeApplications.appliedTo has cognitive complexity 55 (threshold 15). Drivers by points: if/else 16 (35 pts), match/switch 4 (15 pts), boolean chains 5 (nesting depth added 30). 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.
ImplicitRunInfo.computeIScope (cognitive 55) compiler/src/dotty/tools/dotc/typer/Implicits.scala:650— ImplicitRunInfo.computeIScope has cognitive complexity 55 (threshold 15). Drivers by points: if/else 19 (32 pts), match/switch 6 (9 pts), boolean chains 7, loops 2 (7 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.
MetalsInteractive.enclosingSymbolsWithExpressionType (cognitive 55) presentation-compiler/src/main/dotty/tools/pc/MetalsInteractive.scala:113— MetalsInteractive.enclosingSymbolsWithExpressionType has cognitive complexity 55 (threshold 15). Drivers by points: if/else 20 (29 pts), boolean chains 14, match/switch 5 (9 pts), loops 1 (3 pts) (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
NameTransformer.decode (cognitive 54) library/src/scala/reflect/NameTransformer.scala:121— NameTransformer.decode has cognitive complexity 54 (threshold 15). Drivers by points: if/else 13 (35 pts), boolean chains 8, loops 2 (6 pts), error handling 1 (5 pts) (nesting depth added 30). 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.
LocalOptImpls.removeUnreachableCodeImpl (cognitive 53) compiler/src/dotty/tools/backend/jvm/opt/LocalOptimizer.scala:694— LocalOptImpls.removeUnreachableCodeImpl has cognitive complexity 53 (threshold 15). Drivers by points: if/else 14 (28 pts), loops 6 (13 pts), match/switch 3 (9 pts), boolean chains 3 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Setup.transformExplicitType (cognitive 53) compiler/src/dotty/tools/dotc/cc/Setup.scala:424— Setup.transformExplicitType has cognitive complexity 53 (threshold 15). Drivers by points: if/else 27 (34 pts), match/switch 8 (12 pts), boolean chains 5, error handling 1 (2 pts) (nesting depth added 12). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Typer.typedAppliedTypeTree (cognitive 53) compiler/src/dotty/tools/dotc/typer/Typer.scala:2784— Typer.typedAppliedTypeTree has cognitive complexity 53 (threshold 15). Drivers by points: if/else 24 (38 pts), match/switch 5 (12 pts), boolean chains 3 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SourceCodePrinter.printType (cognitive 53) compiler/src/scala/quoted/runtime/impl/printers/SourceCode.scala:1099— SourceCodePrinter.printType has cognitive complexity 53 (threshold 15). Drivers by points: if/else 14 (30 pts), match/switch 7 (17 pts), boolean chains 6 (nesting depth added 26). 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.
Stream.addStringNoForce (cognitive 53) library/src/scala/collection/immutable/Stream.scala:252— Stream.addStringNoForce has cognitive complexity 53 (threshold 15). Drivers by points: if/else 12 (34 pts), loops 4 (17 pts), boolean chains 2 (nesting depth added 35). 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.
InferredMethodProvider.inferredMethodEdits (cognitive 53) presentation-compiler/src/main/dotty/tools/pc/InferredMethodProvider.scala:53— InferredMethodProvider.inferredMethodEdits has cognitive complexity 53 (threshold 15). Drivers by points: if/else 21 (25 pts), match/switch 11 (21 pts), boolean chains 7 (nesting depth added 14). 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.
SepCheck.checkType (cognitive 52) compiler/src/dotty/tools/dotc/cc/SepCheck.scala:749— SepCheck.checkType has cognitive complexity 52 (threshold 15). Drivers by points: if/else 22 (36 pts), match/switch 7 (14 pts), loops 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.importExpr (cognitive 52) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:4198— Parser.importExpr has cognitive complexity 52 (threshold 15). Drivers by points: if/else 25 (42 pts), match/switch 4 (6 pts), boolean chains 4 (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.
SyntheticMembers.caseAndValueMethods (cognitive 52) compiler/src/dotty/tools/dotc/transform/SyntheticMembers.scala:97— SyntheticMembers.caseAndValueMethods has cognitive complexity 52 (threshold 15). Drivers by points: if/else 38 (41 pts), boolean chains 6, match/switch 3 (4 pts), loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ProtoTypes.wildApprox (cognitive 52) compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala:952— ProtoTypes.wildApprox has cognitive complexity 52 (threshold 15). Drivers by points: if/else 26 (37 pts), match/switch 4 (8 pts), boolean chains 7 (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
NameTransformer.decode (cognitive 52) compiler/src/dotty/tools/dotc/util/NameTransformer.scala:95— NameTransformer.decode has cognitive complexity 52 (threshold 15). Drivers by points: if/else 11 (33 pts), boolean chains 8, loops 2 (6 pts), error handling 1 (5 pts) (nesting depth added 30). 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.
PlainSkelBuilder.genDefDef (cognitive 51) compiler/src/dotty/tools/backend/jvm/BCodeSkelBuilder.scala:884— PlainSkelBuilder.genDefDef has cognitive complexity 51 (threshold 15). Drivers by points: if/else 23 (32 pts), boolean chains 8, match/switch 3 (7 pts), loops 2 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CopyProp.classTagNewArrayInstr (cognitive 51) compiler/src/dotty/tools/backend/jvm/opt/CopyProp.scala:92— CopyProp.classTagNewArrayInstr has cognitive complexity 51 (threshold 15). Drivers by points: match/switch 4 (24 pts), if/else 9 (23 pts), boolean chains 4 (nesting depth added 34). 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.
Objects.patternMatch (cognitive 51) compiler/src/dotty/tools/dotc/transform/init/Objects.scala:1827— Objects.patternMatch has cognitive complexity 51 (threshold 15). Drivers by points: if/else 21 (36 pts), match/switch 4 (7 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Preparser.preparse (cognitive 51) scaladoc/src/dotty/tools/scaladoc/tasty/comments/Preparser.scala:12— Preparser.preparse has cognitive complexity 51 (threshold 15). Drivers by points: match/switch 9 (24 pts), if/else 15 (20 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 21). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
JavaScanner.getTextBlock (cognitive 50) compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala:479— JavaScanner.getTextBlock has cognitive complexity 50 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 11, loops 5 (7 pts), match/switch 1 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Inferencing.instantiateTypeVars (cognitive 50) compiler/src/dotty/tools/dotc/typer/Inferencing.scala:706— Inferencing.instantiateTypeVars has cognitive complexity 50 (threshold 15). Drivers by points: if/else 22 (39 pts), boolean chains 8, match/switch 2, 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.
InferredTypeProvider.inferredTypeEdits (cognitive 50) presentation-compiler/src/main/dotty/tools/pc/InferredTypeProvider.scala:57— InferredTypeProvider.inferredTypeEdits has cognitive complexity 50 (threshold 15). Drivers by points: if/else 24 (31 pts), match/switch 8 (13 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Run.compileUnits (cognitive 49) compiler/src/dotty/tools/dotc/Run.scala:367— Run.compileUnits has cognitive complexity 49 (threshold 15). Drivers by points: if/else 19 (30 pts), loops 4 (9 pts), boolean chains 6, error handling 1 (3 pts), match/switch 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PatternTypeConstrainer.constrainPatternType (cognitive 49) compiler/src/dotty/tools/dotc/core/PatternTypeConstrainer.scala:76— PatternTypeConstrainer.constrainPatternType has cognitive complexity 49 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 14, match/switch 9 (14 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.
TypeOps.instantiateToSubType (cognitive 49) compiler/src/dotty/tools/dotc/core/TypeOps.scala:787— TypeOps.instantiateToSubType has cognitive complexity 49 (threshold 15). Drivers by points: if/else 27 (34 pts), match/switch 6 (9 pts), boolean chains 5, loops 1 (nesting depth added 10). 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.
Inliner.dropUnusedDefs (cognitive 49) compiler/src/dotty/tools/dotc/inlines/Inliner.scala:1300— Inliner.dropUnusedDefs has cognitive complexity 49 (threshold 15). Drivers by points: match/switch 9 (21 pts), if/else 14 (17 pts), loops 3 (6 pts), boolean chains 5 (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.
Intrinsics.compileForErrors (cognitive 49) compiler/src/dotty/tools/dotc/inlines/Inlines.scala:602— Intrinsics.compileForErrors has cognitive complexity 49 (threshold 15). Drivers by points: if/else 13 (26 pts), match/switch 5 (14 pts), loops 1 (7 pts), boolean chains 2 (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.
Memoize.transformDefDef (cognitive 49) compiler/src/dotty/tools/dotc/transform/Memoize.scala:101— Memoize.transformDefDef has cognitive complexity 49 (threshold 15). Drivers by points: if/else 27 (47 pts), boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StringInterpolatorOpt.transformApply (cognitive 49) compiler/src/dotty/tools/dotc/transform/localopt/StringInterpolatorOpt.scala:99— StringInterpolatorOpt.transformApply has cognitive complexity 49 (threshold 15). Drivers by points: if/else 22 (29 pts), match/switch 9 (14 pts), boolean chains 5, loops 1 (nesting depth added 12). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Checking.checkIrrefutable (cognitive 49) compiler/src/dotty/tools/dotc/typer/Checking.scala:1047— Checking.checkIrrefutable has cognitive complexity 49 (threshold 15). Drivers by points: if/else 22 (28 pts), match/switch 7 (12 pts), boolean chains 9 (nesting depth added 11). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
AppToMain.wrapIntoMain (cognitive 49) compiler/src/dotty/tools/dotc/typer/Migrations.scala:351— AppToMain.wrapIntoMain has cognitive complexity 49 (threshold 15). Drivers by points: if/else 17 (24 pts), loops 8 (13 pts), boolean chains 11, match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MirrorSource.reduce (cognitive 49) compiler/src/dotty/tools/dotc/typer/Synthesizer.scala:387— MirrorSource.reduce has cognitive complexity 49 (threshold 15). Drivers by points: if/else 18 (29 pts), loops 3 (9 pts), match/switch 4 (8 pts), boolean chains 3 (nesting depth added 21). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Typer.typedAssign (cognitive 49) compiler/src/dotty/tools/dotc/typer/Typer.scala:1488— Typer.typedAssign has cognitive complexity 49 (threshold 15). Drivers by points: match/switch 9 (26 pts), if/else 14 (20 pts), boolean chains 3 (nesting depth added 23). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ApplyArgsExtractor.getArgsAndParams (cognitive 49) presentation-compiler/src/main/dotty/tools/pc/ApplyArgsExtractor.scala:45— ApplyArgsExtractor.getArgsAndParams has cognitive complexity 49 (threshold 15). Drivers by points: if/else 22 (27 pts), match/switch 10 (15 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
AliasingFrame.execute (cognitive 48) compiler/src/dotty/tools/backend/jvm/analysis/AliasingAnalyzer.scala:104— AliasingFrame.execute has cognitive complexity 48 (threshold 15). Drivers by points: if/else 22 (42 pts), match/switch 2 (3 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 22). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CommentExpander.expandVariables (cognitive 48) compiler/src/dotty/tools/dotc/core/Comments.scala:380— CommentExpander.expandVariables has cognitive complexity 48 (threshold 15). Drivers by points: if/else 14 (23 pts), loops 3 (11 pts), match/switch 3 (11 pts), boolean chains 3 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Hoister.hoistSuperArg (cognitive 48) compiler/src/dotty/tools/dotc/transform/HoistSuperArgs.scala:74— Hoister.hoistSuperArg has cognitive complexity 48 (threshold 15). Drivers by points: if/else 21 (27 pts), match/switch 10 (15 pts), boolean chains 6 (nesting depth added 11). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Typer.typedNumber (cognitive 48) compiler/src/dotty/tools/dotc/typer/Typer.scala:1208— Typer.typedNumber has cognitive complexity 48 (threshold 15). Drivers by points: if/else 17 (23 pts), match/switch 9 (18 pts), error handling 2 (4 pts), boolean chains 3 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PlainBodyBuilder.genLoadTo (cognitive 47) compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala:316— PlainBodyBuilder.genLoadTo has cognitive complexity 47 (threshold 15). Drivers by points: if/else 23 (38 pts), match/switch 3 (6 pts), boolean chains 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProdConsAnalyzer.copyOperationSourceValue (cognitive 47) compiler/src/dotty/tools/backend/jvm/analysis/ProdConsAnalyzer.scala:180— ProdConsAnalyzer.copyOperationSourceValue has cognitive complexity 47 (threshold 15). Drivers by points: if/else 17 (33 pts), match/switch 6 (14 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CaptureChecker.recheckClosureBlock (cognitive 47) compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala:1141— CaptureChecker.recheckClosureBlock has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (27 pts), match/switch 6 (13 pts), boolean chains 4, loops 1 (3 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.
SepCheck.traverse (cognitive 47) compiler/src/dotty/tools/dotc/cc/SepCheck.scala:1066— SepCheck.traverse has cognitive complexity 47 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 5 (19 pts), match/switch 3 (8 pts), boolean chains 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TypeErasure.erasedLub (cognitive 47) compiler/src/dotty/tools/dotc/core/TypeErasure.scala:430— TypeErasure.erasedLub has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (24 pts), match/switch 5 (16 pts), boolean chains 7 (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.
InlineTyper.typedMatchFinish (cognitive 47) compiler/src/dotty/tools/dotc/inlines/Inliner.scala:1160— InlineTyper.typedMatchFinish has cognitive complexity 47 (threshold 15). Drivers by points: match/switch 8 (24 pts), if/else 15 (22 pts), boolean chains 1 (nesting depth added 23). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CrossStageSafety.transform (cognitive 47) compiler/src/dotty/tools/dotc/staging/CrossStageSafety.scala:59— CrossStageSafety.transform has cognitive complexity 47 (threshold 15). Drivers by points: if/else 18 (32 pts), match/switch 4 (12 pts), boolean chains 3 (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.
Typer.typedSelect (cognitive 47) compiler/src/dotty/tools/dotc/transform/Erasure.scala:654— Typer.typedSelect has cognitive complexity 47 (threshold 15). Drivers by points: if/else 26 (33 pts), boolean chains 11, match/switch 2 (3 pts) (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
BCodeRepository.methodNode (cognitive 46) compiler/src/dotty/tools/backend/jvm/opt/BCodeRepository.scala:152— BCodeRepository.methodNode has cognitive complexity 46 (threshold 15). Drivers by points: if/else 18 (26 pts), match/switch 7 (10 pts), boolean chains 8, loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CopyProp.eliminateStoreLoad (cognitive 46) compiler/src/dotty/tools/backend/jvm/opt/CopyProp.scala:642— CopyProp.eliminateStoreLoad has cognitive complexity 46 (threshold 15). Drivers by points: if/else 16 (27 pts), match/switch 5 (11 pts), loops 4 (5 pts), boolean chains 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.expr1 (cognitive 46) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:2665— Parser.expr1 has cognitive complexity 46 (threshold 15). Drivers by points: if/else 20 (32 pts), match/switch 5 (13 pts), boolean chains 1 (nesting depth added 20). 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.
ScalaJSPrepJSInteropTransformer.checkJSNativeLoadSpecOf (cognitive 46) compiler/src/dotty/tools/dotc/transform/sjs/PrepJSInterop.scala:609— ScalaJSPrepJSInteropTransformer.checkJSNativeLoadSpecOf has cognitive complexity 46 (threshold 15). Drivers by points: if/else 16 (34 pts), match/switch 2 (6 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Synthesizer.sumMirror (cognitive 46) compiler/src/dotty/tools/dotc/typer/Synthesizer.scala:542— Synthesizer.sumMirror has cognitive complexity 46 (threshold 15). Drivers by points: if/else 20 (31 pts), match/switch 5 (14 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Typer.typedSelect (cognitive 46) compiler/src/dotty/tools/dotc/typer/Typer.scala:1102— Typer.typedSelect has cognitive complexity 46 (threshold 15). Drivers by points: if/else 21 (32 pts), match/switch 6 (11 pts), boolean chains 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JSCodeGen.genScalaClass (cognitive 45) compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala:395— JSCodeGen.genScalaClass has cognitive complexity 45 (threshold 15). Drivers by points: if/else 24 (37 pts), boolean chains 5, match/switch 1 (2 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.
Denotations.infoMeet (cognitive 45) compiler/src/dotty/tools/dotc/core/Denotations.scala:541— Denotations.infoMeet has cognitive complexity 45 (threshold 15). Drivers by points: if/else 15 (24 pts), match/switch 7 (20 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.literal (cognitive 45) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:1409— Parser.literal has cognitive complexity 45 (threshold 15). Drivers by points: if/else 20 (33 pts), match/switch 4 (9 pts), boolean chains 2, error handling 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.forExpr (cognitive 45) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:3338— Parser.forExpr has cognitive complexity 45 (threshold 15). Drivers by points: if/else 20 (37 pts), boolean chains 8 (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.
Erasure.transform (cognitive 45) compiler/src/dotty/tools/dotc/transform/Erasure.scala:54— Erasure.transform has cognitive complexity 45 (threshold 15). Drivers by points: if/else 16 (31 pts), boolean chains 7, loops 1 (3 pts), match/switch 2 (3 pts), error handling 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Pickler.run (cognitive 45) compiler/src/dotty/tools/dotc/transform/Pickler.scala:442— Pickler.run has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (37 pts), error handling 1 (3 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 28). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ImportSuggestions.suggestionRoots (cognitive 45) compiler/src/dotty/tools/dotc/typer/ImportSuggestions.scala:58— ImportSuggestions.suggestionRoots has cognitive complexity 45 (threshold 15). Drivers by points: if/else 25 (36 pts), boolean chains 5, match/switch 2 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TreeReader.readType (cognitive 44) compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala:349— TreeReader.readType has cognitive complexity 44 (threshold 15). Drivers by points: if/else 21 (28 pts), match/switch 9 (15 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Objects.cases (cognitive 44) compiler/src/dotty/tools/dotc/transform/init/Objects.scala:1607— Objects.cases has cognitive complexity 44 (threshold 15). Drivers by points: if/else 17 (28 pts), match/switch 7 (16 pts) (nesting depth added 20). 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.
Nullables.postProcessByNameArgs (cognitive 44) compiler/src/dotty/tools/dotc/typer/Nullables.scala:574— Nullables.postProcessByNameArgs has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (29 pts), match/switch 5 (12 pts), boolean chains 3 (nesting depth added 21). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
NavigateAST.pathTo (cognitive 43) compiler/src/dotty/tools/dotc/ast/NavigateAST.scala:60— NavigateAST.pathTo has cognitive complexity 43 (threshold 15). Drivers by points: boolean chains 21, if/else 11 (12 pts), match/switch 5 (9 pts), loops 1 (nesting depth added 5). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Inlines.inlineCall (cognitive 43) compiler/src/dotty/tools/dotc/inlines/Inlines.scala:179— Inlines.inlineCall has cognitive complexity 43 (threshold 15). Drivers by points: if/else 22 (29 pts), match/switch 4 (6 pts), boolean chains 3, loops 1 (3 pts), error handling 1 (2 pts) (nesting depth added 12). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
SyntaxHighlighting.highlight (cognitive 43) compiler/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala:33— SyntaxHighlighting.highlight has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (25 pts), loops 4 (8 pts), boolean chains 5, match/switch 2 (5 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.
DesugarSpecializedTraits.collectReferencedSpecializations (cognitive 43) compiler/src/dotty/tools/dotc/transform/DesugarSpecializedTraits.scala:417— DesugarSpecializedTraits.collectReferencedSpecializations has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (26 pts), match/switch 6 (14 pts), boolean chains 3 (nesting depth added 19). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SuperAccessors.transformSuperSelect (cognitive 43) compiler/src/dotty/tools/dotc/transform/SuperAccessors.scala:103— SuperAccessors.transformSuperSelect has cognitive complexity 43 (threshold 15). Drivers by points: if/else 16 (30 pts), boolean chains 9, loops 1 (4 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Typer.tryExtensionOrConversion (cognitive 43) compiler/src/dotty/tools/dotc/typer/Typer.scala:4447— Typer.tryExtensionOrConversion has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (27 pts), match/switch 3 (6 pts), loops 2 (4 pts), boolean chains 3, error handling 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CaptureChecker.checkEscapingUses (cognitive 42) compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala:2390— CaptureChecker.checkEscapingUses has cognitive complexity 42 (threshold 15). Drivers by points: match/switch 6 (21 pts), if/else 11 (16 pts), boolean chains 4, loops 1 (nesting depth added 20). 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.
OrderingConstraint.replace (cognitive 42) compiler/src/dotty/tools/dotc/core/OrderingConstraint.scala:672— OrderingConstraint.replace has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (27 pts), match/switch 4 (9 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TermLambda.depStatus (cognitive 42) compiler/src/dotty/tools/dotc/core/Types.scala:4049— TermLambda.depStatus has cognitive complexity 42 (threshold 15). Drivers by points: if/else 18 (28 pts), match/switch 4 (12 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ApproximatingTypeMap.derivedAppliedType (cognitive 42) compiler/src/dotty/tools/dotc/core/Types.scala:6649— ApproximatingTypeMap.derivedAppliedType has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (30 pts), match/switch 4 (10 pts), boolean chains 2 (nesting depth added 20). 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.
TailRec.transformDefDef (cognitive 42) compiler/src/dotty/tools/dotc/transform/TailRec.scala:116— TailRec.transformDefDef has cognitive complexity 42 (threshold 15). Drivers by points: match/switch 6 (20 pts), if/else 12 (15 pts), boolean chains 7 (nesting depth added 17). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Objects.select (cognitive 42) compiler/src/dotty/tools/dotc/transform/init/Objects.scala:1265— Objects.select has cognitive complexity 42 (threshold 15). Drivers by points: if/else 22 (37 pts), boolean chains 4, match/switch 1 (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Dynamic.handleStructural (cognitive 42) compiler/src/dotty/tools/dotc/typer/Dynamic.scala:186— Dynamic.handleStructural has cognitive complexity 42 (threshold 15). Drivers by points: if/else 22 (28 pts), match/switch 5 (9 pts), boolean chains 5 (nesting depth added 10). 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.
JSCodeGen.genCompilationUnit (cognitive 41) compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala:205— JSCodeGen.genCompilationUnit has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (26 pts), loops 6 (7 pts), boolean chains 5, match/switch 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TreeReader.readNewDef (cognitive 41) compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala:909— TreeReader.readNewDef has cognitive complexity 41 (threshold 15). Drivers by points: if/else 20 (31 pts), boolean chains 5, match/switch 3 (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.
Scala2Unpickler.readType (cognitive 41) compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala:805— Scala2Unpickler.readType has cognitive complexity 41 (threshold 15). Drivers by points: if/else 18 (29 pts), match/switch 4 (7 pts), boolean chains 5 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.defDefOrDcl (cognitive 41) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:4386— Parser.defDefOrDcl has cognitive complexity 41 (threshold 15). Drivers by points: if/else 23 (35 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Scanner.getStringPart (cognitive 41) compiler/src/dotty/tools/dotc/parsing/Scanners.scala:1253— Scanner.getStringPart has cognitive complexity 41 (threshold 15). Drivers by points: if/else 22 (32 pts), boolean chains 9 (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.
CheckNonCyclicMap.apply (cognitive 41) compiler/src/dotty/tools/dotc/typer/Checking.scala:322— CheckNonCyclicMap.apply has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 10, match/switch 2 (3 pts), error handling 1 (2 pts) (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
LazyList.addStringNoForce (cognitive 41) library/src/scala/collection/immutable/LazyList.scala:1106— LazyList.addStringNoForce has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 4 (15 pts), boolean chains 1 (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Cleaner.cleanHtml (cognitive 41) scaladoc/src/dotty/tools/scaladoc/tasty/comments/Cleaner.scala:20— Cleaner.cleanHtml has cognitive complexity 41 (threshold 15). Drivers by points: if/else 16 (31 pts), boolean chains 5, match/switch 1 (4 pts), loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JSCodeGen.genSimpleBinaryOp (cognitive 40) compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala:2754— JSCodeGen.genSimpleBinaryOp has cognitive complexity 40 (threshold 15). Drivers by points: match/switch 8 (22 pts), if/else 15 (17 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.
JSCodeGen.genJSPrimitive (cognitive 40) compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala:4037— JSCodeGen.genJSPrimitive has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (27 pts), match/switch 6 (10 pts), boolean chains 3 (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
IncludeFailure.render (cognitive 40) compiler/src/dotty/tools/dotc/cc/CaptureSet.scala:1485— IncludeFailure.render has cognitive complexity 40 (threshold 15). Drivers by points: if/else 20 (26 pts), match/switch 5 (10 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
PackageClassDenotation.computeMembersNamed (cognitive 40) compiler/src/dotty/tools/dotc/core/SymDenotations.scala:2688— PackageClassDenotation.computeMembersNamed has cognitive complexity 40 (threshold 15). Drivers by points: if/else 19 (28 pts), loops 1 (4 pts), match/switch 2 (4 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TypeComparer.lub (cognitive 40) compiler/src/dotty/tools/dotc/core/TypeComparer.scala:2642— TypeComparer.lub has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (27 pts), boolean chains 8, match/switch 2 (5 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RefinedPrinter.toText (cognitive 40) compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala:882— RefinedPrinter.toText has cognitive complexity 40 (threshold 15). Drivers by points: if/else 18 (28 pts), boolean chains 8, match/switch 3 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Inferencing.constrainIfDependentParamRef (cognitive 40) compiler/src/dotty/tools/dotc/typer/Inferencing.scala:836— Inferencing.constrainIfDependentParamRef has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (21 pts), match/switch 5 (19 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RefChecks.checkExtensionMethods (cognitive 40) compiler/src/dotty/tools/dotc/typer/RefChecks.scala:1188— RefChecks.checkExtensionMethods has cognitive complexity 40 (threshold 15). Drivers by points: if/else 18 (32 pts), boolean chains 4, match/switch 2 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Extractors.showFlags (cognitive 40) compiler/src/scala/quoted/runtime/impl/printers/Extractors.scala:21— Extractors.showFlags has cognitive complexity 40 (threshold 15). Drivers by points: if/else 40. 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.
ExtractMethodProvider.extractMethod (cognitive 40) presentation-compiler/src/main/dotty/tools/pc/ExtractMethodProvider.scala:37— ExtractMethodProvider.extractMethod has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (20 pts), match/switch 6 (9 pts), loops 3 (6 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.
Setup.transformSym (cognitive 39) compiler/src/dotty/tools/dotc/cc/Setup.scala:190— Setup.transformSym has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (30 pts), boolean chains 5, match/switch 1 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReadTasty.readTASTY (cognitive 39) compiler/src/dotty/tools/dotc/fromtasty/ReadTasty.scala:35— ReadTasty.readTASTY has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (19 pts), match/switch 7 (18 pts), boolean chains 2 (nesting depth added 18). 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.
BetaReduce.reduceApplication (cognitive 39) compiler/src/dotty/tools/dotc/transform/BetaReduce.scala:119— BetaReduce.reduceApplication has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (26 pts), match/switch 4 (7 pts), boolean chains 4, loops 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Typer.typedUnadapted (cognitive 39) compiler/src/dotty/tools/dotc/typer/Typer.scala:3976— Typer.typedUnadapted has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (23 pts), match/switch 6 (12 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SourceCode.showFlags (cognitive 39) compiler/src/scala/quoted/runtime/impl/printers/SourceCode.scala:26— SourceCode.showFlags has cognitive complexity 39 (threshold 15). Drivers by points: if/else 39. 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.
Transformation.run (cognitive 39) library/src/scala/concurrent/impl/Promise.scala:516— Transformation.run has cognitive complexity 39 (threshold 15). Drivers by points: if/else 22 (36 pts), boolean chains 1, error handling 1, match/switch 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HoverProvider.hover (cognitive 39) presentation-compiler/src/main/dotty/tools/pc/HoverProvider.scala:32— HoverProvider.hover has cognitive complexity 39 (threshold 15). Drivers by points: if/else 17 (20 pts), match/switch 7 (14 pts), boolean chains 5 (nesting depth added 10). 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.
CaptureSet.map (cognitive 38) compiler/src/dotty/tools/dotc/cc/CaptureSet.scala:445— CaptureSet.map has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (25 pts), match/switch 3 (8 pts), error handling 1 (4 pts), boolean chains 1 (nesting depth added 18). 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.
ClassfileParser.unpickleOrParseInnerClasses (cognitive 38) compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala:1163— ClassfileParser.unpickleOrParseInnerClasses has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 5 (9 pts), boolean chains 6 (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.
SpliceTransformer.transform (cognitive 38) compiler/src/dotty/tools/dotc/transform/Splicing.scala:185— SpliceTransformer.transform has cognitive complexity 38 (threshold 15). Drivers by points: if/else 18 (26 pts), match/switch 4 (9 pts), boolean chains 3 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
RefChecks.checkParents (cognitive 38) compiler/src/dotty/tools/dotc/typer/RefChecks.scala:128— RefChecks.checkParents has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 2 (5 pts), match/switch 2 (5 pts), boolean chains 1 (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.
Typer.typedTyped (cognitive 38) compiler/src/dotty/tools/dotc/typer/Typer.scala:1340— Typer.typedTyped has cognitive complexity 38 (threshold 15). Drivers by points: if/else 21 (31 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LazyList.initState (cognitive 38) library/src/scala/collection/immutable/LazyList.scala:303— LazyList.initState has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (27 pts), match/switch 2 (6 pts), error handling 1 (4 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.
OptimizerCallGraph.addMethod (cognitive 37) compiler/src/dotty/tools/backend/jvm/opt/OptimizerCallGraph.scala:138— OptimizerCallGraph.addMethod has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 4 (15 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JSCodeGen.genMethodWithCurrentLocalNameScope (cognitive 37) compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala:1615— JSCodeGen.genMethodWithCurrentLocalNameScope has cognitive complexity 37 (threshold 15). Drivers by points: if/else 19 (28 pts), boolean chains 7, 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.
ExpressionTransformer.transform (cognitive 37) compiler/src/dotty/tools/debug/ExtractExpression.scala:100— ExpressionTransformer.transform has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 6, match/switch 3 (6 pts) (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SepCheck.checkApply (cognitive 37) compiler/src/dotty/tools/dotc/cc/SepCheck.scala:519— SepCheck.checkApply has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (29 pts), loops 2 (3 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Setup.checkWellformed (cognitive 37) compiler/src/dotty/tools/dotc/cc/Setup.scala:1049— Setup.checkWellformed has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 2 (5 pts), match/switch 1 (4 pts), boolean chains 3, error handling 1 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
TypeComparer.glb (cognitive 37) compiler/src/dotty/tools/dotc/core/TypeComparer.scala:2595— TypeComparer.glb has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (16 pts), match/switch 3 (15 pts), boolean chains 6 (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.
MatchTypeCaseSpec.tryConvertToSpecPattern (cognitive 37) compiler/src/dotty/tools/dotc/core/Types.scala:5396— MatchTypeCaseSpec.tryConvertToSpecPattern has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (23 pts), match/switch 5 (10 pts), boolean chains 4 (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.
Parser.simpleTypeRest (cognitive 37) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:2306— Parser.simpleTypeRest has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (21 pts), match/switch 5 (16 pts) (nesting depth added 20). 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.
Translator.emitCondition (cognitive 37) compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala:826— Translator.emitCondition has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (28 pts), match/switch 4 (8 pts), boolean chains 1 (nesting depth added 17). 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.
SpaceEngine.decompose (cognitive 37) compiler/src/dotty/tools/dotc/transform/patmat/Space.scala:678— SpaceEngine.decompose has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (22 pts), match/switch 4 (8 pts), boolean chains 7 (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.
Symbols.mapSymbols (cognitive 36) compiler/src/dotty/tools/dotc/core/Symbols.scala:910— Symbols.mapSymbols has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 3 (8 pts), match/switch 3 (8 pts), boolean chains 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TypeOps.simplify (cognitive 36) compiler/src/dotty/tools/dotc/core/TypeOps.scala:132— TypeOps.simplify has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18 (24 pts), match/switch 4 (8 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Semantic.cases (cognitive 36) compiler/src/dotty/tools/dotc/transform/init/Semantic.scala:1256— Semantic.cases has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (23 pts), match/switch 6 (13 pts) (nesting depth added 16). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SpaceEngine.display (cognitive 36) compiler/src/dotty/tools/dotc/transform/patmat/Space.scala:871— SpaceEngine.display has cognitive complexity 36 (threshold 15). Drivers by points: if/else 20 (29 pts), match/switch 2 (4 pts), boolean chains 3 (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.
MemberLookup.downwardLookup (cognitive 36) scaladoc/src/dotty/tools/scaladoc/tasty/comments/MemberLookup.scala:174— MemberLookup.downwardLookup has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (22 pts), match/switch 4 (10 pts), boolean chains 4 (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.
JavaParser.varDecl (cognitive 35) compiler/src/dotty/tools/dotc/parsing/JavaParsers.scala:737— JavaParser.varDecl has cognitive complexity 35 (threshold 15). Drivers by points: if/else 18 (26 pts), match/switch 2 (5 pts), boolean chains 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
QuotePatterns.checkPattern (cognitive 35) compiler/src/dotty/tools/dotc/quoted/QuotePatterns.scala:29— QuotePatterns.checkPattern has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (24 pts), match/switch 4 (5 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CannotBeAccessed.msg (cognitive 35) compiler/src/dotty/tools/dotc/reporting/messages.scala:3302— CannotBeAccessed.msg has cognitive complexity 35 (threshold 15). Drivers by points: if/else 19 (30 pts), boolean chains 3, loops 1, 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.
SymbolInformationProvider.info (cognitive 35) presentation-compiler/src/main/dotty/tools/pc/SymbolInformationProvider.scala:23— SymbolInformationProvider.info has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (29 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ExpressionTransformer.transform (cognitive 34) compiler/src/dotty/tools/debug/ResolveReflectEval.scala:43— ExpressionTransformer.transform has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (27 pts), match/switch 3 (6 pts), boolean chains 1 (nesting depth added 16). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
RefInfos.register (cognitive 34) compiler/src/dotty/tools/dotc/transform/CheckUnused.scala:578— RefInfos.register has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 3, match/switch 1 (nesting depth added 16). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Checking.checkEnum (cognitive 34) compiler/src/dotty/tools/dotc/typer/Checking.scala:1557— Checking.checkEnum has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 8, 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.
SearchRoot.emitDictionary (cognitive 34) compiler/src/dotty/tools/dotc/typer/Implicits.scala:2070— SearchRoot.emitDictionary has cognitive complexity 34 (threshold 15). Drivers by points: match/switch 5 (17 pts), if/else 11 (16 pts), boolean chains 1 (nesting depth added 17). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Typer.typedBind (cognitive 34) compiler/src/dotty/tools/dotc/typer/Typer.scala:2973— Typer.typedBind has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 10, match/switch 2 (5 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.
CompletionProvider.completionItems (cognitive 34) presentation-compiler/src/main/dotty/tools/pc/completions/CompletionProvider.scala:204— CompletionProvider.completionItems has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16, match/switch 8 (13 pts), error handling 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
VarInTypeTree.normalizeLocalCaps (cognitive 33) compiler/src/dotty/tools/dotc/cc/CaptureSet.scala:1098— VarInTypeTree.normalizeLocalCaps has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (25 pts), match/switch 2 (5 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
PositionPickler.picklePositions (cognitive 33) compiler/src/dotty/tools/dotc/core/tasty/PositionPickler.scala:32— PositionPickler.picklePositions has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (21 pts), loops 5 (6 pts), match/switch 3 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Interactive.contextOfPath (cognitive 33) compiler/src/dotty/tools/dotc/interactive/Interactive.scala:213— Interactive.contextOfPath has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 4 (9 pts), loops 2 (7 pts), error handling 1 (2 pts) (nesting depth added 17). 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.
Parser.patDefOrDcl (cognitive 33) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:4324— Parser.patDefOrDcl has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (19 pts), match/switch 5 (9 pts), boolean chains 5 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PickleQuotes.pickle (cognitive 33) compiler/src/dotty/tools/dotc/transform/PickleQuotes.scala:214— PickleQuotes.pickle has cognitive complexity 33 (threshold 15). Drivers by points: if/else 22 (23 pts), match/switch 6 (8 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Trace.buildStacktrace (cognitive 33) compiler/src/dotty/tools/dotc/transform/init/Trace.scala:54— Trace.buildStacktrace has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (26 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StringContext.glob (cognitive 33) library/src/scala/StringContext.scala:218— StringContext.glob has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (18 pts), match/switch 4 (11 pts), boolean chains 3, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HtmlRenderer.buildNavigation (cognitive 33) scaladoc/src/dotty/tools/scaladoc/renderers/HtmlRenderer.scala:134— HtmlRenderer.buildNavigation has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18 (21 pts), boolean chains 6, match/switch 6 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Parser.table (cognitive 33) scaladoc/src/dotty/tools/scaladoc/tasty/comments/wiki/Parser.scala:157— Parser.table has cognitive complexity 33 (threshold 15). Drivers by points: if/else 24 (27 pts), match/switch 2 (3 pts), boolean chains 2, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
OrderingConstraint.validBoundFor (cognitive 32) compiler/src/dotty/tools/dotc/core/OrderingConstraint.scala:537— OrderingConstraint.validBoundFor has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (27 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
OrderingConstraint.checkWellFormed (cognitive 32) compiler/src/dotty/tools/dotc/core/OrderingConstraint.scala:910— OrderingConstraint.checkWellFormed has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (18 pts), match/switch 4 (8 pts), boolean chains 5, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InfoPrinter.pprint (cognitive 32) compiler/src/dotty/tools/dotc/semanticdb/PPrint.scala:100— InfoPrinter.pprint has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (24 pts), match/switch 3 (7 pts), boolean chains 1 (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Implicits.inferImplicit (cognitive 32) compiler/src/dotty/tools/dotc/typer/Implicits.scala:1100— Implicits.inferImplicit has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 4, match/switch 2 (4 pts), loops 1 (3 pts), error handling 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ImportInfo.importedImplicits (cognitive 32) compiler/src/dotty/tools/dotc/typer/ImportInfo.scala:125— ImportInfo.importedImplicits has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (25 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Namer.valOrDefDefSig (cognitive 32) compiler/src/dotty/tools/dotc/typer/Namer.scala:1943— Namer.valOrDefDefSig has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (17 pts), match/switch 6 (12 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DoubleAccumulatorStepper.spliterator (cognitive 32) library/src/scala/jdk/DoubleAccumulator.scala:452— DoubleAccumulatorStepper.spliterator has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 4 (8 pts), match/switch 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IntAccumulatorStepper.spliterator (cognitive 32) library/src/scala/jdk/IntAccumulator.scala:458— IntAccumulatorStepper.spliterator has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 4 (8 pts), match/switch 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LongAccumulatorStepper.spliterator (cognitive 32) library/src/scala/jdk/LongAccumulator.scala:453— LongAccumulatorStepper.spliterator has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 4 (8 pts), match/switch 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JSCodeGen.genLinkTimeExpr (cognitive 31) compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala:4403— JSCodeGen.genLinkTimeExpr has cognitive complexity 31 (threshold 15). Drivers by points: match/switch 8 (26 pts), if/else 5 (nesting depth added 18). 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.
SepCheck.checkConsumedRefs (cognitive 31) compiler/src/dotty/tools/dotc/cc/SepCheck.scala:700— SepCheck.checkConsumedRefs has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (20 pts), match/switch 3 (6 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.
MethodOrPoly.signature (cognitive 31) compiler/src/dotty/tools/dotc/core/Types.scala:3961— MethodOrPoly.signature has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (22 pts), match/switch 4 (6 pts), boolean chains 3 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ByteCodecs.decode7to8 (cognitive 31) compiler/src/dotty/tools/dotc/core/classfile/ByteCodecs.scala:128— ByteCodecs.decode7to8 has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (30 pts), loops 1 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
PickledQuotes.spliceTypes (cognitive 31) compiler/src/dotty/tools/dotc/quoted/PickledQuotes.scala:161— PickledQuotes.spliceTypes has cognitive complexity 31 (threshold 15). Drivers by points: match/switch 6 (21 pts), if/else 7 (10 pts) (nesting depth added 18). 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.
AlreadyDefined.msg (cognitive 31) compiler/src/dotty/tools/dotc/reporting/messages.scala:2157— AlreadyDefined.msg has cognitive complexity 31 (threshold 15). Drivers by points: if/else 21 (26 pts), boolean chains 4, match/switch 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
SemanticSymbolBuilder.addSymName (cognitive 31) compiler/src/dotty/tools/dotc/semanticdb/SemanticSymbolBuilder.scala:214— SemanticSymbolBuilder.addSymName has cognitive complexity 31 (threshold 15). Drivers by points: if/else 19 (22 pts), boolean chains 6, match/switch 2, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
Typer.typedDefDef (cognitive 31) compiler/src/dotty/tools/dotc/transform/Erasure.scala:983— Typer.typedDefDef has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (20 pts), match/switch 2 (5 pts), loops 1 (4 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExtensionMethods.transform (cognitive 31) compiler/src/dotty/tools/dotc/transform/ExtensionMethods.scala:58— ExtensionMethods.transform has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (17 pts), match/switch 4 (8 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
DropForMap.transformInlined (cognitive 31) compiler/src/dotty/tools/dotc/transform/localopt/DropForMap.scala:66— DropForMap.transformInlined has cognitive complexity 31 (threshold 15). Drivers by points: match/switch 5 (16 pts), if/else 10 (15 pts) (nesting depth added 16). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SpaceEngine.computeSimplify (cognitive 31) compiler/src/dotty/tools/dotc/transform/patmat/Space.scala:127— SpaceEngine.computeSimplify has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (22 pts), match/switch 3 (8 pts), boolean chains 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.
Signatures.toApplySignature (cognitive 31) compiler/src/dotty/tools/dotc/util/Signatures.scala:483— Signatures.toApplySignature has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13, match/switch 10 (13 pts), boolean chains 5 (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.
PcCollector.traverseSought (cognitive 31) presentation-compiler/src/main/dotty/tools/pc/PcCollector.scala:85— PcCollector.traverseSought has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 8, match/switch 4 (8 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ReplDriver.renderDefinitions (cognitive 31) repl/src/dotty/tools/repl/ReplDriver.scala:523— ReplDriver.renderDefinitions has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (18 pts), match/switch 3 (6 pts), boolean chains 5, 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.
InkuireSupport.doInkuireStuff (cognitive 31) scaladoc/src/dotty/tools/scaladoc/tasty/InkuireSupport.scala:26— InkuireSupport.doInkuireStuff has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 8 (13 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PlainBodyBuilder.genStringConcat (cognitive 30) compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala:1371— PlainBodyBuilder.genStringConcat has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 4 (8 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
PlainBodyBuilder.genCZJUMP (cognitive 30) compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala:1545— PlainBodyBuilder.genCZJUMP has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (22 pts), match/switch 2 (6 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PlainSkelBuilder.genPlainClass (cognitive 30) compiler/src/dotty/tools/backend/jvm/BCodeSkelBuilder.scala:164— PlainSkelBuilder.genPlainClass has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (20 pts), match/switch 3 (7 pts), boolean chains 3 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
NamedType.computeDenot (cognitive 30) compiler/src/dotty/tools/dotc/core/Types.scala:2479— NamedType.computeDenot has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 6, match/switch 3 (5 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NamedType.derivedSelect (cognitive 30) compiler/src/dotty/tools/dotc/core/Types.scala:2830— NamedType.derivedSelect has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (21 pts), match/switch 2 (7 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JavaParser.termDecl (cognitive 30) compiler/src/dotty/tools/dotc/parsing/JavaParsers.scala:612— JavaParser.termDecl has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 5, 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.
SpaceEngine.checkReachability (cognitive 30) compiler/src/dotty/tools/dotc/transform/patmat/Space.scala:1119— SpaceEngine.checkReachability has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 7, loops 1 (3 pts), match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TypeAssigner.assignType (cognitive 30) compiler/src/dotty/tools/dotc/typer/TypeAssigner.scala:342— TypeAssigner.assignType has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (23 pts), match/switch 2 (4 pts), loops 1 (3 pts) (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Typer.typedClosure (cognitive 30) compiler/src/dotty/tools/dotc/typer/Typer.scala:2177— Typer.typedClosure has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (24 pts), match/switch 2 (5 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.
Typer.typedPackageDef (cognitive 30) compiler/src/dotty/tools/dotc/typer/Typer.scala:3742— Typer.typedPackageDef has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 4, loops 1 (4 pts), match/switch 2 (4 pts) (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
AutoImports.autoImportPosition (cognitive 30) presentation-compiler/src/main/dotty/tools/pc/AutoImports.scala:281— AutoImports.autoImportPosition has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (17 pts), match/switch 7 (9 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Parameters.unapply (cognitive 30) presentation-compiler/src/main/dotty/tools/pc/PcInlayHintsProvider.scala:464— Parameters.unapply has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (13 pts), match/switch 6 (10 pts), boolean chains 7 (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.
Completions.completionsWithAffix (cognitive 30) presentation-compiler/src/main/dotty/tools/pc/completions/Completions.scala:293— Completions.completionsWithAffix has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 8, match/switch 1 (2 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CaptureChecker.recheckValDef (cognitive 29) compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala:1293— CaptureChecker.recheckValDef has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (19 pts), match/switch 2 (8 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.
SepCheck.checkUse (cognitive 29) compiler/src/dotty/tools/dotc/cc/SepCheck.scala:629— SepCheck.checkUse has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (17 pts), match/switch 3 (9 pts), loops 1 (2 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.
Constant.convertTo (cognitive 29) compiler/src/dotty/tools/dotc/core/Constants.scala:151— Constant.convertTo has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 8, match/switch 3 (4 pts) (nesting depth added 4). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
TypeErasure.sigName (cognitive 29) compiler/src/dotty/tools/dotc/core/TypeErasure.scala:1115— TypeErasure.sigName has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (27 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.
Type.classSymbol (cognitive 29) compiler/src/dotty/tools/dotc/core/Types.scala:630— Type.classSymbol has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (24 pts), match/switch 2 (3 pts), boolean chains 2 (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.
TreeReader.scanTree (cognitive 29) compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala:204— TreeReader.scanTree has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 3 (10 pts), match/switch 1 (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
TreeReader.createMemberSymbol (cognitive 29) compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala:642— TreeReader.createMemberSymbol has cognitive complexity 29 (threshold 15). Drivers by points: if/else 18 (20 pts), boolean chains 7, match/switch 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
Parser.simpleExprRest (cognitive 29) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:3062— Parser.simpleExprRest has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 5 (12 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Interpreter.paramsSig (cognitive 29) compiler/src/dotty/tools/dotc/quoted/Interpreter.scala:270— Interpreter.paramsSig has cognitive complexity 29 (threshold 15). Drivers by points: if/else 24 (25 pts), match/switch 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.
CannotBeIncluded.msg (cognitive 29) compiler/src/dotty/tools/dotc/reporting/messages.scala:3834— CannotBeIncluded.msg has cognitive complexity 29 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 5, match/switch 2 (3 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
CheckNoSuperThis.transformDefDef (cognitive 29) compiler/src/dotty/tools/dotc/transform/CheckNoSuperThis.scala:26— CheckNoSuperThis.transformDefDef has cognitive complexity 29 (threshold 15). Drivers by points: match/switch 4 (16 pts), if/else 5, boolean chains 4, loops 1 (4 pts) (nesting depth added 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SpaceEngine.signature (cognitive 29) compiler/src/dotty/tools/dotc/transform/patmat/Space.scala:579— SpaceEngine.signature has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (24 pts), match/switch 3 (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.
Inferencing.instDecision (cognitive 29) compiler/src/dotty/tools/dotc/typer/Inferencing.scala:444— Inferencing.instDecision has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PcSemanticTokensProvider.makeNode (cognitive 29) presentation-compiler/src/main/dotty/tools/pc/PcSemanticTokensProvider.scala:91— PcSemanticTokensProvider.makeNode has cognitive complexity 29 (threshold 15). Drivers by points: if/else 20 (21 pts), boolean chains 8 (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.
Completions.findSuffix (cognitive 29) presentation-compiler/src/main/dotty/tools/pc/completions/Completions.scala:243— Completions.findSuffix has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 5, match/switch 3 (5 pts), error handling 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Completions.computeRelevancePenalty (cognitive 29) presentation-compiler/src/main/dotty/tools/pc/completions/Completions.scala:825— Completions.computeRelevancePenalty has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 9, match/switch 3, error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ParseResult.mixesCommandsAndDirectives (cognitive 29) repl/src/dotty/tools/repl/ParseResult.scala:309— ParseResult.mixesCommandsAndDirectives has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 3, match/switch 1 (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.
PrimitiveBType.maxValueType (cognitive 28) compiler/src/dotty/tools/backend/jvm/BTypes.scala:232— PrimitiveBType.maxValueType has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (18 pts), match/switch 6 (10 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
AliasingFrame.merge (cognitive 28) compiler/src/dotty/tools/backend/jvm/analysis/AliasingAnalyzer.scala:294— AliasingFrame.merge has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 2 (7 pts), boolean chains 1 (nesting depth added 19). 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.
JSCodeGen.genClosure (cognitive 28) compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala:3673— JSCodeGen.genClosure has cognitive complexity 28 (threshold 15). Drivers by points: if/else 22 (23 pts), boolean chains 4, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CaptureChecker.testAdapted (cognitive 28) compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala:1787— CaptureChecker.testAdapted has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (19 pts), match/switch 3 (5 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ClassSymbol.sourceOfClass (cognitive 28) compiler/src/dotty/tools/dotc/core/Symbols.scala:511— ClassSymbol.sourceOfClass has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 3 (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.
LocalUnpickler.complete (cognitive 28) compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala:618— LocalUnpickler.complete has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (22 pts), match/switch 2 (3 pts), boolean chains 2, error handling 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.
JavaParser.compilationUnit (cognitive 28) compiler/src/dotty/tools/dotc/parsing/JavaParsers.scala:1119— JavaParser.compilationUnit has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (19 pts), loops 3 (5 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
PlainPrinter.toTextRHS (cognitive 28) compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala:590— PlainPrinter.toTextRHS has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (19 pts), match/switch 3 (5 pts), boolean chains 4 (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.
RefinedPrinter.toTextTemplate (cognitive 28) compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala:1088— RefinedPrinter.toTextTemplate has cognitive complexity 28 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
QuotePatterns.decode (cognitive 28) compiler/src/dotty/tools/dotc/quoted/QuotePatterns.scala:292— QuotePatterns.decode has cognitive complexity 28 (threshold 15). Drivers by points: match/switch 8 (13 pts), if/else 7 (12 pts), loops 1 (3 pts) (nesting depth added 12). 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.
ActiveProfile.printSummary (cognitive 28) compiler/src/dotty/tools/dotc/reporting/Profile.scala:75— ActiveProfile.printSummary has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (18 pts), loops 5 (9 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
DoubleDefinition.msg (cognitive 28) compiler/src/dotty/tools/dotc/reporting/messages.scala:2446— DoubleDefinition.msg has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 5, match/switch 2 (4 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Dependencies.markFree (cognitive 28) compiler/src/dotty/tools/dotc/transform/Dependencies.scala:134— Dependencies.markFree has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 3, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Dependencies.process (cognitive 28) compiler/src/dotty/tools/dotc/transform/Dependencies.scala:176— Dependencies.process has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 8, match/switch 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExplicitOuter.referencesOuter (cognitive 28) compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala:279— ExplicitOuter.referencesOuter has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 10, match/switch 6 (7 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.
ImplicitRunInfo.implicitScope (cognitive 28) compiler/src/dotty/tools/dotc/typer/Implicits.scala:820— ImplicitRunInfo.implicitScope has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (20 pts), match/switch 3 (6 pts), boolean chains 2 (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.
Nullables.assignmentSpans (cognitive 28) compiler/src/dotty/tools/dotc/typer/Nullables.scala:467— Nullables.assignmentSpans has cognitive complexity 28 (threshold 15). Drivers by points: loops 4 (12 pts), match/switch 4 (9 pts), if/else 5 (7 pts) (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Synthesizer.manifestFactoryOf (cognitive 28) compiler/src/dotty/tools/dotc/typer/Synthesizer.scala:716— Synthesizer.manifestFactoryOf has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (16 pts), match/switch 6 (8 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Typer.typedCBSelect (cognitive 28) compiler/src/dotty/tools/dotc/typer/Typer.scala:1039— Typer.typedCBSelect has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (19 pts), match/switch 4 (8 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.
Typer.decomposeProtoFunction (cognitive 28) compiler/src/dotty/tools/dotc/typer/Typer.scala:1748— Typer.decomposeProtoFunction has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (16 pts), match/switch 6 (10 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CompletionItemResolver.fullDocstring (cognitive 28) presentation-compiler/src/main/dotty/tools/pc/CompletionItemResolver.scala:46— CompletionItemResolver.fullDocstring has cognitive complexity 28 (threshold 15). Drivers by points: if/else 17 (21 pts), match/switch 1 (4 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
PcDefinitionProvider.locationsForSymbol (cognitive 28) presentation-compiler/src/main/dotty/tools/pc/PcDefinitionProvider.scala:135— PcDefinitionProvider.locationsForSymbol has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (22 pts), match/switch 2 (6 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PcInlayHintsProvider.collectDecorationsImpl (cognitive 28) presentation-compiler/src/main/dotty/tools/pc/PcInlayHintsProvider.scala:75— PcInlayHintsProvider.collectDecorationsImpl has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (19 pts), match/switch 4 (5 pts), boolean chains 4 (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.
PlainBodyBuilder.genCJUMP (cognitive 27) compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala:1524— PlainBodyBuilder.genCJUMP has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (22 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AliasingFrame.init (cognitive 27) compiler/src/dotty/tools/backend/jvm/analysis/AliasingAnalyzer.scala:356— AliasingFrame.init has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (26 pts), loops 1 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
GlobalOptimizer.collectAndOrderInlineRequests (cognitive 27) compiler/src/dotty/tools/backend/jvm/opt/Inliner.scala:277— GlobalOptimizer.collectAndOrderInlineRequests has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (24 pts), loops 2, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tpd.DefDef (cognitive 27) compiler/src/dotty/tools/dotc/ast/tpd.scala:264— tpd.DefDef has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (19 pts), match/switch 3 (6 pts), boolean chains 2 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Inliner.inlined (cognitive 27) compiler/src/dotty/tools/dotc/inlines/Inliner.scala:784— Inliner.inlined has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (17 pts), match/switch 5 (6 pts), loops 2 (4 pts) (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Parser.indentedToBraces (cognitive 27) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:750— Parser.indentedToBraces has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 7, match/switch 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.
Parser.simpleType (cognitive 27) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:2235— Parser.simpleType has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 5 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Scanner.postProcessToken (cognitive 27) compiler/src/dotty/tools/dotc/parsing/Scanners.scala:756— Scanner.postProcessToken has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Utility.parseAttributeValue (cognitive 27) compiler/src/dotty/tools/dotc/parsing/xml/Utility.scala:33— Utility.parseAttributeValue has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (5 pts), match/switch 1 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SemanticSymbolBuilder.inverseSymbol (cognitive 27) compiler/src/dotty/tools/dotc/semanticdb/SemanticSymbolBuilder.scala:107— SemanticSymbolBuilder.inverseSymbol has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (17 pts), match/switch 2 (5 pts), error handling 2 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CheckInlineTraits.transformBlock (cognitive 27) compiler/src/dotty/tools/dotc/transform/CheckInlineTraits.scala:100— CheckInlineTraits.transformBlock has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (17 pts), match/switch 4 (9 pts), boolean chains 1 (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
InlineVals.checkInlineConformant (cognitive 27) compiler/src/dotty/tools/dotc/transform/InlineVals.scala:31— InlineVals.checkInlineConformant has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (22 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.
QuotesAndSplices.typedQuotePattern (cognitive 27) compiler/src/dotty/tools/dotc/typer/QuotesAndSplices.scala:247— QuotesAndSplices.typedQuotePattern has cognitive complexity 27 (threshold 15). Drivers by points: if/else 17 (18 pts), loops 3 (4 pts), match/switch 3, 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.
Typer.typedFunctionType (cognitive 27) compiler/src/dotty/tools/dotc/typer/Typer.scala:1844— Typer.typedFunctionType has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (19 pts), match/switch 5 (7 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
AnyAccumulator.drain (cognitive 27) library/src/scala/jdk/AnyAccumulator.scala:87— AnyAccumulator.drain has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 3, 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.
DoubleAccumulator.drain (cognitive 27) library/src/scala/jdk/DoubleAccumulator.scala:85— DoubleAccumulator.drain has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 3, 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.
IntAccumulator.drain (cognitive 27) library/src/scala/jdk/IntAccumulator.scala:88— IntAccumulator.drain has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 3, 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.
LongAccumulator.drain (cognitive 27) library/src/scala/jdk/LongAccumulator.scala:86— LongAccumulator.drain has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 3, 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.
HoverProvider.fallbackToDynamics (cognitive 27) presentation-compiler/src/main/dotty/tools/pc/HoverProvider.scala:209— HoverProvider.fallbackToDynamics has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (17 pts), match/switch 4 (8 pts), boolean chains 2 (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.
NamedArgCompletions.contribute (cognitive 27) presentation-compiler/src/main/dotty/tools/pc/completions/NamedArgCompletions.scala:57— NamedArgCompletions.contribute has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11, match/switch 7 (10 pts), boolean chains 6 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PlainBodyBuilder.genArithmeticOp (cognitive 26) compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala:135— PlainBodyBuilder.genArithmeticOp has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 4 (9 pts), boolean chains 3 (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.
BoxUnbox.checkCopyOpReplacements (cognitive 26) compiler/src/dotty/tools/backend/jvm/opt/BoxUnbox.scala:508— BoxUnbox.checkCopyOpReplacements has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (20 pts), match/switch 2 (3 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TreeInfo.isThisTypeResult (cognitive 26) compiler/src/dotty/tools/dotc/ast/TreeInfo.scala:383— TreeInfo.isThisTypeResult has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 6 (15 pts), if/else 6, boolean chains 5 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ConstraintHandling.addConstraint (cognitive 26) compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala:833— ConstraintHandling.addConstraint has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 5, match/switch 3 (4 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.
SingleDenotation.current (cognitive 26) compiler/src/dotty/tools/dotc/core/Denotations.scala:801— SingleDenotation.current has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (22 pts), loops 2, 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.
SymbolLoaders.enterToplevelsFromSource (cognitive 26) compiler/src/dotty/tools/dotc/core/SymbolLoaders.scala:134— SymbolLoaders.enterToplevelsFromSource has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 3 (6 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AsSeenFromMap.apply (cognitive 26) compiler/src/dotty/tools/dotc/core/TypeOps.scala:69— AsSeenFromMap.apply has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 6, match/switch 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MatchType.reduced (cognitive 26) compiler/src/dotty/tools/dotc/core/Types.scala:5195— MatchType.reduced has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (18 pts), match/switch 2 (3 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PositionUnpickler.ensureDefined (cognitive 26) compiler/src/dotty/tools/dotc/core/tasty/PositionUnpickler.scala:24— PositionUnpickler.ensureDefined has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 2 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InlineReducer.reduceProjection (cognitive 26) compiler/src/dotty/tools/dotc/inlines/InlineReducer.scala:86— InlineReducer.reduceProjection has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Inliner.expandMacro (cognitive 26) compiler/src/dotty/tools/dotc/inlines/Inliner.scala:1396— Inliner.expandMacro has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 3, loops 1 (2 pts), match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JavaScanner.intVal (cognitive 26) compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala:630— JavaScanner.intVal has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 4, 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.
Parser.typeDefOrDcl (cognitive 26) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:4486— Parser.typeDefOrDcl has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (13 pts), match/switch 4 (10 pts), boolean chains 3 (nesting depth added 9). 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.
Splicer.checkValidMacroBody (cognitive 26) compiler/src/dotty/tools/dotc/transform/Splicer.scala:158— Splicer.checkValidMacroBody has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 5 (10 pts), boolean chains 4 (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.
Semantic.init (cognitive 26) compiler/src/dotty/tools/dotc/transform/init/Semantic.scala:1542— Semantic.init has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 5, match/switch 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.
ExplicitJSClasses.transformTemplate (cognitive 26) compiler/src/dotty/tools/dotc/transform/sjs/ExplicitJSClasses.scala:447— ExplicitJSClasses.transformTemplate has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (19 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Checking.checkEnumCaseRefsLegal (cognitive 26) compiler/src/dotty/tools/dotc/typer/Checking.scala:1639— Checking.checkEnumCaseRefsLegal has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 5 (10 pts), if/else 7, loops 3 (7 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.
Implicits.missingArgMsg (cognitive 26) compiler/src/dotty/tools/dotc/typer/Implicits.scala:970— Implicits.missingArgMsg has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (12 pts), match/switch 5 (10 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Symbol.newClass (cognitive 26) compiler/src/scala/quoted/runtime/impl/QuotesImpl.scala:2802— Symbol.newClass has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 4 (5 pts), boolean chains 4, 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.
Parser.parse (cognitive 26) directives-parser/src/main/scala/dotty/tools/directives/Parser.scala:19— Parser.parse has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (17 pts), match/switch 6 (9 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
WithCompilationUnit.symbolAlternatives (cognitive 26) presentation-compiler/src/main/dotty/tools/pc/WithCompilationUnit.scala:46— WithCompilationUnit.symbolAlternatives has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 4, loops 2 (3 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.
Resources.searchData (cognitive 26) scaladoc/src/dotty/tools/scaladoc/renderers/Resources.scala:120— Resources.searchData has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (17 pts), match/switch 6 (7 pts), boolean chains 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.
PlainBodyBuilder.genCond (cognitive 25) compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala:1589— PlainBodyBuilder.genCond has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (20 pts), match/switch 3 (4 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
PlainBodyBuilder.genInvokeDynamicLambda (cognitive 25) compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala:1760— PlainBodyBuilder.genInvokeDynamicLambda has cognitive complexity 25 (threshold 15). Drivers by points: if/else 19 (20 pts), boolean chains 4, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
GlobalOptimizer.run (cognitive 25) compiler/src/dotty/tools/backend/jvm/opt/Inliner.scala:37— GlobalOptimizer.run has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 4 (5 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JSCodeGen.genNonNativeJSClass (cognitive 25) compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala:572— JSCodeGen.genNonNativeJSClass has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
suppressions.runFinished (cognitive 25) compiler/src/dotty/tools/dotc/Run.scala:146— suppressions.runFinished has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 3 (9 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.
Denotations.staticRef (cognitive 25) compiler/src/dotty/tools/dotc/core/Denotations.scala:1324— Denotations.staticRef has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClassDenotation.computeMemberNames (cognitive 25) compiler/src/dotty/tools/dotc/core/SymDenotations.scala:2536— ClassDenotation.computeMemberNames has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 5 (10 pts), match/switch 1 (2 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.
Type.dealias (cognitive 25) compiler/src/dotty/tools/dotc/core/Types.scala:1547— Type.dealias has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (15 pts), match/switch 3 (7 pts), boolean chains 3 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ClassfileParser.parseAnnotArg (cognitive 25) compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala:805— ClassfileParser.parseAnnotArg has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (19 pts), match/switch 2 (4 pts), loops 1 (2 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
JavaParser.annotation (cognitive 25) compiler/src/dotty/tools/dotc/parsing/JavaParsers.scala:381— JavaParser.annotation has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (13 pts), match/switch 3 (5 pts), loops 2 (4 pts), boolean chains 3 (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.
Parser.infixOps (cognitive 25) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:1235— Parser.infixOps has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 7, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Scanner.getFraction (cognitive 25) compiler/src/dotty/tools/dotc/parsing/Scanners.scala:1488— Scanner.getFraction has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 11, if/else 6 (10 pts), loops 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MessageRendering.messageAndPos (cognitive 25) compiler/src/dotty/tools/dotc/reporting/MessageRendering.scala:270— MessageRendering.messageAndPos has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CheckUnused.transformOther (cognitive 25) compiler/src/dotty/tools/dotc/transform/CheckUnused.scala:254— CheckUnused.transformOther has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 4 (10 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Mixin.transformSym (cognitive 25) compiler/src/dotty/tools/dotc/transform/Mixin.scala:162— Mixin.transformSym has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PostTyperTransformer.processValOrDefDef (cognitive 25) compiler/src/dotty/tools/dotc/transform/PostTyper.scala:263— PostTyperTransformer.processValOrDefDef has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 3, 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.
Checking.checkNoPrivateLeaks (cognitive 25) compiler/src/dotty/tools/dotc/typer/Checking.scala:761— Checking.checkNoPrivateLeaks has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 7, match/switch 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Checking.checkAndAdaptExperimentalImports (cognitive 25) compiler/src/dotty/tools/dotc/typer/Checking.scala:925— Checking.checkAndAdaptExperimentalImports has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9, match/switch 5 (9 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Deriver.processDerivedInstance (cognitive 25) compiler/src/dotty/tools/dotc/typer/Deriving.scala:93— Deriver.processDerivedInstance has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 4, loops 2, 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.
Inferencing.couldInstantiateTypeVar (cognitive 25) compiler/src/dotty/tools/dotc/typer/Inferencing.scala:95— Inferencing.couldInstantiateTypeVar has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 5 (15 pts), if/else 6 (7 pts), boolean chains 3 (nesting depth added 11). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ProtoTypes.normalize (cognitive 25) compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala:912— ProtoTypes.normalize has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (19 pts), match/switch 2 (4 pts), boolean chains 2 (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.
Signatures.applyCallInfo (cognitive 25) compiler/src/dotty/tools/dotc/util/Signatures.scala:200— Signatures.applyCallInfo has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (16 pts), match/switch 5 (8 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.
StringParsers.parseLong (cognitive 25) library/src/scala/collection/StringParsers.scala:140— StringParsers.parseLong has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
DefaultPromise.zipWith (cognitive 25) library/src/scala/concurrent/impl/Promise.scala:146— DefaultPromise.zipWith has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (13 pts), error handling 2 (8 pts), match/switch 2 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OverrideCompletions.implementAllFor (cognitive 25) presentation-compiler/src/main/dotty/tools/pc/completions/OverrideCompletions.scala:218— OverrideCompletions.implementAllFor has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 5, 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.
ShortenedTypePrinter.defaultMethodSignature (cognitive 25) presentation-compiler/src/main/dotty/tools/pc/printer/ShortenedTypePrinter.scala:286— ShortenedTypePrinter.defaultMethodSignature has cognitive complexity 25 (threshold 15). Drivers by points: if/else 20 (23 pts), match/switch 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
BCSignatureGen.getGenericSignature (cognitive 24) compiler/src/dotty/tools/backend/jvm/BCodeHelpers.scala:484— BCSignatureGen.getGenericSignature has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (17 pts), match/switch 2 (5 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PlainSkelBuilder.initJClass (cognitive 24) compiler/src/dotty/tools/backend/jvm/BCodeSkelBuilder.scala:383— PlainSkelBuilder.initJClass has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 4, 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.
PrimitiveBox.checkPrimitiveBox (cognitive 24) compiler/src/dotty/tools/backend/jvm/opt/BoxUnbox.scala:684— PrimitiveBox.checkPrimitiveBox has cognitive complexity 24 (threshold 15). Drivers by points: loops 4 (12 pts), if/else 6 (8 pts), boolean chains 2, match/switch 2 (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.
CopyProp.copyPropagation (cognitive 24) compiler/src/dotty/tools/backend/jvm/opt/CopyProp.scala:41— CopyProp.copyPropagation has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 3, loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NamerOps.addConstructorProxies (cognitive 24) compiler/src/dotty/tools/dotc/core/NamerOps.scala:239— NamerOps.addConstructorProxies has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 2 (7 pts), boolean chains 3, 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.
PatternTypeConstrainer.constrainSimplePatternType (cognitive 24) compiler/src/dotty/tools/dotc/core/PatternTypeConstrainer.scala:229— PatternTypeConstrainer.constrainSimplePatternType has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 4, 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.
Symbol.sourceSymbol (cognitive 24) compiler/src/dotty/tools/dotc/core/Symbols.scala:336— Symbol.sourceSymbol has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (16 pts), match/switch 3 (6 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
TypeApplications.translateParameterized (cognitive 24) compiler/src/dotty/tools/dotc/core/TypeApplications.scala:513— TypeApplications.translateParameterized has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (20 pts), match/switch 2 (4 pts) (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
TypeComparer.distributeAnd (cognitive 24) compiler/src/dotty/tools/dotc/core/TypeComparer.scala:2886— TypeComparer.distributeAnd has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (16 pts), match/switch 4 (7 pts), boolean chains 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ByteCodecs.encode8to7 (cognitive 24) compiler/src/dotty/tools/dotc/core/classfile/ByteCodecs.scala:62— ByteCodecs.encode8to7 has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (23 pts), loops 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.
Inliner.paramBindingDef (cognitive 24) compiler/src/dotty/tools/dotc/inlines/Inliner.scala:322— Inliner.paramBindingDef has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16 (18 pts), match/switch 3 (5 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Parser.followingIsLambdaAfterColon (cognitive 24) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:1111— Parser.followingIsLambdaAfterColon has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 6, match/switch 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.mkImport (cognitive 24) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:4161— Parser.mkImport has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 2 (6 pts), boolean chains 2, loops 1 (2 pts) (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.
PlainPrinter.kindString (cognitive 24) compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala:639— PlainPrinter.kindString has cognitive complexity 24 (threshold 15). Drivers by points: if/else 22 (23 pts), boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
InfoPrinter.pprint (cognitive 24) compiler/src/dotty/tools/dotc/semanticdb/PPrint.scala:37— InfoPrinter.pprint has cognitive complexity 24 (threshold 15). Drivers by points: if/else 22, match/switch 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.
Translator.emit (cognitive 24) compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala:1015— Translator.emit has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 4 (8 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Checker.withDefinedSyms (cognitive 24) compiler/src/dotty/tools/dotc/transform/TreeChecker.scala:288— Checker.withDefinedSyms has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 3 (9 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Objects.init (cognitive 24) compiler/src/dotty/tools/dotc/transform/init/Objects.scala:2112— Objects.init has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (17 pts), match/switch 4 (5 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
SpaceEngine.minus (cognitive 24) compiler/src/dotty/tools/dotc/transform/patmat/Space.scala:269— SpaceEngine.minus has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 3, match/switch 1 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
PrepJSExports.checkExportTarget (cognitive 24) compiler/src/dotty/tools/dotc/transform/sjs/PrepJSExports.scala:322— PrepJSExports.checkExportTarget has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 9 (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.
ScalaJSPrepJSInteropTransformer.transformStatOrExpr (cognitive 24) compiler/src/dotty/tools/dotc/transform/sjs/PrepJSInterop.scala:270— ScalaJSPrepJSInteropTransformer.transformStatOrExpr has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 3 (5 pts), boolean chains 4 (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.
Synthesizer.productMirror (cognitive 24) compiler/src/dotty/tools/dotc/typer/Synthesizer.scala:451— Synthesizer.productMirror has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (18 pts), match/switch 3 (4 pts), 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.
Typer.typedStats (cognitive 24) compiler/src/dotty/tools/dotc/typer/Typer.scala:4199— Typer.typedStats has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 5 (9 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StringParsers.parseInt (cognitive 24) library/src/scala/collection/StringParsers.scala:106— StringParsers.parseInt has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
FromDigits.integerFromDigits (cognitive 24) library/src/scala/util/FromDigits.scala:101— FromDigits.integerFromDigits has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 8, 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.
PropertiesTrait.isJavaAtLeast (cognitive 24) library/src/scala/util/Properties.scala:189— PropertiesTrait.isJavaAtLeast has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 3, match/switch 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
AutoImportsProvider.autoImports (cognitive 24) presentation-compiler/src/main/dotty/tools/pc/AutoImportsProvider.scala:33— AutoImportsProvider.autoImports has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (13 pts), loops 2 (5 pts), match/switch 3 (5 pts), boolean chains 1 (nesting depth added 7). 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.
ShortenedTypePrinter.paramLabel (cognitive 24) presentation-compiler/src/main/dotty/tools/pc/printer/ShortenedTypePrinter.scala:476— ShortenedTypePrinter.paramLabel has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (15 pts), match/switch 3 (6 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ProductToStringProbe.runtimeClassSymbol (cognitive 24) repl/src/dotty/tools/repl/Rendering.scala:126— ProductToStringProbe.runtimeClassSymbol has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17 (23 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.
HtmlRenderer.mkFrame (cognitive 24) scaladoc/src/dotty/tools/scaladoc/renderers/HtmlRenderer.scala:228— HtmlRenderer.mkFrame has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (18 pts), match/switch 4 (6 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Scaladoc2AnchorCreator.signatureAnchor (cognitive 24) scaladoc/src/dotty/tools/scaladoc/tasty/Scaladoc2AnchorCreator.scala:20— Scaladoc2AnchorCreator.signatureAnchor has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (14 pts), match/switch 6 (10 pts) (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
TypesSupport.emitFunctionArrow (cognitive 24) scaladoc/src/dotty/tools/scaladoc/tasty/TypesSupport.scala:645— TypesSupport.emitFunctionArrow has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (18 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
AliasSet.-= (cognitive 23) compiler/src/dotty/tools/backend/jvm/analysis/AliasingAnalyzer.scala:464— AliasSet.-= has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (20 pts), match/switch 2 (3 pts) (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
LambdaMetaFactoryCall.unapply (cognitive 23) compiler/src/dotty/tools/backend/jvm/analysis/AnalysisUtils.scala:69— LambdaMetaFactoryCall.unapply has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
JSCodeGen.genMatch (cognitive 23) compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala:3539— JSCodeGen.genMatch has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 6 (10 pts), boolean chains 1, 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.
JSExportsGen.genCallDefaultGetter (cognitive 23) compiler/src/dotty/tools/backend/sjs/JSExportsGen.scala:725— JSExportsGen.genCallDefaultGetter has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (21 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.
Positioned.envelope (cognitive 23) compiler/src/dotty/tools/dotc/ast/Positioned.scala:89— Positioned.envelope has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (19 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CaptureChecker.markFree (cognitive 23) compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala:576— CaptureChecker.markFree has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 5 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CaptureChecker.markFreeTypeArgs (cognitive 23) compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala:642— CaptureChecker.markFreeTypeArgs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 2, loops 1 (2 pts), match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CaptureChecker.refineConstructorInstance (cognitive 23) compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala:986— CaptureChecker.refineConstructorInstance has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 1, loops 1, 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.
CaptureChecker.checkStatefulInheritance (cognitive 23) compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala:2461— CaptureChecker.checkStatefulInheritance has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (19 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
SymDenotations.traceInvalid (cognitive 23) compiler/src/dotty/tools/dotc/core/SymDenotations.scala:2882— SymDenotations.traceInvalid has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), error handling 1 (4 pts), boolean chains 3, 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.
TypeErasure.transformInfo (cognitive 23) compiler/src/dotty/tools/dotc/core/TypeErasure.scala:284— TypeErasure.transformInfo has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
NamedType.argForParam (cognitive 23) compiler/src/dotty/tools/dotc/core/Types.scala:2781— NamedType.argForParam has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 2 (5 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
NamedType.withPrefix (cognitive 23) compiler/src/dotty/tools/dotc/core/Types.scala:2903— NamedType.withPrefix has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TypeAccumulator.foldOver (cognitive 23) compiler/src/dotty/tools/dotc/core/Types.scala:6831— TypeAccumulator.foldOver has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (18 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ClassfileParser.parseAttributes (cognitive 23) compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala:983— ClassfileParser.parseAttributes has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 5 (7 pts), match/switch 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JavaScanner.getlitch (cognitive 23) compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala:426— JavaScanner.getlitch has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PlainPrinter.toTextCapability (cognitive 23) compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala:462— PlainPrinter.toTextCapability has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (15 pts), match/switch 4 (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.
MissingImplicitArgument.msg (cognitive 23) compiler/src/dotty/tools/dotc/reporting/messages.scala:3170— MissingImplicitArgument.msg has cognitive complexity 23 (threshold 15). Drivers by points: match/switch 7 (12 pts), if/else 11 (nesting depth added 5). 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.
ExtractAPICollector.computeType (cognitive 23) compiler/src/dotty/tools/dotc/sbt/ExtractAPI.scala:532— ExtractAPICollector.computeType has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (15 pts), match/switch 4 (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.
Scala3.namePresentInSource (cognitive 23) compiler/src/dotty/tools/dotc/semanticdb/Scala3.scala:38— Scala3.namePresentInSource has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SemanticdbInputStream.readRawBytesSlowPath (cognitive 23) compiler/src/dotty/tools/dotc/semanticdb/internal/SemanticdbInputStream.scala:729— SemanticdbInputStream.readRawBytesSlowPath has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 3 (7 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.
Boxing.adaptClosure (cognitive 23) compiler/src/dotty/tools/dotc/transform/Erasure.scala:456— Boxing.adaptClosure has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExpandSAMs.transformBlock (cognitive 23) compiler/src/dotty/tools/dotc/transform/ExpandSAMs.scala:49— ExpandSAMs.transformBlock has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 4 (9 pts), boolean chains 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ExplicitOuter.transformTemplate (cognitive 23) compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala:72— ExplicitOuter.transformTemplate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (4 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InliningTreeMap.transform (cognitive 23) compiler/src/dotty/tools/dotc/transform/Inlining.scala:124— InliningTreeMap.transform has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (14 pts), match/switch 4 (9 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.
MacroAnnotations.expandAnnotations (cognitive 23) compiler/src/dotty/tools/dotc/transform/MacroAnnotations.scala:43— MacroAnnotations.expandAnnotations has cognitive complexity 23 (threshold 15). Drivers by points: loops 3 (12 pts), if/else 6 (7 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
Conversion.verify (cognitive 23) compiler/src/dotty/tools/dotc/transform/localopt/FormatChecker.scala:167— Conversion.verify has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 13, match/switch 4 (6 pts), if/else 3, loops 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ImportSuggestions.importSuggestions (cognitive 23) compiler/src/dotty/tools/dotc/typer/ImportSuggestions.scala:153— ImportSuggestions.importSuggestions has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, match/switch 4, loops 1 (2 pts), error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
Namer.checkDefName (cognitive 23) compiler/src/dotty/tools/dotc/typer/Namer.scala:183— Namer.checkDefName has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 12, if/else 7 (11 pts) (nesting depth added 4). 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.
Namer.completeTrailingParamss (cognitive 23) compiler/src/dotty/tools/dotc/typer/Namer.scala:2094— Namer.completeTrailingParamss has cognitive complexity 23 (threshold 15). Drivers by points: loops 5 (12 pts), if/else 4 (7 pts), boolean chains 4 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
TypeDefCompleter.typeSig (cognitive 23) compiler/src/dotty/tools/dotc/typer/Namer.scala:1140— TypeDefCompleter.typeSig has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (16 pts), match/switch 4 (5 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.
Typer.tryInsertApplyOrImplicit (cognitive 23) compiler/src/dotty/tools/dotc/typer/Typer.scala:4357— Typer.tryInsertApplyOrImplicit has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (16 pts), match/switch 3 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PcSymbolSearch.collectAllExtensionParamSymbols (cognitive 23) presentation-compiler/src/main/dotty/tools/pc/PcSymbolSearch.scala:210— PcSymbolSearch.collectAllExtensionParamSymbols has cognitive complexity 23 (threshold 15). Drivers by points: loops 3 (9 pts), match/switch 3 (8 pts), if/else 3 (4 pts), boolean chains 2 (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.
Completions.enrichWithSymbolSearch (cognitive 23) presentation-compiler/src/main/dotty/tools/pc/completions/Completions.scala:623— Completions.enrichWithSymbolSearch has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 9, match/switch 1 (3 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.
SnippetExpectations.validateLevel (cognitive 23) scaladoc/src/dotty/tools/scaladoc/snippets/SnippetExpectations.scala:59— SnippetExpectations.validateLevel has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PlainBodyBuilder.genEqEqPrimitive (cognitive 22) compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala:1685— PlainBodyBuilder.genEqEqPrimitive has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 5, 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.
BTypeLoader.buildNestedInfo (cognitive 22) compiler/src/dotty/tools/backend/jvm/BTypeLoader.scala:229— BTypeLoader.buildNestedInfo has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LocalOptImpls.compactLocalVariables (cognitive 22) compiler/src/dotty/tools/backend/jvm/opt/LocalOptimizer.scala:939— LocalOptImpls.compactLocalVariables has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 3 (7 pts), loops 3, boolean chains 1 (nesting depth added 6). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
desugar.getVariables (cognitive 22) compiler/src/dotty/tools/dotc/ast/Desugar.scala:2632— desugar.getVariables has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (5 pts), boolean chains 4, match/switch 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.
CaptureChecker.interpolate (cognitive 22) compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala:345— CaptureChecker.interpolate has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 5 (9 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SepCheck.sepApplyError (cognitive 22) compiler/src/dotty/tools/dotc/cc/SepCheck.scala:393— SepCheck.sepApplyError has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (15 pts), match/switch 4, boolean chains 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CheckRealizable.realizability (cognitive 22) compiler/src/dotty/tools/dotc/core/CheckRealizable.scala:76— CheckRealizable.realizability has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 2, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ConstraintHandling.addOneBound (cognitive 22) compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala:297— ConstraintHandling.addOneBound has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PhasesBase.fusePhases (cognitive 22) compiler/src/dotty/tools/dotc/core/Phases.scala:74— PhasesBase.fusePhases has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (5 pts), match/switch 1 (5 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.
SymbolLoader.complete (cognitive 22) compiler/src/dotty/tools/dotc/core/SymbolLoaders.scala:416— SymbolLoader.complete has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (14 pts), error handling 4, boolean chains 2, match/switch 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ApproximatingTypeMap.derivedRefinedType (cognitive 22) compiler/src/dotty/tools/dotc/core/Types.scala:6601— ApproximatingTypeMap.derivedRefinedType has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 2 (6 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Inliner.computeThisBindings (cognitive 22) compiler/src/dotty/tools/dotc/inlines/Inliner.scala:423— Inliner.computeThisBindings has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 2 (6 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JavaScanner.getFraction (cognitive 22) compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala:590— JavaScanner.getFraction has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 8, loops 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MissingClassValidInCurrentRun.unapply (cognitive 22) compiler/src/dotty/tools/dotc/quoted/Interpreter.scala:355— MissingClassValidInCurrentRun.unapply has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WConf.parseFilter (cognitive 22) compiler/src/dotty/tools/dotc/reporting/WConf.scala:84— WConf.parseFilter has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 5 (13 pts), if/else 5, error handling 1 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CheckUnused.resolveScoped (cognitive 22) compiler/src/dotty/tools/dotc/transform/CheckUnused.scala:486— CheckUnused.resolveScoped has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 3 (9 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Typer.typedApply (cognitive 22) compiler/src/dotty/tools/dotc/transform/Erasure.scala:883— Typer.typedApply has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (15 pts), match/switch 3 (4 pts), boolean chains 3 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CoverageTransformer.transform (cognitive 22) compiler/src/dotty/tools/dotc/transform/InstrumentCoverage.scala:476— CoverageTransformer.transform has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 5, match/switch 1 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Objects.instantiate (cognitive 22) compiler/src/dotty/tools/dotc/transform/init/Objects.scala:1402— Objects.instantiate has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 3 (7 pts) (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.
Objects.evalType (cognitive 22) compiler/src/dotty/tools/dotc/transform/init/Objects.scala:2043— Objects.evalType has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 1, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Checking.checkNoDoubleDeclaration (cognitive 22) compiler/src/dotty/tools/dotc/typer/Checking.scala:1353— Checking.checkNoDoubleDeclaration has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 6, loops 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.
Namer.checkNoConflict (cognitive 22) compiler/src/dotty/tools/dotc/typer/Namer.scala:138— Namer.checkNoConflict has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 7, loops 2 (5 pts) (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RefChecks.checkOverloadedRestrictions (cognitive 22) compiler/src/dotty/tools/dotc/typer/RefChecks.scala:43— RefChecks.checkOverloadedRestrictions has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 3 (5 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RefChecks.checkUnaryMethods (cognitive 22) compiler/src/dotty/tools/dotc/typer/RefChecks.scala:1110— RefChecks.checkUnaryMethods has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 3, match/switch 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.
TypeAssigner.accessibleType (cognitive 22) compiler/src/dotty/tools/dotc/typer/TypeAssigner.scala:93— TypeAssigner.accessibleType has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (19 pts), match/switch 1 (2 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.
Typer.typedTuple (cognitive 22) compiler/src/dotty/tools/dotc/typer/Typer.scala:3886— Typer.typedTuple has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (19 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Traverser.checkVariance (cognitive 22) compiler/src/dotty/tools/dotc/typer/VarianceChecker.scala:173— Traverser.checkVariance has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 4, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
NumericRange.sum (cognitive 22) library/src/scala/collection/immutable/NumericRange.scala:319— NumericRange.sum has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 1 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.tokenize (cognitive 22) library/src/scala/sys/process/Parser.scala:30— Parser.tokenize has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (15 pts), loops 3, boolean chains 2, match/switch 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.
OverrideCompletions.toCompletionValue (cognitive 22) presentation-compiler/src/main/dotty/tools/pc/completions/OverrideCompletions.scala:391— OverrideCompletions.toCompletionValue has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 3, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
PageSearchEngine.matchPage (cognitive 22) scaladoc-js/main/src/searchbar/engine/PageSearchEngine.scala:90— PageSearchEngine.matchPage has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (17 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
MemberLookup.lookupOpt (cognitive 22) scaladoc/src/dotty/tools/scaladoc/tasty/comments/MemberLookup.scala:21— MemberLookup.lookupOpt has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (13 pts), match/switch 3 (6 pts), boolean chains 2, error handling 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ClosureOptimizer.rewriteClosureApplyInvocations (cognitive 21) compiler/src/dotty/tools/backend/jvm/opt/ClosureOptimizer.scala:87— ClosureOptimizer.rewriteClosureApplyInvocations has cognitive complexity 21 (threshold 15). Drivers by points: loops 4 (8 pts), match/switch 2 (7 pts), if/else 3 (6 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InlineRequest.logText (cognitive 21) compiler/src/dotty/tools/backend/jvm/opt/InlinerHeuristics.scala:366— InlineRequest.logText has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (7 pts), loops 2 (7 pts), match/switch 2 (7 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OptimizerCallGraph.cloneInstructions (cognitive 21) compiler/src/dotty/tools/backend/jvm/opt/OptimizerCallGraph.scala:289— OptimizerCallGraph.cloneInstructions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (19 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
desugar.extMethod (cognitive 21) compiler/src/dotty/tools/dotc/ast/Desugar.scala:1236— desugar.extMethod has cognitive complexity 21 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 7 (8 pts), match/switch 2 (3 pts) (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.
MainProxies.mainProxy (cognitive 21) compiler/src/dotty/tools/dotc/ast/MainProxies.scala:44— MainProxies.mainProxy has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (17 pts), match/switch 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Positioned.checkPos (cognitive 21) compiler/src/dotty/tools/dotc/ast/Positioned.scala:168— Positioned.checkPos has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 5 (9 pts), if/else 6 (7 pts), boolean chains 3, loops 1 (2 pts) (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.
TreeTypeMap.transform (cognitive 21) compiler/src/dotty/tools/dotc/ast/TreeTypeMap.scala:99— TreeTypeMap.transform has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 3 (6 pts), error handling 1 (4 pts) (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CaptureSet.withCaptureSetsExplained (cognitive 21) compiler/src/dotty/tools/dotc/cc/CaptureSet.scala:1890— CaptureSet.withCaptureSetsExplained has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (9 pts), match/switch 2 (8 pts), loops 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Setup.decorate (cognitive 21) compiler/src/dotty/tools/dotc/cc/Setup.scala:950— Setup.decorate has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), match/switch 2 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CommandLineParser.tokenize (cognitive 21) compiler/src/dotty/tools/dotc/config/CommandLineParser.scala:28— CommandLineParser.tokenize has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (14 pts), loops 3, boolean chains 2, match/switch 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.
ConstraintHandling.dropTransparentTraits (cognitive 21) compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala:604— ConstraintHandling.dropTransparentTraits has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 2, 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.
SingleDenotation.computeAsSeenFrom (cognitive 21) compiler/src/dotty/tools/dotc/core/Denotations.scala:1095— SingleDenotation.computeAsSeenFrom has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 4, match/switch 3 (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.
SymDenotation.completeFrom (cognitive 21) compiler/src/dotty/tools/dotc/core/SymDenotations.scala:150— SymDenotation.completeFrom has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (18 pts), error handling 1 (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.
SymDenotation.fullNameSeparated (cognitive 21) compiler/src/dotty/tools/dotc/core/SymDenotations.scala:503— SymDenotation.fullNameSeparated has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4, loops 1 (2 pts), 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.
TypeComparer.hasMatchingMember (cognitive 21) compiler/src/dotty/tools/dotc/core/TypeComparer.scala:2290— TypeComparer.hasMatchingMember has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 9, match/switch 5 (7 pts), if/else 5 (nesting depth added 2). 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.
Type.atoms (cognitive 21) compiler/src/dotty/tools/dotc/core/Types.scala:1508— Type.atoms has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 6 (11 pts), if/else 8 (10 pts) (nesting depth added 7). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SAMType.samParent (cognitive 21) compiler/src/dotty/tools/dotc/core/Types.scala:5991— SAMType.samParent has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 4 (9 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.
TreeReader.normalizeFlags (cognitive 21) compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala:558— TreeReader.normalizeFlags has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (16 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.
InlinerTreeMap.apply (cognitive 21) compiler/src/dotty/tools/dotc/inlines/Inliner.scala:724— InlinerTreeMap.apply has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 4 (8 pts), boolean chains 3 (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.
InlineTyper.typedSelect (cognitive 21) compiler/src/dotty/tools/dotc/inlines/Inliner.scala:1002— InlineTyper.typedSelect has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (11 pts), match/switch 4 (8 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Scanner.skipComment (cognitive 21) compiler/src/dotty/tools/dotc/parsing/Scanners.scala:1026— Scanner.skipComment has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (18 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
Scanner.getNumber (cognitive 21) compiler/src/dotty/tools/dotc/parsing/Scanners.scala:1533— Scanner.getNumber has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4, match/switch 2 (4 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.
DidYouMean.didYouMean (cognitive 21) compiler/src/dotty/tools/dotc/reporting/DidYouMean.scala:128— DidYouMean.didYouMean has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (15 pts), match/switch 3, boolean chains 2, error handling 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.
Extractor.symbolKinds (cognitive 21) compiler/src/dotty/tools/dotc/semanticdb/ExtractSemanticDB.scala:640— Extractor.symbolKinds has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 1 (2 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.
SyntheticsExtractor.tryFindSynthetic (cognitive 21) compiler/src/dotty/tools/dotc/semanticdb/SyntheticsExtractor.scala:16— SyntheticsExtractor.tryFindSynthetic has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 4 (9 pts), boolean chains 6, if/else 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.
CheckStatic.transformTemplate (cognitive 21) compiler/src/dotty/tools/dotc/transform/CheckStatic.scala:36— CheckStatic.transformTemplate has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 3, loops 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Boxing.adaptToType (cognitive 21) compiler/src/dotty/tools/dotc/transform/Erasure.scala:394— Boxing.adaptToType has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 3, match/switch 2 (3 pts) (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.
MoveStatics.transformStats (cognitive 21) compiler/src/dotty/tools/dotc/transform/MoveStatics.scala:41— MoveStatics.transformStats has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, match/switch 1 (3 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DropForMap.transformApply (cognitive 21) compiler/src/dotty/tools/dotc/transform/localopt/DropForMap.scala:33— DropForMap.transformApply has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 4 (6 pts) (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
TypedFormatChecker.checked (cognitive 21) compiler/src/dotty/tools/dotc/transform/localopt/FormatChecker.scala:68— TypedFormatChecker.checked has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 2, loops 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.
SpaceEngine.satisfiable (cognitive 21) compiler/src/dotty/tools/dotc/transform/patmat/Space.scala:810— SpaceEngine.satisfiable has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), match/switch 5 (6 pts), boolean chains 2 (nesting depth added 4). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ExplicitJSClasses.transformInfo (cognitive 21) compiler/src/dotty/tools/dotc/transform/sjs/ExplicitJSClasses.scala:338— ExplicitJSClasses.transformInfo has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (6 pts), boolean chains 3, 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.
Dynamic.typedDynamicApply (cognitive 21) compiler/src/dotty/tools/dotc/typer/Dynamic.scala:80— Dynamic.typedDynamicApply has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (13 pts), match/switch 4 (7 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Future.firstCompletedOf (cognitive 21) library/src/scala/concurrent/Future.scala:772— Future.firstCompletedOf has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 1 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DefaultPromise.linkRootOf (cognitive 21) library/src/scala/concurrent/impl/Promise.scala:402— DefaultPromise.linkRootOf has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (20 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.
ReplCompiler.typeCheck (cognitive 21) repl/src/dotty/tools/repl/ReplCompiler.scala:209— ReplCompiler.typeCheck has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (8 pts), match/switch 5 (7 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PlainBodyBuilder.genTypeApply (cognitive 20) compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala:701— PlainBodyBuilder.genTypeApply has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 2, match/switch 1 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
BType.conformsTo (cognitive 20) compiler/src/dotty/tools/backend/jvm/BTypes.scala:85— BType.conformsTo has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (8 pts), match/switch 4 (7 pts), boolean chains 5 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
BoxKind.checkInstanceCreation (cognitive 20) compiler/src/dotty/tools/backend/jvm/opt/BoxUnbox.scala:615— BoxKind.checkInstanceCreation has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (15 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Tuple.checkTupleCreation (cognitive 20) compiler/src/dotty/tools/backend/jvm/opt/BoxUnbox.scala:796— Tuple.checkTupleCreation has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (5 pts), boolean chains 2, match/switch 2 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Tuple.checkTupleExtraction (cognitive 20) compiler/src/dotty/tools/backend/jvm/opt/BoxUnbox.scala:835— Tuple.checkTupleExtraction has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 1, 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.
ClosureOptimizer.rewriteClosureApplyInvocation (cognitive 20) compiler/src/dotty/tools/backend/jvm/opt/ClosureOptimizer.scala:343— ClosureOptimizer.rewriteClosureApplyInvocation has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 2, 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.
JSCodeGen.genConversion (cognitive 20) compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala:2915— JSCodeGen.genConversion has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), match/switch 4 (9 pts), boolean chains 2 (nesting depth added 7). 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.
desugar.tuple (cognitive 20) compiler/src/dotty/tools/dotc/ast/Desugar.scala:1856— desugar.tuple has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (17 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
desugar.adaptPatternArgs (cognitive 20) compiler/src/dotty/tools/dotc/ast/Desugar.scala:1910— desugar.adaptPatternArgs has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 2 (4 pts), boolean chains 3, 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.
UntypedTreeInfo.defKind (cognitive 20) compiler/src/dotty/tools/dotc/ast/TreeInfo.scala:533— UntypedTreeInfo.defKind has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (16 pts), match/switch 2 (3 pts), boolean chains 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.
CaptureChecker.instantiate (cognitive 20) compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala:948— CaptureChecker.instantiate has cognitive complexity 20 (threshold 15). Drivers by points: loops 3 (12 pts), if/else 6, match/switch 1 (2 pts) (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
CaptureChecker.checkFieldOfClassifiedClass (cognitive 20) compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala:1488— CaptureChecker.checkFieldOfClassifiedClass has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (6 pts), match/switch 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CaptureChecker.postCheck (cognitive 20) compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala:2490— CaptureChecker.postCheck has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 4 (6 pts), loops 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
checker.traverse (cognitive 20) compiler/src/dotty/tools/dotc/cc/SafeRefs.scala:204— checker.traverse has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (8 pts), match/switch 3 (6 pts), boolean chains 4, loops 1 (2 pts) (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.
ClassDenotation.computeBaseData (cognitive 20) compiler/src/dotty/tools/dotc/core/SymDenotations.scala:2127— ClassDenotation.computeBaseData has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (9 pts), match/switch 3 (6 pts), boolean chains 5 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TypeApplications.typeParams (cognitive 20) compiler/src/dotty/tools/dotc/core/TypeApplications.scala:206— TypeApplications.typeParams has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 3 (5 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.
TypeErasure.compareErasedGlb (cognitive 20) compiler/src/dotty/tools/dotc/core/TypeErasure.scala:523— TypeErasure.compareErasedGlb has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, boolean chains 4. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Type.lookupRefined (cognitive 20) compiler/src/dotty/tools/dotc/core/Types.scala:1749— Type.lookupRefined has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 3 (5 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.
ClassfileParser.parseAnnotation (cognitive 20) compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala:874— ClassfileParser.parseAnnotation has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 2 (3 pts), boolean chains 2, error handling 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TreeSectionUnpickler.unpickle0 (cognitive 20) compiler/src/dotty/tools/dotc/core/tasty/TastyPrinter.scala:136— TreeSectionUnpickler.unpickle0 has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (9 pts), match/switch 3 (6 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TreeReader.readTemplate (cognitive 20) compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala:1116— TreeReader.readTemplate has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 3, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Scala2Unpickler.setClassInfo (cognitive 20) compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala:81— Scala2Unpickler.setClassInfo has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 2, 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.
Scala2Unpickler.run (cognitive 20) compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala:183— Scala2Unpickler.run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 1 (4 pts), loops 2, boolean chains 1, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
isElideableExpr.apply (cognitive 20) compiler/src/dotty/tools/dotc/inlines/Inliner.scala:53— isElideableExpr.apply has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 7, match/switch 1 (nesting depth added 3). 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.
Parser.interpolatedString (cognitive 20) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:1514— Parser.interpolatedString has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (15 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Scanner.isLeadingInfixOperator (cognitive 20) compiler/src/dotty/tools/dotc/parsing/Scanners.scala:432— Scanner.isLeadingInfixOperator has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 11, if/else 5 (6 pts), match/switch 2 (3 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
MarkupParser.xPattern (cognitive 20) compiler/src/dotty/tools/dotc/parsing/xml/MarkupParsers.scala:435— MarkupParser.xPattern has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (6 pts), match/switch 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Interpreter.interpretTree (cognitive 20) compiler/src/dotty/tools/dotc/quoted/Interpreter.scala:62— Interpreter.interpretTree has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (15 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 4). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Typer.checkNotErased (cognitive 20) compiler/src/dotty/tools/dotc/transform/Erasure.scala:542— Typer.checkNotErased has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 3 (9 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CoverageTransformer.needsLift (cognitive 20) compiler/src/dotty/tools/dotc/transform/InstrumentCoverage.scala:778— CoverageTransformer.needsLift has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, if/else 4 (5 pts), match/switch 3 (nesting depth added 1). 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.
LazyVals.transformLazyVal (cognitive 20) compiler/src/dotty/tools/dotc/transform/LazyVals.scala:74— LazyVals.transformLazyVal has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 5 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PostTyperTransformer.forwardParamAccessors (cognitive 20) compiler/src/dotty/tools/dotc/transform/PostTyper.scala:186— PostTyperTransformer.forwardParamAccessors has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (11 pts), boolean chains 3, loops 1 (3 pts), match/switch 2 (3 pts) (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Objects.readLocal (cognitive 20) compiler/src/dotty/tools/dotc/transform/init/Objects.scala:1463— Objects.readLocal has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 3 (4 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.
ExplicitJSClasses.transformApply (cognitive 20) compiler/src/dotty/tools/dotc/transform/sjs/ExplicitJSClasses.scala:550— ExplicitJSClasses.transformApply has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 1 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ScalaJSPrepJSInteropTransformer.constantFoldJSAnnotations (cognitive 20) compiler/src/dotty/tools/dotc/transform/sjs/PrepJSInterop.scala:1099— ScalaJSPrepJSInteropTransformer.constantFoldJSAnnotations has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (10 pts), match/switch 3 (9 pts), boolean chains 1 (nesting depth added 8). 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.
Errors.selectErrorAddendum (cognitive 20) compiler/src/dotty/tools/dotc/typer/ErrorReporting.scala:255— Errors.selectErrorAddendum has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (14 pts), loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Typer.typedNew (cognitive 20) compiler/src/dotty/tools/dotc/typer/Typer.scala:1298— Typer.typedNew has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 2 (5 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Typer.typedAnnotated (cognitive 20) compiler/src/dotty/tools/dotc/typer/Typer.scala:3792— Typer.typedAnnotated has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (14 pts), match/switch 2 (5 pts), boolean chains 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.
DiffUtil.needlemanWunsch (cognitive 20) compiler/src/dotty/tools/dotc/util/DiffUtil.scala:258— DiffUtil.needlemanWunsch has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
NumericRange.sum (cognitive 20) library-js/src/scala/collection/immutable/NumericRange.scala:270— NumericRange.sum has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 1 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Stream.hasDefiniteSize (cognitive 20) library/src/scala/collection/immutable/Stream.scala:339— Stream.hasDefiniteSize has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExternalDocLink.parse (cognitive 20) scaladoc/src/dotty/tools/scaladoc/ExternalDocLink.scala:42— ExternalDocLink.parse has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (14 pts), if/else 3, match/switch 3 (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.
Parser.getInline (cognitive 20) scaladoc/src/dotty/tools/scaladoc/tasty/comments/wiki/Parser.scala:467— Parser.getInline has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (14 pts), match/switch 2 (3 pts), boolean chains 2, loops 1 (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.
PlainBodyBuilder.genLoadIfTo (cognitive 19) compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala:229— PlainBodyBuilder.genLoadIfTo has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
BCAnnotGen.emitArgument (cognitive 19) compiler/src/dotty/tools/backend/jvm/BCodeHelpers.scala:158— BCAnnotGen.emitArgument has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 4 (7 pts), if/else 5 (6 pts), loops 2 (4 pts), boolean chains 2 (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.
CheckCaptures.checkWellformedRetains (cognitive 19) compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala:115— CheckCaptures.checkWellformedRetains has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, error handling 1 (3 pts), match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CaptureChecker.addOuterRefs (cognitive 19) compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala:1929— CaptureChecker.addOuterRefs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, match/switch 3, loops 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.
ImplicitNullMap.apply (cognitive 19) compiler/src/dotty/tools/dotc/core/ImplicitNullInterop.scala:176— ImplicitNullMap.apply has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 4 (8 pts) (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.
OrderingConstraint.adjustDeps (cognitive 19) compiler/src/dotty/tools/dotc/core/OrderingConstraint.scala:362— OrderingConstraint.adjustDeps has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 4 (7 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
OrderingConstraint.stripParams (cognitive 19) compiler/src/dotty/tools/dotc/core/OrderingConstraint.scala:473— OrderingConstraint.stripParams has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (18 pts), match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SymDenotation.isAccessibleFrom (cognitive 19) compiler/src/dotty/tools/dotc/core/SymDenotations.scala:987— SymDenotation.isAccessibleFrom has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 13, if/else 6. 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.
TypeComparer.liftToThis (cognitive 19) compiler/src/dotty/tools/dotc/core/TypeComparer.scala:1742— TypeComparer.liftToThis has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 3, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
TypeErasure.isGenericArrayElement (cognitive 19) compiler/src/dotty/tools/dotc/core/TypeErasure.scala:338— TypeErasure.isGenericArrayElement has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 7, match/switch 2 (nesting depth added 2). 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.
NamedTypeUniques.enterIfNew (cognitive 19) compiler/src/dotty/tools/dotc/core/Uniques.scala:41— NamedTypeUniques.enterIfNew has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MemberCompleter.complete (cognitive 19) compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala:473— MemberCompleter.complete has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (16 pts), match/switch 2, boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
innerClasses.classSymbol (cognitive 19) compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala:1328— innerClasses.classSymbol has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (16 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.
Scala2Unpickler.elimExistentials (cognitive 19) compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala:730— Scala2Unpickler.elimExistentials has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (12 pts), match/switch 5 (6 pts), boolean chains 1 (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.
Parser.statSepOrEnd (cognitive 19) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:369— Parser.statSepOrEnd has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.compilationUnit (cognitive 19) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:5280— Parser.compilationUnit has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RefinedPrinter.toText (cognitive 19) compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala:1225— RefinedPrinter.toText has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Seen.record (cognitive 19) compiler/src/dotty/tools/dotc/reporting/Message.scala:112— Seen.record has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 3 (7 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Seen.explanation (cognitive 19) compiler/src/dotty/tools/dotc/reporting/Message.scala:171— Seen.explanation has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (16 pts), match/switch 2, boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
TraceSyntax.doTrace (cognitive 19) compiler/src/dotty/tools/dotc/reporting/trace.scala:91— TraceSyntax.doTrace has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 2 (4 pts), boolean chains 2, 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.
FirstTransform.foldCondition (cognitive 19) compiler/src/dotty/tools/dotc/transform/FirstTransform.scala:233— FirstTransform.foldCondition has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 3 (6 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Translator.collectSwitchCases (cognitive 19) compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala:912— Translator.collectSwitchCases has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, match/switch 4 (5 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SpecializeFunctions.transformApply (cognitive 19) compiler/src/dotty/tools/dotc/transform/SpecializeFunctions.scala:85— SpecializeFunctions.transformApply has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 4 (12 pts), if/else 5 (6 pts), boolean chains 1 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Staging.checkPostCondition (cognitive 19) compiler/src/dotty/tools/dotc/transform/Staging.scala:33— Staging.checkPostCondition has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (9 pts), match/switch 3 (6 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ImplicitSearch.checkDivergence (cognitive 19) compiler/src/dotty/tools/dotc/typer/Implicits.scala:1840— ImplicitSearch.checkDivergence has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 7, match/switch 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ImportInfo.ensureInitialized (cognitive 19) compiler/src/dotty/tools/dotc/typer/ImportInfo.scala:95— ImportInfo.ensureInitialized has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Linter.warnOnInterestingResultInStatement (cognitive 19) compiler/src/dotty/tools/dotc/typer/Linter.scala:17— Linter.warnOnInterestingResultInStatement has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 4 (7 pts), boolean chains 6, if/else 6 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AppToMain.rewrite (cognitive 19) compiler/src/dotty/tools/dotc/typer/Migrations.scala:258— AppToMain.rewrite has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 4 (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.
ClassCompleter.processExports (cognitive 19) compiler/src/dotty/tools/dotc/typer/Namer.scala:1588— ClassCompleter.processExports has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (8 pts), match/switch 5 (7 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.
QuotesAndSplices.typedSplicePattern (cognitive 19) compiler/src/dotty/tools/dotc/typer/QuotesAndSplices.scala:110— QuotesAndSplices.typedSplicePattern has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 3 (6 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Typer.typedTypeDef (cognitive 19) compiler/src/dotty/tools/dotc/typer/Typer.scala:3308— Typer.typedTypeDef has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, match/switch 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Typer.typedInfixOp (cognitive 19) compiler/src/dotty/tools/dotc/typer/Typer.scala:3853— Typer.typedInfixOp has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Util.detectMainClassAndMethod (cognitive 19) compiler/src/dotty/tools/scripting/Util.scala:17— Util.detectMainClassAndMethod has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (8 pts), loops 4 (8 pts), error handling 1 (2 pts), match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ScalaRunTime.stringOf (cognitive 19) library-js/src/scala/runtime/ScalaRunTime.scala:204— ScalaRunTime.stringOf has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (10 pts), match/switch 4, boolean chains 3, error handling 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.
BitSetStepper.findNext (cognitive 19) library/src/scala/collection/convert/impl/BitSetStepper.scala:35— BitSetStepper.findNext has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (18 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.
TableStepperBase.trySplit (cognitive 19) library/src/scala/collection/convert/impl/TableStepper.scala:49— TableStepperBase.trySplit has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BigInt.gcd (cognitive 19) library/src/scala/math/BigInt.scala:496— BigInt.gcd has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (19 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.
ReplBytecodeAnalysis.isScalaRunTimeProductToString (cognitive 19) repl/src/dotty/tools/repl/ReplBytecodeAnalysis.scala:23— ReplBytecodeAnalysis.isScalaRunTimeProductToString has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, if/else 6, match/switch 4, error handling 1. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReplDriver.resolveAndAddDeps (cognitive 19) repl/src/dotty/tools/repl/ReplDriver.scala:892— ReplDriver.resolveAndAddDeps has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SnippetCompiler.compile (cognitive 19) scaladoc/src/dotty/tools/scaladoc/snippets/SnippetCompiler.scala:44— SnippetCompiler.compile has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
MarkupConversion.resolveLink (cognitive 19) scaladoc/src/dotty/tools/scaladoc/tasty/comments/Comments.scala:105— MarkupConversion.resolveLink has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 3 (9 pts), if/else 3 (6 pts), loops 1 (4 pts) (nesting depth added 12). 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.
AliasSet.+= (cognitive 18) compiler/src/dotty/tools/backend/jvm/analysis/AliasingAnalyzer.scala:443— AliasSet.+= has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (12 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
JSCodeGen.computeJSNativeLoadSpecOfInPhase (cognitive 18) compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala:5123— JSCodeGen.computeJSNativeLoadSpecOfInPhase has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NameExtractor.apply (cognitive 18) compiler/src/dotty/tools/dotc/ast/Desugar.scala:1410— NameExtractor.apply has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Capability.subsumes (cognitive 18) compiler/src/dotty/tools/dotc/cc/Capability.scala:847— Capability.subsumes has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, match/switch 5 (6 pts), if/else 5 (nesting depth added 1). 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.
CheckCaptures.disallowBadRootsIn (cognitive 18) compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala:161— CheckCaptures.disallowBadRootsIn has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 3 (8 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CaptureChecker.recheckDefDef (cognitive 18) compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala:1364— CaptureChecker.recheckDefDef has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CaptureChecker.checkInferredResult (cognitive 18) compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala:1419— CaptureChecker.checkInferredResult 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.
CommentExpander.expandInheritdoc (cognitive 18) compiler/src/dotty/tools/dotc/core/Comments.scala:315— CommentExpander.expandInheritdoc has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), match/switch 3 (6 pts), loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ConstraintHandling.widenInferred (cognitive 18) compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala:678— ConstraintHandling.widenInferred has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 2, 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.
NamerOps.normalizeIfConstructor (cognitive 18) compiler/src/dotty/tools/dotc/core/NamerOps.scala:89— NamerOps.normalizeIfConstructor has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), match/switch 3 (8 pts), boolean chains 1 (nesting depth added 7). 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.
Substituters.substSym (cognitive 18) compiler/src/dotty/tools/dotc/core/Substituters.scala:77— Substituters.substSym 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). 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.
SymDenotation.paramSymss (cognitive 18) compiler/src/dotty/tools/dotc/core/SymDenotations.scala:337— SymDenotation.paramSymss has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 1 (2 pts), match/switch 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
SymDenotation.sealedStrictDescendants (cognitive 18) compiler/src/dotty/tools/dotc/core/SymDenotations.scala:1862— SymDenotation.sealedStrictDescendants has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (17 pts), match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TypeComparer.matchingMethodParams (cognitive 18) compiler/src/dotty/tools/dotc/core/TypeComparer.scala:2479— TypeComparer.matchingMethodParams has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
TypeErasure.tupleArity (cognitive 18) compiler/src/dotty/tools/dotc/core/TypeErasure.scala:100— TypeErasure.tupleArity has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (14 pts), match/switch 2 (4 pts) (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.
TastyPrinter.main (cognitive 18) compiler/src/dotty/tools/dotc/core/tasty/TastyPrinter.scala:33— TastyPrinter.main has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Inlines.inlineParentInlineTraits (cognitive 18) compiler/src/dotty/tools/dotc/inlines/Inlines.scala:360— Inlines.inlineParentInlineTraits has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (5 pts), boolean chains 3, 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.
SourceTree.namePos (cognitive 18) compiler/src/dotty/tools/dotc/interactive/SourceTree.scala:22— SourceTree.namePos has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 2 (4 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.
Parser.bracesToIndented (cognitive 18) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:853— Parser.bracesToIndented has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (7 pts), match/switch 2 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Parser.checkEndMarker (cognitive 18) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:1732— Parser.checkEndMarker has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 5, match/switch 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
Parser.selfType (cognitive 18) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:5127— Parser.selfType has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 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.
Scanner.fetchString (cognitive 18) compiler/src/dotty/tools/dotc/parsing/Scanners.scala:1373— Scanner.fetchString 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.
RefinedPrinter.toTextRef (cognitive 18) compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala:109— RefinedPrinter.toTextRef has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 2 (5 pts) (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
PickledQuotes.spliceTerms (cognitive 18) compiler/src/dotty/tools/dotc/quoted/PickledQuotes.scala:101— PickledQuotes.spliceTerms has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 4 (6 pts) (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.
ExtractAPICollector.treeHash (cognitive 18) compiler/src/dotty/tools/dotc/sbt/ExtractAPI.scala:778— ExtractAPICollector.treeHash has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), match/switch 4 (6 pts), boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Lifter.liftLocals (cognitive 18) compiler/src/dotty/tools/dotc/transform/LambdaLift.scala:97— Lifter.liftLocals has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SpecializeInlineTraits.transformTypeDef (cognitive 18) compiler/src/dotty/tools/dotc/transform/SpecializeInlineTraits.scala:55— SpecializeInlineTraits.transformTypeDef has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 2 (6 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Env.resolveEnvRecur (cognitive 18) compiler/src/dotty/tools/dotc/transform/init/Objects.scala:589— Env.resolveEnvRecur has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 1 (4 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SpaceEngine.computeIsSubspace (cognitive 18) compiler/src/dotty/tools/dotc/transform/patmat/Space.scala:207— SpaceEngine.computeIsSubspace has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 12, if/else 3, match/switch 2 (3 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
SpaceEngine.project (cognitive 18) compiler/src/dotty/tools/dotc/transform/patmat/Space.scala:380— SpaceEngine.project has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 1, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ScalaJSPrepJSInteropTransformer.transformMemberDef (cognitive 18) compiler/src/dotty/tools/dotc/transform/sjs/PrepJSInterop.scala:134— ScalaJSPrepJSInteropTransformer.transformMemberDef has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), match/switch 2 (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.
ScalaJSPrepJSInteropTransformer.checkJSNativeDefinition (cognitive 18) compiler/src/dotty/tools/dotc/transform/sjs/PrepJSInterop.scala:583— ScalaJSPrepJSInteropTransformer.checkJSNativeDefinition has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Checking.checkScala2Implicit (cognitive 18) compiler/src/dotty/tools/dotc/typer/Checking.scala:522— Checking.checkScala2Implicit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (13 pts), match/switch 4, 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.
Errors.typeMismatch (cognitive 18) compiler/src/dotty/tools/dotc/typer/ErrorReporting.scala:172— Errors.typeMismatch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (9 pts), match/switch 4 (7 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
EtaExpansion.etaExpand (cognitive 18) compiler/src/dotty/tools/dotc/typer/EtaExpansion.scala:255— EtaExpansion.etaExpand has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, boolean chains 3, 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.
Linter.warnOnImplausiblePattern (cognitive 18) compiler/src/dotty/tools/dotc/typer/Linter.scala:76— Linter.warnOnImplausiblePattern has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, match/switch 3 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Namer.defDefSig (cognitive 18) compiler/src/dotty/tools/dotc/typer/Namer.scala:2027— Namer.defDefSig has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TypeAssigner.selectionType (cognitive 18) compiler/src/dotty/tools/dotc/typer/TypeAssigner.scala:137— TypeAssigner.selectionType has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, match/switch 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
TypeAssigner.assignType (cognitive 18) compiler/src/dotty/tools/dotc/typer/TypeAssigner.scala:313— TypeAssigner.assignType has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 2, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Typer.typedMatchTypeTree (cognitive 18) compiler/src/dotty/tools/dotc/typer/Typer.scala:2916— Typer.typedMatchTypeTree has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
SourceCodePrinter.printParamDef (cognitive 18) compiler/src/scala/quoted/runtime/impl/printers/SourceCode.scala:859— SourceCodePrinter.printParamDef has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AnyIteratorStepper.trySplit (cognitive 18) library/src/scala/collection/convert/impl/IteratorStepper.scala:29— AnyIteratorStepper.trySplit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 3 other methods here (DoubleIteratorStepper.trySplit, IntIteratorStepper.trySplit, LongIteratorStepper.trySplit) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
DoubleIteratorStepper.trySplit (cognitive 18) library/src/scala/collection/convert/impl/IteratorStepper.scala:54— DoubleIteratorStepper.trySplit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 3 other methods here (AnyIteratorStepper.trySplit, IntIteratorStepper.trySplit, LongIteratorStepper.trySplit) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
IntIteratorStepper.trySplit (cognitive 18) library/src/scala/collection/convert/impl/IteratorStepper.scala:79— IntIteratorStepper.trySplit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 3 other methods here (AnyIteratorStepper.trySplit, DoubleIteratorStepper.trySplit, LongIteratorStepper.trySplit) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
LongIteratorStepper.trySplit (cognitive 18) library/src/scala/collection/convert/impl/IteratorStepper.scala:104— LongIteratorStepper.trySplit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 3 other methods here (AnyIteratorStepper.trySplit, DoubleIteratorStepper.trySplit, IntIteratorStepper.trySplit) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
DefaultPromise.tryAwait0 (cognitive 18) library/src/scala/concurrent/impl/Promise.scala:257— DefaultPromise.tryAwait0 has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (18 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.
XRayModeHint.unapply (cognitive 18) presentation-compiler/src/main/dotty/tools/pc/PcInlayHintsProvider.scala:527— XRayModeHint.unapply has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 4 (9 pts), if/else 6, boolean chains 3 (nesting depth added 5). 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.
PcSymbolSearch.soughtSymbols (cognitive 18) presentation-compiler/src/main/dotty/tools/pc/PcSymbolSearch.scala:50— PcSymbolSearch.soughtSymbols has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 7, match/switch 2 (nesting depth added 3). 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.
InterpolatorCompletions.contributeScope (cognitive 18) presentation-compiler/src/main/dotty/tools/pc/completions/InterpolatorCompletions.scala:209— InterpolatorCompletions.contributeScope has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, match/switch 2, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CompletionValueGenerator.labelForCaseMember (cognitive 18) presentation-compiler/src/main/dotty/tools/pc/completions/MatchCaseCompletions.scala:413— CompletionValueGenerator.labelForCaseMember has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 6 (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.
ShortenedTypePrinter.splitExtensionParamss (cognitive 18) presentation-compiler/src/main/dotty/tools/pc/printer/ShortenedTypePrinter.scala:403— ShortenedTypePrinter.splitExtensionParamss has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ReplCompiler.docOf (cognitive 18) repl/src/dotty/tools/repl/ReplCompiler.scala:159— ReplCompiler.docOf has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (7 pts), match/switch 2 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ReplPhase.definitions (cognitive 18) repl/src/dotty/tools/repl/ReplCompiler.scala:331— ReplPhase.definitions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (7 pts), loops 3 (6 pts), match/switch 4 (5 pts) (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SearchbarComponent.handleArrowDown (cognitive 18) scaladoc-js/main/src/searchbar/SearchbarComponent.scala:371— SearchbarComponent.handleArrowDown has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 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.
Locations.rawLocation (cognitive 18) scaladoc/src/dotty/tools/scaladoc/renderers/Locations.scala:25— Locations.rawLocation has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 3 (6 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.
ScaladocTastyInspector.inspect (cognitive 18) scaladoc/src/dotty/tools/scaladoc/tasty/TastyParser.scala:34— ScaladocTastyInspector.inspect has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 3, boolean chains 2, error handling 1, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
BCodeUtils.substituteLabel (cognitive 17) compiler/src/dotty/tools/backend/jvm/BCodeUtils.scala:320— BCodeUtils.substituteLabel has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JSCodeGen.genApply (cognitive 17) compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala:2265— JSCodeGen.genApply has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JSCodeGen.genEqEqPrimitive (cognitive 17) compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala:3001— JSCodeGen.genEqEqPrimitive has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JSCodeGen.genApplyJSMethodGeneric (cognitive 17) compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala:3286— JSCodeGen.genApplyJSMethodGeneric has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 3 (5 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
JSEncoding.toTypeRefInternal (cognitive 17) compiler/src/dotty/tools/backend/sjs/JSEncoding.scala:343— JSEncoding.toTypeRefInternal has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14 (16 pts), 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.
JSExportsGen.genOverloadDispatchSameArgcRec (cognitive 17) compiler/src/dotty/tools/backend/sjs/JSExportsGen.scala:517— JSExportsGen.genOverloadDispatchSameArgcRec has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 2 (6 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.
desugar.desugarContextBounds (cognitive 17) compiler/src/dotty/tools/dotc/ast/Desugar.scala:282— desugar.desugarContextBounds has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), match/switch 2 (4 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.
Capability.transClassifiers (cognitive 17) compiler/src/dotty/tools/dotc/cc/Capability.scala:725— Capability.transClassifiers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), 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.
CaptureSet.ofType (cognitive 17) compiler/src/dotty/tools/dotc/cc/CaptureSet.scala:1816— CaptureSet.ofType has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Var.addThisElem (cognitive 17) compiler/src/dotty/tools/dotc/cc/CaptureSet.scala:920— Var.addThisElem has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, match/switch 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.
Setup.recordParamAliases (cognitive 17) compiler/src/dotty/tools/dotc/cc/Setup.scala:93— Setup.recordParamAliases has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (10 pts), if/else 3 (6 pts), boolean chains 1 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
Synthetics.transform (cognitive 17) compiler/src/dotty/tools/dotc/cc/Synthetics.scala:63— Synthetics.transform has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 5 (6 pts), boolean chains 1 (nesting depth added 4). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Columnator.columnate (cognitive 17) compiler/src/dotty/tools/dotc/config/CliCommand.scala:159— Columnator.columnate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, match/switch 2 (3 pts), boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
OrderingConstraint.order (cognitive 17) compiler/src/dotty/tools/dotc/core/OrderingConstraint.scala:582— OrderingConstraint.order has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (16 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.
MutableScope.lookupEntry (cognitive 17) compiler/src/dotty/tools/dotc/core/Scopes.scala:365— MutableScope.lookupEntry has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Symbol.source (cognitive 17) compiler/src/dotty/tools/dotc/core/Symbols.scala:310— Symbol.source has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 3 (9 pts), if/else 7, boolean chains 1 (nesting depth added 6). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
TyperState.mergeConstraintWith (cognitive 17) compiler/src/dotty/tools/dotc/core/TyperState.scala:238— TyperState.mergeConstraintWith has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (7 pts), loops 1, match/switch 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Type.testProvisional (cognitive 17) compiler/src/dotty/tools/dotc/core/Types.scala:121— Type.testProvisional has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (6 pts), match/switch 1 (2 pts) (nesting depth added 3). 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.
NamedType.argDenot (cognitive 17) compiler/src/dotty/tools/dotc/core/Types.scala:2576— NamedType.argDenot has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NamedType.infoDependsOnPrefix (cognitive 17) compiler/src/dotty/tools/dotc/core/Types.scala:2684— NamedType.infoDependsOnPrefix has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, match/switch 4 (6 pts), if/else 3 (nesting depth added 2). 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.
ClassfileParser.parseClass (cognitive 17) compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala:355— ClassfileParser.parseClass has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
TreePickler.pickleDef (cognitive 17) compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala:364— TreePickler.pickleDef has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 4, loops 1 (2 pts), 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.
JavaParser.modifiers (cognitive 17) compiler/src/dotty/tools/dotc/parsing/JavaParsers.scala:466— JavaParser.modifiers has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 3 (8 pts), if/else 5 (7 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Parser.followedByToken (cognitive 17) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:961— Parser.followedByToken has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.expr (cognitive 17) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:2621— Parser.expr has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2, match/switch 1 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Parser.accessQualifierOpt (cognitive 17) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:3730— Parser.accessQualifierOpt has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (16 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.
QuotePatterns.encode (cognitive 17) compiler/src/dotty/tools/dotc/quoted/QuotePatterns.scala:156— QuotePatterns.encode has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, loops 2 (4 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
NotAMember.msg (cognitive 17) compiler/src/dotty/tools/dotc/reporting/messages.scala:410— NotAMember.msg has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 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.
AbstractExtractDependenciesCollector.recordTree (cognitive 17) compiler/src/dotty/tools/dotc/sbt/ExtractDependencies.scala:230— AbstractExtractDependenciesCollector.recordTree has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, loops 1 (2 pts), match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SemanticdbInputStream.tryRefillBuffer (cognitive 17) compiler/src/dotty/tools/dotc/semanticdb/internal/SemanticdbInputStream.scala:139— SemanticdbInputStream.tryRefillBuffer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ContextFunctionResults.integrateSelect (cognitive 17) compiler/src/dotty/tools/dotc/transform/ContextFunctionResults.scala:113— ContextFunctionResults.integrateSelect has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), match/switch 2 (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.
LambdaLift.transformIdent (cognitive 17) compiler/src/dotty/tools/dotc/transform/LambdaLift.scala:291— LambdaLift.transformIdent has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 1, 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.
MegaPhase.transformTree (cognitive 17) compiler/src/dotty/tools/dotc/transform/MegaPhase.scala:231— MegaPhase.transformTree has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), match/switch 2, boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
PostTyperTransformer.makeFormalsDeclared (cognitive 17) compiler/src/dotty/tools/dotc/transform/PostTyper.scala:455— PostTyperTransformer.makeFormalsDeclared has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), match/switch 4 (8 pts), boolean chains 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.
Splicer.splice (cognitive 17) compiler/src/dotty/tools/dotc/transform/Splicer.scala:44— Splicer.splice has cognitive complexity 17 (threshold 15). Drivers by points: error handling 4 (8 pts), if/else 4 (8 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.
SyntheticMembers.fromProductBody (cognitive 17) compiler/src/dotty/tools/dotc/transform/SyntheticMembers.scala:546— SyntheticMembers.fromProductBody has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 1 (2 pts), match/switch 2, boolean chains 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SpaceEngine.intersect (cognitive 17) compiler/src/dotty/tools/dotc/transform/patmat/Space.scala:244— SpaceEngine.intersect has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (16 pts), match/switch 1 (nesting depth added 4). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SpaceEngine.erase (cognitive 17) compiler/src/dotty/tools/dotc/transform/patmat/Space.scala:496— SpaceEngine.erase has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 2, 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.
JSCallingConvention.of (cognitive 17) compiler/src/dotty/tools/dotc/transform/sjs/JSSymUtils.scala:58— JSCallingConvention.of has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 4, match/switch 1 (3 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.
Checking.checkValidInfix (cognitive 17) compiler/src/dotty/tools/dotc/typer/Checking.scala:1275— Checking.checkValidInfix has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 3 (5 pts), boolean chains 2 (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.
ImplicitSearch.recursiveRef (cognitive 17) compiler/src/dotty/tools/dotc/typer/Implicits.scala:1910— ImplicitSearch.recursiveRef has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, match/switch 2 (4 pts) (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MatchResult.toExpr (cognitive 17) compiler/src/scala/quoted/runtime/impl/QuoteMatcher.scala:636— MatchResult.toExpr has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 3 (6 pts) (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.
TypeRepr.typeConstructorOf (cognitive 17) compiler/src/scala/quoted/runtime/impl/QuotesImpl.scala:1852— TypeRepr.typeConstructorOf has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15 (17 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Map.updateWithAux (cognitive 17) library/src/scala/collection/concurrent/Map.scala:159— Map.updateWithAux has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 3 (5 pts) (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ChampStepperBase.trySplit (cognitive 17) library/src/scala/collection/convert/impl/ChampStepper.scala:117— ChampStepperBase.trySplit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DefaultPromise.removeCallback (cognitive 17) library/src/scala/concurrent/impl/Promise.scala:372— DefaultPromise.removeCallback has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (17 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.
AnyAccumulatorStepper.trySplit (cognitive 17) library/src/scala/jdk/AnyAccumulator.scala:369— AnyAccumulatorStepper.trySplit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (17 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.
DoubleAccumulatorStepper.trySplit (cognitive 17) library/src/scala/jdk/DoubleAccumulator.scala:427— DoubleAccumulatorStepper.trySplit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (17 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.
IntAccumulatorStepper.trySplit (cognitive 17) library/src/scala/jdk/IntAccumulator.scala:433— IntAccumulatorStepper.trySplit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (17 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.
LongAccumulatorStepper.trySplit (cognitive 17) library/src/scala/jdk/LongAccumulator.scala:428— LongAccumulatorStepper.trySplit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (17 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.
InferredType.unapply (cognitive 17) presentation-compiler/src/main/dotty/tools/pc/PcInlayHintsProvider.scala:418— InferredType.unapply has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SignatureHelpProvider.withDocumentation (cognitive 17) presentation-compiler/src/main/dotty/tools/pc/SignatureHelpProvider.scala:70— SignatureHelpProvider.withDocumentation has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), match/switch 5 (8 pts), boolean chains 1 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
AmmoniteFileCompletions.contribute (cognitive 17) presentation-compiler/src/main/dotty/tools/pc/completions/AmmoniteFileCompletions.scala:33— AmmoniteFileCompletions.contribute has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, match/switch 3 (4 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
AbstractFileClassLoader.loadClass (cognitive 17) repl/src/dotty/tools/repl/AbstractFileClassLoader.scala:70— AbstractFileClassLoader.loadClass has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), match/switch 2 (5 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ParseResult.leadingCommand (cognitive 17) repl/src/dotty/tools/repl/ParseResult.scala:343— ParseResult.leadingCommand has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 2 (6 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClassLikeSupport.parseMethod (cognitive 17) scaladoc/src/dotty/tools/scaladoc/tasty/ClassLikeSupport.scala:385— ClassLikeSupport.parseMethod has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, match/switch 4 (5 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.
Main.main (cognitive 16) community-build/src/scala/dotty/communitybuild/Main.scala:46— Main.main has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 1, 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.
JCodeMethodN.emitT2T (cognitive 16) compiler/src/dotty/tools/backend/jvm/BCodeIdiomatic.scala:138— JCodeMethodN.emitT2T has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 5 (8 pts), if/else 6, boolean chains 2 (nesting depth added 3). 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.
Ref.checkRefCreation (cognitive 16) compiler/src/dotty/tools/backend/jvm/opt/BoxUnbox.scala:743— Ref.checkRefCreation has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), loops 2 (5 pts), match/switch 2, boolean chains 1 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
JSCodeGen.genClassFields (cognitive 16) compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala:948— JSCodeGen.genClassFields has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 5 (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.
suppressions.nowarnAction (cognitive 16) compiler/src/dotty/tools/dotc/Run.scala:98— suppressions.nowarnAction has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 1 (3 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.
TypedTreeInfo.exprPurity (cognitive 16) compiler/src/dotty/tools/dotc/ast/TreeInfo.scala:643— TypedTreeInfo.exprPurity has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 2, match/switch 1 (nesting depth added 3). 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.
tpd.ref (cognitive 16) compiler/src/dotty/tools/dotc/ast/tpd.scala:475— tpd.ref has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 2, match/switch 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.
TreeOps.changeOwnerAfter (cognitive 16) compiler/src/dotty/tools/dotc/ast/tpd.scala:927— TreeOps.changeOwnerAfter has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Capability.maxSubsumes (cognitive 16) compiler/src/dotty/tools/dotc/cc/Capability.scala:936— Capability.maxSubsumes has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 5, match/switch 3. 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.
CaptureChecker.anchorCaps (cognitive 16) compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala:385— CaptureChecker.anchorCaps has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 3 (9 pts), if/else 4, loops 1 (3 pts) (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Setup.transformInferredType (cognitive 16) compiler/src/dotty/tools/dotc/cc/Setup.scala:346— Setup.transformInferredType has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 4, match/switch 3 (4 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConstraintHandling.addBoundTransitively (cognitive 16) compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala:358— ConstraintHandling.addBoundTransitively has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 3, 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.
Context.implicits (cognitive 16) compiler/src/dotty/tools/dotc/core/Contexts.scala:230— Context.implicits has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), error handling 1 (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.
SingleDenotation.matchesLoosely (cognitive 16) compiler/src/dotty/tools/dotc/core/Denotations.scala:1040— SingleDenotation.matchesLoosely has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
GadtState.addBound (cognitive 16) compiler/src/dotty/tools/dotc/core/GadtConstraint.scala:233— GadtState.addBound has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (14 pts), match/switch 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
NamerOps.addContextBoundCompanions (cognitive 16) compiler/src/dotty/tools/dotc/core/NamerOps.scala:345— NamerOps.addContextBoundCompanions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (6 pts), match/switch 1 (5 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PhasesBase.usePhases (cognitive 16) compiler/src/dotty/tools/dotc/core/Phases.scala:137— PhasesBase.usePhases has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6, loops 3 (5 pts), match/switch 3 (5 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.
SubstApproxMap.apply (cognitive 16) compiler/src/dotty/tools/dotc/core/Substituters.scala:249— SubstApproxMap.apply has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), match/switch 2 (5 pts), loops 1 (2 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.
TypeComparer.inNestedLevel (cognitive 16) compiler/src/dotty/tools/dotc/core/TypeComparer.scala:1713— TypeComparer.inNestedLevel has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (16 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.
TypeComparer.matchesType (cognitive 16) compiler/src/dotty/tools/dotc/core/TypeComparer.scala:2443— TypeComparer.matchesType has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 4 (7 pts), boolean chains 5, if/else 4 (nesting depth added 3). 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.
TypeMap.mapCapability (cognitive 16) compiler/src/dotty/tools/dotc/core/Types.scala:6264— TypeMap.mapCapability has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 6 (12 pts), if/else 3 (4 pts) (nesting depth added 7). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
AppliedUniques.enterIfNew (cognitive 16) compiler/src/dotty/tools/dotc/core/Uniques.scala:82— AppliedUniques.enterIfNew has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 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.
InlineTyper.typedIf (cognitive 16) compiler/src/dotty/tools/dotc/inlines/Inliner.scala:1057— InlineTyper.typedIf has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (15 pts), 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.
JavaParser.typeBodyDecls (cognitive 16) compiler/src/dotty/tools/dotc/parsing/JavaParsers.scala:968— JavaParser.typeBodyDecls has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JavaScanner.getNumber (cognitive 16) compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala:679— JavaScanner.getNumber has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, match/switch 1 (2 pts), loops 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Parser.dropParensOrBraces (cognitive 16) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:905— Parser.dropParensOrBraces has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Parser.caseClause (cognitive 16) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:3425— Parser.caseClause has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 2, boolean chains 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.
Parser.checkedAscription (cognitive 16) compiler/src/dotty/tools/dotc/parsing/Parsers.scala:3515— Parser.checkedAscription has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), match/switch 2 (6 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Scanner.indentWidth (cognitive 16) compiler/src/dotty/tools/dotc/parsing/Scanners.scala:494— Scanner.indentWidth has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 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.
SymbolicXMLBuilder.element (cognitive 16) compiler/src/dotty/tools/dotc/parsing/xml/SymbolicXMLBuilder.scala:197— SymbolicXMLBuilder.element has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, match/switch 5 (7 pts), loops 2 (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.
Reporter.issueUnconfigured (cognitive 16) compiler/src/dotty/tools/dotc/reporting/Reporter.scala:178— Reporter.issueUnconfigured has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), match/switch 2 (4 pts), boolean chains 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.
TypeMismatch.msg (cognitive 16) compiler/src/dotty/tools/dotc/reporting/messages.scala:325— TypeMismatch.msg has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 2 (3 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.
DependencyRecorder.recordClassDependency (cognitive 16) compiler/src/dotty/tools/dotc/sbt/ExtractDependencies.scala:550— DependencyRecorder.recordClassDependency has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, match/switch 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.
InfoPrinter.pprint (cognitive 16) compiler/src/dotty/tools/dotc/semanticdb/PPrint.scala:145— InfoPrinter.pprint has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), match/switch 4 (6 pts) (nesting depth added 4). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SemanticdbInputStream.readRawVarint64 (cognitive 16) compiler/src/dotty/tools/dotc/semanticdb/internal/SemanticdbInputStream.scala:561— SemanticdbInputStream.readRawVarint64 has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (16 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.
CheckReentrant.addVars (cognitive 16) compiler/src/dotty/tools/dotc/transform/CheckReentrant.scala:62— CheckReentrant.addVars has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CheckUnused.transformSelect (cognitive 16) compiler/src/dotty/tools/dotc/transform/CheckUnused.scala:78— CheckUnused.transformSelect has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, match/switch 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.
Constructors.markUsedPrivateSymbols (cognitive 16) compiler/src/dotty/tools/dotc/transform/Constructors.scala:61— Constructors.markUsedPrivateSymbols has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 3 (5 pts), match/switch 1 (2 pts) (nesting depth added 3). 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.
InliningTreeMap.transformMemberDef (cognitive 16) compiler/src/dotty/tools/dotc/transform/Inlining.scala:161— InliningTreeMap.transformMemberDef has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cursor.next (cognitive 16) compiler/src/dotty/tools/dotc/transform/OverridingPairs.scala:157— Cursor.next has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), error handling 1 (3 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Translator.mergeTests (cognitive 16) compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala:706— Translator.mergeTests has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 7 (9 pts), if/else 7 (nesting depth added 2). 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.
PostTyperTransformer.normalizeTypeArgs (cognitive 16) compiler/src/dotty/tools/dotc/transform/PostTyper.scala:326— PostTyperTransformer.normalizeTypeArgs has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 5 (10 pts), if/else 5, boolean chains 1 (nesting depth added 5). 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.
Rechecker.recheckApply (cognitive 16) compiler/src/dotty/tools/dotc/transform/Recheck.scala:346— Rechecker.recheckApply has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 3 (4 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Rechecker.recheckStart (cognitive 16) compiler/src/dotty/tools/dotc/transform/Recheck.scala:546— Rechecker.recheckStart has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 4 (6 pts) (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.
YCheckPositions.checkPostCondition (cognitive 16) compiler/src/dotty/tools/dotc/transform/YCheckPositions.scala:22— YCheckPositions.checkPostCondition has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 3, match/switch 2 (3 pts) (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.
Migrations.typedAsFunction (cognitive 16) compiler/src/dotty/tools/dotc/typer/Migrations.scala:56— Migrations.typedAsFunction has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), match/switch 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
FunProto.cacheTypedArg (cognitive 16) compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala:459— FunProto.cacheTypedArg has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 2 (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.
FunProto.typedArgs (cognitive 16) compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala:496— FunProto.typedArgs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 1 (4 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ShowPickled.printFile (cognitive 16) compiler/src/dotty/tools/dotc/util/ShowPickled.scala:116— ShowPickled.printFile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 2, loops 2, match/switch 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SimpleIdentityMap.remove (cognitive 16) compiler/src/dotty/tools/dotc/util/SimpleIdentityMap.scala:37— SimpleIdentityMap.remove has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SimpleIdentitySet.-- (cognitive 16) compiler/src/dotty/tools/dotc/util/SimpleIdentitySet.scala:112— SimpleIdentitySet.-- has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SourceCodePrinter.printTargDef (cognitive 16) compiler/src/scala/quoted/runtime/impl/printers/SourceCode.scala:762— SourceCodePrinter.printTargDef has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), match/switch 4 (8 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.
LazyList.hasDefiniteSize (cognitive 16) library/src/scala/collection/immutable/LazyList.scala:1190— LazyList.hasDefiniteSize has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MemberRenderer.classLikeParts (cognitive 16) scaladoc/src/dotty/tools/scaladoc/renderers/MemberRenderer.scala:470— MemberRenderer.classLikeParts has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Sidebar.toSidebar (cognitive 16) scaladoc/src/dotty/tools/scaladoc/site/SidebarParser.scala:44— Sidebar.toSidebar has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 6, match/switch 2 (3 pts) (nesting depth added 4). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SnippetExpectations.parse (cognitive 16) scaladoc/src/dotty/tools/scaladoc/snippets/SnippetExpectations.scala:110— SnippetExpectations.parse has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 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.
Near-duplicate member pair (60 shared lines) library-js/src/scala/collection/immutable/NumericRange.scala:145— library-js/src/scala/collection/immutable/NumericRange.scala:145-212 | library/src/scala/collection/immutable/NumericRange.scala:194-261 — These two members are variants of one another: 60 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (36 shared lines) compiler/src/dotty/tools/dotc/util/NameTransformer.scala:95— compiler/src/dotty/tools/dotc/util/NameTransformer.scala:95-156 | library/src/scala/reflect/NameTransformer.scala:121-184 — These two members are variants of one another: 36 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Members sharing a duplicated core (11 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (11 members, 50+ identical tokens) library/src/scala/Product12.scala:53— library/src/scala/Product12.scala:53-67 | library/src/scala/Product13.scala:54-69 | library/src/scala/Product14.scala:55-71 | library/src/scala/Product15.scala:56-73 | library/src/scala/Product16.scala:57-75 | library/src/scala/Product17.scala:58-77 | library/src/scala/Product18.scala:59-79 | library/src/scala/Product19.scala:60-81 | library/src/scala/Product20.scala:61-83 | library/src/scala/Product21.scala:62-85 | library/src/scala/Product22.scala:63-87 — These 11 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 11 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 11 times.
Duplicated block (70 lines × 2) library-js/src/scala/collection/immutable/NumericRange.scala:372— library-js/src/scala/collection/immutable/NumericRange.scala:372-441 | library/src/scala/collection/immutable/NumericRange.scala:429-498 — before extracting anything, compare `library-js/src/scala/collection/immutable/NumericRange.scala` and `library/src/scala/collection/immutable/NumericRange.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 238 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library-js/src/scala/collection/immutable/NumericRange.scala:372` 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 (46 lines × 2) compiler/src/dotty/tools/dotc/transform/init/Objects.scala:2159— compiler/src/dotty/tools/dotc/transform/init/Objects.scala:2159-2204 | compiler/src/dotty/tools/dotc/transform/init/Semantic.scala:1578-1623 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/src/dotty/tools/dotc/transform/init/Objects.scala:2159` 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 `klass` to `ClassSymbol): Contextual[Ref] = log("init " + klass.show` in one and `ClassSymbol): Contextual[Value] = log("init " + klass.show` 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 (45 lines × 2) scaladoc/src/scala/tasty/inspector/TastyInspector.scala:89— scaladoc/src/scala/tasty/inspector/TastyInspector.scala:89-133 | tasty-inspector/src/scala/tasty/inspector/TastyInspector.scala:62-106 — before extracting anything, compare `scaladoc/src/scala/tasty/inspector/TastyInspector.scala` and `tasty-inspector/src/scala/tasty/inspector/TastyInspector.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (40 lines × 2) compiler/src/dotty/tools/tasty/besteffort/BestEffortTastyHeaderUnpickler.scala:83— compiler/src/dotty/tools/tasty/besteffort/BestEffortTastyHeaderUnpickler.scala:83-122 | tasty/src/dotty/tools/tasty/TastyHeaderUnpickler.scala:137-176 — before extracting anything, compare `compiler/src/dotty/tools/tasty/besteffort/BestEffortTastyHeaderUnpickler.scala` and `tasty/src/dotty/tools/tasty/TastyHeaderUnpickler.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (32 lines × 2) library/src/scala/util/hashing/MurmurHash3.scala:221— library/src/scala/util/hashing/MurmurHash3.scala:221-252 | library/src/scala/util/hashing/MurmurHash3.scala:314-345 — both copies are in the same file, so extract the 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 `library/src/scala/util/hashing/MurmurHash3.scala:221` 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 (28 lines × 2) library-js/src/scala/collection/immutable/NumericRange.scala:271— library-js/src/scala/collection/immutable/NumericRange.scala:271-298 | library/src/scala/collection/immutable/NumericRange.scala:320-347 — before extracting anything, compare `library-js/src/scala/collection/immutable/NumericRange.scala` and `library/src/scala/collection/immutable/NumericRange.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 238 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library-js/src/scala/collection/immutable/NumericRange.scala:271` 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 (25 lines × 2) library-js/src/scala/collection/immutable/NumericRange.scala:188— library-js/src/scala/collection/immutable/NumericRange.scala:188-212 | library/src/scala/collection/immutable/NumericRange.scala:237-261 — before extracting anything, compare `library-js/src/scala/collection/immutable/NumericRange.scala` and `library/src/scala/collection/immutable/NumericRange.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 238 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library-js/src/scala/collection/immutable/NumericRange.scala:188` 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 (24 lines × 2) library-js/src/scala/collection/immutable/NumericRange.scala:442— library-js/src/scala/collection/immutable/NumericRange.scala:442-465 | library/src/scala/collection/immutable/NumericRange.scala:499-522 — before extracting anything, compare `library-js/src/scala/collection/immutable/NumericRange.scala` and `library/src/scala/collection/immutable/NumericRange.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 238 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library-js/src/scala/collection/immutable/NumericRange.scala:442` 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 (23 lines × 4) library/src/scala/jdk/AnyAccumulator.scala:370— library/src/scala/jdk/AnyAccumulator.scala:370-392 | library/src/scala/jdk/DoubleAccumulator.scala:428-450 | library/src/scala/jdk/IntAccumulator.scala:434-456 | library/src/scala/jdk/LongAccumulator.scala:429-451 — before extracting anything, compare `library/src/scala/jdk/AnyAccumulator.scala` and `library/src/scala/jdk/DoubleAccumulator.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (23 lines × 2) library-js/src/scala/collection/immutable/NumericRange.scala:164— library-js/src/scala/collection/immutable/NumericRange.scala:164-186 | library/src/scala/collection/immutable/NumericRange.scala:213-235 — before extracting anything, compare `library-js/src/scala/collection/immutable/NumericRange.scala` and `library/src/scala/collection/immutable/NumericRange.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 238 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library-js/src/scala/collection/immutable/NumericRange.scala:164` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (21 lines × 3) library/src/scala/jdk/DoubleAccumulator.scala:86— library/src/scala/jdk/DoubleAccumulator.scala:86-106 | library/src/scala/jdk/IntAccumulator.scala:89-109 | library/src/scala/jdk/LongAccumulator.scala:87-107 — before extracting anything, compare `library/src/scala/jdk/DoubleAccumulator.scala` and `library/src/scala/jdk/IntAccumulator.scala` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/src/scala/jdk/DoubleAccumulator.scala:86` 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 (21 lines × 2) compiler/src/dotty/tools/dotc/util/NameTransformer.scala:133— compiler/src/dotty/tools/dotc/util/NameTransformer.scala:133-153 | library/src/scala/reflect/NameTransformer.scala:161-181 — before extracting anything, compare `compiler/src/dotty/tools/dotc/util/NameTransformer.scala` and `library/src/scala/reflect/NameTransformer.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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/src/dotty/tools/dotc/util/NameTransformer.scala:133` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19–20 lines × 2) presentation-compiler/src/main/dotty/tools/pc/RawScalaPresentationCompiler.scala:92— presentation-compiler/src/main/dotty/tools/pc/RawScalaPresentationCompiler.scala:92-110 | presentation-compiler/src/main/dotty/tools/pc/ScalaPresentationCompiler.scala:89-108 — before extracting anything, compare `presentation-compiler/src/main/dotty/tools/pc/RawScalaPresentationCompiler.scala` and `presentation-compiler/src/main/dotty/tools/pc/ScalaPresentationCompiler.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (18 lines × 2) library/src/scala/collection/convert/impl/ChampStepper.scala:84— library/src/scala/collection/convert/impl/ChampStepper.scala:84-101 | library/src/scala/collection/immutable/ChampCommon.scala:165-182 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (17 lines × 3) library/src/scala/jdk/DoubleAccumulator.scala:280— library/src/scala/jdk/DoubleAccumulator.scala:280-296 | library/src/scala/jdk/IntAccumulator.scala:286-302 | library/src/scala/jdk/LongAccumulator.scala:281-297 — before extracting anything, compare `library/src/scala/jdk/DoubleAccumulator.scala` and `library/src/scala/jdk/IntAccumulator.scala` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/src/scala/jdk/DoubleAccumulator.scala:280` 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–16 lines × 2) compiler/src/dotty/tools/backend/jvm/opt/LocalOptimizer.scala:698— compiler/src/dotty/tools/backend/jvm/opt/LocalOptimizer.scala:698-711 | compiler/src/dotty/tools/backend/jvm/opt/MethodMax.scala:49-64 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (14 lines × 4) library/src/scala/collection/convert/impl/IteratorStepper.scala:31— library/src/scala/collection/convert/impl/IteratorStepper.scala:31-44 | library/src/scala/collection/convert/impl/IteratorStepper.scala:56-69 | library/src/scala/collection/convert/impl/IteratorStepper.scala:81-94 | library/src/scala/collection/convert/impl/IteratorStepper.scala:106-119 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `library/src/scala/collection/convert/impl/IteratorStepper.scala:31` 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 (13 lines × 11) library/src/scala/Product12.scala:53— library/src/scala/Product12.scala:53-65 | library/src/scala/Product13.scala:54-66 | library/src/scala/Product14.scala:55-67 | library/src/scala/Product15.scala:56-68 | library/src/scala/Product16.scala:57-69 | library/src/scala/Product17.scala:58-70 | library/src/scala/Product18.scala:59-71 | library/src/scala/Product19.scala:60-72 | library/src/scala/Product20.scala:61-73 | library/src/scala/Product21.scala:62-74 | library/src/scala/Product22.scala:63-75 — before extracting anything, compare `library/src/scala/Product12.scala` and `library/src/scala/Product13.scala` as WHOLE FILES: 86% 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/src/scala/Product12.scala:53` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–12 lines × 2) compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala:77— compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala:77-88 | compiler/src/dotty/tools/dotc/parsing/Scanners.scala:1147-1157 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (10 lines × 6) library/src/scala/jdk/DoubleAccumulator.scala:480— library/src/scala/jdk/DoubleAccumulator.scala:480-489 | library/src/scala/jdk/DoubleAccumulator.scala:495-504 | library/src/scala/jdk/IntAccumulator.scala:486-495 | library/src/scala/jdk/IntAccumulator.scala:501-510 | library/src/scala/jdk/LongAccumulator.scala:481-490 | library/src/scala/jdk/LongAccumulator.scala:496-505 — before extracting anything, compare `library/src/scala/jdk/DoubleAccumulator.scala` and `library/src/scala/jdk/IntAccumulator.scala` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `c` to `DoubleConsumer): Unit = while (N > 0` in one and `IntConsumer): Unit = while (N > 0` 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 (8–9 lines × 4) compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala:75— compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala:75-83 | compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala:388-395 | compiler/src/dotty/tools/dotc/parsing/Scanners.scala:891-899 | compiler/src/dotty/tools/dotc/parsing/Scanners.scala:1146-1153 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala:84` calls `getIdentRest` and `compiler/src/dotty/tools/dotc/parsing/JavaScanners.scala:396` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8–9 lines × 3) compiler/src/dotty/tools/dotc/quoted/PickledQuotes.scala:142— compiler/src/dotty/tools/dotc/quoted/PickledQuotes.scala:142-149 | compiler/src/dotty/tools/dotc/transform/PickleQuotes.scala:130-137 | compiler/src/dotty/tools/dotc/transform/Splicing.scala:141-149 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (8–9 lines × 2) compiler/src/dotty/tools/debug/JavaEncoding.scala:41— compiler/src/dotty/tools/debug/JavaEncoding.scala:41-48 | compiler/src/dotty/tools/debug/JavaEncoding.scala:51-59 — both copies are in the same file, so extract the 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/dotty/tools/debug/JavaEncoding.scala:41` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `compiler/src/dotty/tools/debug/JavaEncoding.scala:48` calls `Exception`, `primitiveBinaryName` and `compiler/src/dotty/tools/debug/JavaEncoding.scala:41` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7–8 lines × 2) compiler/src/dotty/tools/dotc/transform/init/Objects.scala:1682— compiler/src/dotty/tools/dotc/transform/init/Objects.scala:1682-1688 | compiler/src/dotty/tools/dotc/transform/init/Semantic.scala:1322-1329 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/src/dotty/tools/dotc/transform/init/Objects.scala:1682` 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 (3–8 lines × 3) library/src/scala/jdk/DoubleAccumulator.scala:113— library/src/scala/jdk/DoubleAccumulator.scala:113-119 | library/src/scala/jdk/IntAccumulator.scala:116-118 | library/src/scala/jdk/LongAccumulator.scala:114-121 — before extracting anything, compare `library/src/scala/jdk/DoubleAccumulator.scala` and `library/src/scala/jdk/IntAccumulator.scala` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/src/scala/jdk/IntAccumulator.scala:116` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 4) library/src/scala/jdk/AnyAccumulator.scala:221— library/src/scala/jdk/AnyAccumulator.scala:221-227 | library/src/scala/jdk/DoubleAccumulator.scala:283-289 | library/src/scala/jdk/IntAccumulator.scala:289-295 | library/src/scala/jdk/LongAccumulator.scala:284-290 — before extracting anything, compare `library/src/scala/jdk/AnyAccumulator.scala` and `library/src/scala/jdk/DoubleAccumulator.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/src/scala/jdk/AnyAccumulator.scala:221` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) library/src/scala/jdk/DoubleAccumulator.scala:153— library/src/scala/jdk/DoubleAccumulator.scala:153-158 | library/src/scala/jdk/IntAccumulator.scala:159-164 | library/src/scala/jdk/LongAccumulator.scala:154-159 — before extracting anything, compare `library/src/scala/jdk/DoubleAccumulator.scala` and `library/src/scala/jdk/IntAccumulator.scala` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (4–5 lines × 3) compiler/src/dotty/tools/dotc/semanticdb/internal/SemanticdbInputStream.scala:609— compiler/src/dotty/tools/dotc/semanticdb/internal/SemanticdbInputStream.scala:609-613 | compiler/src/dotty/tools/dotc/semanticdb/internal/SemanticdbInputStream.scala:616-619 | compiler/src/dotty/tools/dotc/semanticdb/internal/SemanticdbInputStream.scala:623-627 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `compiler/src/dotty/tools/dotc/semanticdb/internal/SemanticdbInputStream.scala:609` 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 (155 lines × 2) library-js/src/scala/Console.scala:136— library-js/src/scala/Console.scala:136-294 | library/src/scala/Console.scala:134-288 — before extracting anything, compare `library-js/src/scala/Console.scala` and `library/src/scala/Console.scala` as WHOLE FILES: 83% 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.
Duplicated block (113 lines × 2) library-js/src/scala/concurrent/ExecutionContext.scala:104— library-js/src/scala/concurrent/ExecutionContext.scala:104-216 | library/src/scala/concurrent/ExecutionContext.scala:103-283 — 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 `library-js/src/scala/concurrent/ExecutionContext.scala:104` 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 (7 lines × 7) library/src/scala/jdk/AnyAccumulator.scala:174— library/src/scala/jdk/AnyAccumulator.scala:174-180 | library/src/scala/jdk/DoubleAccumulator.scala:239-245 | library/src/scala/jdk/DoubleAccumulator.scala:247-253 | library/src/scala/jdk/IntAccumulator.scala:245-251 | library/src/scala/jdk/IntAccumulator.scala:253-259 | library/src/scala/jdk/LongAccumulator.scala:240-246 | library/src/scala/jdk/LongAccumulator.scala:248-254 — before extracting anything, compare `library/src/scala/jdk/AnyAccumulator.scala` and `library/src/scala/jdk/DoubleAccumulator.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (26 lines × 2) compiler/src/scala/quoted/runtime/impl/printers/Extractors.scala:38— compiler/src/scala/quoted/runtime/impl/printers/Extractors.scala:38-63 | compiler/src/scala/quoted/runtime/impl/printers/SourceCode.scala:42-67 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
IC1 · Incompleteness & stubs· Empty method body · ×1
Empty method body — does nothing with its inputs compiler/src/dotty/tools/dotc/semanticdb/internal/SemanticdbInputStream.scala:785— `enableAliasing` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Type Safety — 0 typed · 13 plain JS — the untyped files are REDACTED, scaladoc/resources/dotty_res/scripts/common/component.js, scaladoc/resources/dotty_res/scripts/common/utils.js, scaladoc/resources/dotty_res/scripts/components/DocumentableList.js, scaladoc/resources/dotty_res/scripts/components/Filter.js, scaladoc/resources/dotty_res/scripts/components/FilterBar.js (+7 more).
R2 · Cyclomatic Complexity· Complex function t (cyclomatic 24, cognitive 19) · ×1
Complex function t (cyclomatic 24, cognitive 19) REDACTED:116— t has cyclomatic complexity 24 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity· Complex function x (cyclomatic 18, cognitive 17) · ×1
Complex function x (cyclomatic 18, cognitive 17) REDACTED:193— x has cyclomatic complexity 18 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function attachAllListeners (cyclomatic 17, cognitive 26) scaladoc/resources/dotty_res/scripts/ux.js:52— attachAllListeners has cyclomatic complexity 17 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity· Complex function b (cyclomatic 14, cognitive 10) · ×1
Complex function b (cyclomatic 14, cognitive 10) REDACTED:187— b has cyclomatic complexity 14 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 11, cognitive 9) REDACTED:198— (anonymous) has cyclomatic complexity 11 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
REDACTED: 1064 lines of code REDACTED:1— REDACTED has 1064 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
X21 · Side-effecting pattern guard· Pattern guard mutates state while matching · ×1
Pattern guard mutates state while matching compiler/src/dotty/tools/dotc/typer/Typer.scala:5084— The `if` guard on line 5084 (`case wtp: MethodType if wtp.isImplicitMethod && ({ resMatch = constrainResult(tree.symbol, wtp, sharpenedPt); resMatch } || !functionExpected) && !ctx.mode.is(Mode.InQuotePatternHoasArgs) =>`) changes `resMatch` with `resMatch = …` while the match is deciding whether that case applies. Scala tests a guard during PATTERN MATCHING — after the case's pattern has matched and before the case is chosen, going on to the next case when it is false — so the change lands whenever this case is merely TESTED, whether or not it is then chosen, and never once an earlier case has matched. And `&&` can skip it, so it does not happen at all whenever what decides first already answers the guard. The accounting therefore depends on evaluation order and on how many cases the subject was tested against, not on any statement a reader can point at: a counter kept this way misses exactly the path the deciding operand rules out, so it cannot reach a limit it is checked against on that path. Move the change out of the guard — leave it reading only (`if resMatch + 1 >= limit`) and put the assignment in the case's BODY, where it runs precisely when the case is chosen, or hoist it above the `match` if it must happen for every subject.
X28 · Index access outside its own emptiness guard· Index access outside its own emptiness guard · ×1
Index access outside its own emptiness guard compiler/src/dotty/tools/dotc/core/NameOps.scala:389— This condition tests `first` for emptiness and then indexes it on a branch that test does not reach. `first(0)` is evaluated whenever the guarded half is false — which includes the case the guard exists to anticipate, `first` being empty — so an empty `first` indexes position 0 of nothing and throws. This same condition already shows the intended bracketing: `first(1)` sits INSIDE the guard. Either the guard is load-bearing, in which case this access escapes it and crashes, or `first` cannot be empty here, in which case the guard beside it is dead code — the condition is wrong under both readings. Move the parenthesis so the emptiness test brackets every access to `first`.
Orphaned file compiler/src/scala/quoted/runtime/impl/printers/Extractors.scala: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 scaladoc/src/dotty/tools/scaladoc/tasty/InkuireSupport.scala: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 compiler/src/dotty/tools/dotc/quoted/QuotePatterns.scala: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 compiler/src/dotty/tools/dotc/transform/Splicing.scala: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 compiler/src/dotty/tools/dotc/core/GadtConstraint.scala: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 library/src/scala/runtime/TupledFunctions.scala: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 compiler/src/dotty/tools/dotc/staging/CrossStageSafety.scala: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 scaladoc/src/dotty/tools/scaladoc/Inkuire.scala: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 compiler/src/dotty/tools/dotc/core/unpickleScala2/PickleFormat.scala: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 compiler/src/dotty/tools/dotc/typer/ConstFold.scala: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 scaladoc/src/dotty/tools/scaladoc/tasty/comments/Preparser.scala: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 scaladoc-js/main/src/searchbar/engine/PageSearchEngine.scala: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 scaladoc/src/dotty/tools/scaladoc/tasty/comments/markdown/SnippetRenderer.scala: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 compiler/src/dotty/tools/dotc/util/ParsedComment.scala: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 library/src/scala/collection/concurrent/Map.scala: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 compiler/src/dotty/tools/dotc/transform/init/Cache.scala: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 library-js/src/scala/reflect/ClassTag.scala: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 compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Flags.scala: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 project/ScalaJarValidate.scala: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 scaladoc/src/dotty/tools/scaladoc/parsers/WikiCodeBlockParser.scala: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 library/src/scala/package.scala: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 library-js/src/scala/package.scala: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 library/src/scala/runtime/Tuple3Zipped.scala: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 sbt-bridge/src/xsbt/CompilerClassLoader.java: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 tasty-inspector/src/scala/tasty/inspector/TastyInspector.scala: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.
Disabled test compiler/test/dotty/tools/dotc/BootstrappedOnlyCompilationTests.scala:131— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test compiler/test/dotty/tools/dotc/DeterminismTest.scala:294— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test compiler/test/dotty/tools/dotc/DeterminismTest.scala:318— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test compiler/test/dotty/tools/dotc/Playground.scala:8— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test compiler/test/dotty/tools/dotc/printing/SyntaxHighlightingTests.scala:123— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test compiler/test/dotty/tools/dotc/profile/FileUtilsTest.scala:53— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test compiler/test/dotty/tools/scripting/BashExitCodeTests.scala:13— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test compiler/test/dotty/tools/scripting/BashScriptsTests.scala:80— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test compiler/test/dotty/tools/scripting/BashScriptsTests.scala:88— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test compiler/test/dotty/tools/scripting/BashScriptsTests.scala:96— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test library/test/scala/collection/immutable/HashMapTest.scala:237— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test library/test/scala/collection/immutable/HashMapTest.scala:259— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test library/test/scala/collection/immutable/HashSetTest.scala:95— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test library/test/scala/collection/immutable/HashSetTest.scala:105— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test library/test/scala/collection/immutable/HashSetTest.scala:149— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test library/test/scala/collection/immutable/HashSetTest.scala:159— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test library/test/scala/collection/immutable/HashSetTest.scala:168— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test library/test/scala/collection/immutable/HashSetTest.scala:178— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test library/test/scala/collection/immutable/HashSetTest.scala:187— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test library/test/scala/collection/immutable/HashSetTest.scala:197— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test library/test/scala/collection/immutable/HashSetTest.scala:206— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test library/test/scala/collection/immutable/HashSetTest.scala:216— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test library/test/scala/collection/immutable/HashSetTest.scala:237— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test library/test/scala/collection/immutable/SortedMapTest.scala:151— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test library/test/scala/collection/immutable/SortedSetTest.scala:14— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Duplicated predicate library-js/src/scala/collection/immutable/NumericRange.scala:137— `!isEmpty && ( (step > zero && start <= elem && elem <= last ) || (step < zero && last <= elem && elem <= start) )` appears character-identically in 2 files — library-js/src/scala/collection/immutable/NumericRange.scala, library/src/scala/collection/immutable/NumericRange.scala. 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 library-js/src/scala/collection/immutable/NumericRange.scala:152— `!r.isInclusive && num.equiv(remainder, num.zero)` appears character-identically in 2 files — library-js/src/scala/collection/immutable/NumericRange.scala, library/src/scala/collection/immutable/NumericRange.scala. 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 library/src/scala/collection/mutable/AnyRefMap.scala:118— `(_size + _vacant) > 0.5*mask || _vacant > _size` appears character-identically in 2 files — library/src/scala/collection/mutable/AnyRefMap.scala, library/src/scala/collection/mutable/LongMap.scala. 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/dotty/tools/dotc/transform/TreeChecker.scala:596— `(ctx.mode is Mode.Pattern) && untpd.isVarPattern(id) && (id.name == nme.WILDCARD || id.name == nme.WILDCARD_STAR)` appears character-identically in 2 files — compiler/src/dotty/tools/dotc/transform/TreeChecker.scala, compiler/src/dotty/tools/dotc/typer/ReTyper.scala. 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 library/src/scala/collection/convert/impl/ChampStepper.scala:112— `(currentValueCursor < currentValueLength) || searchNextValueNode()` appears character-identically in 2 files — library/src/scala/collection/convert/impl/ChampStepper.scala, library/src/scala/collection/immutable/ChampCommon.scala. 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 library-js/src/scala/collection/immutable/NumericRange.scala:323— `(isEmpty) || (start == x.start && last == x.last)` appears character-identically in 2 files — library-js/src/scala/collection/immutable/NumericRange.scala, library/src/scala/collection/immutable/NumericRange.scala. 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 library/src/scala/collection/immutable/Map.scala:446— `(key == key1) || (key == key2) || (key == key3)` appears character-identically in 2 files — library/src/scala/collection/immutable/Map.scala, library/src/scala/collection/immutable/SeqMap.scala. 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 library/src/scala/collection/immutable/Map.scala:564— `(key == key1) || (key == key2) || (key == key3) || (key == key4)` appears character-identically in 2 files — library/src/scala/collection/immutable/Map.scala, library/src/scala/collection/immutable/SeqMap.scala. 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/dotty/tools/dotc/util/NameTransformer.scala:121— `(len - i) >= 6 && ch1 == 'u' && ((Character.isDigit(ch2)) || ('A' <= ch2 && ch2 <= 'F'))` appears character-identically in 2 files — compiler/src/dotty/tools/dotc/util/NameTransformer.scala, library/src/scala/reflect/NameTransformer.scala. 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 library-js/src/scala/collection/immutable/NumericRange.scala:162— `(num.gt(end, start) && num.gt(step, num.zero)) || (num.lt(end, start) && num.sign(step) == -num.one)` appears character-identically in 2 files — library-js/src/scala/collection/immutable/NumericRange.scala, library/src/scala/collection/immutable/NumericRange.scala. 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 library-js/src/scala/collection/immutable/NumericRange.scala:79— `(num.gt(start, end) && num.gt(step, num.zero)) || (num.lt(start, end) && num.lt(step, num.zero)) || (num.equiv(start, end) && !isInclusive)` appears character-identically in 2 files — library-js/src/scala/collection/immutable/NumericRange.scala, library/src/scala/collection/immutable/NumericRange.scala. 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 library-js/src/scala/collection/immutable/NumericRange.scala:435— `(posStep && num.lt(startlim, start)) || (!posStep && num.gt(startlim, start))` appears character-identically in 2 files — library-js/src/scala/collection/immutable/NumericRange.scala, library/src/scala/collection/immutable/NumericRange.scala. 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 library/src/scala/collection/mutable/AnyRefMap.scala:274— `_size + _vacant >= 0.5*mask && !(_vacant > 0.2*mask)` appears character-identically in 2 files — library/src/scala/collection/mutable/AnyRefMap.scala, library/src/scala/collection/mutable/LongMap.scala. 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/dotty/tools/dotc/transform/localopt/FormatChecker.scala:233— `checkIsStringify(tp1) || checkIsStringify(tp2)` appears character-identically in 2 files — compiler/src/dotty/tools/dotc/transform/localopt/FormatChecker.scala, compiler/src/dotty/tools/dotc/transform/localopt/StringInterpolatorOpt.scala. 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/dotty/tools/dotc/reporting/messages.scala:3966— `clazz.isAnonymousClass || clazz.is(Module)` appears character-identically in 2 files — compiler/src/dotty/tools/dotc/reporting/messages.scala, compiler/src/dotty/tools/dotc/typer/RefChecks.scala. 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/dotty/tools/dotc/core/TypeErasure.scala:908— `cls.isSpecializedTraitImplementationClass && !cls.isRawSpecializedTraitImplementationClass` appears character-identically in 2 files — compiler/src/dotty/tools/dotc/core/TypeErasure.scala, compiler/src/dotty/tools/dotc/transform/Erasure.scala. 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 library/src/scala/collection/LazyZipOps.scala:185— `coll1.isEmpty || coll2.isEmpty || coll3.isEmpty` appears character-identically in 2 files — library/src/scala/collection/LazyZipOps.scala, library/src/scala/runtime/Tuple3Zipped.scala. 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/dotty/tools/dotc/core/Definitions.scala:1710— `ctx.mode.is(Mode.SafeNulls) && !ctx.phase.erasedTypes` appears character-identically in 3 files — compiler/src/dotty/tools/dotc/core/Definitions.scala, compiler/src/dotty/tools/dotc/core/SymDenotations.scala, compiler/src/dotty/tools/dotc/core/Types.scala. 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/dotty/tools/dotc/printing/PlainPrinter.scala:784— `ctx.settings.XprintTypes.value && tree.hasType` appears character-identically in 2 files — compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala, compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala. 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 library/src/scala/collection/LazyZipOps.scala:181— `elems1.hasNext && elems2.hasNext && elems3.hasNext` appears character-identically in 2 files — library/src/scala/collection/LazyZipOps.scala, library/src/scala/runtime/Tuple3Zipped.scala. 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/dotty/tools/tasty/besteffort/BestEffortTastyHeaderUnpickler.scala:163— `file.isExperimental && file.major == read.major && file.minor <= read.minor` appears character-identically in 2 files — compiler/src/dotty/tools/tasty/besteffort/BestEffortTastyHeaderUnpickler.scala, tasty/src/dotty/tools/tasty/TastyHeaderUnpickler.scala. 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/dotty/tools/tasty/besteffort/BestEffortTastyHeaderUnpickler.scala:157— `file.major == read.major && file.minor == read.minor && file.isExperimental && read.isExperimental` appears character-identically in 2 files — compiler/src/dotty/tools/tasty/besteffort/BestEffortTastyHeaderUnpickler.scala, tasty/src/dotty/tools/tasty/TastyHeaderUnpickler.scala. 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/dotty/tools/dotc/core/tasty/TastyUnpickler.scala:67— `fileVersion.isExperimental && experimentalVersion == 0` appears character-identically in 2 files — compiler/src/dotty/tools/dotc/core/tasty/TastyUnpickler.scala, tasty/src/dotty/tools/tasty/TastyHeaderUnpickler.scala. 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 library-js/src/scala/collection/immutable/NumericRange.scala:207— `fitsInInteger(leftLength) && fitsInInteger(rightLength)` appears character-identically in 2 files — library-js/src/scala/collection/immutable/NumericRange.scala, library/src/scala/collection/immutable/NumericRange.scala. 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 library/src/scala/collection/mutable/TreeMap.scala:197— `from.isEmpty || ordering.compare(from.get, key) <= 0` appears character-identically in 2 files — library/src/scala/collection/mutable/TreeMap.scala, library/src/scala/collection/mutable/TreeSet.scala. 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.
Fat interface: Product16[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16] (16 abstract members) library/src/scala/Product16.scala:41— `Product16[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16]` declares 16 abstract members: `_1`, `_2`, `_3`, `_4`, `_5`, `_6`, `_7`, `_8`, `_9`, `_10`, `_11`, `_12`, `_13`, `_14`, `_15`, `_16`. Counted over its ABSTRACT members — a `def` with no body or a `val`/`var` with no initializer, once per signature; concrete members, private and protected members, and members of a companion `object` 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.
Fat interface: Product17[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17] (17 abstract members) library/src/scala/Product17.scala:42— `Product17[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17]` declares 17 abstract members: `_1`, `_2`, `_3`, `_4`, `_5`, `_6`, `_7`, `_8`, `_9`, `_10`, `_11`, `_12`, `_13`, `_14`, `_15`, `_16`, `_17`. Counted over its ABSTRACT members — a `def` with no body or a `val`/`var` with no initializer, once per signature; concrete members, private and protected members, and members of a companion `object` 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.
Fat interface: Product18[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18] (18 abstract members) library/src/scala/Product18.scala:43— `Product18[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18]` declares 18 abstract members: `_1`, `_2`, `_3`, `_4`, `_5`, `_6`, `_7`, `_8`, `_9`, `_10`, `_11`, `_12`, `_13`, `_14`, `_15`, `_16`, `_17`, `_18`. Counted over its ABSTRACT members — a `def` with no body or a `val`/`var` with no initializer, once per signature; concrete members, private and protected members, and members of a companion `object` 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.
Fat interface: Product19[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19] (19 abstract members) library/src/scala/Product19.scala:44— `Product19[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19]` declares 19 abstract members: `_1`, `_2`, `_3`, `_4`, `_5`, `_6`, `_7`, `_8`, `_9`, `_10`, `_11`, `_12`, `_13`, `_14`, `_15`, `_16`, `_17`, `_18`, `_19`. Counted over its ABSTRACT members — a `def` with no body or a `val`/`var` with no initializer, once per signature; concrete members, private and protected members, and members of a companion `object` 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.
Fat interface: Product20[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20] (20 abstract members) library/src/scala/Product20.scala:45— `Product20[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20]` declares 20 abstract members: `_1`, `_2`, `_3`, `_4`, `_5`, `_6`, `_7`, `_8`, `_9`, `_10`, `_11`, `_12`, `_13`, `_14`, `_15`, `_16`, `_17`, `_18`, `_19`, `_20`. Counted over its ABSTRACT members — a `def` with no body or a `val`/`var` with no initializer, once per signature; concrete members, private and protected members, and members of a companion `object` 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.
Fat interface: Product21[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21] (21 abstract members) library/src/scala/Product21.scala:46— `Product21[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21]` declares 21 abstract members: `_1`, `_2`, `_3`, `_4`, `_5`, `_6`, `_7`, `_8`, `_9`, `_10`, `_11`, `_12`, `_13`, `_14`, `_15`, `_16`, `_17`, `_18`, `_19`, `_20`, `_21`. Counted over its ABSTRACT members — a `def` with no body or a `val`/`var` with no initializer, once per signature; concrete members, private and protected members, and members of a companion `object` 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.
Fat interface: Product22[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22] (22 abstract members) library/src/scala/Product22.scala:47— `Product22[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22]` declares 22 abstract members: `_1`, `_2`, `_3`, `_4`, `_5`, `_6`, `_7`, `_8`, `_9`, `_10`, `_11`, `_12`, `_13`, `_14`, `_15`, `_16`, `_17`, `_18`, `_19`, `_20`, `_21`, `_22`. Counted over its ABSTRACT members — a `def` with no body or a `val`/`var` with no initializer, once per signature; concrete members, private and protected members, and members of a companion `object` 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.
Fat interface: reflectModule (111 abstract members) library/src/scala/quoted/Quotes.scala:269— `reflectModule` declares 111 abstract members: `CompilationInfo`, `Tree`, `PackageClause`, `Import`, `Export`, `Definition`, `ClassDef`, `DefDef`, `ValDef`, `TypeDef`, `Term`, `Ref`, `Ident`, `Wildcard`, `Select`, `Literal`, `This`, `New`, `NamedArg`, `Apply`, `TypeApply`, `Super`, `Typed`, `Assign`, `Block`, `Closure`, `Lambda`, `If`, `Match`, `SummonFrom`, `Try`, `Return`, `Repeated`, `Inlined`, `SelectOuter`, `While`, `TypedOrTest`, `TypeTree`, `Inferred`, `TypeIdent`, and 71 more. Counted over its ABSTRACT members — a `def` with no body or a `val`/`var` with no initializer, once per signature; concrete members, private and protected members, and members of a companion `object` 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.
Fat interface: SymbolModule (18 abstract members) library/src/scala/quoted/Quotes.scala:4362— `SymbolModule` declares 18 abstract members under just 15 distinct name(s): `spliceOwner`, `requiredPackage`, `requiredClass`, `requiredModule`, `requiredMethod`, `classSymbol`, `newClass`, `newClass`, `newClass`, `newModule`, `newMethod`, `newMethod`, `newVal`, `newBind`, `newTypeAlias`, `newBoundedType`, `noSymbol`, `freshName`. Counted over its ABSTRACT members — a `def` with no body or a `val`/`var` with no initializer, once per signature; concrete members, private and protected members, and members of a companion `object` are not counted, because no implementer is forced to write them. That is an OVERLOAD SET, not 18 separate responsibilities: a caller binds to 15 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller's side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER's — all 18 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface.
Fat interface: defnModule (46 abstract members) library/src/scala/quoted/Quotes.scala:5200— `defnModule` declares 46 abstract members: `RootPackage`, `RootClass`, `EmptyPackageClass`, `ScalaPackage`, `ScalaPackageClass`, `AnyClass`, `MatchableClass`, `AnyValClass`, `ObjectClass`, `AnyRefClass`, `NullClass`, `NothingClass`, `UnitClass`, `ByteClass`, `ShortClass`, `CharClass`, `IntClass`, `LongClass`, `FloatClass`, `DoubleClass`, `BooleanClass`, `StringClass`, `ClassClass`, `ArrayClass`, `PredefModule`, `Predef_classOf`, `JavaLangPackage`, `ArrayModule`, `Array_apply`, `Array_clone`, `Array_length`, `Array_update`, `RepeatedParamClass`, `RepeatedAnnot`, `OptionClass`, `NoneModule`, `SomeModule`, `ProductClass`, `FunctionClass`, `FunctionClass`, and 6 more. Counted over its ABSTRACT members — a `def` with no body or a `val`/`var` with no initializer, once per signature; concrete members, private and protected members, and members of a companion `object` are not counted, because no implementer is forced to write them. Those 46 declarations carry 44 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 44 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. 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.
Fat interface: FlagsModule (47 abstract members) library/src/scala/quoted/Quotes.scala:5405— `FlagsModule` declares 47 abstract members: `Abstract`, `AbsOverride`, `Artifact`, `Case`, `CaseAccessor`, `Contravariant`, `Covariant`, `Deferred`, `EmptyFlags`, `Enum`, `Erased`, `Exported`, `ExtensionMethod`, `FieldAccessor`, `Final`, `Given`, `HasDefault`, `Implicit`, `Infix`, `Inline`, `Invisible`, `JavaDefined`, `JavaStatic`, `JavaAnnotation`, `Lazy`, `Local`, `Macro`, `Method`, `Module`, `Mutable`, `NoInits`, `Opaque`, `Open`, `Override`, `Package`, `Param`, `ParamAccessor`, `Private`, `PrivateLocal`, `Protected`, and 7 more. Counted over its ABSTRACT members — a `def` with no body or a `val`/`var` with no initializer, once per signature; concrete members, private and protected members, and members of a companion `object` 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.
Fat interface: ProcessBuilder (35 abstract members) library/src/scala/sys/process/ProcessBuilder.scala:138— `ProcessBuilder` declares 35 abstract members under just 15 distinct name(s): `!!`, `!!`, `!!<`, `!!<`, `lazyLines`, `lazyLines`, `lazyLines`, `lazyLines`, `lazyLines_!`, `lazyLines_!`, `lazyLines_!`, `lazyLines_!`, `lineStream`, `lineStream`, `lineStream`, `lineStream`, `lineStream_!`, `lineStream_!`, `lineStream_!`, `lineStream_!`, `!`, `!`, `!<`, `!<`, `run`, `run`, `run`, `run`, `run`, `#&&`, `#||`, `#|`, `###`, `canPipeTo`, `hasExitValue`. Counted over its ABSTRACT members — a `def` with no body or a `val`/`var` with no initializer, once per signature; concrete members, private and protected members, and members of a companion `object` are not counted, because no implementer is forced to write them. That is an OVERLOAD SET, not 35 separate responsibilities: a caller binds to 15 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller's side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER's — all 35 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface.
Blanket warning suppression compiler/src/dotty/tools/dotc/profile/Profiler.scala:198— A bare `// scalastyle:off`, `// scalafix:off` or `@nowarn` (or Wartremover's `warts.All`) switches every rule or warning off — hidden debt. Suppress the specific rule on the specific line, with a justification, instead.
Blanket warning suppression library/src/scala/io/Position.scala:104— A bare `// scalastyle:off`, `// scalafix:off` or `@nowarn` (or Wartremover's `warts.All`) switches every rule or warning off — hidden debt. Suppress the specific rule on the specific line, with a justification, instead.
Blanket warning suppression library/src/scala/jdk/DoubleAccumulator.scala:256— A bare `// scalastyle:off`, `// scalafix:off` or `@nowarn` (or Wartremover's `warts.All`) switches every rule or warning off — hidden debt. Suppress the specific rule on the specific line, with a justification, instead.
Blanket warning suppression library/src/scala/jdk/IntAccumulator.scala:262— A bare `// scalastyle:off`, `// scalafix:off` or `@nowarn` (or Wartremover's `warts.All`) switches every rule or warning off — hidden debt. Suppress the specific rule on the specific line, with a justification, instead.
Blanket warning suppression library/src/scala/jdk/LongAccumulator.scala:257— A bare `// scalastyle:off`, `// scalafix:off` or `@nowarn` (or Wartremover's `warts.All`) switches every rule or warning off — hidden debt. Suppress the specific rule on the specific line, with a justification, instead.
Blanket warning suppression library/src/scala/runtime/LazyVals.scala:12— A bare `// scalastyle:off`, `// scalafix:off` or `@nowarn` (or Wartremover's `warts.All`) switches every rule or warning off — hidden debt. Suppress the specific rule on the specific line, with a justification, instead.
Blanket warning suppression library/src/scala/specialize/Specialized.scala:5— A bare `// scalastyle:off`, `// scalafix:off` or `@nowarn` (or Wartremover's `warts.All`) switches every rule or warning off — hidden debt. Suppress the specific rule on the specific line, with a justification, instead.
Blanket warning suppression presentation-compiler/src/main/dotty/tools/pc/completions/CompletionValue.scala:52— A bare `// scalastyle:off`, `// scalafix:off` or `@nowarn` (or Wartremover's `warts.All`) switches every rule or warning off — hidden debt. Suppress the specific rule on the specific line, with a justification, instead.
Silent fallback default in catch compiler/src/dotty/tools/dotc/core/TypeErrors.scala:49— `getMessage` swallows every exception into `"TypeError"` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default in catch compiler/src/dotty/tools/dotc/semanticdb/SemanticSymbolBuilder.scala:123— `loop` (in `inverseSymbol`) swallows every exception into `Nil` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default in catch compiler/src/dotty/tools/dotc/semanticdb/SemanticSymbolBuilder.scala:205— `inverseSymbol` swallows every exception into `Nil` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default in catch presentation-compiler/src/main/dotty/tools/pc/SymbolInformationProvider.scala:126— `compilerSymbols` swallows every exception into `Nil` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default in catch presentation-compiler/src/main/dotty/tools/pc/completions/Completions.scala:301— `safeConstructorMembers` (in `completionsWithAffix`) swallows every exception into `Nil` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default in catch scaladoc/src/dotty/tools/scaladoc/site/StaticSiteContext.scala:95— `possibleLinks` (in `driForLink`) swallows every exception into `Seq.empty` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch case or in the Scaladoc, and the row stops firing.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 39 significant file(s) lose their only recent owner: compiler/src/dotty/tools/backend/jvm/opt/Inliner.scala, compiler/src/dotty/tools/backend/jvm/BCodeSkelBuilder.scala, compiler/src/dotty/tools/backend/jvm/BTypes.scala, compiler/src/dotty/tools/backend/jvm/opt/CopyProp.scala, compiler/src/dotty/tools/backend/jvm/BCodeHelpers.scala, compiler/src/dotty/tools/backend/jvm/opt/ClosureOptimizer.scala, compiler/src/dotty/tools/backend/jvm/BCodeUtils.scala, compiler/src/dotty/tools/backend/jvm/analysis/AliasingAnalyzer.scala (+31 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 6 significant file(s) lose their only recent owner: compiler/src/dotty/tools/dotc/cc/Mutability.scala, compiler/src/dotty/tools/dotc/cc/CCState.scala, compiler/src/dotty/tools/dotc/cc/Synthetics.scala, compiler/src/dotty/tools/dotc/cc/CapturingType.scala, compiler/src/dotty/tools/dotc/cc/RetainingAnnotation.scala, compiler/src/dotty/tools/dotc/cc/ccConfig.scala. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 3 significant file(s) lose their only recent owner: compiler/src/dotty/tools/dotc/transform/localopt/StringInterpolatorOpt.scala, compiler/src/dotty/tools/dotc/transform/localopt/DropForMap.scala, compiler/src/dotty/tools/dotc/util/Chars.scala. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #4 — If anonymized user #4 becomes unavailable, 3 significant file(s) lose their only recent owner: scaladoc/src/dotty/tools/scaladoc/snippets/SnippetExpectations.scala, scaladoc/src/dotty/tools/scaladoc/snippets/WrappedSnippet.scala, scaladoc/src/dotty/tools/scaladoc/tasty/comments/MarkdownParser.scala. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #5 — If anonymized user #5 becomes unavailable, 3 significant file(s) lose their only recent owner: library/src/scala/util/CommandLineParser.scala, library/src/scala/quoted/runtime/QuoteUnpickler.scala, library/src/scala/jdk/OptionShape.scala. Pair on, review, or document these before any departure.
Silent fallback default on parse failure compiler/src/dotty/tools/dotc/core/TypeComparer.scala:1921— `compareCaptured` (in `isSubArgs`) answers `false` when `TypeError` is thrown, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default on parse failure compiler/src/dotty/tools/dotc/interactive/Completion.scala:510— `safeExtensionCompletions` (in `selectionCompletions`) answers `Map.empty` when `TypeError` is thrown, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default on parse failure compiler/src/dotty/tools/dotc/interactive/Interactive.scala:287— `safely` answers `Nil` when `TypeError` is thrown, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch case or in the Scaladoc, and the row stops firing.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 11 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (71 single-owned of 867 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 867 of the 1629 production source files in this repository met that bar). They are anonymized user #6 (2 file(s)), anonymized user #7 (2 file(s)), anonymized user #8 (2 file(s)), anonymized user #9 (2 file(s)), anonymized user #10 (2 file(s)), anonymized user #11 (2 file(s)) (+5 more) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: compiler/src/dotty/tools/backend/sjs/JSEncoding.scala, compiler/src/dotty/tools/dotc/transform/sjs/JSSymUtils.scala, repl/src/dotty/tools/repl/ReplDirectives.scala, repl/src/dotty/tools/repl/ReplCommands.scala, project/scripts/syncStdLib.scala, community-build/src/scala/dotty/communitybuild/Main.scala, scaladoc/src/dotty/tools/scaladoc/renderers/DocRenderer.scala, scaladoc/src/dotty/tools/scaladoc/util/html.scala (+9 more).
No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 1 of 2 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `(repository root)` (330412 LoC, 5405 module-visible types across 174 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
REDACTED
D34 · Knowledge Freshness· Further orphaned files (smaller) · ×1
Further orphaned files (smaller) — 75 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: compiler/src/scala/quoted/runtime/impl/printers/Extractors.scala, scaladoc/src/dotty/tools/scaladoc/tasty/InkuireSupport.scala, compiler/src/dotty/tools/dotc/quoted/QuotePatterns.scala, compiler/src/dotty/tools/dotc/transform/Splicing.scala, compiler/src/dotty/tools/dotc/core/GadtConstraint.scala, library/src/scala/runtime/TupledFunctions.scala, compiler/src/dotty/tools/dotc/staging/CrossStageSafety.scala, scaladoc/src/dotty/tools/scaladoc/Inkuire.scala (and 67 more) (78 orphaned of 867 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 867 of the 1629 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
Thin README — The root README is 108 words, against a bar of 120. Of the three newcomer-critical sections this check looks for by heading, it found no a build/run or getting-started section, no a testing section, no an architecture or project-map section. Sections are matched on HEADING text only, so material written under a heading this check does not recognise — or with no heading at all — is not seen and this row may understate what the document covers.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P10 · Library API & versioning· Large public API surface · ×1
Large public API surface — 87/99 types (88%) declared in the published library are public. For a library, every public type is a stability contract — keep implementation types off the surface and expose only the intended API.
No SAST — No static application security testing detected. For this repository's stack, add scalafix or scapegoat (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 119940 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.
Benchmarks don't track allocations bench-run/src/main/scala/tuples/Drop.scala— A JMH/Jetpack Benchmark suite exists but nothing turns on its allocation measurement — allocations (the main way hot code pressures a garbage collector or allocator) aren't being measured.
X23 · Unguarded diagnostic materialisation· Diagnostic log message is built whether or not it is wanted · ×1
Diagnostic log message is built whether or not it is wanted compiler/src/dotty/tools/dotc/interactive/Completion.scala:743— `fine` at line 743 is called with an argument built by `ex.getStackTrace().mkString("…")` (line 744), whose cost grows with the collection it walks. Scala evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because fine is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: the logger takes a built `String` (SLF4J, Akka/Pekko `LoggingAdapter`, `context.log`), and there is no `isDebugEnabled`/`isTraceEnabled` test and no debug flag.
Hand-rolled JSON/XML parsing via regex scaladoc/src/dotty/tools/scaladoc/tasty/comments/CommentRegex.scala:56— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JVM code already uses a real parser in the same package; use it here too.
Outdated: jekyll — `jekyll` is resolved to 4.3.4 in the committed Gemfile.lock but 4.4.1 is the current release on rubygems.org, and docs/_spec/Gemfile declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. Run `bundle update jekyll` and commit the updated Gemfile.lock.
Outdated: jekyll-sass-converter — `jekyll-sass-converter` is resolved to 3.0.0 in the committed Gemfile.lock but 3.1.0 is the current release on rubygems.org, and it already satisfies the `"~> 3.0"` requirement declared in docs/_spec/Gemfile — so the lockfile is behind this repository's own declared range. This build is therefore missing every fix published since, including any security fix. Run `bundle update jekyll-sass-converter` and commit the updated Gemfile.lock.
Outdated: rouge — `rouge` is resolved to 4.7.0 in the committed Gemfile.lock but 5.1.0 is the current release on rubygems.org, and docs/_spec/Gemfile declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. This crosses a major version, so read the changelog before taking it. Run `bundle update rouge` and commit the updated Gemfile.lock.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 480 file(s) — `bench-run/src/main/scala/dotty/tools/benchmarks/tuples/Map.scala`, `bench-run/src/main/scala/dotty/tools/benchmarks/tuples/TupleOps.scala`, `community-build/src/scala/dotty/communitybuild/Main.scala`, `community-build/src/scala/dotty/communitybuild/projects.scala`, `compiler/src/dotty/tools/MainGenericCompiler.scala`, … (+475 more) — so the PII/GDPR sweep did not cover them at all.
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 01a176df-af46-7843-ba17-a7db70974de7 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 20 · Warnings: 2339 · Recommendations: 174 · Info: 3 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 26-10-2026 @ 06:22 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.