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

TIHan/Oly

Measured 15 November 2026, 12:53 UTC, at code version 04feb2b

Supply-chain provenance & signing is not measured: Supply-chain provenance is not scored (this pipeline releases no artifact), but its build steps or GitHub Actions workflows have integrity defects, or nothing watches its dependency set for published advisories.

CAI score 58out of 100 Adequate
CriticalWeakAdequateStrongExemplary
Down 1 since the last survey

The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.

A medium codebase: 83,233 lines of product code in 31 projects, tests not counted · Estimated rebuild effort: about 1.0 person-years · Weakest lens: Code Health, 48

Findings by how serious they are

18 critical 466 serious 31 minor

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

This survey was produced by

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

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

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

45of 45 dimensions measured by tools.
496of 515 findings point to an exact file and line, so you can open each one in the code. The other 19 concern the repository as a whole, such as missing documentation.
45dimensions across 6 lenses, read from 83,233 lines of product code in 31 projects.
Chapters

Executive summary

TIHan/Oly falls short of our standard for production, held back most by its Code Health lens, the quality of the code itself. It scores 58 out of 100 and is rated Adequate, and 14 of its 18 critical findings are security problems.

Code Health, at 48, is the weakest lens and counts most in the score. The best first step for the work it takes is recording design decisions, worth about 4 points. Turning on missing-value checks would lift Code Health itself, worth about 5 points. Raising Code Health to 70 would lift the score to about 65.

Seven known security holes in the packages the code depends on can be used by attackers. Six pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with, and one password or key is open to anyone who can read the repository. Updating the vulnerable packages, pinning each tool to an exact version and replacing the exposed password or key would close these risks. The two pieces of product code that depend on test code need their reference to the test project removed.

The product code is 83,233 lines, about €150,000 to rebuild.

A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Code Health 48 · counts for 46%Maturity 58 · counts for 25%Production Readiness 64 · counts for 14%Architecture 78 · counts for 8%Performance 85 · counts for 4%Security and Compliance 95 · counts for 2%

If Code Health rose from 48 to 70, the lowest score rated Strong, the score would rise from 58 to about 65.

Code composition: what the lines of code are
Product code 58%Tests 42%
Fixed since the last survey: 1 finding

This critical or serious finding was in the previous survey, on 31 October 2026, and is gone from this one.

  • Dependency Vulnerabilities · Medium CVE: REDACTED REDACTED
Rebuild cost: about €150,000 · Estimate
Cost to rebuild€49,000 to €250,000, for 818 to 2,595 hours of work, about 1.0 person-years for 1 to 2 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.8 at a score of 58. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeMedium: 83,233 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with oly_bootstrap.fsproj.
Raises the score by about 4 points · Low effort · ADR Quality
2
Enable <Nullable>enable</Nullable> across all projects and resolve warnings rather than suppressing with `!`.
Raises the score by about 5 points · Medium effort · Nullable reference types
3
Resolve the 1 `CodePrefixOLY` spells `OLY` where 28 names in the project spell it… finding(s) in Naming Consistency — start with SyntaxTree.fs.
Raises the score by about 2 points · Low effort · Naming Consistency

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €150,000 to build again, about 1.0 person-years of work. Its weakest lens is Code Health, at 48 (Weak). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Resolve the 1 No ADRs found finding(s) in ADR Quality. Of all the actions in this report, it raises the score most for the work it takes: about 4 points for low effort, because it clears the 1 ADR Quality findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 4.8 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 8% to 18% on every change. The history of the code shows how much it changes: about 109,658 lines over the last 90 days, which is about 444,724 lines a year. At that pace, the extra work comes to an estimated 87.9 to 527.3 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — 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.

arch ctx:CLI CLI oly_bootstrap · olylib ctx:Compiler Compiler Compiler · Extensions · Syntax · SyntaxGenerator … ctx:CLI->ctx:Compiler ctx:Runtime Runtime Core · DotNet · Interpreter · Runtime ctx:CLI->ctx:Runtime ctx:Targets Targets Spirv ctx:CLI->ctx:Targets ctx:Core Core Core · Utilities ctx:Compiler->ctx:Core ctx:Metadata Metadata Metadata ctx:Compiler->ctx:Metadata ctx:Emitters Emitters ApiGenerator · DotNet · Interpreter · Metadata … ctx:Emitters->ctx:Core ctx:LanguageServer LanguageServer LanguageServer ctx:LanguageServer->ctx:CLI ctx:LanguageServer->ctx:Compiler ctx:LanguageServer->ctx:Runtime ctx:LanguageServer->ctx:Targets ctx:Metadata->ctx:Core ctx:Runtime->ctx:Compiler ctx:Runtime->ctx:Emitters ctx:Runtime->ctx:Metadata ctx:Targets->ctx:Emitters ctx:Targets->ctx:Runtime

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

283 modules, with 395 dependencies between them. 2 loops run through 4 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 243 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 DotNet.Metadata2 Oly.Core3 Spirv.Core4 Oly.Compiler.Syntax.Internal5 Oly.Compiler.Text6 Oly.Metadata7 Oly.Compiler.Internal.Symbols8 Oly.Compiler.Syntax9 Oly.Runtime.CodeGen.InternalTypes10 Oly.Compiler.Internal.SymbolBuilders11 Oly.Compiler.Internal.SymbolOperations12 Oly.Runtime.CodeGen13 Oly.Compiler.Internal.CompilerImports14 Oly.Compiler.Internal.SymbolEnvironments15 Oly.Emitters.DotNet16 Oly.Emitters.Spirv17 Oly.Runtime.CodeGen.Internal18 Oly.Compiler.Internal.BoundTree19 Oly.Compiler.Internal.SymbolQuery20 Oly.Compiler.Internal.Binder.Environment21 Oly.Compiler.Internal.BoundTreeExtensions22 Oly.Compiler.Internal.ILGen23 Oly.Compiler.Internal.Solver24 Oly.Compiler.Symbols25 Oly.Compiler.Internal.Binder.Attributes26 Oly.Compiler.Internal.Binder.Checking27 Oly.Compiler.Internal.Binder.EarlyAttributes28 Oly.Compiler.Internal.Binder.NameResolution29 Oly.Compiler.Internal.Binder.Pass230 Oly.Compiler.Internal.Binder.PostInferenceAnalysis31 Oly.Compiler.Internal.Binder.Scoping32 Oly.Compiler.Internal.Binder.Binder33 Oly.Compiler.Internal.Binder.Pass434 Oly.Compiler.Compilation35 Oly.Compiler.Workspace36 LanguageServer37 Oly.Targets.Core38 Oly.Targets.DotNet39 LanguageServer.ExtensionHelpers40 Oly.Targets.Spirv
1 DotNet.Metadata
2 Oly.Core
3 Spirv.Core
4 Oly.Compiler.Syntax.Internal1
5 Oly.Compiler.Text1
6 Oly.Metadata1
7 Oly.Compiler.Internal.Symbols12
8 Oly.Compiler.Syntax31064
9 Oly.Runtime.CodeGen.InternalTypes299
10 Oly.Compiler.Internal.SymbolBuilders20
11 Oly.Compiler.Internal.SymbolOperations149
12 Oly.Runtime.CodeGen153
13 Oly.Compiler.Internal.CompilerImports1391342
14 Oly.Compiler.Internal.SymbolEnvironments1197
15 Oly.Emitters.DotNet8219
16 Oly.Emitters.Spirv9223
17 Oly.Runtime.CodeGen.Internal23
18 Oly.Compiler.Internal.BoundTree37219
19 Oly.Compiler.Internal.SymbolQuery912
20 Oly.Compiler.Internal.Binder.Environment149132
21 Oly.Compiler.Internal.BoundTreeExtensions311131
22 Oly.Compiler.Internal.ILGen2221725
23 Oly.Compiler.Internal.Solver83121
24 Oly.Compiler.Symbols1152325
25 Oly.Compiler.Internal.Binder.Attributes5412
26 Oly.Compiler.Internal.Binder.Checking6322
27 Oly.Compiler.Internal.Binder.EarlyAttributes3412
28 Oly.Compiler.Internal.Binder.NameResolution2422492
29 Oly.Compiler.Internal.Binder.Pass21320122
30 Oly.Compiler.Internal.Binder.PostInferenceAnalysis154284
31 Oly.Compiler.Internal.Binder.Scoping4212
32 Oly.Compiler.Internal.Binder.Binder21322321
33 Oly.Compiler.Internal.Binder.Pass482717212
34 Oly.Compiler.Compilation10441021232
35 Oly.Compiler.Workspace138824
36 LanguageServer23236
37 Oly.Targets.Core119
38 Oly.Targets.DotNet111110
39 LanguageServer.ExtensionHelpers131
40 Oly.Targets.Spirv111121
Uses a module listed above itPart of a loopThe module itself
1 DotNet.Metadata2 Oly.Core3 Spirv.Core4 Oly.Compiler.Syntax.Internal5 Oly.Compiler.Text6 Oly.Metadata7 Oly.Compiler.Internal.Symbols8 Oly.Compiler.Syntax9 Oly.Runtime.CodeGen.InternalTypes10 Oly.Compiler.Internal.SymbolBuilders11 Oly.Compiler.Internal.SymbolOperations12 Oly.Runtime.CodeGen13 Oly.Compiler.Internal.CompilerImports14 Oly.Compiler.Internal.SymbolEnvironments15 Oly.Emitters.DotNet16 Oly.Emitters.Spirv17 Oly.Runtime.CodeGen.Internal18 Oly.Compiler.Internal.BoundTree19 Oly.Compiler.Internal.SymbolQuery20 Oly.Compiler.Internal.Binder.Environment21 Oly.Compiler.Internal.BoundTreeExtensions22 Oly.Compiler.Internal.ILGen23 Oly.Compiler.Internal.Solver24 Oly.Compiler.Symbols25 Oly.Compiler.Internal.Binder.Attributes26 Oly.Compiler.Internal.Binder.Checking27 Oly.Compiler.Internal.Binder.EarlyAttributes28 Oly.Compiler.Internal.Binder.NameResolution29 Oly.Compiler.Internal.Binder.Pass230 Oly.Compiler.Internal.Binder.PostInferenceAnalysis31 Oly.Compiler.Internal.Binder.Scoping32 Oly.Compiler.Internal.Binder.Binder33 Oly.Compiler.Internal.Binder.Pass434 Oly.Compiler.Compilation35 Oly.Compiler.Workspace36 LanguageServer37 Oly.Targets.Core38 Oly.Targets.DotNet39 LanguageServer.ExtensionHelpers40 Oly.Targets.SpirvDotNet.Metadata1Oly.Core2Spirv.Core3Oly.Compiler.Syntax.Internal4Oly.Compiler.Text5Oly.Metadata6Oly.Compiler.Internal.Symbols7Oly.Compiler.Syntax8Oly.Runtime.CodeGen.InternalTypes9Oly.Compiler.Internal.SymbolBuilders10Oly.Compiler.Internal.SymbolOperations11Oly.Runtime.CodeGen12Oly.Compiler.Internal.CompilerImports13Oly.Compiler.Internal.SymbolEnvironments14Oly.Emitters.DotNet15Oly.Emitters.Spirv16Oly.Runtime.CodeGen.Internal17Oly.Compiler.Internal.BoundTree18Oly.Compiler.Internal.SymbolQuery19Oly.Compiler.Internal.Binder.Environment20Oly.Compiler.Internal.BoundTreeExtensions21Oly.Compiler.Internal.ILGen22Oly.Compiler.Internal.Solver23Oly.Compiler.Symbols24Oly.Compiler.Internal.Binder.Attributes25Oly.Compiler.Internal.Binder.Checking26Oly.Compiler.Internal.Binder.EarlyAttributes27Oly.Compiler.Internal.Binder.NameResolution28Oly.Compiler.Internal.Binder.Pass229Oly.Compiler.Internal.Binder.PostInferenceAnalysis30Oly.Compiler.Internal.Binder.Scoping31Oly.Compiler.Internal.Binder.Binder32Oly.Compiler.Internal.Binder.Pass433Oly.Compiler.Compilation34Oly.Compiler.Workspace35LanguageServer36Oly.Targets.Core37Oly.Targets.DotNet38LanguageServer.ExtensionHelpers39Oly.Targets.Spirv4011112310642992014915313913421197821992232337219912149132311131222172583121115232554126322341224224921320122154284421221322321827172121044102123213882423236119111110131111121+243 more modules (most-connected shown)

