Public report — Oly, published 3 Oct 2026.
Concrete security findings (which rule fired, in which file, on which line; CVE IDs, secret matches,
dependency versions) are REDACTED in this version; ask the repo owner for the full report.
Public
Codebase surveyMeasured under the Code Assurance Index · rubric rubric-2026.10.1 (frozen) · verify this surveyFiledcd_d7b46ce166cb4bf580a5bc6c0855101a
Filed 3 October 2026, 03:37 UTC
Public
Medium · 83,233 LoC · 31 projects · rebuild ~1.0 person-years · weakest lens: Code Health (51%)
Findings by grade
16 critical432 serious19 minor24 could not be resolved — could be critical — see Limitations
This survey was produced by
Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
3 October 2026, 03:34 UTC
A measurement, not a certificate. The Code Assurance Index does not certify,
approve or guarantee this codebase; it records a reproducible number and the evidence it was computed from. The
standard is authored by Canine Development, who also build Watchdog — its only implementation today. That is said
here so the number is checked rather than believed.
Grounded in facts. Every number here is computed, not narrated — reproducible, tool-backed, and traceable to a line of code. How to trust this ▸
442findings with an exact file:lineof 467 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
66/132dimensions across the health lenses83233 LoC · 31 projects — wide & deep
The system holds an adequate standing with a health score of 60%, but it carries significant hidden risks that threaten delivery speed and long-term cost efficiency. While the architecture is robust and security posture is strong, the underlying code quality is poor, creating a substantial velocity tax on every change. This means that routine updates and new features will take longer and cost more than necessary, eroding the value of the medium-sized asset, which represents roughly one person-year of effort to rebuild.
The primary risk is a velocity tax caused by complex, duplicated, and poorly cohesive code. This structural debt acts as a drag on productivity, plausibly increasing the cost of modifications by 13–29%. For a team changing hundreds of thousands of lines annually, this inefficiency compounds, turning simple tasks into expensive endeavors. The second major theme is concentrated value against weak foundations. With code health being the weakest lens, the operational risk is highest here. While the system is secure and performant, the lack of maintainability means that future changes are prone to defects and delays, undermining the reliability of the business logic.
Despite these challenges, the system has genuine strengths. The architecture is solid, with a high score indicating that changes are less likely to cause unintended ripple effects across the system. Security is also excellent, with minimal exposure to vulnerabilities, and performance is top-tier. These factors provide a stable platform, but they cannot compensate for the friction introduced by poor code quality. The system is safe to operate today, but it is not optimized for the pace of modern business needs.
The highest-leverage action is to split oversized files into smaller, focused modules based on their existing responsibilities. This single move pays for itself within one to two months by reducing the annual drag on engineering time. It is the most effective way to stop the bleeding of productivity and improve code health without a massive rewrite. Other improvements, such as enabling nullable reference types and documenting decisions, should follow once this foundational work is complete. The picture is partial, as domain modeling and event-driven aspects were not measured, but the current data clearly points to code structure as the immediate bottleneck. Focus here first to unlock faster, cheaper delivery.
How the score is built — each lens's share of the headlineWidth is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
AX8 · Production project references a test project: Oly.Targets.Spirv.Tests → Oly.Compiler.Tests
AX8 · Production project references a test project: Oly.Targets.Spirv.Tests → Spirv.Tests
A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.
0.8× (at 60% quality) — the last 20% of quality is most of the work
Size & shape
Medium · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)
This codebase represents roughly ~1.0 person-years of build effort (about ~€150,000 to rebuild). Its weakest lens is Code Health at 51% — the part of that asset most exposed by the findings below.
How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.0) — standard service × a 0.8× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source · effort from total production LoC as straight-line logic (the tier split is a C#-only syntax walk), a conservative lower bound. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).
Top priorities
The highest-leverage moves; the full ranked list is in the Roadmap below.
1
Resolve the 1 No ADRs found finding(s) in ADR Quality.
The code-quality signals (complexity, duplication, cohesion) average 2.9/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 13–29% more than in clean code, and the tax compounds as the codebase grows. (A modelled estimate, not a measured fact.)
Evidence: D1/D2 code quality: averaging 2.9/10 across the code-quality signals actually measured
→ Pay it down where churn is highest — the hotspots — not everywhere; that's where the tax is actually paid.
The top fix pays for itself · High · Economics
The top-ranked fix costs roughly 1–3 engineer-days once. Not doing it costs about 141.9–851.4 engineer-days every year, paid as drag on the ~444,724 lines this team changes annually — a bill that arrives whether or not anyone books it. On those figures the fix breaks even in roughly 1–2 months and is free after that. Method, stated so this is not read as a quotation: debt from the ranked task's effort band; interest = annual changed lines (measured, annualised from the 90-day window) ÷ an ASSUMED 150–400 lines per engineer-day × the 13–29% drag implied by the code-quality signals; breaking point = debt ÷ annual interest. A modelled planning range built from measured inputs and one named assumption — not a quotation, a valuation, or a certified figure.
Evidence: D15 churn: 109,658 line(s) changed over a 90-day window ⇒ ~444,724/year · D1/D2 code quality: averaging 2.9/10 ⇒ a 13–29% drag on each change · top-ranked remediation: Low effort ⇒ about 1–3 engineer-day(s)
→ Do the top-ranked fix now if this code will still be yours in 2 months.
Value concentrated against a weak lens · Medium · Value at risk
This is a Medium asset (~1.0 person-years to rebuild), and its weakest lens is Code Health at 51%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
→ Direct remediation budget at Code Health first — highest risk-reduction per euro on an asset this size.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Architecture — bounded-context dependency graph
Each box is a bounded context (its layer projects grouped, or a project count when large); arrows show dependencies between contexts. A shared kernel is where many arrows converge.
Architecture — module dependency matrix
Rows and columns are the same modules, ordered so that a module only depends on ones above it. A cell means the row depends on the column, and its number is how many type pairs create that dependency. Read one thing: is anything above the diagonal? A mark there is a dependency cycle. (A cycle is all this shows — an unusual but cycle-free dependency sits below the diagonal like any other.)
337 modules, 436 dependencies. 2 dependency cycles across 4 modules, marked above the diagonal.
Showing the 40 most-connected modules; 297 more are not drawn.
Module dependency matrix. The row depends on the column; the number is how many type pairs create the dependency. A cell above the diagonal is part of a dependency cycle.
Oly.Compiler.Syntax uses Oly.Compiler.Syntax.Internal. Changing Oly.Compiler.Syntax.Internal can break Oly.Compiler.Syntax, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
8→5 Oly.Compiler.Syntax depends on Oly.Compiler.Text✕
Type pairs
64 distinct (type in Oly.Compiler.Syntax → type in Oly.Compiler.Text) references. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Oly.Compiler.Syntax uses Oly.Compiler.Text. Changing Oly.Compiler.Text can break Oly.Compiler.Syntax, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
9→6 Oly.Runtime.CodeGen.InternalTypes depends on Oly.Metadata✕
Type pairs
29 distinct (type in Oly.Runtime.CodeGen.InternalTypes → type in Oly.Metadata) references. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Oly.Compiler.Internal.SymbolBuilders uses Oly.Compiler.Internal.Symbols. Changing Oly.Compiler.Internal.Symbols can break Oly.Compiler.Internal.SymbolBuilders, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
11→2 Oly.Compiler.Internal.SymbolOperations depends on Oly.Core✕
Type pairs
1 distinct (type in Oly.Compiler.Internal.SymbolOperations → type in Oly.Core) reference.
Oly.Compiler.Internal.SymbolOperations uses Oly.Core. Changing Oly.Core can break Oly.Compiler.Internal.SymbolOperations, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
11→7 Oly.Compiler.Internal.SymbolOperations depends on Oly.Compiler.Internal.Symbols✕
Type pairs
49 distinct (type in Oly.Compiler.Internal.SymbolOperations → type in Oly.Compiler.Internal.Symbols) references. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Oly.Compiler.Internal.SymbolOperations uses Oly.Compiler.Internal.Symbols. Changing Oly.Compiler.Internal.Symbols can break Oly.Compiler.Internal.SymbolOperations, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
Oly.Compiler.Internal.CompilerImports uses Oly.Core. Changing Oly.Core can break Oly.Compiler.Internal.CompilerImports, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
13→6 Oly.Compiler.Internal.CompilerImports depends on Oly.Metadata✕
Type pairs
39 distinct (type in Oly.Compiler.Internal.CompilerImports → type in Oly.Metadata) references. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Oly.Compiler.Internal.CompilerImports uses Oly.Metadata. Changing Oly.Metadata can break Oly.Compiler.Internal.CompilerImports, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
13→7 Oly.Compiler.Internal.CompilerImports depends on Oly.Compiler.Internal.Symbols✕
Type pairs
134 distinct (type in Oly.Compiler.Internal.CompilerImports → type in Oly.Compiler.Internal.Symbols) references. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Oly.Compiler.Internal.CompilerImports uses Oly.Compiler.Internal.Symbols. Changing Oly.Compiler.Internal.Symbols can break Oly.Compiler.Internal.CompilerImports, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
13→10 Oly.Compiler.Internal.CompilerImports depends on Oly.Compiler.Internal.SymbolBuilders✕
Type pairs
2 distinct (type in Oly.Compiler.Internal.CompilerImports → type in Oly.Compiler.Internal.SymbolBuilders) references.
Oly.Compiler.Internal.CompilerImports uses Oly.Compiler.Internal.SymbolBuilders. Changing Oly.Compiler.Internal.SymbolBuilders can break Oly.Compiler.Internal.CompilerImports, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
14→6 Oly.Compiler.Internal.SymbolEnvironments depends on Oly.Metadata✕
Type pairs
1 distinct (type in Oly.Compiler.Internal.SymbolEnvironments → type in Oly.Metadata) reference.
Oly.Compiler.Internal.SymbolEnvironments uses Oly.Compiler.Internal.Symbols. Changing Oly.Compiler.Internal.Symbols can break Oly.Compiler.Internal.SymbolEnvironments, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
14→11 Oly.Compiler.Internal.SymbolEnvironments depends on Oly.Compiler.Internal.SymbolOperations✕
Type pairs
7 distinct (type in Oly.Compiler.Internal.SymbolEnvironments → type in Oly.Compiler.Internal.SymbolOperations) references.
Oly.Compiler.Internal.SymbolEnvironments uses Oly.Compiler.Internal.SymbolOperations. Changing Oly.Compiler.Internal.SymbolOperations can break Oly.Compiler.Internal.SymbolEnvironments, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
15→1 Oly.Emitters.DotNet depends on DotNet.Metadata✕
Type pairs
8 distinct (type in Oly.Emitters.DotNet → type in DotNet.Metadata) references.
Oly.Runtime.CodeGen.Internal uses Oly.Runtime.CodeGen.InternalTypes. Changing Oly.Runtime.CodeGen.InternalTypes can break Oly.Runtime.CodeGen.Internal, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
17→12 Oly.Runtime.CodeGen.Internal depends on Oly.Runtime.CodeGen✕
Type pairs
3 distinct (type in Oly.Runtime.CodeGen.Internal → type in Oly.Runtime.CodeGen) references.
Oly.Runtime.CodeGen.Internal uses Oly.Runtime.CodeGen. Changing Oly.Runtime.CodeGen can break Oly.Runtime.CodeGen.Internal, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
18→7 Oly.Compiler.Internal.BoundTree depends on Oly.Compiler.Internal.Symbols✕
Type pairs
37 distinct (type in Oly.Compiler.Internal.BoundTree → type in Oly.Compiler.Internal.Symbols) references. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Oly.Compiler.Internal.BoundTree uses Oly.Compiler.Internal.Symbols. Changing Oly.Compiler.Internal.Symbols can break Oly.Compiler.Internal.BoundTree, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
18→8 Oly.Compiler.Internal.BoundTree depends on Oly.Compiler.Syntax✕
Type pairs
21 distinct (type in Oly.Compiler.Internal.BoundTree → type in Oly.Compiler.Syntax) references.
Oly.Compiler.Internal.BoundTree uses Oly.Compiler.Internal.SymbolEnvironments. Changing Oly.Compiler.Internal.SymbolEnvironments can break Oly.Compiler.Internal.BoundTree, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
19→7 Oly.Compiler.Internal.SymbolQuery depends on Oly.Compiler.Internal.Symbols✕
Type pairs
9 distinct (type in Oly.Compiler.Internal.SymbolQuery → type in Oly.Compiler.Internal.Symbols) references.
Oly.Compiler.Internal.SymbolQuery uses Oly.Compiler.Internal.Symbols. Changing Oly.Compiler.Internal.Symbols can break Oly.Compiler.Internal.SymbolQuery, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
19→11 Oly.Compiler.Internal.SymbolQuery depends on Oly.Compiler.Internal.SymbolOperations✕
Type pairs
1 distinct (type in Oly.Compiler.Internal.SymbolQuery → type in Oly.Compiler.Internal.SymbolOperations) reference.
Oly.Compiler.Internal.SymbolQuery uses Oly.Compiler.Internal.SymbolOperations. Changing Oly.Compiler.Internal.SymbolOperations can break Oly.Compiler.Internal.SymbolQuery, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
19→14 Oly.Compiler.Internal.SymbolQuery depends on Oly.Compiler.Internal.SymbolEnvironments✕
Type pairs
2 distinct (type in Oly.Compiler.Internal.SymbolQuery → type in Oly.Compiler.Internal.SymbolEnvironments) references.
Oly.Compiler.Internal.SymbolQuery uses Oly.Compiler.Internal.SymbolEnvironments. Changing Oly.Compiler.Internal.SymbolEnvironments can break Oly.Compiler.Internal.SymbolQuery, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
20→7 Oly.Compiler.Internal.Binder.Environment depends on Oly.Compiler.Internal.Symbols✕
Type pairs
14 distinct (type in Oly.Compiler.Internal.Binder.Environment → type in Oly.Compiler.Internal.Symbols) references.
Oly.Compiler.Internal.Binder.Environment uses Oly.Compiler.Internal.Symbols. Changing Oly.Compiler.Internal.Symbols can break Oly.Compiler.Internal.Binder.Environment, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
20→8 Oly.Compiler.Internal.Binder.Environment depends on Oly.Compiler.Syntax✕
Type pairs
9 distinct (type in Oly.Compiler.Internal.Binder.Environment → type in Oly.Compiler.Syntax) references.
Oly.Compiler.Internal.Binder.Environment uses Oly.Compiler.Syntax. Changing Oly.Compiler.Syntax can break Oly.Compiler.Internal.Binder.Environment, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
20→11 Oly.Compiler.Internal.Binder.Environment depends on Oly.Compiler.Internal.SymbolOperations✕
Type pairs
1 distinct (type in Oly.Compiler.Internal.Binder.Environment → type in Oly.Compiler.Internal.SymbolOperations) reference.
Oly.Compiler.Internal.Binder.Environment uses Oly.Compiler.Internal.SymbolOperations. Changing Oly.Compiler.Internal.SymbolOperations can break Oly.Compiler.Internal.Binder.Environment, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
20→14 Oly.Compiler.Internal.Binder.Environment depends on Oly.Compiler.Internal.SymbolEnvironments✕
Type pairs
3 distinct (type in Oly.Compiler.Internal.Binder.Environment → type in Oly.Compiler.Internal.SymbolEnvironments) references.
Oly.Compiler.Internal.Binder.Environment uses Oly.Compiler.Internal.SymbolEnvironments. Changing Oly.Compiler.Internal.SymbolEnvironments can break Oly.Compiler.Internal.Binder.Environment, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
20→18 Oly.Compiler.Internal.Binder.Environment depends on Oly.Compiler.Internal.BoundTree✕
Type pairs
2 distinct (type in Oly.Compiler.Internal.Binder.Environment → type in Oly.Compiler.Internal.BoundTree) references.
Oly.Compiler.Internal.Binder.Environment uses Oly.Compiler.Internal.BoundTree. Changing Oly.Compiler.Internal.BoundTree can break Oly.Compiler.Internal.Binder.Environment, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
21→7 Oly.Compiler.Internal.BoundTreeExtensions depends on Oly.Compiler.Internal.Symbols✕
Type pairs
3 distinct (type in Oly.Compiler.Internal.BoundTreeExtensions → type in Oly.Compiler.Internal.Symbols) references.
Oly.Compiler.Internal.BoundTreeExtensions uses Oly.Compiler.Internal.Symbols. Changing Oly.Compiler.Internal.Symbols can break Oly.Compiler.Internal.BoundTreeExtensions, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
21→8 Oly.Compiler.Internal.BoundTreeExtensions depends on Oly.Compiler.Syntax✕
Type pairs
1 distinct (type in Oly.Compiler.Internal.BoundTreeExtensions → type in Oly.Compiler.Syntax) reference.
Oly.Compiler.Internal.BoundTreeExtensions uses Oly.Compiler.Syntax. Changing Oly.Compiler.Syntax can break Oly.Compiler.Internal.BoundTreeExtensions, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
21→11 Oly.Compiler.Internal.BoundTreeExtensions depends on Oly.Compiler.Internal.SymbolOperations✕
Type pairs
1 distinct (type in Oly.Compiler.Internal.BoundTreeExtensions → type in Oly.Compiler.Internal.SymbolOperations) reference.
Oly.Compiler.Internal.BoundTreeExtensions uses Oly.Compiler.Internal.SymbolOperations. Changing Oly.Compiler.Internal.SymbolOperations can break Oly.Compiler.Internal.BoundTreeExtensions, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
21→14 Oly.Compiler.Internal.BoundTreeExtensions depends on Oly.Compiler.Internal.SymbolEnvironments✕
Type pairs
1 distinct (type in Oly.Compiler.Internal.BoundTreeExtensions → type in Oly.Compiler.Internal.SymbolEnvironments) reference.
Oly.Compiler.Internal.BoundTreeExtensions uses Oly.Compiler.Internal.SymbolEnvironments. Changing Oly.Compiler.Internal.SymbolEnvironments can break Oly.Compiler.Internal.BoundTreeExtensions, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
21→18 Oly.Compiler.Internal.BoundTreeExtensions depends on Oly.Compiler.Internal.BoundTree✕
Type pairs
3 distinct (type in Oly.Compiler.Internal.BoundTreeExtensions → type in Oly.Compiler.Internal.BoundTree) references.
Oly.Compiler.Internal.BoundTreeExtensions uses Oly.Compiler.Internal.BoundTree. Changing Oly.Compiler.Internal.BoundTree can break Oly.Compiler.Internal.BoundTreeExtensions, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
21→19 Oly.Compiler.Internal.BoundTreeExtensions depends on Oly.Compiler.Internal.SymbolQuery✕
Type pairs
1 distinct (type in Oly.Compiler.Internal.BoundTreeExtensions → type in Oly.Compiler.Internal.SymbolQuery) reference.
Oly.Compiler.Internal.BoundTreeExtensions uses Oly.Compiler.Internal.SymbolQuery. Changing Oly.Compiler.Internal.SymbolQuery can break Oly.Compiler.Internal.BoundTreeExtensions, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
22→2 Oly.Compiler.Internal.ILGen depends on Oly.Core✕
Type pairs
2 distinct (type in Oly.Compiler.Internal.ILGen → type in Oly.Core) references.
Oly.Compiler.Internal.ILGen uses Oly.Compiler.Internal.Symbols. Changing Oly.Compiler.Internal.Symbols can break Oly.Compiler.Internal.ILGen, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
22→8 Oly.Compiler.Internal.ILGen depends on Oly.Compiler.Syntax✕
Type pairs
2 distinct (type in Oly.Compiler.Internal.ILGen → type in Oly.Compiler.Syntax) references.
Oly.Compiler.Internal.ILGen uses Oly.Compiler.Internal.BoundTree. Changing Oly.Compiler.Internal.BoundTree can break Oly.Compiler.Internal.ILGen, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
23→7 Oly.Compiler.Internal.Solver depends on Oly.Compiler.Internal.Symbols✕
Type pairs
8 distinct (type in Oly.Compiler.Internal.Solver → type in Oly.Compiler.Internal.Symbols) references.
Oly.Compiler.Internal.Solver uses Oly.Compiler.Internal.Symbols. Changing Oly.Compiler.Internal.Symbols can break Oly.Compiler.Internal.Solver, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
23→8 Oly.Compiler.Internal.Solver depends on Oly.Compiler.Syntax✕
Type pairs
3 distinct (type in Oly.Compiler.Internal.Solver → type in Oly.Compiler.Syntax) references.
Oly.Compiler.Internal.Solver uses Oly.Compiler.Internal.SymbolOperations. Changing Oly.Compiler.Internal.SymbolOperations can break Oly.Compiler.Internal.Solver, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
23→14 Oly.Compiler.Internal.Solver depends on Oly.Compiler.Internal.SymbolEnvironments✕
Type pairs
2 distinct (type in Oly.Compiler.Internal.Solver → type in Oly.Compiler.Internal.SymbolEnvironments) references.
Oly.Compiler.Internal.Solver uses Oly.Compiler.Internal.SymbolEnvironments. Changing Oly.Compiler.Internal.SymbolEnvironments can break Oly.Compiler.Internal.Solver, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
23→19 Oly.Compiler.Internal.Solver depends on Oly.Compiler.Internal.SymbolQuery✕
Type pairs
1 distinct (type in Oly.Compiler.Internal.Solver → type in Oly.Compiler.Internal.SymbolQuery) reference.
Oly.Compiler.Internal.Solver uses Oly.Compiler.Internal.SymbolQuery. Changing Oly.Compiler.Internal.SymbolQuery can break Oly.Compiler.Internal.Solver, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
24→6 Oly.Compiler.Symbols depends on Oly.Metadata✕
Type pairs
1 distinct (type in Oly.Compiler.Symbols → type in Oly.Metadata) reference.
Oly.Compiler.Symbols uses Oly.Compiler.Internal.SymbolEnvironments. Changing Oly.Compiler.Internal.SymbolEnvironments can break Oly.Compiler.Symbols, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
24→18 Oly.Compiler.Symbols depends on Oly.Compiler.Internal.BoundTree✕
Type pairs
5 distinct (type in Oly.Compiler.Symbols → type in Oly.Compiler.Internal.BoundTree) references.
Oly.Compiler.Internal.Binder.Attributes uses Oly.Compiler.Internal.Symbols. Changing Oly.Compiler.Internal.Symbols can break Oly.Compiler.Internal.Binder.Attributes, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
25→8 Oly.Compiler.Internal.Binder.Attributes depends on Oly.Compiler.Syntax✕
Type pairs
4 distinct (type in Oly.Compiler.Internal.Binder.Attributes → type in Oly.Compiler.Syntax) references.
Oly.Compiler.Internal.Binder.Attributes uses Oly.Compiler.Syntax. Changing Oly.Compiler.Syntax can break Oly.Compiler.Internal.Binder.Attributes, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
25→18 Oly.Compiler.Internal.Binder.Attributes depends on Oly.Compiler.Internal.BoundTree✕
Type pairs
1 distinct (type in Oly.Compiler.Internal.Binder.Attributes → type in Oly.Compiler.Internal.BoundTree) reference.
Oly.Compiler.Internal.Binder.Attributes uses Oly.Compiler.Internal.BoundTree. Changing Oly.Compiler.Internal.BoundTree can break Oly.Compiler.Internal.Binder.Attributes, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
25→20 Oly.Compiler.Internal.Binder.Attributes depends on Oly.Compiler.Internal.Binder.Environment✕
Type pairs
2 distinct (type in Oly.Compiler.Internal.Binder.Attributes → type in Oly.Compiler.Internal.Binder.Environment) references.
Oly.Compiler.Internal.Binder.Attributes uses Oly.Compiler.Internal.Binder.Environment. Changing Oly.Compiler.Internal.Binder.Environment can break Oly.Compiler.Internal.Binder.Attributes, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
26→7 Oly.Compiler.Internal.Binder.NameResolution depends on Oly.Compiler.Internal.Symbols✕
Type pairs
24 distinct (type in Oly.Compiler.Internal.Binder.NameResolution → type in Oly.Compiler.Internal.Symbols) references.
Oly.Compiler.Internal.Binder.NameResolution uses Oly.Compiler.Internal.Symbols. Changing Oly.Compiler.Internal.Symbols can break Oly.Compiler.Internal.Binder.NameResolution, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
26→8 Oly.Compiler.Internal.Binder.NameResolution depends on Oly.Compiler.Syntax✕
Type pairs
22 distinct (type in Oly.Compiler.Internal.Binder.NameResolution → type in Oly.Compiler.Syntax) references.
Oly.Compiler.Internal.Binder.NameResolution uses Oly.Compiler.Syntax. Changing Oly.Compiler.Syntax can break Oly.Compiler.Internal.Binder.NameResolution, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
26→14 Oly.Compiler.Internal.Binder.NameResolution depends on Oly.Compiler.Internal.SymbolEnvironments✕
Type pairs
4 distinct (type in Oly.Compiler.Internal.Binder.NameResolution → type in Oly.Compiler.Internal.SymbolEnvironments) references.
Oly.Compiler.Internal.Binder.NameResolution uses Oly.Compiler.Internal.SymbolEnvironments. Changing Oly.Compiler.Internal.SymbolEnvironments can break Oly.Compiler.Internal.Binder.NameResolution, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
26→18 Oly.Compiler.Internal.Binder.NameResolution depends on Oly.Compiler.Internal.BoundTree✕
Type pairs
9 distinct (type in Oly.Compiler.Internal.Binder.NameResolution → type in Oly.Compiler.Internal.BoundTree) references.
Oly.Compiler.Internal.Binder.NameResolution uses Oly.Compiler.Internal.BoundTree. Changing Oly.Compiler.Internal.BoundTree can break Oly.Compiler.Internal.Binder.NameResolution, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
26→20 Oly.Compiler.Internal.Binder.NameResolution depends on Oly.Compiler.Internal.Binder.Environment✕
Type pairs
2 distinct (type in Oly.Compiler.Internal.Binder.NameResolution → type in Oly.Compiler.Internal.Binder.Environment) references.
Oly.Compiler.Internal.Binder.NameResolution uses Oly.Compiler.Internal.Binder.Environment. Changing Oly.Compiler.Internal.Binder.Environment can break Oly.Compiler.Internal.Binder.NameResolution, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
27→7 Oly.Compiler.Internal.Binder.Pass2 depends on Oly.Compiler.Internal.Symbols✕
Type pairs
13 distinct (type in Oly.Compiler.Internal.Binder.Pass2 → type in Oly.Compiler.Internal.Symbols) references.
Oly.Compiler.Internal.Binder.Pass2 uses Oly.Compiler.Internal.Symbols. Changing Oly.Compiler.Internal.Symbols can break Oly.Compiler.Internal.Binder.Pass2, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
27→8 Oly.Compiler.Internal.Binder.Pass2 depends on Oly.Compiler.Syntax✕
Type pairs
20 distinct (type in Oly.Compiler.Internal.Binder.Pass2 → type in Oly.Compiler.Syntax) references.
Oly.Compiler.Internal.Binder.Pass2 uses Oly.Compiler.Syntax. Changing Oly.Compiler.Syntax can break Oly.Compiler.Internal.Binder.Pass2, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
27→10 Oly.Compiler.Internal.Binder.Pass2 depends on Oly.Compiler.Internal.SymbolBuilders✕
Type pairs
1 distinct (type in Oly.Compiler.Internal.Binder.Pass2 → type in Oly.Compiler.Internal.SymbolBuilders) reference.
Oly.Compiler.Internal.Binder.Pass2 uses Oly.Compiler.Internal.SymbolBuilders. Changing Oly.Compiler.Internal.SymbolBuilders can break Oly.Compiler.Internal.Binder.Pass2, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
27→18 Oly.Compiler.Internal.Binder.Pass2 depends on Oly.Compiler.Internal.BoundTree✕
Type pairs
2 distinct (type in Oly.Compiler.Internal.Binder.Pass2 → type in Oly.Compiler.Internal.BoundTree) references.
Oly.Compiler.Internal.Binder.Pass2 uses Oly.Compiler.Internal.BoundTree. Changing Oly.Compiler.Internal.BoundTree can break Oly.Compiler.Internal.Binder.Pass2, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
27→20 Oly.Compiler.Internal.Binder.Pass2 depends on Oly.Compiler.Internal.Binder.Environment✕
Type pairs
2 distinct (type in Oly.Compiler.Internal.Binder.Pass2 → type in Oly.Compiler.Internal.Binder.Environment) references.
Oly.Compiler.Internal.Binder.Pass2 uses Oly.Compiler.Internal.Binder.Environment. Changing Oly.Compiler.Internal.Binder.Environment can break Oly.Compiler.Internal.Binder.Pass2, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
28→7 Oly.Compiler.Internal.Binder.PostInferenceAnalysis depends on Oly.Compiler.Internal.Symbols✕
Type pairs
15 distinct (type in Oly.Compiler.Internal.Binder.PostInferenceAnalysis → type in Oly.Compiler.Internal.Symbols) references.
Oly.Compiler.Internal.Binder.PostInferenceAnalysis uses Oly.Compiler.Internal.Symbols. Changing Oly.Compiler.Internal.Symbols can break Oly.Compiler.Internal.Binder.PostInferenceAnalysis, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
28→8 Oly.Compiler.Internal.Binder.PostInferenceAnalysis depends on Oly.Compiler.Syntax✕
Type pairs
4 distinct (type in Oly.Compiler.Internal.Binder.PostInferenceAnalysis → type in Oly.Compiler.Syntax) references.
Oly.Compiler.Internal.Binder.PostInferenceAnalysis uses Oly.Compiler.Syntax. Changing Oly.Compiler.Syntax can break Oly.Compiler.Internal.Binder.PostInferenceAnalysis, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
28→14 Oly.Compiler.Internal.Binder.PostInferenceAnalysis depends on Oly.Compiler.Internal.SymbolEnvironments✕
Type pairs
2 distinct (type in Oly.Compiler.Internal.Binder.PostInferenceAnalysis → type in Oly.Compiler.Internal.SymbolEnvironments) references.
Oly.Compiler.Internal.Binder.PostInferenceAnalysis uses Oly.Compiler.Internal.SymbolEnvironments. Changing Oly.Compiler.Internal.SymbolEnvironments can break Oly.Compiler.Internal.Binder.PostInferenceAnalysis, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
28→18 Oly.Compiler.Internal.Binder.PostInferenceAnalysis depends on Oly.Compiler.Internal.BoundTree✕
Type pairs
8 distinct (type in Oly.Compiler.Internal.Binder.PostInferenceAnalysis → type in Oly.Compiler.Internal.BoundTree) references.
Oly.Compiler.Internal.Binder.PostInferenceAnalysis uses Oly.Compiler.Internal.BoundTree. Changing Oly.Compiler.Internal.BoundTree can break Oly.Compiler.Internal.Binder.PostInferenceAnalysis, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
28→20 Oly.Compiler.Internal.Binder.PostInferenceAnalysis depends on Oly.Compiler.Internal.Binder.Environment✕
Type pairs
4 distinct (type in Oly.Compiler.Internal.Binder.PostInferenceAnalysis → type in Oly.Compiler.Internal.Binder.Environment) references.
Oly.Compiler.Internal.Binder.PostInferenceAnalysis uses Oly.Compiler.Internal.Binder.Environment. Changing Oly.Compiler.Internal.Binder.Environment can break Oly.Compiler.Internal.Binder.PostInferenceAnalysis, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
29→7 Oly.Compiler.Internal.Binder.Scoping depends on Oly.Compiler.Internal.Symbols✕
Type pairs
4 distinct (type in Oly.Compiler.Internal.Binder.Scoping → type in Oly.Compiler.Internal.Symbols) references.
Oly.Compiler.Internal.Binder.Scoping uses Oly.Compiler.Internal.Symbols. Changing Oly.Compiler.Internal.Symbols can break Oly.Compiler.Internal.Binder.Scoping, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
29→8 Oly.Compiler.Internal.Binder.Scoping depends on Oly.Compiler.Syntax✕
Type pairs
2 distinct (type in Oly.Compiler.Internal.Binder.Scoping → type in Oly.Compiler.Syntax) references.
Oly.Compiler.Internal.Binder.Scoping uses Oly.Compiler.Syntax. Changing Oly.Compiler.Syntax can break Oly.Compiler.Internal.Binder.Scoping, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
29→18 Oly.Compiler.Internal.Binder.Scoping depends on Oly.Compiler.Internal.BoundTree✕
Type pairs
1 distinct (type in Oly.Compiler.Internal.Binder.Scoping → type in Oly.Compiler.Internal.BoundTree) reference.
Oly.Compiler.Internal.Binder.Scoping uses Oly.Compiler.Internal.BoundTree. Changing Oly.Compiler.Internal.BoundTree can break Oly.Compiler.Internal.Binder.Scoping, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
29→20 Oly.Compiler.Internal.Binder.Scoping depends on Oly.Compiler.Internal.Binder.Environment✕
Type pairs
2 distinct (type in Oly.Compiler.Internal.Binder.Scoping → type in Oly.Compiler.Internal.Binder.Environment) references.
Oly.Compiler.Internal.Binder.Scoping uses Oly.Compiler.Internal.Binder.Environment. Changing Oly.Compiler.Internal.Binder.Environment can break Oly.Compiler.Internal.Binder.Scoping, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
30→2 Oly.Compiler.Internal.Binder.Binder depends on Oly.Core✕
Type pairs
2 distinct (type in Oly.Compiler.Internal.Binder.Binder → type in Oly.Core) references.
Oly.Compiler.Internal.Binder.Binder uses Oly.Compiler.Internal.Symbols. Changing Oly.Compiler.Internal.Symbols can break Oly.Compiler.Internal.Binder.Binder, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
30→8 Oly.Compiler.Internal.Binder.Binder depends on Oly.Compiler.Syntax✕
Type pairs
2 distinct (type in Oly.Compiler.Internal.Binder.Binder → type in Oly.Compiler.Syntax) references.
Oly.Compiler.Internal.Binder.Binder uses Oly.Compiler.Syntax. Changing Oly.Compiler.Syntax can break Oly.Compiler.Internal.Binder.Binder, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
30→13 Oly.Compiler.Internal.Binder.Binder depends on Oly.Compiler.Internal.CompilerImports✕
Type pairs
2 distinct (type in Oly.Compiler.Internal.Binder.Binder → type in Oly.Compiler.Internal.CompilerImports) references.
Oly.Compiler.Internal.Binder.Binder uses Oly.Compiler.Internal.CompilerImports. Changing Oly.Compiler.Internal.CompilerImports can break Oly.Compiler.Internal.Binder.Binder, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
30→18 Oly.Compiler.Internal.Binder.Binder depends on Oly.Compiler.Internal.BoundTree✕
Type pairs
3 distinct (type in Oly.Compiler.Internal.Binder.Binder → type in Oly.Compiler.Internal.BoundTree) references.
Oly.Compiler.Internal.Binder.Binder uses Oly.Compiler.Internal.BoundTree. Changing Oly.Compiler.Internal.BoundTree can break Oly.Compiler.Internal.Binder.Binder, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
30→20 Oly.Compiler.Internal.Binder.Binder depends on Oly.Compiler.Internal.Binder.Environment✕
Type pairs
2 distinct (type in Oly.Compiler.Internal.Binder.Binder → type in Oly.Compiler.Internal.Binder.Environment) references.
Oly.Compiler.Internal.Binder.Binder uses Oly.Compiler.Internal.Binder.Environment. Changing Oly.Compiler.Internal.Binder.Environment can break Oly.Compiler.Internal.Binder.Binder, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
30→29 Oly.Compiler.Internal.Binder.Binder depends on Oly.Compiler.Internal.Binder.Scoping✕
Type pairs
1 distinct (type in Oly.Compiler.Internal.Binder.Binder → type in Oly.Compiler.Internal.Binder.Scoping) reference.
Oly.Compiler.Internal.Binder.Binder uses Oly.Compiler.Internal.Binder.Scoping. Changing Oly.Compiler.Internal.Binder.Scoping can break Oly.Compiler.Internal.Binder.Binder, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
31→7 Oly.Compiler.Internal.Binder.Pass4 depends on Oly.Compiler.Internal.Symbols✕
Type pairs
8 distinct (type in Oly.Compiler.Internal.Binder.Pass4 → type in Oly.Compiler.Internal.Symbols) references.
Oly.Compiler.Internal.Binder.Pass4 uses Oly.Compiler.Internal.Symbols. Changing Oly.Compiler.Internal.Symbols can break Oly.Compiler.Internal.Binder.Pass4, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
31→8 Oly.Compiler.Internal.Binder.Pass4 depends on Oly.Compiler.Syntax✕
Type pairs
27 distinct (type in Oly.Compiler.Internal.Binder.Pass4 → type in Oly.Compiler.Syntax) references. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Oly.Compiler.Internal.Binder.Pass4 uses Oly.Compiler.Syntax. Changing Oly.Compiler.Syntax can break Oly.Compiler.Internal.Binder.Pass4, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
31→10 Oly.Compiler.Internal.Binder.Pass4 depends on Oly.Compiler.Internal.SymbolBuilders✕
Type pairs
1 distinct (type in Oly.Compiler.Internal.Binder.Pass4 → type in Oly.Compiler.Internal.SymbolBuilders) reference.
Oly.Compiler.Internal.Binder.Pass4 uses Oly.Compiler.Internal.SymbolBuilders. Changing Oly.Compiler.Internal.SymbolBuilders can break Oly.Compiler.Internal.Binder.Pass4, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
31→18 Oly.Compiler.Internal.Binder.Pass4 depends on Oly.Compiler.Internal.BoundTree✕
Type pairs
7 distinct (type in Oly.Compiler.Internal.Binder.Pass4 → type in Oly.Compiler.Internal.BoundTree) references.
Oly.Compiler.Internal.Binder.Pass4 uses Oly.Compiler.Internal.BoundTree. Changing Oly.Compiler.Internal.BoundTree can break Oly.Compiler.Internal.Binder.Pass4, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
31→20 Oly.Compiler.Internal.Binder.Pass4 depends on Oly.Compiler.Internal.Binder.Environment✕
Type pairs
2 distinct (type in Oly.Compiler.Internal.Binder.Pass4 → type in Oly.Compiler.Internal.Binder.Environment) references.
Oly.Compiler.Internal.Binder.Pass4 uses Oly.Compiler.Internal.Binder.Environment. Changing Oly.Compiler.Internal.Binder.Environment can break Oly.Compiler.Internal.Binder.Pass4, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
31→23 Oly.Compiler.Internal.Binder.Pass4 depends on Oly.Compiler.Internal.Solver✕
Type pairs
1 distinct (type in Oly.Compiler.Internal.Binder.Pass4 → type in Oly.Compiler.Internal.Solver) reference.
Oly.Compiler.Internal.Binder.Pass4 uses Oly.Compiler.Internal.Solver. Changing Oly.Compiler.Internal.Solver can break Oly.Compiler.Internal.Binder.Pass4, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
31→26 Oly.Compiler.Internal.Binder.Pass4 depends on Oly.Compiler.Internal.Binder.NameResolution✕
Type pairs
2 distinct (type in Oly.Compiler.Internal.Binder.Pass4 → type in Oly.Compiler.Internal.Binder.NameResolution) references.
Oly.Compiler.Internal.Binder.Pass4 uses Oly.Compiler.Internal.Binder.NameResolution. Changing Oly.Compiler.Internal.Binder.NameResolution can break Oly.Compiler.Internal.Binder.Pass4, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
32→2 Oly.Compiler.Compilation depends on Oly.Core✕
Type pairs
10 distinct (type in Oly.Compiler.Compilation → type in Oly.Core) references.
Oly.Compiler.Compilation uses Oly.Compiler.Internal.Symbols. Changing Oly.Compiler.Internal.Symbols can break Oly.Compiler.Compilation, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
32→8 Oly.Compiler.Compilation depends on Oly.Compiler.Syntax✕
Type pairs
10 distinct (type in Oly.Compiler.Compilation → type in Oly.Compiler.Syntax) references.
Oly.Compiler.Compilation uses Oly.Compiler.Internal.CompilerImports. Changing Oly.Compiler.Internal.CompilerImports can break Oly.Compiler.Compilation, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
32→18 Oly.Compiler.Compilation depends on Oly.Compiler.Internal.BoundTree✕
Type pairs
1 distinct (type in Oly.Compiler.Compilation → type in Oly.Compiler.Internal.BoundTree) reference.
Oly.Compiler.Compilation uses Oly.Compiler.Internal.BoundTree. Changing Oly.Compiler.Internal.BoundTree can break Oly.Compiler.Compilation, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
32→20 Oly.Compiler.Compilation depends on Oly.Compiler.Internal.Binder.Environment✕
Type pairs
2 distinct (type in Oly.Compiler.Compilation → type in Oly.Compiler.Internal.Binder.Environment) references.
Oly.Compiler.Compilation uses Oly.Compiler.Internal.Binder.Environment. Changing Oly.Compiler.Internal.Binder.Environment can break Oly.Compiler.Compilation, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
32→24 Oly.Compiler.Compilation depends on Oly.Compiler.Symbols✕
Type pairs
3 distinct (type in Oly.Compiler.Compilation → type in Oly.Compiler.Symbols) references.
Oly.Compiler.Compilation uses Oly.Compiler.Internal.Binder.Binder. Changing Oly.Compiler.Internal.Binder.Binder can break Oly.Compiler.Compilation, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
LanguageServer.ExtensionHelpers uses Oly.Compiler.Workspace. Changing Oly.Compiler.Workspace can break LanguageServer.ExtensionHelpers, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
39→35 LanguageServer.ExtensionHelpers depends on LanguageServer✕
Type pairs
1 distinct (type in LanguageServer.ExtensionHelpers → type in LanguageServer) reference.
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
A06:2021 — Vulnerable & Outdated Components
7
High / Critical
A03:2021 — Injection
6
High / Critical
Roadmap
Begin by splitting the largest source file into smaller, focused modules and enabling nullable reference types across all projects to resolve warnings directly. Next, establish a dedicated directory for architecture decision records, ensuring each significant choice is documented with its context and consequences. Finally, address code duplication by extracting shared executable blocks into common functions and refining shared types or factories where appropriate.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 No ADRs found finding(s) in ADR Quality.
Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
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.
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 — 16
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 — 432
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 — 19
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 24
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. 62 of 66 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 4 documentation/naming judgement(s) are LLM-assisted and labelled advisory. 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 — 66 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, 442 of 467 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.
D4 Code Duplication — 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. Code Duplication couldn't be assessed within its 8-minute budget on a solution this large — not included in this run.
D6 Cohesion (LCOM4) — 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.
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. Code Coverage couldn't be assessed within its 58-minute budget on a solution this large — not included in this run.
D10 Test Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 1 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 55 test source file(s) (.fs) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
D12 Dependency Hygiene — 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 npm dependencies as well as NuGet ones — manifest: vscode/package.json — and the counts on this row cover the NuGet side ONLY. This dimension reads dependency currency from `<PackageReference>` elements via `dotnet list package`; it does not read it, so the npm packages declared there were not checked for newer, deprecated or unmaintained releases. Their absence from the counts above is a gap in this analyzer's ecosystem coverage — not a finding that those dependencies are current.
D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its NuGet package dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D15 Churn × Complexity Hotspots — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. A hotspot's complexity is meant to be the worst body its churn actually touched. For src/Runtime/Targets/DotNet/Oly.Compiler.CIL.Importer/Importer.fs, src/Compiler/Oly.Compiler/CompilerImports.fs, src/Compiler/Oly.Compiler/ILGen.fs, src/Runtime/Oly.Runtime/InternalCodeGenTypes.fs, src/Compiler/Oly.Compiler/Symbols/Symbols.fs, … that could not be established — the complexity reader for the file reports no body extents, or the history carries no per-line attribution — so the row quotes the file's worst body, which the counted changes may never have touched. The churn count is unaffected.
D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository — bus factor is not applicable (2 contributor(s) across 902 commit(s) sampled, automation and bot accounts excluded). One of them holds 100% of the history; the other 1 hold 0% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
D26 Project Cohesion — 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. Project size and spread are measured over build units (a .NET project, a Maven or Gradle module, an npm, Deno or JSR package, a Go module, a Cargo crate, a Python, Composer, Bundler, Mix, rebar3, sbt, SwiftPM or pub package, an OTP application, an Xcode project or XcodeGen spec) whose source a code model reads. This repository's production source is in a language no model reads, or in units whose build tool D26 does not recognise. That is a gap in this analyzer's language reach — not a finding that the repository's projects are cohesive.
D39 IL Efficiency — 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. IL NOT MEASURED: the analyzer's own build of this repository failed for an ENVIRONMENT reason (exit 1) — MSBuild's engine or the CLR gave up, or our image does not carry the SDK band/targeting pack this repository needs. This is OUR limitation, not a defect in the repo, and it is not a statement that this repository fails to build. D18 owns the question of whether this repository builds; it was not answered here.
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.
C3 Audit Trail — 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 audit 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 audit controls.
C4 Data Retention — 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 retention 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 retention controls.
C5 Data-Subject Rights — 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 data-subject rights 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 data-subject rights controls.
IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
P2 Observability — 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. Observability was not assessed: this check recognises the logging, tracing/metrics and health-check idioms of .NET, the JVM, Go, Python, JavaScript/TypeScript, Rust, Ruby, PHP, Swift, Dart, Elixir and Erlang, and most of this repository's production source is in none of them. Absence of an idiom this check recognises is NOT evidence that this repo lacks structured logging. This is a gap in the analyzer, not a finding about this repository.
P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
PF2 Allocation hygiene — 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. Those languages have allocation-aware idioms of their own, but this check does not read them yet. That is a gap in this analyzer's language reach — not a finding that the code is careless with allocations.
S1 Web-Security Posture — 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 web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
X1 Async correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X2 Cancellation propagation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X24 Document value interpolated into markup unescaped — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This repository's C# was parsed (it ships no .sln or .csproj, so it was read as syntax-only projects), but this check proves its findings from resolved symbols and a reference-free parse resolves none. It abstained rather than report a clean bill it could not earn. That is a gap in this analyzer's reach into build-less repositories — not a finding that the repository is free of what this check looks for.
X27 Collection changed while being enumerated — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This repository's C# was parsed (it ships no .sln or .csproj, so it was read as syntax-only projects), but this check proves its findings from resolved symbols and a reference-free parse resolves none. It abstained rather than report a clean bill it could not earn. That is a gap in this analyzer's reach into build-less repositories — not a finding that the repository is free of what this check looks for.
X3 Exception handling — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X4 Structured logging — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D11 Test Reliability: Flakiness is inferred from history/markers — Watchdog runs the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
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.
D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
D22 Internal API Consistency: API-surface coherence is an LLM judgement over a sample of the public surface — consistency of intent across the whole API is approximated, not exhaustively verified.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
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.
The LLM boundary
LLM-set scores this run (4): D19, D21, D22, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.
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.
135 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was InterpreterFunction.CallWithStackAux at 172. A further 25 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 LexerModule.scanKeywordOrIdentifier at 85 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: src/Runtime/Oly.Runtime/OlyIR.fs (OlyIROperation`3.ReplaceArguments at 58). 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.
+ 130 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 3 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with InterpreterFunction.CallWithStackAux (cyclomatic 172), ClrCodeGen.GenOperation (cyclomatic 139), NameResolution.bindValueModifiersAndKindAsMemberFlags (cyclomatic 128). — 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 3 together lifts Cyclomatic Complexity from 3.8 to about 4.4/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 226 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 106 bodies over 30 down to 30 or less in Cognitive Complexity — start with WorkspaceExtensions.OlyDocument.GetCompletions (cognitive 273), Pass2.bindBindingDeclarationCoreAux (cognitive 262), OlyBoundModel.GetImmediateSymbols (cognitive 199). — 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 106 together lifts Cognitive Complexity from 2.0 to about 6.0/10, projected with the scoring formula itself and assuming each lands exactly at 30; 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 Classes7.7 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 36 FileTooLong finding(s) in God Classes — start with Emitter.fs (2), Symbols.fs, MetadataBuilder.fs. — One of this dimension's main actionable groups (36 warning-level).
Resolve the 5 TooManyMethods finding(s) in God Classes — start with Emitter.fs (2), LanguageServer.fs, MetadataBuilder.fs. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 1 FunctionTooLong finding(s) in God Classes — start with extension.ts. — One of this dimension's main actionable groups (1 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.
Do you agree with this assessment?
D5 · Coupling10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
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.
1 test methods: 1 unit, 0 integration, 0 BDD, 0 e2e. The JavaScript/TypeScript suite contributes 1 `it`/`test` case(s) across 1 test file(s) declaring at least one; its tier split is read from package names and paths only.
✓ On the Gold path — maintain.
Detailed fixes: d9_recommendation.md.
Do you agree with this assessment?
D10 · Test Quality10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
0 skipped, 0 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 1 tests. Measured on the JavaScript/TypeScript suite only — at least 55 test source file(s) (.fs) went unread, so its test quality is unmeasured and is not in these counts.
✓ On the Gold path — maintain.
Detailed fixes: d10_recommendation.md.
Do you agree with this assessment?
D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests pass reliably, with no flakiness.
Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.
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.
11 outdated, 0 vulnerable, 1 deprecated packages. NuGet only — this repository also declares npm dependencies, which are not read for currency here.
Deprecated: xunit
Outdated: FSharp.Core · ×11
What to do
Resolve the 1 Deprecated finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (1 warning-level).
Enforce Dependency Hygiene in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
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 226 packages use a banned license. ★ DEPTH: this repository's MSBuild projects declare 13 direct `PackageReference`(s), and 181 further package(s) were reached beyond them by closing the graph over nuget.org's own nuspec dependency graph — so a banned licence pulled in only by a dependency's OWN dependencies is inside this verdict. A package whose licence nuget.org could not be asked for is not graded, and version ranges are taken at their lower bound, so this is the closure as that graph states it rather than a restored consumer's exact resolution. ★ COVERAGE OF THIS VERDICT: it grades this repository's NuGet package dependencies and nothing else. The repository also declares package.json, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Resolve the 12 Hotspot finding(s) in Churn × Complexity Hotspots — start with ILGen.fs, Importer.fs, CompilerImports.fs. — One of this dimension's main actionable groups (12 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.
The repository's single README is a work-in-progress root document that states the project is an 'experimental programming language and runtime' with a note that documentation is in progress. It describes building (dotnet build for Release, VSCode extension), running tests (expected to fail as active development), SPIR-V benchmarks, Evergreen setup, and building the VSCode extension, plus links to work-in-progress chapters like Chapter 1 'Hello World!'. The two architecture/Docs markdown files are not referenced in the root README, so their presence is documented but not judged. The document is thin on overview (what Oly does) and lacks contribution guidance; it is a clear build/run guide with an ongoing work-in-progress label.
What to do
Improve Documentation Quality — currently 5.0/10. — The repository's single README is a work-in-progress root document that states the project is an 'experimental programming language and runtime' with a note that documentation is in progress. It describes building (dotnet build for Release, VSCode extension), running tests (expected to fail as active development), SPIR-V benchmarks, Evergreen setup, and building the VSCode extension, plus links to work-in-progress chapters like Chapter 1 'Hello World!'. The two architecture/Docs markdown files are not referenced in the root README, so their presence is documented but not judged. The document is thin on overview (what Oly does) and lacks contribution guidance; it is a clear build/run guide with an ongoing work-in-progress label.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: 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.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.
0 naming inconsistencies across 0 sampled symbols.
✓ On the Gold path — maintain.
Detailed fixes: d21_recommendation.md.
Do you agree with this assessment?
D22 · Internal API ConsistencyExemplary◐ Sampled · advisory
What it measures: Whether the internal API surface is consistent and coherent.
Method: Judged by language model at low temperature over a sample of the public API surface (IsPackable or .Contracts types). Sampled, advisory; confidence discounted by model uncertainty.
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
83 % of calls cross a namespace and 7 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
6 finding(s): 0 critical, 6 high, 0 medium, 0 low. 6 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens.
REDACTED
What to do
No action in Static Analysis (SAST) — all 6 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (6 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05.
Resolve the 5 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (3), REDACTED. — One of this dimension's main actionable groups (5 issue-level).
Resolve the 1 High vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 Low CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
Every significant source file has living knowledge — recently and meaningfully worked. Counted over 107 of the 126 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
What it measures: Whether 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 30 platform declaration(s) and 0 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.
Do you agree with this assessment?
AX8 · Test isolation5.0 / 10Adequate✓ 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.
`Oly.Targets.Spirv.Tests` (production) references the test project `Oly.Compiler.Tests`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
`Oly.Targets.Spirv.Tests` (production) references the test project `Spirv.Tests`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
What to do
Remove every production → test project reference: extract any shared test helper into a production support library (which the tests reference), or invert the dependency so the test project depends on production — not the reverse.
Other · Code Health — Unreviewed-generation residue: shipped members still throwing NotImplementedException, and placeholder string literals left in non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.
Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
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.
No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
What to do
Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
README claims VSCode extension is built and run via F5 but the evidence shows no vscode directory or .vscode/* — searched for: `vscode directory`, `VSCode extension`. Each was matched case- and separator-insensitively against file and directory NAMES anywhere in the tree, and against the CONTENTS of manifest files (package.json, *.csproj, *.props, *.slnx, *.yml, Dockerfile); the README's own prose never counts, so a claim is never refuted by merely being made. Nothing outside that search was read — a footprint living only in a submodule, in a file type not listed here, or under a name none of those terms matches is not seen, and this row is then wrong.
What to do
Reconcile the README with reality: README claims VSCode extension is built and run via F5 but the evidence shows no vscode directory or .vscode/*.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language 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.
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 `semgrep --config=auto` plus gitleaks for committed secrets (F# is not a CodeQL language and has no language-specific SAST engine) as a CI step. What was searched, so you can tell an absence from a miss: the 2084 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: `semgrep --config=auto` plus gitleaks for committed secrets (F# is not a CodeQL language and has no language-specific SAST engine) — so a security regression fails the build instead of landing.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.
Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from the language model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
Do you agree with this assessment?
R1 · Type Safety10.0 / 10Exemplary✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
React / JS · Code Health — Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm over JS/TS tokens, D-386): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.
Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Deterministic.
vscode/src/OlySolutionExplorerView.ts:86 · vscode/src/OlySyntaxTreeView.ts:55 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — vscode/src/OlySolutionExplorerView.ts:86
vscode/src/OlySolutionExplorerView.ts:109 · vscode/src/OlySyntaxTreeView.ts:121 — 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. — vscode/src/OlySolutionExplorerView.ts:109
vscode/src/OlySolutionExplorerView.ts:131 · vscode/src/OlySyntaxTreeView.ts:143 — 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. — vscode/src/OlySolutionExplorerView.ts:131
vscode/src/OlySolutionExplorerView.ts:198 · vscode/src/OlySolutionExplorerView.ts:213 — the two spans are one implementation copied and then locally edited — 74 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — vscode/src/OlySolutionExplorerView.ts:198
vscode/src/OlySyntaxTreeView.ts:160 · vscode/src/OlySyntaxTreeView.ts:197 — the two spans are one implementation copied and then locally edited — 63 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — vscode/src/OlySyntaxTreeView.ts:160
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.
refreshProjectStatusBarItemTooltip has cyclomatic complexity 15 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 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. — vscode/src/extension.ts:275
findOlySyntaxNodeTokenViewModelByPosition has cyclomatic complexity 13 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 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. — vscode/src/OlySyntaxTreeView.ts:80
What to do
Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
Do you agree with this assessment?
R3 · Large Files4.3 / 10Weak✓ 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.
1 file(s) over 400 lines (counted as significant lines — blank lines excluded — over production source only, tests excluded), largest first: vscode/src/extension.ts (463).
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).
Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.
Do you agree with this assessment?
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.
Do you agree with this assessment?
R7 · Dead Code10.0 / 10Exemplary✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
Imported but not declared in any reachable package.json — installs work only by hoisting accident. — vscode/src/extension.ts:8
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
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.
vscode/src/OlySolutionExplorerView.ts → vscode/src/extension.ts → vscode/src/OlySolutionExplorerView.ts (one verified cycle inside a mutually-dependent group of 3 files) — vscode/src/OlySolutionExplorerView.ts
What to do
Break each cycle by extracting the shared piece into a module both sides can import.
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. 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. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `ArgumentNullException` tells the caller a parameter was null when it provably was not.
Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements controlled by an `if`, whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`). Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.
Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.
Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.
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. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.
Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X32 · Type resolved by simple name across every loaded assembly10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a plugin lookup names the type it means — searching every assembly loaded into the process for a candidate whose SIMPLE name equals a string supplied at runtime, and taking the first one found, is decided by assembly LOAD ORDER rather than by this source, so the same name can resolve to a different type on the next run.
Method: Roslyn syntax only, no semantic model: every invocation of `First`/`FirstOrDefault`/`Single`/`SingleOrDefault` whose OWN expression subtree contains both a `GetAssemblies()` call and a `GetTypes()`/`GetExportedTypes()` call — a single-element pick out of every type loaded into the process. A nested selector in the same chain sees no `GetAssemblies()` in its own subtree and is outside the population, so one lookup counts once however many links its chain has. A finding additionally needs both remaining halves: the selector must be `First`/`FirstOrDefault` (`Single`/`SingleOrDefault` reports the ambiguity rather than resolving it, and is counted and never reported), and the chain must carry an `==` comparison of `<lambda parameter>.Name` against something that is not a literal. The receiver must be a plain identifier bound by one of the chain’s own lambdas, which places `assembly.GetName().Name == "X"` outside the rule by construction. One exemption: a `.Name` test joined by `&&` to a `FullName`/`AssemblyQualifiedName` test on the same identifier is spared; joined by `||` it is not. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether nullable reference types are enabled and not undermined by heavy `!` suppression.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
0/1 NRT-eligible project(s) enable <Nullable>enable</Nullable> (projects targeting a pre-C#-8 framework are excluded — NRTs aren't available there). NRTs catch a whole class of null-deref bugs at compile time.
What to do
Enable <Nullable>enable</Nullable> across all projects and resolve warnings rather than suppressing with `!`.
Do you agree with this assessment?
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 — 1 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.
SC1 Supply-chain hygiene — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Not evidenced — 6 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.
C3 Audit Trail — Not assessed: these audit 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 audit 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.
C4 Data Retention — Not assessed: these retention 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 retention 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.
C5 Data-Subject Rights — Not assessed: these data-subject rights 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 data-subject rights 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.
P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
P6 Release Hygiene — not evidenced — no changelog, version stamp or semver release tag in the repo
Not included — 59 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
AX1 Captive dependencies — no DI registrations detected
AX2 Stateful singletons — no singleton implementations detected
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB1 Runtime evidence locked — no reproducible boot — This repository has nothing the runtime tiers could boot or serve — no markup, no UI framework or web-server dependency, no UI component source, no native UI project and no API definition — nothing here is a surface to boot — so runtime a11y/egress/header evidence has no subject here. Not applicable: this is neither a gap in the scan nor a finding about your code.
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
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.
D16 Bus Factor — single-maintainer repository — bus factor is not applicable
D17 Explicit Debt — the C# workspace loaded 0 projects, so explicit-debt density could not be measured
D18 Solution Shape — D18 scores the shape of a C#/VB .NET solution; this repository's .NET projects are all F# (.fsproj), which the C#/VB workspace does not load, so the dimension does not apply.
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. 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 — No inline comments to assess — comment value is not applicable here.
D25 ADR Conformance — no ADRs to check
D26 Project Cohesion — D26 measured no build unit over this repository's .fs source. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
D36 Supply-chain Provenance & Signing — The CI pipeline builds and tests but publishes no released artifact — no package publish, container push, GitHub release or deployment step. Supply-chain provenance, signing and SBOM attest RELEASED artifacts, so there is nothing to attest here. Add them to the release pipeline when this repo starts shipping artifacts (a published package, a container image, a deployed service or a tagged release). Build integrity and workflow-token hygiene are reported below: they describe what the CI runs and the token it runs with, neither of which is affected by whether the pipeline ships an artifact.
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D39 IL Efficiency — IL not measured — the analyzer's build of the target did not succeed
D4 Code Duplication — Code Duplication not included (time budget)
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.
D6 Cohesion (LCOM4) — D6 reads a CS/VB/GO/SCALA/SWIFT/DART/JAVA/PY/KT/TS/TSX/MTS/CTS/JS/JSX/MJS/CJS/PHP/RB/RS/ERL/EX/EXS class graph only — this repository's production source is .fs, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D7 Architectural Integrity — no checkable ADRs and no dependency cycles — architectural integrity not assessed
D8 Code Coverage — Code Coverage not included (time budget)
DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 119 value object(s); 4 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 (this repository commits no MSBuild project, so its C# was read as syntax-only projects — a handler marked ONLY by an interface from a package is not visible without a build)
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P2 Observability — Observability was not assessed: this check recognises the logging, tracing/metrics and health-check idioms of .NET, the JVM, Go, Python, JavaScript/TypeScript, Rust, Ruby, PHP, Swift, Dart, Elixir and Erlang, and most of this repository's production source is in none of them. Absence of an idiom this check recognises is NOT evidence that this repo lacks structured logging. This is a gap in the analyzer, not a finding about this repository.
P7 Outbound HTTP resilience — not measured — the application kind could not be determined for this repo
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 (Cobertura — `dotnet test --collect:"XPlat Code Coverage"` with a `coverlet.collector` PackageReference) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
PF2 Allocation hygiene — Allocation awareness was not assessed: this repository holds F#, whose allocation-aware idioms this check does not model yet. That is a gap in the analyzer's language reach, not a finding about your code.
R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
R4 Test Coverage — 3 test file(s) reach none of 7 production file(s) via imports — exercised outside the JS import graph (integration/bundled), not import-reachable
S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X10 Duplicated predicate — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X24 Document value interpolated into markup unescaped — This check needs a compiled C# program and this repository commits no project file to compile, so only its syntax could be read. That is a limit of the analyzer, not a finding about your code.
X27 Collection changed while being enumerated — This check needs a compiled C# program and this repository commits no project file to compile, so only its syntax could be read. That is a limit of the analyzer, not a finding about your code.
X3 Exception handling — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X7 Silent fallback defaults — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
AX8 · Test isolation· Production project references a test project · ×2
Production project references a test project: Oly.Targets.Spirv.Tests → Oly.Compiler.Tests — `Oly.Targets.Spirv.Tests` (production) references the test project `Oly.Compiler.Tests`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
Production project references a test project: Oly.Targets.Spirv.Tests → Spirv.Tests — `Oly.Targets.Spirv.Tests` (production) references the test project `Spirv.Tests`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
D30 · Dependency Vulnerabilities· High vulnerability · ×1
Unlisted import 'vscode-languageserver-protocol' vscode/src/extension.ts:8— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
FileTooLong: Symbols/Symbols.fs src/Compiler/Oly.Compiler/Symbols/Symbols.fs— FileTooLong — 4743 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 70 functions. The bar is 500 significant lines; this is 4243 over it, 9.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: DotNet.Metadata/MetadataBuilder.fs src/Emitters/DotNet/DotNet.Metadata/MetadataBuilder.fs— FileTooLong — 2548 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2048 over it, 5.10× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Oly.Emitters.DotNet/Emitter.fs src/Emitters/DotNet/Oly.Emitters.DotNet/Emitter.fs— FileTooLong — 2478 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 45 functions. The bar is 500 significant lines; this is 1978 over it, 4.96× 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: Symbols/SymbolOperations.fs src/Compiler/Oly.Compiler/Symbols/SymbolOperations.fs— FileTooLong — 2422 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 125 functions. The bar is 500 significant lines; this is 1922 over it, 4.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: Binder/NameResolution.fs src/Compiler/Oly.Compiler/Binder/NameResolution.fs— FileTooLong — 2347 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 59 functions. The bar is 500 significant lines; this is 1847 over it, 4.69× 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: PublicAPI/PublicSymbols.fs src/Compiler/Oly.Compiler/PublicAPI/PublicSymbols.fs— FileTooLong — 2205 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1705 over it, 4.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: Oly.Compiler/ILGen.fs src/Compiler/Oly.Compiler/ILGen.fs— FileTooLong — 1983 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 65 functions. The bar is 500 significant lines; this is 1483 over it, 3.97× 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: Oly.Compiler/CompilerImports.fs src/Compiler/Oly.Compiler/CompilerImports.fs— FileTooLong — 1948 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 34 functions. The bar is 500 significant lines; this is 1448 over it, 3.90× 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: Oly.LanguageServer/LanguageServer.fs src/LanguageServer/Oly.LanguageServer/LanguageServer.fs— FileTooLong — 1906 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 31 functions. The bar is 500 significant lines; this is 1406 over it, 3.81× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Oly.Compiler.CIL.Importer/Importer.fs src/Runtime/Targets/DotNet/Oly.Compiler.CIL.Importer/Importer.fs— FileTooLong — 1785 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1285 over it, 3.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: Oly.Emitters.Interpreter/Emitter.fs src/Emitters/Interpreter/Oly.Emitters.Interpreter/Emitter.fs— FileTooLong — 1761 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1261 over it, 3.52× 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: Binder/Pass4.fs src/Compiler/Oly.Compiler/Binder/Pass4.fs— FileTooLong — 1749 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 46 functions. The bar is 500 significant lines; this is 1249 over it, 3.50× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Oly.Runtime/InternalCodeGenTypes.fs src/Runtime/Oly.Runtime/InternalCodeGenTypes.fs— FileTooLong — 1705 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1205 over it, 3.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: Oly.Compiler.Syntax/SyntaxTreeImplementation.fs src/Compiler/Oly.Compiler.Syntax/SyntaxTreeImplementation.fs— FileTooLong — 1588 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 39 functions. The bar is 500 significant lines; this is 1088 over it, 3.18× 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: Binder/Pass2.fs src/Compiler/Oly.Compiler/Binder/Pass2.fs— FileTooLong — 1201 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 701 over it, 2.40× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Oly.Metadata/OlyIL.fs src/Metadata/Oly.Metadata/OlyIL.fs— FileTooLong — 1193 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 693 over it, 2.39× 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: Oly.Runtime/OlyIR.fs src/Runtime/Oly.Runtime/OlyIR.fs— FileTooLong — 1127 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 627 over it, 2.25× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Oly.Emitters.Spirv/SpirvModuleBuilder.fs src/Emitters/Spirv/Oly.Emitters.Spirv/SpirvModuleBuilder.fs— FileTooLong — 1099 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 599 over it, 2.20× 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: Oly.Compiler/BoundTree.fs src/Compiler/Oly.Compiler/BoundTree.fs— FileTooLong — 1088 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 588 over it, 2.18× 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: Internal/Lexer.fs src/Compiler/Oly.Compiler.Syntax/Internal/Lexer.fs— FileTooLong — 1065 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 42 functions. The bar is 500 significant lines; this is 565 over it, 2.13× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Oly.Compiler.Workspace/OlyWorkspaceExtensions.fs src/Compiler/Oly.Compiler.Workspace/OlyWorkspaceExtensions.fs— FileTooLong — 1062 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 562 over it, 2.12× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Binder/PostInferenceAnalysis.fs src/Compiler/Oly.Compiler/Binder/PostInferenceAnalysis.fs— FileTooLong — 1056 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 49 functions. The bar is 500 significant lines; this is 556 over it, 2.11× 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: Oly.Compiler/Checker.fs src/Compiler/Oly.Compiler/Checker.fs— FileTooLong — 914 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 414 over it, 1.83× 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: Oly.Compiler/BoundTreeExtensions.fs src/Compiler/Oly.Compiler/BoundTreeExtensions.fs— FileTooLong — 775 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 32 functions. The bar is 500 significant lines; this is 275 over it, 1.55× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Oly.Compiler.Syntax/SyntaxTree.fs src/Compiler/Oly.Compiler.Syntax/SyntaxTree.fs— FileTooLong — 699 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 199 over it, 1.40× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
Hotspot: src/Compiler/Oly.Compiler/ILGen.fs src/Compiler/Oly.Compiler/ILGen.fs:1843— src/Compiler/Oly.Compiler/ILGen.fs changed 15 times in last 90 days, max cyclomatic complexity 102 in ILGen.GenCallExpression at line 1843. 1 of those changes was a fix/bug commit, and the other 14 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-29..2026-09-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-29 03:52:53 -07:00' --until='2026-09-27 03:52:53 -07:00' --full-history --no-merges -- src/Compiler/Oly.Compiler/ILGen.fs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/Runtime/Targets/DotNet/Oly.Compiler.CIL.Importer/Importer.fs src/Runtime/Targets/DotNet/Oly.Compiler.CIL.Importer/Importer.fs:1512— src/Runtime/Targets/DotNet/Oly.Compiler.CIL.Importer/Importer.fs changed 17 times in last 90 days, max cyclomatic complexity 81 in Helpers.importTypeDefinitionAsOlyILEntityDefinition at line 1512. 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-06-29..2026-09-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-29 03:52:53 -07:00' --until='2026-09-27 03:52:53 -07:00' --full-history --no-merges -- src/Runtime/Targets/DotNet/Oly.Compiler.CIL.Importer/Importer.fs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/Compiler/Oly.Compiler/CompilerImports.fs src/Compiler/Oly.Compiler/CompilerImports.fs:950— src/Compiler/Oly.Compiler/CompilerImports.fs changed 15 times in last 90 days, max cyclomatic complexity 48 in CompilerImports.importTypeSymbol at line 950. 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-06-29..2026-09-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-29 03:52:53 -07:00' --until='2026-09-27 03:52:53 -07:00' --full-history --no-merges -- src/Compiler/Oly.Compiler/CompilerImports.fs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/Compiler/Oly.Compiler/Symbols/SymbolOperations.fs src/Compiler/Oly.Compiler/Symbols/SymbolOperations.fs:404— src/Compiler/Oly.Compiler/Symbols/SymbolOperations.fs changed 5 times in last 90 days, max cyclomatic complexity 104 in SymbolOperations.UnifyTypes at line 404. 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-06-29..2026-09-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-29 03:52:53 -07:00' --until='2026-09-27 03:52:53 -07:00' --full-history --no-merges -- src/Compiler/Oly.Compiler/Symbols/SymbolOperations.fs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/Compiler/Oly.Compiler/Symbols/Symbols.fs src/Compiler/Oly.Compiler/Symbols/Symbols.fs:2152— src/Compiler/Oly.Compiler/Symbols/Symbols.fs changed 9 times in last 90 days, max cyclomatic complexity 43 in WellKnownFunction.TryFromName at line 2152. 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-06-29..2026-09-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-29 03:52:53 -07:00' --until='2026-09-27 03:52:53 -07:00' --full-history --no-merges -- src/Compiler/Oly.Compiler/Symbols/Symbols.fs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/Compiler/Oly.Compiler/Binder/Pass2.fs src/Compiler/Oly.Compiler/Binder/Pass2.fs:302— src/Compiler/Oly.Compiler/Binder/Pass2.fs changed 4 times in last 90 days, max cyclomatic complexity 96 in Pass2.bindBindingDeclarationCoreAux at line 302. 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-06-29..2026-09-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-29 03:52:53 -07:00' --until='2026-09-27 03:52:53 -07:00' --full-history --no-merges -- src/Compiler/Oly.Compiler/Binder/Pass2.fs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/Compiler/Oly.Compiler/Binder/Pass3.fs src/Compiler/Oly.Compiler/Binder/Pass3.fs:206— src/Compiler/Oly.Compiler/Binder/Pass3.fs changed 4 times in last 90 days, max cyclomatic complexity 92 in Pass3.bindTypeDeclarationBody at line 206. 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-06-29..2026-09-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-29 03:52:53 -07:00' --until='2026-09-27 03:52:53 -07:00' --full-history --no-merges -- src/Compiler/Oly.Compiler/Binder/Pass3.fs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/Runtime/Oly.Runtime/InternalCodeGenTypes.fs src/Runtime/Oly.Runtime/InternalCodeGenTypes.fs:1317— src/Runtime/Oly.Runtime/InternalCodeGenTypes.fs changed 8 times in last 90 days, max cyclomatic complexity 32 in RuntimeType.System.IEquatable<Oly.Runtime.CodeGen.InternalTypes.RuntimeType>.Equals at line 1317. 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-06-29..2026-09-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-29 03:52:53 -07:00' --until='2026-09-27 03:52:53 -07:00' --full-history --no-merges -- src/Runtime/Oly.Runtime/InternalCodeGenTypes.fs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/Compiler/Oly.Compiler/PublicAPI/PublicSymbols.fs src/Compiler/Oly.Compiler/PublicAPI/PublicSymbols.fs:2288— src/Compiler/Oly.Compiler/PublicAPI/PublicSymbols.fs changed 2 times in last 90 days, max cyclomatic complexity 74 in OlyBoundModel.GetImmediateSymbols at line 2288. 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-06-29..2026-09-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-29 03:52:53 -07:00' --until='2026-09-27 03:52:53 -07:00' --full-history --no-merges -- src/Compiler/Oly.Compiler/PublicAPI/PublicSymbols.fs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/Compiler/Oly.Compiler/Binder/Pass0.fs src/Compiler/Oly.Compiler/Binder/Pass0.fs:78— src/Compiler/Oly.Compiler/Binder/Pass0.fs changed 5 times in last 90 days, max cyclomatic complexity 29 in Pass0.bindTypeDeclaration at line 78. 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-06-29..2026-09-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-29 03:52:53 -07:00' --until='2026-09-27 03:52:53 -07:00' --full-history --no-merges -- src/Compiler/Oly.Compiler/Binder/Pass0.fs`: 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: vscode/src/extension.ts vscode/src/extension.ts:57— vscode/src/extension.ts changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 69 in extension.activate at line 57. 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-06-29..2026-09-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-29 03:52:53 -07:00' --until='2026-09-27 03:52:53 -07:00' --full-history --no-merges -- vscode/src/extension.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/Compiler/Oly.Compiler/Checker.fs src/Compiler/Oly.Compiler/Checker.fs:863— src/Compiler/Oly.Compiler/Checker.fs changed 2 times in last 90 days, max cyclomatic complexity 37 in Checker.checkReceiverOfExpression at line 863. 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-06-29..2026-09-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-29 03:52:53 -07:00' --until='2026-09-27 03:52:53 -07:00' --full-history --no-merges -- src/Compiler/Oly.Compiler/Checker.fs`: 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.
TooManyMethods: TextDocumentSyncHandler src/LanguageServer/Oly.LanguageServer/LanguageServer.fs:980— TooManyMethods — 63 methods. The bar is 30 methods; this is 33 over it, 2.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ClrAssemblyBuilder src/Emitters/DotNet/DotNet.Metadata/MetadataBuilder.fs:447— TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: OlyRuntimeClrEmitter src/Emitters/DotNet/Oly.Emitters.DotNet/Emitter.fs:1795— TooManyMethods — 45 methods. The bar is 30 methods; this is 15 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.
TooManyMethods: InterpreterRuntimeEmitter src/Emitters/Interpreter/Oly.Emitters.Interpreter/Emitter.fs:1815— TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SpirvEmitter src/Emitters/Spirv/Oly.Emitters.Spirv/SpirvEmitter.fs:23— TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
InterpreterFunction.CallWithStackAux (cyclomatic 172) src/Emitters/Interpreter/Oly.Emitters.Interpreter/Emitter.fs:1039— InterpreterFunction.CallWithStackAux has cyclomatic complexity 172 (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.
ClrCodeGen.GenOperation (cyclomatic 139) src/Emitters/DotNet/Oly.Emitters.DotNet/Emitter.fs:603— ClrCodeGen.GenOperation has cyclomatic complexity 139 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NameResolution.bindValueModifiersAndKindAsMemberFlags (cyclomatic 128) src/Compiler/Oly.Compiler/Binder/NameResolution.fs:2257— NameResolution.bindValueModifiersAndKindAsMemberFlags has cyclomatic complexity 128 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
InterpreterFunction.HandleCast (cyclomatic 119) src/Emitters/Interpreter/Oly.Emitters.Interpreter/Emitter.fs:756— InterpreterFunction.HandleCast has cyclomatic complexity 119 (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.
SymbolOperations.UnifyTypes (cyclomatic 104) src/Compiler/Oly.Compiler/Symbols/SymbolOperations.fs:404— SymbolOperations.UnifyTypes 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.
ILGen.GenCallExpression (cyclomatic 102) src/Compiler/Oly.Compiler/ILGen.fs:1843— ILGen.GenCallExpression has cyclomatic complexity 102 (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.
WorkspaceExtensions.OlyDocument.GetCompletions (cyclomatic 98) src/Compiler/Oly.Compiler.Workspace/OlyWorkspaceExtensions.fs:627— WorkspaceExtensions.OlyDocument.GetCompletions has cyclomatic complexity 98 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Pass2.bindBindingDeclarationCoreAux (cyclomatic 96) src/Compiler/Oly.Compiler/Binder/Pass2.fs:302— Pass2.bindBindingDeclarationCoreAux 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.
Pass3.bindTypeDeclarationBody (cyclomatic 92) src/Compiler/Oly.Compiler/Binder/Pass3.fs:206— Pass3.bindTypeDeclarationBody has cyclomatic complexity 92 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WellKnownFunctions.Validate (cyclomatic 82) src/Compiler/Oly.Compiler/Symbols/WellKnownFunctions.fs:10— WellKnownFunctions.Validate has cyclomatic complexity 82 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Helpers.importTypeDefinitionAsOlyILEntityDefinition (cyclomatic 81) src/Runtime/Targets/DotNet/Oly.Compiler.CIL.Importer/Importer.fs:1512— Helpers.importTypeDefinitionAsOlyILEntityDefinition has cyclomatic complexity 81 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PostInferenceAnalysis.analyzeExpressionAuxAux (cyclomatic 80) src/Compiler/Oly.Compiler/Binder/PostInferenceAnalysis.fs:926— PostInferenceAnalysis.analyzeExpressionAuxAux has cyclomatic complexity 80 (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.
OlyBoundModel.GetImmediateSymbols (cyclomatic 74) src/Compiler/Oly.Compiler/PublicAPI/PublicSymbols.fs:2288— OlyBoundModel.GetImmediateSymbols has cyclomatic complexity 74 (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.
SpirvTarget.GetAnalyzerDiagnostics (cyclomatic 70) src/Targets/Spirv/Oly.Runtime.Target.Spirv/SpirvTarget.fs:123— SpirvTarget.GetAnalyzerDiagnostics 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.
LexerModule.handleNonTriviaPeekAux (cyclomatic 69) src/Compiler/Oly.Compiler.Syntax/Internal/Lexer.fs:849— LexerModule.handleNonTriviaPeekAux has cyclomatic complexity 69 (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: LexerModule.scanKeywordOrIdentifier (cyclomatic 85) 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.
extension.activate (cyclomatic 69) vscode/src/extension.ts:57— extension.activate has cyclomatic complexity 69 (threshold 15). Of this number, 31 points are the body's own statements and 38 belong to 14 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CopyPropagation.handleExpressionAuxCopyPropagation (cyclomatic 66) src/Runtime/Oly.Runtime/Optimizations/CopyPropagation.fs:162— CopyPropagation.handleExpressionAuxCopyPropagation 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.
Pass1.bindTypeDeclarationBody (cyclomatic 64) src/Compiler/Oly.Compiler/Binder/Pass1.fs:50— Pass1.bindTypeDeclarationBody has cyclomatic complexity 64 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BoundTreeRewriteVisitorRunner.Rewrite (cyclomatic 63) src/Compiler/Oly.Compiler/BoundTreeRewriter.fs:323— BoundTreeRewriteVisitorRunner.Rewrite 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.
BoundTreeRewriter.Rewrite (cyclomatic 61) src/Compiler/Oly.Compiler/BoundTreeRewriter.fs:38— BoundTreeRewriter.Rewrite has cyclomatic complexity 61 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ILGen.GenExpressionAux (cyclomatic 58) src/Compiler/Oly.Compiler/ILGen.fs:1444— ILGen.GenExpressionAux has cyclomatic complexity 58 (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.
GeneralOptimizer.optimizeExpressionCore (cyclomatic 58) src/Runtime/Oly.Runtime/Optimizations/GeneralOptimizer.fs:90— GeneralOptimizer.optimizeExpressionCore has cyclomatic complexity 58 (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.
OlyRuntimeClrEmitter.Oly.Runtime.CodeGen.IOlyRuntimeEmitter<Oly.Emitters.DotNet.ClrTypeInfo, Oly.Emitters.DotNet.ClrMethodInfo, Oly.Emitters.DotNet.ClrFieldInfo>.EmitFunctionDefinition (cyclomatic 58) src/Emitters/DotNet/Oly.Emitters.DotNet/Emitter.fs:2798— OlyRuntimeClrEmitter.Oly.Runtime.CodeGen.IOlyRuntimeEmitter<Oly.Emitters.DotNet.ClrTypeInfo, Oly.Emitters.DotNet.ClrMethodInfo, Oly.Emitters.DotNet.ClrFieldInfo>.EmitFunctionDefinition 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.
PrettyPrint.printTypeAux (cyclomatic 56) src/Compiler/Oly.Compiler/PrettyPrint.fs:23— PrettyPrint.printTypeAux 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.
ClrMethodDefinitionBuilder.PopulateMethodBody (cyclomatic 55) src/Emitters/DotNet/DotNet.Metadata/MetadataBuilder.fs:2536— ClrMethodDefinitionBuilder.PopulateMethodBody 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.
Pass4.bindLocalExpressionAuxAux (cyclomatic 53) src/Compiler/Oly.Compiler/Binder/Pass4.fs:1649— Pass4.bindLocalExpressionAuxAux 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.
Substitution.substituteForLambdaLifting (cyclomatic 53) src/Compiler/Oly.Compiler/Substitution.fs:378— Substitution.substituteForLambdaLifting 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.
ILGen.emitILTypeAux (cyclomatic 52) src/Compiler/Oly.Compiler/ILGen.fs:362— ILGen.emitILTypeAux 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.
NameResolution.bindType (cyclomatic 52) src/Compiler/Oly.Compiler/Binder/NameResolution.fs:1419— NameResolution.bindType 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.
NameResolution.bindTypeConstructor (cyclomatic 52) src/Compiler/Oly.Compiler/Binder/NameResolution.fs:1660— NameResolution.bindTypeConstructor has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
OlySyntaxDiffs.OlySyntaxTree.AreOpenDeclarationsEqual.Static (cyclomatic 50) src/Compiler/Oly.Compiler.Syntax/SyntaxTreeImplementation.fs:1751— OlySyntaxDiffs.OlySyntaxTree.AreOpenDeclarationsEqual.Static 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.
CompilerImports.importTypeSymbol (cyclomatic 48) src/Compiler/Oly.Compiler/CompilerImports.fs:950— CompilerImports.importTypeSymbol has cyclomatic complexity 48 (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.
SpirvLowering.LowerOperation (cyclomatic 48) src/Emitters/Spirv/Oly.Emitters.Spirv/SpirvLowering.fs:205— SpirvLowering.LowerOperation has cyclomatic complexity 48 (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.
ILGen.GenEntityDefinitionNoCache (cyclomatic 45) src/Compiler/Oly.Compiler/ILGen.fs:1104— ILGen.GenEntityDefinitionNoCache has cyclomatic complexity 45 (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.
ExtensionHelpers.getViewModel (cyclomatic 45) src/LanguageServer/Oly.LanguageServer/LanguageServer.fs:798— ExtensionHelpers.getViewModel has cyclomatic complexity 45 (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.
DeadCodeElimination.DeadCodeElimination (cyclomatic 42) src/Runtime/Oly.Runtime/Optimizations/DeadCodeElimination.fs:19— DeadCodeElimination.DeadCodeElimination has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
OlyRuntimeClrEmitter.Oly.Runtime.CodeGen.IOlyRuntimeEmitter<Oly.Emitters.DotNet.ClrTypeInfo, Oly.Emitters.DotNet.ClrMethodInfo, Oly.Emitters.DotNet.ClrFieldInfo>.EmitTypeDefinitionInfo (cyclomatic 42) src/Emitters/DotNet/Oly.Emitters.DotNet/Emitter.fs:2329— OlyRuntimeClrEmitter.Oly.Runtime.CodeGen.IOlyRuntimeEmitter<Oly.Emitters.DotNet.ClrTypeInfo, Oly.Emitters.DotNet.ClrMethodInfo, Oly.Emitters.DotNet.ClrFieldInfo>.EmitTypeDefinitionInfo has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NameResolution.bindNameAsItemAux (cyclomatic 41) src/Compiler/Oly.Compiler/Binder/NameResolution.fs:901— NameResolution.bindNameAsItemAux 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.
SpirvCodeGen.GenOperation (cyclomatic 40) src/Emitters/Spirv/Oly.Emitters.Spirv/SpirvCodeGen.fs:100— SpirvCodeGen.GenOperation 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.
SymbolOperations.createFunctionValueSemantic (cyclomatic 39) src/Compiler/Oly.Compiler/Symbols/SymbolOperations.fs:2213— SymbolOperations.createFunctionValueSemantic 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.
Helpers.OptimizeImmediateConstantFolding (cyclomatic 39) src/Runtime/Oly.Runtime/Optimizations/optenv.fs:324— Helpers.OptimizeImmediateConstantFolding 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.
DotNetTarget.BuildProjectAsync (cyclomatic 39) src/Runtime/Targets/DotNet/Oly.Compiler.CIL.Importer/DotNetTarget.fs:484— DotNetTarget.BuildProjectAsync 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.
Symbols.getTypeSymbol (cyclomatic 38) src/Compiler/Oly.Compiler/PublicAPI/PublicSymbols.fs:1627— Symbols.getTypeSymbol has cyclomatic complexity 38 (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.
OlyRuntimeClrEmitter.Oly.Runtime.CodeGen.IOlyRuntimeEmitter<Oly.Emitters.DotNet.ClrTypeInfo, Oly.Emitters.DotNet.ClrMethodInfo, Oly.Emitters.DotNet.ClrFieldInfo>.EmitFieldDefinition (cyclomatic 38) src/Emitters/DotNet/Oly.Emitters.DotNet/Emitter.fs:2601— OlyRuntimeClrEmitter.Oly.Runtime.CodeGen.IOlyRuntimeEmitter<Oly.Emitters.DotNet.ClrTypeInfo, Oly.Emitters.DotNet.ClrMethodInfo, Oly.Emitters.DotNet.ClrFieldInfo>.EmitFieldDefinition 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.
WorkspaceExtensions.OlyDocument.TryFindFunctionCallInfo (cyclomatic 37) src/Compiler/Oly.Compiler.Workspace/OlyWorkspaceExtensions.fs:450— WorkspaceExtensions.OlyDocument.TryFindFunctionCallInfo 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.
PostInferenceAnalysis.analyzeBindingInfo (cyclomatic 37) src/Compiler/Oly.Compiler/Binder/PostInferenceAnalysis.fs:526— PostInferenceAnalysis.analyzeBindingInfo 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.
NameResolution.bindLiteral (cyclomatic 37) src/Compiler/Oly.Compiler/Binder/NameResolution.fs:2645— NameResolution.bindLiteral 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.
Scoping.openContentsOfEntityAux (cyclomatic 37) src/Compiler/Oly.Compiler/Binder/Scoping.fs:103— Scoping.openContentsOfEntityAux 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.
Checker.checkReceiverOfExpression (cyclomatic 37) src/Compiler/Oly.Compiler/Checker.fs:863— Checker.checkReceiverOfExpression 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.
WorkspaceExtensions.OlyDocument.GetDirectiveCompletions (cyclomatic 35) src/Compiler/Oly.Compiler.Workspace/OlyWorkspaceExtensions.fs:1088— WorkspaceExtensions.OlyDocument.GetDirectiveCompletions 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.
TextDocumentSyncHandler.OmniSharp.Extensions.LanguageServer.Protocol.Document.IHoverHandler.Handle (cyclomatic 35) src/LanguageServer/Oly.LanguageServer/LanguageServer.fs:1854— TextDocumentSyncHandler.OmniSharp.Extensions.LanguageServer.Protocol.Document.IHoverHandler.Handle 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.
NameResolution.unescapeTextAux (cyclomatic 34) src/Compiler/Oly.Compiler/Binder/NameResolution.fs:2559— NameResolution.unescapeTextAux 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.
Solver.solveWitnessesByType (cyclomatic 34) src/Compiler/Oly.Compiler/Solver.fs:247— Solver.solveWitnessesByType 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.
WellKnownExpressions.AddressOfReceiverIfPossibleAux (cyclomatic 34) src/Compiler/Oly.Compiler/WellKnownExpressions.fs:270— WellKnownExpressions.AddressOfReceiverIfPossibleAux 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.
ILGen.GenFunctionAsILFunctionDefinition (cyclomatic 33) src/Compiler/Oly.Compiler/ILGen.fs:737— ILGen.GenFunctionAsILFunctionDefinition 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.
BoundTreeVisitor.VisitExpression (cyclomatic 33) src/Compiler/Oly.Compiler/BoundTreeVisitor.fs:81— BoundTreeVisitor.VisitExpression 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.
CommonSubexpressionElimination.handleExpressionAuxCse (cyclomatic 33) src/Runtime/Oly.Runtime/Optimizations/CommonSubexpressionElimination.fs:157— CommonSubexpressionElimination.handleExpressionAuxCse 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.
ClrCodeGen.GenValue (cyclomatic 33) src/Emitters/DotNet/Oly.Emitters.DotNet/Emitter.fs:1174— ClrCodeGen.GenValue 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.
Pass2.bindTopLevelPropertyBinding (cyclomatic 32) src/Compiler/Oly.Compiler/Binder/Pass2.fs:929— Pass2.bindTopLevelPropertyBinding 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.
RuntimeType.System.IEquatable<Oly.Runtime.CodeGen.InternalTypes.RuntimeType>.Equals (cyclomatic 32) src/Runtime/Oly.Runtime/InternalCodeGenTypes.fs:1317— RuntimeType.System.IEquatable<Oly.Runtime.CodeGen.InternalTypes.RuntimeType>.Equals 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.
SpirvType.GetDefinitionInstructions (cyclomatic 32) src/Emitters/Spirv/Oly.Emitters.Spirv/SpirvModuleBuilder.fs:167— SpirvType.GetDefinitionInstructions 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.
EarlyAttributes.tryAddIntrinsicPrimitivesForEntity (cyclomatic 31) src/Compiler/Oly.Compiler/Binder/EarlyAttributes.fs:148— EarlyAttributes.tryAddIntrinsicPrimitivesForEntity 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.
NameResolution.bindConstraint (cyclomatic 31) src/Compiler/Oly.Compiler/Binder/NameResolution.fs:2035— NameResolution.bindConstraint 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.
LexerModule.scanNumericLiteralAux (cyclomatic 31) src/Compiler/Oly.Compiler.Syntax/Internal/Lexer.fs:227— LexerModule.scanNumericLiteralAux 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. This is NOT this file's highest cyclomatic complexity: LexerModule.scanKeywordOrIdentifier (cyclomatic 85) 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.
Helpers.decodeTypedArg (cyclomatic 31) src/Runtime/Targets/DotNet/Oly.Compiler.CIL.Importer/Importer.fs:1334— Helpers.decodeTypedArg 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. This is NOT this file's highest cyclomatic complexity: Helpers.mapDotNetTypeToOlyType (cyclomatic 40) 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.
Solver.solveShape (cyclomatic 30) src/Compiler/Oly.Compiler/Solver.fs:92— Solver.solveShape 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.
Iterator.VisitExpression (cyclomatic 30) src/Compiler/Oly.Compiler/BoundTreeExtensions.fs:339— Iterator.VisitExpression has cyclomatic complexity 30 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ClrCodeGen.GenExpressionAux (cyclomatic 30) src/Emitters/DotNet/Oly.Emitters.DotNet/Emitter.fs:1550— ClrCodeGen.GenExpressionAux 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.
Program.computeInternalNode (cyclomatic 30) src/Compiler/Oly.Compiler.SyntaxGenerator/Program.fs:39— Program.computeInternalNode 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.
Pass0.bindTypeDeclaration (cyclomatic 29) src/Compiler/Oly.Compiler/Binder/Pass0.fs:78— Pass0.bindTypeDeclaration 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.
MetadataHelpers.encodeType (cyclomatic 29) src/Emitters/DotNet/DotNet.Metadata/MetadataBuilder.fs:76— MetadataHelpers.encodeType 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. This is NOT this file's highest cyclomatic complexity: ClrAssemblyBuilder.AddAnonymousFunctionType (cyclomatic 36) 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.
Dump.dumpExpression (cyclomatic 28) src/Compiler/Oly.Compiler/Dump.fs:160— Dump.dumpExpression 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.
OlyBoundSubModel.TryGetMatchType (cyclomatic 27) src/Compiler/Oly.Compiler/PublicAPI/PublicSymbols.fs:1329— OlyBoundSubModel.TryGetMatchType 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.
Pass3.bindTypeDeclaration (cyclomatic 27) src/Compiler/Oly.Compiler/Binder/Pass3.fs:113— Pass3.bindTypeDeclaration 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.
Checker.checkImplementation (cyclomatic 26) src/Compiler/Oly.Compiler/Checker.fs:450— Checker.checkImplementation has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PrettyPrint.printValueAux (cyclomatic 26) src/Compiler/Oly.Compiler/PrettyPrint.fs:439— PrettyPrint.printValueAux 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.
RuntimeFunction.VerifyConstraintsCore (cyclomatic 26) src/Runtime/Oly.Runtime/InternalCodeGenTypes.fs:1717— RuntimeFunction.VerifyConstraintsCore 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.
Pass4.bindTopLevelBinding (cyclomatic 25) src/Compiler/Oly.Compiler/Binder/Pass4.fs:228— Pass4.bindTopLevelBinding 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.
Checker.checkConstructorImplementation (cyclomatic 25) src/Compiler/Oly.Compiler/Checker.fs:580— Checker.checkConstructorImplementation 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.
Helpers.hasSideEffectAux (cyclomatic 25) src/Runtime/Oly.Runtime/Optimizations/optenv.fs:161— Helpers.hasSideEffectAux 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.
Extensions.BlobBuilder.WriteTypeOfC (cyclomatic 25) src/Emitters/DotNet/Oly.Emitters.DotNet/Extensions.fs:23— Extensions.BlobBuilder.WriteTypeOfC 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.
EarlyAttributes.bindEarlyAttribute (cyclomatic 24) src/Compiler/Oly.Compiler/Binder/EarlyAttributes.fs:37— EarlyAttributes.bindEarlyAttribute 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.
OpenDeclarations.bindOpenDeclaration (cyclomatic 24) src/Compiler/Oly.Compiler/Binder/OpenDeclarations.fs:11— OpenDeclarations.bindOpenDeclaration 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.
NameResolution.bindIdentifierAsMemberValue (cyclomatic 24) src/Compiler/Oly.Compiler/Binder/NameResolution.fs:1231— NameResolution.bindIdentifierAsMemberValue 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.
Helpers.getFreeInferenceVariables (cyclomatic 24) src/Compiler/Oly.Compiler/BoundTreeExtensions.fs:182— Helpers.getFreeInferenceVariables 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.
ClrCodeGen.GenCall (cyclomatic 24) src/Emitters/DotNet/Oly.Emitters.DotNet/Emitter.fs:1262— ClrCodeGen.GenCall 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.
ClrTypeDefinitionBuilder.Build (cyclomatic 24) src/Emitters/DotNet/DotNet.Metadata/MetadataBuilder.fs:3146— ClrTypeDefinitionBuilder.Build 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. This is NOT this file's highest cyclomatic complexity: ClrAssemblyBuilder.AddAnonymousFunctionType (cyclomatic 36) 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.
BinderEnvironment.SetUnqualifiedValueAux (cyclomatic 23) src/Compiler/Oly.Compiler/Binder/Environment.fs:416— BinderEnvironment.SetUnqualifiedValueAux 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.
DotNetTarget.GetAnalyzerDiagnostics (cyclomatic 23) src/Runtime/Targets/DotNet/Oly.Compiler.CIL.Importer/DotNetTarget.fs:788— DotNetTarget.GetAnalyzerDiagnostics 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.
Pass4.checkExhaustiveness (cyclomatic 22) src/Compiler/Oly.Compiler/Binder/Pass4.fs:920— Pass4.checkExhaustiveness 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.
NameResolution.bindIdentifierWithNoReceiverAsFormalItem (cyclomatic 22) src/Compiler/Oly.Compiler/Binder/NameResolution.fs:246— NameResolution.bindIdentifierWithNoReceiverAsFormalItem 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.
Checker.createGeneralizedFunctionTypeParameters (cyclomatic 22) src/Compiler/Oly.Compiler/Checker.fs:23— Checker.createGeneralizedFunctionTypeParameters 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.
FunctionOverloading.filterFunctionsForOverloadingByWeight (cyclomatic 22) src/Compiler/Oly.Compiler/FunctionOverloading.fs:111— FunctionOverloading.filterFunctionsForOverloadingByWeight 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.
LocalNormalization.handleExpressionAuxNormalizeLocals (cyclomatic 22) src/Runtime/Oly.Runtime/LocalNormalization.fs:109— LocalNormalization.handleExpressionAuxNormalizeLocals 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.
Helpers.importMethodDefinitionAsOlyILFunctionDefinition (cyclomatic 22) src/Runtime/Targets/DotNet/Oly.Compiler.CIL.Importer/Importer.fs:1195— Helpers.importMethodDefinitionAsOlyILFunctionDefinition has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Helpers.mapDotNetTypeToOlyType (cyclomatic 40) 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.
OlyValueSymbol.IsSimilarTo (cyclomatic 21) src/Compiler/Oly.Compiler/PublicAPI/PublicSymbols.fs:653— OlyValueSymbol.IsSimilarTo 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.
Pass4.bindPatternByResolutionItem (cyclomatic 21) src/Compiler/Oly.Compiler/Binder/Pass4.fs:1956— Pass4.bindPatternByResolutionItem 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.
Solver.solveConstraint (cyclomatic 21) src/Compiler/Oly.Compiler/Solver.fs:447— Solver.solveConstraint 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.
SymbolOperations.freshenTypeAux (cyclomatic 21) src/Compiler/Oly.Compiler/Symbols/SymbolOperations.fs:2735— SymbolOperations.freshenTypeAux 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.
Symbols.tryActualType (cyclomatic 21) src/Compiler/Oly.Compiler/Symbols/Symbols.fs:1189— Symbols.tryActualType 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. This is NOT this file's highest cyclomatic complexity: WellKnownFunction.TryFromName (cyclomatic 43) 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.
WorkspaceExtensions.classifyValueKind (cyclomatic 20) src/Compiler/Oly.Compiler.Workspace/OlyWorkspaceExtensions.fs:77— WorkspaceExtensions.classifyValueKind 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.
NameResolution.resolveFormalValue (cyclomatic 20) src/Compiler/Oly.Compiler/Binder/NameResolution.fs:821— NameResolution.resolveFormalValue 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.
Substitution.substituteForAutoGeneralization (cyclomatic 20) src/Compiler/Oly.Compiler/Substitution.fs:269— Substitution.substituteForAutoGeneralization 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.
Symbols.actualType (cyclomatic 20) src/Compiler/Oly.Compiler/Symbols/Symbols.fs:534— Symbols.actualType has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: WellKnownFunction.TryFromName (cyclomatic 43) 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.
AssertionPropagation.assertionPropagateExpressionAux (cyclomatic 20) src/Runtime/Oly.Runtime/Optimizations/AssertionPropagation.fs:200— AssertionPropagation.assertionPropagateExpressionAux 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.
Helpers.tryImportFieldDefinitionAsOlyILFieldDefinition (cyclomatic 20) src/Runtime/Targets/DotNet/Oly.Compiler.CIL.Importer/Importer.fs:1000— Helpers.tryImportFieldDefinitionAsOlyILFieldDefinition 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. This is NOT this file's highest cyclomatic complexity: Helpers.mapDotNetTypeToOlyType (cyclomatic 40) 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.
Extensions.ClrTypeDefinitionBuilder.CreateMethodDefinitionBuilderEx (cyclomatic 20) src/Emitters/DotNet/Oly.Emitters.DotNet/Extensions.fs:145— Extensions.ClrTypeDefinitionBuilder.CreateMethodDefinitionBuilderEx has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: Extensions.BlobBuilder.WriteValueOfC (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
ClrPdbBuilder.BuildSequencePoints (cyclomatic 20) src/Emitters/DotNet/DotNet.Metadata/MetadataBuilder.fs:337— ClrPdbBuilder.BuildSequencePoints 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. This is NOT this file's highest cyclomatic complexity: ClrAssemblyBuilder.AddAnonymousFunctionType (cyclomatic 36) 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.
ClrTypeHandle.Equals (cyclomatic 20) src/Emitters/DotNet/DotNet.Metadata/MetadataTypes.fs:184— ClrTypeHandle.Equals 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.
SpirvEmitter.Oly.Runtime.CodeGen.IOlyRuntimeEmitter<Oly.Emitters.Spirv.SpirvType, Oly.Emitters.Spirv.SpirvFunction, Oly.Emitters.Spirv.SpirvField>.EmitFunctionDefinition (cyclomatic 20) src/Emitters/Spirv/Oly.Emitters.Spirv/SpirvEmitter.fs:136— SpirvEmitter.Oly.Runtime.CodeGen.IOlyRuntimeEmitter<Oly.Emitters.Spirv.SpirvType, Oly.Emitters.Spirv.SpirvFunction, Oly.Emitters.Spirv.SpirvField>.EmitFunctionDefinition 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.
PostInferenceAnalysis.analyzeTypeAux (cyclomatic 19) src/Compiler/Oly.Compiler/Binder/PostInferenceAnalysis.fs:157— PostInferenceAnalysis.analyzeTypeAux 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.checkConstraintsFromCallExpression (cyclomatic 19) src/Compiler/Oly.Compiler/Checker.fs:982— Checker.checkConstraintsFromCallExpression 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.
CompilerImports.retargetEntity (cyclomatic 19) src/Compiler/Oly.Compiler/CompilerImports.fs:469— CompilerImports.retargetEntity 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.
SymbolOperations.EntitySymbol.Hierarchy (cyclomatic 19) src/Compiler/Oly.Compiler/Symbols/SymbolOperations.fs:2935— SymbolOperations.EntitySymbol.Hierarchy has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: SymbolOperations.areConstantsEqual (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.
LexerModule.handlePeek (cyclomatic 19) src/Compiler/Oly.Compiler.Syntax/Internal/Lexer.fs:1125— LexerModule.handlePeek 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. This is NOT this file's highest cyclomatic complexity: LexerModule.scanKeywordOrIdentifier (cyclomatic 85) 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.
ClrCodeGen.getPrimitiveTypeCode (cyclomatic 19) src/Emitters/DotNet/Oly.Emitters.DotNet/Emitter.fs:406— ClrCodeGen.getPrimitiveTypeCode 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.
TextDocumentSyncHandler.OmniSharp.Extensions.LanguageServer.Protocol.Document.IDocumentSymbolHandler.Handle (cyclomatic 19) src/LanguageServer/Oly.LanguageServer/LanguageServer.fs:1533— TextDocumentSyncHandler.OmniSharp.Extensions.LanguageServer.Protocol.Document.IDocumentSymbolHandler.Handle 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. This is NOT this file's highest cyclomatic complexity: LanguageServer.OlyClassificationKind.ToLspClassificationKind (cyclomatic 23) 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.
Pass4.bindItemAsExpression (cyclomatic 18) src/Compiler/Oly.Compiler/Binder/Pass4.fs:391— Pass4.bindItemAsExpression 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.
Attributes.bindAttributeExpressionAux (cyclomatic 18) src/Compiler/Oly.Compiler/Binder/Attributes.fs:118— Attributes.bindAttributeExpressionAux 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.
NameResolution.checkVirtualUsage (cyclomatic 18) src/Compiler/Oly.Compiler/Binder/NameResolution.fs:481— NameResolution.checkVirtualUsage 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.
Iterator.VisitExpression (cyclomatic 18) src/Compiler/Oly.Compiler/BoundTreeExtensions.fs:65— Iterator.VisitExpression 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.
SymbolOperations.unifyVariadicTypes (cyclomatic 18) src/Compiler/Oly.Compiler/Symbols/SymbolOperations.fs:243— SymbolOperations.unifyVariadicTypes has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: SymbolOperations.areConstantsEqual (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.
RuntimeType.Substitute (cyclomatic 18) src/Runtime/Oly.Runtime/InternalCodeGenTypes.fs:1151— RuntimeType.Substitute has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: RuntimeType.Strip (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
OlySignatureTypeProvider.System.Reflection.Metadata.ISignatureTypeProvider<Oly.Metadata.OlyILType, System.Int32>.GetModifiedType (cyclomatic 18) src/Runtime/Targets/DotNet/Oly.Compiler.CIL.Importer/Importer.fs:304— OlySignatureTypeProvider.System.Reflection.Metadata.ISignatureTypeProvider<Oly.Metadata.OlyILType, System.Int32>.GetModifiedType has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Helpers.mapDotNetTypeToOlyType (cyclomatic 40) 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.
Normalization.NormalizeAndCheck (cyclomatic 18) src/Emitters/Spirv/Oly.Emitters.Spirv/SpirvModuleBuilder.fs:1262— Normalization.NormalizeAndCheck 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.
SpirvModuleBuilder.CreateVariableType (cyclomatic 18) src/Emitters/Spirv/Oly.Emitters.Spirv/SpirvModuleBuilder.fs:1045— SpirvModuleBuilder.CreateVariableType 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.
OlyBoundSubModel.IsUnqualified (cyclomatic 17) src/Compiler/Oly.Compiler/PublicAPI/PublicSymbols.fs:1241— OlyBoundSubModel.IsUnqualified 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.
PostInferenceAnalysis.checkValue (cyclomatic 17) src/Compiler/Oly.Compiler/Binder/PostInferenceAnalysis.fs:435— PostInferenceAnalysis.checkValue 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.
Checker.checkTypeConstructorDepthWithType (cyclomatic 17) src/Compiler/Oly.Compiler/Checker.fs:345— Checker.checkTypeConstructorDepthWithType 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.
FunctionOverloading.filterFunctionsForOverloadingPhase4 (cyclomatic 17) src/Compiler/Oly.Compiler/FunctionOverloading.fs:226— FunctionOverloading.filterFunctionsForOverloadingPhase4 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.
BoundTreeExtensions.BoundTree.ForEachForTooling (cyclomatic 17) src/Compiler/Oly.Compiler/BoundTreeExtensions.fs:539— BoundTreeExtensions.BoundTree.ForEachForTooling 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.
BoundTreeExtensions.subsumesShapeMembersWith (cyclomatic 17) src/Compiler/Oly.Compiler/BoundTreeExtensions.fs:869— BoundTreeExtensions.subsumesShapeMembersWith 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.
Pass4.bindMemberValueRightSideExpression (cyclomatic 16) src/Compiler/Oly.Compiler/Binder/Pass4.fs:654— Pass4.bindMemberValueRightSideExpression 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.
Symbols.applyType (cyclomatic 16) src/Compiler/Oly.Compiler/Symbols/Symbols.fs:467— Symbols.applyType 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. This is NOT this file's highest cyclomatic complexity: WellKnownFunction.TryFromName (cyclomatic 43) 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.
SpirvModuleBuilder.Build (cyclomatic 16) src/Emitters/Spirv/Oly.Emitters.Spirv/SpirvModuleBuilder.fs:1194— SpirvModuleBuilder.Build has cyclomatic complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline. This is NOT this file's highest cyclomatic complexity: SpirvType.GetSizeInBytes (cyclomatic 18) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
Deprecated: xunit — xunit 2.9.3 — Legacy — the publisher's replacement is `xunit.v3`; that is the next major line under a new package id, so the move is a breaking rename rather than a version bump — budget for API changes in the code that uses it, not only the reference swap.
WorkspaceExtensions.OlyDocument.GetCompletions (cognitive 273) src/Compiler/Oly.Compiler.Workspace/OlyWorkspaceExtensions.fs:627— WorkspaceExtensions.OlyDocument.GetCompletions has cognitive complexity 273 (threshold 15). Drivers by points: if/else 49 (148 pts), match/switch 31 (111 pts), boolean chains 14 (nesting depth added 179). 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.
Pass2.bindBindingDeclarationCoreAux (cognitive 262) src/Compiler/Oly.Compiler/Binder/Pass2.fs:302— Pass2.bindBindingDeclarationCoreAux has cognitive complexity 262 (threshold 15). Drivers by points: if/else 81 (190 pts), match/switch 19 (59 pts), boolean chains 13 (nesting depth added 149). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
OlyBoundModel.GetImmediateSymbols (cognitive 199) src/Compiler/Oly.Compiler/PublicAPI/PublicSymbols.fs:2288— OlyBoundModel.GetImmediateSymbols has cognitive complexity 199 (threshold 15). Drivers by points: match/switch 44 (170 pts), if/else 6 (28 pts), boolean chains 1 (nesting depth added 148). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Pass3.bindTypeDeclarationBody (cognitive 198) src/Compiler/Oly.Compiler/Binder/Pass3.fs:206— Pass3.bindTypeDeclarationBody has cognitive complexity 198 (threshold 15). Drivers by points: if/else 60 (115 pts), match/switch 26 (68 pts), boolean chains 11, loops 1 (4 pts) (nesting depth added 100). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SymbolOperations.UnifyTypes (cognitive 198) src/Compiler/Oly.Compiler/Symbols/SymbolOperations.fs:404— SymbolOperations.UnifyTypes has cognitive complexity 198 (threshold 15). Drivers by points: if/else 41 (131 pts), match/switch 7 (36 pts), boolean chains 31 (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.
DotNetTarget.BuildProjectAsync (cognitive 193) src/Runtime/Targets/DotNet/Oly.Compiler.CIL.Importer/DotNetTarget.fs:484— DotNetTarget.BuildProjectAsync has cognitive complexity 193 (threshold 15). Drivers by points: if/else 33 (133 pts), match/switch 11 (49 pts), error handling 1 (8 pts), boolean chains 3 (nesting depth added 145). 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.
NameResolution.bindValueModifiersAndKindAsMemberFlags (cognitive 180) src/Compiler/Oly.Compiler/Binder/NameResolution.fs:2257— NameResolution.bindValueModifiersAndKindAsMemberFlags has cognitive complexity 180 (threshold 15). Drivers by points: if/else 72 (149 pts), boolean chains 21, match/switch 7 (10 pts) (nesting depth added 80). 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.
Helpers.importTypeDefinitionAsOlyILEntityDefinition (cognitive 179) src/Runtime/Targets/DotNet/Oly.Compiler.CIL.Importer/Importer.fs:1512— Helpers.importTypeDefinitionAsOlyILEntityDefinition has cognitive complexity 179 (threshold 15). Drivers by points: if/else 61 (115 pts), match/switch 16 (52 pts), boolean chains 8, loops 2 (4 pts) (nesting depth added 92). 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.
ClrCodeGen.GenOperation (cognitive 168) src/Emitters/DotNet/Oly.Emitters.DotNet/Emitter.fs:603— ClrCodeGen.GenOperation has cognitive complexity 168 (threshold 15). Drivers by points: if/else 61 (105 pts), match/switch 19 (52 pts), boolean chains 9, loops 1 (2 pts) (nesting depth added 78). 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.
WorkspaceExtensions.OlyDocument.TryFindFunctionCallInfo (cognitive 163) src/Compiler/Oly.Compiler.Workspace/OlyWorkspaceExtensions.fs:450— WorkspaceExtensions.OlyDocument.TryFindFunctionCallInfo has cognitive complexity 163 (threshold 15). Drivers by points: if/else 43 (128 pts), match/switch 10 (35 pts) (nesting depth added 110). 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.
WellKnownFunctions.Validate (cognitive 162) src/Compiler/Oly.Compiler/Symbols/WellKnownFunctions.fs:10— WellKnownFunctions.Validate has cognitive complexity 162 (threshold 15). Drivers by points: if/else 55 (135 pts), boolean chains 23, match/switch 2 (4 pts) (nesting depth added 82). 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.
ILGen.GenCallExpression (cognitive 151) src/Compiler/Oly.Compiler/ILGen.fs:1843— ILGen.GenCallExpression has cognitive complexity 151 (threshold 15). Drivers by points: match/switch 25 (75 pts), if/else 25 (63 pts), boolean chains 13 (nesting depth added 88). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
PostInferenceAnalysis.analyzeExpressionAuxAux (cognitive 149) src/Compiler/Oly.Compiler/Binder/PostInferenceAnalysis.fs:926— PostInferenceAnalysis.analyzeExpressionAuxAux has cognitive complexity 149 (threshold 15). Drivers by points: match/switch 24 (70 pts), if/else 27 (62 pts), loops 2 (10 pts), boolean chains 7 (nesting depth added 89). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
InterpreterFunction.CallWithStackAux (cognitive 147) src/Emitters/Interpreter/Oly.Emitters.Interpreter/Emitter.fs:1039— InterpreterFunction.CallWithStackAux has cognitive complexity 147 (threshold 15). Drivers by points: match/switch 41 (96 pts), if/else 15 (36 pts), loops 6 (14 pts), boolean chains 1 (nesting depth added 84). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SpirvTarget.GetAnalyzerDiagnostics (cognitive 147) src/Targets/Spirv/Oly.Runtime.Target.Spirv/SpirvTarget.fs:123— SpirvTarget.GetAnalyzerDiagnostics has cognitive complexity 147 (threshold 15). Drivers by points: if/else 30 (77 pts), match/switch 20 (58 pts), boolean chains 12 (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.
NameResolution.bindTypeConstructor (cognitive 146) src/Compiler/Oly.Compiler/Binder/NameResolution.fs:1660— NameResolution.bindTypeConstructor has cognitive complexity 146 (threshold 15). Drivers by points: if/else 52 (114 pts), match/switch 5 (20 pts), boolean chains 12 (nesting depth added 77). 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.
Solver.solveWitnessesByType (cognitive 145) src/Compiler/Oly.Compiler/Solver.fs:247— Solver.solveWitnessesByType has cognitive complexity 145 (threshold 15). Drivers by points: if/else 42 (136 pts), match/switch 4 (8 pts), boolean chains 1 (nesting depth added 98). 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.
CopyPropagation.handleExpressionAuxCopyPropagation (cognitive 137) src/Runtime/Oly.Runtime/Optimizations/CopyPropagation.fs:162— CopyPropagation.handleExpressionAuxCopyPropagation has cognitive complexity 137 (threshold 15). Drivers by points: if/else 38 (88 pts), match/switch 10 (33 pts), boolean chains 16 (nesting depth added 73). 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.
Pass1.bindTypeDeclarationBody (cognitive 131) src/Compiler/Oly.Compiler/Binder/Pass1.fs:50— Pass1.bindTypeDeclarationBody has cognitive complexity 131 (threshold 15). Drivers by points: if/else 50 (96 pts), match/switch 10 (22 pts), boolean chains 13 (nesting depth added 58). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Scoping.openContentsOfEntityAux (cognitive 130) src/Compiler/Oly.Compiler/Binder/Scoping.fs:103— Scoping.openContentsOfEntityAux has cognitive complexity 130 (threshold 15). Drivers by points: if/else 27 (69 pts), match/switch 10 (54 pts), boolean chains 7 (nesting depth added 86). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Substitution.substituteForLambdaLifting (cognitive 130) src/Compiler/Oly.Compiler/Substitution.fs:378— Substitution.substituteForLambdaLifting has cognitive complexity 130 (threshold 15). Drivers by points: if/else 40 (86 pts), match/switch 14 (35 pts), boolean chains 9 (nesting depth added 67). 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.
OlyRuntimeClrEmitter.Oly.Runtime.CodeGen.IOlyRuntimeEmitter<Oly.Emitters.DotNet.ClrTypeInfo, Oly.Emitters.DotNet.ClrMethodInfo, Oly.Emitters.DotNet.ClrFieldInfo>.EmitFunctionDefinition (cognitive 126) src/Emitters/DotNet/Oly.Emitters.DotNet/Emitter.fs:2798— OlyRuntimeClrEmitter.Oly.Runtime.CodeGen.IOlyRuntimeEmitter<Oly.Emitters.DotNet.ClrTypeInfo, Oly.Emitters.DotNet.ClrMethodInfo, Oly.Emitters.DotNet.ClrFieldInfo>.EmitFunctionDefinition has cognitive complexity 126 (threshold 15). Drivers by points: if/else 33 (77 pts), match/switch 11 (36 pts), boolean chains 13 (nesting depth added 69). 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.
WorkspaceExtensions.OlyDocument.GetDirectiveCompletions (cognitive 118) src/Compiler/Oly.Compiler.Workspace/OlyWorkspaceExtensions.fs:1088— WorkspaceExtensions.OlyDocument.GetDirectiveCompletions has cognitive complexity 118 (threshold 15). Drivers by points: match/switch 12 (57 pts), if/else 14 (55 pts), boolean chains 6 (nesting depth added 86). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ClrMethodDefinitionBuilder.PopulateMethodBody (cognitive 112) src/Emitters/DotNet/DotNet.Metadata/MetadataBuilder.fs:2536— ClrMethodDefinitionBuilder.PopulateMethodBody has cognitive complexity 112 (threshold 15). Drivers by points: if/else 24 (61 pts), match/switch 11 (38 pts), loops 6 (12 pts), boolean chains 1 (nesting depth added 70). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BoundTreeRewriter.Rewrite (cognitive 111) src/Compiler/Oly.Compiler/BoundTreeRewriter.fs:38— BoundTreeRewriter.Rewrite has cognitive complexity 111 (threshold 15). Drivers by points: if/else 46 (92 pts), boolean chains 11, match/switch 3 (8 pts) (nesting depth added 51). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BoundTreeRewriteVisitorRunner.Rewrite (cognitive 110) src/Compiler/Oly.Compiler/BoundTreeRewriter.fs:323— BoundTreeRewriteVisitorRunner.Rewrite has cognitive complexity 110 (threshold 15). Drivers by points: if/else 44 (90 pts), boolean chains 11, match/switch 4 (9 pts) (nesting depth added 51). 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.
PostInferenceAnalysis.analyzeBindingInfo (cognitive 101) src/Compiler/Oly.Compiler/Binder/PostInferenceAnalysis.fs:526— PostInferenceAnalysis.analyzeBindingInfo has cognitive complexity 101 (threshold 15). Drivers by points: match/switch 16 (54 pts), if/else 16 (35 pts), loops 2 (10 pts), boolean chains 2 (nesting depth added 65). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Checker.checkConstraintsFromCallExpression (cognitive 99) src/Compiler/Oly.Compiler/Checker.fs:982— Checker.checkConstraintsFromCallExpression has cognitive complexity 99 (threshold 15). Drivers by points: if/else 17 (61 pts), match/switch 6 (35 pts), boolean chains 3 (nesting depth added 73). 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.
WellKnownExpressions.AddressOfReceiverIfPossibleAux (cognitive 96) src/Compiler/Oly.Compiler/WellKnownExpressions.fs:270— WellKnownExpressions.AddressOfReceiverIfPossibleAux has cognitive complexity 96 (threshold 15). Drivers by points: if/else 25 (60 pts), match/switch 9 (31 pts), boolean chains 5 (nesting depth added 57). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
NameResolution.unescapeTextAux (cognitive 95) src/Compiler/Oly.Compiler/Binder/NameResolution.fs:2559— NameResolution.unescapeTextAux has cognitive complexity 95 (threshold 15). Drivers by points: if/else 20 (67 pts), loops 3 (18 pts), match/switch 2 (6 pts), boolean chains 4 (nesting depth added 66). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
NameResolution.bindNameAsItemAux (cognitive 93) src/Compiler/Oly.Compiler/Binder/NameResolution.fs:901— NameResolution.bindNameAsItemAux has cognitive complexity 93 (threshold 15). Drivers by points: match/switch 15 (50 pts), if/else 17 (42 pts), boolean chains 1 (nesting depth added 60). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Helpers.OptimizeImmediateConstantFolding (cognitive 92) src/Runtime/Oly.Runtime/Optimizations/optenv.fs:324— Helpers.OptimizeImmediateConstantFolding has cognitive complexity 92 (threshold 15). Drivers by points: if/else 20 (48 pts), match/switch 14 (44 pts) (nesting depth added 58). 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.
OlyRuntimeClrEmitter.Oly.Runtime.CodeGen.IOlyRuntimeEmitter<Oly.Emitters.DotNet.ClrTypeInfo, Oly.Emitters.DotNet.ClrMethodInfo, Oly.Emitters.DotNet.ClrFieldInfo>.EmitTypeDefinitionInfo (cognitive 92) src/Emitters/DotNet/Oly.Emitters.DotNet/Emitter.fs:2329— OlyRuntimeClrEmitter.Oly.Runtime.CodeGen.IOlyRuntimeEmitter<Oly.Emitters.DotNet.ClrTypeInfo, Oly.Emitters.DotNet.ClrMethodInfo, Oly.Emitters.DotNet.ClrFieldInfo>.EmitTypeDefinitionInfo has cognitive complexity 92 (threshold 15). Drivers by points: if/else 34 (65 pts), match/switch 8 (22 pts), boolean chains 5 (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Helpers.importMethodDefinitionAsOlyILFunctionDefinition (cognitive 90) src/Runtime/Targets/DotNet/Oly.Compiler.CIL.Importer/Importer.fs:1195— Helpers.importMethodDefinitionAsOlyILFunctionDefinition has cognitive complexity 90 (threshold 15). Drivers by points: if/else 31 (82 pts), match/switch 2 (6 pts), boolean chains 2 (nesting depth added 55). 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.
extension.activate (cognitive 87) vscode/src/extension.ts:57— extension.activate has cognitive complexity 87 (threshold 15). Drivers by points: if/else 51 (67 pts), boolean chains 15, error handling 3 (4 pts), match/switch 1 (nesting depth added 17). Of this number, 38 points are the body's own statements and 49 belong to 14 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
OpenDeclarations.bindOpenDeclaration (cognitive 83) src/Compiler/Oly.Compiler/Binder/OpenDeclarations.fs:11— OpenDeclarations.bindOpenDeclaration has cognitive complexity 83 (threshold 15). Drivers by points: if/else 25 (62 pts), match/switch 5 (18 pts), boolean chains 3 (nesting depth added 50). 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.
Program.computeInternalNode (cognitive 81) src/Compiler/Oly.Compiler.SyntaxGenerator/Program.fs:39— Program.computeInternalNode has cognitive complexity 81 (threshold 15). Drivers by points: if/else 32 (59 pts), loops 9 (22 pts) (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Solver.solveShape (cognitive 79) src/Compiler/Oly.Compiler/Solver.fs:92— Solver.solveShape has cognitive complexity 79 (threshold 15). Drivers by points: if/else 24 (55 pts), match/switch 5 (20 pts), boolean chains 4 (nesting depth added 46). 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.
SpirvCodeGen.GenOperation (cognitive 78) src/Emitters/Spirv/Oly.Emitters.Spirv/SpirvCodeGen.fs:100— SpirvCodeGen.GenOperation has cognitive complexity 78 (threshold 15). Drivers by points: match/switch 19 (52 pts), if/else 10 (26 pts) (nesting depth added 49). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
BinderEnvironment.SetUnqualifiedValueAux (cognitive 77) src/Compiler/Oly.Compiler/Binder/Environment.fs:416— BinderEnvironment.SetUnqualifiedValueAux has cognitive complexity 77 (threshold 15). Drivers by points: if/else 26 (63 pts), match/switch 3 (11 pts), boolean chains 3 (nesting depth added 45). 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.
PrettyPrint.printTypeAux (cognitive 76) src/Compiler/Oly.Compiler/PrettyPrint.fs:23— PrettyPrint.printTypeAux has cognitive complexity 76 (threshold 15). Drivers by points: if/else 29 (46 pts), match/switch 10 (24 pts), boolean chains 6 (nesting depth added 31). 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.
ILGen.GenFunctionAsILFunctionDefinition (cognitive 75) src/Compiler/Oly.Compiler/ILGen.fs:737— ILGen.GenFunctionAsILFunctionDefinition has cognitive complexity 75 (threshold 15). Drivers by points: if/else 39 (65 pts), match/switch 3 (7 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.
OlyBoundSubModel.TryGetMatchType (cognitive 73) src/Compiler/Oly.Compiler/PublicAPI/PublicSymbols.fs:1329— OlyBoundSubModel.TryGetMatchType has cognitive complexity 73 (threshold 15). Drivers by points: if/else 11 (36 pts), match/switch 12 (36 pts), boolean chains 1 (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.
GeneralOptimizer.optimizeExpressionCore (cognitive 73) src/Runtime/Oly.Runtime/Optimizations/GeneralOptimizer.fs:90— GeneralOptimizer.optimizeExpressionCore has cognitive complexity 73 (threshold 15). Drivers by points: match/switch 10 (31 pts), if/else 16 (29 pts), boolean chains 13 (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.
SpirvLowering.LowerOperation (cognitive 73) src/Emitters/Spirv/Oly.Emitters.Spirv/SpirvLowering.fs:205— SpirvLowering.LowerOperation has cognitive complexity 73 (threshold 15). Drivers by points: match/switch 18 (36 pts), if/else 22 (35 pts), boolean chains 2 (nesting depth added 31). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
NameResolution.bindType (cognitive 72) src/Compiler/Oly.Compiler/Binder/NameResolution.fs:1419— NameResolution.bindType has cognitive complexity 72 (threshold 15). Drivers by points: match/switch 14 (40 pts), if/else 15 (26 pts), boolean chains 6 (nesting depth added 37). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
NameResolution.bindIdentifierWithNoReceiverAsFormalItem (cognitive 70) src/Compiler/Oly.Compiler/Binder/NameResolution.fs:246— NameResolution.bindIdentifierWithNoReceiverAsFormalItem has cognitive complexity 70 (threshold 15). Drivers by points: if/else 15 (38 pts), match/switch 9 (29 pts), boolean chains 3 (nesting depth added 43). 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.
OlyToken.TryPreviousTokenBySubToken (cognitive 69) src/Compiler/Oly.Compiler.Syntax/SyntaxTreeImplementation.fs:289— OlyToken.TryPreviousTokenBySubToken has cognitive complexity 69 (threshold 15). Drivers by points: if/else 9 (44 pts), match/switch 5 (18 pts), loops 1 (6 pts), boolean chains 1 (nesting depth added 53). 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.
OlySignatureTypeProvider.System.Reflection.Metadata.ISignatureTypeProvider<Oly.Metadata.OlyILType, System.Int32>.GetModifiedType (cognitive 68) src/Runtime/Targets/DotNet/Oly.Compiler.CIL.Importer/Importer.fs:304— OlySignatureTypeProvider.System.Reflection.Metadata.ISignatureTypeProvider<Oly.Metadata.OlyILType, System.Int32>.GetModifiedType has cognitive complexity 68 (threshold 15). Drivers by points: match/switch 7 (37 pts), if/else 8 (28 pts), boolean chains 3 (nesting depth added 50). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CompilerImports.retargetEntity (cognitive 67) src/Compiler/Oly.Compiler/CompilerImports.fs:469— CompilerImports.retargetEntity has cognitive complexity 67 (threshold 15). Drivers by points: if/else 14 (37 pts), match/switch 6 (22 pts), loops 1 (5 pts), boolean chains 3 (nesting depth added 43). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
SpirvEmitter.Oly.Runtime.CodeGen.IOlyRuntimeEmitter<Oly.Emitters.Spirv.SpirvType, Oly.Emitters.Spirv.SpirvFunction, Oly.Emitters.Spirv.SpirvField>.EmitFunctionDefinition (cognitive 67) src/Emitters/Spirv/Oly.Emitters.Spirv/SpirvEmitter.fs:136— SpirvEmitter.Oly.Runtime.CodeGen.IOlyRuntimeEmitter<Oly.Emitters.Spirv.SpirvType, Oly.Emitters.Spirv.SpirvFunction, Oly.Emitters.Spirv.SpirvField>.EmitFunctionDefinition has cognitive complexity 67 (threshold 15). Drivers by points: if/else 19 (45 pts), match/switch 6 (21 pts), boolean chains 1 (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.
Pass3.bindTypeDeclaration (cognitive 62) src/Compiler/Oly.Compiler/Binder/Pass3.fs:113— Pass3.bindTypeDeclaration has cognitive complexity 62 (threshold 15). Drivers by points: if/else 18 (42 pts), match/switch 4 (14 pts), boolean chains 6 (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ExtensionHelpers.getViewModel (cognitive 61) src/LanguageServer/Oly.LanguageServer/LanguageServer.fs:798— ExtensionHelpers.getViewModel has cognitive complexity 61 (threshold 15). Drivers by points: if/else 43 (51 pts), match/switch 3 (6 pts), boolean chains 4 (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.
OlyValueSymbol.IsSimilarTo (cognitive 60) src/Compiler/Oly.Compiler/PublicAPI/PublicSymbols.fs:653— OlyValueSymbol.IsSimilarTo has cognitive complexity 60 (threshold 15). Drivers by points: match/switch 8 (35 pts), if/else 10 (21 pts), boolean chains 4 (nesting depth added 38). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
PostInferenceAnalysis.checkValue (cognitive 60) src/Compiler/Oly.Compiler/Binder/PostInferenceAnalysis.fs:435— PostInferenceAnalysis.checkValue has cognitive complexity 60 (threshold 15). Drivers by points: if/else 18 (44 pts), match/switch 4 (16 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.
WorkspaceExtensions.classifyValueKind (cognitive 59) src/Compiler/Oly.Compiler.Workspace/OlyWorkspaceExtensions.fs:77— WorkspaceExtensions.classifyValueKind has cognitive complexity 59 (threshold 15). Drivers by points: if/else 33 (59 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.
NameResolution.bindConstraint (cognitive 59) src/Compiler/Oly.Compiler/Binder/NameResolution.fs:2035— NameResolution.bindConstraint has cognitive complexity 59 (threshold 15). Drivers by points: if/else 20 (44 pts), match/switch 5 (12 pts), boolean chains 3 (nesting depth added 31). 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.
DeadCodeElimination.DeadCodeElimination (cognitive 59) src/Runtime/Oly.Runtime/Optimizations/DeadCodeElimination.fs:19— DeadCodeElimination.DeadCodeElimination has cognitive complexity 59 (threshold 15). Drivers by points: if/else 20 (35 pts), match/switch 10 (19 pts), boolean chains 5 (nesting depth added 24). 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.
FunctionOverloading.filterFunctionsForOverloadingByWeight (cognitive 57) src/Compiler/Oly.Compiler/FunctionOverloading.fs:111— FunctionOverloading.filterFunctionsForOverloadingByWeight has cognitive complexity 57 (threshold 15). Drivers by points: if/else 20 (41 pts), match/switch 3 (9 pts), boolean chains 7 (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
LexerModule.handleNonTriviaPeekAux (cognitive 57) src/Compiler/Oly.Compiler.Syntax/Internal/Lexer.fs:849— LexerModule.handleNonTriviaPeekAux has cognitive complexity 57 (threshold 15). Drivers by points: match/switch 23 (53 pts), if/else 2 (3 pts), boolean chains 1 (nesting depth added 31). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
RuntimeFunction.VerifyConstraintsCore (cognitive 57) src/Runtime/Oly.Runtime/InternalCodeGenTypes.fs:1717— RuntimeFunction.VerifyConstraintsCore has cognitive complexity 57 (threshold 15). Drivers by points: match/switch 11 (36 pts), if/else 8 (21 pts) (nesting depth added 38). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CommonSubexpressionElimination.handleExpressionAuxCse (cognitive 56) src/Runtime/Oly.Runtime/Optimizations/CommonSubexpressionElimination.fs:157— CommonSubexpressionElimination.handleExpressionAuxCse has cognitive complexity 56 (threshold 15). Drivers by points: if/else 19 (32 pts), match/switch 7 (19 pts), boolean chains 5 (nesting depth added 25). 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.
Pass2.bindTopLevelPropertyBinding (cognitive 55) src/Compiler/Oly.Compiler/Binder/Pass2.fs:929— Pass2.bindTopLevelPropertyBinding has cognitive complexity 55 (threshold 15). Drivers by points: match/switch 20 (45 pts), if/else 10 (nesting depth added 25). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ILGen.GenEntityDefinitionNoCache (cognitive 53) src/Compiler/Oly.Compiler/ILGen.fs:1104— ILGen.GenEntityDefinitionNoCache has cognitive complexity 53 (threshold 15). Drivers by points: if/else 34 (40 pts), boolean chains 7, match/switch 4 (5 pts), error handling 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.
Pass4.checkExhaustiveness (cognitive 53) src/Compiler/Oly.Compiler/Binder/Pass4.fs:920— Pass4.checkExhaustiveness has cognitive complexity 53 (threshold 15). Drivers by points: if/else 15 (40 pts), loops 5 (9 pts), boolean chains 2, match/switch 2 (nesting depth added 29). 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.
SymbolOperations.unifyVariadicTypes (cognitive 53) src/Compiler/Oly.Compiler/Symbols/SymbolOperations.fs:243— SymbolOperations.unifyVariadicTypes has cognitive complexity 53 (threshold 15). Drivers by points: if/else 10 (28 pts), match/switch 4 (21 pts), boolean chains 4 (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.
NameResolution.checkVirtualUsage (cognitive 51) src/Compiler/Oly.Compiler/Binder/NameResolution.fs:481— NameResolution.checkVirtualUsage has cognitive complexity 51 (threshold 15). Drivers by points: if/else 12 (26 pts), match/switch 9 (25 pts) (nesting depth added 30). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
PrettyPrint.printValueAux (cognitive 51) src/Compiler/Oly.Compiler/PrettyPrint.fs:439— PrettyPrint.printValueAux has cognitive complexity 51 (threshold 15). Drivers by points: if/else 28 (45 pts), boolean chains 4, match/switch 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DotNetTarget.GetAnalyzerDiagnostics (cognitive 51) src/Runtime/Targets/DotNet/Oly.Compiler.CIL.Importer/DotNetTarget.fs:788— DotNetTarget.GetAnalyzerDiagnostics has cognitive complexity 51 (threshold 15). Drivers by points: if/else 15 (33 pts), match/switch 4 (13 pts), boolean chains 5 (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Symbols.getTypeSymbol (cognitive 50) src/Compiler/Oly.Compiler/PublicAPI/PublicSymbols.fs:1627— Symbols.getTypeSymbol has cognitive complexity 50 (threshold 15). Drivers by points: if/else 14 (25 pts), match/switch 11 (24 pts), boolean chains 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClrCodeGen.GenCall (cognitive 49) src/Emitters/DotNet/Oly.Emitters.DotNet/Emitter.fs:1262— ClrCodeGen.GenCall has cognitive complexity 49 (threshold 15). Drivers by points: if/else 11 (28 pts), match/switch 4 (13 pts), boolean chains 8 (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.
ILGen.GenExpressionAux (cognitive 48) src/Compiler/Oly.Compiler/ILGen.fs:1444— ILGen.GenExpressionAux has cognitive complexity 48 (threshold 15). Drivers by points: match/switch 11 (21 pts), if/else 11 (18 pts), boolean chains 9 (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.
Checker.checkConstructorImplementation (cognitive 47) src/Compiler/Oly.Compiler/Checker.fs:580— Checker.checkConstructorImplementation has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (23 pts), match/switch 7 (20 pts), boolean chains 4 (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.
Checker.checkReceiverOfExpression (cognitive 47) src/Compiler/Oly.Compiler/Checker.fs:863— Checker.checkReceiverOfExpression has cognitive complexity 47 (threshold 15). Drivers by points: if/else 15 (31 pts), match/switch 7 (10 pts), boolean chains 6 (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.
NameResolution.bindIdentifierAsMemberValue (cognitive 46) src/Compiler/Oly.Compiler/Binder/NameResolution.fs:1231— NameResolution.bindIdentifierAsMemberValue has cognitive complexity 46 (threshold 15). Drivers by points: if/else 15 (29 pts), match/switch 6 (15 pts), boolean chains 2 (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.
Dump.dumpExpression (cognitive 45) src/Compiler/Oly.Compiler/Dump.fs:160— Dump.dumpExpression has cognitive complexity 45 (threshold 15). Drivers by points: if/else 16 (33 pts), match/switch 6 (12 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.
Pass4.bindTopLevelBinding (cognitive 44) src/Compiler/Oly.Compiler/Binder/Pass4.fs:228— Pass4.bindTopLevelBinding has cognitive complexity 44 (threshold 15). Drivers by points: if/else 10 (25 pts), match/switch 6 (12 pts), boolean chains 7 (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.
SymbolOperations.createFunctionValueSemantic (cognitive 44) src/Compiler/Oly.Compiler/Symbols/SymbolOperations.fs:2213— SymbolOperations.createFunctionValueSemantic has cognitive complexity 44 (threshold 15). Drivers by points: if/else 17 (23 pts), boolean chains 15, match/switch 4 (6 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Helpers.tryImportFieldDefinitionAsOlyILFieldDefinition (cognitive 44) src/Runtime/Targets/DotNet/Oly.Compiler.CIL.Importer/Importer.fs:1000— Helpers.tryImportFieldDefinitionAsOlyILFieldDefinition has cognitive complexity 44 (threshold 15). Drivers by points: if/else 16 (38 pts), match/switch 1 (5 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.
SymbolOperations.EntitySymbol.Hierarchy (cognitive 43) src/Compiler/Oly.Compiler/Symbols/SymbolOperations.fs:2935— SymbolOperations.EntitySymbol.Hierarchy has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (31 pts), loops 4 (8 pts), boolean chains 4 (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.
ClrPdbBuilder.BuildSequencePoints (cognitive 43) src/Emitters/DotNet/DotNet.Metadata/MetadataBuilder.fs:337— ClrPdbBuilder.BuildSequencePoints has cognitive complexity 43 (threshold 15). Drivers by points: if/else 16 (36 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Checker.checkImplementation (cognitive 42) src/Compiler/Oly.Compiler/Checker.fs:450— Checker.checkImplementation has cognitive complexity 42 (threshold 15). Drivers by points: if/else 19 (24 pts), match/switch 4 (11 pts), boolean chains 7 (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.
Pass4.bindLocalExpressionAuxAux (cognitive 41) src/Compiler/Oly.Compiler/Binder/Pass4.fs:1649— Pass4.bindLocalExpressionAuxAux has cognitive complexity 41 (threshold 15). Drivers by points: match/switch 11 (31 pts), if/else 4 (6 pts), boolean chains 4 (nesting depth added 22). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Checker.checkTypeConstructorDepthWithType (cognitive 41) src/Compiler/Oly.Compiler/Checker.fs:345— Checker.checkTypeConstructorDepthWithType has cognitive complexity 41 (threshold 15). Drivers by points: match/switch 11 (31 pts), if/else 4 (10 pts) (nesting depth added 26). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
OlySyntaxDiffs.OlySyntaxTree.AreOpenDeclarationsEqual.Static (cognitive 41) src/Compiler/Oly.Compiler.Syntax/SyntaxTreeImplementation.fs:1751— OlySyntaxDiffs.OlySyntaxTree.AreOpenDeclarationsEqual.Static has cognitive complexity 41 (threshold 15). Drivers by points: match/switch 10 (24 pts), boolean chains 11, if/else 4 (6 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.
ClrCodeGen.GenExpressionAux (cognitive 41) src/Emitters/DotNet/Oly.Emitters.DotNet/Emitter.fs:1550— ClrCodeGen.GenExpressionAux has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (23 pts), match/switch 8 (15 pts), boolean chains 3 (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.
Pass4.bindPatternByResolutionItem (cognitive 40) src/Compiler/Oly.Compiler/Binder/Pass4.fs:1956— Pass4.bindPatternByResolutionItem has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (25 pts), match/switch 6 (15 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.
NameResolution.resolveFormalValue (cognitive 40) src/Compiler/Oly.Compiler/Binder/NameResolution.fs:821— NameResolution.resolveFormalValue has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (25 pts), match/switch 4 (8 pts), boolean chains 7 (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.
Iterator.VisitExpression (cognitive 39) src/Compiler/Oly.Compiler/BoundTreeExtensions.fs:339— Iterator.VisitExpression has cognitive complexity 39 (threshold 15). Drivers by points: match/switch 11 (29 pts), if/else 5 (10 pts) (nesting depth added 23). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Attributes.bindAttributes (cognitive 38) src/Compiler/Oly.Compiler/Binder/Attributes.fs:208— Attributes.bindAttributes has cognitive complexity 38 (threshold 15). Drivers by points: match/switch 8 (33 pts), if/else 2 (5 pts) (nesting depth added 28). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Helpers.hasSideEffectAux (cognitive 38) src/Runtime/Oly.Runtime/Optimizations/optenv.fs:161— Helpers.hasSideEffectAux has cognitive complexity 38 (threshold 15). Drivers by points: if/else 8 (20 pts), match/switch 5 (16 pts), boolean chains 2 (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.
TextDocumentSyncHandler.OmniSharp.Extensions.LanguageServer.Protocol.Document.IDocumentSymbolHandler.Handle (cognitive 38) src/LanguageServer/Oly.LanguageServer/LanguageServer.fs:1533— TextDocumentSyncHandler.OmniSharp.Extensions.LanguageServer.Protocol.Document.IDocumentSymbolHandler.Handle has cognitive complexity 38 (threshold 15). Drivers by points: match/switch 7 (25 pts), if/else 4 (8 pts), loops 4, boolean chains 1 (nesting depth added 22). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Solver.solveConstraint (cognitive 37) src/Compiler/Oly.Compiler/Solver.fs:447— Solver.solveConstraint has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (34 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OlyRuntimeClrEmitter.Oly.Runtime.CodeGen.IOlyRuntimeEmitter<Oly.Emitters.DotNet.ClrTypeInfo, Oly.Emitters.DotNet.ClrMethodInfo, Oly.Emitters.DotNet.ClrFieldInfo>.EmitFieldDefinition (cognitive 37) src/Emitters/DotNet/Oly.Emitters.DotNet/Emitter.fs:2601— OlyRuntimeClrEmitter.Oly.Runtime.CodeGen.IOlyRuntimeEmitter<Oly.Emitters.DotNet.ClrTypeInfo, Oly.Emitters.DotNet.ClrMethodInfo, Oly.Emitters.DotNet.ClrFieldInfo>.EmitFieldDefinition has cognitive complexity 37 (threshold 15). Drivers by points: if/else 18 (27 pts), match/switch 4 (6 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.
TextDocumentSyncHandler.OmniSharp.Extensions.LanguageServer.Protocol.Document.IHoverHandler.Handle (cognitive 37) src/LanguageServer/Oly.LanguageServer/LanguageServer.fs:1854— TextDocumentSyncHandler.OmniSharp.Extensions.LanguageServer.Protocol.Document.IHoverHandler.Handle has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (20 pts), match/switch 5 (17 pts) (nesting depth added 21). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
LexerModule.handlePeek (cognitive 36) src/Compiler/Oly.Compiler.Syntax/Internal/Lexer.fs:1125— LexerModule.handlePeek has cognitive complexity 36 (threshold 15). Drivers by points: match/switch 8 (24 pts), if/else 2 (11 pts), boolean chains 1 (nesting depth added 25). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SymbolOperations.filterMostSpecificFunctions (cognitive 35) src/Compiler/Oly.Compiler/Symbols/SymbolOperations.fs:2041— SymbolOperations.filterMostSpecificFunctions has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (31 pts), match/switch 1 (3 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.
ClrTypeDefinitionBuilder.Build (cognitive 35) src/Emitters/DotNet/DotNet.Metadata/MetadataBuilder.fs:3146— ClrTypeDefinitionBuilder.Build has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (17 pts), match/switch 6 (9 pts), loops 5, error handling 2 (4 pts) (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.
AssertionPropagation.optimizeAssertionPropagateExpression (cognitive 34) src/Runtime/Oly.Runtime/Optimizations/AssertionPropagation.fs:150— AssertionPropagation.optimizeAssertionPropagateExpression has cognitive complexity 34 (threshold 15). Drivers by points: match/switch 6 (20 pts), if/else 4 (14 pts) (nesting depth added 24). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
EarlyAttributes.bindEarlyAttribute (cognitive 33) src/Compiler/Oly.Compiler/Binder/EarlyAttributes.fs:37— EarlyAttributes.bindEarlyAttribute has cognitive complexity 33 (threshold 15). Drivers by points: if/else 5 (17 pts), match/switch 6 (13 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.
EarlyAttributes.tryAddIntrinsicPrimitivesForEntity (cognitive 33) src/Compiler/Oly.Compiler/Binder/EarlyAttributes.fs:148— EarlyAttributes.tryAddIntrinsicPrimitivesForEntity has cognitive complexity 33 (threshold 15). Drivers by points: match/switch 6 (17 pts), if/else 6 (16 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.
SymbolQuery.canAccessValue (cognitive 33) src/Compiler/Oly.Compiler/Symbols/SymbolQuery.fs:63— SymbolQuery.canAccessValue has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (18 pts), match/switch 4 (15 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.
TextDocumentSyncHandler.OmniSharp.Extensions.LanguageServer.Protocol.Document.ICodeLensHandler.Handle (cognitive 33) src/LanguageServer/Oly.LanguageServer/LanguageServer.fs:1786— TextDocumentSyncHandler.OmniSharp.Extensions.LanguageServer.Protocol.Document.ICodeLensHandler.Handle has cognitive complexity 33 (threshold 15). Drivers by points: match/switch 9 (28 pts), if/else 2 (5 pts) (nesting depth added 22). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
BinderEnvironment.AddUnqualifiedType (cognitive 32) src/Compiler/Oly.Compiler/Binder/Environment.fs:245— BinderEnvironment.AddUnqualifiedType has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 4 (14 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.
Substitution.substituteValue (cognitive 32) src/Compiler/Oly.Compiler/Substitution.fs:127— Substitution.substituteValue has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (23 pts), match/switch 2 (5 pts), loops 1 (4 pts) (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.
SpirvModuleBuilder.CreateVariableType (cognitive 32) src/Emitters/Spirv/Oly.Emitters.Spirv/SpirvModuleBuilder.fs:1045— SpirvModuleBuilder.CreateVariableType has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (18 pts), match/switch 8 (14 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.
Pass4.bindLocalValueDeclaration (cognitive 30) src/Compiler/Oly.Compiler/Binder/Pass4.fs:1416— Pass4.bindLocalValueDeclaration has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 6 (14 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.
Attributes.bindAttributeExpressionAux (cognitive 30) src/Compiler/Oly.Compiler/Binder/Attributes.fs:118— Attributes.bindAttributeExpressionAux has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 6 (13 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.
FunctionOverloading.filterFunctionsForOverloadingPhase4 (cognitive 30) src/Compiler/Oly.Compiler/FunctionOverloading.fs:226— FunctionOverloading.filterFunctionsForOverloadingPhase4 has cognitive complexity 30 (threshold 15). Drivers by points: match/switch 5 (15 pts), if/else 8 (11 pts), boolean chains 4 (nesting depth added 13). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SymbolOperations.solveHigherInferenceVariable (cognitive 30) src/Compiler/Oly.Compiler/Symbols/SymbolOperations.fs:157— SymbolOperations.solveHigherInferenceVariable has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (26 pts), 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.
Checker.createGeneralizedFunctionTypeParameters (cognitive 29) src/Compiler/Oly.Compiler/Checker.fs:23— Checker.createGeneralizedFunctionTypeParameters has cognitive complexity 29 (threshold 15). Drivers by points: match/switch 10 (19 pts), if/else 7 (9 pts), boolean chains 1 (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.
BoundTreeExtensions.subsumesShapeMembersWith (cognitive 29) src/Compiler/Oly.Compiler/BoundTreeExtensions.fs:869— BoundTreeExtensions.subsumesShapeMembersWith has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 6 (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.
SymbolQuery.canAccessEntity (cognitive 29) src/Compiler/Oly.Compiler/Symbols/SymbolQuery.fs:106— SymbolQuery.canAccessEntity has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 3 (12 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.
SymbolOperations.freshenValueAux (cognitive 29) src/Compiler/Oly.Compiler/Symbols/SymbolOperations.fs:2844— SymbolOperations.freshenValueAux has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 3 (11 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.
LocalNormalization.handleExpressionAuxNormalizeLocals (cognitive 29) src/Runtime/Oly.Runtime/LocalNormalization.fs:109— LocalNormalization.handleExpressionAuxNormalizeLocals has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (18 pts), match/switch 4 (7 pts), boolean chains 4 (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.
MetadataHelpers.encodeType (cognitive 29) src/Emitters/DotNet/DotNet.Metadata/MetadataBuilder.fs:76— MetadataHelpers.encodeType has cognitive complexity 29 (threshold 15). Drivers by points: if/else 22 (26 pts), 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.
Solver.solveWitnessesByTypeParameter (cognitive 28) src/Compiler/Oly.Compiler/Solver.fs:199— Solver.solveWitnessesByTypeParameter has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 2, match/switch 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.
Iterator.VisitExpression (cognitive 28) src/Compiler/Oly.Compiler/BoundTreeExtensions.fs:65— Iterator.VisitExpression has cognitive complexity 28 (threshold 15). Drivers by points: match/switch 5 (15 pts), if/else 5 (11 pts), boolean chains 2 (nesting depth added 16). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SymbolOperations.areShapesEqualWith (cognitive 28) src/Compiler/Oly.Compiler/Symbols/SymbolOperations.fs:1001— SymbolOperations.areShapesEqualWith has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 5 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AssertionPropagation.assertionPropagateExpressionAux (cognitive 28) src/Runtime/Oly.Runtime/Optimizations/AssertionPropagation.fs:200— AssertionPropagation.assertionPropagateExpressionAux has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (19 pts), match/switch 3 (5 pts), boolean chains 4 (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.
OlySymbolUseInfo.TryGetAliasedType (cognitive 27) src/Compiler/Oly.Compiler/PublicAPI/PublicSymbols.fs:1079— OlySymbolUseInfo.TryGetAliasedType has cognitive complexity 27 (threshold 15). Drivers by points: match/switch 4 (17 pts), if/else 6 (10 pts) (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.
BoundTreeVisitor.VisitExpression (cognitive 27) src/Compiler/Oly.Compiler/BoundTreeVisitor.fs:81— BoundTreeVisitor.VisitExpression has cognitive complexity 27 (threshold 15). Drivers by points: match/switch 5 (15 pts), loops 3 (9 pts), if/else 3 (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.
NameResolution.bindConstraintClause (cognitive 26) src/Compiler/Oly.Compiler/Binder/NameResolution.fs:2180— NameResolution.bindConstraintClause has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 6 (15 pts), if/else 5 (10 pts), boolean chains 1 (nesting depth added 14). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SymbolOperations.freshenTypeAux (cognitive 26) src/Compiler/Oly.Compiler/Symbols/SymbolOperations.fs:2735— SymbolOperations.freshenTypeAux has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 10 (25 pts), if/else 1 (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.
RuntimeType.Substitute (cognitive 26) src/Runtime/Oly.Runtime/InternalCodeGenTypes.fs:1151— RuntimeType.Substitute has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (21 pts), match/switch 2 (5 pts) (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Extensions.ClrTypeDefinitionBuilder.CreateMethodDefinitionBuilderEx (cognitive 26) src/Emitters/DotNet/Oly.Emitters.DotNet/Extensions.fs:145— Extensions.ClrTypeDefinitionBuilder.CreateMethodDefinitionBuilderEx has cognitive complexity 26 (threshold 15). Drivers by points: if/else 18 (19 pts), boolean chains 7 (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.
TextDocumentSyncHandler.OmniSharp.Extensions.LanguageServer.Protocol.Document.ISignatureHelpHandler.Handle (cognitive 26) src/LanguageServer/Oly.LanguageServer/LanguageServer.fs:1460— TextDocumentSyncHandler.OmniSharp.Extensions.LanguageServer.Protocol.Document.ISignatureHelpHandler.Handle has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (20 pts), match/switch 2 (5 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.
TextDocumentSyncHandler.OmniSharp.Extensions.JsonRpc.IJsonRpcRequestHandler<LanguageServer.OlyGetIRRequest, System.String>.Handle (cognitive 26) src/LanguageServer/Oly.LanguageServer/LanguageServer.fs:2257— TextDocumentSyncHandler.OmniSharp.Extensions.JsonRpc.IJsonRpcRequestHandler<LanguageServer.OlyGetIRRequest, System.String>.Handle has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 7 (23 pts), error handling 1 (3 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.
Pass0.bindTypeDeclaration (cognitive 25) src/Compiler/Oly.Compiler/Binder/Pass0.fs:78— Pass0.bindTypeDeclaration has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (13 pts), match/switch 8 (10 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.
Substitution.substituteLiteral (cognitive 25) src/Compiler/Oly.Compiler/Substitution.fs:63— Substitution.substituteLiteral has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (19 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CompilerImports.retargetType (cognitive 25) src/Compiler/Oly.Compiler/CompilerImports.fs:564— CompilerImports.retargetType has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (24 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Pass4.bindMemberValueRightSideExpression (cognitive 24) src/Compiler/Oly.Compiler/Binder/Pass4.fs:654— Pass4.bindMemberValueRightSideExpression has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 5 (10 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Checker.checkLetBindingDeclarationAndAutoGeneralize (cognitive 24) src/Compiler/Oly.Compiler/Checker.fs:733— Checker.checkLetBindingDeclarationAndAutoGeneralize has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 6 (11 pts), if/else 6 (10 pts), loops 1 (2 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.
Solver.inferTypeArgumentFromTypeParameterConstraints (cognitive 24) src/Compiler/Oly.Compiler/Solver.fs:509— Solver.inferTypeArgumentFromTypeParameterConstraints has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (19 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
BoundTreeExtensions.forEachConstraintBySyntaxConstraintClause (cognitive 24) src/Compiler/Oly.Compiler/BoundTreeExtensions.fs:829— BoundTreeExtensions.forEachConstraintBySyntaxConstraintClause has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 7 (24 pts) (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.
Symbols.applyType (cognitive 24) src/Compiler/Oly.Compiler/Symbols/Symbols.fs:467— Symbols.applyType has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 3 (13 pts), if/else 6 (11 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.
Symbols.stripTypeEquations_InferenceVariable (cognitive 24) src/Compiler/Oly.Compiler/Symbols/Symbols.fs:1464— Symbols.stripTypeEquations_InferenceVariable has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 4 (14 pts), if/else 4 (9 pts), boolean chains 1 (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.
OlyPath.ContainsDirectoryOrFile (cognitive 24) src/Core/Oly.Core/Path.fs:90— OlyPath.ContainsDirectoryOrFile has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 3, 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.
Program.computePublicNode (cognitive 24) src/Compiler/Oly.Compiler.SyntaxGenerator/Program.fs:255— Program.computePublicNode has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 3 (7 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.
Pass4.bindPattern (cognitive 23) src/Compiler/Oly.Compiler/Binder/Pass4.fs:2133— Pass4.bindPattern has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 4 (9 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.
NameResolution.bindLiteral (cognitive 23) src/Compiler/Oly.Compiler/Binder/NameResolution.fs:2645— NameResolution.bindLiteral has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (12 pts), match/switch 4 (7 pts), error handling 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SymbolOperations.filterMostSpecificProperties (cognitive 23) src/Compiler/Oly.Compiler/Symbols/SymbolOperations.fs:2094— SymbolOperations.filterMostSpecificProperties has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (18 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OlyRuntimeClrEmitter.Oly.Runtime.CodeGen.IOlyRuntimeEmitter<Oly.Emitters.DotNet.ClrTypeInfo, Oly.Emitters.DotNet.ClrMethodInfo, Oly.Emitters.DotNet.ClrFieldInfo>.EmitTypeDefinition (cognitive 23) src/Emitters/DotNet/Oly.Emitters.DotNet/Emitter.fs:2544— OlyRuntimeClrEmitter.Oly.Runtime.CodeGen.IOlyRuntimeEmitter<Oly.Emitters.DotNet.ClrTypeInfo, Oly.Emitters.DotNet.ClrMethodInfo, Oly.Emitters.DotNet.ClrFieldInfo>.EmitTypeDefinition has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (16 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.
OlyTargetOutputOnly`4.BuildProjectAsync (cognitive 23) src/Runtime/Targets/Oly.Runtime.Target.Core/Core.fs:81— OlyTargetOutputOnly`4.BuildProjectAsync has cognitive complexity 23 (threshold 15). Drivers by points: match/switch 4 (14 pts), if/else 6 (9 pts) (nesting depth added 13). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SpirvLowering.TryPostOrderLowerOperationExpression (cognitive 23) src/Emitters/Spirv/Oly.Emitters.Spirv/SpirvLowering.fs:490— SpirvLowering.TryPostOrderLowerOperationExpression has cognitive complexity 23 (threshold 15). Drivers by points: match/switch 6 (15 pts), if/else 2 (8 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.
CompilationPhases.checkDuplications (cognitive 22) src/Compiler/Oly.Compiler/PublicAPI/PublicCompilation.fs:392— CompilationPhases.checkDuplications has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (17 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ILGen.emitILTypeAux (cognitive 22) src/Compiler/Oly.Compiler/ILGen.fs:362— ILGen.emitILTypeAux has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 6 (11 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.
PostInferenceAnalysis.analyzeTypeEntityAccessibility (cognitive 22) src/Compiler/Oly.Compiler/Binder/PostInferenceAnalysis.fs:306— PostInferenceAnalysis.analyzeTypeEntityAccessibility has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 3 (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.
Pass2.createInstanceFunctionParameters (cognitive 22) src/Compiler/Oly.Compiler/Binder/Pass2.fs:76— Pass2.createInstanceFunctionParameters has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (17 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.
Pass0.bindTypeDeclarationBody (cognitive 22) src/Compiler/Oly.Compiler/Binder/Pass0.fs:196— Pass0.bindTypeDeclarationBody has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 4 (10 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.
ImplicitRules.tryImplicitArguments (cognitive 22) src/Compiler/Oly.Compiler/ImplicitRules.fs:254— ImplicitRules.tryImplicitArguments has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 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.
Substitution.substituteForAutoGeneralization (cognitive 22) src/Compiler/Oly.Compiler/Substitution.fs:269— Substitution.substituteForAutoGeneralization has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 3 (5 pts), boolean chains 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.
BoundTreePatterns.|LoadFunctionPtrOfLambdaWrappedFunctionCall|_| (cognitive 22) src/Compiler/Oly.Compiler/BoundTreePatterns.fs:77— BoundTreePatterns.|LoadFunctionPtrOfLambdaWrappedFunctionCall|_| has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 5 (15 pts), if/else 2 (6 pts), boolean chains 1 (nesting depth added 14). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SymbolQuery.filterFunctions (cognitive 22) src/Compiler/Oly.Compiler/Symbols/SymbolQuery.fs:176— SymbolQuery.filterFunctions has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 2 (5 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SymbolOperations.IFunctionSymbol.IsOverriding (cognitive 22) src/Compiler/Oly.Compiler/Symbols/SymbolOperations.fs:13— SymbolOperations.IFunctionSymbol.IsOverriding has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
BinderEnvironment.AddTypeExtension (cognitive 21) src/Compiler/Oly.Compiler/Binder/Environment.fs:639— BinderEnvironment.AddTypeExtension has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 4 (11 pts), if/else 7 (10 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
FunctionOverloading.filterFunctionsForOverloadingPhase3 (cognitive 21) src/Compiler/Oly.Compiler/FunctionOverloading.fs:294— FunctionOverloading.filterFunctionsForOverloadingPhase3 has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 4 (11 pts), if/else 6 (8 pts), boolean chains 2 (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.
ImplicitRules.tryMorphArgumentImplicit (cognitive 21) src/Compiler/Oly.Compiler/ImplicitRules.fs:184— ImplicitRules.tryMorphArgumentImplicit has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 3 (10 pts), if/else 5 (7 pts), boolean chains 4 (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.
PrettyPrint.printValueName (cognitive 21) src/Compiler/Oly.Compiler/PrettyPrint.fs:298— PrettyPrint.printValueName has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 4 (13 pts), if/else 5 (7 pts), boolean chains 1 (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.
PrettyPrint.printMember (cognitive 21) src/Compiler/Oly.Compiler/PrettyPrint.fs:541— PrettyPrint.printMember has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (12 pts), match/switch 3 (8 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Symbols.tryActualType (cognitive 21) src/Compiler/Oly.Compiler/Symbols/Symbols.fs:1189— Symbols.tryActualType has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 4 (11 pts), if/else 5 (9 pts), boolean chains 1 (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.
Helpers.hasReadOnlyAttribute (cognitive 21) src/Runtime/Targets/DotNet/Oly.Compiler.CIL.Importer/Importer.fs:906— Helpers.hasReadOnlyAttribute has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident. This shape REPEATS in the file: one other method here (Helpers.hasIsByRefLikeAttribute) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Helpers.hasIsByRefLikeAttribute (cognitive 21) src/Runtime/Targets/DotNet/Oly.Compiler.CIL.Importer/Importer.fs:953— Helpers.hasIsByRefLikeAttribute has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident. This shape REPEATS in the file: one other method here (Helpers.hasReadOnlyAttribute) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ClrCodeGen.getPrimitiveTypeCode (cognitive 21) src/Emitters/DotNet/Oly.Emitters.DotNet/Emitter.fs:406— ClrCodeGen.getPrimitiveTypeCode has cognitive complexity 21 (threshold 15). Drivers by points: if/else 20 (21 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
InterpreterFunction.HandleCast (cognitive 21) src/Emitters/Interpreter/Oly.Emitters.Interpreter/Emitter.fs:756— InterpreterFunction.HandleCast has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 11 (21 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
TextDocumentSyncHandler.OmniSharp.Extensions.LanguageServer.Protocol.Document.ICompletionHandler.Handle (cognitive 21) src/LanguageServer/Oly.LanguageServer/LanguageServer.fs:1960— TextDocumentSyncHandler.OmniSharp.Extensions.LanguageServer.Protocol.Document.ICompletionHandler.Handle has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (19 pts), error handling 1, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ILGen.GenFieldAsILFieldDefinition (cognitive 20) src/Compiler/Oly.Compiler/ILGen.fs:644— ILGen.GenFieldAsILFieldDefinition has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 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.
ILGen.GenLetExpression (cognitive 20) src/Compiler/Oly.Compiler/ILGen.fs:2203— ILGen.GenLetExpression has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 5 (12 pts), if/else 3 (6 pts), boolean chains 2 (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.
Pass4.bindItemAsExpression (cognitive 20) src/Compiler/Oly.Compiler/Binder/Pass4.fs:391— Pass4.bindItemAsExpression has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 7 (14 pts), if/else 3 (6 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
NameResolution.tryBindIdentifierAsValueForExpression (cognitive 20) src/Compiler/Oly.Compiler/Binder/NameResolution.fs:1348— NameResolution.tryBindIdentifierAsValueForExpression has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 4 (10 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.
NameResolution.bindTypeArguments (cognitive 20) src/Compiler/Oly.Compiler/Binder/NameResolution.fs:1910— NameResolution.bindTypeArguments has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (19 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.
Checker.checkExpressionType (cognitive 20) src/Compiler/Oly.Compiler/Checker.fs:827— Checker.checkExpressionType has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Checker.checkParameter (cognitive 20) src/Compiler/Oly.Compiler/Checker.fs:1111— Checker.checkParameter has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (15 pts), match/switch 2 (4 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.
BoundExpression.RewriteReturningTargetExpression (cognitive 20) src/Compiler/Oly.Compiler/BoundTree.fs:622— BoundExpression.RewriteReturningTargetExpression has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 pts), match/switch 2 (3 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.
Symbols.stripTypeEquations_Tuple (cognitive 20) src/Compiler/Oly.Compiler/Symbols/Symbols.fs:1593— Symbols.stripTypeEquations_Tuple has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 3 (10 pts), if/else 6 (9 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.
OlyAttributeTypeProvider.System.Reflection.Metadata.ICustomAttributeTypeProvider<Oly.Metadata.OlyILType>.IsSystemType (cognitive 20) src/Runtime/Targets/DotNet/Oly.Compiler.CIL.Importer/Importer.fs:567— OlyAttributeTypeProvider.System.Reflection.Metadata.ICustomAttributeTypeProvider<Oly.Metadata.OlyILType>.IsSystemType has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 3 (9 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.
OlyRuntimeClrEmitter.Oly.Runtime.CodeGen.IOlyRuntimeEmitter<Oly.Emitters.DotNet.ClrTypeInfo, Oly.Emitters.DotNet.ClrMethodInfo, Oly.Emitters.DotNet.ClrFieldInfo>.EmitProperty (cognitive 20) src/Emitters/DotNet/Oly.Emitters.DotNet/Emitter.fs:2721— OlyRuntimeClrEmitter.Oly.Runtime.CodeGen.IOlyRuntimeEmitter<Oly.Emitters.DotNet.ClrTypeInfo, Oly.Emitters.DotNet.ClrMethodInfo, Oly.Emitters.DotNet.ClrFieldInfo>.EmitProperty has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 3 (6 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.
ClrMethodDefinitionBuilder.Build (cognitive 20) src/Emitters/DotNet/DotNet.Metadata/MetadataBuilder.fs:2915— ClrMethodDefinitionBuilder.Build has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (15 pts), loops 3, 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.
Normalization.NormalizeAndCheck (cognitive 20) src/Emitters/Spirv/Oly.Emitters.Spirv/SpirvModuleBuilder.fs:1262— Normalization.NormalizeAndCheck has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 2, 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.
SpirvType.GetDefinitionInstructions (cognitive 20) src/Emitters/Spirv/Oly.Emitters.Spirv/SpirvModuleBuilder.fs:167— SpirvType.GetDefinitionInstructions has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (9 pts), match/switch 3 (8 pts), if/else 2 (3 pts) (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
OlyTypeSymbol.TryGetPackedSizeInBytes (cognitive 19) src/Compiler/Oly.Compiler/PublicAPI/PublicSymbols.fs:420— OlyTypeSymbol.TryGetPackedSizeInBytes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 4 (8 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.
PostInferenceAnalysis.analyzeAddressOf (cognitive 19) src/Compiler/Oly.Compiler/Binder/PostInferenceAnalysis.fs:806— PostInferenceAnalysis.analyzeAddressOf has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 4 (5 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.
Pass4.tryGetCallParameterlessBaseCtorExpression (cognitive 19) src/Compiler/Oly.Compiler/Binder/Pass4.fs:1579— Pass4.tryGetCallParameterlessBaseCtorExpression has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 3 (9 pts), if/else 5 (8 pts), boolean chains 2 (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.
SymbolQuery.queryHierarchicalValuesOfEntity (cognitive 19) src/Compiler/Oly.Compiler/Symbols/SymbolQuery.fs:247— SymbolQuery.queryHierarchicalValuesOfEntity has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 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.
SymbolQuery.queryFreeTypeParametersFromType (cognitive 19) src/Compiler/Oly.Compiler/Symbols/SymbolQuery.fs:843— SymbolQuery.queryFreeTypeParametersFromType has cognitive complexity 19 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 4 (8 pts), match/switch 1 (2 pts) (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
OlySyntaxTreeExtensions.OlySyntaxNode.FindTokens (cognitive 19) src/Compiler/Oly.Compiler.Syntax/SyntaxTreeImplementation.fs:1257— OlySyntaxTreeExtensions.OlySyntaxNode.FindTokens has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 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.
OlySyntaxTreeExtensions.OlySyntaxNode.TryGetBindingDeclaration (cognitive 19) src/Compiler/Oly.Compiler.Syntax/SyntaxTreeImplementation.fs:1564— OlySyntaxTreeExtensions.OlySyntaxNode.TryGetBindingDeclaration has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 8 (19 pts) (nesting depth added 11). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
OlySyntaxTreeView.register (cognitive 19) vscode/src/OlySyntaxTreeView.ts:189— OlySyntaxTreeView.register has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 1 (nesting depth added 9). Most of this is not in the body itself: 0 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 190, 217, 197). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
OlyBoundSubModel.IsUnqualified (cognitive 18) src/Compiler/Oly.Compiler/PublicAPI/PublicSymbols.fs:1241— OlyBoundSubModel.IsUnqualified has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 5 (15 pts), if/else 2 (3 pts) (nesting depth added 11). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Pass4.bindInitializer (cognitive 18) src/Compiler/Oly.Compiler/Binder/Pass4.fs:1047— Pass4.bindInitializer has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), match/switch 5 (9 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Pass3.ForEachBinding (cognitive 18) src/Compiler/Oly.Compiler/Binder/Pass3.fs:24— Pass3.ForEachBinding has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 7 (18 pts) (nesting depth added 11). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
NameResolution.bindValueAsCallExpression (cognitive 18) src/Compiler/Oly.Compiler/Binder/NameResolution.fs:663— NameResolution.bindValueAsCallExpression has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (14 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Scoping.scopeInEntityAux (cognitive 18) src/Compiler/Oly.Compiler/Binder/Scoping.fs:62— Scoping.scopeInEntityAux has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 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.
BinderEnvironment.SetUnqualifiedType (cognitive 18) src/Compiler/Oly.Compiler/Binder/Environment.fs:310— BinderEnvironment.SetUnqualifiedType has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 2 (4 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.
CompilerImports.importTypeSymbol (cognitive 18) src/Compiler/Oly.Compiler/CompilerImports.fs:950— CompilerImports.importTypeSymbol has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 5 (9 pts), if/else 5 (8 pts), boolean chains 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.
OlyToken.TryNextToken (cognitive 18) src/Compiler/Oly.Compiler.Syntax/SyntaxTreeImplementation.fs:378— OlyToken.TryNextToken has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), match/switch 3 (7 pts), boolean chains 2 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
LexerModule.parseConditionalDirective (cognitive 18) src/Compiler/Oly.Compiler.Syntax/Internal/Lexer.fs:761— LexerModule.parseConditionalDirective has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AssertionPropagation.tryGetAssertionKeyAndValue (cognitive 18) src/Runtime/Oly.Runtime/Optimizations/AssertionPropagation.fs:77— AssertionPropagation.tryGetAssertionKeyAndValue has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 6 (17 pts), boolean chains 1 (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.
ILGen.GenValueExpression (cognitive 17) src/Compiler/Oly.Compiler/ILGen.fs:1764— ILGen.GenValueExpression has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 6 (15 pts), boolean chains 1, if/else 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.
PostInferenceAnalysis.analyzeTypeAux (cognitive 17) src/Compiler/Oly.Compiler/Binder/PostInferenceAnalysis.fs:157— PostInferenceAnalysis.analyzeTypeAux has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 6 (13 pts), if/else 2 (4 pts) (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.
Pass4.bindParenthesisExpression (cognitive 17) src/Compiler/Oly.Compiler/Binder/Pass4.fs:478— Pass4.bindParenthesisExpression has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 6 (13 pts), if/else 3, boolean chains 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.
Pass4.bindElseIfOrElseExpression (cognitive 17) src/Compiler/Oly.Compiler/Binder/Pass4.fs:1144— Pass4.bindElseIfOrElseExpression has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 5 (11 pts), if/else 4 (6 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.
Pass2.bindTopLevelBinding (cognitive 17) src/Compiler/Oly.Compiler/Binder/Pass2.fs:1102— Pass2.bindTopLevelBinding has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 5 (12 pts), if/else 2 (5 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
NameResolution.bindIdentifierWithReceiverNamespaceAsFormalItem (cognitive 17) src/Compiler/Oly.Compiler/Binder/NameResolution.fs:386— NameResolution.bindIdentifierWithReceiverNamespaceAsFormalItem has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 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.
BoundTreeExtensions.BoundTree.ForEachForTooling (cognitive 17) src/Compiler/Oly.Compiler/BoundTreeExtensions.fs:539— BoundTreeExtensions.BoundTree.ForEachForTooling has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, match/switch 2 (4 pts), loops 1 (3 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.
CompilerImports.importEntityFlags (cognitive 17) src/Compiler/Oly.Compiler/CompilerImports.fs:886— CompilerImports.importEntityFlags has cognitive complexity 17 (threshold 15). Drivers by points: if/else 17. 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.
SymbolOperations.subsumesTypeWith (cognitive 17) src/Compiler/Oly.Compiler/Symbols/SymbolOperations.fs:1872— SymbolOperations.subsumesTypeWith has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 3 (8 pts), if/else 4 (7 pts), boolean chains 2 (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Symbols.assertNoForAllTypes (cognitive 17) src/Compiler/Oly.Compiler/Symbols/Symbols.fs:6415— Symbols.assertNoForAllTypes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 3 (5 pts), boolean chains 3 (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.
OlyToken.TryPreviousToken (cognitive 17) src/Compiler/Oly.Compiler.Syntax/SyntaxTreeImplementation.fs:347— OlyToken.TryPreviousToken has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 4 (10 pts), if/else 2 (5 pts), boolean chains 2 (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.
LexerModule.scanNumericLiteralAux (cognitive 17) src/Compiler/Oly.Compiler.Syntax/Internal/Lexer.fs:227— LexerModule.scanNumericLiteralAux has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 6 (11 pts), boolean chains 6 (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.
LocalNormalization.handleLinearExpression (cognitive 17) src/Runtime/Oly.Runtime/LocalNormalization.fs:51— LocalNormalization.handleLinearExpression has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 5 (9 pts), if/else 4 (6 pts), boolean chains 2 (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.
DotNet.getBuildInfo (cognitive 17) src/Runtime/Targets/DotNet/Oly.Compiler.CIL.Importer/DotNetTarget.fs:108— DotNet.getBuildInfo has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, error handling 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.
Helpers.decodeTypedArg (cognitive 17) src/Runtime/Targets/DotNet/Oly.Compiler.CIL.Importer/Importer.fs:1334— Helpers.decodeTypedArg has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 2 (4 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.
ClrCodeGen.isByRefLike (cognitive 17) src/Emitters/DotNet/Oly.Emitters.DotNet/Emitter.fs:145— ClrCodeGen.isByRefLike has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 4 (12 pts), if/else 4 (5 pts) (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.
MetadataHelpers.encodeReturnType (cognitive 17) src/Emitters/DotNet/DotNet.Metadata/MetadataBuilder.fs:166— MetadataHelpers.encodeReturnType has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 4 (12 pts), if/else 4 (5 pts) (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.
SpirvModuleBuilder.CreateVariable (cognitive 17) src/Emitters/Spirv/Oly.Emitters.Spirv/SpirvModuleBuilder.fs:1155— SpirvModuleBuilder.CreateVariable has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 3 (12 pts), if/else 3, loops 1 (2 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
OlySyntaxTreeView.findOlySyntaxNodeTokenViewModelByPosition (cognitive 17) vscode/src/OlySyntaxTreeView.ts:80— OlySyntaxTreeView.findOlySyntaxNodeTokenViewModelByPosition has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 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.
OlyBoundModel.TryGetWhitespaceSubModel (cognitive 16) src/Compiler/Oly.Compiler/PublicAPI/PublicSymbols.fs:2610— OlyBoundModel.TryGetWhitespaceSubModel has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 3 (9 pts), if/else 3 (7 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
PostInferenceAnalysis.analyzeTraitConstraintTypeInVirtualImplementation (cognitive 16) src/Compiler/Oly.Compiler/Binder/PostInferenceAnalysis.fs:861— PostInferenceAnalysis.analyzeTraitConstraintTypeInVirtualImplementation has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), match/switch 2 (7 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.
Pass2.bindTypeDeclarationCases (cognitive 16) src/Compiler/Oly.Compiler/Binder/Pass2.fs:1312— Pass2.bindTypeDeclarationCases has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 3 (8 pts), if/else 4 (7 pts), boolean chains 1 (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.
ImplicitRules.ImplicitArgumentsForFunction (cognitive 16) src/Compiler/Oly.Compiler/ImplicitRules.fs:321— ImplicitRules.ImplicitArgumentsForFunction has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), match/switch 2 (6 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.
SymbolOperations.TypeSymbol.Hierarchy (cognitive 16) src/Compiler/Oly.Compiler/Symbols/SymbolOperations.fs:3022— SymbolOperations.TypeSymbol.Hierarchy has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 3 (7 pts), if/else 1 (5 pts), loops 1 (3 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.
Symbols.actualType (cognitive 16) src/Compiler/Oly.Compiler/Symbols/Symbols.fs:534— Symbols.actualType has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 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.
VariableSolutionSymbol.SetSolution (cognitive 16) src/Compiler/Oly.Compiler/Symbols/Symbols.fs:3393— VariableSolutionSymbol.SetSolution has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OlySyntaxTreeExtensions.OlySyntaxTree.TryFindNode (cognitive 16) src/Compiler/Oly.Compiler.Syntax/SyntaxTreeImplementation.fs:1676— OlySyntaxTreeExtensions.OlySyntaxTree.TryFindNode 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.
LexerModule.scanStringLiteral (cognitive 16) src/Compiler/Oly.Compiler.Syntax/Internal/Lexer.fs:577— LexerModule.scanStringLiteral has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), match/switch 4 (7 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.
SyntaxSeparatorList`1.Oly.Compiler.Syntax.Internal.ISyntaxSeparatorList.TryFindIndexByRelativePosition (cognitive 16) src/Compiler/Oly.Compiler.Syntax/Internal/ISyntaxNode.fs:112— SyntaxSeparatorList`1.Oly.Compiler.Syntax.Internal.ISyntaxSeparatorList.TryFindIndexByRelativePosition has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 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.
Dump.DumpOperation (cognitive 16) src/Runtime/Oly.Runtime/OlyIR.fs:1208— Dump.DumpOperation has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 7 (16 pts) (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.
Oly.CleanProject (cognitive 16) src/CLI/olylib/Library.fs:37— Oly.CleanProject has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SpirvLowering.LowerLinearExpression (cognitive 16) src/Emitters/Spirv/Oly.Emitters.Spirv/SpirvLowering.fs:105— SpirvLowering.LowerLinearExpression has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, 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.
TextDocumentSyncHandler.OmniSharp.Extensions.LanguageServer.Protocol.Document.IDocumentOnTypeFormattingHandler.Handle (cognitive 16) src/LanguageServer/Oly.LanguageServer/LanguageServer.fs:1259— TextDocumentSyncHandler.OmniSharp.Extensions.LanguageServer.Protocol.Document.IDocumentOnTypeFormattingHandler.Handle has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 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.
FunctionTooLong: extension.activate vscode/src/extension.ts:57— FunctionTooLong — activate runs 305 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 205 over it, 3.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
TooManyFunctions: Program src/Emitters/Spirv/Spirv.ApiGenerator/Program.fs:1— TooManyFunctions — 42 functions. The bar is 30 functions; this is 12 over it, 1.40× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
Duplicated block (20 lines × 2 locations) vscode/src/OlySolutionExplorerView.ts:86— vscode/src/OlySolutionExplorerView.ts:86 · vscode/src/OlySyntaxTreeView.ts:55 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (12 lines × 2 locations) vscode/src/OlySolutionExplorerView.ts:109— vscode/src/OlySolutionExplorerView.ts:109 · vscode/src/OlySyntaxTreeView.ts:121 — 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 (10 lines × 2 locations) vscode/src/OlySolutionExplorerView.ts:131— vscode/src/OlySolutionExplorerView.ts:131 · vscode/src/OlySyntaxTreeView.ts:143 — 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.
R10 · Code Duplication· Duplicated block with local edits (9 matched lines × 2 locations) · ×1
Duplicated block with local edits (9 matched lines × 2 locations) vscode/src/OlySolutionExplorerView.ts:198— vscode/src/OlySolutionExplorerView.ts:198 · vscode/src/OlySolutionExplorerView.ts:213 — the two spans are one implementation copied and then locally edited — 74 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (8 matched lines × 2 locations) · ×1
Duplicated block with local edits (8 matched lines × 2 locations) vscode/src/OlySyntaxTreeView.ts:160— vscode/src/OlySyntaxTreeView.ts:160 · vscode/src/OlySyntaxTreeView.ts:197 — the two spans are one implementation copied and then locally edited — 63 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Complex function refreshProjectStatusBarItemTooltip (cyclomatic 15, cognitive 19) vscode/src/extension.ts:275— refreshProjectStatusBarItemTooltip has cyclomatic complexity 15 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 is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function findOlySyntaxNodeTokenViewModelByPosition (cyclomatic 13, cognitive 17) vscode/src/OlySyntaxTreeView.ts:80— findOlySyntaxNodeTokenViewModelByPosition has cyclomatic complexity 13 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 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.
Large Files — 1 file(s) over 400 lines (counted as significant lines — blank lines excluded — over production source only, tests excluded), largest first: vscode/src/extension.ts (463).
SC1 · Supply-chain hygiene· NuGet dependencies are not locked · ×1
NuGet dependencies are not locked — No packages.lock.json and no central package management — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
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/`.
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.
M2 · Architecture documentation· No architecture diagram/doc · ×1
No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
README/code drift — README claims VSCode extension is built and run via F5 but the evidence shows no vscode directory or .vscode/* — searched for: `vscode directory`, `VSCode extension`. Each was matched case- and separator-insensitively against file and directory NAMES anywhere in the tree, and against the CONTENTS of manifest files (package.json, *.csproj, *.props, *.slnx, *.yml, Dockerfile); the README's own prose never counts, so a claim is never refuted by merely being made. Nothing outside that search was read — a footprint living only in a submodule, in a file type not listed here, or under a name none of those terms matches is not seen, and this row is then wrong.
No SAST — No static application security testing detected. For this repository's stack, add `semgrep --config=auto` plus gitleaks for committed secrets (F# is not a CodeQL language and has no language-specific SAST engine) as a CI step. What was searched, so you can tell an absence from a miss: the 2084 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.
Nullable reference types not enabled everywhere — 0/1 NRT-eligible project(s) enable <Nullable>enable</Nullable> (projects targeting a pre-C#-8 framework are excluded — NRTs aren't available there). NRTs catch a whole class of null-deref bugs at compile time.
Outdated: FSharp.Core — FSharp.Core 10.1.400 → 10.1.401 available (referenced by Oly.Compiler).
Outdated: Microsoft.Extensions.ObjectPool — Microsoft.Extensions.ObjectPool 10.0.8 → 10.0.12 available (referenced by Oly.Compiler).
Outdated: coverlet.collector — coverlet.collector 6.0.4 → 10.1.0 available (referenced by Oly.Compiler.Tests).
Outdated: Microsoft.NET.Test.Sdk — Microsoft.NET.Test.Sdk 18.0.1 → 18.10.1 available (referenced by Oly.Compiler.Tests).
Outdated: xunit.runner.visualstudio — xunit.runner.visualstudio 3.1.5 → 4.0.0 available (referenced by Oly.Compiler.Tests).
Outdated: Microsoft.Build.Tasks.Core — Microsoft.Build.Tasks.Core 18.0.2 → 18.10.1 available (referenced by Oly.Targets.DotNet).
Outdated: Microsoft.CodeAnalysis.CSharp.Workspaces — Microsoft.CodeAnalysis.CSharp.Workspaces 5.0.0 → 5.9.0 available (referenced by Oly.Targets.DotNet).
Outdated: Microsoft.CodeAnalysis.Workspaces.MSBuild — Microsoft.CodeAnalysis.Workspaces.MSBuild 5.0.0 → 5.9.0 available (referenced by Oly.Targets.DotNet).
Outdated: BenchmarkDotNet — BenchmarkDotNet 0.14.0 → 0.15.8 available (referenced by Oly.Benchmarks).
Outdated: FSharp.Data — FSharp.Data 6.4.0 → 8.2.0 available (referenced by Spirv.ApiGenerator).
Outdated: System.Drawing.Common — System.Drawing.Common 10.0.1 → 10.0.12 available (referenced by Spirv.Tests).
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.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
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.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a0ffd3-cef4-7e72-8e60-3a1c68d55c00 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 16 · Warnings: 432 · Recommendations: 8 · Info: 11 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 03-10-2026 @ 03:34 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.