At a glance — Code Health · 48% · Weak · gated by D1, D2, X5 ·

At a glance — Architecture · 78% · Strong ·

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

At a glance — Readiness · 64% · Adequate · gated by P3 ·

At a glance — Security · 95% · Exemplary ·

At a glance — Performance · 85% · Strong ·

Security & Compliance — OWASP Top-10 mapping

Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).

OWASP categoryFindingsSeverity
A03:2025 — Software Supply Chain Failures12High / Critical
A05:2025 — Injection7High / Critical
A07:2025 — Authentication Failures2High / Critical

Roadmap

Top priorities: Enable <Nullable>enable</Nullable> across all projects and resolve warnings rather than suppressing with `!`; Resolve the 1 No ADRs found finding(s) in ADR Quality — start with oly_bootstrap.fsproj; Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with oly_bootstrap.fsproj.+4.3 ptsLowADR Quality
Enable <Nullable>enable</Nullable> across all projects and resolve warnings rather than suppressing with `!`.+5.5 ptsMediumNullable reference types
Resolve the 1 `CodePrefixOLY` spells `OLY` where 28 names in the project spell it… finding(s) in Naming Consistency — start with SyntaxTree.fs.+2.3 ptsLowNaming Consistency
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.+4.1 ptsMediumArchitecture documentation
Resolve the 44 FileTooLong finding(s) in God Classes — start with Emitter.fs (2), Symbols.fs, REDACTED.+3.7 ptsHighGod Classes
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.+3.2 ptsMediumLarge Files
Bring the 53 bodies over 60 down to 60 or less in Cognitive Complexity — start with WorkspaceExtensions.OlyDocument.GetCompletions (cognitive 273), Pass2.bindBindingDeclarationCoreAux (cognitive 262), OlyBoundModel.GetImmediateSymbols (cognitive 199).+3.1 ptsHighCognitive Complexity
Resolve the 12 Hotspot finding(s) in Churn × Complexity Hotspots — start with ILGen.fs, Importer.fs, CompilerImports.fs.+2.6 ptsHighChurn × Complexity Hotspots

File quality

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

FileScoreBandWorst signal
REDACTED0.0SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.2MixedSecrets (history): REDACTED: REDACTED
REDACTED5.3MixedStatic Analysis (SAST): Medium: REDACTED
src/Emitters/DotNet/Oly.Emitters.DotNet/Emitter.fs5.5MixedCyclomatic Complexity: ClrCodeGen.GenOperation (cyclomatic 139)
src/Emitters/DotNet/DotNet.Metadata/MetadataBuilder.fs5.5MixedCyclomatic Complexity: ClrMethodDefinitionBuilder.PopulateMethodBody (cyclomatic 55)
src/Compiler/Oly.Compiler/Symbols/Symbols.fs5.5MixedCyclomatic Complexity: Symbols.tryActualType (cyclomatic 21)
REDACTED5.8MixedDependency Vulnerabilities: High CVE: REDACTED
src/Compiler/Oly.Compiler/Binder/NameResolution.fs7.0MixedCyclomatic Complexity: NameResolution.bindValueModifiersAndKindAsMemberFlags (cyclomatic 128)
src/Compiler/Oly.Compiler/Symbols/SymbolOperations.fs7.0MixedCyclomatic Complexity: SymbolOperations.UnifyTypes (cyclomatic 104)
src/Compiler/Oly.Compiler/ILGen.fs7.0MixedCyclomatic Complexity: ILGen.GenCallExpression (cyclomatic 102)
src/Runtime/Targets/DotNet/Oly.Compiler.CIL.Importer/Importer.fs7.0MixedCyclomatic Complexity: Helpers.importTypeDefinitionAsOlyILEntityDefinition (cyclomatic 81)
src/Compiler/Oly.Compiler/Binder/PostInferenceAnalysis.fs7.0MixedCyclomatic Complexity: PostInferenceAnalysis.analyzeExpressionAuxAux (cyclomatic 80)
src/Compiler/Oly.Compiler/PublicAPI/PublicSymbols.fs7.0MixedCyclomatic Complexity: OlyBoundModel.GetImmediateSymbols (cyclomatic 74)
src/Compiler/Oly.Compiler/Binder/Pass4.fs7.0MixedCyclomatic Complexity: Pass4.bindLocalExpressionAuxAux (cyclomatic 53)
src/LanguageServer/Oly.LanguageServer/LanguageServer.fs7.0MixedCyclomatic Complexity: ExtensionHelpers.getViewModel (cyclomatic 45)
src/Compiler/Oly.Compiler/Checker.fs7.0MixedCyclomatic Complexity: Checker.checkReceiverOfExpression (cyclomatic 37)
src/Compiler/Oly.Compiler/BoundTreeExtensions.fs7.0MixedCyclomatic Complexity: Iterator.VisitExpression (cyclomatic 30)

How the grades work

Every finding carries one of four grades. Three say how serious it is. The fourth says this survey could not settle it — and it is a grade, not a gap.

Critical — 18

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

Likely wrong, but not failing yet. It degrades the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to carry for two years either.

Minor — 31

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

Could not be resolved — 19

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

Methodology & how to trust this report

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

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

What we checked — 45 dimensions across the health lenses
D1D2D3D5D6D10D12D13D14D15D19D20D21D26D27D28D29D30D34D35D44AX10AX3AX4AX8GD1M1M2M3M4P1P10P2P3PF3R1R10R2R3R5R6R7R8R9X5

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report — three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 496 of 515 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

This report answers yes to all three. That's the bar to hold any assessment to.

Tools & methods

The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Canine Code Analyzer duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivySecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3✓ deterministic

Every finding is locatable in findings.md. Run 01a1df44-aee2-7faf-8802-02865862303e.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.

  • D4 Code Duplication — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Code Duplication couldn't be assessed within its 8-minute budget on a solution this large — not included in this run.
  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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 — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 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.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability not included — no test tier completed within its budget.
  • D12 Dependency Hygiene — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This 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 — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This 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 — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 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.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • D43 Malicious Dependencies — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Malicious Dependencies couldn't be assessed within its 20-minute budget on a solution this large — not included in this run.
  • AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • 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.
  • X1 Async correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is 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.
  • X23 Unguarded diagnostic materialisation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X27 Collection changed while being enumerated — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This 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.
  • X28 Index access outside its own emptiness guard — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X3 Exception handling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is 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

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • 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.
  • 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: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.

Dimensions

D1 · Cyclomatic Complexity3.9 / 10Weak✓ Tool-verified

What it measures: How tangled the control flow is — methods with many branches are hard to test and change.

Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.

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

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

InterpreterFunction.CallWithStackAux (cyclomatic 172)src/Emitters/Interpreter/Oly.Emitters.Interpreter/Emitter.fs:1039
ClrCodeGen.GenOperation (cyclomatic 139)src/Emitters/DotNet/Oly.Emitters.DotNet/Emitter.fs:603
NameResolution.bindValueModifiersAndKindAsMemberFlags (cyclomatic 128)src/Compiler/Oly.Compiler/Binder/NameResolution.fs:2257
InterpreterFunction.HandleCast (cyclomatic 119)src/Emitters/Interpreter/Oly.Emitters.Interpreter/Emitter.fs:756
SymbolOperations.UnifyTypes (cyclomatic 104)src/Compiler/Oly.Compiler/Symbols/SymbolOperations.fs:404

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

What to do

  1. 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.9 to about 4.5/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.

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

D2 · Cognitive Complexity2.0 / 10Critical✓ Tool-verified

What it measures: How hard the code is for a person to follow, beyond raw branching.

Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.

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

234 method(s) exceeded the cognitive complexity threshold of 15; the worst was WorkspaceExtensions.OlyDocument.GetCompletions at 273.

WorkspaceExtensions.OlyDocument.GetCompletions (cognitive 273)src/Compiler/Oly.Compiler.Workspace/OlyWorkspaceExtensions.fs:627
Pass2.bindBindingDeclarationCoreAux (cognitive 262)src/Compiler/Oly.Compiler/Binder/Pass2.fs:302
OlyBoundModel.GetImmediateSymbols (cognitive 199)src/Compiler/Oly.Compiler/PublicAPI/PublicSymbols.fs:2288
Pass3.bindTypeDeclarationBody (cognitive 198)src/Compiler/Oly.Compiler/Binder/Pass3.fs:206
SymbolOperations.UnifyTypes (cognitive 198)src/Compiler/Oly.Compiler/Symbols/SymbolOperations.fs:404

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

What to do

  1. Bring the 53 bodies over 60 down to 60 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 53 together lifts Cognitive Complexity from 2.0 to about 4.0/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

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

D3 · God Classes7.2 / 10Strong✓ Tool-verified

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

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

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

51 god class(es) detected.

FileTooLong: Symbols/Symbols.fs · ×44src/Compiler/Oly.Compiler/Symbols/Symbols.fs
TooManyMethods: TextDocumentSyncHandler · ×5src/LanguageServer/Oly.LanguageServer/LanguageServer.fs:980
FunctionTooLong: extension.activateREDACTED:57
TooManyFunctions: Programsrc/Emitters/Spirv/Spirv.ApiGenerator/Program.fs:1

What to do

  1. Resolve the 44 FileTooLong finding(s) in God Classes — start with Emitter.fs (2), Symbols.fs, REDACTED. — One of this dimension's main actionable groups (44 warning-level).
  2. 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).
  3. Resolve the 1 FunctionTooLong finding(s) in God Classes — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).

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

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.

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

31 projects, 0 dependency cycle(s), 0 unstable depended-on project(s).

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

D6 · Cohesion (LCOM4)8.6 / 10Strong✓ Tool-verified

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

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

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

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

6 of 52 classes have LCOM4 above 3.

Low cohesion: EntitySymbolBuilder (LCOM4 7) · ×6src/Compiler/Oly.Compiler/Symbols/SymbolBuilders.fs:9

What to do

  1. Resolve the 6 Low cohesion finding(s) in Cohesion (LCOM4) — start with SymbolBuilders.fs, Symbols.fs, MetadataBuilder.fs. — One of this dimension's main actionable groups (6 warning-level).

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

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.

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

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.

D12 · Dependency Hygiene8.9 / 10Strong✓ Tool-verified

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

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

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

12 outdated, 0 vulnerable, 1 deprecated packages. NuGet only — this repository also declares npm dependencies, which are not read for currency here.

Deprecated: xunit · ×8src/Compiler/Oly.Compiler.Tests/Oly.Compiler.Tests.fsproj:48
Outdated: coverlet.collectorsrc/CLI/olylib.Tests/olylib.Tests.fsproj:17
Deprecated: globREDACTED:1634
Outdated: FSharp.Core · ×11

What to do

  1. Resolve the 8 Deprecated finding(s) in Dependency Hygiene — start with Oly.Compiler.Tests.fsproj, Oly.Targets.DotNet.Tests.fsproj, Oly.Targets.Interpreter.Tests.fsproj. — One of this dimension's main actionable groups (8 warning-level).
  2. Resolve the 1 Outdated finding(s) in Dependency Hygiene — start with olylib.Tests.fsproj. — One of this dimension's main actionable groups (1 recommendation-level).
  3. Resolve the 1 Deprecated finding(s) in Dependency Hygiene — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).

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

D13 · REDACTED Scanning10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.

Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.

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

REDACTED scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the licenses of third-party packages are compatible with your policy.

Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.

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

0 of 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.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots7.2 / 10Strong✓ Tool-verified

What it measures: Files that change often and are also complex — the riskiest hotspots.

Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.

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

Top hotspots: src/Compiler/Oly.Compiler/ILGen.fs (15×102=1530); src/Runtime/Targets/DotNet/Oly.Compiler.CIL.Importer/Importer.fs (17×81=1377); src/Compiler/Oly.Compiler/CompilerImports.fs (15×48=720)

Hotspot: src/Compiler/Oly.Compiler/ILGen.fs · ×12src/Compiler/Oly.Compiler/ILGen.fs:1843

What to do

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

D19 · Documentation Quality10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.

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

1 of 1 documentation facets pass in full. 3 document(s) read across 2 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

What it measures: Whether architecture decisions are recorded well (context, decision, consequences).

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

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

No architecture decision records were found.

No ADRs foundsrc/CLI/oly_bootstrap/oly_bootstrap.fsproj:4

What to do

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

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

D21 · Naming Consistency6.5 / 10Adequate✓ Tool-verified

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.

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

1 naming inconsistencies among 29 declarations measured against a convention their peers follow.

`CodePrefixOLY` spells `OLY` where 28 names in the project spell it `Oly`src/Compiler/Oly.Compiler.Syntax/SyntaxTree.fs:43

What to do

  1. Resolve the 1 `CodePrefixOLY` spells `OLY` where 28 names in the project spell it… finding(s) in Naming Consistency — start with SyntaxTree.fs. — One of this dimension's main actionable groups (1 recommendation-level).

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

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

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

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

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

2 of 22 build units (MSBuild, npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

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

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

D27 · Navigability9.7 / 10Exemplary✓ Tool-verified

What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.

Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.

Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.

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

83 % of calls cross a namespace and 6 % 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.

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

D28 · Secrets (history)9.0 / 10Adequategated by 1 critical finding✓ Tool-verified

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

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

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

1 finding(s): 0 critical, 1 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

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

D29 · Static Analysis (SAST)9.5 / 10Adequategated by 6 critical findings✓ Tool-verified

What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.

Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.

Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).

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

7 finding(s): 0 critical, 6 high, 1 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
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
  2. 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.

D30 · Dependency Vulnerabilities4.8 / 10Weak✓ Tool-verified

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

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

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

12 finding(s): 0 critical, 7 high, 4 medium, 1 low.

REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 6 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (3), REDACTED (2), REDACTED. — One of this dimension's main actionable groups (6 issue-level).
  2. Resolve the 1 High vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. Resolve the 4 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (4). — One of this dimension's main actionable groups (4 warning-level).

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

D34 · Knowledge Freshness10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.

Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.

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

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.

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md.

D35 · Change Coupling10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.

Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.

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

No strong hidden change-coupling between production files.

✓ On the Gold path — maintain.

Detailed fixes: d35_recommendation.md.

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.

Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.

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

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 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.

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

R = React/JS · M = Maturity · P = Readiness.

AX10 · Code composition10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.

Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.

Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.

AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).

Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.

AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.

Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.

AX8 · Test 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. — src/Targets/Spirv/Oly.Runtime.Target.Spirv.Tests/Oly.Targets.Spirv.Tests.fsproj:38
  • `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. — src/Targets/Spirv/Oly.Runtime.Target.Spirv.Tests/Oly.Targets.Spirv.Tests.fsproj:39

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.
GD1 · Unfinished & placeholder code9.9 / 10Exemplary✓ Tool-verified

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.

  • A shipped binding's whole body still raises a "not implemented" error — generated scaffolding that was never completed. Implement it or remove the dead surface. — src/Emitters/Spirv/Oly.Emitters.Spirv/SpirvModuleBuilder.fs:1021

What to do

  • Finish or delete NotImplementedException stubs and replace placeholder literals before shipping.
M1 · Documentation (README)7.3 / 10Strong✓ Tool-verified

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

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

M2 · Architecture documentation0.0 / 10Critical✓ Tool-verified

Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.

Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
  • 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 your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
  • Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.

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

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

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

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

P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether an automated pipeline builds and tests every change.

Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.

P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

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

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

P2 · Observability5.9 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

  • Only 5/8 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `src/Compiler/Oly.Compiler.SyntaxGenerator`, `src/Emitters/Spirv/Spirv.ApiGenerator`, `src/Targets/Spirv/Oly.Runtime.Target.Spirv.Tests`.

What to do

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

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

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

  • 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 3 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:6
  • `src/Benchmarks/Oly.Benchmarks/Oly.Benchmarks.fsproj` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — src/Benchmarks/Oly.Benchmarks/Oly.Benchmarks.fsproj:17

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.
PF3 · Async & latency hygiene8.5 / 10Strong✓ Tool-verified

Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.

Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

  • `Handle` is async and calls Task.WaitAny — a blocking call inside async code stalls the thread-pool thread the workflow runs on, and every continuation queued behind it for as long as it runs. — src/LanguageServer/Oly.LanguageServer/LanguageServer.fs:2035

What to do

  • F#: inside async { } or task { }, bind with let! / do! (Async.AwaitTask for a Task) instead of Async.RunSynchronously, .Wait() or .GetAwaiter().GetResult(), and use do! Async.Sleep or Task.Delay instead of Thread.Sleep; Async.RunSynchronously belongs at the program's entry point, outside every workflow.
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.

R10 · Code Duplication5.5 / 10Adequate✓ Tool-verified

React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): 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. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. 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.
R2 · Cyclomatic Complexity8.0 / 10Strong✓ Tool-verified

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. — REDACTED: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
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.

  • REDACTED has 463 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R5 · Dependency Freshness10.0 / 10Exemplary✓ Tool-verified

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.

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.

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.

R8 · Dependency Hygiene8.0 / 10Strong✓ Tool-verified

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. — REDACTED:8

What to do

  • Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports8.2 / 10Strong✓ Tool-verified

React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.

Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.

  • vscode/src/OlySolutionExplorerView.ts → REDACTED → vscode/src/OlySolutionExplorerView.ts (one verified cycle inside a mutually-dependent group of 3 files) — vscode/src/OlySolutionExplorerView.ts:4

What to do

  • Break each cycle by extracting the shared piece into a module both sides can import.
X5 · Nullable reference types2.0 / 10Critical✓ Tool-verified

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 `!`.

Reference — by lens

The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.

LensScoreRatingImpact
Code Health48%Weak — gated by D1, D2, X5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture78%StrongSolid.
Maturity58%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness64%Adequate — gated by P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security95%ExemplaryStrongest area.
Performance85%StrongSolid.
Unscored — 3 check(s) recorded observations but carry no score

These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.

  • D36 Supply-chain Provenance & Signing — 3 observation(s) recorded · The CI pipeline publishes no artifact — no package publish, container push or release with files to download. Supply-chain provenance, signing and an SBOM describe a PUBLISHED artifact for the people who obtain it, so there is nothing to attest here; a deployment of the service itself publishes nothing for anyone else to verify. Add them to the release pipeline when this repo starts publishing artifacts (a package, a container image, or a release with downloadable files). 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.
  • SC1 Supply-chain hygiene — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X10 Duplicated predicate — 6 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 3 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.

  • 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 — 78 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.
  • 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
  • AX6 Interface segregation — AX6 reached only 1% of this repository's production lines — fsharp (82,214 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • 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 — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C2 Access Controls — No access-control surface detected in the analyzed source — no web/app surface to authorize (no HTTP API or web-UI project) and no authorization code at all (no [Authorize]/policies, no imperative guard methods). Access control is therefore N/A here — this is a library/CLI, which is authorized by its CALLER, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
  • C3 Audit Trail — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C4 Data Retention — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C5 Data-Subject Rights — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • D11 Test Reliability — Test reliability not included
  • D16 Bus Factor — single-maintainer repository — bus factor is not applicable
  • 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.
  • D22 Internal API Consistency — API consistency is measured on C# only; the exposed TypeScript surface was not measured.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only; comments in this repository's .fs source were not judged.
  • D25 ADR Conformance — no ADRs to check
  • 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.
  • 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.
  • 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.
  • D43 Malicious Dependencies — Malicious Dependencies not included (time budget)
  • 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'.
  • 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 — coverage data present for 127 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
  • PF1 Benchmark discipline — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • 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 — No web surface detected in the analyzed source — no HTTP API or web-UI project (no controllers/minimal-API endpoints, no Razor/Blazor views) and no web middleware (HTTPS redirection, HSTS, security headers, cookies). Transport security, security headers, secure cookies, CSRF/input-validation and middleware-order controls are therefore N/A here — this is a library/CLI/worker, not a web app. Crypto hygiene was still checked and found nothing to flag. If this codebase becomes web-facing, the dimension reactivates automatically.
  • 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
  • X12 Unreachable branch — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X16 Unfloored truncation loop — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • 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
  • X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X21 Side-effecting pattern guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X23 Unguarded diagnostic materialisation — X23 reached only 0% of this repository's production lines — fsharp (82,214 lines), typescript (1,019 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • 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.
  • X28 Index access outside its own emptiness guard — X28 reached only 0% of this repository's production lines — fsharp (82,214 lines), typescript (1,019 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X29 Per-element action decided by a fixed element — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X3 Exception handling — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X32 Type resolved by simple name across every loaded assembly — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • 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.

Critical — 18 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · High CVE · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AX8 · Test isolation · Production project references a test project · ×2
  • Production project references a test project: Oly.Targets.Spirv.Tests → Oly.Compiler.Tests src/Targets/Spirv/Oly.Runtime.Target.Spirv.Tests/Oly.Targets.Spirv.Tests.fsproj:38 — `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 src/Targets/Spirv/Oly.Runtime.Target.Spirv.Tests/Oly.Targets.Spirv.Tests.fsproj:39 — `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.
D28 · Secrets (history) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · High vulnerability · ×1
  • REDACTED
R8 · Dependency Hygiene · Unlisted import 'vscode-languageserver-protocol' · ×1
  • Unlisted import 'vscode-languageserver-protocol' REDACTED:8 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R9 · Circular Imports · Import cycle (2 files) · ×1
  • Import cycle (2 files) vscode/src/OlySolutionExplorerView.ts:4 — vscode/src/OlySolutionExplorerView.ts → REDACTED → vscode/src/OlySolutionExplorerView.ts (one verified cycle inside a mutually-dependent group of 3 files)
Serious — 466 finding(s)
D3 · God Classes · FileTooLong · ×44
  • 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: REDACTED REDACTED — FileTooLong — 4079 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3579 over it, 8.16× 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/Parser.fs src/Compiler/Oly.Compiler.Syntax/Internal/Parser.fs — FileTooLong — 3216 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2716 over it, 6.43× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: 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.Workspace/OlyWorkspace.fs src/Compiler/Oly.Compiler.Workspace/OlyWorkspace.fs — FileTooLong — 1837 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1337 over it, 3.67× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: 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: Binder/Checking.fs src/Compiler/Oly.Compiler/Binder/Checking.fs — FileTooLong — 1170 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 670 over it, 2.34× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: 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: Lowering/PatternMatchCompilation.fs src/Compiler/Oly.Compiler/Lowering/PatternMatchCompilation.fs — FileTooLong — 1107 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 607 over it, 2.21× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: 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.
  • + 19 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×12
  • 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/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/Symbols/Symbols.fs src/Compiler/Oly.Compiler/Symbols/Symbols.fs:1189 — src/Compiler/Oly.Compiler/Symbols/Symbols.fs changed 9 times in last 90 days, max cyclomatic complexity 21 in Symbols.tryActualType at line 1189. 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/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: REDACTED REDACTED:57 — REDACTED 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 -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/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.
D12 · Dependency Hygiene · Deprecated · ×8
  • Deprecated: xunit src/Compiler/Oly.Compiler.Tests/Oly.Compiler.Tests.fsproj:48 — 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.
  • Deprecated: xunit src/Runtime/Targets/DotNet/Oly.Compiler.CIL.Tests/Oly.Targets.DotNet.Tests.fsproj:44 — 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.
  • Deprecated: xunit src/Runtime/Targets/Interpreter/Oly.Runtime.Interpreter.Tests/Oly.Targets.Interpreter.Tests.fsproj:31 — 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.
  • Deprecated: xunit src/Compiler/Oly.Compiler.Workspace.Tests/Oly.Compiler.Workspace.Tests.fsproj:20 — 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.
  • Deprecated: xunit src/Runtime/Oly.Runtime.Tests/Oly.Runtime.Tests.fsproj:21 — 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.
  • Deprecated: xunit src/Emitters/Spirv/Spirv.Tests/Spirv.Tests.fsproj:24 — 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.
  • Deprecated: xunit src/Targets/Spirv/Oly.Runtime.Target.Spirv.Tests/Oly.Targets.Spirv.Tests.fsproj:26 — 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.
  • Deprecated: xunit src/CLI/olylib.Tests/olylib.Tests.fsproj:22 — 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.
D6 · Cohesion (LCOM4) · Low cohesion · ×6
  • Low cohesion: EntitySymbolBuilder (LCOM4 7) src/Compiler/Oly.Compiler/Symbols/SymbolBuilders.fs:9 — EntitySymbolBuilder's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: FunctionSymbol (LCOM4 6) src/Compiler/Oly.Compiler/Symbols/Symbols.fs:2237 — FunctionSymbol's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ClrAssemblyBuilder (LCOM4 6) src/Emitters/DotNet/DotNet.Metadata/MetadataBuilder.fs:447 — ClrAssemblyBuilder's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: StringText (LCOM4 4) src/Compiler/Oly.Compiler.Syntax/Text.fs:239 — StringText's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: OlyRuntime`3 (LCOM4 4) REDACTED:1909 — OlyRuntime`3's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: OlyRuntimeClrEmitter (LCOM4 4) src/Emitters/DotNet/Oly.Emitters.DotNet/Emitter.fs:1795 — OlyRuntimeClrEmitter's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
D3 · God Classes · TooManyMethods · ×5
  • 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.
D30 · Dependency Vulnerabilities · Medium CVE · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D1 · Cyclomatic Complexity · InterpreterFunction.CallWithStackAux (cyclomatic 172) · ×1
  • 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.
D1 · Cyclomatic Complexity · ClrCodeGen.GenOperation (cyclomatic 139) · ×1
  • 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.
D1 · Cyclomatic Complexity · NameResolution.bindValueModifiersAndKindAsMemberFlags (cyclomatic 128) · ×1
  • 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.
D1 · Cyclomatic Complexity · InterpreterFunction.HandleCast (cyclomatic 119) · ×1
  • 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.
D1 · Cyclomatic Complexity · SymbolOperations.UnifyTypes (cyclomatic 104) · ×1
  • 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.
D1 · Cyclomatic Complexity · ILGen.GenCallExpression (cyclomatic 102) · ×1
  • 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.
D1 · Cyclomatic Complexity · WorkspaceExtensions.OlyDocument.GetCompletions (cyclomatic 98) · ×1
  • 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.
D1 · Cyclomatic Complexity · Pass2.bindBindingDeclarationCoreAux (cyclomatic 96) · ×1
  • 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.
D1 · Cyclomatic Complexity · Pass3.bindTypeDeclarationBody (cyclomatic 92) · ×1
  • 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.
D1 · Cyclomatic Complexity · WellKnownFunctions.Validate (cyclomatic 82) · ×1
  • 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.
D1 · Cyclomatic Complexity · Helpers.importTypeDefinitionAsOlyILEntityDefinition (cyclomatic 81) · ×1
  • 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.
D1 · Cyclomatic Complexity · PostInferenceAnalysis.analyzeExpressionAuxAux (cyclomatic 80) · ×1
  • 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.
D1 · Cyclomatic Complexity · OlyBoundModel.GetImmediateSymbols (cyclomatic 74) · ×1
  • 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.
D1 · Cyclomatic Complexity · SpirvTarget.GetAnalyzerDiagnostics (cyclomatic 70) · ×1
  • 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.
D1 · Cyclomatic Complexity · LexerModule.handleNonTriviaPeekAux (cyclomatic 69) · ×1
  • 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.
D1 · Cyclomatic Complexity · extension.activate (cyclomatic 69) · ×1
  • extension.activate (cyclomatic 69) REDACTED:57 — extension.activate has cyclomatic complexity 69 (threshold 15). Most of this is not in the body itself: 4 of the 69 points are its own statements and the rest belongs to 22 function items inside it that branch (refreshProjectStatusBarItemTooltip, handleProgressNotification, a function literal at line 390, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · CopyPropagation.handleExpressionAuxCopyPropagation (cyclomatic 66) · ×1
  • 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.
D1 · Cyclomatic Complexity · Pass1.bindTypeDeclarationBody (cyclomatic 64) · ×1
  • 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.
D1 · Cyclomatic Complexity · BoundTreeRewriteVisitorRunner.Rewrite (cyclomatic 63) · ×1
  • 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.
D1 · Cyclomatic Complexity · BoundTreeRewriter.Rewrite (cyclomatic 61) · ×1
  • 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.
D1 · Cyclomatic Complexity · ILGen.GenExpressionAux (cyclomatic 58) · ×1
  • 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.
D1 · Cyclomatic Complexity · GeneralOptimizer.optimizeExpressionCore (cyclomatic 58) · ×1
  • 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.
D1 · Cyclomatic Complexity · OlyRuntimeClrEmitter.Oly.Runtime.CodeGen.IOlyRuntimeEmitter<Oly.Emitters.DotNet.ClrTypeInfo, Oly.Emitters.DotNet.ClrMethodInfo, Oly.Emitters.DotNet.ClrFieldInfo>.EmitFunctionDefinition (cyclomatic 58) · ×1
  • 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.
D1 · Cyclomatic Complexity · PrettyPrint.printTypeAux (cyclomatic 56) · ×1
  • 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.
D1 · Cyclomatic Complexity · ClrMethodDefinitionBuilder.PopulateMethodBody (cyclomatic 55) · ×1
  • 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.
D1 · Cyclomatic Complexity · Pass4.bindLocalExpressionAuxAux (cyclomatic 53) · ×1
  • 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.
D1 · Cyclomatic Complexity · Substitution.substituteForLambdaLifting (cyclomatic 53) · ×1
  • 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.
D1 · Cyclomatic Complexity · ILGen.emitILTypeAux (cyclomatic 52) · ×1
  • 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.
D1 · Cyclomatic Complexity · NameResolution.bindType (cyclomatic 52) · ×1
  • 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.
D1 · Cyclomatic Complexity · NameResolution.bindTypeConstructor (cyclomatic 52) · ×1
  • 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.
D1 · Cyclomatic Complexity · OlySyntaxDiffs.OlySyntaxTree.AreOpenDeclarationsEqual.Static (cyclomatic 50) · ×1
  • 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.
D1 · Cyclomatic Complexity · CompilerImports.importTypeSymbol (cyclomatic 48) · ×1
  • 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.
D1 · Cyclomatic Complexity · SpirvLowering.LowerOperation (cyclomatic 48) · ×1
  • 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.
D1 · Cyclomatic Complexity · ILGen.GenEntityDefinitionNoCache (cyclomatic 45) · ×1
  • 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.
D1 · Cyclomatic Complexity · ExtensionHelpers.getViewModel (cyclomatic 45) · ×1
  • 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.
D1 · Cyclomatic Complexity · DeadCodeElimination.DeadCodeElimination (cyclomatic 42) · ×1
  • 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.
D1 · Cyclomatic Complexity · OlyRuntimeClrEmitter.Oly.Runtime.CodeGen.IOlyRuntimeEmitter<Oly.Emitters.DotNet.ClrTypeInfo, Oly.Emitters.DotNet.ClrMethodInfo, Oly.Emitters.DotNet.ClrFieldInfo>.EmitTypeDefinitionInfo (cyclomatic 42) · ×1
  • 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.
D1 · Cyclomatic Complexity · NameResolution.bindNameAsItemAux (cyclomatic 41) · ×1
  • 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.
D1 · Cyclomatic Complexity · SpirvCodeGen.GenOperation (cyclomatic 40) · ×1
  • 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.
D1 · Cyclomatic Complexity · SymbolOperations.createFunctionValueSemantic (cyclomatic 39) · ×1
  • 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.
D1 · Cyclomatic Complexity · Helpers.OptimizeImmediateConstantFolding (cyclomatic 39) · ×1
  • 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.
D1 · Cyclomatic Complexity · DotNetTarget.BuildProjectAsync (cyclomatic 39) · ×1
  • 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.
D1 · Cyclomatic Complexity · Symbols.getTypeSymbol (cyclomatic 38) · ×1
  • 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.
D1 · Cyclomatic Complexity · OlyRuntimeClrEmitter.Oly.Runtime.CodeGen.IOlyRuntimeEmitter<Oly.Emitters.DotNet.ClrTypeInfo, Oly.Emitters.DotNet.ClrMethodInfo, Oly.Emitters.DotNet.ClrFieldInfo>.EmitFieldDefinition (cyclomatic 38) · ×1
  • 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.
D1 · Cyclomatic Complexity · WorkspaceExtensions.OlyDocument.TryFindFunctionCallInfo (cyclomatic 37) · ×1
  • 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.
D1 · Cyclomatic Complexity · PostInferenceAnalysis.analyzeBindingInfo (cyclomatic 37) · ×1
  • 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.
D1 · Cyclomatic Complexity · NameResolution.bindLiteral (cyclomatic 37) · ×1
  • 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.
D1 · Cyclomatic Complexity · Scoping.openContentsOfEntityAux (cyclomatic 37) · ×1
  • 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.
D1 · Cyclomatic Complexity · Checker.checkReceiverOfExpression (cyclomatic 37) · ×1
  • 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.
D1 · Cyclomatic Complexity · InlineFunctions.InlineFunctions (cyclomatic 36) · ×1
  • InlineFunctions.InlineFunctions (cyclomatic 36) src/Runtime/Oly.Runtime/Optimizations/InlineFunctions.fs:864 — InlineFunctions.InlineFunctions has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WorkspaceExtensions.OlyDocument.GetDirectiveCompletions (cyclomatic 35) · ×1
  • 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.
D1 · Cyclomatic Complexity · TextDocumentSyncHandler.OmniSharp.Extensions.LanguageServer.Protocol.Document.IHoverHandler.Handle (cyclomatic 35) · ×1
  • 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.
D1 · Cyclomatic Complexity · NameResolution.unescapeTextAux (cyclomatic 34) · ×1
  • 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.
D1 · Cyclomatic Complexity · Solver.solveWitnessesByType (cyclomatic 34) · ×1
  • 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.
D1 · Cyclomatic Complexity · WellKnownExpressions.AddressOfReceiverIfPossibleAux (cyclomatic 34) · ×1
  • 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.
D1 · Cyclomatic Complexity · ILGen.GenFunctionAsILFunctionDefinition (cyclomatic 33) · ×1
  • 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.
D1 · Cyclomatic Complexity · BoundTreeVisitor.VisitExpression (cyclomatic 33) · ×1
  • 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.
D1 · Cyclomatic Complexity · CommonSubexpressionElimination.handleExpressionAuxCse (cyclomatic 33) · ×1
  • 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.
D1 · Cyclomatic Complexity · ClrCodeGen.GenValue (cyclomatic 33) · ×1
  • 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.
D1 · Cyclomatic Complexity · Pass2.bindTopLevelPropertyBinding (cyclomatic 32) · ×1
  • 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.
D1 · Cyclomatic Complexity · RuntimeType.System.IEquatable<Oly.Runtime.CodeGen.InternalTypes.RuntimeType>.Equals (cyclomatic 32) · ×1
  • 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.
D1 · Cyclomatic Complexity · SpirvType.GetDefinitionInstructions (cyclomatic 32) · ×1
  • 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.
D1 · Cyclomatic Complexity · EarlyAttributes.tryAddIntrinsicPrimitivesForEntity (cyclomatic 31) · ×1
  • 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.
D1 · Cyclomatic Complexity · NameResolution.bindConstraint (cyclomatic 31) · ×1
  • 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.
D1 · Cyclomatic Complexity · LexerModule.scanNumericLiteralAux (cyclomatic 31) · ×1
  • 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.
D1 · Cyclomatic Complexity · Helpers.decodeTypedArg (cyclomatic 31) · ×1
  • 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.
D1 · Cyclomatic Complexity · Solver.solveShape (cyclomatic 30) · ×1
  • 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.
D1 · Cyclomatic Complexity · Iterator.VisitExpression (cyclomatic 30) · ×1
  • 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.
D1 · Cyclomatic Complexity · ClrCodeGen.GenExpressionAux (cyclomatic 30) · ×1
  • 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.
D1 · Cyclomatic Complexity · Program.computeInternalNode (cyclomatic 30) · ×1
  • 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.
D1 · Cyclomatic Complexity · Pass0.bindTypeDeclaration (cyclomatic 29) · ×1
  • 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.
D1 · Cyclomatic Complexity · MetadataHelpers.encodeType (cyclomatic 29) · ×1
  • 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.
D1 · Cyclomatic Complexity · Dump.dumpExpression (cyclomatic 28) · ×1
  • 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.
D1 · Cyclomatic Complexity · OlyBoundSubModel.TryGetMatchType (cyclomatic 27) · ×1
  • 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.
D1 · Cyclomatic Complexity · Pass3.bindTypeDeclaration (cyclomatic 27) · ×1
  • 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.
D1 · Cyclomatic Complexity · Checker.checkImplementation (cyclomatic 26) · ×1
  • 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.
D1 · Cyclomatic Complexity · PrettyPrint.printValueAux (cyclomatic 26) · ×1
  • 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.
D1 · Cyclomatic Complexity · RuntimeFunction.VerifyConstraintsCore (cyclomatic 26) · ×1
  • 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.
D1 · Cyclomatic Complexity · Pass4.bindTopLevelBinding (cyclomatic 25) · ×1
  • 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.
D1 · Cyclomatic Complexity · Checker.checkConstructorImplementation (cyclomatic 25) · ×1
  • 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.
D1 · Cyclomatic Complexity · Helpers.hasSideEffectAux (cyclomatic 25) · ×1
  • 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.
D1 · Cyclomatic Complexity · Extensions.BlobBuilder.WriteTypeOfC (cyclomatic 25) · ×1
  • 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.
D1 · Cyclomatic Complexity · EarlyAttributes.bindEarlyAttribute (cyclomatic 24) · ×1
  • 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.
D1 · Cyclomatic Complexity · OpenDeclarations.bindOpenDeclaration (cyclomatic 24) · ×1
  • 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.
D1 · Cyclomatic Complexity · NameResolution.bindIdentifierAsMemberValue (cyclomatic 24) · ×1
  • 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.
D1 · Cyclomatic Complexity · Helpers.getFreeInferenceVariables (cyclomatic 24) · ×1
  • 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.
D1 · Cyclomatic Complexity · ClrCodeGen.GenCall (cyclomatic 24) · ×1
  • 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.
D1 · Cyclomatic Complexity · ClrTypeDefinitionBuilder.Build (cyclomatic 24) · ×1
  • 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.
D1 · Cyclomatic Complexity · BinderEnvironment.SetUnqualifiedValueAux (cyclomatic 23) · ×1
  • 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.
D1 · Cyclomatic Complexity · DotNetTarget.GetAnalyzerDiagnostics (cyclomatic 23) · ×1
  • 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.
D1 · Cyclomatic Complexity · Pass4.checkExhaustiveness (cyclomatic 22) · ×1
  • 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.
D1 · Cyclomatic Complexity · NameResolution.bindIdentifierWithNoReceiverAsFormalItem (cyclomatic 22) · ×1
  • 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.
D1 · Cyclomatic Complexity · Checker.createGeneralizedFunctionTypeParameters (cyclomatic 22) · ×1
  • 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.
D1 · Cyclomatic Complexity · FunctionOverloading.filterFunctionsForOverloadingByWeight (cyclomatic 22) · ×1
  • 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.
D1 · Cyclomatic Complexity · LocalNormalization.handleExpressionAuxNormalizeLocals (cyclomatic 22) · ×1
  • 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.
D1 · Cyclomatic Complexity · Helpers.importMethodDefinitionAsOlyILFunctionDefinition (cyclomatic 22) · ×1
  • 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.
D1 · Cyclomatic Complexity · OlyValueSymbol.IsSimilarTo (cyclomatic 21) · ×1
  • 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.
D1 · Cyclomatic Complexity · Pass4.bindPatternByResolutionItem (cyclomatic 21) · ×1
  • 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.
D1 · Cyclomatic Complexity · Solver.solveConstraint (cyclomatic 21) · ×1
  • 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.
D1 · Cyclomatic Complexity · SymbolOperations.freshenTypeAux (cyclomatic 21) · ×1
  • 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.
D1 · Cyclomatic Complexity · Symbols.tryActualType (cyclomatic 21) · ×1
  • 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.
D1 · Cyclomatic Complexity · WorkspaceExtensions.classifyValueKind (cyclomatic 20) · ×1
  • 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.
D1 · Cyclomatic Complexity · NameResolution.resolveFormalValue (cyclomatic 20) · ×1
  • 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.
D1 · Cyclomatic Complexity · Substitution.substituteForAutoGeneralization (cyclomatic 20) · ×1
  • 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.
D1 · Cyclomatic Complexity · Symbols.actualType (cyclomatic 20) · ×1
  • 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.
D1 · Cyclomatic Complexity · AssertionPropagation.assertionPropagateExpressionAux (cyclomatic 20) · ×1
  • 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.
D1 · Cyclomatic Complexity · Helpers.tryImportFieldDefinitionAsOlyILFieldDefinition (cyclomatic 20) · ×1
  • 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.
D1 · Cyclomatic Complexity · Extensions.ClrTypeDefinitionBuilder.CreateMethodDefinitionBuilderEx (cyclomatic 20) · ×1
  • 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.
D1 · Cyclomatic Complexity · ClrPdbBuilder.BuildSequencePoints (cyclomatic 20) · ×1
  • 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.
D1 · Cyclomatic Complexity · ClrTypeHandle.Equals (cyclomatic 20) · ×1
  • 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.
D1 · Cyclomatic Complexity · SpirvEmitter.Oly.Runtime.CodeGen.IOlyRuntimeEmitter<Oly.Emitters.Spirv.SpirvType, Oly.Emitters.Spirv.SpirvFunction, Oly.Emitters.Spirv.SpirvField>.EmitFunctionDefinition (cyclomatic 20) · ×1
  • 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.
D1 · Cyclomatic Complexity · PostInferenceAnalysis.analyzeTypeAux (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · Checker.checkConstraintsFromCallExpression (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · CompilerImports.retargetEntity (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · SymbolOperations.EntitySymbol.Hierarchy (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · LexerModule.handlePeek (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · ClrCodeGen.getPrimitiveTypeCode (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · TextDocumentSyncHandler.OmniSharp.Extensions.LanguageServer.Protocol.Document.IDocumentSymbolHandler.Handle (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · Pass4.bindItemAsExpression (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · Attributes.bindAttributeExpressionAux (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · NameResolution.checkVirtualUsage (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · Iterator.VisitExpression (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · SymbolOperations.unifyVariadicTypes (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · RuntimeType.Substitute (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · OlySignatureTypeProvider.System.Reflection.Metadata.ISignatureTypeProvider<Oly.Metadata.OlyILType, System.Int32>.GetModifiedType (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · Normalization.NormalizeAndCheck (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · SpirvModuleBuilder.CreateVariableType (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · OlyBoundSubModel.IsUnqualified (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · PostInferenceAnalysis.checkValue (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · Checker.checkTypeConstructorDepthWithType (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · FunctionOverloading.filterFunctionsForOverloadingPhase4 (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · BoundTreeExtensions.BoundTree.ForEachForTooling (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · BoundTreeExtensions.subsumesShapeMembersWith (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · Pass4.bindMemberValueRightSideExpression (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · Symbols.applyType (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · SpirvModuleBuilder.Build (cyclomatic 16) · ×1
  • 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.
D2 · Cognitive Complexity · WorkspaceExtensions.OlyDocument.GetCompletions (cognitive 273) · ×1
  • 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.
D2 · Cognitive Complexity · Pass2.bindBindingDeclarationCoreAux (cognitive 262) · ×1
  • 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.
D2 · Cognitive Complexity · OlyBoundModel.GetImmediateSymbols (cognitive 199) · ×1
  • 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.
D2 · Cognitive Complexity · Pass3.bindTypeDeclarationBody (cognitive 198) · ×1
  • 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.
D2 · Cognitive Complexity · SymbolOperations.UnifyTypes (cognitive 198) · ×1
  • 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.
D2 · Cognitive Complexity · DotNetTarget.BuildProjectAsync (cognitive 193) · ×1
  • 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.
D2 · Cognitive Complexity · NameResolution.bindValueModifiersAndKindAsMemberFlags (cognitive 180) · ×1
  • 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.
D2 · Cognitive Complexity · Helpers.importTypeDefinitionAsOlyILEntityDefinition (cognitive 179) · ×1
  • 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.
D2 · Cognitive Complexity · ClrCodeGen.GenOperation (cognitive 168) · ×1
  • 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.
D2 · Cognitive Complexity · WorkspaceExtensions.OlyDocument.TryFindFunctionCallInfo (cognitive 163) · ×1
  • 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.
D2 · Cognitive Complexity · WellKnownFunctions.Validate (cognitive 162) · ×1
  • 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.
D2 · Cognitive Complexity · ILGen.GenCallExpression (cognitive 151) · ×1
  • 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.
D2 · Cognitive Complexity · PostInferenceAnalysis.analyzeExpressionAuxAux (cognitive 149) · ×1
  • 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.
D2 · Cognitive Complexity · InterpreterFunction.CallWithStackAux (cognitive 147) · ×1
  • 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.
D2 · Cognitive Complexity · SpirvTarget.GetAnalyzerDiagnostics (cognitive 147) · ×1
  • 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.
D2 · Cognitive Complexity · NameResolution.bindTypeConstructor (cognitive 146) · ×1
  • 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.
D2 · Cognitive Complexity · Solver.solveWitnessesByType (cognitive 145) · ×1
  • 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.
D2 · Cognitive Complexity · CopyPropagation.handleExpressionAuxCopyPropagation (cognitive 137) · ×1
  • 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.
D2 · Cognitive Complexity · Pass1.bindTypeDeclarationBody (cognitive 131) · ×1
  • 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.
D2 · Cognitive Complexity · Scoping.openContentsOfEntityAux (cognitive 130) · ×1
  • 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.
D2 · Cognitive Complexity · Substitution.substituteForLambdaLifting (cognitive 130) · ×1
  • 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.
D2 · Cognitive Complexity · OlyRuntimeClrEmitter.Oly.Runtime.CodeGen.IOlyRuntimeEmitter<Oly.Emitters.DotNet.ClrTypeInfo, Oly.Emitters.DotNet.ClrMethodInfo, Oly.Emitters.DotNet.ClrFieldInfo>.EmitFunctionDefinition (cognitive 126) · ×1
  • 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.
D2 · Cognitive Complexity · WorkspaceExtensions.OlyDocument.GetDirectiveCompletions (cognitive 118) · ×1
  • 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.
D2 · Cognitive Complexity · ClrMethodDefinitionBuilder.PopulateMethodBody (cognitive 112) · ×1
  • 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.
D2 · Cognitive Complexity · BoundTreeRewriter.Rewrite (cognitive 111) · ×1
  • 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.
D2 · Cognitive Complexity · BoundTreeRewriteVisitorRunner.Rewrite (cognitive 110) · ×1
  • 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.
D2 · Cognitive Complexity · PostInferenceAnalysis.analyzeBindingInfo (cognitive 101) · ×1
  • 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.
D2 · Cognitive Complexity · Checker.checkConstraintsFromCallExpression (cognitive 99) · ×1
  • 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.
D2 · Cognitive Complexity · WellKnownExpressions.AddressOfReceiverIfPossibleAux (cognitive 96) · ×1
  • 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.
D2 · Cognitive Complexity · NameResolution.unescapeTextAux (cognitive 95) · ×1
  • 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.
D2 · Cognitive Complexity · NameResolution.bindNameAsItemAux (cognitive 93) · ×1
  • 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.
D2 · Cognitive Complexity · Helpers.OptimizeImmediateConstantFolding (cognitive 92) · ×1
  • 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.
D2 · Cognitive Complexity · OlyRuntimeClrEmitter.Oly.Runtime.CodeGen.IOlyRuntimeEmitter<Oly.Emitters.DotNet.ClrTypeInfo, Oly.Emitters.DotNet.ClrMethodInfo, Oly.Emitters.DotNet.ClrFieldInfo>.EmitTypeDefinitionInfo (cognitive 92) · ×1
  • 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.
D2 · Cognitive Complexity · Helpers.importMethodDefinitionAsOlyILFunctionDefinition (cognitive 90) · ×1
  • 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.
D2 · Cognitive Complexity · OpenDeclarations.bindOpenDeclaration (cognitive 83) · ×1
  • 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.
D2 · Cognitive Complexity · Program.computeInternalNode (cognitive 81) · ×1
  • 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.
D2 · Cognitive Complexity · Solver.solveShape (cognitive 79) · ×1
  • 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.
D2 · Cognitive Complexity · SpirvCodeGen.GenOperation (cognitive 78) · ×1
  • 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.
D2 · Cognitive Complexity · BinderEnvironment.SetUnqualifiedValueAux (cognitive 77) · ×1
  • 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.
D2 · Cognitive Complexity · PrettyPrint.printTypeAux (cognitive 76) · ×1
  • 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.
D2 · Cognitive Complexity · ILGen.GenFunctionAsILFunctionDefinition (cognitive 75) · ×1
  • 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.
D2 · Cognitive Complexity · OlyBoundSubModel.TryGetMatchType (cognitive 73) · ×1
  • 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.
D2 · Cognitive Complexity · GeneralOptimizer.optimizeExpressionCore (cognitive 73) · ×1
  • 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.
D2 · Cognitive Complexity · SpirvLowering.LowerOperation (cognitive 73) · ×1
  • 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.
D2 · Cognitive Complexity · NameResolution.bindType (cognitive 72) · ×1
  • 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.
D2 · Cognitive Complexity · NameResolution.bindIdentifierWithNoReceiverAsFormalItem (cognitive 70) · ×1
  • 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.
D2 · Cognitive Complexity · OlyToken.TryPreviousTokenBySubToken (cognitive 69) · ×1
  • 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.
D2 · Cognitive Complexity · OlySignatureTypeProvider.System.Reflection.Metadata.ISignatureTypeProvider<Oly.Metadata.OlyILType, System.Int32>.GetModifiedType (cognitive 68) · ×1
  • 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.
D2 · Cognitive Complexity · CompilerImports.retargetEntity (cognitive 67) · ×1
  • 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.
D2 · Cognitive Complexity · SpirvEmitter.Oly.Runtime.CodeGen.IOlyRuntimeEmitter<Oly.Emitters.Spirv.SpirvType, Oly.Emitters.Spirv.SpirvFunction, Oly.Emitters.Spirv.SpirvField>.EmitFunctionDefinition (cognitive 67) · ×1
  • 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.
D2 · Cognitive Complexity · InlineFunctions.InlineFunctions (cognitive 66) · ×1
  • InlineFunctions.InlineFunctions (cognitive 66) src/Runtime/Oly.Runtime/Optimizations/InlineFunctions.fs:864 — InlineFunctions.InlineFunctions has cognitive complexity 66 (threshold 15). Drivers by points: if/else 19 (34 pts), match/switch 11 (25 pts), boolean chains 7 (nesting depth added 29). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Pass3.bindTypeDeclaration (cognitive 62) · ×1
  • 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.
D2 · Cognitive Complexity · ExtensionHelpers.getViewModel (cognitive 61) · ×1
  • 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.
D2 · Cognitive Complexity · OlyValueSymbol.IsSimilarTo (cognitive 60) · ×1
  • 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.
D2 · Cognitive Complexity · PostInferenceAnalysis.checkValue (cognitive 60) · ×1
  • 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.
D2 · Cognitive Complexity · WorkspaceExtensions.classifyValueKind (cognitive 59) · ×1
  • 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.
D2 · Cognitive Complexity · NameResolution.bindConstraint (cognitive 59) · ×1
  • 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.
D2 · Cognitive Complexity · DeadCodeElimination.DeadCodeElimination (cognitive 59) · ×1
  • 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.
D2 · Cognitive Complexity · FunctionOverloading.filterFunctionsForOverloadingByWeight (cognitive 57) · ×1
  • 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.
D2 · Cognitive Complexity · LexerModule.handleNonTriviaPeekAux (cognitive 57) · ×1
  • 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.
D2 · Cognitive Complexity · RuntimeFunction.VerifyConstraintsCore (cognitive 57) · ×1
  • 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.
D2 · Cognitive Complexity · CommonSubexpressionElimination.handleExpressionAuxCse (cognitive 56) · ×1
  • 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.
D2 · Cognitive Complexity · Pass2.bindTopLevelPropertyBinding (cognitive 55) · ×1
  • 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.
D2 · Cognitive Complexity · ILGen.GenEntityDefinitionNoCache (cognitive 53) · ×1
  • 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.
D2 · Cognitive Complexity · Pass4.checkExhaustiveness (cognitive 53) · ×1
  • 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.
D2 · Cognitive Complexity · SymbolOperations.unifyVariadicTypes (cognitive 53) · ×1
  • 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.
D2 · Cognitive Complexity · NameResolution.checkVirtualUsage (cognitive 51) · ×1
  • 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.
D2 · Cognitive Complexity · PrettyPrint.printValueAux (cognitive 51) · ×1
  • 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.
D2 · Cognitive Complexity · DotNetTarget.GetAnalyzerDiagnostics (cognitive 51) · ×1
  • 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.
D2 · Cognitive Complexity · Symbols.getTypeSymbol (cognitive 50) · ×1
  • 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.
D2 · Cognitive Complexity · ClrCodeGen.GenCall (cognitive 49) · ×1
  • 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.
D2 · Cognitive Complexity · ILGen.GenExpressionAux (cognitive 48) · ×1
  • 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.
D2 · Cognitive Complexity · Checker.checkConstructorImplementation (cognitive 47) · ×1
  • 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.
D2 · Cognitive Complexity · Checker.checkReceiverOfExpression (cognitive 47) · ×1
  • 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.
D2 · Cognitive Complexity · NameResolution.bindIdentifierAsMemberValue (cognitive 46) · ×1
  • 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.
D2 · Cognitive Complexity · OlyWorkspaceResourceSnapshot.GetSourceText (cognitive 45) · ×1
  • OlyWorkspaceResourceSnapshot.GetSourceText (cognitive 45) src/Compiler/Oly.Compiler.Workspace/OlyWorkspace.fs:1099 — OlyWorkspaceResourceSnapshot.GetSourceText has cognitive complexity 45 (threshold 15). Drivers by points: match/switch 8 (36 pts), if/else 4 (6 pts), error handling 1 (3 pts) (nesting depth added 32). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Dump.dumpExpression (cognitive 45) · ×1
  • 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.
D2 · Cognitive Complexity · Pass4.bindTopLevelBinding (cognitive 44) · ×1
  • 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.
D2 · Cognitive Complexity · SymbolOperations.createFunctionValueSemantic (cognitive 44) · ×1
  • 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.
D2 · Cognitive Complexity · Helpers.tryImportFieldDefinitionAsOlyILFieldDefinition (cognitive 44) · ×1
  • 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.
D2 · Cognitive Complexity · SymbolOperations.EntitySymbol.Hierarchy (cognitive 43) · ×1
  • 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.
D2 · Cognitive Complexity · ClrPdbBuilder.BuildSequencePoints (cognitive 43) · ×1
  • 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.
D2 · Cognitive Complexity · Checker.checkImplementation (cognitive 42) · ×1
  • 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.
D2 · Cognitive Complexity · Pass4.bindLocalExpressionAuxAux (cognitive 41) · ×1
  • 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.
D2 · Cognitive Complexity · Checker.checkTypeConstructorDepthWithType (cognitive 41) · ×1
  • 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.
D2 · Cognitive Complexity · OlySyntaxDiffs.OlySyntaxTree.AreOpenDeclarationsEqual.Static (cognitive 41) · ×1
  • 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.
D2 · Cognitive Complexity · ClrCodeGen.GenExpressionAux (cognitive 41) · ×1
  • 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.
D2 · Cognitive Complexity · Pass4.bindPatternByResolutionItem (cognitive 40) · ×1
  • 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.
D2 · Cognitive Complexity · NameResolution.resolveFormalValue (cognitive 40) · ×1
  • 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.
D2 · Cognitive Complexity · Iterator.VisitExpression (cognitive 39) · ×1
  • 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.
D2 · Cognitive Complexity · Attributes.bindAttributes (cognitive 38) · ×1
  • 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.
D2 · Cognitive Complexity · Helpers.hasSideEffectAux (cognitive 38) · ×1
  • 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.
D2 · Cognitive Complexity · TextDocumentSyncHandler.OmniSharp.Extensions.LanguageServer.Protocol.Document.IDocumentSymbolHandler.Handle (cognitive 38) · ×1
  • 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.
D2 · Cognitive Complexity · Solver.solveConstraint (cognitive 37) · ×1
  • 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.
D2 · Cognitive Complexity · OlyRuntimeClrEmitter.Oly.Runtime.CodeGen.IOlyRuntimeEmitter<Oly.Emitters.DotNet.ClrTypeInfo, Oly.Emitters.DotNet.ClrMethodInfo, Oly.Emitters.DotNet.ClrFieldInfo>.EmitFieldDefinition (cognitive 37) · ×1
  • 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.
D2 · Cognitive Complexity · TextDocumentSyncHandler.OmniSharp.Extensions.LanguageServer.Protocol.Document.IHoverHandler.Handle (cognitive 37) · ×1
  • 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.
D2 · Cognitive Complexity · LexerModule.handlePeek (cognitive 36) · ×1
  • 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.
D2 · Cognitive Complexity · SymbolOperations.filterMostSpecificFunctions (cognitive 35) · ×1
  • 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.
D2 · Cognitive Complexity · ClrTypeDefinitionBuilder.Build (cognitive 35) · ×1
  • 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.
D2 · Cognitive Complexity · AssertionPropagation.optimizeAssertionPropagateExpression (cognitive 34) · ×1
  • 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.
D2 · Cognitive Complexity · EarlyAttributes.bindEarlyAttribute (cognitive 33) · ×1
  • 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.
D2 · Cognitive Complexity · EarlyAttributes.tryAddIntrinsicPrimitivesForEntity (cognitive 33) · ×1
  • 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.
D2 · Cognitive Complexity · SymbolQuery.canAccessValue (cognitive 33) · ×1
  • 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.
D2 · Cognitive Complexity · TextDocumentSyncHandler.OmniSharp.Extensions.LanguageServer.Protocol.Document.ICodeLensHandler.Handle (cognitive 33) · ×1
  • 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.
D2 · Cognitive Complexity · BinderEnvironment.AddUnqualifiedType (cognitive 32) · ×1
  • 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.
D2 · Cognitive Complexity · Substitution.substituteValue (cognitive 32) · ×1
  • 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.
D2 · Cognitive Complexity · SpirvModuleBuilder.CreateVariableType (cognitive 32) · ×1
  • 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.
D2 · Cognitive Complexity · Pass4.bindLocalValueDeclaration (cognitive 30) · ×1
  • 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.
D2 · Cognitive Complexity · Attributes.bindAttributeExpressionAux (cognitive 30) · ×1
  • 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.
D2 · Cognitive Complexity · FunctionOverloading.filterFunctionsForOverloadingPhase4 (cognitive 30) · ×1
  • 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.
D2 · Cognitive Complexity · SymbolOperations.solveHigherInferenceVariable (cognitive 30) · ×1
  • 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.
D2 · Cognitive Complexity · Checker.createGeneralizedFunctionTypeParameters (cognitive 29) · ×1
  • 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.
D2 · Cognitive Complexity · BoundTreeExtensions.subsumesShapeMembersWith (cognitive 29) · ×1
  • 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.
D2 · Cognitive Complexity · SymbolQuery.canAccessEntity (cognitive 29) · ×1
  • 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.
D2 · Cognitive Complexity · SymbolOperations.freshenValueAux (cognitive 29) · ×1
  • 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.
D2 · Cognitive Complexity · LocalNormalization.handleExpressionAuxNormalizeLocals (cognitive 29) · ×1
  • 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.
D2 · Cognitive Complexity · MetadataHelpers.encodeType (cognitive 29) · ×1
  • 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.
D2 · Cognitive Complexity · Solver.solveWitnessesByTypeParameter (cognitive 28) · ×1
  • 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.
D2 · Cognitive Complexity · Iterator.VisitExpression (cognitive 28) · ×1
  • 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.
D2 · Cognitive Complexity · SymbolOperations.areShapesEqualWith (cognitive 28) · ×1
  • 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.
D2 · Cognitive Complexity · AssertionPropagation.assertionPropagateExpressionAux (cognitive 28) · ×1
  • 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.
D2 · Cognitive Complexity · OlySymbolUseInfo.TryGetAliasedType (cognitive 27) · ×1
  • 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.
D2 · Cognitive Complexity · BoundTreeVisitor.VisitExpression (cognitive 27) · ×1
  • 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.
D2 · Cognitive Complexity · NameResolution.bindConstraintClause (cognitive 26) · ×1
  • 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.
D2 · Cognitive Complexity · SymbolOperations.freshenTypeAux (cognitive 26) · ×1
  • 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.
D2 · Cognitive Complexity · RuntimeType.Substitute (cognitive 26) · ×1
  • 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.
D2 · Cognitive Complexity · Extensions.ClrTypeDefinitionBuilder.CreateMethodDefinitionBuilderEx (cognitive 26) · ×1
  • 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.
D2 · Cognitive Complexity · TextDocumentSyncHandler.OmniSharp.Extensions.LanguageServer.Protocol.Document.ISignatureHelpHandler.Handle (cognitive 26) · ×1
  • 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.
D2 · Cognitive Complexity · TextDocumentSyncHandler.OmniSharp.Extensions.JsonRpc.IJsonRpcRequestHandler<LanguageServer.OlyGetIRRequest, System.String>.Handle (cognitive 26) · ×1
  • 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.
D2 · Cognitive Complexity · Pass0.bindTypeDeclaration (cognitive 25) · ×1
  • 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.
D2 · Cognitive Complexity · Substitution.substituteLiteral (cognitive 25) · ×1
  • 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.
D2 · Cognitive Complexity · CompilerImports.retargetType (cognitive 25) · ×1
  • 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.
D2 · Cognitive Complexity · Pass4.bindMemberValueRightSideExpression (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · Checker.checkLetBindingDeclarationAndAutoGeneralize (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · Solver.inferTypeArgumentFromTypeParameterConstraints (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · BoundTreeExtensions.forEachConstraintBySyntaxConstraintClause (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · Symbols.applyType (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · Symbols.stripTypeEquations_InferenceVariable (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · OlyPath.ContainsDirectoryOrFile (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · Program.computePublicNode (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · Pass4.bindPattern (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · NameResolution.bindLiteral (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · SymbolOperations.filterMostSpecificProperties (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · OlyRuntimeClrEmitter.Oly.Runtime.CodeGen.IOlyRuntimeEmitter<Oly.Emitters.DotNet.ClrTypeInfo, Oly.Emitters.DotNet.ClrMethodInfo, Oly.Emitters.DotNet.ClrFieldInfo>.EmitTypeDefinition (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · OlyTargetOutputOnly`4.BuildProjectAsync (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · SpirvLowering.TryPostOrderLowerOperationExpression (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · CompilationPhases.checkDuplications (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · ILGen.emitILTypeAux (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · PostInferenceAnalysis.analyzeTypeEntityAccessibility (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · Pass2.createInstanceFunctionParameters (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · Pass0.bindTypeDeclarationBody (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · ImplicitRules.tryImplicitArguments (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · Substitution.substituteForAutoGeneralization (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · BoundTreePatterns.|LoadFunctionPtrOfLambdaWrappedFunctionCall|_| (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · SymbolQuery.filterFunctions (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · SymbolOperations.IFunctionSymbol.IsOverriding (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · BinderEnvironment.AddTypeExtension (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · FunctionOverloading.filterFunctionsForOverloadingPhase3 (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · ImplicitRules.tryMorphArgumentImplicit (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · PrettyPrint.printValueName (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · PrettyPrint.printMember (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · Symbols.tryActualType (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · Helpers.hasReadOnlyAttribute (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · Helpers.hasIsByRefLikeAttribute (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · ClrCodeGen.getPrimitiveTypeCode (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · InterpreterFunction.HandleCast (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · TextDocumentSyncHandler.OmniSharp.Extensions.LanguageServer.Protocol.Document.ICompletionHandler.Handle (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · ILGen.GenFieldAsILFieldDefinition (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · ILGen.GenLetExpression (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · Pass4.bindItemAsExpression (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · Checking.checkBindingImplementation (cognitive 20) · ×1
  • Checking.checkBindingImplementation (cognitive 20) src/Compiler/Oly.Compiler/Binder/Checking.fs:100 — Checking.checkBindingImplementation has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NameResolution.tryBindIdentifierAsValueForExpression (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · NameResolution.bindTypeArguments (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · Checker.checkExpressionType (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · Checker.checkParameter (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · BoundExpression.RewriteReturningTargetExpression (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · Symbols.stripTypeEquations_Tuple (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · OlyAttributeTypeProvider.System.Reflection.Metadata.ICustomAttributeTypeProvider<Oly.Metadata.OlyILType>.IsSystemType (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · OlyRuntimeClrEmitter.Oly.Runtime.CodeGen.IOlyRuntimeEmitter<Oly.Emitters.DotNet.ClrTypeInfo, Oly.Emitters.DotNet.ClrMethodInfo, Oly.Emitters.DotNet.ClrFieldInfo>.EmitProperty (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · ClrMethodDefinitionBuilder.Build (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · Normalization.NormalizeAndCheck (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · SpirvType.GetDefinitionInstructions (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · OlyTypeSymbol.TryGetPackedSizeInBytes (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · PostInferenceAnalysis.analyzeAddressOf (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · Pass4.tryGetCallParameterlessBaseCtorExpression (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · SymbolQuery.queryHierarchicalValuesOfEntity (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · SymbolQuery.queryFreeTypeParametersFromType (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · OlySyntaxTreeExtensions.OlySyntaxNode.FindTokens (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · OlySyntaxTreeExtensions.OlySyntaxNode.TryGetBindingDeclaration (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · OlySyntaxTreeView.register (cognitive 19) · ×1
  • 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). None of this is in the body itself: all 19 points belong to 3 function items inside it that branch (getSyntaxTreeCommandHandler, navigateToSyntaxNodeCommandHandler, getSyntaxTreeCommandHandler::find). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · OlyBoundSubModel.IsUnqualified (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · Pass4.bindInitializer (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · Pass3.ForEachBinding (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · NameResolution.bindValueAsCallExpression (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · Scoping.scopeInEntityAux (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · BinderEnvironment.SetUnqualifiedType (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · CompilerImports.importTypeSymbol (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · OlyToken.TryNextToken (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · LexerModule.parseConditionalDirective (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · AssertionPropagation.tryGetAssertionKeyAndValue (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · ILGen.GenValueExpression (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · PostInferenceAnalysis.analyzeTypeAux (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · Pass4.bindParenthesisExpression (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · Pass4.bindElseIfOrElseExpression (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · Pass2.bindTopLevelBinding (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · NameResolution.bindIdentifierWithReceiverNamespaceAsFormalItem (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · BoundTreeExtensions.BoundTree.ForEachForTooling (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · CompilerImports.importEntityFlags (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · SymbolOperations.subsumesTypeWith (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · Symbols.assertNoForAllTypes (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · OlyToken.TryPreviousToken (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · LexerModule.scanNumericLiteralAux (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · LocalNormalization.handleLinearExpression (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · DotNet.getBuildInfo (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · Helpers.decodeTypedArg (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · ClrCodeGen.isByRefLike (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · MetadataHelpers.encodeReturnType (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · SpirvModuleBuilder.CreateVariable (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · OlySyntaxTreeView.findOlySyntaxNodeTokenViewModelByPosition (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · extension.activate · ×1
  • extension.activate::refreshProjectStatusBarItemTooltip (cognitive 17) REDACTED:275 — extension.activate::refreshProjectStatusBarItemTooltip has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · OlyBoundModel.TryGetWhitespaceSubModel (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · PostInferenceAnalysis.analyzeTraitConstraintTypeInVirtualImplementation (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · Pass2.bindTypeDeclarationCases (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · ImplicitRules.ImplicitArgumentsForFunction (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · SymbolOperations.TypeSymbol.Hierarchy (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · Symbols.actualType (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · VariableSolutionSymbol.SetSolution (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · OlySyntaxTreeExtensions.OlySyntaxTree.TryFindNode (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · LexerModule.scanStringLiteral (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · SyntaxSeparatorList`1.Oly.Compiler.Syntax.Internal.ISyntaxSeparatorList.TryFindIndexByRelativePosition (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · Dump.DumpOperation (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · Oly.CleanProject (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · SpirvLowering.LowerLinearExpression (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · TextDocumentSyncHandler.OmniSharp.Extensions.LanguageServer.Protocol.Document.IDocumentOnTypeFormattingHandler.Handle (cognitive 16) · ×1
  • 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D3 · God Classes · FunctionTooLong · ×1
  • FunctionTooLong: extension.activate REDACTED: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.
D3 · God Classes · TooManyFunctions · ×1
  • 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.
GD1 · Unfinished & placeholder code · Unfinished stub · ×1
  • Unfinished stub — raises a "not implemented" error src/Emitters/Spirv/Oly.Emitters.Spirv/SpirvModuleBuilder.fs:1021 — A shipped binding's whole body still raises a "not implemented" error — generated scaffolding that was never completed. Implement it or remove the dead surface.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×1
  • Sync-over-async blocking src/LanguageServer/Oly.LanguageServer/LanguageServer.fs:2035 — `Handle` is async and calls Task.WaitAny — a blocking call inside async code stalls the thread-pool thread the workflow runs on, and every continuation queued behind it for as long as it runs.
R10 · Code Duplication · Duplicated block (20 lines × 2 locations) · ×1
  • 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.
R10 · Code Duplication · Duplicated block (12 lines × 2 locations) · ×1
  • 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.
R10 · Code Duplication · Duplicated block (10 lines × 2 locations) · ×1
  • 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.
R2 · Cyclomatic Complexity · Complex function refreshProjectStatusBarItemTooltip (cyclomatic 15, cognitive 19) · ×1
  • Complex function refreshProjectStatusBarItemTooltip (cyclomatic 15, cognitive 19) REDACTED: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.
R2 · Cyclomatic Complexity · Complex function findOlySyntaxNodeTokenViewModelByPosition (cyclomatic 13, cognitive 17) · ×1
  • 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.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 463 lines of code REDACTED:1 — REDACTED has 463 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
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.
Minor — 20 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×6
  • Duplicated predicate src/Compiler/Oly.Compiler/Binder/Pass1.fs:299 — `canOpen && enclosing.IsNamespaceOrModule` appears character-identically in 2 files — src/Compiler/Oly.Compiler/Binder/Pass1.fs, src/Compiler/Oly.Compiler/Binder/Pass3.fs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/Compiler/Oly.Compiler/Binder/Pass2.fs:1369 — `entBuilder.Entity.IsExported && not env.isInExport` appears character-identically in 2 files — src/Compiler/Oly.Compiler/Binder/Pass2.fs, src/Compiler/Oly.Compiler/Binder/Pass4.fs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/Compiler/Oly.Compiler/CompilerImports.fs:1496 — `not returnTy.IsError_ste && returnTy.IsTypeConstructor_steea` appears character-identically in 2 files — src/Compiler/Oly.Compiler/CompilerImports.fs, src/Compiler/Oly.Compiler/Symbols/Symbols.fs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/Compiler/Oly.Compiler/Symbols/Symbols.fs:5779 — `not this.TypeParameters.IsEmpty && this.IsFormal` appears character-identically in 2 files — src/Compiler/Oly.Compiler/Symbols/Symbols.fs, src/Runtime/Oly.Runtime/InternalCodeGenTypes.fs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/Compiler/Oly.Compiler/Lowering/PatternMatchCompilation.fs:56 — `value.HasLocalEnclosing && not value.IsFunction` appears character-identically in 2 files — src/Compiler/Oly.Compiler/Lowering/PatternMatchCompilation.fs, src/Compiler/Oly.Compiler/Substitution.fs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/Compiler/Oly.Compiler/PublicAPI/PublicSymbols.fs:85 — `value1.IsFunctionGroup || value2.IsFunctionGroup` appears character-identically in 2 files — src/Compiler/Oly.Compiler/PublicAPI/PublicSymbols.fs, src/Compiler/Oly.Compiler/Symbols/SymbolOperations.fs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
D12 · Dependency Hygiene · Outdated · ×1
  • Outdated: coverlet.collector src/CLI/olylib.Tests/olylib.Tests.fsproj:17 — coverlet.collector 6.0.4 → 10.1.0 available (referenced by Oly.Compiler.Tests).
D12 · Dependency Hygiene · Deprecated · ×1
  • Deprecated: glob REDACTED:1634 — glob 10.5.0 is resolved in REDACTED and is marked deprecated by its publisher: "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found src/CLI/oly_bootstrap/oly_bootstrap.fsproj:4 — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `src/CLI/oly_bootstrap/oly_bootstrap.fsproj` makes this repository a deployable product (line 4).
D21 · Naming Consistency · `CodePrefixOLY` spells `OLY` where 28 names in the project spell it `Oly` · ×1
  • `CodePrefixOLY` spells `OLY` where 28 names in the project spell it `Oly` src/Compiler/Oly.Compiler.Syntax/SyntaxTree.fs:43 — 28 of 29 names in project Oly.Benchmarks spell the token `Oly` (28 of 29; unit: names in project Oly.Benchmarks containing `Oly`). Peers: Oly.Compiler.Text.IOlySourceText (src/Compiler/Oly.Compiler.Syntax/Text.fs:120); Oly.Compiler.Workspace.IOlyWorkspaceProgress (src/Compiler/Oly.Compiler.Workspace/OlyWorkspace.fs:1286); LanguageServer.IOlyDocumentRequest`1 (src/LanguageServer/Oly.LanguageServer/LanguageServer.fs:221); Oly.Runtime.CodeGen.IOlyVirtualMachine`3 (src/Runtime/Oly.Runtime/IOlyRuntimeEmitter.fs:21); Oly.Runtime.CodeGen.IOlyRuntimeEmitter`3 (src/Runtime/Oly.Runtime/IOlyRuntimeEmitter.fs:33). Rename to `CodePrefixOly`. [rule N6]
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 2 of 22 project(s) overshoot their size bounds, lowering Project Cohesion to 8.2/10. The most over is `src/Compiler/Oly.Compiler` (38332 LoC, 251 module-visible types across 5 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Low CVE · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
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.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 5/8 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `src/Compiler/Oly.Compiler.SyntaxGenerator`, `src/Emitters/Spirv/Spirv.ApiGenerator`, `src/Targets/Spirv/Oly.Runtime.Target.Spirv.Tests`.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST REDACTED:6 — 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 3 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.
P3 · Security & performance tooling · No dependency-update automation · ×1
  • No dependency-update automation src/Benchmarks/Oly.Benchmarks/Oly.Benchmarks.fsproj:17 — `src/Benchmarks/Oly.Benchmarks/Oly.Benchmarks.fsproj` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
X5 · Nullable reference types · Nullable reference types not enabled everywhere · ×1
  • 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.
Minor — 11 finding(s)
D12 · Dependency Hygiene · Outdated · ×11
  • Outdated: FSharp.Core — FSharp.Core 10.1.400 → 11.0.101 available (referenced by Oly.Compiler).
  • Outdated: Microsoft.Extensions.ObjectPool — Microsoft.Extensions.ObjectPool 10.0.8 → 11.0.0 available (referenced by Oly.Compiler).
  • Outdated: Microsoft.NET.Test.Sdk — Microsoft.NET.Test.Sdk 18.0.1 → 18.12.0 available (referenced by Oly.Compiler.Tests).
  • Outdated: xunit.runner.visualstudio — xunit.runner.visualstudio 3.1.5 → 4.0.1 available (referenced by Oly.Compiler.Tests).
  • Outdated: Microsoft.Build.Tasks.Core — Microsoft.Build.Tasks.Core 18.0.2 → 18.12.2 available (referenced by Oly.Targets.DotNet).
  • Outdated: Microsoft.CodeAnalysis.CSharp.Workspaces — Microsoft.CodeAnalysis.CSharp.Workspaces 5.0.0 → 5.12.0 available (referenced by Oly.Targets.DotNet).
  • Outdated: Microsoft.CodeAnalysis.Workspaces.MSBuild — Microsoft.CodeAnalysis.Workspaces.MSBuild 5.0.0 → 5.12.0 available (referenced by Oly.Targets.DotNet).
  • Outdated: OmniSharp.Extensions.LanguageServer — OmniSharp.Extensions.LanguageServer 0.19.9 → 0.19.11 available (referenced by Oly.LanguageServer).
  • 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 → 11.0.0 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.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-8ae2e63d48074cf085810cf220715971/history.json --exit-code 0 --source .1artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-8ae2e63d48074cf085810cf220715971/tree.json --exit-code 0 --source .1artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .7artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesdotnet—dotnet list Oly.sln package --vulnerable --include-transitive --format json12artifacts/raw/dotnet-vulnerable.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.0—
D37 · Vulnerability-disclosure Policydisclosure—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.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—

Run 01a1df44-aee2-7faf-8802-02865862303e · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md