Public report of icsharpcode/ILSpy, published 23 October 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). Watchdog signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 23 October 2026, 07:47 UTC · Survey ID cd_172166ed5a324196b23ca2b5a55059f2
icsharpcode/ILSpy
Measured 23 October 2026, 07:36 UTC, at code version c08aab3
A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.
Test reliability is not measured: No test run produced results.
Boundary Type-Coupling is not measured: Bounded contexts not declared.
IL efficiency is not measured: The target did not build.
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
Down 4 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 239,969 lines of product code in 20 projects, tests not counted · Estimated rebuild effort: about 9.2 person-years · Weakest lens: Code Health, 57
Findings by how serious they are
186 critical1651 serious139 minor
6 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
23 October 2026, 07:36 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds Watchdog. It is open to any tool that
implements it, and today Watchdog is the only one that does.
The score is deterministic, which means the same code always gets the same score. Watchdog works it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
72of 77 dimensions measured by tools. The other 5 are advisory notes from an AI model, which explain the code but don't count towards the score.
1952of 1976 findings point to an exact file and line, so you can open each one in the code. The other 24 concern the repository as a whole, such as missing documentation.
77dimensions across 6 lenses, read from 239,969 lines of product code in 20 projects.
icsharpcode/ILSpy scores 62 out of 100 and is rated Adequate, while four of its six lenses score higher still: Architecture at 97, rated Exemplary, and Security and Compliance at 73, Maturity at 69 and Production Readiness at 66, all rated Adequate.
The score is lower than those four because the weakest lens counts most, and here that is Code Health, which scores 57 and is rated Adequate. Its Cognitive Complexity dimension scores 3.6 out of 10, and until that reaches 4, Code Health can't be rated higher than Adequate. The first actions are to resolve the 37 EmptyCatchBlock finding(s) in Explicit Debt and to resolve the 42 WriteOnlyPrivateField finding(s) in Explicit Debt, and if Code Health rose to 70, the score would rise from 62 to about 65.
186 findings are critical: 116 in Explicit Debt, 55 in Static Analysis (SAST), seven in Secrets (history), four in Project dependency cycles, two in REDACTED Scanning, one in Knowledge Freshness and one in Security & performance tooling.
Watchdog couldn't measure 5 dimensions in this code, among them Code Coverage, Dependency Hygiene and Structured logging, so they are left out of the score. The product code is 239,969 lines, which would take an estimated 9.2 person-years, around €1,300,000, to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Code Health rose from 57 to 70, the lowest score rated Strong, the score would rise from 62 to about 65.
Code composition: what the lines of code are
Business logic 36%Supporting code 25%Tests 38%Generated by tools 1%Code analyzers 0%
New since the last survey: 193 findings
These 193 critical or serious findings weren't in the previous survey, on 9 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
Cancellation propagation · Async method without CancellationToken: ResolveAsync ICSharpCode.Decompiler/Metadata/UniversalAssemblyResolver.cs
Cancellation propagation · Async method without CancellationToken: ResolveModuleAsync ICSharpCode.Decompiler/Metadata/UniversalAssemblyResolver.cs
Cancellation propagation · Async method without CancellationToken: CreateAsync ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs
Cancellation propagation · Async method without CancellationToken: InitializeAsync ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs
Cancellation propagation · Async method without CancellationToken: RepairCyclicTypeForwardersAsync ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs
Cancellation propagation · Async method without CancellationToken: FollowChainNextToForwardersAsync ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs
Cancellation propagation · Async method without CancellationToken: InitializeCoreAsync ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs
Cancellation propagation · Async method without CancellationToken: CheckForPackageUpdateAsync ICSharpCode.ILSpyCmd/DotNetToolUpdateChecker.cs
Cancellation propagation · Async method without CancellationToken: OnExecuteAsync ICSharpCode.ILSpyCmd/IlspyCmdProgram.cs
Cancellation propagation · Async method without CancellationToken: TryGetModuleAsync ICSharpCode.ILSpyX/AssemblyListSnapshot.cs
Cancellation propagation · Async method without CancellationToken: TryGetSimilarModuleAsync ICSharpCode.ILSpyX/AssemblyListSnapshot.cs
Watchdog compares every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 47 findings
These 47 critical or serious findings were in the previous survey, on 9 October 2026, and are gone from this one.
€440,000 to €2,300,000, for 7,263 to 23,786 hours of work, about 9.2 person-years for 5 to 18 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.8 at a score of 62. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Large: 239,969 lines of product code
Comment lines
The estimate prices 186,491 lines. Comment lines count towards the size of 239,969 lines but aren't priced as work.
How the estimate is made: Watchdog prices the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty.
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 37 EmptyCatchBlock finding(s) in Explicit Debt — start with ShellHelper.cs (3), IdStringProvider.cs (2), LoadedAssembly.cs (2).
Raises the score by about 4 points · Medium effort · Explicit Debt
2
Resolve the 42 WriteOnlyPrivateField finding(s) in Explicit Debt — start with InitializerTests.cs (8), Issue3598.cs (7), Generics.cs (6).
Raises the score by about 4 points · Medium effort · Explicit Debt
3
Resolve the 16 FileScopedPragmaDisable finding(s) in Explicit Debt — start with LambdaOptionalAndParamsParameters.cs (2), CustomTaskType.cs (2), CSharpAmbienceTests.cs.
Raises the score by about 4 points · Medium effort · Explicit Debt
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 €1,300,000 to build again, about 9.2 person-years of work. Its weakest lens is Code Health, at 57 (Adequate). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Resolve the 37 EmptyCatchBlock finding(s) in Explicit Debt. Of all the actions in this report, it raises the score most for the work it takes: about 4 points for medium effort, because it clears the 37 Explicit Debt 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 7.0 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 2% to 5% on every change. The history of the code shows how much it changes: about 88,775 lines over the last 90 days, which is about 360,032 lines a year. At that pace, the extra work comes to an estimated 21.8 to 130.8 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways — a layering smell or cycle. A clean layered graph has none.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
96 modules, with 426 dependencies between them. 4 loops run through 43 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 56 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.
Decompiler.DebugInfo uses Decompiler.Util, so a change to Decompiler.Util can break Decompiler.DebugInfo, while a change to Decompiler.DebugInfo can't break Decompiler.Util.
Position
Below the diagonal: Decompiler.DebugInfo uses a module listed above it, which is the healthy direction.
3→11 Decompiler.DebugInfo uses Decompiler.ILpart of a loop✕
Connections
3 pairs of types, where a type in Decompiler.DebugInfo uses a type in Decompiler.IL.
Decompiler.DebugInfo uses Decompiler.IL, so a change to Decompiler.IL can break Decompiler.DebugInfo, while a change to Decompiler.DebugInfo can't break Decompiler.IL.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
3→13 Decompiler.DebugInfo uses Decompiler.CSharp.Syntaxpart of a loop✕
Connections
21 pairs of types, where a type in Decompiler.DebugInfo uses a type in Decompiler.CSharp.Syntax.
Decompiler.DebugInfo uses Decompiler.CSharp.Syntax, so a change to Decompiler.CSharp.Syntax can break Decompiler.DebugInfo, while a change to Decompiler.DebugInfo can't break Decompiler.CSharp.Syntax.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
3→16 Decompiler.DebugInfo uses Decompiler.CSharppart of a loop✕
Connections
1 pair of types, where a type in Decompiler.DebugInfo uses a type in Decompiler.CSharp.
Decompiler.DebugInfo uses Decompiler.CSharp, so a change to Decompiler.CSharp can break Decompiler.DebugInfo, while a change to Decompiler.DebugInfo can't break Decompiler.CSharp.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
3→17 Decompiler.DebugInfo uses Decompilerpart of a loop✕
Connections
2 pairs of types, where a type in Decompiler.DebugInfo uses a type in Decompiler.
Decompiler.DebugInfo uses Decompiler, so a change to Decompiler can break Decompiler.DebugInfo, while a change to Decompiler.DebugInfo can't break Decompiler.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
3→18 Decompiler.DebugInfo uses Decompiler.TypeSystempart of a loop✕
Connections
1 pair of types, where a type in Decompiler.DebugInfo uses a type in Decompiler.TypeSystem.
Decompiler.DebugInfo uses Decompiler.TypeSystem, so a change to Decompiler.TypeSystem can break Decompiler.DebugInfo, while a change to Decompiler.DebugInfo can't break Decompiler.TypeSystem.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
3→19 Decompiler.DebugInfo uses Decompiler.Metadatapart of a loop✕
Connections
1 pair of types, where a type in Decompiler.DebugInfo uses a type in Decompiler.Metadata.
Decompiler.DebugInfo uses Decompiler.Metadata, so a change to Decompiler.Metadata can break Decompiler.DebugInfo, while a change to Decompiler.DebugInfo can't break Decompiler.Metadata.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
4→18 Decompiler.Output uses Decompiler.TypeSystempart of a loop✕
Connections
2 pairs of types, where a type in Decompiler.Output uses a type in Decompiler.TypeSystem.
Decompiler.Output uses Decompiler.TypeSystem, so a change to Decompiler.TypeSystem can break Decompiler.Output, while a change to Decompiler.Output can't break Decompiler.TypeSystem.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Decompiler.TypeSystem.Implementation uses Decompiler.Util, so a change to Decompiler.Util can break Decompiler.TypeSystem.Implementation, while a change to Decompiler.TypeSystem.Implementation can't break Decompiler.Util.
Position
Below the diagonal: Decompiler.TypeSystem.Implementation uses a module listed above it, which is the healthy direction.
5→18 Decompiler.TypeSystem.Implementation uses Decompiler.TypeSystempart of a loop✕
Connections
434 pairs of types, where a type in Decompiler.TypeSystem.Implementation uses a type in Decompiler.TypeSystem. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Decompiler.TypeSystem.Implementation uses Decompiler.TypeSystem, so a change to Decompiler.TypeSystem can break Decompiler.TypeSystem.Implementation, while a change to Decompiler.TypeSystem.Implementation can't break Decompiler.TypeSystem.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
5→19 Decompiler.TypeSystem.Implementation uses Decompiler.Metadatapart of a loop✕
Connections
1 pair of types, where a type in Decompiler.TypeSystem.Implementation uses a type in Decompiler.Metadata.
Decompiler.TypeSystem.Implementation uses Decompiler.Metadata, so a change to Decompiler.Metadata can break Decompiler.TypeSystem.Implementation, while a change to Decompiler.TypeSystem.Implementation can't break Decompiler.Metadata.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
6→28 ILSpy.Util uses ILSpy.ViewModelspart of a loop✕
Connections
1 pair of types, where a type in ILSpy.Util uses a type in ILSpy.ViewModels.
Decompiler.CSharp.OutputVisitor uses Decompiler.Output, so a change to Decompiler.Output can break Decompiler.CSharp.OutputVisitor, while a change to Decompiler.CSharp.OutputVisitor can't break Decompiler.Output.
Position
Below the diagonal: Decompiler.CSharp.OutputVisitor uses a module listed above it, which is the healthy direction.
7→13 Decompiler.CSharp.OutputVisitor uses Decompiler.CSharp.Syntaxpart of a loop✕
Connections
205 pairs of types, where a type in Decompiler.CSharp.OutputVisitor uses a type in Decompiler.CSharp.Syntax. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Decompiler.CSharp.OutputVisitor uses Decompiler.CSharp.Syntax, so a change to Decompiler.CSharp.Syntax can break Decompiler.CSharp.OutputVisitor, while a change to Decompiler.CSharp.OutputVisitor can't break Decompiler.CSharp.Syntax.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
7→18 Decompiler.CSharp.OutputVisitor uses Decompiler.TypeSystempart of a loop✕
Connections
7 pairs of types, where a type in Decompiler.CSharp.OutputVisitor uses a type in Decompiler.TypeSystem.
Decompiler.CSharp.OutputVisitor uses Decompiler.TypeSystem, so a change to Decompiler.TypeSystem can break Decompiler.CSharp.OutputVisitor, while a change to Decompiler.CSharp.OutputVisitor can't break Decompiler.TypeSystem.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Decompiler.Disassembler uses Decompiler.Util, so a change to Decompiler.Util can break Decompiler.Disassembler, while a change to Decompiler.Disassembler can't break Decompiler.Util.
Position
Below the diagonal: Decompiler.Disassembler uses a module listed above it, which is the healthy direction.
Decompiler.Disassembler uses Decompiler.DebugInfo, so a change to Decompiler.DebugInfo can break Decompiler.Disassembler, while a change to Decompiler.Disassembler can't break Decompiler.DebugInfo.
Position
Below the diagonal: Decompiler.Disassembler uses a module listed above it, which is the healthy direction.
8→17 Decompiler.Disassembler uses Decompilerpart of a loop✕
Connections
6 pairs of types, where a type in Decompiler.Disassembler uses a type in Decompiler.
Decompiler.Disassembler uses Decompiler, so a change to Decompiler can break Decompiler.Disassembler, while a change to Decompiler.Disassembler can't break Decompiler.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
8→19 Decompiler.Disassembler uses Decompiler.Metadatapart of a loop✕
Connections
16 pairs of types, where a type in Decompiler.Disassembler uses a type in Decompiler.Metadata.
Decompiler.Disassembler uses Decompiler.Metadata, so a change to Decompiler.Metadata can break Decompiler.Disassembler, while a change to Decompiler.Disassembler can't break Decompiler.Metadata.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Decompiler.IL.ControlFlow uses Decompiler.Util, so a change to Decompiler.Util can break Decompiler.IL.ControlFlow, while a change to Decompiler.IL.ControlFlow can't break Decompiler.Util.
Position
Below the diagonal: Decompiler.IL.ControlFlow uses a module listed above it, which is the healthy direction.
Decompiler.IL.ControlFlow uses Decompiler.DebugInfo, so a change to Decompiler.DebugInfo can break Decompiler.IL.ControlFlow, while a change to Decompiler.IL.ControlFlow can't break Decompiler.DebugInfo.
Position
Below the diagonal: Decompiler.IL.ControlFlow uses a module listed above it, which is the healthy direction.
9→10 Decompiler.IL.ControlFlow uses Decompiler.IL.Transformspart of a loop✕
Connections
23 pairs of types, where a type in Decompiler.IL.ControlFlow uses a type in Decompiler.IL.Transforms.
Decompiler.IL.ControlFlow uses Decompiler.IL.Transforms, so a change to Decompiler.IL.Transforms can break Decompiler.IL.ControlFlow, while a change to Decompiler.IL.ControlFlow can't break Decompiler.IL.Transforms.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
9→11 Decompiler.IL.ControlFlow uses Decompiler.ILpart of a loop✕
Connections
96 pairs of types, where a type in Decompiler.IL.ControlFlow uses a type in Decompiler.IL. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Decompiler.IL.ControlFlow uses Decompiler.IL, so a change to Decompiler.IL can break Decompiler.IL.ControlFlow, while a change to Decompiler.IL.ControlFlow can't break Decompiler.IL.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
9→18 Decompiler.IL.ControlFlow uses Decompiler.TypeSystempart of a loop✕
Connections
10 pairs of types, where a type in Decompiler.IL.ControlFlow uses a type in Decompiler.TypeSystem.
Decompiler.IL.ControlFlow uses Decompiler.TypeSystem, so a change to Decompiler.TypeSystem can break Decompiler.IL.ControlFlow, while a change to Decompiler.IL.ControlFlow can't break Decompiler.TypeSystem.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
9→19 Decompiler.IL.ControlFlow uses Decompiler.Metadatapart of a loop✕
Connections
1 pair of types, where a type in Decompiler.IL.ControlFlow uses a type in Decompiler.Metadata.
Decompiler.IL.ControlFlow uses Decompiler.Metadata, so a change to Decompiler.Metadata can break Decompiler.IL.ControlFlow, while a change to Decompiler.IL.ControlFlow can't break Decompiler.Metadata.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Decompiler.IL.Transforms uses Decompiler.Util, so a change to Decompiler.Util can break Decompiler.IL.Transforms, while a change to Decompiler.IL.Transforms can't break Decompiler.Util.
Position
Below the diagonal: Decompiler.IL.Transforms uses a module listed above it, which is the healthy direction.
Decompiler.IL.Transforms uses Decompiler.DebugInfo, so a change to Decompiler.DebugInfo can break Decompiler.IL.Transforms, while a change to Decompiler.IL.Transforms can't break Decompiler.DebugInfo.
Position
Below the diagonal: Decompiler.IL.Transforms uses a module listed above it, which is the healthy direction.
Decompiler.IL.Transforms uses Decompiler.TypeSystem.Implementation, so a change to Decompiler.TypeSystem.Implementation can break Decompiler.IL.Transforms, while a change to Decompiler.IL.Transforms can't break Decompiler.TypeSystem.Implementation.
Position
Below the diagonal: Decompiler.IL.Transforms uses a module listed above it, which is the healthy direction.
Decompiler.IL.Transforms uses Decompiler.IL.ControlFlow, so a change to Decompiler.IL.ControlFlow can break Decompiler.IL.Transforms, while a change to Decompiler.IL.Transforms can't break Decompiler.IL.ControlFlow.
Position
Below the diagonal: Decompiler.IL.Transforms uses a module listed above it, which is the healthy direction.
10→11 Decompiler.IL.Transforms uses Decompiler.ILpart of a loop✕
Connections
281 pairs of types, where a type in Decompiler.IL.Transforms uses a type in Decompiler.IL. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Decompiler.IL.Transforms uses Decompiler.IL, so a change to Decompiler.IL can break Decompiler.IL.Transforms, while a change to Decompiler.IL.Transforms can't break Decompiler.IL.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
10→14 Decompiler.IL.Transforms uses Decompiler.CSharp.Resolverpart of a loop✕
Connections
4 pairs of types, where a type in Decompiler.IL.Transforms uses a type in Decompiler.CSharp.Resolver.
Decompiler.IL.Transforms uses Decompiler.CSharp.Resolver, so a change to Decompiler.CSharp.Resolver can break Decompiler.IL.Transforms, while a change to Decompiler.IL.Transforms can't break Decompiler.CSharp.Resolver.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
10→17 Decompiler.IL.Transforms uses Decompilerpart of a loop✕
Connections
4 pairs of types, where a type in Decompiler.IL.Transforms uses a type in Decompiler.
Decompiler.IL.Transforms uses Decompiler, so a change to Decompiler can break Decompiler.IL.Transforms, while a change to Decompiler.IL.Transforms can't break Decompiler.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
10→18 Decompiler.IL.Transforms uses Decompiler.TypeSystempart of a loop✕
Connections
80 pairs of types, where a type in Decompiler.IL.Transforms uses a type in Decompiler.TypeSystem. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Decompiler.IL.Transforms uses Decompiler.TypeSystem, so a change to Decompiler.TypeSystem can break Decompiler.IL.Transforms, while a change to Decompiler.IL.Transforms can't break Decompiler.TypeSystem.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
10→19 Decompiler.IL.Transforms uses Decompiler.Metadatapart of a loop✕
Connections
2 pairs of types, where a type in Decompiler.IL.Transforms uses a type in Decompiler.Metadata.
Decompiler.IL.Transforms uses Decompiler.Metadata, so a change to Decompiler.Metadata can break Decompiler.IL.Transforms, while a change to Decompiler.IL.Transforms can't break Decompiler.Metadata.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Decompiler.IL uses Decompiler.Util, so a change to Decompiler.Util can break Decompiler.IL, while a change to Decompiler.IL can't break Decompiler.Util.
Position
Below the diagonal: Decompiler.IL uses a module listed above it, which is the healthy direction.
Decompiler.IL uses Decompiler.DebugInfo, so a change to Decompiler.DebugInfo can break Decompiler.IL, while a change to Decompiler.IL can't break Decompiler.DebugInfo.
Position
Below the diagonal: Decompiler.IL uses a module listed above it, which is the healthy direction.
Decompiler.IL uses Decompiler.Output, so a change to Decompiler.Output can break Decompiler.IL, while a change to Decompiler.IL can't break Decompiler.Output.
Position
Below the diagonal: Decompiler.IL uses a module listed above it, which is the healthy direction.
Decompiler.IL uses Decompiler.TypeSystem.Implementation, so a change to Decompiler.TypeSystem.Implementation can break Decompiler.IL, while a change to Decompiler.IL can't break Decompiler.TypeSystem.Implementation.
Position
Below the diagonal: Decompiler.IL uses a module listed above it, which is the healthy direction.
Decompiler.IL uses Decompiler.Disassembler, so a change to Decompiler.Disassembler can break Decompiler.IL, while a change to Decompiler.IL can't break Decompiler.Disassembler.
Position
Below the diagonal: Decompiler.IL uses a module listed above it, which is the healthy direction.
Decompiler.IL uses Decompiler.IL.Transforms, so a change to Decompiler.IL.Transforms can break Decompiler.IL, while a change to Decompiler.IL can't break Decompiler.IL.Transforms.
Position
Below the diagonal: Decompiler.IL uses a module listed above it, which is the healthy direction.
11→13 Decompiler.IL uses Decompiler.CSharp.Syntaxpart of a loop✕
Connections
1 pair of types, where a type in Decompiler.IL uses a type in Decompiler.CSharp.Syntax.
Decompiler.IL uses Decompiler.CSharp.Syntax, so a change to Decompiler.CSharp.Syntax can break Decompiler.IL, while a change to Decompiler.IL can't break Decompiler.CSharp.Syntax.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
11→17 Decompiler.IL uses Decompilerpart of a loop✕
Connections
99 pairs of types, where a type in Decompiler.IL uses a type in Decompiler. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Decompiler.IL uses Decompiler, so a change to Decompiler can break Decompiler.IL, while a change to Decompiler.IL can't break Decompiler.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
11→18 Decompiler.IL uses Decompiler.TypeSystempart of a loop✕
Connections
265 pairs of types, where a type in Decompiler.IL uses a type in Decompiler.TypeSystem. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Decompiler.IL uses Decompiler.TypeSystem, so a change to Decompiler.TypeSystem can break Decompiler.IL, while a change to Decompiler.IL can't break Decompiler.TypeSystem.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
11→19 Decompiler.IL uses Decompiler.Metadatapart of a loop✕
Connections
2 pairs of types, where a type in Decompiler.IL uses a type in Decompiler.Metadata.
Decompiler.IL uses Decompiler.Metadata, so a change to Decompiler.Metadata can break Decompiler.IL, while a change to Decompiler.IL can't break Decompiler.Metadata.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Decompiler.Semantics uses Decompiler.IL, so a change to Decompiler.IL can break Decompiler.Semantics, while a change to Decompiler.Semantics can't break Decompiler.IL.
Position
Below the diagonal: Decompiler.Semantics uses a module listed above it, which is the healthy direction.
12→13 Decompiler.Semantics uses Decompiler.CSharp.Syntaxpart of a loop✕
Connections
1 pair of types, where a type in Decompiler.Semantics uses a type in Decompiler.CSharp.Syntax.
Decompiler.Semantics uses Decompiler.CSharp.Syntax, so a change to Decompiler.CSharp.Syntax can break Decompiler.Semantics, while a change to Decompiler.Semantics can't break Decompiler.CSharp.Syntax.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
12→14 Decompiler.Semantics uses Decompiler.CSharp.Resolverpart of a loop✕
Connections
6 pairs of types, where a type in Decompiler.Semantics uses a type in Decompiler.CSharp.Resolver.
Decompiler.Semantics uses Decompiler.CSharp.Resolver, so a change to Decompiler.CSharp.Resolver can break Decompiler.Semantics, while a change to Decompiler.Semantics can't break Decompiler.CSharp.Resolver.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
12→18 Decompiler.Semantics uses Decompiler.TypeSystempart of a loop✕
Connections
56 pairs of types, where a type in Decompiler.Semantics uses a type in Decompiler.TypeSystem. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Decompiler.Semantics uses Decompiler.TypeSystem, so a change to Decompiler.TypeSystem can break Decompiler.Semantics, while a change to Decompiler.Semantics can't break Decompiler.TypeSystem.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Decompiler.CSharp.Syntax uses Decompiler.TypeSystem.Implementation, so a change to Decompiler.TypeSystem.Implementation can break Decompiler.CSharp.Syntax, while a change to Decompiler.CSharp.Syntax can't break Decompiler.TypeSystem.Implementation.
Position
Below the diagonal: Decompiler.CSharp.Syntax uses a module listed above it, which is the healthy direction.
Decompiler.CSharp.Syntax uses Decompiler.CSharp.OutputVisitor, so a change to Decompiler.CSharp.OutputVisitor can break Decompiler.CSharp.Syntax, while a change to Decompiler.CSharp.Syntax can't break Decompiler.CSharp.OutputVisitor.
Position
Below the diagonal: Decompiler.CSharp.Syntax uses a module listed above it, which is the healthy direction.
Decompiler.CSharp.Syntax uses Decompiler.Semantics, so a change to Decompiler.Semantics can break Decompiler.CSharp.Syntax, while a change to Decompiler.CSharp.Syntax can't break Decompiler.Semantics.
Position
Below the diagonal: Decompiler.CSharp.Syntax uses a module listed above it, which is the healthy direction.
13→14 Decompiler.CSharp.Syntax uses Decompiler.CSharp.Resolverpart of a loop✕
Connections
5 pairs of types, where a type in Decompiler.CSharp.Syntax uses a type in Decompiler.CSharp.Resolver.
Decompiler.CSharp.Syntax uses Decompiler.CSharp.Resolver, so a change to Decompiler.CSharp.Resolver can break Decompiler.CSharp.Syntax, while a change to Decompiler.CSharp.Syntax can't break Decompiler.CSharp.Resolver.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
13→18 Decompiler.CSharp.Syntax uses Decompiler.TypeSystempart of a loop✕
Connections
43 pairs of types, where a type in Decompiler.CSharp.Syntax uses a type in Decompiler.TypeSystem. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Decompiler.CSharp.Syntax uses Decompiler.TypeSystem, so a change to Decompiler.TypeSystem can break Decompiler.CSharp.Syntax, while a change to Decompiler.CSharp.Syntax can't break Decompiler.TypeSystem.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Decompiler.CSharp.Resolver uses Decompiler.TypeSystem.Implementation, so a change to Decompiler.TypeSystem.Implementation can break Decompiler.CSharp.Resolver, while a change to Decompiler.CSharp.Resolver can't break Decompiler.TypeSystem.Implementation.
Position
Below the diagonal: Decompiler.CSharp.Resolver uses a module listed above it, which is the healthy direction.
Decompiler.CSharp.Resolver uses Decompiler.Semantics, so a change to Decompiler.Semantics can break Decompiler.CSharp.Resolver, while a change to Decompiler.CSharp.Resolver can't break Decompiler.Semantics.
Position
Below the diagonal: Decompiler.CSharp.Resolver uses a module listed above it, which is the healthy direction.
Decompiler.CSharp.Resolver uses Decompiler.CSharp.Syntax, so a change to Decompiler.CSharp.Syntax can break Decompiler.CSharp.Resolver, while a change to Decompiler.CSharp.Resolver can't break Decompiler.CSharp.Syntax.
Position
Below the diagonal: Decompiler.CSharp.Resolver uses a module listed above it, which is the healthy direction.
14→18 Decompiler.CSharp.Resolver uses Decompiler.TypeSystempart of a loop✕
Connections
85 pairs of types, where a type in Decompiler.CSharp.Resolver uses a type in Decompiler.TypeSystem. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Decompiler.CSharp.Resolver uses Decompiler.TypeSystem, so a change to Decompiler.TypeSystem can break Decompiler.CSharp.Resolver, while a change to Decompiler.CSharp.Resolver can't break Decompiler.TypeSystem.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Decompiler.CSharp.Transforms uses Decompiler.IL, so a change to Decompiler.IL can break Decompiler.CSharp.Transforms, while a change to Decompiler.CSharp.Transforms can't break Decompiler.IL.
Position
Below the diagonal: Decompiler.CSharp.Transforms uses a module listed above it, which is the healthy direction.
Decompiler.CSharp.Transforms uses Decompiler.Semantics, so a change to Decompiler.Semantics can break Decompiler.CSharp.Transforms, while a change to Decompiler.CSharp.Transforms can't break Decompiler.Semantics.
Position
Below the diagonal: Decompiler.CSharp.Transforms uses a module listed above it, which is the healthy direction.
149 pairs of types, where a type in Decompiler.CSharp.Transforms uses a type in Decompiler.CSharp.Syntax. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Decompiler.CSharp.Transforms uses Decompiler.CSharp.Syntax, so a change to Decompiler.CSharp.Syntax can break Decompiler.CSharp.Transforms, while a change to Decompiler.CSharp.Transforms can't break Decompiler.CSharp.Syntax.
Position
Below the diagonal: Decompiler.CSharp.Transforms uses a module listed above it, which is the healthy direction.
Decompiler.CSharp.Transforms uses Decompiler.CSharp.Resolver, so a change to Decompiler.CSharp.Resolver can break Decompiler.CSharp.Transforms, while a change to Decompiler.CSharp.Transforms can't break Decompiler.CSharp.Resolver.
Position
Below the diagonal: Decompiler.CSharp.Transforms uses a module listed above it, which is the healthy direction.
15→16 Decompiler.CSharp.Transforms uses Decompiler.CSharppart of a loop✕
Connections
3 pairs of types, where a type in Decompiler.CSharp.Transforms uses a type in Decompiler.CSharp.
Decompiler.CSharp.Transforms uses Decompiler.CSharp, so a change to Decompiler.CSharp can break Decompiler.CSharp.Transforms, while a change to Decompiler.CSharp.Transforms can't break Decompiler.CSharp.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
15→17 Decompiler.CSharp.Transforms uses Decompilerpart of a loop✕
Connections
4 pairs of types, where a type in Decompiler.CSharp.Transforms uses a type in Decompiler.
Decompiler.CSharp.Transforms uses Decompiler, so a change to Decompiler can break Decompiler.CSharp.Transforms, while a change to Decompiler.CSharp.Transforms can't break Decompiler.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
15→18 Decompiler.CSharp.Transforms uses Decompiler.TypeSystempart of a loop✕
Connections
32 pairs of types, where a type in Decompiler.CSharp.Transforms uses a type in Decompiler.TypeSystem. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Decompiler.CSharp.Transforms uses Decompiler.TypeSystem, so a change to Decompiler.TypeSystem can break Decompiler.CSharp.Transforms, while a change to Decompiler.CSharp.Transforms can't break Decompiler.TypeSystem.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Decompiler.CSharp uses Decompiler.Util, so a change to Decompiler.Util can break Decompiler.CSharp, while a change to Decompiler.CSharp can't break Decompiler.Util.
Position
Below the diagonal: Decompiler.CSharp uses a module listed above it, which is the healthy direction.
Decompiler.CSharp uses Decompiler.DebugInfo, so a change to Decompiler.DebugInfo can break Decompiler.CSharp, while a change to Decompiler.CSharp can't break Decompiler.DebugInfo.
Position
Below the diagonal: Decompiler.CSharp uses a module listed above it, which is the healthy direction.
Decompiler.CSharp uses Decompiler.IL.Transforms, so a change to Decompiler.IL.Transforms can break Decompiler.CSharp, while a change to Decompiler.CSharp can't break Decompiler.IL.Transforms.
Position
Below the diagonal: Decompiler.CSharp uses a module listed above it, which is the healthy direction.
143 pairs of types, where a type in Decompiler.CSharp uses a type in Decompiler.IL. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Decompiler.CSharp uses Decompiler.IL, so a change to Decompiler.IL can break Decompiler.CSharp, while a change to Decompiler.CSharp can't break Decompiler.IL.
Position
Below the diagonal: Decompiler.CSharp uses a module listed above it, which is the healthy direction.
Decompiler.CSharp uses Decompiler.Semantics, so a change to Decompiler.Semantics can break Decompiler.CSharp, while a change to Decompiler.CSharp can't break Decompiler.Semantics.
Position
Below the diagonal: Decompiler.CSharp uses a module listed above it, which is the healthy direction.
78 pairs of types, where a type in Decompiler.CSharp uses a type in Decompiler.CSharp.Syntax. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Decompiler.CSharp uses Decompiler.CSharp.Syntax, so a change to Decompiler.CSharp.Syntax can break Decompiler.CSharp, while a change to Decompiler.CSharp can't break Decompiler.CSharp.Syntax.
Position
Below the diagonal: Decompiler.CSharp uses a module listed above it, which is the healthy direction.
Decompiler.CSharp uses Decompiler.CSharp.Resolver, so a change to Decompiler.CSharp.Resolver can break Decompiler.CSharp, while a change to Decompiler.CSharp can't break Decompiler.CSharp.Resolver.
Position
Below the diagonal: Decompiler.CSharp uses a module listed above it, which is the healthy direction.
Decompiler.CSharp uses Decompiler.CSharp.Transforms, so a change to Decompiler.CSharp.Transforms can break Decompiler.CSharp, while a change to Decompiler.CSharp can't break Decompiler.CSharp.Transforms.
Position
Below the diagonal: Decompiler.CSharp uses a module listed above it, which is the healthy direction.
16→17 Decompiler.CSharp uses Decompilerpart of a loop✕
Connections
12 pairs of types, where a type in Decompiler.CSharp uses a type in Decompiler.
Decompiler.CSharp uses Decompiler, so a change to Decompiler can break Decompiler.CSharp, while a change to Decompiler.CSharp can't break Decompiler.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
16→18 Decompiler.CSharp uses Decompiler.TypeSystempart of a loop✕
Connections
76 pairs of types, where a type in Decompiler.CSharp uses a type in Decompiler.TypeSystem. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Decompiler.CSharp uses Decompiler.TypeSystem, so a change to Decompiler.TypeSystem can break Decompiler.CSharp, while a change to Decompiler.CSharp can't break Decompiler.TypeSystem.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
16→19 Decompiler.CSharp uses Decompiler.Metadatapart of a loop✕
Connections
5 pairs of types, where a type in Decompiler.CSharp uses a type in Decompiler.Metadata.
Decompiler.CSharp uses Decompiler.Metadata, so a change to Decompiler.Metadata can break Decompiler.CSharp, while a change to Decompiler.CSharp can't break Decompiler.Metadata.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Decompiler uses Decompiler.CSharp.OutputVisitor, so a change to Decompiler.CSharp.OutputVisitor can break Decompiler, while a change to Decompiler can't break Decompiler.CSharp.OutputVisitor.
Position
Below the diagonal: Decompiler uses a module listed above it, which is the healthy direction.
Decompiler uses Decompiler.Disassembler, so a change to Decompiler.Disassembler can break Decompiler, while a change to Decompiler can't break Decompiler.Disassembler.
Position
Below the diagonal: Decompiler uses a module listed above it, which is the healthy direction.
Decompiler uses Decompiler.CSharp.Syntax, so a change to Decompiler.CSharp.Syntax can break Decompiler, while a change to Decompiler can't break Decompiler.CSharp.Syntax.
Position
Below the diagonal: Decompiler uses a module listed above it, which is the healthy direction.
Decompiler uses Decompiler.CSharp, so a change to Decompiler.CSharp can break Decompiler, while a change to Decompiler can't break Decompiler.CSharp.
Position
Below the diagonal: Decompiler uses a module listed above it, which is the healthy direction.
17→18 Decompiler uses Decompiler.TypeSystempart of a loop✕
Connections
32 pairs of types, where a type in Decompiler uses a type in Decompiler.TypeSystem. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Decompiler uses Decompiler.TypeSystem, so a change to Decompiler.TypeSystem can break Decompiler, while a change to Decompiler can't break Decompiler.TypeSystem.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
17→19 Decompiler uses Decompiler.Metadatapart of a loop✕
Connections
5 pairs of types, where a type in Decompiler uses a type in Decompiler.Metadata.
Decompiler uses Decompiler.Metadata, so a change to Decompiler.Metadata can break Decompiler, while a change to Decompiler can't break Decompiler.Metadata.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Decompiler.TypeSystem uses Decompiler.Util, so a change to Decompiler.Util can break Decompiler.TypeSystem, while a change to Decompiler.TypeSystem can't break Decompiler.Util.
Position
Below the diagonal: Decompiler.TypeSystem uses a module listed above it, which is the healthy direction.
Decompiler.TypeSystem uses Decompiler.DebugInfo, so a change to Decompiler.DebugInfo can break Decompiler.TypeSystem, while a change to Decompiler.TypeSystem can't break Decompiler.DebugInfo.
Position
Below the diagonal: Decompiler.TypeSystem uses a module listed above it, which is the healthy direction.
Decompiler.TypeSystem uses Decompiler.TypeSystem.Implementation, so a change to Decompiler.TypeSystem.Implementation can break Decompiler.TypeSystem, while a change to Decompiler.TypeSystem can't break Decompiler.TypeSystem.Implementation.
Position
Below the diagonal: Decompiler.TypeSystem uses a module listed above it, which is the healthy direction.
Decompiler.TypeSystem uses Decompiler.IL, so a change to Decompiler.IL can break Decompiler.TypeSystem, while a change to Decompiler.TypeSystem can't break Decompiler.IL.
Position
Below the diagonal: Decompiler.TypeSystem uses a module listed above it, which is the healthy direction.
Decompiler.TypeSystem uses Decompiler.Semantics, so a change to Decompiler.Semantics can break Decompiler.TypeSystem, while a change to Decompiler.TypeSystem can't break Decompiler.Semantics.
Position
Below the diagonal: Decompiler.TypeSystem uses a module listed above it, which is the healthy direction.
Decompiler.TypeSystem uses Decompiler, so a change to Decompiler can break Decompiler.TypeSystem, while a change to Decompiler.TypeSystem can't break Decompiler.
Position
Below the diagonal: Decompiler.TypeSystem uses a module listed above it, which is the healthy direction.
18→19 Decompiler.TypeSystem uses Decompiler.Metadatapart of a loop✕
Connections
7 pairs of types, where a type in Decompiler.TypeSystem uses a type in Decompiler.Metadata.
Decompiler.TypeSystem uses Decompiler.Metadata, so a change to Decompiler.Metadata can break Decompiler.TypeSystem, while a change to Decompiler.TypeSystem can't break Decompiler.Metadata.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Decompiler.Metadata uses Decompiler.Util, so a change to Decompiler.Util can break Decompiler.Metadata, while a change to Decompiler.Metadata can't break Decompiler.Util.
Position
Below the diagonal: Decompiler.Metadata uses a module listed above it, which is the healthy direction.
Decompiler.Metadata uses Decompiler.TypeSystem, so a change to Decompiler.TypeSystem can break Decompiler.Metadata, while a change to Decompiler.Metadata can't break Decompiler.TypeSystem.
Position
Below the diagonal: Decompiler.Metadata uses a module listed above it, which is the healthy direction.
BamlDecompiler uses Decompiler.TypeSystem.Implementation, so a change to Decompiler.TypeSystem.Implementation can break BamlDecompiler, while a change to BamlDecompiler can't break Decompiler.TypeSystem.Implementation.
Position
Below the diagonal: BamlDecompiler uses a module listed above it, which is the healthy direction.
48 pairs of types, where a type in BamlDecompiler uses a type in Decompiler.TypeSystem. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
BamlDecompiler uses Decompiler.TypeSystem, so a change to Decompiler.TypeSystem can break BamlDecompiler, while a change to BamlDecompiler can't break Decompiler.TypeSystem.
Position
Below the diagonal: BamlDecompiler uses a module listed above it, which is the healthy direction.
BamlDecompiler uses Decompiler.Metadata, so a change to Decompiler.Metadata can break BamlDecompiler, while a change to BamlDecompiler can't break Decompiler.Metadata.
Position
Below the diagonal: BamlDecompiler uses a module listed above it, which is the healthy direction.
Decompiler.CSharp.ProjectDecompiler uses Decompiler.Util, so a change to Decompiler.Util can break Decompiler.CSharp.ProjectDecompiler, while a change to Decompiler.CSharp.ProjectDecompiler can't break Decompiler.Util.
Position
Below the diagonal: Decompiler.CSharp.ProjectDecompiler uses a module listed above it, which is the healthy direction.
Decompiler.CSharp.ProjectDecompiler uses Decompiler.DebugInfo, so a change to Decompiler.DebugInfo can break Decompiler.CSharp.ProjectDecompiler, while a change to Decompiler.CSharp.ProjectDecompiler can't break Decompiler.DebugInfo.
Position
Below the diagonal: Decompiler.CSharp.ProjectDecompiler uses a module listed above it, which is the healthy direction.
Decompiler.CSharp.ProjectDecompiler uses Decompiler.CSharp, so a change to Decompiler.CSharp can break Decompiler.CSharp.ProjectDecompiler, while a change to Decompiler.CSharp.ProjectDecompiler can't break Decompiler.CSharp.
Position
Below the diagonal: Decompiler.CSharp.ProjectDecompiler uses a module listed above it, which is the healthy direction.
Decompiler.CSharp.ProjectDecompiler uses Decompiler, so a change to Decompiler can break Decompiler.CSharp.ProjectDecompiler, while a change to Decompiler.CSharp.ProjectDecompiler can't break Decompiler.
Position
Below the diagonal: Decompiler.CSharp.ProjectDecompiler uses a module listed above it, which is the healthy direction.
Decompiler.CSharp.ProjectDecompiler uses Decompiler.TypeSystem, so a change to Decompiler.TypeSystem can break Decompiler.CSharp.ProjectDecompiler, while a change to Decompiler.CSharp.ProjectDecompiler can't break Decompiler.TypeSystem.
Position
Below the diagonal: Decompiler.CSharp.ProjectDecompiler uses a module listed above it, which is the healthy direction.
Decompiler.CSharp.ProjectDecompiler uses Decompiler.Metadata, so a change to Decompiler.Metadata can break Decompiler.CSharp.ProjectDecompiler, while a change to Decompiler.CSharp.ProjectDecompiler can't break Decompiler.Metadata.
Position
Below the diagonal: Decompiler.CSharp.ProjectDecompiler uses a module listed above it, which is the healthy direction.
ILSpyCmd uses Decompiler.DebugInfo, so a change to Decompiler.DebugInfo can break ILSpyCmd, while a change to ILSpyCmd can't break Decompiler.DebugInfo.
Position
Below the diagonal: ILSpyCmd uses a module listed above it, which is the healthy direction.
ILSpyCmd uses Decompiler.Disassembler, so a change to Decompiler.Disassembler can break ILSpyCmd, while a change to ILSpyCmd can't break Decompiler.Disassembler.
Position
Below the diagonal: ILSpyCmd uses a module listed above it, which is the healthy direction.
ILSpyCmd uses Decompiler.IL.Transforms, so a change to Decompiler.IL.Transforms can break ILSpyCmd, while a change to ILSpyCmd can't break Decompiler.IL.Transforms.
Position
Below the diagonal: ILSpyCmd uses a module listed above it, which is the healthy direction.
ILSpyCmd uses Decompiler.TypeSystem, so a change to Decompiler.TypeSystem can break ILSpyCmd, while a change to ILSpyCmd can't break Decompiler.TypeSystem.
Position
Below the diagonal: ILSpyCmd uses a module listed above it, which is the healthy direction.
ILSpyCmd uses Decompiler.CSharp.ProjectDecompiler, so a change to Decompiler.CSharp.ProjectDecompiler can break ILSpyCmd, while a change to ILSpyCmd can't break Decompiler.CSharp.ProjectDecompiler.
Position
Below the diagonal: ILSpyCmd uses a module listed above it, which is the healthy direction.
ILSpyX.Abstractions uses Decompiler.Util, so a change to Decompiler.Util can break ILSpyX.Abstractions, while a change to ILSpyX.Abstractions can't break Decompiler.Util.
Position
Below the diagonal: ILSpyX.Abstractions uses a module listed above it, which is the healthy direction.
ILSpyX.Abstractions uses Decompiler.Output, so a change to Decompiler.Output can break ILSpyX.Abstractions, while a change to ILSpyX.Abstractions can't break Decompiler.Output.
Position
Below the diagonal: ILSpyX.Abstractions uses a module listed above it, which is the healthy direction.
ILSpyX.Abstractions uses Decompiler, so a change to Decompiler can break ILSpyX.Abstractions, while a change to ILSpyX.Abstractions can't break Decompiler.
Position
Below the diagonal: ILSpyX.Abstractions uses a module listed above it, which is the healthy direction.
ILSpyX.Abstractions uses Decompiler.TypeSystem, so a change to Decompiler.TypeSystem can break ILSpyX.Abstractions, while a change to ILSpyX.Abstractions can't break Decompiler.TypeSystem.
Position
Below the diagonal: ILSpyX.Abstractions uses a module listed above it, which is the healthy direction.
ILSpyX.Abstractions uses Decompiler.Metadata, so a change to Decompiler.Metadata can break ILSpyX.Abstractions, while a change to ILSpyX.Abstractions can't break Decompiler.Metadata.
Position
Below the diagonal: ILSpyX.Abstractions uses a module listed above it, which is the healthy direction.
ILSpy.TreeNodes uses Decompiler.Util, so a change to Decompiler.Util can break ILSpy.TreeNodes, while a change to ILSpy.TreeNodes can't break Decompiler.Util.
Position
Below the diagonal: ILSpy.TreeNodes uses a module listed above it, which is the healthy direction.
ILSpy.TreeNodes uses ILSpyX.TreeView, so a change to ILSpyX.TreeView can break ILSpy.TreeNodes, while a change to ILSpy.TreeNodes can't break ILSpyX.TreeView.
Position
Below the diagonal: ILSpy.TreeNodes uses a module listed above it, which is the healthy direction.
34 pairs of types, where a type in ILSpy.TreeNodes uses a type in Decompiler. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
29 pairs of types, where a type in ILSpy.TreeNodes uses a type in Decompiler.TypeSystem. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
ILSpy.TreeNodes uses Decompiler.TypeSystem, so a change to Decompiler.TypeSystem can break ILSpy.TreeNodes, while a change to ILSpy.TreeNodes can't break Decompiler.TypeSystem.
Position
Below the diagonal: ILSpy.TreeNodes uses a module listed above it, which is the healthy direction.
26 pairs of types, where a type in ILSpy.TreeNodes uses a type in Decompiler.Metadata. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
ILSpy.TreeNodes uses Decompiler.Metadata, so a change to Decompiler.Metadata can break ILSpy.TreeNodes, while a change to ILSpy.TreeNodes can't break Decompiler.Metadata.
Position
Below the diagonal: ILSpy.TreeNodes uses a module listed above it, which is the healthy direction.
ILSpy.TreeNodes uses ILSpyX.Abstractions, so a change to ILSpyX.Abstractions can break ILSpy.TreeNodes, while a change to ILSpy.TreeNodes can't break ILSpyX.Abstractions.
Position
Below the diagonal: ILSpy.TreeNodes uses a module listed above it, which is the healthy direction.
25→28 ILSpy.TreeNodes uses ILSpy.ViewModelspart of a loop✕
Connections
1 pair of types, where a type in ILSpy.TreeNodes uses a type in ILSpy.ViewModels.
ILSpy.TreeNodes uses ILSpy.ViewModels, so a change to ILSpy.ViewModels can break ILSpy.TreeNodes, while a change to ILSpy.TreeNodes can't break ILSpy.ViewModels.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
25→32 ILSpy.TreeNodes uses ILSpy.Languagespart of a loop✕
Connections
34 pairs of types, where a type in ILSpy.TreeNodes uses a type in ILSpy.Languages. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
ILSpy.TreeNodes uses ILSpy.Languages, so a change to ILSpy.Languages can break ILSpy.TreeNodes, while a change to ILSpy.TreeNodes can't break ILSpy.Languages.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
25→33 ILSpy.TreeNodes uses ILSpy.AssemblyTreepart of a loop✕
Connections
3 pairs of types, where a type in ILSpy.TreeNodes uses a type in ILSpy.AssemblyTree.
ILSpy.TreeNodes uses ILSpy.AssemblyTree, so a change to ILSpy.AssemblyTree can break ILSpy.TreeNodes, while a change to ILSpy.TreeNodes can't break ILSpy.AssemblyTree.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
51 pairs of types, where a type in ILSpy.TreeNodes uses a type in ILSpy. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
ILSpy.Metadata uses Decompiler.Metadata, so a change to Decompiler.Metadata can break ILSpy.Metadata, while a change to ILSpy.Metadata can't break Decompiler.Metadata.
Position
Below the diagonal: ILSpy.Metadata uses a module listed above it, which is the healthy direction.
ILSpy.Metadata uses ILSpy.TreeNodes, so a change to ILSpy.TreeNodes can break ILSpy.Metadata, while a change to ILSpy.Metadata can't break ILSpy.TreeNodes.
Position
Below the diagonal: ILSpy.Metadata uses a module listed above it, which is the healthy direction.
26→28 ILSpy.Metadata uses ILSpy.ViewModelspart of a loop✕
Connections
8 pairs of types, where a type in ILSpy.Metadata uses a type in ILSpy.ViewModels.
ILSpy.Metadata uses ILSpy.ViewModels, so a change to ILSpy.ViewModels can break ILSpy.Metadata, while a change to ILSpy.Metadata can't break ILSpy.ViewModels.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
26→31 ILSpy.Metadata uses ILSpy.TextViewpart of a loop✕
Connections
1 pair of types, where a type in ILSpy.Metadata uses a type in ILSpy.TextView.
ILSpy.Metadata uses ILSpy.TextView, so a change to ILSpy.TextView can break ILSpy.Metadata, while a change to ILSpy.Metadata can't break ILSpy.TextView.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
26→32 ILSpy.Metadata uses ILSpy.Languagespart of a loop✕
Connections
7 pairs of types, where a type in ILSpy.Metadata uses a type in ILSpy.Languages.
ILSpy.Metadata uses ILSpy.Languages, so a change to ILSpy.Languages can break ILSpy.Metadata, while a change to ILSpy.Metadata can't break ILSpy.Languages.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
26→33 ILSpy.Metadata uses ILSpy.AssemblyTreepart of a loop✕
Connections
2 pairs of types, where a type in ILSpy.Metadata uses a type in ILSpy.AssemblyTree.
ILSpy.Metadata uses ILSpy.AssemblyTree, so a change to ILSpy.AssemblyTree can break ILSpy.Metadata, while a change to ILSpy.Metadata can't break ILSpy.AssemblyTree.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
26→34 ILSpy.Metadata uses ILSpy.Commandspart of a loop✕
Connections
1 pair of types, where a type in ILSpy.Metadata uses a type in ILSpy.Commands.
ILSpy.Metadata uses ILSpy.Commands, so a change to ILSpy.Commands can break ILSpy.Metadata, while a change to ILSpy.Metadata can't break ILSpy.Commands.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
ILSpy.Docking uses ILSpyX.TreeView, so a change to ILSpyX.TreeView can break ILSpy.Docking, while a change to ILSpy.Docking can't break ILSpyX.TreeView.
Position
Below the diagonal: ILSpy.Docking uses a module listed above it, which is the healthy direction.
ILSpy.Docking uses ILSpy.TreeNodes, so a change to ILSpy.TreeNodes can break ILSpy.Docking, while a change to ILSpy.Docking can't break ILSpy.TreeNodes.
Position
Below the diagonal: ILSpy.Docking uses a module listed above it, which is the healthy direction.
ILSpy.Docking uses ILSpy.ViewModels, so a change to ILSpy.ViewModels can break ILSpy.Docking, while a change to ILSpy.Docking can't break ILSpy.ViewModels.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
27→30 ILSpy.Docking uses ILSpy.Bookmarkspart of a loop✕
Connections
1 pair of types, where a type in ILSpy.Docking uses a type in ILSpy.Bookmarks.
ILSpy.Docking uses ILSpy.Bookmarks, so a change to ILSpy.Bookmarks can break ILSpy.Docking, while a change to ILSpy.Docking can't break ILSpy.Bookmarks.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
27→31 ILSpy.Docking uses ILSpy.TextViewpart of a loop✕
Connections
3 pairs of types, where a type in ILSpy.Docking uses a type in ILSpy.TextView.
ILSpy.Docking uses ILSpy.Languages, so a change to ILSpy.Languages can break ILSpy.Docking, while a change to ILSpy.Docking can't break ILSpy.Languages.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
27→33 ILSpy.Docking uses ILSpy.AssemblyTreepart of a loop✕
Connections
1 pair of types, where a type in ILSpy.Docking uses a type in ILSpy.AssemblyTree.
ILSpy.Docking uses ILSpy.AssemblyTree, so a change to ILSpy.AssemblyTree can break ILSpy.Docking, while a change to ILSpy.Docking can't break ILSpy.AssemblyTree.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
27→34 ILSpy.Docking uses ILSpy.Commandspart of a loop✕
Connections
5 pairs of types, where a type in ILSpy.Docking uses a type in ILSpy.Commands.
ILSpy.ViewModels uses ILSpyX.TreeView, so a change to ILSpyX.TreeView can break ILSpy.ViewModels, while a change to ILSpy.ViewModels can't break ILSpyX.TreeView.
Position
Below the diagonal: ILSpy.ViewModels uses a module listed above it, which is the healthy direction.
ILSpy.ViewModels uses Decompiler.IL, so a change to Decompiler.IL can break ILSpy.ViewModels, while a change to ILSpy.ViewModels can't break Decompiler.IL.
Position
Below the diagonal: ILSpy.ViewModels uses a module listed above it, which is the healthy direction.
ILSpy.ViewModels uses ILSpy.Docking, so a change to ILSpy.Docking can break ILSpy.ViewModels, while a change to ILSpy.ViewModels can't break ILSpy.Docking.
Position
Below the diagonal: ILSpy.ViewModels uses a module listed above it, which is the healthy direction.
28→32 ILSpy.ViewModels uses ILSpy.Languagespart of a loop✕
Connections
3 pairs of types, where a type in ILSpy.ViewModels uses a type in ILSpy.Languages.
ILSpy.ViewModels uses ILSpy.Languages, so a change to ILSpy.Languages can break ILSpy.ViewModels, while a change to ILSpy.ViewModels can't break ILSpy.Languages.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
28→33 ILSpy.ViewModels uses ILSpy.AssemblyTreepart of a loop✕
Connections
1 pair of types, where a type in ILSpy.ViewModels uses a type in ILSpy.AssemblyTree.
ILSpy.ViewModels uses ILSpy.AssemblyTree, so a change to ILSpy.AssemblyTree can break ILSpy.ViewModels, while a change to ILSpy.ViewModels can't break ILSpy.AssemblyTree.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
ILSpy.Options uses ILSpy.ViewModels, so a change to ILSpy.ViewModels can break ILSpy.Options, while a change to ILSpy.Options can't break ILSpy.ViewModels.
Position
Below the diagonal: ILSpy.Options uses a module listed above it, which is the healthy direction.
ILSpy.Bookmarks uses Decompiler.CSharp.OutputVisitor, so a change to Decompiler.CSharp.OutputVisitor can break ILSpy.Bookmarks, while a change to ILSpy.Bookmarks can't break Decompiler.CSharp.OutputVisitor.
Position
Below the diagonal: ILSpy.Bookmarks uses a module listed above it, which is the healthy direction.
ILSpy.Bookmarks uses Decompiler.IL, so a change to Decompiler.IL can break ILSpy.Bookmarks, while a change to ILSpy.Bookmarks can't break Decompiler.IL.
Position
Below the diagonal: ILSpy.Bookmarks uses a module listed above it, which is the healthy direction.
ILSpy.Bookmarks uses Decompiler.CSharp.Syntax, so a change to Decompiler.CSharp.Syntax can break ILSpy.Bookmarks, while a change to ILSpy.Bookmarks can't break Decompiler.CSharp.Syntax.
Position
Below the diagonal: ILSpy.Bookmarks uses a module listed above it, which is the healthy direction.
ILSpy.Bookmarks uses Decompiler.TypeSystem, so a change to Decompiler.TypeSystem can break ILSpy.Bookmarks, while a change to ILSpy.Bookmarks can't break Decompiler.TypeSystem.
Position
Below the diagonal: ILSpy.Bookmarks uses a module listed above it, which is the healthy direction.
ILSpy.Bookmarks uses ILSpy.ViewModels, so a change to ILSpy.ViewModels can break ILSpy.Bookmarks, while a change to ILSpy.Bookmarks can't break ILSpy.ViewModels.
Position
Below the diagonal: ILSpy.Bookmarks uses a module listed above it, which is the healthy direction.
ILSpy.Bookmarks uses ILSpy.Options, so a change to ILSpy.Options can break ILSpy.Bookmarks, while a change to ILSpy.Bookmarks can't break ILSpy.Options.
Position
Below the diagonal: ILSpy.Bookmarks uses a module listed above it, which is the healthy direction.
30→31 ILSpy.Bookmarks uses ILSpy.TextViewpart of a loop✕
Connections
5 pairs of types, where a type in ILSpy.Bookmarks uses a type in ILSpy.TextView.
ILSpy.Bookmarks uses ILSpy.TextView, so a change to ILSpy.TextView can break ILSpy.Bookmarks, while a change to ILSpy.Bookmarks can't break ILSpy.TextView.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
ILSpy.TextView uses ILSpyX.TreeView, so a change to ILSpyX.TreeView can break ILSpy.TextView, while a change to ILSpy.TextView can't break ILSpyX.TreeView.
Position
Below the diagonal: ILSpy.TextView uses a module listed above it, which is the healthy direction.
ILSpy.TextView uses Decompiler.Output, so a change to Decompiler.Output can break ILSpy.TextView, while a change to ILSpy.TextView can't break Decompiler.Output.
Position
Below the diagonal: ILSpy.TextView uses a module listed above it, which is the healthy direction.
ILSpy.TextView uses Decompiler.Disassembler, so a change to Decompiler.Disassembler can break ILSpy.TextView, while a change to ILSpy.TextView can't break Decompiler.Disassembler.
Position
Below the diagonal: ILSpy.TextView uses a module listed above it, which is the healthy direction.
ILSpy.TextView uses Decompiler.TypeSystem, so a change to Decompiler.TypeSystem can break ILSpy.TextView, while a change to ILSpy.TextView can't break Decompiler.TypeSystem.
Position
Below the diagonal: ILSpy.TextView uses a module listed above it, which is the healthy direction.
ILSpy.TextView uses Decompiler.Metadata, so a change to Decompiler.Metadata can break ILSpy.TextView, while a change to ILSpy.TextView can't break Decompiler.Metadata.
Position
Below the diagonal: ILSpy.TextView uses a module listed above it, which is the healthy direction.
ILSpy.TextView uses ILSpy.TreeNodes, so a change to ILSpy.TreeNodes can break ILSpy.TextView, while a change to ILSpy.TextView can't break ILSpy.TreeNodes.
Position
Below the diagonal: ILSpy.TextView uses a module listed above it, which is the healthy direction.
ILSpy.TextView uses ILSpy.ViewModels, so a change to ILSpy.ViewModels can break ILSpy.TextView, while a change to ILSpy.TextView can't break ILSpy.ViewModels.
Position
Below the diagonal: ILSpy.TextView uses a module listed above it, which is the healthy direction.
ILSpy.TextView uses ILSpy.Bookmarks, so a change to ILSpy.Bookmarks can break ILSpy.TextView, while a change to ILSpy.TextView can't break ILSpy.Bookmarks.
Position
Below the diagonal: ILSpy.TextView uses a module listed above it, which is the healthy direction.
31→32 ILSpy.TextView uses ILSpy.Languagespart of a loop✕
Connections
1 pair of types, where a type in ILSpy.TextView uses a type in ILSpy.Languages.
ILSpy.TextView uses ILSpy.Languages, so a change to ILSpy.Languages can break ILSpy.TextView, while a change to ILSpy.TextView can't break ILSpy.Languages.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
ILSpy.Languages uses Decompiler.DebugInfo, so a change to Decompiler.DebugInfo can break ILSpy.Languages, while a change to ILSpy.Languages can't break Decompiler.DebugInfo.
Position
Below the diagonal: ILSpy.Languages uses a module listed above it, which is the healthy direction.
ILSpy.Languages uses Decompiler.Output, so a change to Decompiler.Output can break ILSpy.Languages, while a change to ILSpy.Languages can't break Decompiler.Output.
Position
Below the diagonal: ILSpy.Languages uses a module listed above it, which is the healthy direction.
ILSpy.Languages uses Decompiler.CSharp.OutputVisitor, so a change to Decompiler.CSharp.OutputVisitor can break ILSpy.Languages, while a change to ILSpy.Languages can't break Decompiler.CSharp.OutputVisitor.
Position
Below the diagonal: ILSpy.Languages uses a module listed above it, which is the healthy direction.
ILSpy.Languages uses Decompiler.Disassembler, so a change to Decompiler.Disassembler can break ILSpy.Languages, while a change to ILSpy.Languages can't break Decompiler.Disassembler.
Position
Below the diagonal: ILSpy.Languages uses a module listed above it, which is the healthy direction.
ILSpy.Languages uses Decompiler.CSharp.Syntax, so a change to Decompiler.CSharp.Syntax can break ILSpy.Languages, while a change to ILSpy.Languages can't break Decompiler.CSharp.Syntax.
Position
Below the diagonal: ILSpy.Languages uses a module listed above it, which is the healthy direction.
ILSpy.Languages uses Decompiler.CSharp.Transforms, so a change to Decompiler.CSharp.Transforms can break ILSpy.Languages, while a change to ILSpy.Languages can't break Decompiler.CSharp.Transforms.
Position
Below the diagonal: ILSpy.Languages uses a module listed above it, which is the healthy direction.
ILSpy.Languages uses Decompiler.CSharp, so a change to Decompiler.CSharp can break ILSpy.Languages, while a change to ILSpy.Languages can't break Decompiler.CSharp.
Position
Below the diagonal: ILSpy.Languages uses a module listed above it, which is the healthy direction.
28 pairs of types, where a type in ILSpy.Languages uses a type in Decompiler.TypeSystem. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
ILSpy.Languages uses Decompiler.TypeSystem, so a change to Decompiler.TypeSystem can break ILSpy.Languages, while a change to ILSpy.Languages can't break Decompiler.TypeSystem.
Position
Below the diagonal: ILSpy.Languages uses a module listed above it, which is the healthy direction.
ILSpy.Languages uses Decompiler.Metadata, so a change to Decompiler.Metadata can break ILSpy.Languages, while a change to ILSpy.Languages can't break Decompiler.Metadata.
Position
Below the diagonal: ILSpy.Languages uses a module listed above it, which is the healthy direction.
ILSpy.Languages uses Decompiler.CSharp.ProjectDecompiler, so a change to Decompiler.CSharp.ProjectDecompiler can break ILSpy.Languages, while a change to ILSpy.Languages can't break Decompiler.CSharp.ProjectDecompiler.
Position
Below the diagonal: ILSpy.Languages uses a module listed above it, which is the healthy direction.
ILSpy.Languages uses ILSpyX.Abstractions, so a change to ILSpyX.Abstractions can break ILSpy.Languages, while a change to ILSpy.Languages can't break ILSpyX.Abstractions.
Position
Below the diagonal: ILSpy.Languages uses a module listed above it, which is the healthy direction.
ILSpy.Languages uses ILSpy.ViewModels, so a change to ILSpy.ViewModels can break ILSpy.Languages, while a change to ILSpy.Languages can't break ILSpy.ViewModels.
Position
Below the diagonal: ILSpy.Languages uses a module listed above it, which is the healthy direction.
ILSpy.Languages uses ILSpy.TextView, so a change to ILSpy.TextView can break ILSpy.Languages, while a change to ILSpy.Languages can't break ILSpy.TextView.
Position
Below the diagonal: ILSpy.Languages uses a module listed above it, which is the healthy direction.
ILSpy.AssemblyTree uses ILSpyX.TreeView, so a change to ILSpyX.TreeView can break ILSpy.AssemblyTree, while a change to ILSpy.AssemblyTree can't break ILSpyX.TreeView.
Position
Below the diagonal: ILSpy.AssemblyTree uses a module listed above it, which is the healthy direction.
ILSpy.AssemblyTree uses ILSpy.Util, so a change to ILSpy.Util can break ILSpy.AssemblyTree, while a change to ILSpy.AssemblyTree can't break ILSpy.Util.
Position
Below the diagonal: ILSpy.AssemblyTree uses a module listed above it, which is the healthy direction.
ILSpy.AssemblyTree uses Decompiler.TypeSystem, so a change to Decompiler.TypeSystem can break ILSpy.AssemblyTree, while a change to ILSpy.AssemblyTree can't break Decompiler.TypeSystem.
Position
Below the diagonal: ILSpy.AssemblyTree uses a module listed above it, which is the healthy direction.
ILSpy.AssemblyTree uses Decompiler.Metadata, so a change to Decompiler.Metadata can break ILSpy.AssemblyTree, while a change to ILSpy.AssemblyTree can't break Decompiler.Metadata.
Position
Below the diagonal: ILSpy.AssemblyTree uses a module listed above it, which is the healthy direction.
ILSpy.AssemblyTree uses ILSpy.TreeNodes, so a change to ILSpy.TreeNodes can break ILSpy.AssemblyTree, while a change to ILSpy.AssemblyTree can't break ILSpy.TreeNodes.
Position
Below the diagonal: ILSpy.AssemblyTree uses a module listed above it, which is the healthy direction.
ILSpy.AssemblyTree uses ILSpy.ViewModels, so a change to ILSpy.ViewModels can break ILSpy.AssemblyTree, while a change to ILSpy.AssemblyTree can't break ILSpy.ViewModels.
Position
Below the diagonal: ILSpy.AssemblyTree uses a module listed above it, which is the healthy direction.
ILSpy.AssemblyTree uses ILSpy.Languages, so a change to ILSpy.Languages can break ILSpy.AssemblyTree, while a change to ILSpy.AssemblyTree can't break ILSpy.Languages.
Position
Below the diagonal: ILSpy.AssemblyTree uses a module listed above it, which is the healthy direction.
33→35 ILSpy.AssemblyTree uses ILSpypart of a loop✕
Connections
3 pairs of types, where a type in ILSpy.AssemblyTree uses a type in ILSpy.
ILSpy.Commands uses ILSpyX.TreeView, so a change to ILSpyX.TreeView can break ILSpy.Commands, while a change to ILSpy.Commands can't break ILSpyX.TreeView.
Position
Below the diagonal: ILSpy.Commands uses a module listed above it, which is the healthy direction.
ILSpy.Commands uses Decompiler.TypeSystem, so a change to Decompiler.TypeSystem can break ILSpy.Commands, while a change to ILSpy.Commands can't break Decompiler.TypeSystem.
Position
Below the diagonal: ILSpy.Commands uses a module listed above it, which is the healthy direction.
ILSpy.Commands uses Decompiler.Metadata, so a change to Decompiler.Metadata can break ILSpy.Commands, while a change to ILSpy.Commands can't break Decompiler.Metadata.
Position
Below the diagonal: ILSpy.Commands uses a module listed above it, which is the healthy direction.
ILSpy.Commands uses ILSpy.TreeNodes, so a change to ILSpy.TreeNodes can break ILSpy.Commands, while a change to ILSpy.Commands can't break ILSpy.TreeNodes.
Position
Below the diagonal: ILSpy.Commands uses a module listed above it, which is the healthy direction.
ILSpy.Commands uses ILSpy.Metadata, so a change to ILSpy.Metadata can break ILSpy.Commands, while a change to ILSpy.Commands can't break ILSpy.Metadata.
Position
Below the diagonal: ILSpy.Commands uses a module listed above it, which is the healthy direction.
ILSpy.Commands uses ILSpy.ViewModels, so a change to ILSpy.ViewModels can break ILSpy.Commands, while a change to ILSpy.Commands can't break ILSpy.ViewModels.
Position
Below the diagonal: ILSpy.Commands uses a module listed above it, which is the healthy direction.
ILSpy.Commands uses ILSpy.TextView, so a change to ILSpy.TextView can break ILSpy.Commands, while a change to ILSpy.Commands can't break ILSpy.TextView.
Position
Below the diagonal: ILSpy.Commands uses a module listed above it, which is the healthy direction.
ILSpy.Commands uses ILSpy.Languages, so a change to ILSpy.Languages can break ILSpy.Commands, while a change to ILSpy.Commands can't break ILSpy.Languages.
Position
Below the diagonal: ILSpy.Commands uses a module listed above it, which is the healthy direction.
ILSpy.Commands uses ILSpy.AssemblyTree, so a change to ILSpy.AssemblyTree can break ILSpy.Commands, while a change to ILSpy.Commands can't break ILSpy.AssemblyTree.
Position
Below the diagonal: ILSpy.Commands uses a module listed above it, which is the healthy direction.
53 pairs of types, where a type in ILSpy.Commands uses a type in ILSpy. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
ILSpy.Analyzers uses ILSpyX.TreeView, so a change to ILSpyX.TreeView can break ILSpy.Analyzers, while a change to ILSpy.Analyzers can't break ILSpyX.TreeView.
Position
Below the diagonal: ILSpy.Analyzers uses a module listed above it, which is the healthy direction.
ILSpy.Analyzers uses Decompiler.Output, so a change to Decompiler.Output can break ILSpy.Analyzers, while a change to ILSpy.Analyzers can't break Decompiler.Output.
Position
Below the diagonal: ILSpy.Analyzers uses a module listed above it, which is the healthy direction.
ILSpy.Analyzers uses Decompiler.TypeSystem, so a change to Decompiler.TypeSystem can break ILSpy.Analyzers, while a change to ILSpy.Analyzers can't break Decompiler.TypeSystem.
Position
Below the diagonal: ILSpy.Analyzers uses a module listed above it, which is the healthy direction.
ILSpy.Analyzers uses ILSpy.TreeNodes, so a change to ILSpy.TreeNodes can break ILSpy.Analyzers, while a change to ILSpy.Analyzers can't break ILSpy.TreeNodes.
Position
Below the diagonal: ILSpy.Analyzers uses a module listed above it, which is the healthy direction.
ILSpy.Analyzers uses ILSpy.Docking, so a change to ILSpy.Docking can break ILSpy.Analyzers, while a change to ILSpy.Analyzers can't break ILSpy.Docking.
Position
Below the diagonal: ILSpy.Analyzers uses a module listed above it, which is the healthy direction.
ILSpy.Analyzers uses ILSpy.ViewModels, so a change to ILSpy.ViewModels can break ILSpy.Analyzers, while a change to ILSpy.Analyzers can't break ILSpy.ViewModels.
Position
Below the diagonal: ILSpy.Analyzers uses a module listed above it, which is the healthy direction.
ILSpy.Analyzers uses ILSpy.Languages, so a change to ILSpy.Languages can break ILSpy.Analyzers, while a change to ILSpy.Analyzers can't break ILSpy.Languages.
Position
Below the diagonal: ILSpy.Analyzers uses a module listed above it, which is the healthy direction.
ILSpy.Analyzers uses ILSpy.AssemblyTree, so a change to ILSpy.AssemblyTree can break ILSpy.Analyzers, while a change to ILSpy.Analyzers can't break ILSpy.AssemblyTree.
Position
Below the diagonal: ILSpy.Analyzers uses a module listed above it, which is the healthy direction.
ILSpy.Analyzers uses ILSpy.Commands, so a change to ILSpy.Commands can break ILSpy.Analyzers, while a change to ILSpy.Analyzers can't break ILSpy.Commands.
Position
Below the diagonal: ILSpy.Analyzers uses a module listed above it, which is the healthy direction.
ILSpy.Compare uses ILSpyX.TreeView, so a change to ILSpyX.TreeView can break ILSpy.Compare, while a change to ILSpy.Compare can't break ILSpyX.TreeView.
Position
Below the diagonal: ILSpy.Compare uses a module listed above it, which is the healthy direction.
ILSpy.Compare uses Decompiler.TypeSystem, so a change to Decompiler.TypeSystem can break ILSpy.Compare, while a change to ILSpy.Compare can't break Decompiler.TypeSystem.
Position
Below the diagonal: ILSpy.Compare uses a module listed above it, which is the healthy direction.
ILSpy.Compare uses ILSpy.TreeNodes, so a change to ILSpy.TreeNodes can break ILSpy.Compare, while a change to ILSpy.Compare can't break ILSpy.TreeNodes.
Position
Below the diagonal: ILSpy.Compare uses a module listed above it, which is the healthy direction.
ILSpy.Compare uses ILSpy.ViewModels, so a change to ILSpy.ViewModels can break ILSpy.Compare, while a change to ILSpy.Compare can't break ILSpy.ViewModels.
Position
Below the diagonal: ILSpy.Compare uses a module listed above it, which is the healthy direction.
ILSpy.Compare uses ILSpy.Languages, so a change to ILSpy.Languages can break ILSpy.Compare, while a change to ILSpy.Compare can't break ILSpy.Languages.
Position
Below the diagonal: ILSpy.Compare uses a module listed above it, which is the healthy direction.
ILSpy.ReadyToRun uses Decompiler.Output, so a change to Decompiler.Output can break ILSpy.ReadyToRun, while a change to ILSpy.ReadyToRun can't break Decompiler.Output.
Position
Below the diagonal: ILSpy.ReadyToRun uses a module listed above it, which is the healthy direction.
ILSpy.ReadyToRun uses Decompiler.TypeSystem, so a change to Decompiler.TypeSystem can break ILSpy.ReadyToRun, while a change to ILSpy.ReadyToRun can't break Decompiler.TypeSystem.
Position
Below the diagonal: ILSpy.ReadyToRun uses a module listed above it, which is the healthy direction.
ILSpy.ReadyToRun uses Decompiler.Metadata, so a change to Decompiler.Metadata can break ILSpy.ReadyToRun, while a change to ILSpy.ReadyToRun can't break Decompiler.Metadata.
Position
Below the diagonal: ILSpy.ReadyToRun uses a module listed above it, which is the healthy direction.
ILSpy.ReadyToRun uses ILSpy.Options, so a change to ILSpy.Options can break ILSpy.ReadyToRun, while a change to ILSpy.ReadyToRun can't break ILSpy.Options.
Position
Below the diagonal: ILSpy.ReadyToRun uses a module listed above it, which is the healthy direction.
ILSpy.ReadyToRun uses ILSpy.Languages, so a change to ILSpy.Languages can break ILSpy.ReadyToRun, while a change to ILSpy.ReadyToRun can't break ILSpy.Languages.
Position
Below the diagonal: ILSpy.ReadyToRun uses a module listed above it, which is the healthy direction.
ILSpy.Search uses Decompiler.TypeSystem, so a change to Decompiler.TypeSystem can break ILSpy.Search, while a change to ILSpy.Search can't break Decompiler.TypeSystem.
Position
Below the diagonal: ILSpy.Search uses a module listed above it, which is the healthy direction.
ILSpy.Search uses Decompiler.Metadata, so a change to Decompiler.Metadata can break ILSpy.Search, while a change to ILSpy.Search can't break Decompiler.Metadata.
Position
Below the diagonal: ILSpy.Search uses a module listed above it, which is the healthy direction.
ILSpy.Search uses ILSpyX.Abstractions, so a change to ILSpyX.Abstractions can break ILSpy.Search, while a change to ILSpy.Search can't break ILSpyX.Abstractions.
Position
Below the diagonal: ILSpy.Search uses a module listed above it, which is the healthy direction.
ILSpy.Search uses ILSpy.ViewModels, so a change to ILSpy.ViewModels can break ILSpy.Search, while a change to ILSpy.Search can't break ILSpy.ViewModels.
Position
Below the diagonal: ILSpy.Search uses a module listed above it, which is the healthy direction.
ILSpy.Views uses Decompiler.Metadata, so a change to Decompiler.Metadata can break ILSpy.Views, while a change to ILSpy.Views can't break Decompiler.Metadata.
Position
Below the diagonal: ILSpy.Views uses a module listed above it, which is the healthy direction.
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
64
High / Critical
A07:2025 — Authentication Failures
10
High / Critical
A03:2025 — Software Supply Chain Failures
3
Medium
A02:2025 — Security Misconfiguration
1
Medium
Roadmap
Address explicit code debt by resolving pragma disables, empty catch blocks, and write-only private fields, prioritizing fixes in LambdaOptionalAndParamsParameters, ShellHelper, and InitializerTests. Simultaneously, eliminate swallowed exceptions across the codebase to improve error visibility. Finally, correct sync-over-async patterns to prevent potential deadlocks and ensure robust asynchronous execution.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 37 EmptyCatchBlock finding(s) in Explicit Debt — start with ShellHelper.cs (3), IdStringProvider.cs (2), LoadedAssembly.cs (2).
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 — 186
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 — 1651
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 — 139
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 6
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 72 of 77 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 5 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 77 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 1952 of 1976 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: the test projects could not be restored because pkgs.dev.azure.com could not be reached (Unable to load the service index for source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json. [ICSharpCode.Decompiler.AotTest/ICSharpCode.Decompiler.AotTest.csproj]), so no test was built or run on this run. This is OURS — the scan's network path to the registry — and a TRANSIENT condition, NOT a statement about this repository's tests; coverage is excluded from the score rather than counted as a near-zero, and a re-run with the registry reachable measures it.
D10 Test Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 1,856 test(s) behind this row are the ones the C# collector could read, and this repository also carries at least 20 test source file(s) (.vb) that it cannot: it parses C# syntax and matches C# test attributes, so a vitest/jest/JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT MEASURED: the test run produced no results for any test tier, so no test ever ran and flakiness could not be exercised. The cause could not be attributed, so it is excluded from the score rather than read as an absence of tests.
D12 Dependency Hygiene — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. The NuGet registry this repository's packages resolve from could not be reached on this run, so no outdated, vulnerable or deprecated package could be read. The tool said: NU1301: Unable to load the service index for source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json. [ILSpy.slnx] The proxy tunnel request to proxy 'http://egress:3128/' failed with status code '403'." [ILSpy.slnx]. This is OUR side and an ENVIRONMENT fault — the collector exists and ran — so the remedy is the scan's network path to pkgs.dev.azure.com, and a re-run with it reachable measures this repository.
D17 Explicit Debt — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The C# workspace loaded this repository's projects but reported a load failure, and the dead-code reference search is unreliable over a graph that did not load cleanly, so it was skipped. The other debt markers on this row were read; dead symbols were not, and their absence from the score is not a finding that the code has none. First load diagnostic: Failure: Msbuild failed when processing the file 'ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj' with message: The URL of repository remote 'origin' is invalid: ''.
D18 Solution Shape — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. `dotnet build` reported 17 error(s), and the diagnostics it printed were: MSB3073: The command "pwsh -NoProfile -ExecutionPolicy Bypass -File BuildTools/update-assemblyinfo.ps1 Debug" exited with code 150.; MSB4019: The imported project "/root/.nuget/packages/microsoft.vssdk.buildtools/18.5.40034/tools/vssdk/Microsoft.VSSDK.targets" was not found. Confirm that the expression in the Import declaration "$(VSToolsPath)/vssdk/Microsoft.VSSDK.targets", which evaluated to "/root/.nuget/packages/microsoft.vssdk.buildtools/18.5.40034/build/../tools/vssdk/Microsoft.VSSDK.targets", is correct, and that the file exists on disk.. None of them is a .NET compiler diagnostic, which is the only signal this check reads as "the code does not compile", so the failure is recorded as a build-environment gap rather than a code defect. The usual causes are a project that targets a platform this run cannot build (a Windows-only target framework on a Linux worker) or a build step that shells out to a tool the image does not carry. Solution Shape is scored on structure and is NOT capped. Semantic analysis is independent of this build and covers every project that loaded — but a project whose restore did not complete has no resolved references, so treat its results as absent rather than clean. ★ The reach of that test, stated so this classification can be checked rather than taken on trust: it reads the C# (CS), Visual Basic (BC) and F# (FS) compiler series, and treats SDK, NuGet-restore and MSBuild codes (NETSDK, NU, MSB) as evidence that the build did not run rather than that the code is broken — read the diagnostics named above and judge for yourself. You can widen what we reach: if this build is meant to run off its own platform, without host tooling we do not carry, the diagnostics named above are what stopped it. If it is deliberately platform-bound — a Windows-only desktop product, say — there is nothing to do here: the note records our reach, not a defect in your build.
D23 Boundary Type-Coupling — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Large codebase (239,956 production LoC in the .NET projects) with no declared bounded contexts — cross-boundary type coupling is unassessed Bounded contexts cannot be inferred from a codebase that is not physically organised by them (D-321), so with none declared there are no boundaries for the coupling pass to measure across. You can widen what we reach: name this codebase's bounded contexts (≥2 module groups, e.g. per subsystem) so cross-boundary type coupling can 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"]`.
D30 Dependency Vulnerabilities — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Pkgs.dev.azure.com could not be reached (NU1900: Warning As Error: Error occurred while getting package vulnerability data: Unable to load the service index for source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json.). 2 of 3 declared ecosystem(s) (npm,osv) WERE scanned and every vulnerability they reported is included in this result; nuget was not, so this dimension's score covers less than the dependency surface this repository declares, and nothing here is evidence that nuget is free of known-vulnerable dependencies.
D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs`, `ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs`, `ICSharpCode.Decompiler/DebugInfo/AsyncDebugInfo.cs`, `ICSharpCode.Decompiler/Documentation/IdStringProvider.cs`, `ICSharpCode.Decompiler/Humanizer/Vocabulary.cs`, … (+28 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
D39 IL Efficiency — 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. `dotnet build` exited 1 with a compiler/MSBuild diagnostic, so there were no assemblies to read IL from. The build itself is D18's row, with the ask; nothing further is charged here.
AXR1 Runtime accessibility — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via REDACTED (REDACTED). the image ran but published no HTTP port — nothing to crawl (EXPOSE the web port to unlock runtime evidence).
ED5 Idempotency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads a handler's ENTRY METHODS to decide whether its mutation is safe to re-run. On these types it walked none of them, yet the same write oracle finds a persistent write in the type — so the mutation is there and the limit is in our entry-point recognition, not in the repository. Known shapes: a handler contract method implemented as an EXPLICIT INTERFACE IMPLEMENTATION, and a STATIC handler method (the Wolverine default).
IC1 Incompleteness & stubs — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 93 further occurrence(s) are not listed individually; the score already reflects all 133.
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.
X2 Cancellation propagation — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 45 further occurrence(s) are not listed individually; the score already reflects all 85.
X3 Exception handling — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 63 further occurrence(s) are not listed individually; the score already reflects all 103.
X4 Structured logging — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Structured logging could not be assessed in this run — the check did not complete, so it is not scored. This is a gap in the analyzer, not a finding about this repository. Engine failure: ArgumentException: Syntax node is not within syntax tree.
Package restore incomplete — third-party types were unresolved in part of the solution — NuGet restore did not complete for ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj, ILSpy.BamlDecompiler.Tests.Windows/ILSpy.BamlDecompiler.Tests.Windows.csproj, ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj, so those projects were analysed with framework references only: every check keyed on a third-party type saw an error type there and reported nothing. Findings on those projects are a lower bound; run `dotnet restore` on them and rescan.
Repo exclusion declarations: 1 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D18 Solution Shape: Build integrity reflects whether the solution compiled in this environment — a build that needs a private feed, a specific SDK, or a generated file absent from the repo can read as broken when it is merely unreproducible here.
D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
D22 Internal API Consistency: API-surface coherence is an LLM judgement over a sample of the public surface — consistency of intent across the whole API is approximated, not exhaustively verified.
D24 Comment Value: Comment value (WHY vs WHAT) is an LLM judgement over a bounded sample — it is advisory and cannot weigh a comment against the precise code change it was written to explain.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
The LLM boundary
LLM-set scores this run (5): D19, D21, D22, D24, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
364 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was CSharpPrimitiveCast.CSharpPrimitiveCastChecked at 170. A further 44 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 ILReader.DecodeInstruction at 221 — they are counted neither in the figure above nor in this dimension's score. 16 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: ILSpy/Metadata/MetadataTablesTreeNode.cs (MetadataTablesTreeNode.CreateTableTreeNode at 45), ICSharpCode.Decompiler/SRMExtensions.cs (SRMExtensions.SignatureIsKnownType at 33), ICSharpCode.Decompiler/CSharp/Syntax/Expressions/BinaryOperatorExpression.cs (BinaryOperatorExpression.GetLinqNodeType at 25), ICSharpCode.Decompiler/Util/ResXResourceWriter.cs (ResXResourceWriter.AddResource at 24), ICSharpCode.Decompiler/CSharp/Syntax/Expressions/UnaryOperatorExpression.cs (UnaryOperatorExpression.GetOperatorToken at 22), and 11 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 358 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 3 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with CSharpPrimitiveCast.CSharpPrimitiveCastChecked (cyclomatic 170), CSharpPrimitiveCast.CSharpPrimitiveCastUnchecked (cyclomatic 170), TranslatedExpression.ConvertTo (cyclomatic 130). — 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 5.0 to about 5.4/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
525 method(s) exceeded the cognitive complexity threshold of 15; the worst was SwitchOnStringTransform.MatchRoslynSwitchOnStringUsingLengthAndChar at 172.
+ 519 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 6 bodies over 120 down to 120 or less in Cognitive Complexity — start with SwitchOnStringTransform.MatchRoslynSwitchOnStringUsingLengthAndChar (cognitive 172), DynamicCallSiteTransform.ScanCallSiteInitBlock (cognitive 162), TranslatedExpression.ConvertTo (cognitive 158). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 6 together lifts Cognitive Complexity from 3.6 to about 4.3/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.4 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 48 MethodTooLong finding(s) in God Classes — start with SwitchOnStringTransform.cs (4), CSharpDecompiler.cs (3), CSharpPrimitiveCast.cs (2). — One of this dimension's main actionable groups (48 warning-level).
Resolve the 47 FileTooLong finding(s) in God Classes — start with ExpressionBuilder.cs, CSharpOutputVisitor.cs, CSharpDecompiler.cs. — One of this dimension's main actionable groups (47 warning-level).
Resolve the 34 TooManyMethods finding(s) in God Classes — start with CSharpOutputVisitor.cs, ExpressionBuilder.cs, DecompilerTextView.axaml.cs. — One of this dimension's main actionable groups (34 warning-level).
Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
137 duplicated block group(s) detected. A further 4 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.
+ 42 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 14 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with TypeSystemAstBuilder.cs (2), ExpressionBuilder.cs, DecompileAllCommand.cs. — One of this dimension's main actionable groups (14 warning-level).
Resolve the 12 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with MetadataMethod.cs (2), YieldReturnDecompiler.cs, TransformArrayInitializers.cs. — One of this dimension's main actionable groups (12 warning-level).
Resolve the 12 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with ConnectionIdRewritePass.cs, SpecializedMethod.cs, RuntimeAsyncExceptionRewriteTransform.cs. — One of this dimension's main actionable groups (12 warning-level).
Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling9.6 / 10Stronggated by 1 serious finding✓ 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.
Off the main sequence: ICSharpCode.DecompilerICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj:1
What to do
Resolve the 1 Off the main sequence finding(s) in Coupling — start with ICSharpCode.Decompiler.csproj. — One of this dimension's main actionable groups (1 warning-level).
Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 5 Low cohesion finding(s) in Cohesion (LCOM4) — start with ILInstruction.cs, ReflectionDisassembler.cs, MetadataTypeDefinition.cs. — One of this dimension's main actionable groups (5 warning-level).
Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
1853 test methods: 1853 unit, 0 integration, 0 BDD, 0 e2e.
✓ On the Gold path — maintain.
Detailed fixes: d9_recommendation.md.
Do you agree with this assessment?
D10 · Test Quality10.0 / 10Stronggated by 2 serious findings✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
13 skipped (12 with a documented reason), 0 zero-assertion, 1 depending on a live external host, 1 skipped with a live token-identical twin, 2 mock references across 1856 tests. Measured on the C# suite only — at least 20 test source file(s) (.vb) went unread, so its test quality is unmeasured and is not in these counts.
Resolve the 1 Skipped test finding(s) in Test Quality — start with ILPrettyTestRunner.cs. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Depends on a live external host finding(s) in Test Quality — start with FileUtilityTests.cs. — One of this dimension's main actionable groups (1 warning-level).
Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
Resolve the 2 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
Enforce REDACTED Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 7 packages use a banned license. ★ DEPTH: every package graded here is one this repository's MSBuild projects declare as a direct `PackageReference` (61 declared), and nothing beyond them was reached — this is the DECLARATION-SITE set, NOT the transitive closure. .NET has no lockfile a checkout is guaranteed to carry and this pass grades an unrestored tree, so a banned licence that only a direct dependency's OWN dependencies pull in is outside this verdict, exactly as the JVM arm's declaration-site verdict is.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Resolve the 37 Hotspot finding(s) in Churn × Complexity Hotspots — start with CSharpDecompiler.cs, ExpressionBuilder.cs, TransformExpressionTrees.cs. — One of this dimension's main actionable groups (37 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor5.0 / 10Adequate✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
252 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is ICSharpCode.Decompiler/CSharp/Transforms/PatternStatementTransform.cs. Counted over 509 of the 674 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1 · ×3
Further sole-owners (lower concentration)
What to do
Resolve the 3 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (3 recommendation-level).
Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
387 deducted debt markers + unmeasured dead symbols across 239956 LoC in the .NET projects (0.8/KLoC) → score 8.4. Dead code not measured: the solution did not load cleanly, so the reference search was skipped.
NoWarnInCsproj — 23 warning codes suppressed in one element · ×7ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj:32
+ 10 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 42 WriteOnlyPrivateField finding(s) in Explicit Debt — start with InitializerTests.cs (8), Issue3598.cs (7), Generics.cs (6). — One of this dimension's main actionable groups (42 issue-level).
Resolve the 37 EmptyCatchBlock finding(s) in Explicit Debt — start with ShellHelper.cs (3), IdStringProvider.cs (2), LoadedAssembly.cs (2). — One of this dimension's main actionable groups (37 issue-level).
Resolve the 16 FileScopedPragmaDisable finding(s) in Explicit Debt — start with LambdaOptionalAndParamsParameters.cs (2), CustomTaskType.cs (2), CSharpAmbienceTests.cs. — One of this dimension's main actionable groups (16 issue-level).
Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the solution is laid out in a sensible, conventional structure.
Method: Solution structure: project count, decomposition, shell-project detection, build success (confirmed failures cap the score); traced to actual .sln files and binaries. Deterministic.
20 projects, 1831 source files, 347492 hand-written lines of code (239956 production / 107536 test — the split is derived per file: test is what its project, its own path, or a compile-guarded region marks as test, and a file carrying no test signal counts as production), plus 3514 generated (machine-written code — designer, scaffolded and tool-emitted files — excluded from quality), 24 inter-project edges (build NOT measured — `dotnet build` did not complete in the analyzer, so the build half of this dimension is unmeasured rather than failed: the score above rests on structure alone and is not capped. The diagnostics that stopped it are named under Limitations.) Measured across 3 solutions loaded as one workspace: `ILSpy.slnx`, `ILSpy.Installer.sln`, `ILSpy.VSExtensions.slnx`.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.
This repository is a collection of focused READMEs and architecture/design docs for the ILSpy decompiler/assembly browser project. The READMEs document each directory (e.g. correctness tests, prettiness tests, C# syntax tree generator) rather than the root project, so an overview, installation, or usage section would belong to the repository's top-level README. All visible documents are well-structured: the decompiler architecture is a full HTML/HTML5 document with navigation and a clipped outline (Introduction and design goals; The pipeline at a glance; Inputs...); ILSpy command-line options are documented in Command Line.txt; and there is an explicit licence statement for each project. Internal jargon is absent, and no document contradicts the code. (14 of 25 sampled documents could not be assessed: 1 of 2 evaluation groups failed.)
Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.
0 naming inconsistencies across 200 sampled symbols.
✓ On the Gold path — maintain.
Detailed fixes: d21_recommendation.md.
Do you agree with this assessment?
D22 · Internal API ConsistencyExemplary◐ Sampled · advisory
What it measures: Whether the internal API surface is consistent and coherent.
Method: Judged by language model at low temperature over a sample of the public API surface (IsPackable or .Contracts types). Sampled, advisory; confidence discounted by model uncertainty.
What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).
Method: Judged by language model at low temperature (0.0-0.1) on deterministically sampled inline comments with surrounding code; findings verified back to sampled comments by substring match. Advisory, sampled.
3 of 20 projects flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: 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.
45 % of calls cross a namespace and 2 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: large — vertical-slice locality expected.
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.
7 finding(s): 0 critical, 7 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
REDACTED
What to do
Resolve the 5 High secret finding(s) in Secrets (history) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (5 issue-level).
Resolve the 2 REDACTED finding(s) in Secrets (history) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
65 finding(s): 0 critical, 56 high, 9 medium, 0 low. 46 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 87 file(s) — `ICSharpCode.Decompiler.Tests/DebugStepRecordingTests.cs` (lines 342–343, line 366), `ICSharpCode.Decompiler.Tests/Helpers/StepperTesting.cs` (lines 48–49, line 57), `ICSharpCode.Decompiler.Tests/ProjectDecompiler/ProjectFileWriterDefaultTests.cs` (line 44), `ICSharpCode.Decompiler.Tests/ProjectDecompiler/WholeProjectDecompilerTests.cs` (lines 281–282, lines 292–299, line 301, …), `ICSharpCode.Decompiler.Tests/ProjectDecompiler/WpfProjectExportTests.cs` (lines 440–441, line 450), … (+82 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. In 50 of those file(s) — `ICSharpCode.Decompiler.Tests/DebugStepRecordingTests.cs`, `ICSharpCode.Decompiler.Tests/Helpers/StepperTesting.cs`, `ICSharpCode.Decompiler.Tests/ProjectDecompiler/WholeProjectDecompilerTests.cs`, `ICSharpCode.Decompiler.Tests/ProjectDecompiler/WpfProjectExportTests.cs`, `ICSharpCode.Decompiler.Tests/TestCases/ILPretty/FSharpLoops_Debug.cs`, … (+45 more) — the break is a C# primary constructor, which semgrep's grammar cannot parse and which hides the type from every rule scoped to it; those files were re-scanned from a shadow copy with the constructor's parameter list blanked (line and column preserving), which restores the type to the rules, and 0 additional row(s) came from that pass. Only the header's own parameter list is unread in them. In 16 of those file(s) — `ICSharpCode.Decompiler.Tests/TestCases/Correctness/UndocumentedExpressions.cs`, `ICSharpCode.Decompiler.Tests/TestCases/ILPretty/ExtensionEncodingV1.cs`, `ICSharpCode.Decompiler.Tests/TestCases/ILPretty/ExtensionEncodingV2.cs`, `ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstructorInitializers.cs`, `ICSharpCode.Decompiler.Tests/TestCases/Pretty/DynamicTests.cs`, … (+11 more) — the break is at a TYPE DECLARATION (a C# primary constructor semgrep's grammar cannot parse), so the loss is wider than the named lines: rules scoped to that type see no type to scope to and are blind over its whole body, while rules matching statements keep working there. Absence of a type-scoped finding in those types is not evidence of anything. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 5 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3). — One of this dimension's main actionable groups (3 issue-level).
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 issue-level).
No action in Static Analysis (SAST) — all 46 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 (46 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05.
No known-vulnerable dependencies in the 2 ecosystem(s) that were scanned (npm,osv). Partial dependency scan: 2 of 3 declared ecosystem(s) were scanned (npm,osv), and the findings above are real and complete for them. nuget was not scanned (nuget: pkgs.dev.azure.com could not be reached (NU1900: Warning As Error: Error occurred while getting package vulnerability data: Unable to load the service index for source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json.)), so this is not the whole dependency surface and the result is reported at reduced confidence.
Resolve the 1 Medium IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
3 of 509 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is ICSharpCode.Decompiler/Util/CSharpPrimitiveCast.cs. Counted over 509 of the 674 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Resolve the 1 Orphaned knowledge finding(s) in Knowledge Freshness — start with CSharpPrimitiveCast.cs. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 2 Orphaned file finding(s) in Knowledge Freshness — start with SolutionCreator.cs, AssemblySearchStrategy.cs. — One of this dimension's main actionable groups (2 recommendation-level).
Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 2 Change coupling finding(s) in Change Coupling — start with CSharpOutputVisitor.cs, GeneratePdbContextMenuEntry.cs. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. SCORED, not informational.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 21 platform declaration(s) and 0 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
The namespaces ICSharpCode.Decompiler ↔ ICSharpCode.Decompiler.CSharp ↔ ICSharpCode.Decompiler.CSharp.OutputVisitor ↔ ICSharpCode.Decompiler.CSharp.Resolver ↔ ICSharpCode.Decompiler.CSharp.Syntax ↔ ICSharpCode.Decompiler.CSharp.Syntax.PatternMatching ↔ ICSharpCode.Decompiler.CSharp.Transforms ↔ ICSharpCode.Decompiler.DebugInfo ↔ ICSharpCode.Decompiler.Disassembler ↔ ICSharpCode.Decompiler.Documentation ↔ ICSharpCode.Decompiler.FlowAnalysis ↔ ICSharpCode.Decompiler.IL ↔ ICSharpCode.Decompiler.IL.ControlFlow ↔ ICSharpCode.Decompiler.IL.Patterns ↔ ICSharpCode.Decompiler.IL.Transforms ↔ ICSharpCode.Decompiler.Metadata ↔ ICSharpCode.Decompiler.Output ↔ ICSharpCode.Decompiler.Semantics ↔ ICSharpCode.Decompiler.TypeSystem ↔ ICSharpCode.Decompiler.TypeSystem.Implementation depend on each other. The lightest dependency in the cycle is ICSharpCode.Decompiler → ICSharpCode.Decompiler.Documentation (ICSharpCode.Decompiler.DecompileRun → ICSharpCode.Decompiler.Documentation.IDocumentationProvider, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — ICSharpCode.Decompiler/DecompileRun.cs:24
The namespaces ICSharpCode.BamlDecompiler ↔ ICSharpCode.BamlDecompiler.Xaml depend on each other. The lightest dependency in the cycle is ICSharpCode.BamlDecompiler → ICSharpCode.BamlDecompiler.Xaml (ICSharpCode.BamlDecompiler.XamlContext → ICSharpCode.BamlDecompiler.Xaml.XamlProperty, 3 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — ICSharpCode.BamlDecompiler/XamlContext.cs:31
The namespaces ICSharpCode.ILSpyX ↔ ICSharpCode.ILSpyX.Abstractions ↔ ICSharpCode.ILSpyX.FileLoaders ↔ ICSharpCode.ILSpyX.Instrumentation ↔ ICSharpCode.ILSpyX.Search depend on each other. The lightest dependency in the cycle is ICSharpCode.ILSpyX → ICSharpCode.ILSpyX.Instrumentation (ICSharpCode.ILSpyX.MyAssemblyResolver → ICSharpCode.ILSpyX.Instrumentation.AssemblyResolveOutcome, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — ICSharpCode.ILSpyX/LoadedAssembly.cs:34
The namespaces ICSharpCode.ILSpy ↔ ICSharpCode.ILSpy.AssemblyTree ↔ ICSharpCode.ILSpy.Bookmarks ↔ ICSharpCode.ILSpy.Commands ↔ ICSharpCode.ILSpy.Controls.Omnibar ↔ ICSharpCode.ILSpy.Controls.TreeView ↔ ICSharpCode.ILSpy.Docking ↔ ICSharpCode.ILSpy.Languages ↔ ICSharpCode.ILSpy.Metadata ↔ ICSharpCode.ILSpy.Navigation ↔ ICSharpCode.ILSpy.Options ↔ ICSharpCode.ILSpy.Search ↔ ICSharpCode.ILSpy.TextView ↔ ICSharpCode.ILSpy.TreeNodes ↔ ICSharpCode.ILSpy.Util ↔ ICSharpCode.ILSpy.ViewModels depend on each other. The lightest dependency in the cycle is ICSharpCode.ILSpy → ICSharpCode.ILSpy.Docking (ICSharpCode.ILSpy.MainMenu → ICSharpCode.ILSpy.Docking.DockWorkspace, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — ILSpy/Views/MainMenu.axaml.cs:36
What to do
Break namespace cycles inside a project by moving the shared type to a namespace both sides can use, or by inverting the back edge behind an interface.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Other · Architecture — Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.
Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.
Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.
`IMethod` declares 17 members: `GetReturnTypeAttributes`, `ReturnTypeIsRefReadOnly`, `IsInitOnly`, `ThisIsRefReadOnly`, `TypeParameters`, `TypeArguments`, `IsExtensionMethod`, `IsLocalFunction`, `IsConstructor`, `IsDestructor`, `IsOperator`, `HasBody`, `IsAccessor`, `AccessorOwner`, `AccessorKind`, `ReducedFrom`, `Specialize`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — ICSharpCode.Decompiler/TypeSystem/IMethod.cs:30
`IType` declares 25 members: `Kind`, `IsReferenceType`, `IsByRefLike`, `Nullability`, `ChangeNullability`, `GetDefinition`, `GetDefinitionOrUnknown`, `DeclaringType`, `TypeParameterCount`, `TypeParameters`, `TypeArguments`, `AcceptVisitor`, `VisitChildren`, `DirectBaseTypes`, `GetSubstitution`, `GetNestedTypes`, `GetNestedTypes`, `GetConstructors`, `GetMethods`, `GetMethods`, `GetProperties`, `GetFields`, `GetEvents`, `GetMembers`, `GetAccessors`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 25 declarations carry 23 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 23 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — ICSharpCode.Decompiler/TypeSystem/IType.cs:52
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Do you agree with this assessment?
C2 · Access Controls7.0 / 10Strong✓ Tool-verified
Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.
Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.
Authorization IS enforced here (by imperative guard methods that throw on violation) — this is NOT a claim that the code is unprotected. What's missing is a NAMED rule set: the guards encode the access rules inline, so the rules can't be listed, reviewed or tested apart from the call sites that apply them. Recommendation, not a defect.
What to do
Name the access rules — give each one a named predicate/policy object your guards consult, so the rule set can be reviewed and unit-tested independently of the call sites that enforce it.
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 member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface. (×4) — ICSharpCode.Decompiler/FlowAnalysis/DataFlowVisitor.cs:842, ICSharpCode.Decompiler/IL/ILAmbience.cs:40, ICSharpCode.Decompiler/Metadata/FullTypeNameSignatureDecoder.cs:122, …
What to do
Finish or delete NotImplementedException stubs and replace placeholder literals before shipping.
Other · Code Health — Unfinished work detected by code SHAPE, not keywords: members that only throw a "not implemented" exception, methods that take inputs and return a constant, async methods that never await, dead `if (false)` / `#if false` branches, and skeleton types most of whose members are holes. A real, objective slice of technical debt.
Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.
The only thing establishing that `attr.FixedArguments` is long enough before it is indexed is a `Debug.Assert`, which is `[Conditional("DEBUG")]` — the compiler deletes the call from Release, so the build your users install indexes `attr.FixedArguments` with no length check at all and throws at the indexer instead of failing diagnosably. `attr.FixedArguments` comes from outside this method, so its length is a contract, not something this code can see. Bound it with a check that ships (`if (attr.FixedArguments.Count < n) throw …`, or `ArgumentOutOfRangeException.ThrowIfLessThan`), and keep the assert for the invariant you believe holds. — ICSharpCode.BamlDecompiler/Handlers/Records/XmlnsPropertyHandler.cs:44
Control only reaches here when `reader.RemainingBytes < 1` is false, because the guard on line 612 exits otherwise. This test is therefore always false and everything it guards is unreachable. Implement the distinction that was intended, or delete the test. — ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:624
The only thing establishing that `inst.Arguments` is long enough before it is indexed is a `Debug.Assert`, which is `[Conditional("DEBUG")]` — the compiler deletes the call from Release, so the build your users install indexes `inst.Arguments` with no length check at all and throws at the indexer instead of failing diagnosably. `inst.Arguments` comes from outside this method, so its length is a contract, not something this code can see. Bound it with a check that ships (`if (inst.Arguments.Count < n) throw …`, or `ArgumentOutOfRangeException.ThrowIfLessThan`), and keep the assert for the invariant you believe holds. — ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:4890
The only thing establishing that `values` is long enough before it is indexed is a `Debug.Assert`, which is `[Conditional("DEBUG")]` — the compiler deletes the call from Release, so the build your users install indexes `values` with no length check at all and throws at the indexer instead of failing diagnosably. `values` comes from outside this method, so its length is a contract, not something this code can see. Bound it with a check that ships (`if (values.Count < n) throw …`, or `ArgumentOutOfRangeException.ThrowIfLessThan`), and keep the assert for the invariant you believe holds. — ICSharpCode.Decompiler/CSharp/StatementBuilder.cs:254
`VisitILFunction` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — ICSharpCode.Decompiler/FlowAnalysis/DataFlowVisitor.cs:842
`ConvertConstantValue` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — ICSharpCode.Decompiler/IL/ILAmbience.cs:40
The only thing establishing that `EntryPoint.Instructions` is long enough before it is indexed is a `Debug.Assert`, which is `[Conditional("DEBUG")]` — the compiler deletes the call from Release, so the build your users install indexes `EntryPoint.Instructions` with no length check at all and throws at the indexer instead of failing diagnosably. `EntryPoint.Instructions` comes from outside this method, so its length is a contract, not something this code can see. Bound it with a check that ships (`if (EntryPoint.Instructions.Count < n) throw …`, or `ArgumentOutOfRangeException.ThrowIfLessThan`), and keep the assert for the invariant you believe holds. — ICSharpCode.Decompiler/IL/Instructions/BlockContainer.cs:217
The only thing establishing that `rangeCtorCall.Arguments` is long enough before it is indexed is a `Debug.Assert`, which is `[Conditional("DEBUG")]` — the compiler deletes the call from Release, so the build your users install indexes `rangeCtorCall.Arguments` with no length check at all and throws at the indexer instead of failing diagnosably. `rangeCtorCall.Arguments` comes from outside this method, so its length is a contract, not something this code can see. Bound it with a check that ships (`if (rangeCtorCall.Arguments.Count < n) throw …`, or `ArgumentOutOfRangeException.ThrowIfLessThan`), and keep the assert for the invariant you believe holds. — ICSharpCode.Decompiler/IL/Transforms/IndexRangeTransform.cs:435
`GetPrimitiveType` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — ICSharpCode.Decompiler/IL/Transforms/LocalFunctionDecompiler.cs:919
`GetSZArrayType` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — ICSharpCode.Decompiler/IL/Transforms/LocalFunctionDecompiler.cs:920
`GetTypeFromReference` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — ICSharpCode.Decompiler/IL/Transforms/LocalFunctionDecompiler.cs:931
`GetUnderlyingEnumType` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — ICSharpCode.Decompiler/Metadata/FullTypeNameSignatureDecoder.cs:122
`GetHashCode` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — ICSharpCode.Decompiler/Util/LongSet.cs:368
`Error` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — ICSharpCode.ILSpyX/Search/CSharpLexer.cs:1107
`AddMessage` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — ILSpy.AddIn.VS2022/Decompiler/Dummy.cs:30
The `if` and its `else` contain the same 1 statement, so no input can make the condition matter. Implement the distinction that was intended, or drop the branch and keep the body. — ILSpy/Controls/MutexChipGroup.cs:114
A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something. (×10) — ICSharpCode.Decompiler.Tests/ILPrettyTestRunner.cs:72, ICSharpCode.Decompiler.Tests/RoundtripAssembly.cs:126, ICSharpCode.Decompiler.Tests/Semantics/ConversionTests.cs:980, …
A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers). (×8) — ICSharpCode.Decompiler/CSharp/AutoEventDecompiler.cs:270, ICSharpCode.Decompiler/CSharp/AutoEventDecompiler.cs:272, ICSharpCode.Decompiler/CSharp/AutoEventDecompiler.cs:273, …
16 consecutive lines of code sit inside a `/* … */` block — a block of code switched off rather than removed, which rots and confuses. Delete it (version control remembers). — ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:3045
6 consecutive lines of code sit inside a `/* … */` block — a block of code switched off rather than removed, which rots and confuses. Delete it (version control remembers). — ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpFormattingOptions.cs:973
30 consecutive lines of code sit inside a `/* … */` block — a block of code switched off rather than removed, which rots and confuses. Delete it (version control remembers). — ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpFormattingOptions.cs:980
19 consecutive lines of code sit inside a `/* … */` block — a block of code switched off rather than removed, which rots and confuses. Delete it (version control remembers). — ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpFormattingOptions.cs:1011
20 consecutive lines of code sit inside a `/* … */` block — a block of code switched off rather than removed, which rots and confuses. Delete it (version control remembers). — ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpFormattingOptions.cs:1031
5 consecutive lines of code sit inside a `/* … */` block — a block of code switched off rather than removed, which rots and confuses. Delete it (version control remembers). — ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:1277
What to do
Finish or delete the unfinished stubs (NotImplementedException / empty / constant-returning bodies) — they are dead surface that looks live.
Clear the softer debt: remove commented-out code and dead branches, re-enable or delete skipped tests, and replace blanket warning suppressions with targeted ones.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
Add a README to the 14 of 19 project(s) that lack one — worth up to 1.5 pts.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.
What to do
Group production code under src/ (or split deliberately, e.g. backend/ + frontend/) so production and tooling code aren't mixed at the root.
Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
doc/CollectingEventTraces.md documents the setting `Name:KeywordMask:Level`, but no code or configuration file names `KeywordMask`. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — doc/CollectingEventTraces.md:38
doc/ImageListFormat.md links to `ImageListDecoder.cs`, but `doc/ImageListDecoder.cs` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — doc/ImageListFormat.md:3
doc/ImageListFormat.md documents the environment variable `ILC_COLOR`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — doc/ImageListFormat.md:135
doc/ImageListFormat.md documents the environment variable `ILC_COLOR4`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — doc/ImageListFormat.md:136
doc/ImageListFormat.md documents the environment variable `ILC_COLOR8`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — doc/ImageListFormat.md:137
doc/ImageListFormat.md documents the environment variable `ILC_COLOR16`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — doc/ImageListFormat.md:138
doc/ImageListFormat.md documents the environment variable `ILC_COLOR24`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — doc/ImageListFormat.md:139
doc/ImageListFormat.md documents the environment variable `ILC_COLOR32`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — doc/ImageListFormat.md:140
What to do
Reconcile the README with reality: doc/CollectingEventTraces.md documents the setting `Name:KeywordMask:Level`, but no code or configuration file names `KeywordMask`; doc/ImageListFormat.md links to `ImageListDecoder.cs`, but `doc/ImageListDecoder.cs` does not exist; doc/ImageListFormat.md documents the environment variable `ILC_COLOR`, but no code, script or configuration file names it; doc/ImageListFormat.md documents the environment variable `ILC_COLOR4`, but no code, script or configuration file names it; doc/ImageListFormat.md documents the environment variable `ILC_COLOR8`, but no code, script or configuration file names it.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
`NoWarn` silences NU1902, NU1903 — NuGet's vulnerability-audit warnings for moderate and high advisories. Suppressed advisories are still shipped; they are only invisible in the build log. Remove these codes from NoWarn and address or explicitly accept each advisory instead. — ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj:32
What to do
Dependabot is configured but does not watch `nuget`, `npm`, `gitsubmodule` — add those `package-ecosystem` entries to REDACTED so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
What to do
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.
Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.
No benchmark suite was found by the two searches this check runs. FIRST, a BenchmarkDotNet package reference in any project file — every project the workspace loaded, plus a walk of project files on disk that never loaded, because a benchmark suite is exactly the project a partial load drops. SECOND, a script harness: a file whose name contains `benchmark` and ends `.py`, `.sh`, `.ps1`, `.bash`, `.rb`, `.js` or `.mjs`, credited ONLY when this repository's CI text also mentions benchmarks — a harness no pipeline runs is read as a fixture, deliberately. Neither search can see a benchmark suite in another ecosystem's idiom (a Go `testing.B` file, a JMH or criterion project, a pytest-benchmark run), so this is 'no benchmark found by those two searches', not a verdict that the repository has none. Where code is performance-sensitive, a benchmark guards against silent regressions — but it's a bonus here, not a deduction.
What to do
Add a benchmarking harness for the hot paths and run it in CI to catch regressions (for .NET, a BenchmarkDotNet project with [MemoryDiagnoser] to track allocations).
Readiness · Performance — Whether the code is written to minimise allocations so it doesn't pressure its host's memory manager — buffer/slice views over copies, object pooling, stack or value-type allocation, and buffer writers. Reward-only: credited where present, never penalised where a simpler style is fine.
Method: Production-source scan: density (per 1k LoC) of allocation-aware APIs — in .NET Span/Memory, ArrayPool/ObjectPool, stackalloc, ValueTask, value-type structs, IBufferWriter, string.Create, SkipLocalsInit; off .NET, with comments and strings blanked, Go's sync.Pool, preallocated slices/maps, Grow, strconv.Append* and buf[:0] reuse; the JVM's NIO buffer views, MemorySegment, primitive collections, pools and literal presizes (plus Kotlin primitive arrays and value classes, Scala AnyVal and @specialized); Swift's reserveCapacity, ContiguousArray, withUnsafe* access and ~Copyable. Activated off .NET on the same floor (400 lines, and benchmarks or 8 uses); Rust and garbage-collected scripting languages are not applicable. Reward-only. Deterministic, syntax/text detection.
What to do
Raise allocation-aware density on the hot paths — currently 75 use(s) across 243,674 production line(s) (~0.3/1k). More Span/Memory, pooling (ArrayPool/ObjectPool), stackalloc and ValueTask on the allocation-heavy paths climbs this toward 10.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from the language model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
22 blocking call(s) on async work (.Wait()/.GetAwaiter().GetResult()) — these waste a thread and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
`task.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). — ICSharpCode.Decompiler.PowerShell/GetDecompiledProjectCmdlet.cs:97
`.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). (×21) — ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs:268, ICSharpCode.ILSpyCmd/InputFileLoader.cs:124, ICSharpCode.ILSpyX/Analyzers/AnalyzerScope.cs:103, …
What to do
Make the call chain async end-to-end and await it — never block on a Task with .Wait()/.GetAwaiter().GetResult().
Other · Security — Cryptographic hygiene (weak hash/cipher, password key-derivation). This codebase has no web surface, so transport/header/cookie/CSRF controls are N/A and only crypto is scored. Markup this repository SHIPS is scored for third-party script integrity whether or not the repository serves it itself — a page handed to a consumer runs in that consumer's origin.
Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.
`https://cdn.jsdelivr.net/npm/mermaid@11.4.0/dist/mermaid.min.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. — ICSharpCode.ILSpyX/MermaidDiagrammer/html/template.html:191
What to do
Pin third-party scripts and verify them: name an exact version in the URL and add an `integrity="sha384-…"` hash alongside `crossorigin="anonymous"` (both are required — an integrity hash on a cross-origin script without `crossorigin` is not evaluated, it blocks the script). Where the vendor ships a continuously-updated loader and publishes no stable hash (tag managers, analytics, chat widgets), Subresource Integrity is not available: constrain it instead with a `Content-Security-Policy` that names the exact origins allowed to execute, and drop the script from the pages that do not need it. Where the page is shipped inside a package that others host, prefer vendoring the asset and serving it from the app’s own origin, so no consumer inherits a third-party dependency they did not choose.
Do you agree with this assessment?
X1 · Async correctness4.7 / 10Weak✓ Tool-verified
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process. (×22) — ICSharpCode.Decompiler.PowerShell/GetDecompiledProjectCmdlet.cs:97, ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs:268, ICSharpCode.ILSpyCmd/InputFileLoader.cs:124, …
Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout. — ICSharpCode.ILSpyX/LoadedAssembly.cs:374
`async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained. (×6) — ILSpy/Commands/FileCommands.cs:49, ILSpy/Commands/FileCommands.cs:261, ILSpy/Controls/TreeView/SharpTreeView.cs:665, …
Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.
Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.
Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.
Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X17 · Uncapped recursion over a caller-supplied document2.2 / 10Critical✓ Tool-verified
Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.
Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.
`Run` is public, takes a document from its caller (line 35) and hands it to `ProcessElement`, which calls itself at line 56 with a child of the node it was given — and nowhere in `ProcessElement` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the tree it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A document nested past the stack that remains raises `StackOverflowException`, which .NET neither lets you catch nor unwinds: the process is torn down where it stands, taking every other request in flight with it, and no `try`/`catch` around `Run` can intervene. Thread a depth argument through `ProcessElement` and reject the document past a fixed maximum, or rewrite the descent with an explicit stack. — ICSharpCode.BamlDecompiler/Rewrite/AttributeRewritePass.cs:56
`Run` is public, takes a document from its caller (line 42) and hands it to `ProcessConnectionIds`, which calls itself at line 53 with a child of the node it was given — and nowhere in `ProcessConnectionIds` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the tree it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A document nested past the stack that remains raises `StackOverflowException`, which .NET neither lets you catch nor unwinds: the process is torn down where it stands, taking every other request in flight with it, and no `try`/`catch` around `Run` can intervene. Thread a depth argument through `ProcessConnectionIds` and reject the document past a fixed maximum, or rewrite the descent with an explicit stack. — ICSharpCode.BamlDecompiler/Rewrite/ConnectionIdRewritePass.cs:53
`Run` is public, takes a document from its caller (line 38) and hands it to `ProcessElement`, which calls itself at line 60 with a child of the node it was given — and nowhere in `ProcessElement` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the tree it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A document nested past the stack that remains raises `StackOverflowException`, which .NET neither lets you catch nor unwinds: the process is torn down where it stands, taking every other request in flight with it, and no `try`/`catch` around `Run` can intervene. Thread a depth argument through `ProcessElement` and reject the document past a fixed maximum, or rewrite the descent with an explicit stack. — ICSharpCode.BamlDecompiler/Rewrite/MarkupExtensionRewritePass.cs:60
What to do
Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.
Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.
`rdr` is a `BinaryReader`, which implements `IDisposable`, and it is created here (line 50). Every use of it in `IsBamlHeader` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var rdr = …;`), which releases it at the end of the scope on every path including a throw. — ICSharpCode.BamlDecompiler/Baml/BamlReader.cs:50
`rdr` is a `BinaryReader`, which implements `IDisposable`, and it is created here (line 65). Every use of it in `ReadSignature` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var rdr = …;`), which releases it at the end of the scope on every path including a throw. — ICSharpCode.BamlDecompiler/Baml/BamlReader.cs:65
`wtr` is a `BinaryWriter`, which implements `IDisposable`, and it is created here (line 45). Every use of it in `WriteDocument` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var wtr = …;`), which releases it at the end of the scope on every path including a throw. — ICSharpCode.BamlDecompiler/Baml/BamlWriter.cs:45
`output` is a `StringWriter`, which implements `IDisposable`, and it is created here (line 44). Every use of it in `ProcessRecord` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var output = …;`), which releases it at the end of the scope on every path including a throw. — ICSharpCode.Decompiler.PowerShell/GetDecompiledSourceCmdlet.cs:44
`deflate` is a `DeflateStream`, which implements `IDisposable`, and it is created here (line 353). Every use of it in `WriteSourceToBlob` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var deflate = …;`), which releases it at the end of the scope on every path including a throw. — ICSharpCode.Decompiler/DebugInfo/PortablePdbWriter.cs:353
`ResXResourceWriter` declares a finalizer (line 96), but nothing in the type is unmanaged: no `IntPtr`/`UIntPtr` or pointer field, no `SafeHandle`, no `HandleRef`, no `extern`/`DllImport` member and no `Marshal`/`GCHandle`/`NativeMemory` use. A finalizer can only release what the garbage collector cannot, so on a purely-managed type it releases nothing and costs something: every instance is put on the finalizer queue, survives at least one extra collection, and is then finalized on a thread that is NOT the disposing one — where the managed objects it touches may already have been finalized themselves. Delete the finalizer (and the `GC.SuppressFinalize` that exists to defuse it); if a handle is added later, wrap it in a `SafeHandle`, which brings its own correct finalization. — ICSharpCode.Decompiler/Util/ResXResourceWriter.cs:96
`lexer` is a `Lexer`, which implements `IDisposable`, and it is created here (line 47). Every use of it in `LiteralSearchStrategy` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var lexer = …;`), which releases it at the end of the scope on every path including a throw. — ICSharpCode.ILSpyX/Search/LiteralSearchStrategy.cs:47
`xmlReader` is a `XmlTextReader`, which implements `IDisposable`, and it is created here (line 76). Every use of it in `DetectFileType` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var xmlReader = …;`), which releases it at the end of the scope on every path including a throw. — REDACTED:76
`process` is a `Process`, which implements `IDisposable`, and it is created here (line 88). Every use of it in `Start` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var process = …;`), which releases it at the end of the scope on every path including a throw. — REDACTED:88
What to do
Each finding names the value and the span that decides who owns it — the `new` that created it, or the constructor parameter that handed it over. Confirm ownership from that span, then make the disposal match it: release what this type created, leave what it was injected with to whoever created THAT, and drop a finalizer whose type holds nothing unmanaged to release.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether async methods accept a CancellationToken so work can be cancelled (adoption curve).
Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.
Only 24/108 async methods accept a CancellationToken, so in-flight work can't be stopped early when the caller gives up — whatever ends it in your host (shutdown signal, timeout, abandoned request, user cancel). Thread a token through the call chain and honour it at each await and loop; where a method genuinely cannot be interrupted, omitting it is a deliberate choice — judge against your hosting model.
No CancellationToken parameter — this work can't be stopped early once started. (×35) — ICSharpCode.Decompiler/Metadata/UniversalAssemblyResolver.cs:293, ICSharpCode.Decompiler/Metadata/UniversalAssemblyResolver.cs:298, ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs:231, …
Neither takes a CancellationToken nor reads the one of the function it sits in, while it calls something that takes one — this work can't be stopped early once started. Take the token, or pass on the enclosing one. — ILSpy/AssemblyTree/AssemblyTreeModel.cs:1126
No CancellationToken parameter — the body observes an ambient token instead (a field or a context object), so the work does stop on cancellation, but a caller cannot cancel this call independently of the owner that created that token. (×3) — ILSpy/Commands/CreateDiagramContextMenuEntry.cs:73, ILSpy/Commands/DecompileAllCommand.cs:67, ILSpy/Commands/DecompileAllCommand.cs:136
What to do
Thread a CancellationToken through async methods so work stops promptly on cancellation.
Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `ArgumentNullException` tells the caller a parameter was null when it provably was not.
Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements controlled by an `if`, whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`). Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.
Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.
Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped2.2 / 10Critical✓ Tool-verified
Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.
Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.
`svg` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:135
``#filter.open { max-width: ${newWidth}px; }`` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:711
`replace(text)` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:1129
What to do
Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.
Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X27 · Collection changed while being enumerated8.0 / 10Strong✓ Tool-verified
Other · Code Health — Whether a `foreach` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is enumerating invalidates the enumerator it is holding, so the next `MoveNext` throws `InvalidOperationException` and the remaining items are never seen.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
`info.declaredMembers` is enumerated directly, and line 79 calls `info.declaredMembers.Add(…)` inside the loop body — a structural change to a `HashSet`. The next `MoveNext` throws `InvalidOperationException: Collection was modified; enumeration operation may not execute`, so every pass that reaches this call ends the loop by exception instead of by running out of items, and the remaining items are never seen. — ICSharpCode.Decompiler/PartialTypeInfo.cs:77
What to do
Each finding names the two spans that cannot both stand — the `foreach` source, and the call inside the body that structurally changes that same collection. Confirm from those two, then pick one: enumerate a snapshot (`foreach (var x in c.ToList())`), collect what needs changing and apply it after the loop, or — where the loop was only ever meant to act on the first match — `break` immediately after the mutation, which is the one shape that is already safe.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×9) — ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:941, ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs:227, ICSharpCode.Decompiler/Documentation/IdStringProvider.cs:337, …
`catch (ResolutionException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. — ICSharpCode.Decompiler/CSharp/ProjectDecompiler/TargetServices.cs:306
`catch (BadImageFormatException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. (×25) — ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs:585, ICSharpCode.Decompiler/CSharp/RequiredNamespaceCollector.cs:158, ICSharpCode.Decompiler/CSharp/RequiredNamespaceCollector.cs:310, …
`catch (EndOfStreamException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. — ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs:589
`catch` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. (×2) — ICSharpCode.Decompiler/Documentation/XmlDocLoader.cs:109, ICSharpCode.Decompiler/Documentation/XmlDocumentationElement.cs:97
`catch (SymbolicAnalysisFailedException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. — ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:165
`catch (Metadata.EnumUnderlyingTypeResolveException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. — ICSharpCode.Decompiler/SRMExtensions.cs:681
What to do
Swallowed exception (empty catch)
Do you agree with this assessment?
X30 · Support guard that admits what it rejects7.5 / 10Strong✓ Tool-verified
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
`!(adjustedRR.IsError || NullableType.GetUnderlyingType(adjustedRR.Type).GetSt...` does not say what its shape suggests. By De Morgan a negated `||` distributes as `!adjustedRR.IsError && NullableType.GetUnderlyingType(adjustedRR.Type).GetStackType() == inst.UnderlyingResultType`, so this guard fires only where `adjustedRR.IsError` is ABSENT — and where `NullableType.GetUnderlyingType(adjustedRR.Type).GetStackType()` is EXACTLY `inst.UnderlyingResultType`, which is the one value the term `NullableType.GetUnderlyingType(adjustedRR.Type).GetStackType() != inst.Underl...` was written to refuse. The two halves disagree about what they are for: `adjustedRR.IsError` names something the code needs, and `NullableType.GetUnderlyingType(adjustedRR.Type).GetStackType() != inst.Underl...` names a value it cannot handle, and one `!(…)` cannot mean both. Everything with a `NullableType.GetUnderlyingType(adjustedRR.Type).GetStackType()` other than `inst.UnderlyingResultType` now passes this guard untested, including the values `adjustedRR.IsError` was there to admit. — ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:1734
What to do
Each finding expands the condition by De Morgan and names the two terms that disagree — a capability the body needs, and a value the guard refuses. Confirm from the expansion, then decide where the parentheses belong. Almost always the fault term was meant to be conjoined with the capabilities rather than listed beside them: `!((a || b) && x == k)` rejects anything that is neither a nor b, AND anything whose x is not k, which is what a support guard is for. Leaving it as written is the one arrangement that admits exactly the values the guard names.
Do you agree with this assessment?
X32 · Type resolved by simple name across every loaded assembly10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a plugin lookup names the type it means — searching every assembly loaded into the process for a candidate whose SIMPLE name equals a string supplied at runtime, and taking the first one found, is decided by assembly LOAD ORDER rather than by this source, so the same name can resolve to a different type on the next run.
Method: Roslyn syntax only, no semantic model: every invocation of `First`/`FirstOrDefault`/`Single`/`SingleOrDefault` whose OWN expression subtree contains both a `GetAssemblies()` call and a `GetTypes()`/`GetExportedTypes()` call — a single-element pick out of every type loaded into the process. A nested selector in the same chain sees no `GetAssemblies()` in its own subtree and is outside the population, so one lookup counts once however many links its chain has. A finding additionally needs both remaining halves: the selector must be `First`/`FirstOrDefault` (`Single`/`SingleOrDefault` reports the ambiguity rather than resolving it, and is counted and never reported), and the chain must carry an `==` comparison of `<lambda parameter>.Name` against something that is not a literal. The receiver must be a plain identifier bound by one of the chain’s own lambdas, which places `assembly.GetName().Name == "X"` outside the rule by construction. One exemption: a `.Name` test joined by `&&` to a `FullName`/`AssemblyQualifiedName` test on the same identifier is spared; joined by `||` it is not. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether nullable reference types are enabled and not undermined by heavy `!` suppression.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
This method contradicts itself about `call`: line 158 assigns it with `as Call`, which hands back null rather than throwing when the value is not a `Call`, but line 162 then dereferences it directly as `call.Method` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `call` once before the first use and handle the null case, or cast with `(Call)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ICSharpCode.Decompiler/IL/Transforms/UserDefinedLogicTransform.cs:162
This method contradicts itself about `asm`: line 512 tests it for null before doing anything with it — the author's own statement that null is an input this code expects — but that `if` scopes only the block beneath it, and line 542 then dereferences `asm` as `asm.Name` AFTER the block has closed, where the guard no longer applies. A null `asm` skips the guarded body and reaches that line anyway, throwing NullReferenceException on exactly the input the guard was written for. If the dereference belongs to the guarded work, move it inside the block; if `asm` truly cannot be null by then, the guard above is misleading and should go. — ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs:542
This method contradicts itself about `module`: line 156 assigns it with `as PEFile`, which hands back null rather than throwing when the value is not a `PEFile`, but line 157 then dereferences it directly as `module.GetLoadedAssembly` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `module` once before the first use and handle the null case, or cast with `(PEFile)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ILSpy.ReadyToRun/ReadyToRunLanguage.cs:157
This method contradicts itself about `reference`: line 77 assigns it with `as Reference`, which hands back null rather than throwing when the value is not a `Reference`, but line 78 then dereferences it directly as `reference.ContainingProject` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `reference` once before the first use and handle the null case, or cast with `(Reference)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ILSpy.AddIn.VS2022/Commands/OpenReferenceCommand.cs:78
This method contradicts itself about `projectItem`: line 93 assigns it with `as ProjectItem`, which hands back null rather than throwing when the value is not a `ProjectItem`, but line 94 then dereferences it directly as `projectItem.ContainingProject` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `projectItem` once before the first use and handle the null case, or cast with `(ProjectItem)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ILSpy.AddIn.VS2022/Commands/OpenReferenceCommand.cs:94
7/10 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.
~1.1 `!` suppressions per 1k syntax nodes — 695 suppression(s) across the 641679 syntax node(s) in code where nullable warnings are ENABLED, which is the only code a `!` can suppress anything in (a `!` under `#nullable disable` is inert and is not counted, and its file's nodes are not in the denominator). Each one tells the compiler to trust you about null, suppressing the very safety NRTs provide.
What to do
Where a method uses `?.` on a symbol and then dereferences it directly, settle the question once: test it before the first use and handle null, or drop the `?.`.
Where a method null-tests a symbol and then uses it after the guarded block closes, move the trailing work inside the block — the guard skips its body on null, it does not stop the method.
Enable <Nullable>enable</Nullable> across all projects and resolve warnings rather than suppressing with `!`.
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 4 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
P12 CI test-gate honesty — 1 observation(s) recorded · Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
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 — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 24 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 39 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 user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC2 Forms & labels — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC3 Page structure — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC4 Keyboard semantics — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC5 ARIA correctness — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC6 Visual & motion safety — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC7 A11y enforcement — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AX1 Captive dependencies — no DI registrations detected
AX2 Stateful singletons — no singleton implementations detected
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — the image ran but published no HTTP port — nothing to crawl (EXPOSE the web port to unlock runtime evidence) This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — No personal data detected in 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.
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 measured — no test run produced results
D12 Dependency Hygiene — Dependency hygiene not measured — pkgs.dev.azure.com could not be reached
D23 Boundary Type-Coupling — Cross-context type coupling could not be assessed — this codebase's bounded contexts are neither declared nor inferable.
D25 ADR Conformance — no ADRs to check
D32 Data Compliance (PII/GDPR) — 33 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D39 IL Efficiency — IL not measured — the target did not build
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D7 Architectural Integrity — no checkable ADRs and no dependency cycles — architectural integrity not assessed
D8 Code Coverage — Coverage not measured — pkgs.dev.azure.com could not be reached
DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 5 value object(s); 2 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 — Not assessed, and this one is on us: 1 of the 1 handler(s) found here write to persistent state through an entry point this check does not yet recognise (an explicitly-implemented interface method, or a static handler method). Idempotency was neither confirmed nor ruled out for them — this is a limit of the analyzer, not a finding about your code.
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
P2 Observability — This repo is a library, not a deployed service — it has no process to operate, so production observability (structured logging, tracing/metrics, health checks) is N/A. A library may log via an injected ILogger, but the absence of operational telemetry is not a defect here. If it grows a host (web API, worker), the dimension reactivates.
P7 Outbound HTTP resilience — not applicable — this isn't a service/API/worker
P8 Schema migrations — no EF Core usage detected
P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (Cobertura — `dotnet test --collect:"XPlat Code Coverage"` with a `coverlet.collector` PackageReference) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
X4 Structured logging — Structured logging could not be assessed in this run — the check did not complete, so it is not scored. 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.
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.
WriteOnlyPrivateField ICSharpCode.Decompiler.Tests/PrettyTestRunner.cs:54— private CompilerOptions[] noRoslynOptions — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField ICSharpCode.Decompiler.Tests/UglyTestRunner.cs:54— private CompilerOptions[] noRoslynOptions — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField ICSharpCode.Decompiler.Tests/TestCases/Correctness/PropertiesAndEvents.cs:22— private int thisValue — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstructorInitializers.cs:240— private int _a — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstructorInitializers.cs:282— private NoRecordButCopyConstructorLike parent — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField ICSharpCode.Decompiler.Tests/TestCases/Pretty/Generics.cs:145— private Type type1 — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField ICSharpCode.Decompiler.Tests/TestCases/Pretty/Generics.cs:146— private Type type2 — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField ICSharpCode.Decompiler.Tests/TestCases/Pretty/Generics.cs:147— private Type type3 — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField ICSharpCode.Decompiler.Tests/TestCases/Pretty/Generics.cs:148— private Type type4 — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField ICSharpCode.Decompiler.Tests/TestCases/Pretty/Generics.cs:149— private Type type5 — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField ICSharpCode.Decompiler.Tests/TestCases/Pretty/Generics.cs:150— private Type type6 — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.cs:320— private S s1 — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.cs:321— private S s2 — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.cs:325— private V3f[] Issue1336_rg0 — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.cs:331— private V3f[,] Issue1336_rg1 — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.cs:349— private V3f[][] Issue1336_rg1b — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.cs:367— private V3f[,][] Issue1336_rg1c — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.cs:421— private V3f[][,] Issue1336_rg1d — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.cs:458— private int[,] Issue1336_rg2 — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField ICSharpCode.Decompiler.Tests/TestCases/Pretty/Issue3598.cs:206— private string _name — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField ICSharpCode.Decompiler.Tests/TestCases/Pretty/Issue3598.cs:226— private string _name — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField ICSharpCode.Decompiler.Tests/TestCases/Pretty/Issue3598.cs:239— private string _name — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField ICSharpCode.Decompiler.Tests/TestCases/Pretty/Issue3598.cs:251— private string _name — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField ICSharpCode.Decompiler.Tests/TestCases/Pretty/Issue3598.cs:207— private int _age — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField ICSharpCode.Decompiler.Tests/TestCases/Pretty/Issue3598.cs:252— private int _age — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
EmptyCatchBlock ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:941— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ICSharpCode.Decompiler/Documentation/IdStringProvider.cs:337— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ICSharpCode.Decompiler/Documentation/IdStringProvider.cs:340— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs:500— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ICSharpCode.ILSpyCmd/DotNetToolUpdateChecker.cs:56— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ICSharpCode.ILSpyCmd/IlspyCmdProgram.cs:1126— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ICSharpCode.ILSpyX/AssemblyListSnapshot.cs:200— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ICSharpCode.ILSpyX/LoadedAssembly.cs:559— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ICSharpCode.ILSpyX/LoadedAssembly.cs:562— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ICSharpCode.ILSpyX/Settings/ILSpySettings.cs:153— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ICSharpCode.ILSpyX/Settings/MutexProtector.cs:44— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ILSpy/Analyzers/AnalyzedModuleTreeNode.cs:79— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ILSpy/App.axaml.cs:113— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ILSpy/App.axaml.cs:175— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ILSpy/AppEnv/AppLog.cs:164— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ILSpy/AppEnv/CommandLineArguments.cs:109— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ILSpy/AppEnv/GlobalExceptionHandler.cs:129— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ILSpy/AppEnv/SingleInstance.cs:159— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ILSpy/AssemblyTree/AssemblyTreeModel.cs:634— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ILSpy/AssemblyTree/AssemblyTreeModel.cs:1198— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock REDACTED:113— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock REDACTED:120— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ILSpy/Commands/SearchMsdnContextMenuEntry.cs:129— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ILSpy/Commands/SelectPdbContextMenuEntry.cs:80— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ILSpy/Docking/ILSpyDockJson.cs:330— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
FileScopedPragmaDisable ICSharpCode.Decompiler.Tests/Output/CSharpAmbienceTests.cs:399— #pragma warning disable 169, 67 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable ICSharpCode.Decompiler.Tests/Output/ILAmbienceTests.cs:324— #pragma warning disable 169, 67 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Correctness/Comparisons.cs:22— #pragma warning disable 652 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Correctness/LambdaOptionalAndParamsParameters.cs:1— #pragma warning disable CS9099, CS9100 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/LambdaOptionalAndParamsParameters.cs:1— #pragma warning disable CS9099, CS9100 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Correctness/OverloadResolution.cs:447— #pragma warning disable CS9193 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/CS73_StackAllocInitializers.cs:1— #pragma warning disable format — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/ExpressionTrees.cs:1— #pragma warning disable format — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomTaskType.cs:1— #pragma warning disable 1998 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomTaskType.cs:147— #pragma warning disable CS8981 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/QualifierTests.cs:182— #pragma warning disable CS8981 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/Issue3598.cs:7— #pragma warning disable CS0414, CS9113, CS9124 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable ICSharpCode.Decompiler.Tests/TestCases/VBPretty/ParameterizedProperties.cs:1— #pragma warning disable 657 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable ICSharpCode.Decompiler.Tests/TypeSystem/TypeSystemTestCase.cs:332— #pragma warning disable 67 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable ILSpy/TextView/SystemScrollSettings.cs:23— #pragma warning disable CA1060 // Move pinvokes to native methods class — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable ILSpy/Util/ShellHelper.Windows.cs:31— #pragma warning disable CA1060 // Move pinvokes to native methods class — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
AnalyzerSeverityNone .editorconfig:212— IDE0007 — this rule is switched off for every file the section matches, in every project under this directory, and the only record that it was ever switched off is this line: nothing at the sites it would have reported says so, so a reader of that code has no reason to look here, and code added years from now inherits the decision silently. Fix what the rule reports and delete the entry, or — where some sites really are legitimate — leave the rule on and suppress it at those sites with their reasons, so it keeps protecting the rest of the tree. If the rule is genuinely unwanted here, say why — on this line after the entry, or in the comment run directly above it: a comment that only repeats the rule's own title is read as no explanation at all and leaves this row in place.
AnalyzerSeverityNone ICSharpCode.Decompiler.Tests/.editorconfig:3— CA1060 — this rule is switched off for every file the section matches, in every project under this directory, and the only record that it was ever switched off is this line: nothing at the sites it would have reported says so, so a reader of that code has no reason to look here, and code added years from now inherits the decision silently. Fix what the rule reports and delete the entry, or — where some sites really are legitimate — leave the rule on and suppress it at those sites with their reasons, so it keeps protecting the rest of the tree. If the rule is genuinely unwanted here, say why — on this line after the entry, or in the comment run directly above it: a comment that only repeats the rule's own title is read as no explanation at all and leaves this row in place.
AnalyzerSeverityNone ICSharpCode.Decompiler.Tests/.editorconfig:4— CA1063 — this rule is switched off for every file the section matches, in every project under this directory, and the only record that it was ever switched off is this line: nothing at the sites it would have reported says so, so a reader of that code has no reason to look here, and code added years from now inherits the decision silently. Fix what the rule reports and delete the entry, or — where some sites really are legitimate — leave the rule on and suppress it at those sites with their reasons, so it keeps protecting the rest of the tree. If the rule is genuinely unwanted here, say why — on this line after the entry, or in the comment run directly above it: a comment that only repeats the rule's own title is read as no explanation at all and leaves this row in place.
AnalyzerSeverityNone ICSharpCode.Decompiler.Tests/.editorconfig:5— CA1065 — this rule is switched off for every file the section matches, in every project under this directory, and the only record that it was ever switched off is this line: nothing at the sites it would have reported says so, so a reader of that code has no reason to look here, and code added years from now inherits the decision silently. Fix what the rule reports and delete the entry, or — where some sites really are legitimate — leave the rule on and suppress it at those sites with their reasons, so it keeps protecting the rest of the tree. If the rule is genuinely unwanted here, say why — on this line after the entry, or in the comment run directly above it: a comment that only repeats the rule's own title is read as no explanation at all and leaves this row in place.
AnalyzerSeverityNone ICSharpCode.Decompiler.Tests/.editorconfig:6— CA1401 — this rule is switched off for every file the section matches, in every project under this directory, and the only record that it was ever switched off is this line: nothing at the sites it would have reported says so, so a reader of that code has no reason to look here, and code added years from now inherits the decision silently. Fix what the rule reports and delete the entry, or — where some sites really are legitimate — leave the rule on and suppress it at those sites with their reasons, so it keeps protecting the rest of the tree. If the rule is genuinely unwanted here, say why — on this line after the entry, or in the comment run directly above it: a comment that only repeats the rule's own title is read as no explanation at all and leaves this row in place.
AnalyzerSeverityNone ICSharpCode.Decompiler.Tests/.editorconfig:7— CA1821 — this rule is switched off for every file the section matches, in every project under this directory, and the only record that it was ever switched off is this line: nothing at the sites it would have reported says so, so a reader of that code has no reason to look here, and code added years from now inherits the decision silently. Fix what the rule reports and delete the entry, or — where some sites really are legitimate — leave the rule on and suppress it at those sites with their reasons, so it keeps protecting the rest of the tree. If the rule is genuinely unwanted here, say why — on this line after the entry, or in the comment run directly above it: a comment that only repeats the rule's own title is read as no explanation at all and leaves this row in place.
AnalyzerSeverityNone ICSharpCode.Decompiler.Tests/.editorconfig:8— CA2002 — this rule is switched off for every file the section matches, in every project under this directory, and the only record that it was ever switched off is this line: nothing at the sites it would have reported says so, so a reader of that code has no reason to look here, and code added years from now inherits the decision silently. Fix what the rule reports and delete the entry, or — where some sites really are legitimate — leave the rule on and suppress it at those sites with their reasons, so it keeps protecting the rest of the tree. If the rule is genuinely unwanted here, say why — on this line after the entry, or in the comment run directly above it: a comment that only repeats the rule's own title is read as no explanation at all and leaves this row in place.
AnalyzerSeverityNone ICSharpCode.Decompiler.Tests/.editorconfig:9— CA2101 — this rule is switched off for every file the section matches, in every project under this directory, and the only record that it was ever switched off is this line: nothing at the sites it would have reported says so, so a reader of that code has no reason to look here, and code added years from now inherits the decision silently. Fix what the rule reports and delete the entry, or — where some sites really are legitimate — leave the rule on and suppress it at those sites with their reasons, so it keeps protecting the rest of the tree. If the rule is genuinely unwanted here, say why — on this line after the entry, or in the comment run directly above it: a comment that only repeats the rule's own title is read as no explanation at all and leaves this row in place.
AnalyzerSeverityNone ICSharpCode.Decompiler.Tests/.editorconfig:10— CA2241 — this rule is switched off for every file the section matches, in every project under this directory, and the only record that it was ever switched off is this line: nothing at the sites it would have reported says so, so a reader of that code has no reason to look here, and code added years from now inherits the decision silently. Fix what the rule reports and delete the entry, or — where some sites really are legitimate — leave the rule on and suppress it at those sites with their reasons, so it keeps protecting the rest of the tree. If the rule is genuinely unwanted here, say why — on this line after the entry, or in the comment run directly above it: a comment that only repeats the rule's own title is read as no explanation at all and leaves this row in place.
NoWarnInCsproj — 23 warning codes suppressed in one element ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj:32— A single <NoWarn> suppresses 23 warning codes (1701;1702;1705;67;169;1058;728;1720;649;168;251;660;661;675;1998;162;8632;626;8618;8714;8602;8981;NU1903) in one stroke — one team-wide decision, not 23 independent debts. Review the set centrally rather than code-by-code; each code you can re-enable is one less blanket suppression. (Every code still counts toward the score and metrics.)
NoWarnInCsproj ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj:42— 1701 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj:42— 1702 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj:42— 1591 — this project generates an XML documentation file as a build output, so its documentation is something it PUBLISHES to whoever consumes the assembly, and this entry switches off a rule whose only job is to report that documentation missing or malformed. The two decisions sit in the same file and the quiet one wins: the documentation this project ships has holes exactly where the rule would have pointed, no build says so, and the people who meet the gap are downstream — in their editor, at the moment they are trying to use the member. Write the documentation the rule is asking for and drop the code from the list; where only some elements genuinely cannot carry it, narrow the suppression to those sites and give each one its reason, so the rest of the API stays covered. If the documentation was never meant to be consumed, the honest fix is the other line — stop generating the file, so the project no longer publishes something it is choosing not to check.
NoWarnInCsproj ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj:42— 1573 — this project generates an XML documentation file as a build output, so its documentation is something it PUBLISHES to whoever consumes the assembly, and this entry switches off a rule whose only job is to report that documentation missing or malformed. The two decisions sit in the same file and the quiet one wins: the documentation this project ships has holes exactly where the rule would have pointed, no build says so, and the people who meet the gap are downstream — in their editor, at the moment they are trying to use the member. Write the documentation the rule is asking for and drop the code from the list; where only some elements genuinely cannot carry it, narrow the suppression to those sites and give each one its reason, so the rest of the API stays covered. If the documentation was never meant to be consumed, the honest fix is the other line — stop generating the file, so the project no longer publishes something it is choosing not to check.
NoWarnInCsproj — known-vulnerability alert suppressed ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj:32— NU1903 — this is not a style rule being switched off: it is the dependency audit reporting that a package this project references has a KNOWN, already-published security vulnerability, and the entry deletes that report for the whole project — for this package and for every dependency the project takes from here on, including ones added long after whoever wrote the line has moved on. Nothing in the build will raise it again, so the next reader has no way to learn it was ever accepted. Upgrade the package to a version carrying the fix, or replace it, and drop the code from the list. Where the fix genuinely does not exist yet, keep the report and stop it FAILING the build — demote it to a warning without silencing it — and write down which advisory is being accepted and until when, so it is the acceptance that expires rather than the alert.
NoWarnInCsproj Directory.Build.props:3— NU1510 — this warning is switched off for the WHOLE project, including builds years from now. It is raised by the build itself — the packaging, restore or SDK step — about the project as a whole, not by the compiler or an analyzer at a line of code, so there is no call site to narrow it to and no per-site directive that could carry a reason: this element is the only place the decision can be recorded. Say WHY here, in a comment on the entry, or fix what the rule is reporting and drop the code from the list.
Namespace dependency cycle ICSharpCode.Decompiler/DecompileRun.cs:24— The namespaces ICSharpCode.Decompiler ↔ ICSharpCode.Decompiler.CSharp ↔ ICSharpCode.Decompiler.CSharp.OutputVisitor ↔ ICSharpCode.Decompiler.CSharp.Resolver ↔ ICSharpCode.Decompiler.CSharp.Syntax ↔ ICSharpCode.Decompiler.CSharp.Syntax.PatternMatching ↔ ICSharpCode.Decompiler.CSharp.Transforms ↔ ICSharpCode.Decompiler.DebugInfo ↔ ICSharpCode.Decompiler.Disassembler ↔ ICSharpCode.Decompiler.Documentation ↔ ICSharpCode.Decompiler.FlowAnalysis ↔ ICSharpCode.Decompiler.IL ↔ ICSharpCode.Decompiler.IL.ControlFlow ↔ ICSharpCode.Decompiler.IL.Patterns ↔ ICSharpCode.Decompiler.IL.Transforms ↔ ICSharpCode.Decompiler.Metadata ↔ ICSharpCode.Decompiler.Output ↔ ICSharpCode.Decompiler.Semantics ↔ ICSharpCode.Decompiler.TypeSystem ↔ ICSharpCode.Decompiler.TypeSystem.Implementation depend on each other. The lightest dependency in the cycle is ICSharpCode.Decompiler → ICSharpCode.Decompiler.Documentation (ICSharpCode.Decompiler.DecompileRun → ICSharpCode.Decompiler.Documentation.IDocumentationProvider, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
Namespace dependency cycle ICSharpCode.BamlDecompiler/XamlContext.cs:31— The namespaces ICSharpCode.BamlDecompiler ↔ ICSharpCode.BamlDecompiler.Xaml depend on each other. The lightest dependency in the cycle is ICSharpCode.BamlDecompiler → ICSharpCode.BamlDecompiler.Xaml (ICSharpCode.BamlDecompiler.XamlContext → ICSharpCode.BamlDecompiler.Xaml.XamlProperty, 3 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
Namespace dependency cycle ICSharpCode.ILSpyX/LoadedAssembly.cs:34— The namespaces ICSharpCode.ILSpyX ↔ ICSharpCode.ILSpyX.Abstractions ↔ ICSharpCode.ILSpyX.FileLoaders ↔ ICSharpCode.ILSpyX.Instrumentation ↔ ICSharpCode.ILSpyX.Search depend on each other. The lightest dependency in the cycle is ICSharpCode.ILSpyX → ICSharpCode.ILSpyX.Instrumentation (ICSharpCode.ILSpyX.MyAssemblyResolver → ICSharpCode.ILSpyX.Instrumentation.AssemblyResolveOutcome, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
Namespace dependency cycle ILSpy/Views/MainMenu.axaml.cs:36— The namespaces ICSharpCode.ILSpy ↔ ICSharpCode.ILSpy.AssemblyTree ↔ ICSharpCode.ILSpy.Bookmarks ↔ ICSharpCode.ILSpy.Commands ↔ ICSharpCode.ILSpy.Controls.Omnibar ↔ ICSharpCode.ILSpy.Controls.TreeView ↔ ICSharpCode.ILSpy.Docking ↔ ICSharpCode.ILSpy.Languages ↔ ICSharpCode.ILSpy.Metadata ↔ ICSharpCode.ILSpy.Navigation ↔ ICSharpCode.ILSpy.Options ↔ ICSharpCode.ILSpy.Search ↔ ICSharpCode.ILSpy.TextView ↔ ICSharpCode.ILSpy.TreeNodes ↔ ICSharpCode.ILSpy.Util ↔ ICSharpCode.ILSpy.ViewModels depend on each other. The lightest dependency in the cycle is ICSharpCode.ILSpy → ICSharpCode.ILSpy.Docking (ICSharpCode.ILSpy.MainMenu → ICSharpCode.ILSpy.Docking.DockWorkspace, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
DiscardedPureResult ICSharpCode.Decompiler.Tests/TestCases/Pretty/Loops.cs:335— alternative.ToLower(); — strings are immutable, so this call cannot change the text it was called on: it computes a new string and the statement throws it away, leaving the original exactly as it was. The line reads as the transformation it names, and the value that comes out of this method later is the untransformed one. Assign the result — to the same variable, or to the field or property the transformed text was meant to reach — or, if the call really was pointless, delete the line rather than leaving something that looks like it works.
DiscardedPureResult ICSharpCode.Decompiler.Tests/TestCases/Pretty/Loops.cs:343— alternative.ToLower(); — strings are immutable, so this call cannot change the text it was called on: it computes a new string and the statement throws it away, leaving the original exactly as it was. The line reads as the transformation it names, and the value that comes out of this method later is the untransformed one. Assign the result — to the same variable, or to the field or property the transformed text was meant to reach — or, if the call really was pointless, delete the line rather than leaving something that looks like it works.
DiscardedPureResult ICSharpCode.Decompiler.Tests/TestCases/Pretty/Loops.cs:352— item.ToLower(); — strings are immutable, so this call cannot change the text it was called on: it computes a new string and the statement throws it away, leaving the original exactly as it was. The line reads as the transformation it names, and the value that comes out of this method later is the untransformed one. Assign the result — to the same variable, or to the field or property the transformed text was meant to reach — or, if the call really was pointless, delete the line rather than leaving something that looks like it works.
DiscardedPureResult ICSharpCode.Decompiler.Tests/TestCases/Pretty/Loops.cs:664— array[i].ToLower(); — strings are immutable, so this call cannot change the text it was called on: it computes a new string and the statement throws it away, leaving the original exactly as it was. The line reads as the transformation it names, and the value that comes out of this method later is the untransformed one. Assign the result — to the same variable, or to the field or property the transformed text was meant to reach — or, if the call really was pointless, delete the line rather than leaving something that looks like it works.
DemotedWarningsAsErrors ICSharpCode.ILSpyCmd/ICSharpCode.ILSpyCmd.csproj:86— TreatWarningsAsErrors — this repository turns the warnings-are-errors gate ON in a scope above this line, and this entry switches it back OFF: from here down, no warning fails the build. That is broader than any suppression list — it is not one rule silenced but every rule, present and future, stopped from gating, for every project under this scope and for code nobody has written yet. Warnings keep being printed, so nothing looks switched off, and the only record of the decision is this line, which a reader of the code below has no reason to open. Fix what the build is reporting here and delete the entry so the scope rejoins the gate, or — where this scope really is allowed to warn (generated code, throwaway benchmarks) — name the codes it is allowed to warn about instead of standing the whole gate down, so the exception stays reviewable and the rest keeps protecting you. If the demotion is genuinely correct as it is, say why in a comment above it: that is what turns it from unexplained debt into a recorded decision, and it clears this row.
Orphaned knowledge ICSharpCode.Decompiler/Util/CSharpPrimitiveCast.cs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
NuGet vulnerability audit suppressed via NoWarn ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj:32— `NoWarn` silences NU1902, NU1903 — NuGet's vulnerability-audit warnings for moderate and high advisories. Suppressed advisories are still shipped; they are only invisible in the build log. Remove these codes from NoWarn and address or explicitly accept each advisory instead.
DeadPreprocessorBranch ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue3465.cs:2— #if EXPECTED_OUTPUT — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstructorInitializers.cs:307— #if EXPECTED_OUTPUT — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstructorInitializers.cs:326— #if EXPECTED_OUTPUT — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstructorInitializers.cs:343— #if EXPECTED_OUTPUT — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstructorInitializers.cs:373— #if EXPECTED_OUTPUT — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstructorInitializers.cs:407— #if EXPECTED_OUTPUT — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstructorInitializers.cs:449— #if EXPECTED_OUTPUT — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstructorInitializers.cs:491— #if EXPECTED_OUTPUT — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ICSharpCode.Decompiler.Tests/TestCases/Pretty/DelegateConstruction.cs:693— #if EXPECTED_OUTPUT — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ICSharpCode.Decompiler.Tests/TestCases/Pretty/Issue3965.cs:31— #if EXPECTED_OUTPUT — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ICSharpCode.Decompiler.Tests/TestCases/Pretty/Issue3965.cs:45— #if EXPECTED_OUTPUT — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ICSharpCode.Decompiler.Tests/TestCases/Pretty/Issue3965.cs:56— #if EXPECTED_OUTPUT — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ICSharpCode.Decompiler.Tests/TestCases/Pretty/Issue3965.cs:67— #if EXPECTED_OUTPUT — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ICSharpCode.Decompiler.Tests/TestCases/Pretty/Issue3965.cs:78— #if EXPECTED_OUTPUT — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ICSharpCode.Decompiler.Tests/TestCases/Pretty/Issue3965.cs:91— #if EXPECTED_OUTPUT — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ICSharpCode.Decompiler.Tests/TestCases/Pretty/Issue3965.cs:102— #if EXPECTED_OUTPUT — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ICSharpCode.Decompiler.Tests/TestCases/Pretty/Issue3965.cs:121— #if EXPECTED_OUTPUT — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ICSharpCode.Decompiler.Tests/TestCases/Pretty/LiftedOperators.cs:611— #if EXPECTED_OUTPUT — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ICSharpCode.Decompiler.Tests/TestCases/Pretty/NullPropagation.cs:377— #if EXPECTED_OUTPUT — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ICSharpCode.Decompiler.Tests/TestCases/Pretty/Records.cs:486— #if EXPECTED_OUTPUT — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ICSharpCode.Decompiler.Tests/TestCases/Pretty/VariableNamingWithoutSymbols.cs:96— #if EXPECTED_OUTPUT — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ICSharpCode.Decompiler.Tests/TestCases/VBPretty/Issue2199.cs:19— #if EXPECTED_OUTPUT — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ICSharpCode.Decompiler.Tests/TestCases/Pretty/AnonymousTypes.cs:139— #if OPT — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ICSharpCode.Decompiler.Tests/TestCases/Pretty/FirstClassSpanTypes.cs:143— #if OPT — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ICSharpCode.Decompiler.Tests/TestCases/Pretty/Issue3598.cs:124— #if OPT — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
TodoComment ICSharpCode.BamlDecompiler/Handlers/Records/ContentPropertyHandler.cs:34— // TODO: What to do here? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ICSharpCode.BamlDecompiler/Handlers/Records/PropertyCustomHandler.cs:73— // TODO: Convert to enum names — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ICSharpCode.BamlDecompiler/Rewrite/ConnectionIdRewritePass.cs:81— // TODO : implement xmlns resolver! — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ICSharpCode.Decompiler.Tests/TestCases/Correctness/UnsafeCode.cs:33— // TODO: test behavior, or convert this into a pretty-test — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ICSharpCode.Decompiler.Tests/TestCases/Correctness/YieldReturn.cs:41— // TODO: check anon methods — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ICSharpCode.Decompiler.Tests/TestCases/Pretty/DynamicTests.cs:431— // TODO : beautify inc/dec on locals and fields — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ICSharpCode.Decompiler.Tests/TestCases/Pretty/ExceptionHandling.cs:273— // TODO Non-Roslyn compilers create a second while loop inside the try, by inverting the if — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ICSharpCode.Decompiler.Tests/TestCases/Pretty/ExtensionEverything.cs:93— // TODO implement use-site transformation — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ICSharpCode.Decompiler.Tests/TestCases/Pretty/ExtensionEverything.cs:100— // TODO implement use-site transformation — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ICSharpCode.Decompiler.Tests/TestCases/Pretty/InlineArrayTests.cs:88— // TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ICSharpCode.Decompiler.Tests/TestCases/Pretty/LiftedOperators.cs:296— // TODO: — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ICSharpCode.Decompiler.Tests/TestCases/Pretty/LiftedOperators.cs:528— // TODO: — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ICSharpCode.Decompiler.Tests/TestCases/Pretty/LiftedOperators.cs:733— // TODO: — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ICSharpCode.Decompiler.Tests/TestCases/Pretty/LiftedOperators.cs:434— // TODO: redundant casts. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ICSharpCode.Decompiler.Tests/TestCases/Pretty/LiftedOperators.cs:474— // TODO: redundant casts. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ICSharpCode.Decompiler.Tests/TestCases/Pretty/LiftedOperators.cs:542— // TODO: redundant casts. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ICSharpCode.Decompiler.Tests/TestCases/Pretty/LiftedOperators.cs:569— // TODO: redundant casts. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ICSharpCode.Decompiler.Tests/TestCases/Pretty/LiftedOperators.cs:605— // TODO: unnecessary cast — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ICSharpCode.Decompiler.Tests/TestCases/Pretty/LiftedOperators.cs:866— // TODO: unnecessary cast — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ICSharpCode.Decompiler.Tests/TestCases/Pretty/LiftedOperators.cs:877— // TODO: unnecessary cast — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ICSharpCode.Decompiler.Tests/TestCases/Pretty/LiftedOperators.cs:947— // TODO: unnecessary cast — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ICSharpCode.Decompiler.Tests/TestCases/Pretty/LiftedOperators.cs:784— // TODO: decompiler introduces a temporary for the array element. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ICSharpCode.Decompiler.Tests/TestCases/Pretty/LiftedOperators.cs:958— // TODO: unnecessary casts — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ICSharpCode.Decompiler.Tests/TestCases/Pretty/LiftedOperators.cs:964— // TODO: unnecessary casts — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ICSharpCode.Decompiler.Tests/TestCases/Pretty/LiftedOperators.cs:990— //TODO: unnecessary casts — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
MethodTooLong: CSharpPrimitiveCast.CSharpPrimitiveCastChecked ICSharpCode.Decompiler/Util/CSharpPrimitiveCast.cs:47— MethodTooLong — CSharpPrimitiveCastChecked runs 331 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 231 over it, 3.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CSharpPrimitiveCast.CSharpPrimitiveCastUnchecked ICSharpCode.Decompiler/Util/CSharpPrimitiveCast.cs:409— MethodTooLong — CSharpPrimitiveCastUnchecked runs 331 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 231 over it, 3.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SwitchOnStringTransform.MatchRoslynSwitchOnStringUsingLengthAndChar ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:1195— MethodTooLong — MatchRoslynSwitchOnStringUsingLengthAndChar runs 254 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 154 over it, 2.54× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TranslatedExpression.ConvertTo ICSharpCode.Decompiler/CSharp/TranslatedExpression.cs:209— MethodTooLong — ConvertTo runs 230 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 130 over it, 2.30× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: DynamicCallSiteTransform.ScanCallSiteInitBlock ICSharpCode.Decompiler/IL/Transforms/DynamicCallSiteTransform.cs:334— MethodTooLong — ScanCallSiteInitBlock runs 212 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 112 over it, 2.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CSharpResolver.ResolveBinaryOperator ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:545— MethodTooLong — ResolveBinaryOperator runs 209 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 109 over it, 2.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ReflectionDisassembler.WriteNativeType ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:883— MethodTooLong — WriteNativeType runs 204 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 104 over it, 2.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: IndexRangeTransform.Run ICSharpCode.Decompiler/IL/Transforms/IndexRangeTransform.cs:148— MethodTooLong — Run runs 204 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 104 over it, 2.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CSharpDecompiler.DoDecompile ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:1819— MethodTooLong — DoDecompile runs 197 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 97 over it, 1.97× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: BamlReader.ReadDocument ICSharpCode.BamlDecompiler/Baml/BamlReader.cs:77— MethodTooLong — ReadDocument runs 189 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 89 over it, 1.89× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: InstructionOutputExtensions.WriteTo ICSharpCode.Decompiler/IL/InstructionOutputExtensions.cs:72— MethodTooLong — WriteTo runs 177 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 77 over it, 1.77× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CallBuilder.Build ICSharpCode.Decompiler/CSharp/CallBuilder.cs:389— MethodTooLong — Build runs 173 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 73 over it, 1.73× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: MethodBodyDisassembler.WriteInstruction ICSharpCode.Decompiler/Disassembler/MethodBodyDisassembler.cs:327— MethodTooLong — WriteInstruction runs 173 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 73 over it, 1.73× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ILAmbience.ConvertSymbol ICSharpCode.Decompiler/IL/ILAmbience.cs:54— MethodTooLong — ConvertSymbol runs 166 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 66 over it, 1.66× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CSharpHighlightingTokenWriter.WriteKeyword ILSpy/Languages/CSharpHighlightingTokenWriter.cs:134— MethodTooLong — WriteKeyword runs 164 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 64 over it, 1.64× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Lexer.ReadDigit ICSharpCode.ILSpyX/Search/CSharpLexer.cs:566— MethodTooLong — ReadDigit runs 160 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 60 over it, 1.60× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: IntroduceQueryExpressions.DecompileQuery ICSharpCode.Decompiler/CSharp/Transforms/IntroduceQueryExpressions.cs:138— MethodTooLong — DecompileQuery runs 155 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 55 over it, 1.55× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: YieldReturnDecompiler.ConvertBody ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs:855— MethodTooLong — ConvertBody runs 146 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 46 over it, 1.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: FormattingOptionsFactory.CreateMono ICSharpCode.Decompiler/CSharp/OutputVisitor/FormattingOptionsFactory.cs:47— MethodTooLong — CreateMono runs 138 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 38 over it, 1.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CSharpDecompiler.IsAccessorInterfaceImplementationRuntimeHelper ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:564— MethodTooLong — IsAccessorInterfaceImplementationRuntimeHelper runs 137 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 37 over it, 1.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: FormattingOptionsFactory.CreateKRStyle ICSharpCode.Decompiler/CSharp/OutputVisitor/FormattingOptionsFactory.cs:217— MethodTooLong — CreateKRStyle runs 134 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 34 over it, 1.34× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TransformExpressionTrees.ConvertInstruction ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:372— MethodTooLong — ConvertInstruction runs 130 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 30 over it, 1.30× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ILSpyCmdProgram.OnExecuteAsync ICSharpCode.ILSpyCmd/IlspyCmdProgram.cs:284— MethodTooLong — OnExecuteAsync runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: DeclareVariables.InsertVariableDeclarations ICSharpCode.Decompiler/CSharp/Transforms/DeclareVariables.cs:613— MethodTooLong — InsertVariableDeclarations runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 24 over it, 1.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CSharpAmbience.ConvertSymbol ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpAmbience.cs:51— MethodTooLong — ConvertSymbol runs 121 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FileTooLong: CSharp/ExpressionBuilder.cs ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs— FileTooLong — 3145 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2645 over it, 6.29× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: OutputVisitor/CSharpOutputVisitor.cs ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpOutputVisitor.cs— FileTooLong — 1997 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1497 over it, 3.99× 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: CSharp/CSharpDecompiler.cs ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs— FileTooLong — 1668 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1168 over it, 3.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: Syntax/TypeSystemAstBuilder.cs ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs— FileTooLong — 1561 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1061 over it, 3.12× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Resolver/CSharpResolver.cs ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs— FileTooLong — 1493 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 993 over it, 2.99× 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: Disassembler/ReflectionDisassembler.cs ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs— FileTooLong — 1441 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 941 over it, 2.88× 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: IL/ILReader.cs ICSharpCode.Decompiler/IL/ILReader.cs— FileTooLong — 1411 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 911 over it, 2.82× 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: ControlFlow/AsyncAwaitDecompiler.cs ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs— FileTooLong — 1313 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 813 over it, 2.63× 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: Transforms/TransformExpressionTrees.cs ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs— FileTooLong — 1290 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 790 over it, 2.58× 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: CSharp/CallBuilder.cs ICSharpCode.Decompiler/CSharp/CallBuilder.cs— FileTooLong — 1147 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 647 over it, 2.29× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Transforms/SwitchOnStringTransform.cs ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs— FileTooLong — 1101 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 601 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: CSharp/StatementBuilder.cs ICSharpCode.Decompiler/CSharp/StatementBuilder.cs— FileTooLong — 1008 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 508 over it, 2.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: TextView/DecompilerTextView.axaml.cs ILSpy/TextView/DecompilerTextView.axaml.cs— FileTooLong — 985 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 485 over it, 1.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: Resolver/CSharpConversions.cs ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs— FileTooLong — 965 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 465 over it, 1.93× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: CSharp/RecordDecompiler.cs ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs— FileTooLong — 920 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 420 over it, 1.84× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Transforms/PatternStatementTransform.cs ICSharpCode.Decompiler/CSharp/Transforms/PatternStatementTransform.cs— FileTooLong — 897 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 397 over it, 1.79× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Syntax/DepthFirstAstVisitor.cs ICSharpCode.Decompiler/CSharp/Syntax/DepthFirstAstVisitor.cs— FileTooLong — 801 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 301 over it, 1.60× 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: ControlFlow/YieldReturnDecompiler.cs ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs— FileTooLong — 789 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 289 over it, 1.58× 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: Resolver/TypeInference.cs ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs— FileTooLong — 770 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 270 over it, 1.54× 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: ICSharpCode.ILSpyCmd/IlspyCmdProgram.cs ICSharpCode.ILSpyCmd/IlspyCmdProgram.cs— FileTooLong — 766 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 266 over it, 1.53× 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: Transforms/TransformArrayInitializers.cs ICSharpCode.Decompiler/IL/Transforms/TransformArrayInitializers.cs— FileTooLong — 742 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 242 over it, 1.48× 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: ControlFlow/RuntimeAsyncExceptionRewriteTransform.cs ICSharpCode.Decompiler/IL/ControlFlow/RuntimeAsyncExceptionRewriteTransform.cs— FileTooLong — 719 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 219 over it, 1.44× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Util/CSharpPrimitiveCast.cs ICSharpCode.Decompiler/Util/CSharpPrimitiveCast.cs— FileTooLong — 672 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 172 over it, 1.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: TypeSystem/MetadataModule.cs ICSharpCode.Decompiler/TypeSystem/MetadataModule.cs— FileTooLong — 632 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 132 over it, 1.26× 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: Transforms/DeconstructionTransform.cs ICSharpCode.Decompiler/IL/Transforms/DeconstructionTransform.cs— FileTooLong — 631 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 131 over it, 1.26× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
Hotspot: ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:1819— ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 84 in CSharpDecompiler.DoDecompile at line 1819. 7 of those changes were fix/bug commits, and the other 20 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 08:12:34 +02:00' --until='2026-10-23 08:12:34 +02:00' --full-history --no-merges -- ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs`: 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: ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:2584— ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs changed 45 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in ExpressionBuilder.TranslateFunction at line 2584. 11 of those changes were fix/bug commits, and the other 34 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 08:12:34 +02:00' --until='2026-10-23 08:12:34 +02:00' --full-history --no-merges -- ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs`: 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: ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:372— ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 63 in TransformExpressionTrees.ConvertInstruction at line 372. 1 of those changes was a fix/bug commit, and the other 20 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 08:12:34 +02:00' --until='2026-10-23 08:12:34 +02:00' --full-history --no-merges -- ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs`: 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: ICSharpCode.Decompiler/CSharp/CallBuilder.cs ICSharpCode.Decompiler/CSharp/CallBuilder.cs:389— ICSharpCode.Decompiler/CSharp/CallBuilder.cs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 73 in CallBuilder.Build at line 389. 1 of those changes was a fix/bug commit, and the other 16 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 08:12:34 +02:00' --until='2026-10-23 08:12:34 +02:00' --full-history --no-merges -- ICSharpCode.Decompiler/CSharp/CallBuilder.cs`: 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: ICSharpCode.ILSpyCmd/IlspyCmdProgram.cs ICSharpCode.ILSpyCmd/IlspyCmdProgram.cs:284— ICSharpCode.ILSpyCmd/IlspyCmdProgram.cs changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in ILSpyCmdProgram.OnExecuteAsync at line 284. 2 of those changes were fix/bug commits, and the other 14 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 08:12:34 +02:00' --until='2026-10-23 08:12:34 +02:00' --full-history --no-merges -- ICSharpCode.ILSpyCmd/IlspyCmdProgram.cs`: 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: ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:1032— ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 51 in TypeInference.MergeSimilarTypes at line 1032. 2 of those changes were fix/bug commits, and the other 9 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 08:12:34 +02:00' --until='2026-10-23 08:12:34 +02:00' --full-history --no-merges -- ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs`: 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: ICSharpCode.Decompiler/CSharp/TranslatedExpression.cs ICSharpCode.Decompiler/CSharp/TranslatedExpression.cs:209— ICSharpCode.Decompiler/CSharp/TranslatedExpression.cs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 130 in TranslatedExpression.ConvertTo at line 209. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 08:12:34 +02:00' --until='2026-10-23 08:12:34 +02:00' --full-history --no-merges -- ICSharpCode.Decompiler/CSharp/TranslatedExpression.cs`: 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: ICSharpCode.Decompiler/IL/Transforms/AssignVariableNames.cs ICSharpCode.Decompiler/IL/Transforms/AssignVariableNames.cs:76— ICSharpCode.Decompiler/IL/Transforms/AssignVariableNames.cs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in VariableScope.VariableScope.ctor at line 76. 1 of those changes was a fix/bug commit, and the other 8 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 08:12:34 +02:00' --until='2026-10-23 08:12:34 +02:00' --full-history --no-merges -- ICSharpCode.Decompiler/IL/Transforms/AssignVariableNames.cs`: 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: ICSharpCode.Decompiler/IL/Transforms/ExpressionTransforms.cs ICSharpCode.Decompiler/IL/Transforms/ExpressionTransforms.cs:631— ICSharpCode.Decompiler/IL/Transforms/ExpressionTransforms.cs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in ExpressionTransforms.HandleSwitchExpression at line 631. 2 of those changes were fix/bug commits, and the other 12 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 08:12:34 +02:00' --until='2026-10-23 08:12:34 +02:00' --full-history --no-merges -- ICSharpCode.Decompiler/IL/Transforms/ExpressionTransforms.cs`: 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: ICSharpCode.Decompiler/IL/Transforms/DeconstructionTransform.cs ICSharpCode.Decompiler/IL/Transforms/DeconstructionTransform.cs:868— ICSharpCode.Decompiler/IL/Transforms/DeconstructionTransform.cs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in DeconstructionTransform.MatchAssignments at line 868. 3 of those changes were fix/bug commits, and the other 9 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 08:12:34 +02:00' --until='2026-10-23 08:12:34 +02:00' --full-history --no-merges -- ICSharpCode.Decompiler/IL/Transforms/DeconstructionTransform.cs`: 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: ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs:350— ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in WholeProjectDecompiler.WriteCodeFilesInProject at line 350. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 08:12:34 +02:00' --until='2026-10-23 08:12:34 +02:00' --full-history --no-merges -- ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs`: 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: ICSharpCode.Decompiler/IL/Instructions/Block.cs ICSharpCode.Decompiler/IL/Instructions/Block.cs:126— ICSharpCode.Decompiler/IL/Instructions/Block.cs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in Block.CheckInvariant at line 126. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 08:12:34 +02:00' --until='2026-10-23 08:12:34 +02:00' --full-history --no-merges -- ICSharpCode.Decompiler/IL/Instructions/Block.cs`: 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: ICSharpCode.Decompiler/IL/Transforms/NullPropagationTransform.cs ICSharpCode.Decompiler/IL/Transforms/NullPropagationTransform.cs:255— ICSharpCode.Decompiler/IL/Transforms/NullPropagationTransform.cs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in NullPropagationTransform.IsValidAccessChain at line 255. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 08:12:34 +02:00' --until='2026-10-23 08:12:34 +02:00' --full-history --no-merges -- ICSharpCode.Decompiler/IL/Transforms/NullPropagationTransform.cs`: 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: ILSpy/Controls/TreeView/SharpTreeView.cs ILSpy/Controls/TreeView/SharpTreeView.cs:462— ILSpy/Controls/TreeView/SharpTreeView.cs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in SharpTreeView.OnKeyDown at line 462. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 08:12:34 +02:00' --until='2026-10-23 08:12:34 +02:00' --full-history --no-merges -- ILSpy/Controls/TreeView/SharpTreeView.cs`: 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: ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:1169— ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in TypeSystemAstBuilder.IsSpecialConstant at line 1169. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 08:12:34 +02:00' --until='2026-10-23 08:12:34 +02:00' --full-history --no-merges -- ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs`: 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: ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:325— ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in CSharpResolver.ResolveUnaryOperator at line 325. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 08:12:34 +02:00' --until='2026-10-23 08:12:34 +02:00' --full-history --no-merges -- ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs`: 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: ICSharpCode.Decompiler/CSharp/Transforms/TransformFieldAndConstructorInitializers.cs ICSharpCode.Decompiler/CSharp/Transforms/TransformFieldAndConstructorInitializers.cs:307— ICSharpCode.Decompiler/CSharp/Transforms/TransformFieldAndConstructorInitializers.cs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in ConstructorInitializerAnalyzer.Analyze at line 307. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 08:12:34 +02:00' --until='2026-10-23 08:12:34 +02:00' --full-history --no-merges -- ICSharpCode.Decompiler/CSharp/Transforms/TransformFieldAndConstructorInitializers.cs`: 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: ICSharpCode.Decompiler/CSharp/Transforms/PatternStatementTransform.cs ICSharpCode.Decompiler/CSharp/Transforms/PatternStatementTransform.cs:759— ICSharpCode.Decompiler/CSharp/Transforms/PatternStatementTransform.cs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in PatternStatementTransform.TransformAutomaticProperty at line 759. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 08:12:34 +02:00' --until='2026-10-23 08:12:34 +02:00' --full-history --no-merges -- ICSharpCode.Decompiler/CSharp/Transforms/PatternStatementTransform.cs`: 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: ICSharpCode.Decompiler/Documentation/IdStringProvider.cs ICSharpCode.Decompiler/Documentation/IdStringProvider.cs:959— ICSharpCode.Decompiler/Documentation/IdStringProvider.cs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in IdStringProvider.FindMemberInType at line 959. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 08:12:34 +02:00' --until='2026-10-23 08:12:34 +02:00' --full-history --no-merges -- ICSharpCode.Decompiler/Documentation/IdStringProvider.cs`: 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: ILSpy/TextView/DecompilerTabPageModel.cs ILSpy/TextView/DecompilerTabPageModel.cs:553— ILSpy/TextView/DecompilerTabPageModel.cs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in DecompilerTabPageModel.DecompileAsync at line 553. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 08:12:34 +02:00' --until='2026-10-23 08:12:34 +02:00' --full-history --no-merges -- ILSpy/TextView/DecompilerTabPageModel.cs`: 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: ICSharpCode.Decompiler/IL/Transforms/NullableLiftingTransform.cs ICSharpCode.Decompiler/IL/Transforms/NullableLiftingTransform.cs:771— ICSharpCode.Decompiler/IL/Transforms/NullableLiftingTransform.cs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in NullableLiftingTransform.LiftNormal at line 771. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 08:12:34 +02:00' --until='2026-10-23 08:12:34 +02:00' --full-history --no-merges -- ICSharpCode.Decompiler/IL/Transforms/NullableLiftingTransform.cs`: 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: ICSharpCode.Decompiler/CSharp/Disambiguator.cs ICSharpCode.Decompiler/CSharp/Disambiguator.cs:681— ICSharpCode.Decompiler/CSharp/Disambiguator.cs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in Disambiguator.IsUnambiguousCall at line 681. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 08:12:34 +02:00' --until='2026-10-23 08:12:34 +02:00' --full-history --no-merges -- ICSharpCode.Decompiler/CSharp/Disambiguator.cs`: 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: ICSharpCode.Decompiler/Metadata/UniversalAssemblyResolver.cs ICSharpCode.Decompiler/Metadata/UniversalAssemblyResolver.cs:488— ICSharpCode.Decompiler/Metadata/UniversalAssemblyResolver.cs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in UniversalAssemblyResolver.ResolveInternal at line 488. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 08:12:34 +02:00' --until='2026-10-23 08:12:34 +02:00' --full-history --no-merges -- ICSharpCode.Decompiler/Metadata/UniversalAssemblyResolver.cs`: 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: ICSharpCode.Decompiler/IL/Transforms/LocalFunctionDecompiler.cs ICSharpCode.Decompiler/IL/Transforms/LocalFunctionDecompiler.cs:710— ICSharpCode.Decompiler/IL/Transforms/LocalFunctionDecompiler.cs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in LocalFunctionDecompiler.DetermineCaptureAndDeclarationScope at line 710. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 08:12:34 +02:00' --until='2026-10-23 08:12:34 +02:00' --full-history --no-merges -- ICSharpCode.Decompiler/IL/Transforms/LocalFunctionDecompiler.cs`: 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: ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:1068— ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in CSharpConversions.UserDefinedExplicitConversion at line 1068. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 08:12:34 +02:00' --until='2026-10-23 08:12:34 +02:00' --full-history --no-merges -- ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs`: 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.
+ 12 more in this group — see findings.md.
X2 · Cancellation propagation· Async method without CancellationToken · ×35
Async method without CancellationToken: ResolveAsync ICSharpCode.Decompiler/Metadata/UniversalAssemblyResolver.cs:293— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: ResolveModuleAsync ICSharpCode.Decompiler/Metadata/UniversalAssemblyResolver.cs:298— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: CreateAsync ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs:231— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: InitializeAsync ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs:283— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: RepairCyclicTypeForwardersAsync ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs:315— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: FollowChainNextToForwardersAsync ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs:400— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: InitializeCoreAsync ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs:471— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: CheckForPackageUpdateAsync ICSharpCode.ILSpyCmd/DotNetToolUpdateChecker.cs:38— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: OnExecuteAsync ICSharpCode.ILSpyCmd/IlspyCmdProgram.cs:284— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: TryGetModuleAsync ICSharpCode.ILSpyX/AssemblyListSnapshot.cs:50— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: TryGetSimilarModuleAsync ICSharpCode.ILSpyX/AssemblyListSnapshot.cs:69— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: CreateLoadedAssemblyLookupAsync ICSharpCode.ILSpyX/AssemblyListSnapshot.cs:83— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: CreateLoadedAssemblyShortNameGroupLookupAsync ICSharpCode.ILSpyX/AssemblyListSnapshot.cs:124— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: GetAllAssembliesAsync ICSharpCode.ILSpyX/AssemblyListSnapshot.cs:173— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: Load ICSharpCode.ILSpyX/FileLoaders/PEFileLoader.cs:30— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: Load ICSharpCode.ILSpyX/FileLoaders/XamarinCompressedFileLoader.cs:34— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: GetTargetFrameworkIdAsync ICSharpCode.ILSpyX/LoadedAssembly.cs:144— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: GetDetectedTargetFrameworkIdAsync ICSharpCode.ILSpyX/LoadedAssembly.cs:161— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: GetRuntimePackAsync ICSharpCode.ILSpyX/LoadedAssembly.cs:176— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: LoadDebugInfo ICSharpCode.ILSpyX/LoadedAssembly.cs:573— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: ResolveAsync ICSharpCode.ILSpyX/LoadedAssembly.cs:629— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: ResolveCoreAsync ICSharpCode.ILSpyX/LoadedAssembly.cs:657— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: ResolveModuleAsync ICSharpCode.ILSpyX/LoadedAssembly.cs:722— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: HandleForwardedArgumentsAsync ILSpy/App.axaml.cs:153— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: RestoreSelectedPathAsync ILSpy/AssemblyTree/AssemblyTreeModel.cs:476— No CancellationToken parameter — this work can't be stopped early once started.
TooManyMethods: CSharpOutputVisitor ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpOutputVisitor.cs— TooManyMethods — 1986 significant lines (blank, comment-only and punctuation-only lines excluded), 180 methods. The bar is 30 methods; this is 150 over it, 6.00× 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: ExpressionBuilder ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs— TooManyMethods — 3118 significant lines (blank, comment-only and punctuation-only lines excluded), 169 methods. The bar is 30 methods; this is 139 over it, 5.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DecompilerTextView ILSpy/TextView/DecompilerTextView.axaml.cs— TooManyMethods — 951 significant lines (blank, comment-only and punctuation-only lines excluded), 97 methods. The bar is 30 methods; this is 67 over it, 3.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: CSharpResolver ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs— TooManyMethods — 1469 significant lines (blank, comment-only and punctuation-only lines excluded), 93 methods. The bar is 30 methods; this is 63 over it, 3.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: CSharpDecompiler ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs— TooManyMethods — 1638 significant lines (blank, comment-only and punctuation-only lines excluded), 77 methods. The bar is 30 methods; this is 47 over it, 2.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: TypeSystemAstBuilder ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs— TooManyMethods — 1534 significant lines (blank, comment-only and punctuation-only lines excluded), 73 methods. The bar is 30 methods; this is 43 over it, 2.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: AstNode ICSharpCode.Decompiler/CSharp/Syntax/AstNode.cs— TooManyMethods — 444 significant lines (blank, comment-only and punctuation-only lines excluded), 67 methods. The bar is 30 methods; this is 37 over it, 2.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DockWorkspace ILSpy/Docking/DockWorkspace.cs— TooManyMethods — 598 significant lines (blank, comment-only and punctuation-only lines excluded), 66 methods. The bar is 30 methods; this is 36 over it, 2.20× 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: ILReader ICSharpCode.Decompiler/IL/ILReader.cs— TooManyMethods — 1321 significant lines (blank, comment-only and punctuation-only lines excluded), 65 methods. The bar is 30 methods; this is 35 over it, 2.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: CSharpConversions ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs— TooManyMethods — 945 significant lines (blank, comment-only and punctuation-only lines excluded), 62 methods. The bar is 30 methods; this is 32 over it, 2.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SharpTreeNode ICSharpCode.ILSpyX/TreeView/SharpTreeNode.cs— TooManyMethods — 601 significant lines (blank, comment-only and punctuation-only lines excluded), 62 methods, declared across 3 files: TreeView/SharpTreeNode.cs (39), TreeView/FlatListTreeNode.cs (19), TreeView/TreeThreadAffinity.cs (4). The bar is 30 methods; this is 32 over it, 2.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PatternStatementTransform ICSharpCode.Decompiler/CSharp/Transforms/PatternStatementTransform.cs— TooManyMethods — 886 significant lines (blank, comment-only and punctuation-only lines excluded), 56 methods. The bar is 30 methods; this is 26 over it, 1.87× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: StatementBuilder ICSharpCode.Decompiler/CSharp/StatementBuilder.cs— TooManyMethods — 994 significant lines (blank, comment-only and punctuation-only lines excluded), 54 methods. The bar is 30 methods; this is 24 over it, 1.80× 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: ReflectionDisassembler ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs— TooManyMethods — 1310 significant lines (blank, comment-only and punctuation-only lines excluded), 53 methods. The bar is 30 methods; this is 23 over it, 1.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: AsyncAwaitDecompiler ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs— TooManyMethods — 1298 significant lines (blank, comment-only and punctuation-only lines excluded), 52 methods. The bar is 30 methods; this is 22 over it, 1.73× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: TransformExpressionTrees ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs— TooManyMethods — 1278 significant lines (blank, comment-only and punctuation-only lines excluded), 51 methods. The bar is 30 methods; this is 21 over it, 1.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: AssemblyTreeModel ILSpy/AssemblyTree/AssemblyTreeModel.cs— TooManyMethods — 539 significant lines (blank, comment-only and punctuation-only lines excluded), 48 methods. The bar is 30 methods; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: MetadataModule ICSharpCode.Decompiler/TypeSystem/MetadataModule.cs— TooManyMethods — 620 significant lines (blank, comment-only and punctuation-only lines excluded), 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: SharpTreeView ILSpy/Controls/TreeView/SharpTreeView.cs— TooManyMethods — 435 significant lines (blank, comment-only and punctuation-only lines excluded), 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: CallBuilder ICSharpCode.Decompiler/CSharp/CallBuilder.cs— TooManyMethods — 1037 significant lines (blank, comment-only and punctuation-only lines excluded), 40 methods. The bar is 30 methods; this is 10 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DataFlowVisitor ICSharpCode.Decompiler/FlowAnalysis/DataFlowVisitor.cs— TooManyMethods — 287 significant lines (blank, comment-only and punctuation-only lines excluded), 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SequencePointBuilder ICSharpCode.Decompiler/CSharp/SequencePointBuilder.cs— TooManyMethods — 290 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ExpressionTransforms ICSharpCode.Decompiler/IL/Transforms/ExpressionTransforms.cs— TooManyMethods — 597 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 30 methods; this is 6 over it, 1.20× 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: Disambiguator ICSharpCode.Decompiler/CSharp/Disambiguator.cs— TooManyMethods — 528 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 30 methods; this is 6 over it, 1.20× 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: IdStringProvider ICSharpCode.Decompiler/Documentation/IdStringProvider.cs— TooManyMethods — 504 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
Swallowed exception (caught, then discarded) ICSharpCode.Decompiler/CSharp/ProjectDecompiler/TargetServices.cs:306— `catch (ResolutionException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs:585— `catch (BadImageFormatException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs:589— `catch (EndOfStreamException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) ICSharpCode.Decompiler/CSharp/RequiredNamespaceCollector.cs:158— `catch (BadImageFormatException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) ICSharpCode.Decompiler/CSharp/RequiredNamespaceCollector.cs:310— `catch (BadImageFormatException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) ICSharpCode.Decompiler/CSharp/RequiredNamespaceCollector.cs:324— `catch (BadImageFormatException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) ICSharpCode.Decompiler/CSharp/RequiredNamespaceCollector.cs:340— `catch (BadImageFormatException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) ICSharpCode.Decompiler/CSharp/RequiredNamespaceCollector.cs:356— `catch (BadImageFormatException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) ICSharpCode.Decompiler/CSharp/RequiredNamespaceCollector.cs:371— `catch (BadImageFormatException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) ICSharpCode.Decompiler/CSharp/RequiredNamespaceCollector.cs:383— `catch (BadImageFormatException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) ICSharpCode.Decompiler/CSharp/RequiredNamespaceCollector.cs:394— `catch (BadImageFormatException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) ICSharpCode.Decompiler/CSharp/RequiredNamespaceCollector.cs:408— `catch (BadImageFormatException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) ICSharpCode.Decompiler/Disassembler/MethodBodyDisassembler.cs:379— `catch (BadImageFormatException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) ICSharpCode.Decompiler/Disassembler/MethodBodyDisassembler.cs:413— `catch (BadImageFormatException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) ICSharpCode.Decompiler/Disassembler/MethodBodyDisassembler.cs:461— `catch (BadImageFormatException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:691— `catch (BadImageFormatException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) ICSharpCode.Decompiler/Documentation/XmlDocLoader.cs:109— `catch` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) ICSharpCode.Decompiler/Documentation/XmlDocumentationElement.cs:97— `catch` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:165— `catch (SymbolicAnalysisFailedException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) ICSharpCode.Decompiler/IL/InstructionOutputExtensions.cs:101— `catch (BadImageFormatException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) ICSharpCode.Decompiler/Metadata/AssemblyReferences.cs:262— `catch (BadImageFormatException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) ICSharpCode.Decompiler/Metadata/AssemblyReferences.cs:279— `catch (BadImageFormatException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) ICSharpCode.Decompiler/Metadata/ModuleReferenceMetadata.cs:46— `catch (BadImageFormatException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) ICSharpCode.Decompiler/Metadata/UniversalAssemblyResolver.cs:615— `catch (BadImageFormatException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) ICSharpCode.Decompiler/SRMExtensions.cs:437— `catch (BadImageFormatException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Sync-over-async blocking — 22 blocking call(s) on async work (.Wait()/.GetAwaiter().GetResult()) — these waste a thread and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking ICSharpCode.Decompiler.PowerShell/GetDecompiledProjectCmdlet.cs:97— `task.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs:268— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking ICSharpCode.ILSpyCmd/InputFileLoader.cs:124— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking ICSharpCode.ILSpyX/Analyzers/AnalyzerScope.cs:103— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking ICSharpCode.ILSpyX/Analyzers/AnalyzerScope.cs:177— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking ICSharpCode.ILSpyX/Analyzers/AnalyzerScope.cs:232— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking ICSharpCode.ILSpyX/LoadedAssembly.cs:221— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking ICSharpCode.ILSpyX/LoadedAssembly.cs:316— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking ICSharpCode.ILSpyX/LoadedAssembly.cs:328— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking ICSharpCode.ILSpyX/LoadedAssembly.cs:626— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking ICSharpCode.ILSpyX/LoadedAssembly.cs:719— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking ICSharpCode.ILSpyX/LoadedAssembly.cs:787— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking ICSharpCode.ILSpyX/LoadedAssembly.cs:788— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking ILSpy.ReadyToRun/ReadyToRunLanguage.cs:133— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking ILSpy/AssemblyTree/TreeNodeLocator.cs:150— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking ILSpy/Commands/ExtractPackageEntryContextMenuEntry.cs:158— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking ILSpy/TreeNodes/AssemblyTreeNode.cs:86— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking ILSpy/TreeNodes/AssemblyTreeNode.cs:154— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking ILSpy/TreeNodes/AssemblyTreeNode.cs:319— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking ILSpy/TreeNodes/AssemblyTreeNode.cs:410— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking ILSpy/TreeNodes/AssemblyTreeNode.cs:559— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking ILSpy/TreeNodes/ReferenceFolderTreeNode.cs:65— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async (deadlock risk) ICSharpCode.Decompiler.PowerShell/GetDecompiledProjectCmdlet.cs:97— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs:268— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) ICSharpCode.ILSpyCmd/InputFileLoader.cs:124— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) ICSharpCode.ILSpyX/Analyzers/AnalyzerScope.cs:103— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) ICSharpCode.ILSpyX/Analyzers/AnalyzerScope.cs:177— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) ICSharpCode.ILSpyX/Analyzers/AnalyzerScope.cs:231— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) ICSharpCode.ILSpyX/LoadedAssembly.cs:221— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) ICSharpCode.ILSpyX/LoadedAssembly.cs:316— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) ICSharpCode.ILSpyX/LoadedAssembly.cs:328— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) ICSharpCode.ILSpyX/LoadedAssembly.cs:626— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) ICSharpCode.ILSpyX/LoadedAssembly.cs:719— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) ICSharpCode.ILSpyX/LoadedAssembly.cs:787— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) ICSharpCode.ILSpyX/LoadedAssembly.cs:788— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) ILSpy.ReadyToRun/ReadyToRunLanguage.cs:133— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) ILSpy/AssemblyTree/TreeNodeLocator.cs:150— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) ILSpy/Commands/ExtractPackageEntryContextMenuEntry.cs:158— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) ILSpy/TreeNodes/AssemblyTreeNode.cs:86— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) ILSpy/TreeNodes/AssemblyTreeNode.cs:154— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) ILSpy/TreeNodes/AssemblyTreeNode.cs:319— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) ILSpy/TreeNodes/AssemblyTreeNode.cs:410— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) ILSpy/TreeNodes/AssemblyTreeNode.cs:559— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) ILSpy/TreeNodes/ReferenceFolderTreeNode.cs:65— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
ClassTooLong: SwitchOnStringTransform ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs— ClassTooLong — 1093 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 693 over it, 2.73× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: RecordDecompiler ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs— ClassTooLong — 908 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 508 over it, 2.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: YieldReturnDecompiler ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs— ClassTooLong — 779 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 379 over it, 1.95× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: RuntimeAsyncExceptionRewriteTransform ICSharpCode.Decompiler/IL/ControlFlow/RuntimeAsyncExceptionRewriteTransform.cs— ClassTooLong — 712 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 312 over it, 1.78× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
ClassTooLong: CSharpPrimitiveCast ICSharpCode.Decompiler/Util/CSharpPrimitiveCast.cs— ClassTooLong — 670 significant lines (blank, comment-only and punctuation-only lines excluded), 3 methods. The bar is 400 significant lines; this is 270 over it, 1.68× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
ClassTooLong: DeconstructionTransform ICSharpCode.Decompiler/IL/Transforms/DeconstructionTransform.cs— ClassTooLong — 604 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 204 over it, 1.51× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: TransformAssignment ICSharpCode.Decompiler/IL/Transforms/TransformAssignment.cs— ClassTooLong — 595 significant lines (blank, comment-only and punctuation-only lines excluded), 17 methods. The bar is 400 significant lines; this is 195 over it, 1.49× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: DetectPinnedRegions ICSharpCode.Decompiler/IL/ControlFlow/DetectPinnedRegions.cs— ClassTooLong — 547 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 147 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: OverloadResolution ICSharpCode.Decompiler/CSharp/Resolver/OverloadResolution.cs— ClassTooLong — 529 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 129 over it, 1.32× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: CSharpFormattingOptions ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpFormattingOptions.cs— ClassTooLong — 517 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 117 over it, 1.29× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: LocalFunctionDecompiler ICSharpCode.Decompiler/IL/Transforms/LocalFunctionDecompiler.cs— ClassTooLong — 504 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 104 over it, 1.26× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: MetadataTypeDefinition ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataTypeDefinition.cs— ClassTooLong — 500 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 100 over it, 1.25× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: DynamicCallSiteTransform ICSharpCode.Decompiler/IL/Transforms/DynamicCallSiteTransform.cs— ClassTooLong — 471 significant lines (blank, comment-only and punctuation-only lines excluded), 10 methods. The bar is 400 significant lines; this is 71 over it, 1.18× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: DecompilerSettings ICSharpCode.Decompiler/DecompilerSettings.cs— ClassTooLong — 437 significant lines (blank, comment-only and punctuation-only lines excluded), 6 methods. The bar is 400 significant lines; this is 37 over it, 1.09× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Analyzer ICSharpCode.Decompiler/IL/Transforms/IntroduceScopedModifierOnLocals.cs— ClassTooLong — 429 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 29 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: CSharpHighlightingTokenWriter ILSpy/Languages/CSharpHighlightingTokenWriter.cs— ClassTooLong — 429 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. The bar is 400 significant lines; this is 29 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: MethodBodyDisassembler ICSharpCode.Decompiler/Disassembler/MethodBodyDisassembler.cs— ClassTooLong — 413 significant lines (blank, comment-only and punctuation-only lines excluded), 12 methods. The bar is 400 significant lines; this is 13 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: DeclareVariables ICSharpCode.Decompiler/CSharp/Transforms/DeclareVariables.cs— ClassTooLong — 412 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 12 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Lexer ICSharpCode.ILSpyX/Search/CSharpLexer.cs— ClassTooLong — 411 significant lines (blank, comment-only and punctuation-only lines excluded), 9 methods. The bar is 400 significant lines; this is 11 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: IndexRangeTransform ICSharpCode.Decompiler/IL/Transforms/IndexRangeTransform.cs— ClassTooLong — 402 significant lines (blank, comment-only and punctuation-only lines excluded), 13 methods. The bar is 400 significant lines; this is 2 over it, 1.01× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
Duplicated block (9 lines × 2) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:1993— ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:1993-2001 | ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:2293-2301 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:1993` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `inst` to `BinaryNumericInstruction` in one and `NumericCompoundAssign` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (9 lines × 2) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2392— ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2392-2400 | ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2503-2511 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2501` calls `AddRange`, `ConvertAttributes`, `GetReturnTypeAttributes` and `ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2390` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) ILSpy/Commands/DecompileAllCommand.cs:74— ILSpy/Commands/DecompileAllCommand.cs:74-82 | ILSpy/Commands/DecompileAllCommand.cs:143-151 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ILSpy/Commands/DecompileAllCommand.cs:74` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:1778— ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:1778-1786 | ICSharpCode.Decompiler/IL/InstructionOutputExtensions.cs:188-196 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:1778` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) ICSharpCode.Decompiler/IL/Transforms/UsingTransform.cs:158— ICSharpCode.Decompiler/IL/Transforms/UsingTransform.cs:158-166 | ICSharpCode.Decompiler/IL/Transforms/UsingTransform.cs:493-501 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) ICSharpCode.ILSpyX/Search/CSharpLexer.cs:1025— ICSharpCode.ILSpyX/Search/CSharpLexer.cs:1025-1033 | ICSharpCode.ILSpyX/Search/CSharpLexer.cs:1044-1052 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.ILSpyX/Search/CSharpLexer.cs:1025` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `ICSharpCode.ILSpyX/Search/CSharpLexer.cs:1053` calls `Error`, `Format`, `ReaderPeek` and `ICSharpCode.ILSpyX/Search/CSharpLexer.cs:1034` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:1574— ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:1574-1582 | ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:2143-2151 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2498— ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2498-2506 | ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2578-2586 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:1173— ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:1173-1181 | ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:1312-1320 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) ICSharpCode.Decompiler/IL/Transforms/TransformArrayInitializers.cs:111— ICSharpCode.Decompiler/IL/Transforms/TransformArrayInitializers.cs:111-119 | ICSharpCode.Decompiler/IL/Transforms/TransformArrayInitializers.cs:298-306 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/IL/Transforms/TransformArrayInitializers.cs:111` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (9 lines × 2) ICSharpCode.BamlDecompiler/Handlers/Records/DefAttributeKeyTypeHandler.cs:48— ICSharpCode.BamlDecompiler/Handlers/Records/DefAttributeKeyTypeHandler.cs:48-56 | ICSharpCode.BamlDecompiler/Handlers/Records/PropertyTypeReferenceHandler.cs:53-61 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 2) ICSharpCode.Decompiler/IL/ControlFlow/LoopDetection.cs:115— ICSharpCode.Decompiler/IL/ControlFlow/LoopDetection.cs:115-124 | ICSharpCode.Decompiler/IL/ControlFlow/LoopDetection.cs:777-785 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/IL/ControlFlow/LoopDetection.cs:115` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) ILSpy/Views/OpenFromNuGetFeedDialog.axaml.cs:100— ILSpy/Views/OpenFromNuGetFeedDialog.axaml.cs:100-108 | ILSpy/Views/OpenFromProcessDialog.axaml.cs:78-87 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `ILSpy/Views/OpenFromProcessDialog.axaml.cs:78` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 2) ICSharpCode.BamlDecompiler/Xaml/XamlUtils.cs:226— ICSharpCode.BamlDecompiler/Xaml/XamlUtils.cs:226-234 | ICSharpCode.Decompiler/IL/ILAmbience.cs:514-522 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Correctness/Switch.cs:194— #pragma warning disable CS0162 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.cs:778— #pragma warning disable 251 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/LocalFunctions.cs:40— #pragma warning disable CS0219 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/LocalFunctions.cs:211— #pragma warning disable CS0219 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/VariableNaming.cs:50— #pragma warning disable CS0219 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/LocalFunctions.cs:85— #pragma warning disable CS8387 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/LocalFunctions.cs:176— #pragma warning disable CS8387 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/MemberTests.cs:33— #pragma warning disable format — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/TupleTests.cs:104— #pragma warning disable format — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/TupleTests.cs:109— #pragma warning disable format — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/StringInterpolation.cs:40— #pragma warning disable IDE0043 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TypeSystem/TypeSystemTestCase.cs:48— #pragma warning disable CS0465 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
Duplicated block (7 lines × 2) ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs:1423— ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs:1423-1429 | ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs:1487-1493 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs:1423` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) ICSharpCode.Decompiler/IL/Transforms/TransformArrayInitializers.cs:63— ICSharpCode.Decompiler/IL/Transforms/TransformArrayInitializers.cs:63-69 | ICSharpCode.Decompiler/IL/Transforms/TransformArrayInitializers.cs:279-285 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/IL/Transforms/TransformArrayInitializers.cs:63` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) ICSharpCode.Decompiler/IL/Transforms/UsingTransform.cs:85— ICSharpCode.Decompiler/IL/Transforms/UsingTransform.cs:85-91 | ICSharpCode.Decompiler/IL/Transforms/UsingTransform.cs:156-162 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) ICSharpCode.BamlDecompiler/BamlDecompilerTypeSystem.cs:87— ICSharpCode.BamlDecompiler/BamlDecompilerTypeSystem.cs:87-93 | ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs:488-494 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.BamlDecompiler/BamlDecompilerTypeSystem.cs:87` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:1508— ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:1508-1514 | ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:1536-1542 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:1508` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) ICSharpCode.Decompiler/IL/Instructions/DynamicInstructions.cs:443— ICSharpCode.Decompiler/IL/Instructions/DynamicInstructions.cs:443-449 | ICSharpCode.Decompiler/IL/Instructions/DynamicInstructions.cs:486-492 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) ILSpy/Controls/Omnibar/OmnibarViewModel.cs:217— ILSpy/Controls/Omnibar/OmnibarViewModel.cs:217-223 | ILSpy/Search/SearchPaneModel.cs:324-330 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:4771— ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:4771-4777 | ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:4802-4808 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) ILSpy/ContextMenuEntry.cs:86— ILSpy/ContextMenuEntry.cs:86-92 | ILSpy/ContextMenuEntry.cs:115-127 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 2) ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataMethod.cs:166— ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataMethod.cs:166-172 | ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataProperty.cs:104-110 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataMethod.cs:176— ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataMethod.cs:176-182 | ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataProperty.cs:114-120 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) ILSpy/Themes/PreviewTabClassBehavior.cs:73— ILSpy/Themes/PreviewTabClassBehavior.cs:73-79 | ILSpy/Themes/PreviewTabContextMenuBehavior.cs:65-74 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) ICSharpCode.BamlDecompiler/Rewrite/ConnectionIdRewritePass.cs:320— ICSharpCode.BamlDecompiler/Rewrite/ConnectionIdRewritePass.cs:320-324 | ICSharpCode.BamlDecompiler/Rewrite/ConnectionIdRewritePass.cs:336-340 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) ICSharpCode.Decompiler/TypeSystem/Implementation/SpecializedMethod.cs:235— ICSharpCode.Decompiler/TypeSystem/Implementation/SpecializedMethod.cs:235-239 | ICSharpCode.Decompiler/TypeSystem/VarArgInstanceMethod.cs:93-97 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/TypeSystem/Implementation/SpecializedMethod.cs:235` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) ICSharpCode.Decompiler/IL/ControlFlow/RuntimeAsyncExceptionRewriteTransform.cs:153— ICSharpCode.Decompiler/IL/ControlFlow/RuntimeAsyncExceptionRewriteTransform.cs:153-157 | ICSharpCode.Decompiler/IL/ControlFlow/RuntimeAsyncExceptionRewriteTransform.cs:514-518 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) ICSharpCode.Decompiler/TypeSystem/ApplyAttributeTypeVisitor.cs:97— ICSharpCode.Decompiler/TypeSystem/ApplyAttributeTypeVisitor.cs:97-101 | ICSharpCode.Decompiler/TypeSystem/ApplyAttributeTypeVisitor.cs:110-114 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/TypeSystem/ApplyAttributeTypeVisitor.cs:97` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) ICSharpCode.BamlDecompiler/Handlers/Blocks/KeyElementStartHandler.cs:43— ICSharpCode.BamlDecompiler/Handlers/Blocks/KeyElementStartHandler.cs:43-47 | ICSharpCode.BamlDecompiler/Handlers/Records/DefAttributeKeyStringHandler.cs:43-47 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) ICSharpCode.Decompiler/CSharp/AutoEventDecompiler.cs:383— ICSharpCode.Decompiler/CSharp/AutoEventDecompiler.cs:383-387 | ICSharpCode.Decompiler/CSharp/AutoEventDecompiler.cs:417-421 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) ICSharpCode.Decompiler/IL/InstructionOutputExtensions.cs:227— ICSharpCode.Decompiler/IL/InstructionOutputExtensions.cs:227-231 | ICSharpCode.Decompiler/IL/InstructionOutputExtensions.cs:279-283 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) ILSpy/Metadata/CorTables/FieldLayoutTableTreeNode.cs:45— ILSpy/Metadata/CorTables/FieldLayoutTableTreeNode.cs:45-49 | ILSpy/Metadata/CorTables/FieldRVATableTreeNode.cs:46-50 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `ILSpy/Metadata/CorTables/FieldLayoutTableTreeNode.cs:45` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:1061— ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:1061-1065 | ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:1101-1105 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:1061` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) ILSpy/Languages/CSharpLanguage.cs:182— ILSpy/Languages/CSharpLanguage.cs:182-186 | ILSpy/Languages/CSharpLanguage.cs:188-192 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataEvent.cs:99— ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataEvent.cs:99-103 | ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataProperty.cs:188-192 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) ILSpy/TextView/DecompilerTextView.axaml.cs:818— ILSpy/TextView/DecompilerTextView.axaml.cs:818-822 | ILSpy/Views/MetadataTablePage.axaml.cs:171-175 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:1763— ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:1763-1772 | ICSharpCode.Decompiler/IL/InstructionOutputExtensions.cs:177-186 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:1763` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:731— ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:731-740 | ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:844-853 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2459— ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2459-2468 | ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2479-2488 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:1122— ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:1122-1131 | ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:1161-1170 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:1136` calls `Write` and `ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:1172` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:1131— ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:1131-1140 | ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:1158-1167 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:1131` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:1156` calls `AddILRange` and `ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:1129` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:622— ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:622-631 | ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:719-728 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:622` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:854— ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:854-863 | ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:874-883 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:854` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:871` calls `CompareOrdinal` and `ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:853` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) ICSharpCode.Decompiler/Util/TreeTraversal.cs:49— ICSharpCode.Decompiler/Util/TreeTraversal.cs:49-58 | ICSharpCode.ILSpyX/TreeView/TreeTraversal.cs:48-57 — before extracting anything, compare `ICSharpCode.Decompiler/Util/TreeTraversal.cs` and `ICSharpCode.ILSpyX/TreeView/TreeTraversal.cs` as WHOLE FILES: 88% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/Util/TreeTraversal.cs:49` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:1763— ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:1763-1772 | ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:1773-1782 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:752— ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:752-767 | ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs:464-473 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:752` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:953— ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:953-962 | ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:1136-1145 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:953` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) ICSharpCode.Decompiler/TypeSystem/ApplyAttributeTypeVisitor.cs:70— ICSharpCode.Decompiler/TypeSystem/ApplyAttributeTypeVisitor.cs:70-75 | ICSharpCode.Decompiler/TypeSystem/ApplyAttributeTypeVisitor.cs:84-89 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/TypeSystem/ApplyAttributeTypeVisitor.cs:70` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:840— ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:840-845 | ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:1094-1099 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) ICSharpCode.Decompiler/CSharp/Transforms/IntroduceQueryExpressions.cs:211— ICSharpCode.Decompiler/CSharp/Transforms/IntroduceQueryExpressions.cs:211-216 | ICSharpCode.Decompiler/CSharp/Transforms/IntroduceQueryExpressions.cs:312-317 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/CSharp/Transforms/IntroduceQueryExpressions.cs:211` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ICSharpCode.Decompiler/CSharp/Transforms/IntroduceQueryExpressions.cs:210` calls `IsNullConditional` and `ICSharpCode.Decompiler/CSharp/Transforms/IntroduceQueryExpressions.cs:311` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:734— ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:734-739 | ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs:445-450 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:734` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) ICSharpCode.Decompiler/IL/Transforms/LockTransform.cs:187— ICSharpCode.Decompiler/IL/Transforms/LockTransform.cs:187-192 | ICSharpCode.Decompiler/IL/Transforms/LockTransform.cs:235-240 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) ICSharpCode.Decompiler/IL/Transforms/LockTransform.cs:201— ICSharpCode.Decompiler/IL/Transforms/LockTransform.cs:201-206 | ICSharpCode.Decompiler/IL/Transforms/LockTransform.cs:298-303 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/IL/Transforms/LockTransform.cs:201` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ICSharpCode.Decompiler/IL/Transforms/LockTransform.cs:296` calls `RemoveAt` and `ICSharpCode.Decompiler/IL/Transforms/LockTransform.cs:199` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) ICSharpCode.Decompiler/IL/Transforms/NullableLiftingTransform.cs:1106— ICSharpCode.Decompiler/IL/Transforms/NullableLiftingTransform.cs:1106-1111 | ICSharpCode.Decompiler/IL/Transforms/NullableLiftingTransform.cs:1123-1128 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataMethod.cs:263— ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataMethod.cs:263-268 | ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataMethod.cs:279-284 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (6 lines × 2) ILSpy/TreeNodes/CursorResourceEntryNode.cs:89— ILSpy/TreeNodes/CursorResourceEntryNode.cs:89-94 | ILSpy/TreeNodes/IconResourceEntryNode.cs:84-89 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (6 lines × 2) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2402— ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2402-2407 | ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2447-2452 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2402` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (6 lines × 2) ICSharpCode.Decompiler/IL/ControlFlow/RuntimeAsyncExceptionRewriteTransform.cs:680— ICSharpCode.Decompiler/IL/ControlFlow/RuntimeAsyncExceptionRewriteTransform.cs:680-687 | ICSharpCode.Decompiler/IL/ControlFlow/RuntimeAsyncExceptionRewriteTransform.cs:824-829 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `ICSharpCode.Decompiler/IL/ControlFlow/RuntimeAsyncExceptionRewriteTransform.cs:837` calls `Clone`, `SetILRange`, `Interval` and `ICSharpCode.Decompiler/IL/ControlFlow/RuntimeAsyncExceptionRewriteTransform.cs:692` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
HackComment ICSharpCode.Decompiler/CSharp/CallBuilder.cs:653— // HACK : convert this.Dispose() to ((IDisposable)this).Dispose(), if Dispose is an explicitly implemented interface method. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment ICSharpCode.Decompiler/CSharp/CallBuilder.cs:1405— // HACK: this is a special case for collection initializer calls, they do not allow a target to be — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:3882— // HACK: avoid using Expression.Elements.Count: https://github.com/icsharpcode/ILSpy/issues/1202 — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment ICSharpCode.Decompiler/CSharp/Transforms/AddCheckedBlocks.cs:134— // hack: penalize multiple layers of nested expressions — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment ICSharpCode.Decompiler/CSharp/Transforms/TransformFieldAndConstructorInitializers.cs:718— // HACK: because our current AST model doesn't allow specifying an explicit ordering across slots, — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:640— // HACK: the normal async/await logic expects 'initialState' to be the 'in progress' state — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:692— // HACK: the normal async/await logic expects 'initialState' to be the 'in progress' state — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment ICSharpCode.Decompiler/IL/Instructions/BlockContainer.cs:73— // HACK: While it's possible to have BlockContainers without entry point, — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment ICSharpCode.Decompiler/IL/Instructions/Branch.cs:56— // HACK: We treat TargetBlock as non-nullable publicly, because it's only null inside — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment ICSharpCode.Decompiler/IL/Transforms/PatternMatchingTransform.cs:643— // HACK: condition detection uses StartILOffset of blocks to decide which branch of if-else — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
Swallowed exception (empty catch) ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:941— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs:227— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) ICSharpCode.Decompiler/Documentation/IdStringProvider.cs:337— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) ICSharpCode.Decompiler/Documentation/IdStringProvider.cs:340— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) ICSharpCode.Decompiler/Metadata/DotNetCorePathFinder.cs:336— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) ICSharpCode.Decompiler/Metadata/DotNetCorePathFinder.cs:339— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) ICSharpCode.Decompiler/Metadata/DotNetCorePathFinder.cs:381— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) ICSharpCode.Decompiler/Metadata/UniversalAssemblyResolver.cs:512— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs:500— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
X18 · Disposal-pattern correctness· Disposable created and abandoned in the method that made it · ×8
Disposable created and abandoned in the method that made it ICSharpCode.BamlDecompiler/Baml/BamlReader.cs:50— `rdr` is a `BinaryReader`, which implements `IDisposable`, and it is created here (line 50). Every use of it in `IsBamlHeader` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var rdr = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it ICSharpCode.BamlDecompiler/Baml/BamlReader.cs:65— `rdr` is a `BinaryReader`, which implements `IDisposable`, and it is created here (line 65). Every use of it in `ReadSignature` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var rdr = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it ICSharpCode.BamlDecompiler/Baml/BamlWriter.cs:45— `wtr` is a `BinaryWriter`, which implements `IDisposable`, and it is created here (line 45). Every use of it in `WriteDocument` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var wtr = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it ICSharpCode.Decompiler.PowerShell/GetDecompiledSourceCmdlet.cs:44— `output` is a `StringWriter`, which implements `IDisposable`, and it is created here (line 44). Every use of it in `ProcessRecord` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var output = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it ICSharpCode.Decompiler/DebugInfo/PortablePdbWriter.cs:353— `deflate` is a `DeflateStream`, which implements `IDisposable`, and it is created here (line 353). Every use of it in `WriteSourceToBlob` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var deflate = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it ICSharpCode.ILSpyX/Search/LiteralSearchStrategy.cs:47— `lexer` is a `Lexer`, which implements `IDisposable`, and it is created here (line 47). Every use of it in `LiteralSearchStrategy` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var lexer = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it REDACTED:76— `xmlReader` is a `XmlTextReader`, which implements `IDisposable`, and it is created here (line 76). Every use of it in `DetectFileType` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var xmlReader = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it REDACTED:88— `process` is a `Process`, which implements `IDisposable`, and it is created here (line 88). Every use of it in `Start` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var process = …;`), which releases it at the end of the scope on every path including a throw.
Duplicated block (12 lines × 2) ICSharpCode.Decompiler/IL/PointerArithmeticOffset.cs:94— ICSharpCode.Decompiler/IL/PointerArithmeticOffset.cs:94-105 | ICSharpCode.Decompiler/TypeSystem/TypeUtils.cs:58-69 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/IL/PointerArithmeticOffset.cs:94` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:1046— ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:1046-1057 | ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:1120-1131 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) ICSharpCode.Decompiler/IL/InstructionOutputExtensions.cs:153— ICSharpCode.Decompiler/IL/InstructionOutputExtensions.cs:153-164 | ICSharpCode.Decompiler/IL/InstructionOutputExtensions.cs:254-265 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/IL/InstructionOutputExtensions.cs:153` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpOutputVisitor.cs:2547— ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpOutputVisitor.cs:2547-2558 | ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpOutputVisitor.cs:2704-2715 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) ICSharpCode.Decompiler/IL/Transforms/CachedDelegateInitialization.cs:168— ICSharpCode.Decompiler/IL/Transforms/CachedDelegateInitialization.cs:168-179 | ICSharpCode.Decompiler/IL/Transforms/CachedDelegateInitialization.cs:200-211 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) ILSpy/Controls/Omnibar/OmnibarViewModel.cs:179— ILSpy/Controls/Omnibar/OmnibarViewModel.cs:179-190 | ILSpy/Search/SearchPaneModel.cs:280-291 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `ILSpy/Controls/Omnibar/OmnibarViewModel.cs:179` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `result` to `SearchResult?` in one and `SearchResult` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (12 lines × 2) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:506— ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:506-519 | ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:673-684 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:506` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1060— ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1060-1067 | ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1193-1200 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1060` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1191` calls `ConvertInstruction` and `ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1059` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) ICSharpCode.Decompiler/CSharp/CallBuilder.cs:1245— ICSharpCode.Decompiler/CSharp/CallBuilder.cs:1245-1252 | ICSharpCode.Decompiler/CSharp/CallBuilder.cs:1256-1263 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (8 lines × 2) ICSharpCode.Decompiler/TypeSystem/Implementation/SpecializedMember.cs:320— ICSharpCode.Decompiler/TypeSystem/Implementation/SpecializedMember.cs:320-327 | ICSharpCode.Decompiler/TypeSystem/Implementation/SpecializedMethod.cs:235-242 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:1604— ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:1604-1611 | ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:1624-1631 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:1599` calls `MatchStateMachineArg`, `MatchLdLoca`, `MatchLdThis` and `ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:1623` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) ICSharpCode.Decompiler/IL/ILReader.cs:1932— ICSharpCode.Decompiler/IL/ILReader.cs:1932-1942 | ICSharpCode.Decompiler/IL/ILReader.cs:1943-1950 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/IL/ILReader.cs:1943` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) ILSpy/Commands/ExportCommandAttribute.cs:34— ILSpy/Commands/ExportCommandAttribute.cs:34-41 | ILSpy/Commands/ExportCommandAttribute.cs:58-65 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) ICSharpCode.BamlDecompiler/Rewrite/AttributeRewritePass.cs:52— ICSharpCode.BamlDecompiler/Rewrite/AttributeRewritePass.cs:52-59 | ICSharpCode.BamlDecompiler/Rewrite/MarkupExtensionRewritePass.cs:56-63 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (13 lines × 2) ICSharpCode.BamlDecompiler/Handlers/Records/PropertyWithStaticResourceIdHandler.cs:46— ICSharpCode.BamlDecompiler/Handlers/Records/PropertyWithStaticResourceIdHandler.cs:46-58 | ICSharpCode.BamlDecompiler/Handlers/Records/StaticResourceIdHandler.cs:34-46 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (13 lines × 2) ICSharpCode.Decompiler/CSharp/OutputVisitor/TextWriterTokenWriter.cs:476— ICSharpCode.Decompiler/CSharp/OutputVisitor/TextWriterTokenWriter.cs:476-488 | ICSharpCode.Decompiler/CSharp/OutputVisitor/TextWriterTokenWriter.cs:611-623 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/CSharp/OutputVisitor/TextWriterTokenWriter.cs:476` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) ICSharpCode.Decompiler/IL/Instructions/BinaryNumericInstruction.cs:210— ICSharpCode.Decompiler/IL/Instructions/BinaryNumericInstruction.cs:210-222 | ICSharpCode.Decompiler/IL/Instructions/CompoundAssignmentInstruction.cs:281-293 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (13 lines × 2) ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:1097— ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:1097-1109 | ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:1287-1299 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2388— ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2388-2400 | ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2430-2442 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) ICSharpCode.Decompiler/IL/Transforms/NullCoalescingTransform.cs:68— ICSharpCode.Decompiler/IL/Transforms/NullCoalescingTransform.cs:68-81 | ICSharpCode.Decompiler/IL/Transforms/NullCoalescingTransform.cs:87-99 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/IL/Transforms/NullCoalescingTransform.cs:68` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
async void method: Execute ILSpy/Commands/FileCommands.cs:49— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: Execute ILSpy/Commands/FileCommands.cs:261— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: OnDragPointerMoved ILSpy/Controls/TreeView/SharpTreeView.cs:665— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: HandleExceptions ILSpy/FireAndForgetExtensions.cs:38— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: Execute ILSpy/TreeNodes/AssemblyTreeNode.cs:735— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: OnExecute ILSpy.AddIn.VS2022/Commands/OpenCodeItemCommand.cs:78— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
Duplicated block (17 lines × 2) ICSharpCode.Decompiler/CSharp/AutoEventDecompiler.cs:279— ICSharpCode.Decompiler/CSharp/AutoEventDecompiler.cs:279-295 | ICSharpCode.Decompiler/CSharp/AutoEventDecompiler.cs:317-333 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (17 lines × 2) ICSharpCode.Decompiler/IL/Transforms/LockTransform.cs:97— ICSharpCode.Decompiler/IL/Transforms/LockTransform.cs:97-113 | ICSharpCode.Decompiler/IL/Transforms/LockTransform.cs:143-159 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/IL/Transforms/LockTransform.cs:97` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (17 lines × 2) ICSharpCode.Decompiler/Util/UnicodeNewline.cs:282— ICSharpCode.Decompiler/Util/UnicodeNewline.cs:282-298 | ICSharpCode.Decompiler/Util/UnicodeNewline.cs:312-328 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/Util/UnicodeNewline.cs:282` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (17 lines × 2) ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:1011— ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:1011-1029 | ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:1069-1085 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:1011` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) ICSharpCode.Decompiler/IL/Transforms/AssignVariableNames.cs:156— ICSharpCode.Decompiler/IL/Transforms/AssignVariableNames.cs:156-172 | ICSharpCode.Decompiler/IL/Transforms/AssignVariableNames.cs:176-192 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/IL/Transforms/AssignVariableNames.cs:156` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (15 lines × 2) ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/EventDeclaration.cs:84— ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/EventDeclaration.cs:84-98 | ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/MethodDeclaration.cs:45-59 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (15 lines × 2) ICSharpCode.Decompiler/IL/Transforms/AssignVariableNames.cs:1018— ICSharpCode.Decompiler/IL/Transforms/AssignVariableNames.cs:1018-1032 | ICSharpCode.Decompiler/IL/Transforms/AssignVariableNames.cs:1067-1081 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/IL/Transforms/AssignVariableNames.cs:1018` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) ICSharpCode.Decompiler/IL/Transforms/CachedDelegateInitialization.cs:232— ICSharpCode.Decompiler/IL/Transforms/CachedDelegateInitialization.cs:232-246 | ICSharpCode.Decompiler/IL/Transforms/CachedDelegateInitialization.cs:305-319 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 2) ILSpy/Commands/DecompileAllCommand.cs:93— ILSpy/Commands/DecompileAllCommand.cs:93-107 | ILSpy/Commands/DecompileAllCommand.cs:163-177 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ILSpy/Commands/DecompileAllCommand.cs:93` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) ICSharpCode.Decompiler/IL/ILAmbience.cs:160— ICSharpCode.Decompiler/IL/ILAmbience.cs:160-174 | ICSharpCode.Decompiler/IL/ILAmbience.cs:286-300 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ICSharpCode.Decompiler/IL/ILAmbience.cs:284` calls `Write` and `ICSharpCode.Decompiler/IL/ILAmbience.cs:159` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 2) ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/DelegateDeclaration.cs:49— ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/DelegateDeclaration.cs:49-59 | ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/MethodDeclaration.cs:58-68 — before extracting anything, compare `ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/DelegateDeclaration.cs` and `ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/MethodDeclaration.cs` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/MethodDeclaration.cs:55` calls `Slot` and `ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/DelegateDeclaration.cs:47` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 2) ICSharpCode.Decompiler/Util/BitSet.cs:204— ICSharpCode.Decompiler/Util/BitSet.cs:204-214 | ICSharpCode.Decompiler/Util/BitSet.cs:241-251 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/Util/BitSet.cs:204` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:1517— ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:1517-1527 | ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:1545-1555 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:1517` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) ICSharpCode.Decompiler/IL/ILReader.cs:2000— ICSharpCode.Decompiler/IL/ILReader.cs:2000-2010 | ICSharpCode.Decompiler/IL/ILReader.cs:2204-2214 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) ICSharpCode.Decompiler/IL/Transforms/NullPropagationTransform.cs:296— ICSharpCode.Decompiler/IL/Transforms/NullPropagationTransform.cs:296-306 | ICSharpCode.Decompiler/IL/Transforms/NullPropagationTransform.cs:392-402 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Low cohesion: ILInstruction (LCOM4 80) ICSharpCode.Decompiler/IL/Instructions/ILInstruction.cs:56— ILInstruction's methods fall into 80 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 80 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: SecurityDeclarationDecoder (LCOM4 6) ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:485— SecurityDeclarationDecoder'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: MetadataTypeDefinition (LCOM4 5) ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataTypeDefinition.cs:36— MetadataTypeDefinition's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: MainWindow (LCOM4 5) ILSpy/Views/MainWindow.axaml.cs:36— MainWindow's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: AstNode (LCOM4 4) ICSharpCode.Decompiler/CSharp/Syntax/AstNode.cs:42— AstNode'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.
IC1 · Incompleteness & stubs· Bound check compiled out of the shipping build · ×5
Bound check compiled out of the shipping build ICSharpCode.BamlDecompiler/Handlers/Records/XmlnsPropertyHandler.cs:44— The only thing establishing that `attr.FixedArguments` is long enough before it is indexed is a `Debug.Assert`, which is `[Conditional("DEBUG")]` — the compiler deletes the call from Release, so the build your users install indexes `attr.FixedArguments` with no length check at all and throws at the indexer instead of failing diagnosably. `attr.FixedArguments` comes from outside this method, so its length is a contract, not something this code can see. Bound it with a check that ships (`if (attr.FixedArguments.Count < n) throw …`, or `ArgumentOutOfRangeException.ThrowIfLessThan`), and keep the assert for the invariant you believe holds.
Bound check compiled out of the shipping build ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:4890— The only thing establishing that `inst.Arguments` is long enough before it is indexed is a `Debug.Assert`, which is `[Conditional("DEBUG")]` — the compiler deletes the call from Release, so the build your users install indexes `inst.Arguments` with no length check at all and throws at the indexer instead of failing diagnosably. `inst.Arguments` comes from outside this method, so its length is a contract, not something this code can see. Bound it with a check that ships (`if (inst.Arguments.Count < n) throw …`, or `ArgumentOutOfRangeException.ThrowIfLessThan`), and keep the assert for the invariant you believe holds.
Bound check compiled out of the shipping build ICSharpCode.Decompiler/CSharp/StatementBuilder.cs:254— The only thing establishing that `values` is long enough before it is indexed is a `Debug.Assert`, which is `[Conditional("DEBUG")]` — the compiler deletes the call from Release, so the build your users install indexes `values` with no length check at all and throws at the indexer instead of failing diagnosably. `values` comes from outside this method, so its length is a contract, not something this code can see. Bound it with a check that ships (`if (values.Count < n) throw …`, or `ArgumentOutOfRangeException.ThrowIfLessThan`), and keep the assert for the invariant you believe holds.
Bound check compiled out of the shipping build ICSharpCode.Decompiler/IL/Instructions/BlockContainer.cs:217— The only thing establishing that `EntryPoint.Instructions` is long enough before it is indexed is a `Debug.Assert`, which is `[Conditional("DEBUG")]` — the compiler deletes the call from Release, so the build your users install indexes `EntryPoint.Instructions` with no length check at all and throws at the indexer instead of failing diagnosably. `EntryPoint.Instructions` comes from outside this method, so its length is a contract, not something this code can see. Bound it with a check that ships (`if (EntryPoint.Instructions.Count < n) throw …`, or `ArgumentOutOfRangeException.ThrowIfLessThan`), and keep the assert for the invariant you believe holds.
Bound check compiled out of the shipping build ICSharpCode.Decompiler/IL/Transforms/IndexRangeTransform.cs:435— The only thing establishing that `rangeCtorCall.Arguments` is long enough before it is indexed is a `Debug.Assert`, which is `[Conditional("DEBUG")]` — the compiler deletes the call from Release, so the build your users install indexes `rangeCtorCall.Arguments` with no length check at all and throws at the indexer instead of failing diagnosably. `rangeCtorCall.Arguments` comes from outside this method, so its length is a contract, not something this code can see. Bound it with a check that ships (`if (rangeCtorCall.Arguments.Count < n) throw …`, or `ArgumentOutOfRangeException.ThrowIfLessThan`), and keep the assert for the invariant you believe holds.
Duplicated block (16 lines × 2) ICSharpCode.Decompiler/IL/Instructions/PatternMatching.cs:398— ICSharpCode.Decompiler/IL/Instructions/PatternMatching.cs:398-413 | ICSharpCode.Decompiler/IL/Instructions/PatternMatching.cs:425-440 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/IL/Instructions/PatternMatching.cs:398` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:881— ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:881-896 | ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1910-1925 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:881` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 2) ICSharpCode.Decompiler/Util/CollectionExtensions.cs:331— ICSharpCode.Decompiler/Util/CollectionExtensions.cs:331-346 | ICSharpCode.Decompiler/Util/CollectionExtensions.cs:373-388 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/Util/CollectionExtensions.cs:331` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) ICSharpCode.Decompiler/TypeSystem/TypeSystemExtensions.cs:888— ICSharpCode.Decompiler/TypeSystem/TypeSystemExtensions.cs:888-903 | ICSharpCode.Decompiler/TypeSystem/TypeSystemExtensions.cs:907-922 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `assemblyName` to `IAssemblyReference` in one and `AssemblyNameInfo` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (14 lines × 2) ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:1793— ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:1793-1806 | ICSharpCode.Decompiler/IL/InstructionOutputExtensions.cs:203-216 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:1793` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) ICSharpCode.Decompiler/IL/Transforms/InlineArrayTransform.cs:100— ICSharpCode.Decompiler/IL/Transforms/InlineArrayTransform.cs:100-113 | ICSharpCode.Decompiler/IL/Transforms/InlineArrayTransform.cs:120-133 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/IL/Transforms/InlineArrayTransform.cs:100` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2313— ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2313-2326 | ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2882-2895 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2313` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (14 lines × 2) ICSharpCode.Decompiler/CSharp/Transforms/PatternStatementTransform.cs:399— ICSharpCode.Decompiler/CSharp/Transforms/PatternStatementTransform.cs:399-414 | ICSharpCode.Decompiler/CSharp/Transforms/PatternStatementTransform.cs:507-520 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/CSharp/Transforms/PatternStatementTransform.cs:399` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Unfinished stub — throws NotImplementedException ICSharpCode.Decompiler/FlowAnalysis/DataFlowVisitor.cs:842— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException ICSharpCode.Decompiler/IL/ILAmbience.cs:40— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException ICSharpCode.Decompiler/Metadata/FullTypeNameSignatureDecoder.cs:122— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException ICSharpCode.Decompiler/Util/LongSet.cs:368— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException ICSharpCode.Decompiler/FlowAnalysis/DataFlowVisitor.cs:842— `VisitILFunction` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException ICSharpCode.Decompiler/IL/ILAmbience.cs:40— `ConvertConstantValue` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException ICSharpCode.Decompiler/Metadata/FullTypeNameSignatureDecoder.cs:122— `GetUnderlyingEnumType` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException ICSharpCode.Decompiler/Util/LongSet.cs:368— `GetHashCode` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
X5 · Nullable reference types· Symbol treated as nullable, then dereferenced unguarded · ×4
Symbol treated as nullable, then dereferenced unguarded ICSharpCode.Decompiler/IL/Transforms/UserDefinedLogicTransform.cs:162— This method contradicts itself about `call`: line 158 assigns it with `as Call`, which hands back null rather than throwing when the value is not a `Call`, but line 162 then dereferences it directly as `call.Method` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `call` once before the first use and handle the null case, or cast with `(Call)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ILSpy.ReadyToRun/ReadyToRunLanguage.cs:157— This method contradicts itself about `module`: line 156 assigns it with `as PEFile`, which hands back null rather than throwing when the value is not a `PEFile`, but line 157 then dereferences it directly as `module.GetLoadedAssembly` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `module` once before the first use and handle the null case, or cast with `(PEFile)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ILSpy.AddIn.VS2022/Commands/OpenReferenceCommand.cs:78— This method contradicts itself about `reference`: line 77 assigns it with `as Reference`, which hands back null rather than throwing when the value is not a `Reference`, but line 78 then dereferences it directly as `reference.ContainingProject` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `reference` once before the first use and handle the null case, or cast with `(Reference)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ILSpy.AddIn.VS2022/Commands/OpenReferenceCommand.cs:94— This method contradicts itself about `projectItem`: line 93 assigns it with `as ProjectItem`, which hands back null rather than throwing when the value is not a `ProjectItem`, but line 94 then dereferences it directly as `projectItem.ContainingProject` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `projectItem` once before the first use and handle the null case, or cast with `(ProjectItem)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Hollow method — returns a constant without doing the work ICSharpCode.Decompiler/IL/Transforms/LocalFunctionDecompiler.cs:919— `GetPrimitiveType` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
Hollow method — returns a constant without doing the work ICSharpCode.Decompiler/IL/Transforms/LocalFunctionDecompiler.cs:920— `GetSZArrayType` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
Hollow method — returns a constant without doing the work ICSharpCode.Decompiler/IL/Transforms/LocalFunctionDecompiler.cs:931— `GetTypeFromReference` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
X17 · Uncapped recursion over a caller-supplied document· Recursive walk over a caller-supplied document has no depth cap · ×3
Recursive walk over a caller-supplied document has no depth cap ICSharpCode.BamlDecompiler/Rewrite/AttributeRewritePass.cs:56— `Run` is public, takes a document from its caller (line 35) and hands it to `ProcessElement`, which calls itself at line 56 with a child of the node it was given — and nowhere in `ProcessElement` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the tree it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A document nested past the stack that remains raises `StackOverflowException`, which .NET neither lets you catch nor unwinds: the process is torn down where it stands, taking every other request in flight with it, and no `try`/`catch` around `Run` can intervene. Thread a depth argument through `ProcessElement` and reject the document past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap ICSharpCode.BamlDecompiler/Rewrite/ConnectionIdRewritePass.cs:53— `Run` is public, takes a document from its caller (line 42) and hands it to `ProcessConnectionIds`, which calls itself at line 53 with a child of the node it was given — and nowhere in `ProcessConnectionIds` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the tree it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A document nested past the stack that remains raises `StackOverflowException`, which .NET neither lets you catch nor unwinds: the process is torn down where it stands, taking every other request in flight with it, and no `try`/`catch` around `Run` can intervene. Thread a depth argument through `ProcessConnectionIds` and reject the document past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap ICSharpCode.BamlDecompiler/Rewrite/MarkupExtensionRewritePass.cs:60— `Run` is public, takes a document from its caller (line 38) and hands it to `ProcessElement`, which calls itself at line 60 with a child of the node it was given — and nowhere in `ProcessElement` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the tree it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A document nested past the stack that remains raises `StackOverflowException`, which .NET neither lets you catch nor unwinds: the process is torn down where it stands, taking every other request in flight with it, and no `try`/`catch` around `Run` can intervene. Thread a depth argument through `ProcessElement` and reject the document past a fixed maximum, or rewrite the descent with an explicit stack.
X24 · Document value interpolated into markup unescaped· Untrusted text written into markup unescaped · ×3
Untrusted text written into markup unescaped REDACTED:135— `svg` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped REDACTED:711— ``#filter.open { max-width: ${newWidth}px; }`` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped REDACTED:1129— `replace(text)` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
CSharpDecompiler.DoDecompile (cyclomatic 20) ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:2817— CSharpDecompiler.DoDecompile has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
CSharpDecompiler.DoDecompile (cyclomatic 20) ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:2886— CSharpDecompiler.DoDecompile has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
BareSuppressMessage ICSharpCode.Decompiler/TypeSystem/IAttribute.cs:29— System.Diagnostics.CodeAnalysis.SuppressMessage — the suppression records no reason: either it carries no justification argument at all, or one that states nothing a reader can weigh ("OK", "By design"). A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited. Write what makes this site legitimately different — the invariant that holds, the framework contract that forces the shape — or remove the suppression and fix what it hides.
BareSuppressMessage ICSharpCode.Decompiler/Util/BusyManager.cs:33— System.Diagnostics.CodeAnalysis.SuppressMessage — the suppression records no reason: either it carries no justification argument at all, or one that states nothing a reader can weigh ("OK", "By design"). A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited. Write what makes this site legitimately different — the invariant that holds, the framework contract that forces the shape — or remove the suppression and fix what it hides.
CSharpDecompiler.DoDecompile (cognitive 18) ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:2817— CSharpDecompiler.DoDecompile has cognitive complexity 18 (threshold 15). 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.
CSharpDecompiler.DoDecompile (cognitive 18) ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:2886— CSharpDecompiler.DoDecompile has cognitive complexity 18 (threshold 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.
Change coupling: CSharpOutputVisitor.cs ↔ DepthFirstAstVisitor.cs ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpOutputVisitor.cs:1— `ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpOutputVisitor.cs` and `ICSharpCode.Decompiler/CSharp/Syntax/DepthFirstAstVisitor.cs` change together 88% of the time (15 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are `91571224` Add ExtensionDeclaration syntax node; `f7343c75` Add support for simple recursive patterns where the sub pattern is a …; `a5858f16` Add support for primary constructor syntax. — run `git show` on any of them.
Change coupling: GeneratePdbContextMenuEntry.cs ↔ SelectPdbContextMenuEntry.cs ILSpy/Commands/GeneratePdbContextMenuEntry.cs:1— `ILSpy/Commands/GeneratePdbContextMenuEntry.cs` and `ILSpy/Commands/SelectPdbContextMenuEntry.cs` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `18a1591f` Surface fire-and-forget command failures immediately; `4d455142` Re-categorise assembly tree context-menu entries; `31bbcf41` Fix handling of file extensions in project export. — run `git show` on any of them.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (5 members, 50+ identical tokens) ICSharpCode.BamlDecompiler/Handlers/Blocks/PropertyArrayHandler.cs:34— ICSharpCode.BamlDecompiler/Handlers/Blocks/PropertyArrayHandler.cs:34-49 | ICSharpCode.BamlDecompiler/Handlers/Blocks/PropertyComplexHandler.cs:34-49 | ICSharpCode.BamlDecompiler/Handlers/Blocks/PropertyDictionaryHandler.cs:34-49 | ICSharpCode.BamlDecompiler/Handlers/Blocks/PropertyListHandler.cs:34-49 | ICSharpCode.BamlDecompiler/Handlers/Records/PropertyWithStaticResourceIdHandler.cs:36-68 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2385— ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2385-2407 | ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2427-2452 | ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2455-2492 | ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2495-2552 | ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2555-2590 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Duplicated block (14 lines × 3) ICSharpCode.Decompiler/IL/Transforms/DynamicCallSiteTransform.cs:487— ICSharpCode.Decompiler/IL/Transforms/DynamicCallSiteTransform.cs:487-500 | ICSharpCode.Decompiler/IL/Transforms/DynamicCallSiteTransform.cs:535-548 | ICSharpCode.Decompiler/IL/Transforms/DynamicCallSiteTransform.cs:574-587 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 3) ILSpy/TreeNodes/CursorResourceEntryNode.cs:60— ILSpy/TreeNodes/CursorResourceEntryNode.cs:60-73 | ILSpy/TreeNodes/IconResourceEntryNode.cs:60-73 | ILSpy/TreeNodes/ImageResourceEntryNode.cs:64-77 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `ILSpy/TreeNodes/CursorResourceEntryNode.cs:78` calls `Clone` and `ILSpy/TreeNodes/IconResourceEntryNode.cs:76` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13–14 lines × 2) ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:679— ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:679-691 | ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:694-707 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:679` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13–14 lines × 2) ICSharpCode.Decompiler/CSharp/Transforms/PatternStatementTransform.cs:813— ICSharpCode.Decompiler/CSharp/Transforms/PatternStatementTransform.cs:813-826 | ICSharpCode.Decompiler/CSharp/Transforms/PatternStatementTransform.cs:900-912 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 3) ICSharpCode.Decompiler/Util/TreeTraversal.cs:49— ICSharpCode.Decompiler/Util/TreeTraversal.cs:49-57 | ICSharpCode.Decompiler/Util/TreeTraversal.cs:96-104 | ICSharpCode.ILSpyX/TreeView/TreeTraversal.cs:48-56 — before extracting anything, compare `ICSharpCode.Decompiler/Util/TreeTraversal.cs` and `ICSharpCode.ILSpyX/TreeView/TreeTraversal.cs` as WHOLE FILES: 88% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/Util/TreeTraversal.cs:49` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 3) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:506— ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:506-516 | ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:565-575 | ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:673-681 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:506` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
IC1 · Incompleteness & stubs· Empty method body · ×2
Empty method body — does nothing with its inputs ICSharpCode.ILSpyX/Search/CSharpLexer.cs:1107— `Error` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs ILSpy.AddIn.VS2022/Decompiler/Dummy.cs:30— `AddMessage` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
CSharpPrimitiveCast.CSharpPrimitiveCastChecked (cyclomatic 170) ICSharpCode.Decompiler/Util/CSharpPrimitiveCast.cs:47— CSharpPrimitiveCast.CSharpPrimitiveCastChecked has cyclomatic complexity 170 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This shape REPEATS in the file: one other method here (CSharpPrimitiveCast.CSharpPrimitiveCastUnchecked) 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.
CSharpPrimitiveCast.CSharpPrimitiveCastUnchecked (cyclomatic 170) ICSharpCode.Decompiler/Util/CSharpPrimitiveCast.cs:409— CSharpPrimitiveCast.CSharpPrimitiveCastUnchecked has cyclomatic complexity 170 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This shape REPEATS in the file: one other method here (CSharpPrimitiveCast.CSharpPrimitiveCastChecked) 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.
TranslatedExpression.ConvertTo (cyclomatic 130) ICSharpCode.Decompiler/CSharp/TranslatedExpression.cs:209— TranslatedExpression.ConvertTo has cyclomatic complexity 130 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CSharpResolver.ResolveBinaryOperator (cyclomatic 109) ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:545— CSharpResolver.ResolveBinaryOperator has cyclomatic complexity 109 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SwitchOnStringTransform.MatchRoslynSwitchOnStringUsingLengthAndChar (cyclomatic 102) ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:1195— SwitchOnStringTransform.MatchRoslynSwitchOnStringUsingLengthAndChar has cyclomatic complexity 102 (threshold 15). Of this number, 100 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CSharpHighlightingTokenWriter.WriteKeyword (cyclomatic 102) ILSpy/Languages/CSharpHighlightingTokenWriter.cs:134— CSharpHighlightingTokenWriter.WriteKeyword 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.
DynamicCallSiteTransform.ScanCallSiteInitBlock (cyclomatic 101) ICSharpCode.Decompiler/IL/Transforms/DynamicCallSiteTransform.cs:334— DynamicCallSiteTransform.ScanCallSiteInitBlock has cyclomatic complexity 101 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CSharpDecompiler.DoDecompile (cyclomatic 84) ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:1819— CSharpDecompiler.DoDecompile has cyclomatic complexity 84 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
IndexRangeTransform.Run (cyclomatic 81) ICSharpCode.Decompiler/IL/Transforms/IndexRangeTransform.cs:148— IndexRangeTransform.Run has cyclomatic complexity 81 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CSharpDecompiler.MemberIsHidden (cyclomatic 76) ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:427— CSharpDecompiler.MemberIsHidden has cyclomatic complexity 76 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CallBuilder.Build (cyclomatic 73) ICSharpCode.Decompiler/CSharp/CallBuilder.cs:389— CallBuilder.Build has cyclomatic complexity 73 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ReflectionDisassembler.WriteNativeType (cyclomatic 71) ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:883— ReflectionDisassembler.WriteNativeType has cyclomatic complexity 71 (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.
YieldReturnDecompiler.ConvertBody (cyclomatic 71) ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs:855— YieldReturnDecompiler.ConvertBody has cyclomatic complexity 71 (threshold 15). Of this number, 70 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BamlReader.ReadDocument (cyclomatic 69) ICSharpCode.BamlDecompiler/Baml/BamlReader.cs:77— BamlReader.ReadDocument has cyclomatic complexity 69 (threshold 15). Of this number, 68 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own 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.
UsingTransform.MatchDisposeCheck (cyclomatic 68) ICSharpCode.Decompiler/IL/Transforms/UsingTransform.cs:259— UsingTransform.MatchDisposeCheck has cyclomatic complexity 68 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ILAmbience.ConvertSymbol (cyclomatic 65) ICSharpCode.Decompiler/IL/ILAmbience.cs:54— ILAmbience.ConvertSymbol has cyclomatic complexity 65 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TransformExpressionTrees.ConvertInstruction (cyclomatic 63) ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:372— TransformExpressionTrees.ConvertInstruction has cyclomatic complexity 63 (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.
SwitchOnStringTransform.MatchLegacySwitchOnStringWithDict (cyclomatic 61) ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:564— SwitchOnStringTransform.MatchLegacySwitchOnStringWithDict has cyclomatic complexity 61 (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.
RecordDecompiler.IsGeneratedPrintMembers (cyclomatic 59) ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:837— RecordDecompiler.IsGeneratedPrintMembers has cyclomatic complexity 59 (threshold 15). Of this number, 58 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Conv.GetConversionKind (cyclomatic 59) ICSharpCode.Decompiler/IL/Instructions/Conv.cs:183— Conv.GetConversionKind has cyclomatic complexity 59 (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.
Lexer.ReadDigit (cyclomatic 58) ICSharpCode.ILSpyX/Search/CSharpLexer.cs:566— Lexer.ReadDigit 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.
IntroduceQueryExpressions.DecompileQuery (cyclomatic 56) ICSharpCode.Decompiler/CSharp/Transforms/IntroduceQueryExpressions.cs:138— IntroduceQueryExpressions.DecompileQuery 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.
YieldReturnDecompiler.AnalyzeMoveNext (cyclomatic 55) ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs:650— YieldReturnDecompiler.AnalyzeMoveNext has cyclomatic complexity 55 (threshold 15). Of this number, 52 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CSharpDecompiler.IsAccessorInterfaceImplementationRuntimeHelper (cyclomatic 54) ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:564— CSharpDecompiler.IsAccessorInterfaceImplementationRuntimeHelper has cyclomatic complexity 54 (threshold 15). Of this number, 47 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RecordDecompiler.DetectPrimaryConstructor (cyclomatic 54) ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:165— RecordDecompiler.DetectPrimaryConstructor has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AsyncAwaitDecompiler.MatchTaskCreationPattern (cyclomatic 52) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:325— AsyncAwaitDecompiler.MatchTaskCreationPattern 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.
InsertParenthesesVisitor.GetPrecedence (cyclomatic 51) ICSharpCode.Decompiler/CSharp/OutputVisitor/InsertParenthesesVisitor.cs:69— InsertParenthesesVisitor.GetPrecedence has cyclomatic complexity 51 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
RecordDecompiler.IsGeneratedEquals (cyclomatic 51) ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:1084— RecordDecompiler.IsGeneratedEquals has cyclomatic complexity 51 (threshold 15). Of this number, 50 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TypeInference.MergeSimilarTypes (cyclomatic 51) ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:1032— TypeInference.MergeSimilarTypes has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MethodBodyDisassembler.WriteInstruction (cyclomatic 51) ICSharpCode.Decompiler/Disassembler/MethodBodyDisassembler.cs:327— MethodBodyDisassembler.WriteInstruction has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NullableLiftingTransform.Lift (cyclomatic 50) ICSharpCode.Decompiler/IL/Transforms/NullableLiftingTransform.cs:184— NullableLiftingTransform.Lift has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Block.CheckInvariant (cyclomatic 49) ICSharpCode.Decompiler/IL/Instructions/Block.cs:126— Block.CheckInvariant has cyclomatic complexity 49 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
SwitchOnStringTransform.SimplifyCascadingIfStatements (cyclomatic 49) ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:184— SwitchOnStringTransform.SimplifyCascadingIfStatements has cyclomatic complexity 49 (threshold 15). Of this number, 48 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CSharpBracketSearcher.SearchBracketBackward (cyclomatic 49) ILSpy/Languages/CSharpBracketSearcher.cs:133— CSharpBracketSearcher.SearchBracketBackward has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ConstructorInitializerAnalyzer.Analyze (cyclomatic 48) ICSharpCode.Decompiler/CSharp/Transforms/TransformFieldAndConstructorInitializers.cs:307— ConstructorInitializerAnalyzer.Analyze has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NullPropagationTransform.IsValidAccessChain (cyclomatic 48) ICSharpCode.Decompiler/IL/Transforms/NullPropagationTransform.cs:255— NullPropagationTransform.IsValidAccessChain has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TransformCollectionAndObjectInitializers.Run (cyclomatic 48) ICSharpCode.Decompiler/IL/Transforms/TransformCollectionAndObjectInitializers.cs:63— TransformCollectionAndObjectInitializers.Run has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CSharpBracketSearcher.SearchBracketForward (cyclomatic 48) ILSpy/Languages/CSharpBracketSearcher.cs:236— CSharpBracketSearcher.SearchBracketForward has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
VariableScope.VariableScope.ctor (cyclomatic 47) ICSharpCode.Decompiler/IL/Transforms/AssignVariableNames.cs:76— VariableScope.VariableScope.ctor has cyclomatic complexity 47 (threshold 15). Of this number, 39 points are the body's own statements and 8 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ExpressionBuilder.HandleBinaryNumeric (cyclomatic 46) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:1674— ExpressionBuilder.HandleBinaryNumeric has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
OverloadResolution.BetterFunctionMember (cyclomatic 46) ICSharpCode.Decompiler/CSharp/Resolver/OverloadResolution.cs:740— OverloadResolution.BetterFunctionMember has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TypeSystemAstBuilder.ConvertTypeDefinition (cyclomatic 46) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2035— TypeSystemAstBuilder.ConvertTypeDefinition has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TransformArrayInitializers.HandleSimpleArrayInitializer (cyclomatic 46) ICSharpCode.Decompiler/IL/Transforms/TransformArrayInitializers.cs:634— TransformArrayInitializers.HandleSimpleArrayInitializer has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ILSpyCmdProgram.OnExecuteAsync (cyclomatic 46) ICSharpCode.ILSpyCmd/IlspyCmdProgram.cs:284— ILSpyCmdProgram.OnExecuteAsync has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ILInlining.NonAggressiveInlineInto (cyclomatic 45) ICSharpCode.Decompiler/IL/Transforms/ILInlining.cs:648— ILInlining.NonAggressiveInlineInto has cyclomatic complexity 45 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
LiteralSearchStrategy.MethodIsLiteralMatch (cyclomatic 44) ICSharpCode.ILSpyX/Search/LiteralSearchStrategy.cs:144— LiteralSearchStrategy.MethodIsLiteralMatch has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CSharpDecompiler.ReadCodeMappingInfo (cyclomatic 43) ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:1132— CSharpDecompiler.ReadCodeMappingInfo has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CSharpAmbience.ConvertSymbol (cyclomatic 43) ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpAmbience.cs:51— CSharpAmbience.ConvertSymbol has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TypeSystemAstBuilder.ConvertTypeHelper (cyclomatic 43) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:311— TypeSystemAstBuilder.ConvertTypeHelper has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TypeSystemAstBuilder.ConvertEnumValue (cyclomatic 43) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:1320— TypeSystemAstBuilder.ConvertEnumValue has cyclomatic complexity 43 (threshold 15). Of this number, 40 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AsyncAwaitDecompiler.NormalizeAwaitOnCompletedDualBranch (cyclomatic 43) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:1569— AsyncAwaitDecompiler.NormalizeAwaitOnCompletedDualBranch has cyclomatic complexity 43 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
RuntimeAsyncExceptionRewriteTransform.TryRewriteFlagBasedEarlyReturn (cyclomatic 43) ICSharpCode.Decompiler/IL/ControlFlow/RuntimeAsyncExceptionRewriteTransform.cs:1054— RuntimeAsyncExceptionRewriteTransform.TryRewriteFlagBasedEarlyReturn has cyclomatic complexity 43 (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.
FileUtility.NormalizePath (cyclomatic 43) ICSharpCode.Decompiler/Util/FileUtility.cs:34— FileUtility.NormalizePath has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DocumentationRenderer.AddDocumentationElement (cyclomatic 43) ILSpy/TextView/DocumentationRenderer.cs:169— DocumentationRenderer.AddDocumentationElement has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SwitchOnStringTransform.MatchLegacySwitchOnStringWithHashtable (cyclomatic 42) ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:891— SwitchOnStringTransform.MatchLegacySwitchOnStringWithHashtable has cyclomatic complexity 42 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ReplaceMethodCallsWithOperators.ProcessInvocationExpression (cyclomatic 41) ICSharpCode.Decompiler/CSharp/Transforms/ReplaceMethodCallsWithOperators.cs:56— ReplaceMethodCallsWithOperators.ProcessInvocationExpression has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CSharpResolver.BinaryNumericPromotion (cyclomatic 40) ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:1016— CSharpResolver.BinaryNumericPromotion has cyclomatic complexity 40 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
SwitchOnStringTransform.MatchRoslynSwitchOnString (cyclomatic 40) ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:1014— SwitchOnStringTransform.MatchRoslynSwitchOnString has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MemberSearchStrategy.Search (cyclomatic 40) ICSharpCode.ILSpyX/Search/MemberSearchStrategy.cs:38— MemberSearchStrategy.Search has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TypeInference.MakeLowerBoundInference (cyclomatic 39) ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:747— TypeInference.MakeLowerBoundInference has cyclomatic complexity 39 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
AsyncAwaitDecompiler.DetectAwaitPattern (cyclomatic 39) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:1882— AsyncAwaitDecompiler.DetectAwaitPattern has cyclomatic complexity 39 (threshold 15). Of this number, 37 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TransformAssignment.HandleCompoundAssign (cyclomatic 39) ICSharpCode.Decompiler/IL/Transforms/TransformAssignment.cs:344— TransformAssignment.HandleCompoundAssign 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.
CSharpResolver.ResolveUnaryOperator (cyclomatic 38) ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:325— CSharpResolver.ResolveUnaryOperator 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.
AccessPathElement.GetAccessPath (cyclomatic 38) ICSharpCode.Decompiler/IL/Transforms/TransformCollectionAndObjectInitializers.cs:374— AccessPathElement.GetAccessPath has cyclomatic complexity 38 (threshold 15). Of this number, 36 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ApplyAttributeTypeVisitor.ApplyAttributesToType (cyclomatic 38) ICSharpCode.Decompiler/TypeSystem/ApplyAttributeTypeVisitor.cs:37— ApplyAttributeTypeVisitor.ApplyAttributesToType has cyclomatic complexity 38 (threshold 15). Of this number, 36 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ExpressionBuilder.VisitConv (cyclomatic 37) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:2318— ExpressionBuilder.VisitConv 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.
AsyncAwaitDecompiler.CheckResumeBlock (cyclomatic 37) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:2086— AsyncAwaitDecompiler.CheckResumeBlock 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.
AwaitInCatchTransform.MatchAwaitCatchHandler (cyclomatic 37) ICSharpCode.Decompiler/IL/ControlFlow/AwaitInCatchTransform.cs:257— AwaitInCatchTransform.MatchAwaitCatchHandler 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.
StateRangeAnalysis.AssignStateRanges (cyclomatic 37) ICSharpCode.Decompiler/IL/ControlFlow/StateRangeAnalysis.cs:115— StateRangeAnalysis.AssignStateRanges 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.
InstructionOutputExtensions.WriteTo (cyclomatic 37) ICSharpCode.Decompiler/IL/InstructionOutputExtensions.cs:72— InstructionOutputExtensions.WriteTo 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.
TransformAssignment.TransformInlineAssignmentStObjOrCall (cyclomatic 37) ICSharpCode.Decompiler/IL/Transforms/TransformAssignment.cs:103— TransformAssignment.TransformInlineAssignmentStObjOrCall 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.
RunningSearch.ParseInput (cyclomatic 37) ILSpy/Search/RunningSearch.cs:321— RunningSearch.ParseInput 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.
AwaitInFinallyTransform.Run (cyclomatic 36) ICSharpCode.Decompiler/IL/ControlFlow/AwaitInFinallyTransform.cs:30— AwaitInFinallyTransform.Run has cyclomatic complexity 36 (threshold 15). Of this number, 27 points are the body's own statements and 9 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RuntimeAsyncManualAwaitTransform.DetectRuntimeAsyncManualAwait (cyclomatic 36) ICSharpCode.Decompiler/IL/ControlFlow/RuntimeAsyncManualAwaitTransform.cs:64— RuntimeAsyncManualAwaitTransform.DetectRuntimeAsyncManualAwait has cyclomatic complexity 36 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ExtensionInfo.ExtensionInfo.ctor (cyclomatic 36) ICSharpCode.Decompiler/TypeSystem/ExtensionInfo.cs:38— ExtensionInfo.ExtensionInfo.ctor has cyclomatic complexity 36 (threshold 15). Of this number, 34 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AsyncAwaitDecompiler.AnalyzeAwaitBlock (cyclomatic 35) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:1700— AsyncAwaitDecompiler.AnalyzeAwaitBlock has cyclomatic complexity 35 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TransformAssignment.CheckImplicitTruncation (cyclomatic 35) ICSharpCode.Decompiler/IL/Transforms/TransformAssignment.cs:584— TransformAssignment.CheckImplicitTruncation 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.
ExpressionBuilder.TranslateFunction (cyclomatic 34) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:2584— ExpressionBuilder.TranslateFunction has cyclomatic complexity 34 (threshold 15). Of this number, 32 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ExpressionBuilder.VisitDynamicBinaryOperatorInstruction (cyclomatic 35) 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.
OverloadResolution.CheckApplicability (cyclomatic 34) ICSharpCode.Decompiler/CSharp/Resolver/OverloadResolution.cs:646— OverloadResolution.CheckApplicability 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.
RemoveCompilerGeneratedAssemblyAttributes.Run (cyclomatic 34) ICSharpCode.Decompiler/CSharp/Transforms/EscapeInvalidIdentifiers.cs:97— RemoveCompilerGeneratedAssemblyAttributes.Run 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.
RuntimeAsyncExceptionRewriteTransform.TryRewriteMultiHandlerTryCatch (cyclomatic 34) ICSharpCode.Decompiler/IL/ControlFlow/RuntimeAsyncExceptionRewriteTransform.cs:722— RuntimeAsyncExceptionRewriteTransform.TryRewriteMultiHandlerTryCatch 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.
AttributeListBuilder.IgnoreAttribute (cyclomatic 34) ICSharpCode.Decompiler/TypeSystem/Implementation/AttributeListBuilder.cs:211— AttributeListBuilder.IgnoreAttribute has cyclomatic complexity 34 (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.
ExpressionBuilder.TranslateCeq (cyclomatic 33) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:977— ExpressionBuilder.TranslateCeq 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. This is NOT this file's highest cyclomatic complexity: ExpressionBuilder.VisitDynamicBinaryOperatorInstruction (cyclomatic 35) 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.
CSharpResolver.LookupSimpleNameOrTypeName (cyclomatic 33) ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:1423— CSharpResolver.LookupSimpleNameOrTypeName 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.
DeclareVariables.InsertVariableDeclarations (cyclomatic 33) ICSharpCode.Decompiler/CSharp/Transforms/DeclareVariables.cs:613— DeclareVariables.InsertVariableDeclarations has cyclomatic complexity 33 (threshold 15). Of this number, 29 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
YieldReturnDecompiler.MatchEnumeratorCreationPattern (cyclomatic 33) ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs:263— YieldReturnDecompiler.MatchEnumeratorCreationPattern has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RemoveUnconstrainedGenericReferenceTypeCheck.Run (cyclomatic 33) ICSharpCode.Decompiler/IL/Transforms/RemoveUnconstrainedGenericReferenceTypeCheck.cs:56— RemoveUnconstrainedGenericReferenceTypeCheck.Run has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DecompilerTypeSystem.InitializeCoreAsync (cyclomatic 33) ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs:471— DecompilerTypeSystem.InitializeCoreAsync has cyclomatic complexity 33 (threshold 15). Of this number, 32 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ConnectionIdRewritePass.DecompileConnections (cyclomatic 32) ICSharpCode.BamlDecompiler/Rewrite/ConnectionIdRewritePass.cs:125— ConnectionIdRewritePass.DecompileConnections has cyclomatic complexity 32 (threshold 15). Of this number, 31 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ConnectionIdRewritePass.MatchEventSetterCreation (cyclomatic 32) ICSharpCode.BamlDecompiler/Rewrite/ConnectionIdRewritePass.cs:300— ConnectionIdRewritePass.MatchEventSetterCreation has cyclomatic complexity 32 (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.
TextWriterTokenWriter.WritePrimitiveValue (cyclomatic 32) ICSharpCode.Decompiler/CSharp/OutputVisitor/TextWriterTokenWriter.cs:238— TextWriterTokenWriter.WritePrimitiveValue has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CSharpConversions.ExplicitReferenceConversion (cyclomatic 32) ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:659— CSharpConversions.ExplicitReferenceConversion has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ExpressionBuilder.TranslatePattern (cyclomatic 31) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:5346— ExpressionBuilder.TranslatePattern 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. This is NOT this file's highest cyclomatic complexity: ExpressionBuilder.VisitDynamicBinaryOperatorInstruction (cyclomatic 35) 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.
RecordDecompiler.IsGeneratedToString (cyclomatic 31) ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:1017— RecordDecompiler.IsGeneratedToString has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CSharpConversions.BetterConversion (cyclomatic 31) ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:1564— CSharpConversions.BetterConversion 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.
AwaitInCatchTransform.Run (cyclomatic 31) ICSharpCode.Decompiler/IL/ControlFlow/AwaitInCatchTransform.cs:52— AwaitInCatchTransform.Run 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.
NullableLiftingTransform.DoLift (cyclomatic 31) ICSharpCode.Decompiler/IL/Transforms/NullableLiftingTransform.cs:871— NullableLiftingTransform.DoLift 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.
ReduceNestingTransform.ComputeStats (cyclomatic 31) ICSharpCode.Decompiler/IL/Transforms/ReduceNestingTransform.cs:486— ReduceNestingTransform.ComputeStats has cyclomatic complexity 31 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
TransformExpressionTrees.ConvertComparison (cyclomatic 31) ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1104— TransformExpressionTrees.ConvertComparison has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 7 of the 31 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 1131, 1116, 1149, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
CallBuilder.TryGetStringInterpolationTokens (cyclomatic 30) ICSharpCode.Decompiler/CSharp/CallBuilder.cs:863— CallBuilder.TryGetStringInterpolationTokens 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.
CallBuilder.BuildArgumentList (cyclomatic 30) ICSharpCode.Decompiler/CSharp/CallBuilder.cs:1034— CallBuilder.BuildArgumentList 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.
CSharpDecompiler.DoDecompile (cyclomatic 30) ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:2229— CSharpDecompiler.DoDecompile has cyclomatic complexity 30 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
RequiredNamespaceCollector.CollectNamespacesFromMethodBody (cyclomatic 30) ICSharpCode.Decompiler/CSharp/RequiredNamespaceCollector.cs:280— RequiredNamespaceCollector.CollectNamespacesFromMethodBody has cyclomatic complexity 30 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
TypeSystemAstBuilder.ConvertConstantValue (cyclomatic 30) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:1082— TypeSystemAstBuilder.ConvertConstantValue 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.
TypeSystemAstBuilder.ConvertFloatingPointLiteral (cyclomatic 30) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:1610— TypeSystemAstBuilder.ConvertFloatingPointLiteral has cyclomatic complexity 30 (threshold 15). Of this number, 28 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TransformAssignment.TransformPostIncDecOperator (cyclomatic 30) ICSharpCode.Decompiler/IL/Transforms/TransformAssignment.cs:1036— TransformAssignment.TransformPostIncDecOperator 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.
TransformExpressionTrees.ConvertBinaryNumericOperator (cyclomatic 30) ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:631— TransformExpressionTrees.ConvertBinaryNumericOperator has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 10 of the 30 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 647, 716, 700, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
MetadataMethod.GetAttributes (cyclomatic 30) ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataMethod.cs:347— MetadataMethod.GetAttributes 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.
TypeInference.MakeExactInference (cyclomatic 29) ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:646— TypeInference.MakeExactInference has cyclomatic complexity 29 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
TypeSystemAstBuilder.GetMemberModifiers (cyclomatic 29) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2670— TypeSystemAstBuilder.GetMemberModifiers has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PatternMatchingTransform.MatchNullableHasValueCheckPattern (cyclomatic 29) ICSharpCode.Decompiler/IL/Transforms/PatternMatchingTransform.cs:364— PatternMatchingTransform.MatchNullableHasValueCheckPattern has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TypeSystemExtensions.IsUnmanagedType (cyclomatic 29) ICSharpCode.Decompiler/TypeSystem/TypeSystemExtensions.cs:275— TypeSystemExtensions.IsUnmanagedType 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.
AutoEventDecompiler.TryAnalyzeVisualBasicWithEventsProperty (cyclomatic 28) ICSharpCode.Decompiler/CSharp/AutoEventDecompiler.cs:70— AutoEventDecompiler.TryAnalyzeVisualBasicWithEventsProperty has cyclomatic complexity 28 (threshold 15). Of this number, 27 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ExpressionBuilder.ConvertField (cyclomatic 28) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:329— ExpressionBuilder.ConvertField has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: ExpressionBuilder.VisitDynamicBinaryOperatorInstruction (cyclomatic 35) 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.
ExpressionBuilder.TranslateTarget (cyclomatic 28) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:2914— ExpressionBuilder.TranslateTarget 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. This is NOT this file's highest cyclomatic complexity: ExpressionBuilder.VisitDynamicBinaryOperatorInstruction (cyclomatic 35) 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.
RecordDecompiler.IsGeneratedCopyConstructor (cyclomatic 28) ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:723— RecordDecompiler.IsGeneratedCopyConstructor has cyclomatic complexity 28 (threshold 15). Of this number, 27 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TypeSystemAstBuilder.TryExtractExpression (cyclomatic 28) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:1721— TypeSystemAstBuilder.TryExtractExpression 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.
PatternStatementTransform.TransformForeachOnMultiDimArray (cyclomatic 28) ICSharpCode.Decompiler/CSharp/Transforms/PatternStatementTransform.cs:624— PatternStatementTransform.TransformForeachOnMultiDimArray has cyclomatic complexity 28 (threshold 15). Of this number, 25 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ConstructorInitializerAnalyzer.RemoveImplicitConstructor (cyclomatic 28) ICSharpCode.Decompiler/CSharp/Transforms/TransformFieldAndConstructorInitializers.cs:700— ConstructorInitializerAnalyzer.RemoveImplicitConstructor 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.
AsyncAwaitDecompiler.ValidateCatchBlock (cyclomatic 28) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:1083— AsyncAwaitDecompiler.ValidateCatchBlock has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
NumericCompoundAssign.IsBinaryCompatibleWithType (cyclomatic 28) ICSharpCode.Decompiler/IL/Instructions/CompoundAssignmentInstruction.cs:177— NumericCompoundAssign.IsBinaryCompatibleWithType 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.
Analyzer.CalculateLocalScopes (cyclomatic 28) ICSharpCode.Decompiler/IL/Transforms/IntroduceScopedModifierOnLocals.cs:181— Analyzer.CalculateLocalScopes 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.
PatternMatchingTransform.PatternMatchRefTypes (cyclomatic 28) ICSharpCode.Decompiler/IL/Transforms/PatternMatchingTransform.cs:88— PatternMatchingTransform.PatternMatchRefTypes has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TransformArrayInitializers.HandleSequentialLocAllocInitializer (cyclomatic 28) ICSharpCode.Decompiler/IL/Transforms/TransformArrayInitializers.cs:457— TransformArrayInitializers.HandleSequentialLocAllocInitializer 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.
TransformAssignment.TransformPreIncDecOperatorWithInlineStore (cyclomatic 28) ICSharpCode.Decompiler/IL/Transforms/TransformAssignment.cs:861— TransformAssignment.TransformPreIncDecOperatorWithInlineStore 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.
TypeUtils.GetStackType (cyclomatic 28) ICSharpCode.Decompiler/TypeSystem/TypeUtils.cs:263— TypeUtils.GetStackType has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
MetadataTokenSearchStrategy.Search (cyclomatic 28) ICSharpCode.ILSpyX/Search/MetadataTokenSearchStrategy.cs:46— MetadataTokenSearchStrategy.Search 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.
SharpTreeView.OnKeyDown (cyclomatic 28) ILSpy/Controls/TreeView/SharpTreeView.cs:462— SharpTreeView.OnKeyDown 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.
StatementBuilder.TransformToForeach (cyclomatic 27) ICSharpCode.Decompiler/CSharp/StatementBuilder.cs:763— StatementBuilder.TransformToForeach 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.
AwaitInCatchTransform.MatchExceptionCaptureBlock (cyclomatic 27) ICSharpCode.Decompiler/IL/ControlFlow/AwaitInCatchTransform.cs:421— AwaitInCatchTransform.MatchExceptionCaptureBlock has cyclomatic complexity 27 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
DetectPinnedRegions.IsCustomRefPinPattern (cyclomatic 27) ICSharpCode.Decompiler/IL/ControlFlow/DetectPinnedRegions.cs:247— DetectPinnedRegions.IsCustomRefPinPattern 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.
DetectPinnedRegions.CreatePinnedRegion (cyclomatic 27) ICSharpCode.Decompiler/IL/ControlFlow/DetectPinnedRegions.cs:549— DetectPinnedRegions.CreatePinnedRegion 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.
SwitchOnStringTransform.SimplifyCSharp1CascadingIfStatements (cyclomatic 27) ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:401— SwitchOnStringTransform.SimplifyCSharp1CascadingIfStatements 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.
TransformCollectionAndObjectInitializers.IsPartOfInitializer (cyclomatic 27) ICSharpCode.Decompiler/IL/Transforms/TransformCollectionAndObjectInitializers.cs:259— TransformCollectionAndObjectInitializers.IsPartOfInitializer has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TransformDisplayClassUsage.ValidateConstructor (cyclomatic 27) ICSharpCode.Decompiler/IL/Transforms/TransformDisplayClassUsage.cs:465— TransformDisplayClassUsage.ValidateConstructor has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ReflectionHelper.ResolveTypeName (cyclomatic 27) ICSharpCode.Decompiler/TypeSystem/ReflectionHelper.cs:177— ReflectionHelper.ResolveTypeName 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.
BamlDecompilerTypeSystem.BamlDecompilerTypeSystem.ctor (cyclomatic 26) ICSharpCode.BamlDecompiler/BamlDecompilerTypeSystem.cs:74— BamlDecompilerTypeSystem.BamlDecompilerTypeSystem.ctor has cyclomatic complexity 26 (threshold 15). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RecordDecompiler.DetectAutomaticProperties (cyclomatic 26) ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:68— RecordDecompiler.DetectAutomaticProperties 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.
TypeSystemAstBuilder.ConvertTypeHelper (cyclomatic 26) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:485— TypeSystemAstBuilder.ConvertTypeHelper 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.
DeclareVariables.FindInsertionPoints (cyclomatic 26) ICSharpCode.Decompiler/CSharp/Transforms/DeclareVariables.cs:294— DeclareVariables.FindInsertionPoints 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.
DetectPinnedRegions.HandleStringToPointer (cyclomatic 26) ICSharpCode.Decompiler/IL/ControlFlow/DetectPinnedRegions.cs:880— DetectPinnedRegions.HandleStringToPointer 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.
ILVariable.WriteDefinitionTo (cyclomatic 26) ICSharpCode.Decompiler/IL/ILVariable.cs:488— ILVariable.WriteDefinitionTo 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.
VariableScope.GenerateNameForVariable (cyclomatic 26) ICSharpCode.Decompiler/IL/Transforms/AssignVariableNames.cs:391— VariableScope.GenerateNameForVariable has cyclomatic complexity 26 (threshold 15). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DeconstructionTransform.MatchAssignments (cyclomatic 26) ICSharpCode.Decompiler/IL/Transforms/DeconstructionTransform.cs:868— DeconstructionTransform.MatchAssignments has cyclomatic complexity 26 (threshold 15). Of this number, 23 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ExpressionTransforms.HandleSwitchExpression (cyclomatic 26) ICSharpCode.Decompiler/IL/Transforms/ExpressionTransforms.cs:631— ExpressionTransforms.HandleSwitchExpression 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.
CSharpConversions.GetApplicableConversionOperators (cyclomatic 25) ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:1169— CSharpConversions.GetApplicableConversionOperators has cyclomatic complexity 25 (threshold 15). Of this number, 18 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TypeInference.MakeUpperBoundInference (cyclomatic 25) ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:878— TypeInference.MakeUpperBoundInference 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.
ReflectionDisassembler.DisassembleMethodHeaderInternal (cyclomatic 25) ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:172— ReflectionDisassembler.DisassembleMethodHeaderInternal 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.
SymbolicEvaluationContext.Eval (cyclomatic 25) ICSharpCode.Decompiler/IL/ControlFlow/SymbolicExecution.cs:121— SymbolicEvaluationContext.Eval 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.
ILReader.DecodeCall (cyclomatic 25) ICSharpCode.Decompiler/IL/ILReader.cs:1758— ILReader.DecodeCall has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ILReader.DecodeInstruction (cyclomatic 221) 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.
ILReader.Comparison (cyclomatic 25) ICSharpCode.Decompiler/IL/ILReader.cs:1921— ILReader.Comparison has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ILReader.DecodeInstruction (cyclomatic 221) 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.
DynamicCallSiteTransform.TransformCallSites (cyclomatic 25) ICSharpCode.Decompiler/IL/Transforms/DynamicCallSiteTransform.cs:73— DynamicCallSiteTransform.TransformCallSites 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.
UserDefinedLogicTransform.TransformDynamic (cyclomatic 25) ICSharpCode.Decompiler/IL/Transforms/UserDefinedLogicTransform.cs:169— UserDefinedLogicTransform.TransformDynamic has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CSharpDecompiler.SetNewModifier (cyclomatic 24) ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:1709— CSharpDecompiler.SetNewModifier has cyclomatic complexity 24 (threshold 15). Of this number, 14 points are the body's own statements and 10 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ExpressionBuilder.HandleManagedPointerArithmetic (cyclomatic 24) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:1441— ExpressionBuilder.HandleManagedPointerArithmetic has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ExpressionBuilder.VisitDynamicBinaryOperatorInstruction (cyclomatic 35) 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.
ExpressionBuilder.HandleCompoundAssignment (cyclomatic 24) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:2167— ExpressionBuilder.HandleCompoundAssignment has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ExpressionBuilder.VisitDynamicBinaryOperatorInstruction (cyclomatic 35) 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.
ExpressionBuilder.TranslateArrayInitializer (cyclomatic 24) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:3886— ExpressionBuilder.TranslateArrayInitializer has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ExpressionBuilder.VisitDynamicBinaryOperatorInstruction (cyclomatic 35) 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.
ExpressionBuilder.TranslateStackAllocInitializer (cyclomatic 24) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:3981— ExpressionBuilder.TranslateStackAllocInitializer has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ExpressionBuilder.VisitDynamicBinaryOperatorInstruction (cyclomatic 35) 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.
InsertParenthesesVisitor.VisitCastExpression (cyclomatic 24) ICSharpCode.Decompiler/CSharp/OutputVisitor/InsertParenthesesVisitor.cs:253— InsertParenthesesVisitor.VisitCastExpression 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.
RecordDecompiler.IsGeneratedGetHashCode (cyclomatic 24) ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:1274— RecordDecompiler.IsGeneratedGetHashCode has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RequiredNamespaceCollector.CollectNamespaces (cyclomatic 24) ICSharpCode.Decompiler/CSharp/RequiredNamespaceCollector.cs:79— RequiredNamespaceCollector.CollectNamespaces has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
TypeInference.FindTypesInBounds (cyclomatic 24) ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:1259— TypeInference.FindTypesInBounds 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.
PrettifyAssignments.VisitAssignmentExpression (cyclomatic 24) ICSharpCode.Decompiler/CSharp/Transforms/PrettifyAssignments.cs:48— PrettifyAssignments.VisitAssignmentExpression 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.
XmlDocumentationElement.CreateElements (cyclomatic 24) ICSharpCode.Decompiler/Documentation/XmlDocumentationElement.cs:167— XmlDocumentationElement.CreateElements has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RuntimeAsyncExceptionRewriteTransform.TryRewriteTryCatch (cyclomatic 24) ICSharpCode.Decompiler/IL/ControlFlow/RuntimeAsyncExceptionRewriteTransform.cs:592— RuntimeAsyncExceptionRewriteTransform.TryRewriteTryCatch has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Analyzer.Run (cyclomatic 24) ICSharpCode.Decompiler/IL/Transforms/IntroduceScopedModifierOnLocals.cs:87— Analyzer.Run 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.
NullableLiftingTransform.LiftCSharpUserEqualityComparison (cyclomatic 24) ICSharpCode.Decompiler/IL/Transforms/NullableLiftingTransform.cs:640— NullableLiftingTransform.LiftCSharpUserEqualityComparison has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SwitchOnStringTransform.Run (cyclomatic 24) ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:39— SwitchOnStringTransform.Run 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.
TransformAssignment.IsMatchingCompoundLoad (cyclomatic 24) ICSharpCode.Decompiler/IL/Transforms/TransformAssignment.cs:779— TransformAssignment.IsMatchingCompoundLoad 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.
TransformAssignment.TransformPostIncDecOperatorWithInlineStore (cyclomatic 24) ICSharpCode.Decompiler/IL/Transforms/TransformAssignment.cs:955— TransformAssignment.TransformPostIncDecOperatorWithInlineStore 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.
CSharpBracketSearcher.GetStartType (cyclomatic 24) ILSpy/Languages/CSharpBracketSearcher.cs:81— CSharpBracketSearcher.GetStartType 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.
CSharpLanguage.DecompileAssembly (cyclomatic 24) ILSpy/Languages/CSharpLanguage.cs:444— CSharpLanguage.DecompileAssembly 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.
PropertyCustomHandler.Deserialize (cyclomatic 23) ICSharpCode.BamlDecompiler/Handlers/Records/PropertyCustomHandler.cs:48— PropertyCustomHandler.Deserialize has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
RecordDecompiler.IsGeneratedDeconstruct (cyclomatic 23) ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:1364— RecordDecompiler.IsGeneratedDeconstruct 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.
MemberLookup.AddMembers (cyclomatic 23) ICSharpCode.Decompiler/CSharp/Resolver/MemberLookup.cs:543— MemberLookup.AddMembers 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.
StatementBuilder.TranslateSwitch (cyclomatic 23) ICSharpCode.Decompiler/CSharp/StatementBuilder.cs:219— StatementBuilder.TranslateSwitch 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.
StatementBuilder.ConvertLoop (cyclomatic 23) ICSharpCode.Decompiler/CSharp/StatementBuilder.cs:1359— StatementBuilder.ConvertLoop 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.
PatternStatementTransform.TransformForeachOnInlineArray (cyclomatic 23) ICSharpCode.Decompiler/CSharp/Transforms/PatternStatementTransform.cs:456— PatternStatementTransform.TransformForeachOnInlineArray has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RuntimeAsyncExceptionRewriteTransform.NormalizeRuntimeAsyncFilter (cyclomatic 23) ICSharpCode.Decompiler/IL/ControlFlow/RuntimeAsyncExceptionRewriteTransform.cs:141— RuntimeAsyncExceptionRewriteTransform.NormalizeRuntimeAsyncFilter has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PatternMatchingTransform.DetectPropertySubPattern (cyclomatic 23) ICSharpCode.Decompiler/IL/Transforms/PatternMatchingTransform.cs:220— PatternMatchingTransform.DetectPropertySubPattern 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.
TextTokenWriter.WritePrimitiveType (cyclomatic 23) ICSharpCode.Decompiler/Output/TextTokenWriter.cs:471— TextTokenWriter.WritePrimitiveType has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
MetadataMethod.MetadataMethod.ctor (cyclomatic 23) ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataMethod.cs:56— MetadataMethod.MetadataMethod.ctor 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.
AutoEventDecompiler.MatchSimpleCombineAssignment (cyclomatic 22) ICSharpCode.Decompiler/CSharp/AutoEventDecompiler.cs:353— AutoEventDecompiler.MatchSimpleCombineAssignment 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.
CallBuilder.TransformParamsArgument (cyclomatic 22) ICSharpCode.Decompiler/CSharp/CallBuilder.cs:1180— CallBuilder.TransformParamsArgument 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.
CallBuilder.TryUseExtensionMethodSyntax (cyclomatic 22) ICSharpCode.Decompiler/CSharp/CallBuilder.cs:1294— CallBuilder.TryUseExtensionMethodSyntax has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ExpressionBuilder.VisitIfInstruction (cyclomatic 22) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:4191— ExpressionBuilder.VisitIfInstruction 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: ExpressionBuilder.VisitDynamicBinaryOperatorInstruction (cyclomatic 35) 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.
CSharpAmbience.WriteMemberDeclarationName (cyclomatic 22) ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpAmbience.cs:323— CSharpAmbience.WriteMemberDeclarationName 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.
CSharpOutputVisitor.PrintInitializerElements (cyclomatic 22) ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpOutputVisitor.cs:686— CSharpOutputVisitor.PrintInitializerElements has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table. This is NOT this file's highest cyclomatic complexity: CSharpOutputVisitor.VisitBinaryOperatorExpression (cyclomatic 24) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
ConstructorInitializerAnalyzer.MoveFieldInitializersToDeclarations (cyclomatic 22) ICSharpCode.Decompiler/CSharp/Transforms/TransformFieldAndConstructorInitializers.cs:572— ConstructorInitializerAnalyzer.MoveFieldInitializersToDeclarations 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.
DecompilerException.GetStackTrace (cyclomatic 22) ICSharpCode.Decompiler/DecompilerException.cs:112— DecompilerException.GetStackTrace 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.
ReflectionDisassembler.WriteSecurityDeclarations (cyclomatic 22) ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:390— ReflectionDisassembler.WriteSecurityDeclarations 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.
AsyncAwaitDecompiler.AnalyzeMoveNext (cyclomatic 22) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:798— AsyncAwaitDecompiler.AnalyzeMoveNext has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ConditionDetection.CompareBlockExitPriority (cyclomatic 22) ICSharpCode.Decompiler/IL/ControlFlow/ConditionDetection.cs:515— ConditionDetection.CompareBlockExitPriority 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.
PointerArithmeticOffset.Detect (cyclomatic 22) ICSharpCode.Decompiler/IL/PointerArithmeticOffset.cs:38— PointerArithmeticOffset.Detect 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.
AssignVariableNames.GetNameByType (cyclomatic 22) ICSharpCode.Decompiler/IL/Transforms/AssignVariableNames.cs:825— AssignVariableNames.GetNameByType 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.
DeconstructionTransform.MatchNestedDeconstructions (cyclomatic 22) ICSharpCode.Decompiler/IL/Transforms/DeconstructionTransform.cs:576— DeconstructionTransform.MatchNestedDeconstructions has cyclomatic complexity 22 (threshold 15). Of this number, 14 points are the body's own statements and 8 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ExpressionTransforms.VisitComp (cyclomatic 22) ICSharpCode.Decompiler/IL/Transforms/ExpressionTransforms.cs:90— ExpressionTransforms.VisitComp has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ExtractionContext.Extract (cyclomatic 22) ICSharpCode.Decompiler/IL/Transforms/ILExtraction.cs:102— ExtractionContext.Extract 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.
Analyzer.GetInvocationEscapeToWritableArgument (cyclomatic 22) ICSharpCode.Decompiler/IL/Transforms/IntroduceScopedModifierOnLocals.cs:563— Analyzer.GetInvocationEscapeToWritableArgument 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.
ProxyCallReplacer.Run (cyclomatic 22) ICSharpCode.Decompiler/IL/Transforms/ProxyCallReplacer.cs:38— ProxyCallReplacer.Run has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TransformExpressionTrees.ConvertCall (cyclomatic 22) ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:817— TransformExpressionTrees.ConvertCall has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Lexer.ReadEscapeSequence (cyclomatic 22) ICSharpCode.ILSpyX/Search/CSharpLexer.cs:962— Lexer.ReadEscapeSequence 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.
CSharpLanguage.GetEntityName (cyclomatic 22) ILSpy/Languages/CSharpLanguage.cs:127— CSharpLanguage.GetEntityName 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.
CallBuilder.HandleRangeConstruction (cyclomatic 21) ICSharpCode.Decompiler/CSharp/CallBuilder.cs:1898— CallBuilder.HandleRangeConstruction has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RecordDecompiler.IsGeneratedEqualityContract (cyclomatic 21) ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:789— RecordDecompiler.IsGeneratedEqualityContract has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CSharpConversions.ImplicitConversion (cyclomatic 21) ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:68— CSharpConversions.ImplicitConversion 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.
CSharpResolver.ResolveInvocation (cyclomatic 21) ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:2202— CSharpResolver.ResolveInvocation 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.
OverloadResolution.BetterParamsCollectionType (cyclomatic 21) ICSharpCode.Decompiler/CSharp/Resolver/OverloadResolution.cs:848— OverloadResolution.BetterParamsCollectionType 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.
ConstructorInitializerAnalyzer.TryEvaluateDecimalConstant (cyclomatic 21) ICSharpCode.Decompiler/CSharp/Transforms/TransformFieldAndConstructorInitializers.cs:849— ConstructorInitializerAnalyzer.TryEvaluateDecimalConstant has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
AsyncAwaitDecompiler.MatchAsyncEnumeratorCreationPattern (cyclomatic 21) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:609— AsyncAwaitDecompiler.MatchAsyncEnumeratorCreationPattern 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.
SwitchAnalysis.AnalyzeBlock (cyclomatic 21) ICSharpCode.Decompiler/IL/ControlFlow/SwitchAnalysis.cs:117— SwitchAnalysis.AnalyzeBlock 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.
DetectCatchWhenConditionBlocks.MatchCatchWhenEntryPoint (cyclomatic 21) ICSharpCode.Decompiler/IL/Transforms/DetectCatchWhenConditionBlocks.cs:220— DetectCatchWhenConditionBlocks.MatchCatchWhenEntryPoint 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.
LocalFunctionDecompiler.PropagateClosureParameterArguments (cyclomatic 21) ICSharpCode.Decompiler/IL/Transforms/LocalFunctionDecompiler.cs:238— LocalFunctionDecompiler.PropagateClosureParameterArguments has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NullableLiftingTransform.LiftCSharpEqualityComparison (cyclomatic 21) ICSharpCode.Decompiler/IL/Transforms/NullableLiftingTransform.cs:533— NullableLiftingTransform.LiftCSharpEqualityComparison 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.
SwitchOnStringTransform.MatchStringEqualityComparison (cyclomatic 21) ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:1754— SwitchOnStringTransform.MatchStringEqualityComparison 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.
TransformDisplayClassUsage.ValidateDisplayClassUses (cyclomatic 21) ICSharpCode.Decompiler/IL/Transforms/TransformDisplayClassUsage.cs:205— TransformDisplayClassUsage.ValidateDisplayClassUses 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.
TransformDisplayClassUsage.VisitStLoc (cyclomatic 21) ICSharpCode.Decompiler/IL/Transforms/TransformDisplayClassUsage.cs:843— TransformDisplayClassUsage.VisitStLoc 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.
AttributeListBuilder.ConvertMarshalInfo (cyclomatic 21) ICSharpCode.Decompiler/TypeSystem/Implementation/AttributeListBuilder.cs:105— AttributeListBuilder.ConvertMarshalInfo 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.
InheritanceHelper.GetDerivedMember (cyclomatic 21) ICSharpCode.Decompiler/TypeSystem/InheritanceHelper.cs:114— InheritanceHelper.GetDerivedMember 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.
CSharpDecompiler.Decompile (cyclomatic 20) ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:1446— CSharpDecompiler.Decompile 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.
CSharpConversions.UserDefinedExplicitConversion (cyclomatic 20) ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:1068— CSharpConversions.UserDefinedExplicitConversion has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CSharpResolver.LookInCurrentUsingScope (cyclomatic 20) ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:1614— CSharpResolver.LookInCurrentUsingScope 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.
MemberLookup.CreateResult (cyclomatic 20) ICSharpCode.Decompiler/CSharp/Resolver/MemberLookup.cs:700— MemberLookup.CreateResult has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ReflectionDisassembler.DisassembleType (cyclomatic 20) ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:1598— ReflectionDisassembler.DisassembleType 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.
RuntimeAsyncExceptionRewriteTransform.ResolveEarlyReturnValue (cyclomatic 20) ICSharpCode.Decompiler/IL/ControlFlow/RuntimeAsyncExceptionRewriteTransform.cs:1317— RuntimeAsyncExceptionRewriteTransform.ResolveEarlyReturnValue 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.
YieldReturnDecompiler.Run (cyclomatic 20) ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs:121— YieldReturnDecompiler.Run 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.
ILReader.Cast (cyclomatic 20) ICSharpCode.Decompiler/IL/ILReader.cs:1425— ILReader.Cast 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: ILReader.DecodeInstruction (cyclomatic 221) 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.
IntroduceNativeIntTypeOnLocals.Run (cyclomatic 20) ICSharpCode.Decompiler/IL/Transforms/IntroduceNativeIntTypeOnLocals.cs:31— IntroduceNativeIntTypeOnLocals.Run 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.
LocalFunctionDecompiler.DetermineCaptureAndDeclarationScope (cyclomatic 20) ICSharpCode.Decompiler/IL/Transforms/LocalFunctionDecompiler.cs:710— LocalFunctionDecompiler.DetermineCaptureAndDeclarationScope 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.
NullPropagationTransform.IsFallbackBlock (cyclomatic 20) ICSharpCode.Decompiler/IL/Transforms/NullPropagationTransform.cs:569— NullPropagationTransform.IsFallbackBlock 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.
ReduceNestingTransform.ReduceSwitchNesting (cyclomatic 20) ICSharpCode.Decompiler/IL/Transforms/ReduceNestingTransform.cs:297— ReduceNestingTransform.ReduceSwitchNesting 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.
SwitchOnNullableTransform.MatchSwitchOnNullable (cyclomatic 20) ICSharpCode.Decompiler/IL/Transforms/SwitchOnNullableTransform.cs:78— SwitchOnNullableTransform.MatchSwitchOnNullable 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.
SwitchOnNullableTransform.MatchRoslynSwitchOnNullable (cyclomatic 20) ICSharpCode.Decompiler/IL/Transforms/SwitchOnNullableTransform.cs:136— SwitchOnNullableTransform.MatchRoslynSwitchOnNullable 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.
TransformAssignment.MatchingGetterAndSetterCalls (cyclomatic 20) ICSharpCode.Decompiler/IL/Transforms/TransformAssignment.cs:276— TransformAssignment.MatchingGetterAndSetterCalls 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.
TextTokenWriter.WriteToken (cyclomatic 20) ICSharpCode.Decompiler/Output/TextTokenWriter.cs:330— TextTokenWriter.WriteToken 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.
CSharpHighlightingTokenWriter.WriteIdentifier (cyclomatic 20) ILSpy/Languages/CSharpHighlightingTokenWriter.cs:348— CSharpHighlightingTokenWriter.WriteIdentifier 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: CSharpHighlightingTokenWriter.WritePrimitiveType (cyclomatic 27) 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.
RecordDecompiler.DetectOrderFromPrintMembers (cyclomatic 19) ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:504— RecordDecompiler.DetectOrderFromPrintMembers has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, 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.
RecordDecompiler.MethodIsGenerated (cyclomatic 19) ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:603— RecordDecompiler.MethodIsGenerated has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
CSharpResolver.ResolveCast (cyclomatic 19) ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:1348— CSharpResolver.ResolveCast 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.
MemberLookup.GetAccessibleMembers (cyclomatic 19) ICSharpCode.Decompiler/CSharp/Resolver/MemberLookup.cs:165— MemberLookup.GetAccessibleMembers 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.
TypeInference.PhaseTwo (cyclomatic 19) ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:330— TypeInference.PhaseTwo has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
StatementBuilder.VisitLeave (cyclomatic 19) ICSharpCode.Decompiler/CSharp/StatementBuilder.cs:380— StatementBuilder.VisitLeave has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TypeSystemAstBuilder.ConvertAttributes::CompareAttribute (cyclomatic 19) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:836— TypeSystemAstBuilder.ConvertAttributes::CompareAttribute 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.
TypeSystemAstBuilder.ApplyShortAttributeNameIfPossible (cyclomatic 19) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:927— TypeSystemAstBuilder.ApplyShortAttributeNameIfPossible has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TypeSystemAstBuilder.ConvertAccessor (cyclomatic 19) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2342— TypeSystemAstBuilder.ConvertAccessor 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.
TypeSystemAstBuilder.ConvertTypeParameterConstraint (cyclomatic 19) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2744— TypeSystemAstBuilder.ConvertTypeParameterConstraint 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.
PatternStatementTransform.TransformAutomaticProperty (cyclomatic 19) ICSharpCode.Decompiler/CSharp/Transforms/PatternStatementTransform.cs:759— PatternStatementTransform.TransformAutomaticProperty 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.
InitializerSequence.Analyze (cyclomatic 19) ICSharpCode.Decompiler/CSharp/Transforms/TransformFieldAndConstructorInitializers.cs:118— InitializerSequence.Analyze 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.
IdStringProvider.FindMemberInType (cyclomatic 19) ICSharpCode.Decompiler/Documentation/IdStringProvider.cs:959— IdStringProvider.FindMemberInType has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table. This is NOT this file's highest cyclomatic complexity: IdStringSignatureTypeProvider.GetPrimitiveType (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.
AsyncAwaitDecompiler.TranslateThisCopyAccess (cyclomatic 19) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:226— AsyncAwaitDecompiler.TranslateThisCopyAccess has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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.
AsyncAwaitDecompiler.MatchDisposeCombinedTokens (cyclomatic 19) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:976— AsyncAwaitDecompiler.MatchDisposeCombinedTokens 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.
CachedDelegateInitialization.CachedDelegateInitializationVB (cyclomatic 19) ICSharpCode.Decompiler/IL/Transforms/CachedDelegateInitialization.cs:230— CachedDelegateInitialization.CachedDelegateInitializationVB 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.
CachedDelegateInitialization.CachedDelegateInitializationVBWithClosure (cyclomatic 19) ICSharpCode.Decompiler/IL/Transforms/CachedDelegateInitialization.cs:303— CachedDelegateInitialization.CachedDelegateInitializationVBWithClosure 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.
DeconstructionTransform.MatchNestedTupleDesignations (cyclomatic 19) ICSharpCode.Decompiler/IL/Transforms/DeconstructionTransform.cs:688— DeconstructionTransform.MatchNestedTupleDesignations has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ExpressionTransforms.VisitBinaryNumericInstruction (cyclomatic 19) ICSharpCode.Decompiler/IL/Transforms/ExpressionTransforms.cs:862— ExpressionTransforms.VisitBinaryNumericInstruction has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
ILInlining.FindLoadInNext (cyclomatic 19) ICSharpCode.Decompiler/IL/Transforms/ILInlining.cs:852— ILInlining.FindLoadInNext 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.
IndexRangeTransform.HandleLdElema (cyclomatic 19) ICSharpCode.Decompiler/IL/Transforms/IndexRangeTransform.cs:36— IndexRangeTransform.HandleLdElema 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.
TransformDisplayClassUsage.ResolveVariableToPropagate (cyclomatic 19) ICSharpCode.Decompiler/IL/Transforms/TransformDisplayClassUsage.cs:597— TransformDisplayClassUsage.ResolveVariableToPropagate 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.
TransformExpressionTrees.ConvertListInit (cyclomatic 19) ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1417— TransformExpressionTrees.ConvertListInit has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TransformExpressionTrees.ConvertLogicOperator (cyclomatic 19) ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1499— TransformExpressionTrees.ConvertLogicOperator has cyclomatic complexity 19 (threshold 15). Of this number, 10 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DecompilerTypeSystem.GetOptions (cyclomatic 19) ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs:179— DecompilerTypeSystem.GetOptions 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.
Lexer.Next (cyclomatic 19) ICSharpCode.ILSpyX/Search/CSharpLexer.cs:411— Lexer.Next 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.
SharpTreeNode.OnChildrenChanged (cyclomatic 19) ICSharpCode.ILSpyX/TreeView/SharpTreeNode.cs:202— SharpTreeNode.OnChildrenChanged 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.
XamlPathDeserializer.Deserialize (cyclomatic 18) ICSharpCode.BamlDecompiler/Xaml/XamlPathDeserializer.cs:89— XamlPathDeserializer.Deserialize has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
AutoEventDecompiler.MatchCompareExchangeLoopMcs (cyclomatic 18) ICSharpCode.Decompiler/CSharp/AutoEventDecompiler.cs:315— AutoEventDecompiler.MatchCompareExchangeLoopMcs has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CSharpDecompiler.DecompileBody (cyclomatic 18) ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:2369— CSharpDecompiler.DecompileBody 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.
CSharpConversions.ImplicitConstantExpressionConversion (cyclomatic 18) ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:804— CSharpConversions.ImplicitConstantExpressionConversion has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
SequencePointBuilder.GetSequencePoints (cyclomatic 18) ICSharpCode.Decompiler/CSharp/SequencePointBuilder.cs:568— SequencePointBuilder.GetSequencePoints 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.
TypeSystemAstBuilder.ConvertNamespace (cyclomatic 18) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:655— TypeSystemAstBuilder.ConvertNamespace 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.
TypeSystemAstBuilder.ConvertConstantValue (cyclomatic 18) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:999— TypeSystemAstBuilder.ConvertConstantValue 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.
TypeSystemAstBuilder.IsSpecialConstant (cyclomatic 18) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:1169— TypeSystemAstBuilder.IsSpecialConstant 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.
TypeSystemAstBuilder.ConvertMethod (cyclomatic 18) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2494— TypeSystemAstBuilder.ConvertMethod 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.
AsyncAwaitDecompiler.CheckSetResultReturnBlock (cyclomatic 18) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:905— AsyncAwaitDecompiler.CheckSetResultReturnBlock has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DetectPinnedRegions.IsNullSafeArrayToPointerPattern (cyclomatic 18) ICSharpCode.Decompiler/IL/ControlFlow/DetectPinnedRegions.cs:362— DetectPinnedRegions.IsNullSafeArrayToPointerPattern has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RuntimeAsyncExceptionRewriteTransform.Run (cyclomatic 18) ICSharpCode.Decompiler/IL/ControlFlow/RuntimeAsyncExceptionRewriteTransform.cs:47— RuntimeAsyncExceptionRewriteTransform.Run 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.
YieldReturnDecompiler.TranslateFieldsToLocalAccess (cyclomatic 18) ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs:1151— YieldReturnDecompiler.TranslateFieldsToLocalAccess 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.
YieldReturnDecompiler.CleanSkipFinallyBodies (cyclomatic 18) ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs:1409— YieldReturnDecompiler.CleanSkipFinallyBodies 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.
AssignVariableNames.GetNameFromInstruction (cyclomatic 18) ICSharpCode.Decompiler/IL/Transforms/AssignVariableNames.cs:730— AssignVariableNames.GetNameFromInstruction 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.
CachedDelegateInitialization.CachedDelegateInitializationWithLocal (cyclomatic 18) ICSharpCode.Decompiler/IL/Transforms/CachedDelegateInitialization.cs:124— CachedDelegateInitialization.CachedDelegateInitializationWithLocal has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
CachedDelegateInitialization.CachedDelegateInitializationRoslynInStaticWithLocal (cyclomatic 18) ICSharpCode.Decompiler/IL/Transforms/CachedDelegateInitialization.cs:165— CachedDelegateInitialization.CachedDelegateInitializationRoslynInStaticWithLocal has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (CachedDelegateInitialization.CachedDelegateInitializationRoslynWithLocal) 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.
CachedDelegateInitialization.CachedDelegateInitializationRoslynWithLocal (cyclomatic 18) ICSharpCode.Decompiler/IL/Transforms/CachedDelegateInitialization.cs:197— CachedDelegateInitialization.CachedDelegateInitializationRoslynWithLocal has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (CachedDelegateInitialization.CachedDelegateInitializationRoslynInStaticWithLocal) 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.
IndexMethods.IndexMethods.ctor (cyclomatic 18) ICSharpCode.Decompiler/IL/Transforms/IndexRangeTransform.cs:96— IndexMethods.IndexMethods.ctor has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
IntroduceDynamicTypeOnLocals.Run (cyclomatic 18) ICSharpCode.Decompiler/IL/Transforms/IntroduceDynamicTypeOnLocals.cs:31— IntroduceDynamicTypeOnLocals.Run 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.
NullableLiftingTransform.LiftNormal (cyclomatic 18) ICSharpCode.Decompiler/IL/Transforms/NullableLiftingTransform.cs:771— NullableLiftingTransform.LiftNormal 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.
SwitchOnStringTransform.ExtractStringValuesFromInitBlock (cyclomatic 18) ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:797— SwitchOnStringTransform.ExtractStringValuesFromInitBlock has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TransformArrayInitializers.HandleCpblkInitializer (cyclomatic 18) ICSharpCode.Decompiler/IL/Transforms/TransformArrayInitializers.cs:386— TransformArrayInitializers.HandleCpblkInitializer has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TransformAssignment.IsCompoundStore (cyclomatic 18) ICSharpCode.Decompiler/IL/Transforms/TransformAssignment.cs:691— TransformAssignment.IsCompoundStore 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.
UsingTransform.TransformUsing (cyclomatic 18) ICSharpCode.Decompiler/IL/Transforms/UsingTransform.cs:80— UsingTransform.TransformUsing has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TextTokenWriter.GetCurrentLocalDefinition (cyclomatic 18) ICSharpCode.Decompiler/Output/TextTokenWriter.cs:219— TextTokenWriter.GetCurrentLocalDefinition 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.
MetadataTypeDefinition.GetFilteredAccessors (cyclomatic 18) ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataTypeDefinition.cs:750— MetadataTypeDefinition.GetFilteredAccessors has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
CompareEngine.CreateEntityTree (cyclomatic 18) ILSpy/CompareEngine.cs:50— CompareEngine.CreateEntityTree 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.
SelectCtorTransform.Run (cyclomatic 18) ILSpy/Languages/CSharpLanguage.cs:655— SelectCtorTransform.Run 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.
DecompilerTextView.GetLineForBookmark (cyclomatic 18) ILSpy/TextView/DecompilerTextView.axaml.cs:1071— DecompilerTextView.GetLineForBookmark 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.
AssemblyTreeNode.LoadChildren (cyclomatic 18) ILSpy/TreeNodes/AssemblyTreeNode.cs:405— AssemblyTreeNode.LoadChildren has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AutoEventDecompiler.MatchCompareExchangeLoop (cyclomatic 17) ICSharpCode.Decompiler/CSharp/AutoEventDecompiler.cs:277— AutoEventDecompiler.MatchCompareExchangeLoop has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CallBuilder.HandleAccessorCall (cyclomatic 17) ICSharpCode.Decompiler/CSharp/CallBuilder.cs:1509— CallBuilder.HandleAccessorCall 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.
CSharpDecompiler.DetectBestEnumValueDisplayMode (cyclomatic 17) ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:2168— CSharpDecompiler.DetectBestEnumValueDisplayMode 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.
CSharpDecompiler.DoDecompile (cyclomatic 17) ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:2685— CSharpDecompiler.DoDecompile 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.
ExpressionBuilder.VisitComp (cyclomatic 17) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:910— ExpressionBuilder.VisitComp has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ExpressionBuilder.VisitDynamicBinaryOperatorInstruction (cyclomatic 35) 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.
ExpressionBuilder.HandlePointerArithmetic (cyclomatic 17) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:1355— ExpressionBuilder.HandlePointerArithmetic has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: ExpressionBuilder.VisitDynamicBinaryOperatorInstruction (cyclomatic 35) 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.
ExpressionBuilder.HandleShift (cyclomatic 17) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:1941— ExpressionBuilder.HandleShift has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ExpressionBuilder.VisitDynamicBinaryOperatorInstruction (cyclomatic 35) 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.
ExpressionBuilder.AdjustConstantToType (cyclomatic 17) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:4103— ExpressionBuilder.AdjustConstantToType has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: ExpressionBuilder.VisitDynamicBinaryOperatorInstruction (cyclomatic 35) 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.
CSharpOutputVisitor.VisitTypeDeclaration (cyclomatic 17) ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpOutputVisitor.cs:1596— CSharpOutputVisitor.VisitTypeDeclaration has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: CSharpOutputVisitor.VisitBinaryOperatorExpression (cyclomatic 24) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
PatternStatementTransform.TransformFieldBackedProperty (cyclomatic 17) ICSharpCode.Decompiler/CSharp/Transforms/PatternStatementTransform.cs:852— PatternStatementTransform.TransformFieldBackedProperty 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.
ILStructure.ILStructure.ctor (cyclomatic 17) ICSharpCode.Decompiler/Disassembler/ILStructure.cs:91— ILStructure.ILStructure.ctor has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
IdStringProvider.AppendTypeName (cyclomatic 17) ICSharpCode.Decompiler/Documentation/IdStringProvider.cs:629— IdStringProvider.AppendTypeName has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: IdStringSignatureTypeProvider.GetPrimitiveType (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.
AsyncAwaitDecompiler.MatchVisualBasicStateMachineFieldAssignements (cyclomatic 17) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:540— AsyncAwaitDecompiler.MatchVisualBasicStateMachineFieldAssignements has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RuntimeAsyncExceptionRewriteTransform.MatchIfChainDispatch (cyclomatic 17) ICSharpCode.Decompiler/IL/ControlFlow/RuntimeAsyncExceptionRewriteTransform.cs:859— RuntimeAsyncExceptionRewriteTransform.MatchIfChainDispatch 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.
SwitchDetection.InlineSwitchExpressionDefaultCaseThrowHelper (cyclomatic 17) ICSharpCode.Decompiler/IL/ControlFlow/SwitchDetection.cs:236— SwitchDetection.InlineSwitchExpressionDefaultCaseThrowHelper has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
YieldReturnDecompiler.ConstructExceptionTable (cyclomatic 17) ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs:588— YieldReturnDecompiler.ConstructExceptionTable has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
YieldReturnDecompiler.ReconstructTryFinallyBlocks (cyclomatic 17) ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs:1247— YieldReturnDecompiler.ReconstructTryFinallyBlocks 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.
ILReader.ReadBlock (cyclomatic 17) ICSharpCode.Decompiler/IL/ILReader.cs:520— ILReader.ReadBlock has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ILReader.DecodeInstruction (cyclomatic 221) 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.
CachedReadOnlySpanInitialization.DoTransform (cyclomatic 17) ICSharpCode.Decompiler/IL/Transforms/CachedReadOnlySpanInitialization.cs:81— CachedReadOnlySpanInitialization.DoTransform has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
CopyPropagation.CanPerformCopyPropagation (cyclomatic 17) ICSharpCode.Decompiler/IL/Transforms/CopyPropagation.cs:100— CopyPropagation.CanPerformCopyPropagation has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
DelegateConstruction.TryUnwrapVisualBasicDelegateWrapper (cyclomatic 17) ICSharpCode.Decompiler/IL/Transforms/DelegateConstruction.cs:264— DelegateConstruction.TryUnwrapVisualBasicDelegateWrapper 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.
HighLevelLoopTransform.MatchForLoop (cyclomatic 17) ICSharpCode.Decompiler/IL/Transforms/HighLevelLoopTransform.cs:382— HighLevelLoopTransform.MatchForLoop 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.
InterpolatedStringTransform.IsKnownCall (cyclomatic 17) ICSharpCode.Decompiler/IL/Transforms/InterpolatedStringTransform.cs:80— InterpolatedStringTransform.IsKnownCall has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
NamedArgumentTransform.CanIntroduceNamedArgument (cyclomatic 17) ICSharpCode.Decompiler/IL/Transforms/NamedArgumentTransform.cs:43— NamedArgumentTransform.CanIntroduceNamedArgument 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.
NullCoalescingTransform.TransformRefTypes (cyclomatic 17) ICSharpCode.Decompiler/IL/Transforms/NullCoalescingTransform.cs:49— NullCoalescingTransform.TransformRefTypes has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
NullPropagationTransform.TransformNullPropagationOnUnconstrainedGenericExpression (cyclomatic 17) ICSharpCode.Decompiler/IL/Transforms/NullPropagationTransform.cs:494— NullPropagationTransform.TransformNullPropagationOnUnconstrainedGenericExpression has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
SwitchOnStringTransform.ScanHashtableInitializerBlocks (cyclomatic 17) ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:131— SwitchOnStringTransform.ScanHashtableInitializerBlocks 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.
SwitchOnStringTransform.MatchRoslynEmptyStringCaseBlockHead (cyclomatic 17) ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:1654— SwitchOnStringTransform.MatchRoslynEmptyStringCaseBlockHead has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TransformDisplayClassUsage.HandleMonoStateMachine (cyclomatic 17) ICSharpCode.Decompiler/IL/Transforms/TransformDisplayClassUsage.cs:711— TransformDisplayClassUsage.HandleMonoStateMachine has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
UsingTransform.MatchNullCheckOrTypeCheck (cyclomatic 17) ICSharpCode.Decompiler/IL/Transforms/UsingTransform.cs:417— UsingTransform.MatchNullCheckOrTypeCheck 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.
FunctionPointerType.FromSignature (cyclomatic 17) ICSharpCode.Decompiler/TypeSystem/FunctionPointerType.cs:32— FunctionPointerType.FromSignature 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.
MetadataTypeDefinition.GetAttributes (cyclomatic 17) ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataTypeDefinition.cs:390— MetadataTypeDefinition.GetAttributes 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.
MetadataModule.GuessFakeMethodAccessor (cyclomatic 17) ICSharpCode.Decompiler/TypeSystem/MetadataModule.cs:703— MetadataModule.GuessFakeMethodAccessor 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.
DockWorkspace.OnAssemblyListChanged (cyclomatic 17) ILSpy/Docking/DockWorkspace.cs:242— DockWorkspace.OnAssemblyListChanged 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.
MetadataColumnBuilder.BuildHeader (cyclomatic 17) ILSpy/Metadata/MetadataColumnBuilder.cs:130— MetadataColumnBuilder.BuildHeader has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, 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.
DecompilerTabPageModel.DecompileAsync (cyclomatic 17) ILSpy/TextView/DecompilerTabPageModel.cs:553— DecompilerTabPageModel.DecompileAsync has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MainMenu.AppendTabSection (cyclomatic 17) ILSpy/Views/MainMenu.axaml.cs:382— MainMenu.AppendTabSection has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 441). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
PropertyWithExtensionHandler.Translate (cyclomatic 16) ICSharpCode.BamlDecompiler/Handlers/Records/PropertyWithExtensionHandler.cs:34— PropertyWithExtensionHandler.Translate has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CallBuilder.TokenizeFormatString (cyclomatic 16) ICSharpCode.Decompiler/CSharp/CallBuilder.cs:942— CallBuilder.TokenizeFormatString has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ExpressionBuilder.HandlePointerSubtraction (cyclomatic 16) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:1600— ExpressionBuilder.HandlePointerSubtraction has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: ExpressionBuilder.VisitDynamicBinaryOperatorInstruction (cyclomatic 35) 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.
ExpressionBuilder.TranslateSwitchValue (cyclomatic 16) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:4293— ExpressionBuilder.TranslateSwitchValue has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ExpressionBuilder.VisitDynamicBinaryOperatorInstruction (cyclomatic 35) 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.
CSharpOutputVisitor.VisitIndexerDeclaration (cyclomatic 16) ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpOutputVisitor.cs:2527— CSharpOutputVisitor.VisitIndexerDeclaration has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: CSharpOutputVisitor.VisitBinaryOperatorExpression (cyclomatic 24) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
InsertRequiredSpacesDecorator.WriteToken (cyclomatic 16) ICSharpCode.Decompiler/CSharp/OutputVisitor/InsertRequiredSpacesDecorator.cs:80— InsertRequiredSpacesDecorator.WriteToken has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
CSharpConversions.StandardImplicitConversion (cyclomatic 16) ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:178— CSharpConversions.StandardImplicitConversion has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CSharpConversions.ImplicitNumericConversion (cyclomatic 16) ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:371— CSharpConversions.ImplicitNumericConversion has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
CSharpConversions.UserDefinedImplicitConversion (cyclomatic 16) ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:1010— CSharpConversions.UserDefinedImplicitConversion has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MemberLookup.Lookup (cyclomatic 16) ICSharpCode.Decompiler/CSharp/Resolver/MemberLookup.cs:359— MemberLookup.Lookup has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
OverloadResolution.ValidateConstraints (cyclomatic 16) ICSharpCode.Decompiler/CSharp/Resolver/OverloadResolution.cs:592— OverloadResolution.ValidateConstraints has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
StatementBuilder.CanBeDeconstructedInForeach (cyclomatic 16) ICSharpCode.Decompiler/CSharp/StatementBuilder.cs:1124— StatementBuilder.CanBeDeconstructedInForeach has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TranslatedExpression.ConvertToBoolean (cyclomatic 16) ICSharpCode.Decompiler/CSharp/TranslatedExpression.cs:750— TranslatedExpression.ConvertToBoolean has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DisassemblerHelpers.EscapeString (cyclomatic 16) ICSharpCode.Decompiler/Disassembler/DisassemblerHelpers.cs:290— DisassemblerHelpers.EscapeString 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: DisassemblerHelpers.PrimitiveTypeName (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
ILStructure.AddNestedStructure (cyclomatic 16) ICSharpCode.Decompiler/Disassembler/ILStructure.cs:169— ILStructure.AddNestedStructure has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AsyncAwaitDecompiler.CleanUpBodyOfMoveNext (cyclomatic 16) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:272— AsyncAwaitDecompiler.CleanUpBodyOfMoveNext has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to 3 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
DetectPinnedRegions.IsNullSafeArrayToPointerNotNullBlock (cyclomatic 16) ICSharpCode.Decompiler/IL/ControlFlow/DetectPinnedRegions.cs:407— DetectPinnedRegions.IsNullSafeArrayToPointerNotNullBlock has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DetectPinnedRegions.ReplacePinnedVar (cyclomatic 16) ICSharpCode.Decompiler/IL/ControlFlow/DetectPinnedRegions.cs:828— DetectPinnedRegions.ReplacePinnedVar has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
LoopDetection.FindExitPoint (cyclomatic 16) ICSharpCode.Decompiler/IL/ControlFlow/LoopDetection.cs:314— LoopDetection.FindExitPoint has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LoopDetection.PrepareReverseCFG (cyclomatic 16) ICSharpCode.Decompiler/IL/ControlFlow/LoopDetection.cs:535— LoopDetection.PrepareReverseCFG has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RuntimeAsyncExceptionRewriteTransform.TryRewriteTryFinally (cyclomatic 16) ICSharpCode.Decompiler/IL/ControlFlow/RuntimeAsyncExceptionRewriteTransform.cs:263— RuntimeAsyncExceptionRewriteTransform.TryRewriteTryFinally has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DeconstructInstruction.CheckInvariant (cyclomatic 16) ICSharpCode.Decompiler/IL/Instructions/DeconstructInstruction.cs:274— DeconstructInstruction.CheckInvariant has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ExpressionTransforms.TransformDynamicAddAssignOrRemoveAssign (cyclomatic 16) ICSharpCode.Decompiler/IL/Transforms/ExpressionTransforms.cs:755— ExpressionTransforms.TransformDynamicAddAssignOrRemoveAssign has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ExpressionTransforms.TransformCatchVariable (cyclomatic 16) ICSharpCode.Decompiler/IL/Transforms/ExpressionTransforms.cs:961— ExpressionTransforms.TransformCatchVariable has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ILInlining.IsGeneratedTemporaryForAddressOf (cyclomatic 16) ICSharpCode.Decompiler/IL/Transforms/ILInlining.cs:333— ILInlining.IsGeneratedTemporaryForAddressOf has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RemoveDeadVariableInit.Run (cyclomatic 16) ICSharpCode.Decompiler/IL/Transforms/RemoveDeadVariableInit.cs:37— RemoveDeadVariableInit.Run has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SwitchOnStringTransform.FindHashtableInitBlock (cyclomatic 16) ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:968— SwitchOnStringTransform.FindHashtableInitBlock has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ApplyAttributeTypeVisitor.VisitParameterizedType (cyclomatic 16) ICSharpCode.Decompiler/TypeSystem/ApplyAttributeTypeVisitor.cs:256— ApplyAttributeTypeVisitor.VisitParameterizedType has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LoadedAssembly.LoadCoreAsync (cyclomatic 16) ICSharpCode.ILSpyX/LoadedAssembly.cs:428— LoadedAssembly.LoadCoreAsync has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GuessFileType.IsUTF8 (cyclomatic 16) REDACTED:87— GuessFileType.IsUTF8 has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CSharpHighlightingTokenWriter.GetCurrentMemberReference (cyclomatic 16) ILSpy/Languages/CSharpHighlightingTokenWriter.cs:476— CSharpHighlightingTokenWriter.GetCurrentMemberReference has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: CSharpHighlightingTokenWriter.WritePrimitiveType (cyclomatic 27) 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.
Skipped test: Issue379 ICSharpCode.Decompiler.Tests/ILPrettyTestRunner.cs:72— Skipped — Need to decide how to represent virtual methods without 'newslot' flag Its body is token-identical to `Issue3320` at line 54 of this file, which is NOT skipped and passes on every build — so the reason above is contradicted by this class's own suite, and re-enabling this test would verify exactly what its twin already verifies. Fix whichever is wrong: delete this test as a duplicate, give it the distinct input it was meant to have, or drop the skip.
D10 · Test Quality· Depends on a live external host · ×1
Depends on a live external host: NormalizePath_Web ICSharpCode.Decompiler.Tests/Util/FileUtilityTests.cs:60— This test fetches `http://danielgrunwald.de/path/` while it runs, so it passes only while danielgrunwald.de is up, reachable from the build machine, and still serving what this test expects — none of which this repository controls. It goes red on an aeroplane, behind a corporate proxy, in a sealed CI network, and on the day the third party edits that document. Serve the payload from the repository instead (a checked-in fixture file), or stub the transport; if the point really is to check the remote contract, move it out of the unit suite into a separately-scheduled integration job that is allowed to fail for someone else's reasons.
SwitchOnStringTransform.MatchRoslynSwitchOnStringUsingLengthAndChar (cognitive 172) ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:1195— SwitchOnStringTransform.MatchRoslynSwitchOnStringUsingLengthAndChar has cognitive complexity 172 (threshold 15). Of this number, 171 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DynamicCallSiteTransform.ScanCallSiteInitBlock (cognitive 162) ICSharpCode.Decompiler/IL/Transforms/DynamicCallSiteTransform.cs:334— DynamicCallSiteTransform.ScanCallSiteInitBlock has cognitive complexity 162 (threshold 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.
TranslatedExpression.ConvertTo (cognitive 158) ICSharpCode.Decompiler/CSharp/TranslatedExpression.cs:209— TranslatedExpression.ConvertTo has cognitive complexity 158 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
UsingTransform.MatchDisposeCheck (cognitive 133) ICSharpCode.Decompiler/IL/Transforms/UsingTransform.cs:259— UsingTransform.MatchDisposeCheck has cognitive complexity 133 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
CSharpResolver.ResolveBinaryOperator (cognitive 128) ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:545— CSharpResolver.ResolveBinaryOperator has cognitive complexity 128 (threshold 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.
CSharpDecompiler.MemberIsHidden (cognitive 125) ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:427— CSharpDecompiler.MemberIsHidden has cognitive complexity 125 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
CSharpDecompiler.ReadCodeMappingInfo (cognitive 117) ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:1132— CSharpDecompiler.ReadCodeMappingInfo has cognitive complexity 117 (threshold 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.
VariableScope.VariableScope.ctor (cognitive 115) ICSharpCode.Decompiler/IL/Transforms/AssignVariableNames.cs:76— VariableScope.VariableScope.ctor has cognitive complexity 115 (threshold 15). Of this number, 110 points are the body's own statements and 5 belong to 4 function items inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
CSharpDecompiler.DoDecompile (cognitive 111) ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:1819— CSharpDecompiler.DoDecompile has cognitive complexity 111 (threshold 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.
RecordDecompiler.IsGeneratedEquals (cognitive 100) ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:1084— RecordDecompiler.IsGeneratedEquals has cognitive complexity 100 (threshold 15). Of this number, 99 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Lexer.ReadDigit (cognitive 100) ICSharpCode.ILSpyX/Search/CSharpLexer.cs:566— Lexer.ReadDigit has cognitive complexity 100 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ILAmbience.ConvertSymbol (cognitive 99) ICSharpCode.Decompiler/IL/ILAmbience.cs:54— ILAmbience.ConvertSymbol has cognitive complexity 99 (threshold 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.
IndexRangeTransform.Run (cognitive 98) ICSharpCode.Decompiler/IL/Transforms/IndexRangeTransform.cs:148— IndexRangeTransform.Run has cognitive complexity 98 (threshold 15). 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.
RecordDecompiler.DetectPrimaryConstructor (cognitive 92) ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:165— RecordDecompiler.DetectPrimaryConstructor has cognitive complexity 92 (threshold 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.
ConstructorInitializerAnalyzer.Analyze (cognitive 91) ICSharpCode.Decompiler/CSharp/Transforms/TransformFieldAndConstructorInitializers.cs:307— ConstructorInitializerAnalyzer.Analyze has cognitive complexity 91 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
LiteralSearchStrategy.MethodIsLiteralMatch (cognitive 90) ICSharpCode.ILSpyX/Search/LiteralSearchStrategy.cs:144— LiteralSearchStrategy.MethodIsLiteralMatch has cognitive complexity 90 (threshold 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.
MethodBodyDisassembler.WriteInstruction (cognitive 88) ICSharpCode.Decompiler/Disassembler/MethodBodyDisassembler.cs:327— MethodBodyDisassembler.WriteInstruction has cognitive complexity 88 (threshold 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.
AwaitInCatchTransform.Run (cognitive 88) ICSharpCode.Decompiler/IL/ControlFlow/AwaitInCatchTransform.cs:52— AwaitInCatchTransform.Run has cognitive complexity 88 (threshold 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.
RecordDecompiler.IsGeneratedPrintMembers (cognitive 86) ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:837— RecordDecompiler.IsGeneratedPrintMembers has cognitive complexity 86 (threshold 15). Of this number, 85 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IntroduceQueryExpressions.DecompileQuery (cognitive 86) ICSharpCode.Decompiler/CSharp/Transforms/IntroduceQueryExpressions.cs:138— IntroduceQueryExpressions.DecompileQuery has cognitive complexity 86 (threshold 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.
TransformArrayInitializers.HandleSimpleArrayInitializer (cognitive 86) ICSharpCode.Decompiler/IL/Transforms/TransformArrayInitializers.cs:634— TransformArrayInitializers.HandleSimpleArrayInitializer has cognitive complexity 86 (threshold 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.
FileUtility.NormalizePath (cognitive 85) ICSharpCode.Decompiler/Util/FileUtility.cs:34— FileUtility.NormalizePath has cognitive complexity 85 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
YieldReturnDecompiler.ConvertBody (cognitive 80) ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs:855— YieldReturnDecompiler.ConvertBody has cognitive complexity 80 (threshold 15). Of this number, 79 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CallBuilder.Build (cognitive 79) ICSharpCode.Decompiler/CSharp/CallBuilder.cs:389— CallBuilder.Build has cognitive complexity 79 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
AsyncAwaitDecompiler.MatchTaskCreationPattern (cognitive 79) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:325— AsyncAwaitDecompiler.MatchTaskCreationPattern has cognitive complexity 79 (threshold 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.
MemberLookup.AddMembers (cognitive 77) ICSharpCode.Decompiler/CSharp/Resolver/MemberLookup.cs:543— MemberLookup.AddMembers has cognitive complexity 77 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
CSharpBracketSearcher.SearchBracketBackward (cognitive 77) ILSpy/Languages/CSharpBracketSearcher.cs:133— CSharpBracketSearcher.SearchBracketBackward has cognitive complexity 77 (threshold 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.
CSharpBracketSearcher.SearchBracketForward (cognitive 76) ILSpy/Languages/CSharpBracketSearcher.cs:236— CSharpBracketSearcher.SearchBracketForward has cognitive complexity 76 (threshold 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.
RemoveCompilerGeneratedAssemblyAttributes.Run (cognitive 75) ICSharpCode.Decompiler/CSharp/Transforms/EscapeInvalidIdentifiers.cs:97— RemoveCompilerGeneratedAssemblyAttributes.Run has cognitive complexity 75 (threshold 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.
TypeSystemAstBuilder.ConvertTypeHelper (cognitive 74) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:311— TypeSystemAstBuilder.ConvertTypeHelper has cognitive complexity 74 (threshold 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.
DeclareVariables.InsertVariableDeclarations (cognitive 74) ICSharpCode.Decompiler/CSharp/Transforms/DeclareVariables.cs:613— DeclareVariables.InsertVariableDeclarations has cognitive complexity 74 (threshold 15). Of this number, 63 points are the body's own statements and 11 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NullableLiftingTransform.Lift (cognitive 74) ICSharpCode.Decompiler/IL/Transforms/NullableLiftingTransform.cs:184— NullableLiftingTransform.Lift has cognitive complexity 74 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
CSharpResolver.LookupSimpleNameOrTypeName (cognitive 73) ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:1423— CSharpResolver.LookupSimpleNameOrTypeName has cognitive complexity 73 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
CSharpDecompiler.IsAccessorInterfaceImplementationRuntimeHelper (cognitive 70) ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:564— CSharpDecompiler.IsAccessorInterfaceImplementationRuntimeHelper has cognitive complexity 70 (threshold 15). Of this number, 61 points are the body's own statements and 9 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NullPropagationTransform.IsValidAccessChain (cognitive 70) ICSharpCode.Decompiler/IL/Transforms/NullPropagationTransform.cs:255— NullPropagationTransform.IsValidAccessChain has cognitive complexity 70 (threshold 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.
CSharpAmbience.ConvertSymbol (cognitive 69) ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpAmbience.cs:51— CSharpAmbience.ConvertSymbol has cognitive complexity 69 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
InstructionOutputExtensions.WriteTo (cognitive 69) ICSharpCode.Decompiler/IL/InstructionOutputExtensions.cs:72— InstructionOutputExtensions.WriteTo has cognitive complexity 69 (threshold 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.
SwitchOnStringTransform.SimplifyCascadingIfStatements (cognitive 69) ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:184— SwitchOnStringTransform.SimplifyCascadingIfStatements has cognitive complexity 69 (threshold 15). Of this number, 68 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AccessPathElement.GetAccessPath (cognitive 69) ICSharpCode.Decompiler/IL/Transforms/TransformCollectionAndObjectInitializers.cs:374— AccessPathElement.GetAccessPath has cognitive complexity 69 (threshold 15). Of this number, 67 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExtensionInfo.ExtensionInfo.ctor (cognitive 65) ICSharpCode.Decompiler/TypeSystem/ExtensionInfo.cs:38— ExtensionInfo.ExtensionInfo.ctor has cognitive complexity 65 (threshold 15). Of this number, 64 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SwitchOnStringTransform.MatchLegacySwitchOnStringWithDict (cognitive 64) ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:564— SwitchOnStringTransform.MatchLegacySwitchOnStringWithDict has cognitive complexity 64 (threshold 15). 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.
TransformAssignment.HandleCompoundAssign (cognitive 64) ICSharpCode.Decompiler/IL/Transforms/TransformAssignment.cs:344— TransformAssignment.HandleCompoundAssign has cognitive complexity 64 (threshold 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.
AwaitInCatchTransform.MatchAwaitCatchHandler (cognitive 63) ICSharpCode.Decompiler/IL/ControlFlow/AwaitInCatchTransform.cs:257— AwaitInCatchTransform.MatchAwaitCatchHandler has cognitive complexity 63 (threshold 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.
CSharpPrimitiveCast.CSharpPrimitiveCastChecked (cognitive 62) ICSharpCode.Decompiler/Util/CSharpPrimitiveCast.cs:47— CSharpPrimitiveCast.CSharpPrimitiveCastChecked has cognitive complexity 62 (threshold 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. This shape REPEATS in the file: one other method here (CSharpPrimitiveCast.CSharpPrimitiveCastUnchecked) 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.
CSharpPrimitiveCast.CSharpPrimitiveCastUnchecked (cognitive 62) ICSharpCode.Decompiler/Util/CSharpPrimitiveCast.cs:409— CSharpPrimitiveCast.CSharpPrimitiveCastUnchecked has cognitive complexity 62 (threshold 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. This shape REPEATS in the file: one other method here (CSharpPrimitiveCast.CSharpPrimitiveCastChecked) 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.
ILSpyCmdProgram.OnExecuteAsync (cognitive 62) ICSharpCode.ILSpyCmd/IlspyCmdProgram.cs:284— ILSpyCmdProgram.OnExecuteAsync has cognitive complexity 62 (threshold 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.
ExpressionBuilder.HandleBinaryNumeric (cognitive 61) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:1674— ExpressionBuilder.HandleBinaryNumeric has cognitive complexity 61 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
TypeSystemAstBuilder.ConvertEnumValue (cognitive 61) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:1320— TypeSystemAstBuilder.ConvertEnumValue has cognitive complexity 61 (threshold 15). Of this number, 60 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
YieldReturnDecompiler.AnalyzeMoveNext (cognitive 61) ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs:650— YieldReturnDecompiler.AnalyzeMoveNext has cognitive complexity 61 (threshold 15). Of this number, 59 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
TypeInference.MergeSimilarTypes (cognitive 60) ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:1032— TypeInference.MergeSimilarTypes has cognitive complexity 60 (threshold 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.
TypeSystemAstBuilder.ConvertTypeDefinition (cognitive 60) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2035— TypeSystemAstBuilder.ConvertTypeDefinition has cognitive complexity 60 (threshold 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.
DetectPinnedRegions.CreatePinnedRegion (cognitive 60) ICSharpCode.Decompiler/IL/ControlFlow/DetectPinnedRegions.cs:549— DetectPinnedRegions.CreatePinnedRegion has cognitive complexity 60 (threshold 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.
TransformAssignment.TransformInlineAssignmentStObjOrCall (cognitive 60) ICSharpCode.Decompiler/IL/Transforms/TransformAssignment.cs:103— TransformAssignment.TransformInlineAssignmentStObjOrCall has cognitive complexity 60 (threshold 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.
DecompilerTypeSystem.InitializeCoreAsync (cognitive 60) ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs:471— DecompilerTypeSystem.InitializeCoreAsync has cognitive complexity 60 (threshold 15). Of this number, 59 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MemberSearchStrategy.Search (cognitive 60) ICSharpCode.ILSpyX/Search/MemberSearchStrategy.cs:38— MemberSearchStrategy.Search has cognitive complexity 60 (threshold 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.
OverloadResolution.BetterFunctionMember (cognitive 59) ICSharpCode.Decompiler/CSharp/Resolver/OverloadResolution.cs:740— OverloadResolution.BetterFunctionMember has cognitive complexity 59 (threshold 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.
TypeSystemAstBuilder.ConvertConstantValue (cognitive 59) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:1082— TypeSystemAstBuilder.ConvertConstantValue has cognitive complexity 59 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ReplaceMethodCallsWithOperators.ProcessInvocationExpression (cognitive 58) ICSharpCode.Decompiler/CSharp/Transforms/ReplaceMethodCallsWithOperators.cs:56— ReplaceMethodCallsWithOperators.ProcessInvocationExpression has cognitive complexity 58 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ReflectionHelper.ResolveTypeName (cognitive 57) ICSharpCode.Decompiler/TypeSystem/ReflectionHelper.cs:177— ReflectionHelper.ResolveTypeName has cognitive complexity 57 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
AwaitInFinallyTransform.Run (cognitive 56) ICSharpCode.Decompiler/IL/ControlFlow/AwaitInFinallyTransform.cs:30— AwaitInFinallyTransform.Run has cognitive complexity 56 (threshold 15). Of this number, 47 points are the body's own statements and 9 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TransformCollectionAndObjectInitializers.Run (cognitive 56) ICSharpCode.Decompiler/IL/Transforms/TransformCollectionAndObjectInitializers.cs:63— TransformCollectionAndObjectInitializers.Run has cognitive complexity 56 (threshold 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.
CSharpResolver.LookInCurrentUsingScope (cognitive 54) ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:1614— CSharpResolver.LookInCurrentUsingScope has cognitive complexity 54 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
DecompilerException.GetStackTrace (cognitive 54) ICSharpCode.Decompiler/DecompilerException.cs:112— DecompilerException.GetStackTrace has cognitive complexity 54 (threshold 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.
ExpressionTransforms.HandleSwitchExpression (cognitive 54) ICSharpCode.Decompiler/IL/Transforms/ExpressionTransforms.cs:631— ExpressionTransforms.HandleSwitchExpression has cognitive complexity 54 (threshold 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.
XmlDocumentationElement.CreateElements (cognitive 53) ICSharpCode.Decompiler/Documentation/XmlDocumentationElement.cs:167— XmlDocumentationElement.CreateElements has cognitive complexity 53 (threshold 15). Of this number, 52 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
Analyzer.CalculateLocalScopes (cognitive 53) ICSharpCode.Decompiler/IL/Transforms/IntroduceScopedModifierOnLocals.cs:181— Analyzer.CalculateLocalScopes has cognitive complexity 53 (threshold 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.
CSharpConversions.ExplicitReferenceConversion (cognitive 52) ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:659— CSharpConversions.ExplicitReferenceConversion has cognitive complexity 52 (threshold 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.
TypeSystemAstBuilder.ConvertTypeHelper (cognitive 52) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:485— TypeSystemAstBuilder.ConvertTypeHelper has cognitive complexity 52 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
TypeSystemAstBuilder.GetMemberModifiers (cognitive 52) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2670— TypeSystemAstBuilder.GetMemberModifiers has cognitive complexity 52 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
TransformExpressionTrees.ConvertBinaryNumericOperator (cognitive 52) ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:631— TransformExpressionTrees.ConvertBinaryNumericOperator has cognitive complexity 52 (threshold 15). Most of this is not in the body itself: 10 of the 52 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 647, 716, 700, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
ApplyAttributeTypeVisitor.ApplyAttributesToType (cognitive 52) ICSharpCode.Decompiler/TypeSystem/ApplyAttributeTypeVisitor.cs:37— ApplyAttributeTypeVisitor.ApplyAttributesToType has cognitive complexity 52 (threshold 15). Of this number, 50 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Block.CheckInvariant (cognitive 51) ICSharpCode.Decompiler/IL/Instructions/Block.cs:126— Block.CheckInvariant has cognitive complexity 51 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
OverloadResolution.CheckApplicability (cognitive 50) ICSharpCode.Decompiler/CSharp/Resolver/OverloadResolution.cs:646— OverloadResolution.CheckApplicability has cognitive complexity 50 (threshold 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.
RuntimeAsyncExceptionRewriteTransform.TryRewriteMultiHandlerTryCatch (cognitive 50) ICSharpCode.Decompiler/IL/ControlFlow/RuntimeAsyncExceptionRewriteTransform.cs:722— RuntimeAsyncExceptionRewriteTransform.TryRewriteMultiHandlerTryCatch has cognitive complexity 50 (threshold 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.
SwitchOnStringTransform.MatchRoslynSwitchOnString (cognitive 50) ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:1014— SwitchOnStringTransform.MatchRoslynSwitchOnString has cognitive complexity 50 (threshold 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.
ExpressionBuilder.TranslateTarget (cognitive 49) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:2914— ExpressionBuilder.TranslateTarget has cognitive complexity 49 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ExpressionBuilder.TranslatePattern (cognitive 49) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:5346— ExpressionBuilder.TranslatePattern has cognitive complexity 49 (threshold 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.
RuntimeAsyncExceptionRewriteTransform.TryRewriteFlagBasedEarlyReturn (cognitive 49) ICSharpCode.Decompiler/IL/ControlFlow/RuntimeAsyncExceptionRewriteTransform.cs:1054— RuntimeAsyncExceptionRewriteTransform.TryRewriteFlagBasedEarlyReturn has cognitive complexity 49 (threshold 15). 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.
PatternMatchingTransform.DetectPropertySubPattern (cognitive 49) ICSharpCode.Decompiler/IL/Transforms/PatternMatchingTransform.cs:220— PatternMatchingTransform.DetectPropertySubPattern has cognitive complexity 49 (threshold 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.
TextWriterTokenWriter.WritePrimitiveValue (cognitive 48) ICSharpCode.Decompiler/CSharp/OutputVisitor/TextWriterTokenWriter.cs:238— TextWriterTokenWriter.WritePrimitiveValue has cognitive complexity 48 (threshold 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.
RequiredNamespaceCollector.CollectNamespacesFromMethodBody (cognitive 48) ICSharpCode.Decompiler/CSharp/RequiredNamespaceCollector.cs:280— RequiredNamespaceCollector.CollectNamespacesFromMethodBody has cognitive complexity 48 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
StatementBuilder.TranslateSwitch (cognitive 48) ICSharpCode.Decompiler/CSharp/StatementBuilder.cs:219— StatementBuilder.TranslateSwitch has cognitive complexity 48 (threshold 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.
TypeSystemAstBuilder.ConvertNamespace (cognitive 48) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:655— TypeSystemAstBuilder.ConvertNamespace has cognitive complexity 48 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
DeclareVariables.FindInsertionPoints (cognitive 48) ICSharpCode.Decompiler/CSharp/Transforms/DeclareVariables.cs:294— DeclareVariables.FindInsertionPoints has cognitive complexity 48 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ConstructorInitializerAnalyzer.MoveFieldInitializersToDeclarations (cognitive 48) ICSharpCode.Decompiler/CSharp/Transforms/TransformFieldAndConstructorInitializers.cs:572— ConstructorInitializerAnalyzer.MoveFieldInitializersToDeclarations has cognitive complexity 48 (threshold 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.
VariableScope.GenerateNameForVariable (cognitive 48) ICSharpCode.Decompiler/IL/Transforms/AssignVariableNames.cs:391— VariableScope.GenerateNameForVariable has cognitive complexity 48 (threshold 15). Of this number, 46 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TypeInference.MakeLowerBoundInference (cognitive 47) ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:747— TypeInference.MakeLowerBoundInference has cognitive complexity 47 (threshold 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.
AsyncAwaitDecompiler.DetectAwaitPattern (cognitive 47) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:1882— AsyncAwaitDecompiler.DetectAwaitPattern has cognitive complexity 47 (threshold 15). Of this number, 46 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CallBuilder.BuildArgumentList (cognitive 46) ICSharpCode.Decompiler/CSharp/CallBuilder.cs:1034— CallBuilder.BuildArgumentList has cognitive complexity 46 (threshold 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.
DynamicCallSiteTransform.TransformCallSites (cognitive 46) ICSharpCode.Decompiler/IL/Transforms/DynamicCallSiteTransform.cs:73— DynamicCallSiteTransform.TransformCallSites has cognitive complexity 46 (threshold 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.
CSharpConversions.BetterConversion (cognitive 45) ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:1564— CSharpConversions.BetterConversion has cognitive complexity 45 (threshold 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.
CSharpResolver.ResolveUnaryOperator (cognitive 45) ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:325— CSharpResolver.ResolveUnaryOperator has cognitive complexity 45 (threshold 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.
CSharpResolver.ResolveInvocation (cognitive 45) ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:2202— CSharpResolver.ResolveInvocation has cognitive complexity 45 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ConstructorInitializerAnalyzer.RemoveImplicitConstructor (cognitive 45) ICSharpCode.Decompiler/CSharp/Transforms/TransformFieldAndConstructorInitializers.cs:700— ConstructorInitializerAnalyzer.RemoveImplicitConstructor has cognitive complexity 45 (threshold 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.
ConditionDetection.CompareBlockExitPriority (cognitive 45) ICSharpCode.Decompiler/IL/ControlFlow/ConditionDetection.cs:515— ConditionDetection.CompareBlockExitPriority has cognitive complexity 45 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ExpressionBuilder.TranslateFunction (cognitive 44) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:2584— ExpressionBuilder.TranslateFunction has cognitive complexity 44 (threshold 15). Of this number, 42 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TypeInference.FindTypesInBounds (cognitive 44) ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:1259— TypeInference.FindTypesInBounds has cognitive complexity 44 (threshold 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.
ExtractionContext.Extract (cognitive 44) ICSharpCode.Decompiler/IL/Transforms/ILExtraction.cs:102— ExtractionContext.Extract has cognitive complexity 44 (threshold 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.
AutoEventDecompiler.TryAnalyzeVisualBasicWithEventsProperty (cognitive 43) ICSharpCode.Decompiler/CSharp/AutoEventDecompiler.cs:70— AutoEventDecompiler.TryAnalyzeVisualBasicWithEventsProperty has cognitive complexity 43 (threshold 15). Of this number, 42 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExpressionBuilder.VisitConv (cognitive 43) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:2318— ExpressionBuilder.VisitConv has cognitive complexity 43 (threshold 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.
ExpressionBuilder.TranslateSwitchValue (cognitive 43) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:4293— ExpressionBuilder.TranslateSwitchValue has cognitive complexity 43 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
MemberLookup.GetAccessibleMembers (cognitive 43) ICSharpCode.Decompiler/CSharp/Resolver/MemberLookup.cs:165— MemberLookup.GetAccessibleMembers has cognitive complexity 43 (threshold 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.
SequencePointBuilder.GetSequencePoints (cognitive 43) ICSharpCode.Decompiler/CSharp/SequencePointBuilder.cs:568— SequencePointBuilder.GetSequencePoints has cognitive complexity 43 (threshold 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.
BamlDecompilerTypeSystem.BamlDecompilerTypeSystem.ctor (cognitive 42) ICSharpCode.BamlDecompiler/BamlDecompilerTypeSystem.cs:74— BamlDecompilerTypeSystem.BamlDecompilerTypeSystem.ctor has cognitive complexity 42 (threshold 15). Of this number, 41 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CallBuilder.TryGetStringInterpolationTokens (cognitive 42) ICSharpCode.Decompiler/CSharp/CallBuilder.cs:863— CallBuilder.TryGetStringInterpolationTokens has cognitive complexity 42 (threshold 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.
AsyncAwaitDecompiler.AnalyzeStateMachine (cognitive 42) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:1341— AsyncAwaitDecompiler.AnalyzeStateMachine has cognitive complexity 42 (threshold 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.
YieldReturnDecompiler.MatchEnumeratorCreationPattern (cognitive 42) ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs:263— YieldReturnDecompiler.MatchEnumeratorCreationPattern has cognitive complexity 42 (threshold 15). 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.
Analyzer.Run (cognitive 42) ICSharpCode.Decompiler/IL/Transforms/IntroduceScopedModifierOnLocals.cs:87— Analyzer.Run has cognitive complexity 42 (threshold 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.
InheritanceHelper.GetDerivedMember (cognitive 42) ICSharpCode.Decompiler/TypeSystem/InheritanceHelper.cs:114— InheritanceHelper.GetDerivedMember has cognitive complexity 42 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
TypeSystemAstBuilder.ConvertFloatingPointLiteral (cognitive 41) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:1610— TypeSystemAstBuilder.ConvertFloatingPointLiteral has cognitive complexity 41 (threshold 15). Of this number, 39 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
StateRangeAnalysis.AssignStateRanges (cognitive 41) ICSharpCode.Decompiler/IL/ControlFlow/StateRangeAnalysis.cs:115— StateRangeAnalysis.AssignStateRanges has cognitive complexity 41 (threshold 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.
DeconstructionTransform.MatchAssignments (cognitive 41) ICSharpCode.Decompiler/IL/Transforms/DeconstructionTransform.cs:868— DeconstructionTransform.MatchAssignments has cognitive complexity 41 (threshold 15). Of this number, 34 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NullableLiftingTransform.DoLift (cognitive 41) ICSharpCode.Decompiler/IL/Transforms/NullableLiftingTransform.cs:871— NullableLiftingTransform.DoLift has cognitive complexity 41 (threshold 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.
SwitchOnStringTransform.Run (cognitive 41) ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:39— SwitchOnStringTransform.Run has cognitive complexity 41 (threshold 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.
TransformDisplayClassUsage.VisitStLoc (cognitive 41) ICSharpCode.Decompiler/IL/Transforms/TransformDisplayClassUsage.cs:843— TransformDisplayClassUsage.VisitStLoc has cognitive complexity 41 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
UserDefinedLogicTransform.TransformDynamic (cognitive 41) ICSharpCode.Decompiler/IL/Transforms/UserDefinedLogicTransform.cs:169— UserDefinedLogicTransform.TransformDynamic has cognitive complexity 41 (threshold 15). 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.
Lexer.ReadIdent (cognitive 41) ICSharpCode.ILSpyX/Search/CSharpLexer.cs:497— Lexer.ReadIdent has cognitive complexity 41 (threshold 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.
RunningSearch.ParseInput (cognitive 41) ILSpy/Search/RunningSearch.cs:321— RunningSearch.ParseInput has cognitive complexity 41 (threshold 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.
TypeInference.MakeUpperBoundInference (cognitive 40) ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:878— TypeInference.MakeUpperBoundInference has cognitive complexity 40 (threshold 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.
AsyncAwaitDecompiler.CheckResumeBlock (cognitive 40) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:2086— AsyncAwaitDecompiler.CheckResumeBlock has cognitive complexity 40 (threshold 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.
TransformDisplayClassUsage.ResolveVariableToPropagate (cognitive 40) ICSharpCode.Decompiler/IL/Transforms/TransformDisplayClassUsage.cs:597— TransformDisplayClassUsage.ResolveVariableToPropagate has cognitive complexity 40 (threshold 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.
ExpressionBuilder.TranslateCeq (cognitive 39) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:977— ExpressionBuilder.TranslateCeq has cognitive complexity 39 (threshold 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.
CSharpConversions.UserDefinedExplicitConversion (cognitive 39) ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:1068— CSharpConversions.UserDefinedExplicitConversion has cognitive complexity 39 (threshold 15). Of this number, 38 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
PrettifyAssignments.VisitAssignmentExpression (cognitive 39) ICSharpCode.Decompiler/CSharp/Transforms/PrettifyAssignments.cs:48— PrettifyAssignments.VisitAssignmentExpression has cognitive complexity 39 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
Conv.GetConversionKind (cognitive 39) ICSharpCode.Decompiler/IL/Instructions/Conv.cs:183— Conv.GetConversionKind has cognitive complexity 39 (threshold 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.
TransformAssignment.TransformPostIncDecOperator (cognitive 39) ICSharpCode.Decompiler/IL/Transforms/TransformAssignment.cs:1036— TransformAssignment.TransformPostIncDecOperator has cognitive complexity 39 (threshold 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.
RecordDecompiler.DetectAutomaticProperties (cognitive 38) ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:68— RecordDecompiler.DetectAutomaticProperties has cognitive complexity 38 (threshold 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.
RecordDecompiler.IsGeneratedCopyConstructor (cognitive 38) ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:723— RecordDecompiler.IsGeneratedCopyConstructor has cognitive complexity 38 (threshold 15). Of this number, 37 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StatementBuilder.ConvertLoop (cognitive 38) ICSharpCode.Decompiler/CSharp/StatementBuilder.cs:1359— StatementBuilder.ConvertLoop has cognitive complexity 38 (threshold 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.
TypeSystemAstBuilder.TryExtractExpression (cognitive 38) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:1721— TypeSystemAstBuilder.TryExtractExpression has cognitive complexity 38 (threshold 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.
DetectPinnedRegions.IsCustomRefPinPattern (cognitive 38) ICSharpCode.Decompiler/IL/ControlFlow/DetectPinnedRegions.cs:247— DetectPinnedRegions.IsCustomRefPinPattern has cognitive complexity 38 (threshold 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.
LocalFunctionDecompiler.PropagateClosureParameterArguments (cognitive 38) ICSharpCode.Decompiler/IL/Transforms/LocalFunctionDecompiler.cs:238— LocalFunctionDecompiler.PropagateClosureParameterArguments has cognitive complexity 38 (threshold 15). Of this number, 37 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TransformAssignment.CheckImplicitTruncation (cognitive 38) ICSharpCode.Decompiler/IL/Transforms/TransformAssignment.cs:584— TransformAssignment.CheckImplicitTruncation has cognitive complexity 38 (threshold 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.
SharpTreeNode.OnChildrenChanged (cognitive 38) ICSharpCode.ILSpyX/TreeView/SharpTreeNode.cs:202— SharpTreeNode.OnChildrenChanged has cognitive complexity 38 (threshold 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.
CSharpBracketSearcher.GetStartType (cognitive 38) ILSpy/Languages/CSharpBracketSearcher.cs:81— CSharpBracketSearcher.GetStartType has cognitive complexity 38 (threshold 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.
ExpressionBuilder.VisitIfInstruction (cognitive 37) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:4191— ExpressionBuilder.VisitIfInstruction has cognitive complexity 37 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ILStructure.ILStructure.ctor (cognitive 37) ICSharpCode.Decompiler/Disassembler/ILStructure.cs:91— ILStructure.ILStructure.ctor has cognitive complexity 37 (threshold 15). Of this number, 36 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
IdStringProvider.AppendTypeName (cognitive 37) ICSharpCode.Decompiler/Documentation/IdStringProvider.cs:629— IdStringProvider.AppendTypeName has cognitive complexity 37 (threshold 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.
AsyncAwaitDecompiler.MatchAsyncEnumeratorCreationPattern (cognitive 37) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:609— AsyncAwaitDecompiler.MatchAsyncEnumeratorCreationPattern has cognitive complexity 37 (threshold 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.
PatternMatchingTransform.MatchNullableHasValueCheckPattern (cognitive 37) ICSharpCode.Decompiler/IL/Transforms/PatternMatchingTransform.cs:364— PatternMatchingTransform.MatchNullableHasValueCheckPattern has cognitive complexity 37 (threshold 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.
RemoveUnconstrainedGenericReferenceTypeCheck.Run (cognitive 37) ICSharpCode.Decompiler/IL/Transforms/RemoveUnconstrainedGenericReferenceTypeCheck.cs:56— RemoveUnconstrainedGenericReferenceTypeCheck.Run has cognitive complexity 37 (threshold 15). 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.
TransformArrayInitializers.HandleSequentialLocAllocInitializer (cognitive 37) ICSharpCode.Decompiler/IL/Transforms/TransformArrayInitializers.cs:457— TransformArrayInitializers.HandleSequentialLocAllocInitializer has cognitive complexity 37 (threshold 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.
CSharpLanguage.DecompileAssembly (cognitive 37) ILSpy/Languages/CSharpLanguage.cs:444— CSharpLanguage.DecompileAssembly has cognitive complexity 37 (threshold 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.
CSharpResolver.GetExtensionMethods (cognitive 36) ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:2023— CSharpResolver.GetExtensionMethods has cognitive complexity 36 (threshold 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.
IdStringProvider.FindMemberInType (cognitive 36) ICSharpCode.Decompiler/Documentation/IdStringProvider.cs:959— IdStringProvider.FindMemberInType has cognitive complexity 36 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
Analyzer.GetInvocationEscapeToWritableArgument (cognitive 36) ICSharpCode.Decompiler/IL/Transforms/IntroduceScopedModifierOnLocals.cs:563— Analyzer.GetInvocationEscapeToWritableArgument has cognitive complexity 36 (threshold 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.
PatternMatchingTransform.PatternMatchRefTypes (cognitive 36) ICSharpCode.Decompiler/IL/Transforms/PatternMatchingTransform.cs:88— PatternMatchingTransform.PatternMatchRefTypes has cognitive complexity 36 (threshold 15). 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.
ReduceNestingTransform.ComputeStats (cognitive 36) ICSharpCode.Decompiler/IL/Transforms/ReduceNestingTransform.cs:486— ReduceNestingTransform.ComputeStats has cognitive complexity 36 (threshold 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.
MetadataMethod.GetAttributes (cognitive 36) ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataMethod.cs:347— MetadataMethod.GetAttributes has cognitive complexity 36 (threshold 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.
CompareEngine.CalculateDiff (cognitive 36) ILSpy/CompareEngine.cs:224— CompareEngine.CalculateDiff has cognitive complexity 36 (threshold 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.
SharpTreeView.OnKeyDown (cognitive 36) ILSpy/Controls/TreeView/SharpTreeView.cs:462— SharpTreeView.OnKeyDown has cognitive complexity 36 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
MainMenu.AppendRegistryCommands (cognitive 36) ILSpy/Views/MainMenu.axaml.cs:264— MainMenu.AppendRegistryCommands has cognitive complexity 36 (threshold 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.
RequiredNamespaceCollector.CollectNamespaces (cognitive 35) ICSharpCode.Decompiler/CSharp/RequiredNamespaceCollector.cs:79— RequiredNamespaceCollector.CollectNamespaces has cognitive complexity 35 (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.
CSharpResolver.BinaryNumericPromotion (cognitive 35) ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:1016— CSharpResolver.BinaryNumericPromotion has cognitive complexity 35 (threshold 15). 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.
CSharpResolver.ResolveCast (cognitive 35) ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:1348— CSharpResolver.ResolveCast has cognitive complexity 35 (threshold 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.
DetectPinnedRegions.SplitBlocksAtWritesToPinnedLocals (cognitive 35) ICSharpCode.Decompiler/IL/ControlFlow/DetectPinnedRegions.cs:100— DetectPinnedRegions.SplitBlocksAtWritesToPinnedLocals has cognitive complexity 35 (threshold 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.
RuntimeAsyncManualAwaitTransform.DetectRuntimeAsyncManualAwait (cognitive 35) ICSharpCode.Decompiler/IL/ControlFlow/RuntimeAsyncManualAwaitTransform.cs:64— RuntimeAsyncManualAwaitTransform.DetectRuntimeAsyncManualAwait has cognitive complexity 35 (threshold 15). 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.
SymbolicEvaluationContext.Eval (cognitive 35) ICSharpCode.Decompiler/IL/ControlFlow/SymbolicExecution.cs:121— SymbolicEvaluationContext.Eval has cognitive complexity 35 (threshold 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.
IntroduceDynamicTypeOnLocals.Run (cognitive 35) ICSharpCode.Decompiler/IL/Transforms/IntroduceDynamicTypeOnLocals.cs:31— IntroduceDynamicTypeOnLocals.Run has cognitive complexity 35 (threshold 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.
ConnectionIdRewritePass.DecompileConnections (cognitive 34) ICSharpCode.BamlDecompiler/Rewrite/ConnectionIdRewritePass.cs:125— ConnectionIdRewritePass.DecompileConnections has cognitive complexity 34 (threshold 15). Of this number, 33 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RecordDecompiler.IsGeneratedDeconstruct (cognitive 34) ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:1364— RecordDecompiler.IsGeneratedDeconstruct has cognitive complexity 34 (threshold 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.
CSharpConversions.ImplicitConversion (cognitive 34) ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:68— CSharpConversions.ImplicitConversion has cognitive complexity 34 (threshold 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.
CSharpConversions.AnonymousFunctionConversion (cognitive 34) ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:1301— CSharpConversions.AnonymousFunctionConversion has cognitive complexity 34 (threshold 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.
MemberLookup.RemoveInterfaceMembersHiddenByClassMembers (cognitive 34) ICSharpCode.Decompiler/CSharp/Resolver/MemberLookup.cs:642— MemberLookup.RemoveInterfaceMembersHiddenByClassMembers has cognitive complexity 34 (threshold 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.
ReflectionDisassembler.DisassembleMethodHeaderInternal (cognitive 34) ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:172— ReflectionDisassembler.DisassembleMethodHeaderInternal has cognitive complexity 34 (threshold 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.
AsyncAwaitDecompiler.FindYieldBreakTarget (cognitive 34) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:1470— AsyncAwaitDecompiler.FindYieldBreakTarget has cognitive complexity 34 (threshold 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.
DetectPinnedRegions.HandleStringToPointer (cognitive 34) ICSharpCode.Decompiler/IL/ControlFlow/DetectPinnedRegions.cs:880— DetectPinnedRegions.HandleStringToPointer has cognitive complexity 34 (threshold 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.
SwitchOnStringTransform.MatchLegacySwitchOnStringWithHashtable (cognitive 34) ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:891— SwitchOnStringTransform.MatchLegacySwitchOnStringWithHashtable has cognitive complexity 34 (threshold 15). 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.
TransformAssignment.TransformPreIncDecOperatorWithInlineStore (cognitive 34) ICSharpCode.Decompiler/IL/Transforms/TransformAssignment.cs:861— TransformAssignment.TransformPreIncDecOperatorWithInlineStore has cognitive complexity 34 (threshold 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.
TransformExpressionTrees.ConvertComparison (cognitive 34) ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1104— TransformExpressionTrees.ConvertComparison has cognitive complexity 34 (threshold 15). Most of this is not in the body itself: 5 of the 34 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 1131, 1116, 1149, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
GuessFileType.IsUTF8 (cognitive 34) REDACTED:87— GuessFileType.IsUTF8 has cognitive complexity 34 (threshold 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.
InsertParenthesesVisitor.VisitCastExpression (cognitive 33) ICSharpCode.Decompiler/CSharp/OutputVisitor/InsertParenthesesVisitor.cs:253— InsertParenthesesVisitor.VisitCastExpression has cognitive complexity 33 (threshold 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.
DocumentationIdSearch.SplitPath (cognitive 33) ICSharpCode.Decompiler/Documentation/DocumentationIdSearch.cs:202— DocumentationIdSearch.SplitPath has cognitive complexity 33 (threshold 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.
RuntimeAsyncExceptionRewriteTransform.Run (cognitive 33) ICSharpCode.Decompiler/IL/ControlFlow/RuntimeAsyncExceptionRewriteTransform.cs:47— RuntimeAsyncExceptionRewriteTransform.Run has cognitive complexity 33 (threshold 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.
HighLevelLoopTransform.MatchForLoop (cognitive 33) ICSharpCode.Decompiler/IL/Transforms/HighLevelLoopTransform.cs:382— HighLevelLoopTransform.MatchForLoop has cognitive complexity 33 (threshold 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.
TransformExpressionTrees.ConvertCall (cognitive 33) ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:817— TransformExpressionTrees.ConvertCall has cognitive complexity 33 (threshold 15). Of this number, 31 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ApplyAttributeTypeVisitor.VisitParameterizedType (cognitive 33) ICSharpCode.Decompiler/TypeSystem/ApplyAttributeTypeVisitor.cs:256— ApplyAttributeTypeVisitor.VisitParameterizedType has cognitive complexity 33 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
AttributeListBuilder.ConvertMarshalInfo (cognitive 33) ICSharpCode.Decompiler/TypeSystem/Implementation/AttributeListBuilder.cs:105— AttributeListBuilder.ConvertMarshalInfo has cognitive complexity 33 (threshold 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.
MetadataTokenSearchStrategy.Search (cognitive 33) ICSharpCode.ILSpyX/Search/MetadataTokenSearchStrategy.cs:46— MetadataTokenSearchStrategy.Search has cognitive complexity 33 (threshold 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.
SharpTreeNode.SetIsChecked (cognitive 33) ICSharpCode.ILSpyX/TreeView/SharpTreeNode.cs:550— SharpTreeNode.SetIsChecked has cognitive complexity 33 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
CSharpLanguage.GetEntityName (cognitive 33) ILSpy/Languages/CSharpLanguage.cs:127— CSharpLanguage.GetEntityName has cognitive complexity 33 (threshold 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.
CSharpAmbience.WriteMemberDeclarationName (cognitive 32) ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpAmbience.cs:323— CSharpAmbience.WriteMemberDeclarationName has cognitive complexity 32 (threshold 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.
CSharpConversions.GetApplicableConversionOperators (cognitive 32) ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:1169— CSharpConversions.GetApplicableConversionOperators has cognitive complexity 32 (threshold 15). Of this number, 29 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TypeInference.PhaseTwo (cognitive 32) ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:330— TypeInference.PhaseTwo has cognitive complexity 32 (threshold 15). Of this number, 31 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TypeInference.MakeOutputTypeInference (cognitive 32) ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:533— TypeInference.MakeOutputTypeInference has cognitive complexity 32 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
StatementBuilder.VisitLeave (cognitive 32) ICSharpCode.Decompiler/CSharp/StatementBuilder.cs:380— StatementBuilder.VisitLeave has cognitive complexity 32 (threshold 15). Of this number, 17 points are the body's own statements and 15 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InitializerSequence.Analyze (cognitive 32) ICSharpCode.Decompiler/CSharp/Transforms/TransformFieldAndConstructorInitializers.cs:118— InitializerSequence.Analyze has cognitive complexity 32 (threshold 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.
ReflectionDisassembler.WriteTypeParameters (cognitive 32) ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:1755— ReflectionDisassembler.WriteTypeParameters has cognitive complexity 32 (threshold 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.
ILReader.Comparison (cognitive 32) ICSharpCode.Decompiler/IL/ILReader.cs:1921— ILReader.Comparison has cognitive complexity 32 (threshold 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.
TransformCollectionAndObjectInitializers.IsPartOfInitializer (cognitive 32) ICSharpCode.Decompiler/IL/Transforms/TransformCollectionAndObjectInitializers.cs:259— TransformCollectionAndObjectInitializers.IsPartOfInitializer has cognitive complexity 32 (threshold 15). Of this number, 30 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CSharpDecompiler.SetNewModifier (cognitive 31) ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:1709— CSharpDecompiler.SetNewModifier has cognitive complexity 31 (threshold 15). Of this number, 25 points are the body's own statements and 6 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExpressionBuilder.HandleCompoundAssignment (cognitive 31) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:2167— ExpressionBuilder.HandleCompoundAssignment has cognitive complexity 31 (threshold 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.
InsertParenthesesVisitor.GetPrecedence (cognitive 31) ICSharpCode.Decompiler/CSharp/OutputVisitor/InsertParenthesesVisitor.cs:69— InsertParenthesesVisitor.GetPrecedence has cognitive complexity 31 (threshold 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.
AsyncAwaitDecompiler.AnalyzeAwaitBlock (cognitive 31) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:1700— AsyncAwaitDecompiler.AnalyzeAwaitBlock has cognitive complexity 31 (threshold 15). 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.
SwitchAnalysis.AnalyzeBlock (cognitive 31) ICSharpCode.Decompiler/IL/ControlFlow/SwitchAnalysis.cs:117— SwitchAnalysis.AnalyzeBlock has cognitive complexity 31 (threshold 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.
YieldReturnDecompiler.ReconstructTryFinallyBlocks (cognitive 31) ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs:1247— YieldReturnDecompiler.ReconstructTryFinallyBlocks has cognitive complexity 31 (threshold 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.
NumericCompoundAssign.IsBinaryCompatibleWithType (cognitive 31) ICSharpCode.Decompiler/IL/Instructions/CompoundAssignmentInstruction.cs:177— NumericCompoundAssign.IsBinaryCompatibleWithType has cognitive complexity 31 (threshold 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.
IntroduceNativeIntTypeOnLocals.Run (cognitive 31) ICSharpCode.Decompiler/IL/Transforms/IntroduceNativeIntTypeOnLocals.cs:31— IntroduceNativeIntTypeOnLocals.Run has cognitive complexity 31 (threshold 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.
SwitchOnStringTransform.SimplifyCSharp1CascadingIfStatements (cognitive 31) ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:401— SwitchOnStringTransform.SimplifyCSharp1CascadingIfStatements has cognitive complexity 31 (threshold 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.
TransformAssignment.IsCompoundStore (cognitive 31) ICSharpCode.Decompiler/IL/Transforms/TransformAssignment.cs:691— TransformAssignment.IsCompoundStore has cognitive complexity 31 (threshold 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.
TransformDisplayClassUsage.ValidateConstructor (cognitive 31) ICSharpCode.Decompiler/IL/Transforms/TransformDisplayClassUsage.cs:465— TransformDisplayClassUsage.ValidateConstructor has cognitive complexity 31 (threshold 15). 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.
TextTokenWriter.WriteToken (cognitive 31) ICSharpCode.Decompiler/Output/TextTokenWriter.cs:330— TextTokenWriter.WriteToken has cognitive complexity 31 (threshold 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.
DecompilerTextView.GetLineForBookmark (cognitive 31) ILSpy/TextView/DecompilerTextView.axaml.cs:1071— DecompilerTextView.GetLineForBookmark has cognitive complexity 31 (threshold 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.
DocumentationRenderer.AddDocumentationElement (cognitive 31) ILSpy/TextView/DocumentationRenderer.cs:169— DocumentationRenderer.AddDocumentationElement has cognitive complexity 31 (threshold 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.
ExpressionBuilder.TranslateArrayInitializer (cognitive 30) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:3886— ExpressionBuilder.TranslateArrayInitializer has cognitive complexity 30 (threshold 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.
CSharpOutputVisitor.VisitTypeDeclaration (cognitive 30) ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpOutputVisitor.cs:1596— CSharpOutputVisitor.VisitTypeDeclaration has cognitive complexity 30 (threshold 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.
CSharpConversions.IdentityOrVarianceConversion (cognitive 30) ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:610— CSharpConversions.IdentityOrVarianceConversion has cognitive complexity 30 (threshold 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.
CSharpConversions.UserDefinedImplicitConversion (cognitive 30) ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:1010— CSharpConversions.UserDefinedImplicitConversion has cognitive complexity 30 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ReflectionDisassembler.DisassembleType (cognitive 30) ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:1598— ReflectionDisassembler.DisassembleType has cognitive complexity 30 (threshold 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.
LoopDetection.FindExitPoint (cognitive 30) ICSharpCode.Decompiler/IL/ControlFlow/LoopDetection.cs:314— LoopDetection.FindExitPoint has cognitive complexity 30 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ILInlining.NonAggressiveInlineInto (cognitive 30) ICSharpCode.Decompiler/IL/Transforms/ILInlining.cs:648— ILInlining.NonAggressiveInlineInto has cognitive complexity 30 (threshold 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.
TransformArrayInitializers.DoTransform (cognitive 30) ICSharpCode.Decompiler/IL/Transforms/TransformArrayInitializers.cs:61— TransformArrayInitializers.DoTransform has cognitive complexity 30 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
TransformAssignment.TransformPostIncDecOperatorWithInlineStore (cognitive 30) ICSharpCode.Decompiler/IL/Transforms/TransformAssignment.cs:955— TransformAssignment.TransformPostIncDecOperatorWithInlineStore has cognitive complexity 30 (threshold 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.
TransformExpressionTrees.ConvertInstruction (cognitive 30) ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:372— TransformExpressionTrees.ConvertInstruction has cognitive complexity 30 (threshold 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.
TransformExpressionTrees.ConvertListInit (cognitive 30) ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1417— TransformExpressionTrees.ConvertListInit has cognitive complexity 30 (threshold 15). Of this number, 27 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DockWorkspace.OnAssemblyListChanged (cognitive 30) ILSpy/Docking/DockWorkspace.cs:242— DockWorkspace.OnAssemblyListChanged has cognitive complexity 30 (threshold 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.
ConnectionIdRewritePass.MatchEventSetterCreation (cognitive 29) ICSharpCode.BamlDecompiler/Rewrite/ConnectionIdRewritePass.cs:300— ConnectionIdRewritePass.MatchEventSetterCreation has cognitive complexity 29 (threshold 15). 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.
RecordDecompiler.IsGeneratedToString (cognitive 29) ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:1017— RecordDecompiler.IsGeneratedToString has cognitive complexity 29 (threshold 15). 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.
MemberLookup.CreateResult (cognitive 29) ICSharpCode.Decompiler/CSharp/Resolver/MemberLookup.cs:700— MemberLookup.CreateResult has cognitive complexity 29 (threshold 15). Of this number, 28 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OverloadResolution.MapCorrespondingParameters (cognitive 29) ICSharpCode.Decompiler/CSharp/Resolver/OverloadResolution.cs:398— OverloadResolution.MapCorrespondingParameters has cognitive complexity 29 (threshold 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.
AsyncAwaitDecompiler.NormalizeAwaitOnCompletedDualBranch (cognitive 29) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:1569— AsyncAwaitDecompiler.NormalizeAwaitOnCompletedDualBranch has cognitive complexity 29 (threshold 15). 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.
LoopDetection.PrepareReverseCFG (cognitive 29) ICSharpCode.Decompiler/IL/ControlFlow/LoopDetection.cs:535— LoopDetection.PrepareReverseCFG has cognitive complexity 29 (threshold 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.
DeconstructionTransform.MatchNestedTupleDesignations (cognitive 29) ICSharpCode.Decompiler/IL/Transforms/DeconstructionTransform.cs:688— DeconstructionTransform.MatchNestedTupleDesignations has cognitive complexity 29 (threshold 15). Of this number, 22 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TransformAssignment.IsMatchingCompoundLoad (cognitive 29) ICSharpCode.Decompiler/IL/Transforms/TransformAssignment.cs:779— TransformAssignment.IsMatchingCompoundLoad has cognitive complexity 29 (threshold 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.
CSharpInvocationResolveResult.GetArgumentsForCall (cognitive 29) ICSharpCode.Decompiler/Semantics/CSharpInvocationResolveResult.cs:88— CSharpInvocationResolveResult.GetArgumentsForCall has cognitive complexity 29 (threshold 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.
GetMembersHelper.GetNestedTypesImpl (cognitive 29) ICSharpCode.Decompiler/TypeSystem/Implementation/GetMembersHelper.cs:56— GetMembersHelper.GetNestedTypesImpl has cognitive complexity 29 (threshold 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.
SharpTreeNode.UpdateIsVisible (cognitive 29) ICSharpCode.ILSpyX/TreeView/SharpTreeNode.cs:42— SharpTreeNode.UpdateIsVisible has cognitive complexity 29 (threshold 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.
CallBuilder.TokenizeFormatString (cognitive 28) ICSharpCode.Decompiler/CSharp/CallBuilder.cs:942— CallBuilder.TokenizeFormatString has cognitive complexity 28 (threshold 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.
CSharpDecompiler.Decompile (cognitive 28) ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:1446— CSharpDecompiler.Decompile has cognitive complexity 28 (threshold 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.
CSharpDecompiler.DecompileBody (cognitive 28) ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:2369— CSharpDecompiler.DecompileBody has cognitive complexity 28 (threshold 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.
ExpressionBuilder.HandleManagedPointerArithmetic (cognitive 28) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:1441— ExpressionBuilder.HandleManagedPointerArithmetic has cognitive complexity 28 (threshold 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.
ExpressionBuilder.TranslateStackAllocInitializer (cognitive 28) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:3981— ExpressionBuilder.TranslateStackAllocInitializer has cognitive complexity 28 (threshold 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.
RecordDecompiler.IsGeneratedGetHashCode (cognitive 28) ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:1274— RecordDecompiler.IsGeneratedGetHashCode has cognitive complexity 28 (threshold 15). 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.
StatementBuilder.TransformToForeach (cognitive 28) ICSharpCode.Decompiler/CSharp/StatementBuilder.cs:763— StatementBuilder.TransformToForeach has cognitive complexity 28 (threshold 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.
TypeSystemAstBuilder.ConvertConstantValue (cognitive 28) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:999— TypeSystemAstBuilder.ConvertConstantValue has cognitive complexity 28 (threshold 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.
PatternStatementTransform.TransformForeachOnMultiDimArray (cognitive 28) ICSharpCode.Decompiler/CSharp/Transforms/PatternStatementTransform.cs:624— PatternStatementTransform.TransformForeachOnMultiDimArray has cognitive complexity 28 (threshold 15). Of this number, 26 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReflectionDisassembler.WriteNativeType (cognitive 28) ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:883— ReflectionDisassembler.WriteNativeType has cognitive complexity 28 (threshold 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.
DetectCatchWhenConditionBlocks.MatchCatchWhenEntryPoint (cognitive 28) ICSharpCode.Decompiler/IL/Transforms/DetectCatchWhenConditionBlocks.cs:220— DetectCatchWhenConditionBlocks.MatchCatchWhenEntryPoint has cognitive complexity 28 (threshold 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.
LocalFunctionDecompiler.DetermineCaptureAndDeclarationScopes (cognitive 28) ICSharpCode.Decompiler/IL/Transforms/LocalFunctionDecompiler.cs:125— LocalFunctionDecompiler.DetermineCaptureAndDeclarationScopes has cognitive complexity 28 (threshold 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.
RemoveDeadVariableInit.Run (cognitive 28) ICSharpCode.Decompiler/IL/Transforms/RemoveDeadVariableInit.cs:37— RemoveDeadVariableInit.Run has cognitive complexity 28 (threshold 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.
UsingTransform.MatchNullCheckOrTypeCheck (cognitive 28) ICSharpCode.Decompiler/IL/Transforms/UsingTransform.cs:417— UsingTransform.MatchNullCheckOrTypeCheck has cognitive complexity 28 (threshold 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.
FunctionPointerType.FromSignature (cognitive 28) ICSharpCode.Decompiler/TypeSystem/FunctionPointerType.cs:32— FunctionPointerType.FromSignature has cognitive complexity 28 (threshold 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.
MetadataModule.GuessFakeMethodAccessor (cognitive 28) ICSharpCode.Decompiler/TypeSystem/MetadataModule.cs:703— MetadataModule.GuessFakeMethodAccessor has cognitive complexity 28 (threshold 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.
LoadedAssembly.LoadCoreAsync (cognitive 28) ICSharpCode.ILSpyX/LoadedAssembly.cs:428— LoadedAssembly.LoadCoreAsync has cognitive complexity 28 (threshold 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.
FlagsSchemaInferer.Build (cognitive 28) ILSpy/Metadata/FlagsSchemaInferer.cs:57— FlagsSchemaInferer.Build has cognitive complexity 28 (threshold 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.
CallBuilder.TransformParamsArgument (cognitive 27) ICSharpCode.Decompiler/CSharp/CallBuilder.cs:1180— CallBuilder.TransformParamsArgument has cognitive complexity 27 (threshold 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.
CallBuilder.HandleAccessorCall (cognitive 27) ICSharpCode.Decompiler/CSharp/CallBuilder.cs:1509— CallBuilder.HandleAccessorCall has cognitive complexity 27 (threshold 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.
Disambiguator.IsUnambiguousCall (cognitive 27) ICSharpCode.Decompiler/CSharp/Disambiguator.cs:681— Disambiguator.IsUnambiguousCall has cognitive complexity 27 (threshold 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.
TypeSystemAstBuilder.ConvertAttributes::CompareAttribute (cognitive 27) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:836— TypeSystemAstBuilder.ConvertAttributes::CompareAttribute has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 3, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TypeSystemAstBuilder.ApplyShortAttributeNameIfPossible (cognitive 27) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:927— TypeSystemAstBuilder.ApplyShortAttributeNameIfPossible has cognitive complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to 2 function literals inside it that branch. The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ILReader.DecodeCall (cognitive 27) ICSharpCode.Decompiler/IL/ILReader.cs:1758— ILReader.DecodeCall has cognitive complexity 27 (threshold 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.
PointerArithmeticOffset.Detect (cognitive 27) ICSharpCode.Decompiler/IL/PointerArithmeticOffset.cs:38— PointerArithmeticOffset.Detect has cognitive complexity 27 (threshold 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.
CSharpHighlightingTokenWriter.WriteKeyword (cognitive 27) ILSpy/Languages/CSharpHighlightingTokenWriter.cs:134— CSharpHighlightingTokenWriter.WriteKeyword has cognitive complexity 27 (threshold 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.
OverloadResolution.BetterParamsCollectionType (cognitive 26) ICSharpCode.Decompiler/CSharp/Resolver/OverloadResolution.cs:848— OverloadResolution.BetterParamsCollectionType has cognitive complexity 26 (threshold 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.
TypeInference.CalculateDependencyMatrix (cognitive 26) ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:482— TypeInference.CalculateDependencyMatrix has cognitive complexity 26 (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.
StatementBuilder.ConvertBlockContainer (cognitive 26) ICSharpCode.Decompiler/CSharp/StatementBuilder.cs:1563— StatementBuilder.ConvertBlockContainer has cognitive complexity 26 (threshold 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.
AddCheckedBlocks.GetResult (cognitive 26) ICSharpCode.Decompiler/CSharp/Transforms/AddCheckedBlocks.cs:355— AddCheckedBlocks.GetResult has cognitive complexity 26 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
PatternStatementTransform.TransformAutomaticProperty (cognitive 26) ICSharpCode.Decompiler/CSharp/Transforms/PatternStatementTransform.cs:759— PatternStatementTransform.TransformAutomaticProperty has cognitive complexity 26 (threshold 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.
SecurityDeclarationDecoder.ResolveType (cognitive 26) ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:587— SecurityDeclarationDecoder.ResolveType has cognitive complexity 26 (threshold 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.
IdStringSignatureTypeProvider.GetGenericInstantiation (cognitive 26) ICSharpCode.Decompiler/Documentation/IdStringProvider.cs:470— IdStringSignatureTypeProvider.GetGenericInstantiation has cognitive complexity 26 (threshold 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.
Dominance.ComputeDominance (cognitive 26) ICSharpCode.Decompiler/FlowAnalysis/Dominance.cs:44— Dominance.ComputeDominance has cognitive complexity 26 (threshold 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.
AsyncAwaitDecompiler.ValidateCatchBlock (cognitive 26) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:1083— AsyncAwaitDecompiler.ValidateCatchBlock has cognitive complexity 26 (threshold 15). 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.
YieldReturnDecompiler.Run (cognitive 26) ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs:121— YieldReturnDecompiler.Run has cognitive complexity 26 (threshold 15). 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.
YieldReturnDecompiler.TranslateFieldsToLocalAccess (cognitive 26) ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs:1151— YieldReturnDecompiler.TranslateFieldsToLocalAccess has cognitive complexity 26 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ILInlining.FindLoadInNext (cognitive 26) ICSharpCode.Decompiler/IL/Transforms/ILInlining.cs:852— ILInlining.FindLoadInNext has cognitive complexity 26 (threshold 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.
ReduceNestingTransform.Visit (cognitive 26) ICSharpCode.Decompiler/IL/Transforms/ReduceNestingTransform.cs:87— ReduceNestingTransform.Visit has cognitive complexity 26 (threshold 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.
TransformDisplayClassUsage.ValidateDisplayClassUses (cognitive 26) ICSharpCode.Decompiler/IL/Transforms/TransformDisplayClassUsage.cs:205— TransformDisplayClassUsage.ValidateDisplayClassUses has cognitive complexity 26 (threshold 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.
TransformExpressionTrees.ConvertLogicOperator (cognitive 26) ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1499— TransformExpressionTrees.ConvertLogicOperator has cognitive complexity 26 (threshold 15). Most of this is not in the body itself: 10 of the 26 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 1541, 1514, 1525). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
TypeParameterSubstitution.ToString (cognitive 26) ICSharpCode.Decompiler/TypeSystem/TypeParameterSubstitution.cs:223— TypeParameterSubstitution.ToString has cognitive complexity 26 (threshold 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.
CompareEngine.CreateEntityTree (cognitive 26) ILSpy/CompareEngine.cs:50— CompareEngine.CreateEntityTree has cognitive complexity 26 (threshold 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.
SelectCtorTransform.Run (cognitive 26) ILSpy/Languages/CSharpLanguage.cs:655— SelectCtorTransform.Run has cognitive complexity 26 (threshold 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.
PropertyWithExtensionHandler.Translate (cognitive 25) ICSharpCode.BamlDecompiler/Handlers/Records/PropertyWithExtensionHandler.cs:34— PropertyWithExtensionHandler.Translate has cognitive complexity 25 (threshold 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.
OverloadResolution.AddMethodLists (cognitive 25) ICSharpCode.Decompiler/CSharp/Resolver/OverloadResolution.cs:337— OverloadResolution.AddMethodLists has cognitive complexity 25 (threshold 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.
DocumentationIdSearch.CollectMembers (cognitive 25) ICSharpCode.Decompiler/Documentation/DocumentationIdSearch.cs:345— DocumentationIdSearch.CollectMembers has cognitive complexity 25 (threshold 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.
IdStringProvider.ResolveTypeInModule (cognitive 25) ICSharpCode.Decompiler/Documentation/IdStringProvider.cs:1143— IdStringProvider.ResolveTypeInModule has cognitive complexity 25 (threshold 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.
AsyncAwaitDecompiler.AnalyzeMoveNext (cognitive 25) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:798— AsyncAwaitDecompiler.AnalyzeMoveNext has cognitive complexity 25 (threshold 15). 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.
ControlFlowSimplification.SimplifyBranchChains (cognitive 25) ICSharpCode.Decompiler/IL/ControlFlow/ControlFlowSimplification.cs:138— ControlFlowSimplification.SimplifyBranchChains has cognitive complexity 25 (threshold 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.
DetectPinnedRegions.DetectNullSafeArrayToPointerOrCustomRefPin (cognitive 25) ICSharpCode.Decompiler/IL/ControlFlow/DetectPinnedRegions.cs:159— DetectPinnedRegions.DetectNullSafeArrayToPointerOrCustomRefPin has cognitive complexity 25 (threshold 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.
DeconstructionTransform.MatchNestedDeconstructions (cognitive 25) ICSharpCode.Decompiler/IL/Transforms/DeconstructionTransform.cs:576— DeconstructionTransform.MatchNestedDeconstructions has cognitive complexity 25 (threshold 15). Of this number, 16 points are the body's own statements and 9 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TransformAssignment.MatchingGetterAndSetterCalls (cognitive 25) ICSharpCode.Decompiler/IL/Transforms/TransformAssignment.cs:276— TransformAssignment.MatchingGetterAndSetterCalls has cognitive complexity 25 (threshold 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.
TransformDisplayClassUsage.AnalyzeFunction (cognitive 25) ICSharpCode.Decompiler/IL/Transforms/TransformDisplayClassUsage.cs:137— TransformDisplayClassUsage.AnalyzeFunction has cognitive complexity 25 (threshold 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.
GetMembersHelper.GetMethodsImpl (cognitive 25) ICSharpCode.Decompiler/TypeSystem/Implementation/GetMembersHelper.cs:130— GetMembersHelper.GetMethodsImpl has cognitive complexity 25 (threshold 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.
PropertyCustomHandler.Deserialize (cognitive 24) ICSharpCode.BamlDecompiler/Handlers/Records/PropertyCustomHandler.cs:48— PropertyCustomHandler.Deserialize has cognitive complexity 24 (threshold 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.
ExpressionBuilder.ConvertField (cognitive 24) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:329— ExpressionBuilder.ConvertField has cognitive complexity 24 (threshold 15). 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.
ExpressionBuilder.BuildArrayInitializerExpression (cognitive 24) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:3734— ExpressionBuilder.BuildArrayInitializerExpression has cognitive complexity 24 (threshold 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.
OverloadResolution.RunTypeInference (cognitive 24) ICSharpCode.Decompiler/CSharp/Resolver/OverloadResolution.cs:454— OverloadResolution.RunTypeInference has cognitive complexity 24 (threshold 15). Of this number, 22 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RuntimeAsyncExceptionRewriteTransform.TryRewriteTryCatch (cognitive 24) ICSharpCode.Decompiler/IL/ControlFlow/RuntimeAsyncExceptionRewriteTransform.cs:592— RuntimeAsyncExceptionRewriteTransform.TryRewriteTryCatch has cognitive complexity 24 (threshold 15). 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.
ILReader.ReadBlock (cognitive 24) ICSharpCode.Decompiler/IL/ILReader.cs:520— ILReader.ReadBlock has cognitive complexity 24 (threshold 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.
ExpressionTransforms.TransformCatchVariable (cognitive 24) ICSharpCode.Decompiler/IL/Transforms/ExpressionTransforms.cs:961— ExpressionTransforms.TransformCatchVariable has cognitive complexity 24 (threshold 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.
StatementTransform.Run (cognitive 24) ICSharpCode.Decompiler/IL/Transforms/StatementTransform.cs:113— StatementTransform.Run has cognitive complexity 24 (threshold 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.
SwitchOnNullableTransform.MatchRoslynSwitchOnNullable (cognitive 24) ICSharpCode.Decompiler/IL/Transforms/SwitchOnNullableTransform.cs:136— SwitchOnNullableTransform.MatchRoslynSwitchOnNullable has cognitive complexity 24 (threshold 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.
MixedMethodBodyDisassembler.WriteInstruction (cognitive 24) ILSpy/Languages/CSharpILMixedLanguage.cs:125— MixedMethodBodyDisassembler.WriteInstruction has cognitive complexity 24 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ConnectionIdRewritePass.ProcessConnectionIds (cognitive 23) ICSharpCode.BamlDecompiler/Rewrite/ConnectionIdRewritePass.cs:48— ConnectionIdRewritePass.ProcessConnectionIds has cognitive complexity 23 (threshold 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.
AutoEventDecompiler.MatchSimpleCombineAssignment (cognitive 23) ICSharpCode.Decompiler/CSharp/AutoEventDecompiler.cs:353— AutoEventDecompiler.MatchSimpleCombineAssignment has cognitive complexity 23 (threshold 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.
CallBuilder.TryUseExtensionMethodSyntax (cognitive 23) ICSharpCode.Decompiler/CSharp/CallBuilder.cs:1294— CallBuilder.TryUseExtensionMethodSyntax has cognitive complexity 23 (threshold 15). 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.
ExpressionBuilder.VisitDeconstructInstruction (cognitive 23) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:5229— ExpressionBuilder.VisitDeconstructInstruction has cognitive complexity 23 (threshold 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.
CSharpResolver.LookInCurrentType (cognitive 23) ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:1565— CSharpResolver.LookInCurrentType has cognitive complexity 23 (threshold 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.
OverloadResolution.GetArgumentsWithConversions (cognitive 23) ICSharpCode.Decompiler/CSharp/Resolver/OverloadResolution.cs:1120— OverloadResolution.GetArgumentsWithConversions has cognitive complexity 23 (threshold 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.
TypeSystemAstBuilder.ConvertMethod (cognitive 23) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2494— TypeSystemAstBuilder.ConvertMethod has cognitive complexity 23 (threshold 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.
RuntimeAsyncExceptionRewriteTransform.MatchIfChainDispatch (cognitive 23) ICSharpCode.Decompiler/IL/ControlFlow/RuntimeAsyncExceptionRewriteTransform.cs:859— RuntimeAsyncExceptionRewriteTransform.MatchIfChainDispatch has cognitive complexity 23 (threshold 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.
SwitchDetection.InlineSwitchExpressionDefaultCaseThrowHelper (cognitive 23) ICSharpCode.Decompiler/IL/ControlFlow/SwitchDetection.cs:236— SwitchDetection.InlineSwitchExpressionDefaultCaseThrowHelper has cognitive complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ILReader.Cast (cognitive 23) ICSharpCode.Decompiler/IL/ILReader.cs:1425— ILReader.Cast has cognitive complexity 23 (threshold 15). 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.
CachedDelegateInitialization.Run (cognitive 23) ICSharpCode.Decompiler/IL/Transforms/CachedDelegateInitialization.cs:29— CachedDelegateInitialization.Run has cognitive complexity 23 (threshold 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.
IndexMethods.IndexMethods.ctor (cognitive 23) ICSharpCode.Decompiler/IL/Transforms/IndexRangeTransform.cs:96— IndexMethods.IndexMethods.ctor has cognitive complexity 23 (threshold 15). Of this number, 21 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LocalFunctionDecompiler.DetermineCaptureAndDeclarationScope (cognitive 23) ICSharpCode.Decompiler/IL/Transforms/LocalFunctionDecompiler.cs:710— LocalFunctionDecompiler.DetermineCaptureAndDeclarationScope has cognitive complexity 23 (threshold 15). 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.
NullableLiftingTransform.LiftNormal (cognitive 23) ICSharpCode.Decompiler/IL/Transforms/NullableLiftingTransform.cs:771— NullableLiftingTransform.LiftNormal has cognitive complexity 23 (threshold 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.
ProxyCallReplacer.Run (cognitive 23) ICSharpCode.Decompiler/IL/Transforms/ProxyCallReplacer.cs:38— ProxyCallReplacer.Run has cognitive complexity 23 (threshold 15). 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.
TransformExpressionTrees.ConvertNewObject (cognitive 23) ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1762— TransformExpressionTrees.ConvertNewObject has cognitive complexity 23 (threshold 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.
MetadataMethod.MetadataMethod.ctor (cognitive 23) ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataMethod.cs:56— MetadataMethod.MetadataMethod.ctor has cognitive complexity 23 (threshold 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.
LoadedAssembly.Text.get (cognitive 23) ICSharpCode.ILSpyX/LoadedAssembly.cs:309— LoadedAssembly.Text.get has cognitive complexity 23 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
Lexer.Next (cognitive 23) ICSharpCode.ILSpyX/Search/CSharpLexer.cs:411— Lexer.Next has cognitive complexity 23 (threshold 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.
CompiledFilter.Compile (cognitive 23) ILSpy/Metadata/CompiledFilter.cs:46— CompiledFilter.Compile has cognitive complexity 23 (threshold 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.
BamlNode.Parse (cognitive 22) ICSharpCode.BamlDecompiler/Baml/BamlNode.cs:110— BamlNode.Parse has cognitive complexity 22 (threshold 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.
XamlType.ResolveNamespace (cognitive 22) ICSharpCode.BamlDecompiler/Xaml/XamlType.cs:57— XamlType.ResolveNamespace has cognitive complexity 22 (threshold 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.
CSharpDecompiler.DoDecompile (cognitive 22) ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:2229— CSharpDecompiler.DoDecompile has cognitive complexity 22 (threshold 15). 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.
ExpressionBuilder.HandlePointerArithmetic (cognitive 22) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:1355— ExpressionBuilder.HandlePointerArithmetic has cognitive complexity 22 (threshold 15). 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.
ExpressionBuilder.VisitStObj (cognitive 22) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:3176— ExpressionBuilder.VisitStObj has cognitive complexity 22 (threshold 15). 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.
CSharpResolver.CreateParameters (cognitive 22) ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:2299— CSharpResolver.CreateParameters has cognitive complexity 22 (threshold 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.
StatementBuilder.CanBeDeconstructedInForeach (cognitive 22) ICSharpCode.Decompiler/CSharp/StatementBuilder.cs:1124— StatementBuilder.CanBeDeconstructedInForeach has cognitive complexity 22 (threshold 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.
TypeSystemAstBuilder.ConvertAttribute (cognitive 22) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:772— TypeSystemAstBuilder.ConvertAttribute has cognitive complexity 22 (threshold 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.
DeclareVariables.ResolveCollisions (cognitive 22) ICSharpCode.Decompiler/CSharp/Transforms/DeclareVariables.cs:468— DeclareVariables.ResolveCollisions has cognitive complexity 22 (threshold 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.
DeclareVariables.InsertDeconstructionVariableDeclarations (cognitive 22) ICSharpCode.Decompiler/CSharp/Transforms/DeclareVariables.cs:536— DeclareVariables.InsertDeconstructionVariableDeclarations has cognitive complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReflectionDisassembler.WriteParameters (cognitive 22) ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:1107— ReflectionDisassembler.WriteParameters has cognitive complexity 22 (threshold 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.
LoopDetection.ExtendLoop (cognitive 22) ICSharpCode.Decompiler/IL/ControlFlow/LoopDetection.cs:251— LoopDetection.ExtendLoop has cognitive complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TransformExpressionTrees.ConvertValue (cognitive 22) ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:2114— TransformExpressionTrees.ConvertValue has cognitive complexity 22 (threshold 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.
MethodGroupResolveResult.PerformOverloadResolution (cognitive 22) ICSharpCode.Decompiler/Semantics/MethodGroupResolveResult.cs:247— MethodGroupResolveResult.PerformOverloadResolution has cognitive complexity 22 (threshold 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.
DecompilerTypeSystem.RepairCyclicTypeForwardersAsync (cognitive 22) ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs:315— DecompilerTypeSystem.RepairCyclicTypeForwardersAsync has cognitive complexity 22 (threshold 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.
MetadataTypeDefinition.GetFilteredAccessors (cognitive 22) ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataTypeDefinition.cs:750— MetadataTypeDefinition.GetFilteredAccessors has cognitive complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
XamlPathDeserializer.Deserialize (cognitive 21) ICSharpCode.BamlDecompiler/Xaml/XamlPathDeserializer.cs:89— XamlPathDeserializer.Deserialize has cognitive complexity 21 (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.
CSharpDecompiler.DoDecompile (cognitive 21) ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:2685— CSharpDecompiler.DoDecompile has cognitive complexity 21 (threshold 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.
ExpressionBuilder.VisitLdFlda (cognitive 21) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:3326— ExpressionBuilder.VisitLdFlda has cognitive complexity 21 (threshold 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.
ExpressionBuilder.VisitSwitchInstruction (cognitive 21) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:4410— ExpressionBuilder.VisitSwitchInstruction has cognitive complexity 21 (threshold 15). 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.
TypeInference.MakeExactInference (cognitive 21) ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:646— TypeInference.MakeExactInference has cognitive complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
TypeSystemAstBuilder.IsSpecialConstant (cognitive 21) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:1169— TypeSystemAstBuilder.IsSpecialConstant has cognitive complexity 21 (threshold 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.
TypeSystemAstBuilder.ConvertTypeParameterConstraint (cognitive 21) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2744— TypeSystemAstBuilder.ConvertTypeParameterConstraint has cognitive complexity 21 (threshold 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.
PatternStatementTransform.TransformForeachOnInlineArray (cognitive 21) ICSharpCode.Decompiler/CSharp/Transforms/PatternStatementTransform.cs:456— PatternStatementTransform.TransformForeachOnInlineArray has cognitive complexity 21 (threshold 15). 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.
PatternStatementTransform.TransformFieldBackedProperty (cognitive 21) ICSharpCode.Decompiler/CSharp/Transforms/PatternStatementTransform.cs:852— PatternStatementTransform.TransformFieldBackedProperty has cognitive complexity 21 (threshold 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.
ReflectionDisassembler.TryDecodeSecurityDeclaration (cognitive 21) ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:678— ReflectionDisassembler.TryDecodeSecurityDeclaration has cognitive complexity 21 (threshold 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.
AwaitInCatchTransform.MatchExceptionCaptureBlock (cognitive 21) ICSharpCode.Decompiler/IL/ControlFlow/AwaitInCatchTransform.cs:421— AwaitInCatchTransform.MatchExceptionCaptureBlock has cognitive complexity 21 (threshold 15). 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.
YieldReturnDecompiler.CleanSkipFinallyBodies (cognitive 21) ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs:1409— YieldReturnDecompiler.CleanSkipFinallyBodies has cognitive complexity 21 (threshold 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.
DeconstructInstruction.CheckInvariant (cognitive 21) ICSharpCode.Decompiler/IL/Instructions/DeconstructInstruction.cs:274— DeconstructInstruction.CheckInvariant has cognitive complexity 21 (threshold 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.
DelegateConstruction.TryUnwrapVisualBasicDelegateWrapper (cognitive 21) ICSharpCode.Decompiler/IL/Transforms/DelegateConstruction.cs:264— DelegateConstruction.TryUnwrapVisualBasicDelegateWrapper has cognitive complexity 21 (threshold 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.
ILInlining.DoInline (cognitive 21) ICSharpCode.Decompiler/IL/Transforms/ILInlining.cs:248— ILInlining.DoInline has cognitive complexity 21 (threshold 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.
IndexRangeTransform.HandleLdElema (cognitive 21) ICSharpCode.Decompiler/IL/Transforms/IndexRangeTransform.cs:36— IndexRangeTransform.HandleLdElema has cognitive complexity 21 (threshold 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.
InlineArrayTransform.MatchSpanIndexerWithInlineArrayAsSpan (cognitive 21) ICSharpCode.Decompiler/IL/Transforms/InlineArrayTransform.cs:85— InlineArrayTransform.MatchSpanIndexerWithInlineArrayAsSpan has cognitive complexity 21 (threshold 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.
Analyzer.GetInvocationEscapeWithUpdatedRules (cognitive 21) ICSharpCode.Decompiler/IL/Transforms/IntroduceScopedModifierOnLocals.cs:479— Analyzer.GetInvocationEscapeWithUpdatedRules has cognitive complexity 21 (threshold 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.
ReduceNestingTransform.ReduceSwitchNesting (cognitive 21) ICSharpCode.Decompiler/IL/Transforms/ReduceNestingTransform.cs:297— ReduceNestingTransform.ReduceSwitchNesting has cognitive complexity 21 (threshold 15). 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.
SwitchOnStringTransform.ScanHashtableInitializerBlocks (cognitive 21) ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:131— SwitchOnStringTransform.ScanHashtableInitializerBlocks has cognitive complexity 21 (threshold 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.
SwitchOnStringTransform.MatchStringEqualityComparison (cognitive 21) ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:1754— SwitchOnStringTransform.MatchStringEqualityComparison has cognitive complexity 21 (threshold 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.
ApplyAttributeTypeVisitor.VisitTypeDefinition (cognitive 21) ICSharpCode.Decompiler/TypeSystem/ApplyAttributeTypeVisitor.cs:365— ApplyAttributeTypeVisitor.VisitTypeDefinition has cognitive complexity 21 (threshold 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.
MetadataMethod.DecodeSignature (cognitive 21) ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataMethod.cs:226— MetadataMethod.DecodeSignature has cognitive complexity 21 (threshold 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.
InheritanceHelper.GetBaseMembers (cognitive 21) ICSharpCode.Decompiler/TypeSystem/InheritanceHelper.cs:50— InheritanceHelper.GetBaseMembers has cognitive complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AssemblyListSnapshot.EnumerateAllAssembliesAsync (cognitive 21) ICSharpCode.ILSpyX/AssemblyListSnapshot.cs:189— AssemblyListSnapshot.EnumerateAllAssembliesAsync has cognitive complexity 21 (threshold 15). Most of this is not in the body itself: 10 of the 21 points are its own statements and the rest belongs to one function item inside it that branches (EnumerateDescendants). 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.
ExtractPackageEntryContextMenuEntry.CollectAllFiles (cognitive 21) ILSpy/Commands/ExtractPackageEntryContextMenuEntry.cs:144— ExtractPackageEntryContextMenuEntry.CollectAllFiles has cognitive complexity 21 (threshold 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.
DockWorkspace.OnNavigateRequested (cognitive 21) ILSpy/Docking/DockWorkspace.cs:661— DockWorkspace.OnNavigateRequested has cognitive complexity 21 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
MetadataColumnBuilder.BuildHeader (cognitive 21) ILSpy/Metadata/MetadataColumnBuilder.cs:130— MetadataColumnBuilder.BuildHeader has cognitive complexity 21 (threshold 15). Of this number, 16 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body: 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.
DecompilerTabPageModel.DecompileAsync (cognitive 21) ILSpy/TextView/DecompilerTabPageModel.cs:553— DecompilerTabPageModel.DecompileAsync has cognitive complexity 21 (threshold 15). Of this number, 11 points are the body's own statements and 10 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MainMenu.AppendTabSection (cognitive 21) ILSpy/Views/MainMenu.axaml.cs:382— MainMenu.AppendTabSection has cognitive complexity 21 (threshold 15). Most of this is not in the body itself: 6 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 441). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
ManageAssemblyListsDialog.GetPreconfiguredAssemblyLists (cognitive 21) ILSpy/Views/ManageAssemblyListsDialog.axaml.cs:201— ManageAssemblyListsDialog.GetPreconfiguredAssemblyLists has cognitive complexity 21 (threshold 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.
CallBuilder.HandleRangeConstruction (cognitive 20) ICSharpCode.Decompiler/CSharp/CallBuilder.cs:1898— CallBuilder.HandleRangeConstruction has cognitive complexity 20 (threshold 15). 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.
CSharpDecompiler.DetectBestEnumValueDisplayMode (cognitive 20) ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:2168— CSharpDecompiler.DetectBestEnumValueDisplayMode has cognitive complexity 20 (threshold 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.
InsertParenthesesVisitor.VisitBinaryOperatorExpression (cognitive 20) ICSharpCode.Decompiler/CSharp/OutputVisitor/InsertParenthesesVisitor.cs:323— InsertParenthesesVisitor.VisitBinaryOperatorExpression has cognitive complexity 20 (threshold 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.
CSharpResolver.IsEligibleExtensionMethod (cognitive 20) ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:2091— CSharpResolver.IsEligibleExtensionMethod has cognitive complexity 20 (threshold 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.
CSharpResolver.ResolveConditional (cognitive 20) ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:2627— CSharpResolver.ResolveConditional has cognitive complexity 20 (threshold 15). 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.
StatementBuilder.VisitPinnedRegion (cognitive 20) ICSharpCode.Decompiler/CSharp/StatementBuilder.cs:1235— StatementBuilder.VisitPinnedRegion has cognitive complexity 20 (threshold 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.
FixNameCollisions.Run (cognitive 20) ICSharpCode.Decompiler/CSharp/Transforms/FixNameCollisions.cs:39— FixNameCollisions.Run has cognitive complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TranslatedExpression.ConvertToBoolean (cognitive 20) ICSharpCode.Decompiler/CSharp/TranslatedExpression.cs:750— TranslatedExpression.ConvertToBoolean has cognitive complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XmlDocumentationProvider.GetDocumentation (cognitive 20) REDACTED:354— XmlDocumentationProvider.GetDocumentation has cognitive complexity 20 (threshold 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.
AsyncAwaitDecompiler.TranslateThisCopyAccess (cognitive 20) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:226— AsyncAwaitDecompiler.TranslateThisCopyAccess has cognitive complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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.
DetectPinnedRegions.IsNullSafeArrayToPointerNotNullBlock (cognitive 20) ICSharpCode.Decompiler/IL/ControlFlow/DetectPinnedRegions.cs:407— DetectPinnedRegions.IsNullSafeArrayToPointerNotNullBlock has cognitive complexity 20 (threshold 15). 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.
RuntimeAsyncExceptionRewriteTransform.NormalizeRuntimeAsyncFilter (cognitive 20) ICSharpCode.Decompiler/IL/ControlFlow/RuntimeAsyncExceptionRewriteTransform.cs:141— RuntimeAsyncExceptionRewriteTransform.NormalizeRuntimeAsyncFilter has cognitive complexity 20 (threshold 15). 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.
RuntimeAsyncExceptionRewriteTransform.TryRewriteTryFinally (cognitive 20) ICSharpCode.Decompiler/IL/ControlFlow/RuntimeAsyncExceptionRewriteTransform.cs:263— RuntimeAsyncExceptionRewriteTransform.TryRewriteTryFinally has cognitive complexity 20 (threshold 15). 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.
SwitchAnalysis.AnalyzeSwitch (cognitive 20) ICSharpCode.Decompiler/IL/ControlFlow/SwitchAnalysis.cs:194— SwitchAnalysis.AnalyzeSwitch has cognitive complexity 20 (threshold 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.
ILReader.CheckOutgoingEdges (cognitive 20) ICSharpCode.Decompiler/IL/ILReader.cs:389— ILReader.CheckOutgoingEdges has cognitive complexity 20 (threshold 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.
DeconstructionTransform.MatchDeconstructionSequence (cognitive 20) ICSharpCode.Decompiler/IL/Transforms/DeconstructionTransform.cs:198— DeconstructionTransform.MatchDeconstructionSequence has cognitive complexity 20 (threshold 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.
DetectCatchWhenConditionBlocks.PropagateExceptionVariable (cognitive 20) ICSharpCode.Decompiler/IL/Transforms/DetectCatchWhenConditionBlocks.cs:146— DetectCatchWhenConditionBlocks.PropagateExceptionVariable has cognitive complexity 20 (threshold 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.
NamedArgumentTransform.CanIntroduceNamedArgument (cognitive 20) ICSharpCode.Decompiler/IL/Transforms/NamedArgumentTransform.cs:43— NamedArgumentTransform.CanIntroduceNamedArgument has cognitive complexity 20 (threshold 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.
NullPropagationTransform.IsFallbackBlock (cognitive 20) ICSharpCode.Decompiler/IL/Transforms/NullPropagationTransform.cs:569— NullPropagationTransform.IsFallbackBlock has cognitive complexity 20 (threshold 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.
TransformExpressionTrees.ConvertBind (cognitive 20) ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:745— TransformExpressionTrees.ConvertBind has cognitive complexity 20 (threshold 15). Of this number, 12 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextTokenWriter.GetCurrentLocalDefinition (cognitive 20) ICSharpCode.Decompiler/Output/TextTokenWriter.cs:219— TextTokenWriter.GetCurrentLocalDefinition has cognitive complexity 20 (threshold 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.
ParameterListComparer.Equals (cognitive 20) ICSharpCode.Decompiler/TypeSystem/ParameterListComparer.cs:55— ParameterListComparer.Equals has cognitive complexity 20 (threshold 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.
ILSpyCmdProgram.GetSettings (cognitive 20) ICSharpCode.ILSpyCmd/IlspyCmdProgram.cs:536— ILSpyCmdProgram.GetSettings has cognitive complexity 20 (threshold 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.
ContextMenuProvider.BuildLevel (cognitive 20) ILSpy/ContextMenuProvider.cs:104— ContextMenuProvider.BuildLevel has cognitive complexity 20 (threshold 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.
AssemblyTreeNode.LoadChildren (cognitive 20) ILSpy/TreeNodes/AssemblyTreeNode.cs:405— AssemblyTreeNode.LoadChildren has cognitive complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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.
ExpressionBuilder.LdObj (cognitive 19) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:3102— ExpressionBuilder.LdObj has cognitive complexity 19 (threshold 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.
ExpressionBuilder.VisitLdFtn (cognitive 19) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:5082— ExpressionBuilder.VisitLdFtn has cognitive complexity 19 (threshold 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.
CSharpOutputVisitor.IsKeyword (cognitive 19) ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpOutputVisitor.cs:411— CSharpOutputVisitor.IsKeyword has cognitive complexity 19 (threshold 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.
CSharpOutputVisitor.VisitIndexerDeclaration (cognitive 19) ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpOutputVisitor.cs:2527— CSharpOutputVisitor.VisitIndexerDeclaration has cognitive complexity 19 (threshold 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.
InsertRequiredSpacesDecorator.WritePrimitiveValue (cognitive 19) ICSharpCode.Decompiler/CSharp/OutputVisitor/InsertRequiredSpacesDecorator.cs:153— InsertRequiredSpacesDecorator.WritePrimitiveValue has cognitive complexity 19 (threshold 15). 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.
RecordDecompiler.DetectOrderFromPrintMembers (cognitive 19) ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:504— RecordDecompiler.DetectOrderFromPrintMembers has cognitive complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, 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.
RecordDecompiler.IsGeneratedEqualityContract (cognitive 19) ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:789— RecordDecompiler.IsGeneratedEqualityContract has cognitive complexity 19 (threshold 15). 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.
CSharpConversions.IsDelegateCompatible (cognitive 19) ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:1464— CSharpConversions.IsDelegateCompatible has cognitive complexity 19 (threshold 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.
MemberLookup.LookupType (cognitive 19) ICSharpCode.Decompiler/CSharp/Resolver/MemberLookup.cs:294— MemberLookup.LookupType has cognitive complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MemberLookup.Lookup (cognitive 19) ICSharpCode.Decompiler/CSharp/Resolver/MemberLookup.cs:359— MemberLookup.Lookup has cognitive complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OverloadResolution.ValidateConstraints (cognitive 19) ICSharpCode.Decompiler/CSharp/Resolver/OverloadResolution.cs:592— OverloadResolution.ValidateConstraints has cognitive complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StatementBuilder.VisitUsingInstruction (cognitive 19) ICSharpCode.Decompiler/CSharp/StatementBuilder.cs:555— StatementBuilder.VisitUsingInstruction has cognitive complexity 19 (threshold 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.
ReflectionDisassembler.WriteModuleHeader (cognitive 19) ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:2119— ReflectionDisassembler.WriteModuleHeader has cognitive complexity 19 (threshold 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.
IdStringProvider.RoslynFormBelongsToSibling (cognitive 19) ICSharpCode.Decompiler/Documentation/IdStringProvider.cs:85— IdStringProvider.RoslynFormBelongsToSibling has cognitive complexity 19 (threshold 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.
MatchInstruction.IsPatternMatch (cognitive 19) ICSharpCode.Decompiler/IL/Instructions/MatchInstruction.cs:122— MatchInstruction.IsPatternMatch has cognitive complexity 19 (threshold 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.
AssignVariableNames.GenerateForeachVariableName (cognitive 19) ICSharpCode.Decompiler/IL/Transforms/AssignVariableNames.cs:997— AssignVariableNames.GenerateForeachVariableName has cognitive complexity 19 (threshold 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.
HighLevelLoopTransform.MatchDoWhileConditionBlock (cognitive 19) ICSharpCode.Decompiler/IL/Transforms/HighLevelLoopTransform.cs:304— HighLevelLoopTransform.MatchDoWhileConditionBlock has cognitive complexity 19 (threshold 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.
DecompiledLambdaResolveResult.IsValid (cognitive 19) ICSharpCode.Decompiler/Semantics/LambdaResolveResult.cs:159— DecompiledLambdaResolveResult.IsValid has cognitive complexity 19 (threshold 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.
MetadataTypeDefinition.MetadataTypeDefinition.ctor (cognitive 19) ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataTypeDefinition.cs:65— MetadataTypeDefinition.MetadataTypeDefinition.ctor has cognitive complexity 19 (threshold 15). 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.
MyAssemblyResolver.ResolveModuleAsync (cognitive 19) ICSharpCode.ILSpyX/LoadedAssembly.cs:722— MyAssemblyResolver.ResolveModuleAsync has cognitive complexity 19 (threshold 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.
AbstractSearchStrategy.IsMatch (cognitive 19) ICSharpCode.ILSpyX/Search/AbstractSearchStrategy.cs:153— AbstractSearchStrategy.IsMatch has cognitive complexity 19 (threshold 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.
Lexer.ReadEscapeSequence (cognitive 19) ICSharpCode.ILSpyX/Search/CSharpLexer.cs:962— Lexer.ReadEscapeSequence has cognitive complexity 19 (threshold 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.
CSharpBracketSearcher.QuickSearchBracketForward (cognitive 19) ILSpy/Languages/CSharpBracketSearcher.cs:365— CSharpBracketSearcher.QuickSearchBracketForward has cognitive complexity 19 (threshold 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.
BamlContext.ConstructContext (cognitive 18) ICSharpCode.BamlDecompiler/Baml/BamlContext.cs:58— BamlContext.ConstructContext has cognitive complexity 18 (threshold 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.
OptimizedStaticResourceHandler.TranslateDefer (cognitive 18) ICSharpCode.BamlDecompiler/Handlers/Records/OptimizedStaticResourceHandler.cs:43— OptimizedStaticResourceHandler.TranslateDefer has cognitive complexity 18 (threshold 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.
CallBuilder.DisambiguateDelegateReference (cognitive 18) ICSharpCode.Decompiler/CSharp/CallBuilder.cs:1778— CallBuilder.DisambiguateDelegateReference has cognitive complexity 18 (threshold 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.
CSharpOutputVisitor.PrintInitializerElements (cognitive 18) ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpOutputVisitor.cs:686— CSharpOutputVisitor.PrintInitializerElements has cognitive complexity 18 (threshold 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.
CSharpOutputVisitor.VisitDocumentationReference (cognitive 18) ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpOutputVisitor.cs:3126— CSharpOutputVisitor.VisitDocumentationReference has cognitive complexity 18 (threshold 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.
MemberLookup.AddNestedTypes (cognitive 18) ICSharpCode.Decompiler/CSharp/Resolver/MemberLookup.cs:496— MemberLookup.AddNestedTypes has cognitive complexity 18 (threshold 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.
ILStructure.AddNestedStructure (cognitive 18) ICSharpCode.Decompiler/Disassembler/ILStructure.cs:169— ILStructure.AddNestedStructure has cognitive complexity 18 (threshold 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.
ReflectionDisassembler.WriteValue (cognitive 18) ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:766— ReflectionDisassembler.WriteValue has cognitive complexity 18 (threshold 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.
AsyncAwaitDecompiler.MatchVisualBasicStateMachineFieldAssignements (cognitive 18) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:540— AsyncAwaitDecompiler.MatchVisualBasicStateMachineFieldAssignements has cognitive complexity 18 (threshold 15). 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.
AsyncAwaitDecompiler.MatchDisposeCombinedTokens (cognitive 18) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:976— AsyncAwaitDecompiler.MatchDisposeCombinedTokens has cognitive complexity 18 (threshold 15). 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.
ControlFlowGraph.CreateEdges (cognitive 18) ICSharpCode.Decompiler/IL/ControlFlow/ControlFlowGraph.cs:99— ControlFlowGraph.CreateEdges has cognitive complexity 18 (threshold 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.
YieldReturnDecompiler.ConstructExceptionTable (cognitive 18) ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs:588— YieldReturnDecompiler.ConstructExceptionTable has cognitive complexity 18 (threshold 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.
AssignVariableNames.GetNameForArgument (cognitive 18) ICSharpCode.Decompiler/IL/Transforms/AssignVariableNames.cs:773— AssignVariableNames.GetNameForArgument has cognitive complexity 18 (threshold 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.
ExpressionTransforms.VisitComp (cognitive 18) ICSharpCode.Decompiler/IL/Transforms/ExpressionTransforms.cs:90— ExpressionTransforms.VisitComp has cognitive complexity 18 (threshold 15). 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.
IndexRangeTransform.MatchGetOffset (cognitive 18) ICSharpCode.Decompiler/IL/Transforms/IndexRangeTransform.cs:707— IndexRangeTransform.MatchGetOffset has cognitive complexity 18 (threshold 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.
NullableLiftingTransform.LiftCSharpEqualityComparison (cognitive 18) ICSharpCode.Decompiler/IL/Transforms/NullableLiftingTransform.cs:533— NullableLiftingTransform.LiftCSharpEqualityComparison has cognitive complexity 18 (threshold 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.
NullableLiftingTransform.LiftCSharpUserEqualityComparison (cognitive 18) ICSharpCode.Decompiler/IL/Transforms/NullableLiftingTransform.cs:640— NullableLiftingTransform.LiftCSharpUserEqualityComparison has cognitive complexity 18 (threshold 15). 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.
ReduceNestingTransform.CanDuplicateExit (cognitive 18) ICSharpCode.Decompiler/IL/Transforms/ReduceNestingTransform.cs:377— ReduceNestingTransform.CanDuplicateExit has cognitive complexity 18 (threshold 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.
SplitVariables.HandleCall (cognitive 18) ICSharpCode.Decompiler/IL/Transforms/SplitVariables.cs:146— SplitVariables.HandleCall has cognitive complexity 18 (threshold 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.
SwitchOnNullableTransform.MatchSwitchOnNullable (cognitive 18) ICSharpCode.Decompiler/IL/Transforms/SwitchOnNullableTransform.cs:78— SwitchOnNullableTransform.MatchSwitchOnNullable has cognitive complexity 18 (threshold 15). 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.
TransformArrayInitializers.HandleCpblkInitializer (cognitive 18) ICSharpCode.Decompiler/IL/Transforms/TransformArrayInitializers.cs:386— TransformArrayInitializers.HandleCpblkInitializer has cognitive complexity 18 (threshold 15). 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.
TransformExpressionTrees.ConvertMemberInit (cognitive 18) ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1572— TransformExpressionTrees.ConvertMemberInit has cognitive complexity 18 (threshold 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.
DecompilerTypeSystem.GetOptions (cognitive 18) ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs:179— DecompilerTypeSystem.GetOptions has cognitive complexity 18 (threshold 15). 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.
TypeSystemExtensions.IsUnmanagedType (cognitive 18) ICSharpCode.Decompiler/TypeSystem/TypeSystemExtensions.cs:275— TypeSystemExtensions.IsUnmanagedType has cognitive complexity 18 (threshold 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.
TypeSystemExtensions.GetElementTypeFromIEnumerable (cognitive 18) ICSharpCode.Decompiler/TypeSystem/TypeSystemExtensions.cs:822— TypeSystemExtensions.GetElementTypeFromIEnumerable has cognitive complexity 18 (threshold 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.
ILSpyCmdProgram.ExtractResource (cognitive 18) ICSharpCode.ILSpyCmd/IlspyCmdProgram.cs:664— ILSpyCmdProgram.ExtractResource has cognitive complexity 18 (threshold 15). 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.
ILSpyCmdProgram.ShowIL (cognitive 18) ICSharpCode.ILSpyCmd/IlspyCmdProgram.cs:737— ILSpyCmdProgram.ShowIL has cognitive complexity 18 (threshold 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.
ILSpyCmdProgram.ShowILAst (cognitive 18) ICSharpCode.ILSpyCmd/IlspyCmdProgram.cs:844— ILSpyCmdProgram.ShowILAst has cognitive complexity 18 (threshold 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.
LiteralSearchStrategy.Search (cognitive 18) ICSharpCode.ILSpyX/Search/LiteralSearchStrategy.cs:79— LiteralSearchStrategy.Search has cognitive complexity 18 (threshold 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.
CSharpLanguage.ToCSharpString (cognitive 18) ILSpy/Languages/CSharpLanguage.cs:200— CSharpLanguage.ToCSharpString has cognitive complexity 18 (threshold 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.
Language.GetEntityName (cognitive 18) ILSpy/Languages/Language.cs:101— Language.GetEntityName has cognitive complexity 18 (threshold 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.
CustomDebugInformationEntry.ParseRowDetails (cognitive 18) ILSpy/Metadata/DebugTables/CustomDebugInformationTableTreeNode.cs:225— CustomDebugInformationEntry.ParseRowDetails has cognitive complexity 18 (threshold 15). 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.
TypeTreeNode.LoadChildren (cognitive 18) ILSpy/TreeNodes/TypeTreeNode.cs:130— TypeTreeNode.LoadChildren has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ImageListDecoder.ExtractFrame (cognitive 18) ILSpy/Util/ImageListDecoder.cs:298— ImageListDecoder.ExtractFrame has cognitive complexity 18 (threshold 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.
DebugStepsPaneModel.ApplyFilter (cognitive 18) ILSpy/ViewModels/DebugStepsPaneModel.cs:301— DebugStepsPaneModel.ApplyFilter has cognitive complexity 18 (threshold 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.
CSharpDecompiler.CleanUpMethodDeclaration (cognitive 17) ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:2548— CSharpDecompiler.CleanUpMethodDeclaration has cognitive complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExpressionBuilder.Translate (cognitive 17) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:166— ExpressionBuilder.Translate has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ExpressionBuilder.HandlePointerSubtraction (cognitive 17) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:1600— ExpressionBuilder.HandlePointerSubtraction has cognitive complexity 17 (threshold 15). 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.
ExpressionBuilder.AdjustConstantToType (cognitive 17) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:4103— ExpressionBuilder.AdjustConstantToType has cognitive complexity 17 (threshold 15). 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.
CSharpOutputVisitor.VisitPropertyDeclaration (cognitive 17) ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpOutputVisitor.cs:2692— CSharpOutputVisitor.VisitPropertyDeclaration has cognitive complexity 17 (threshold 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.
InsertMissingTokensDecorator.EndNode (cognitive 17) ICSharpCode.Decompiler/CSharp/OutputVisitor/InsertMissingTokensDecorator.cs:82— InsertMissingTokensDecorator.EndNode has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
CSharpConversions.StandardImplicitConversion (cognitive 17) ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:178— CSharpConversions.StandardImplicitConversion has cognitive complexity 17 (threshold 15). 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.
CSharpResolver.LookInUsingScopeNamespace (cognitive 17) ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:1675— CSharpResolver.LookInUsingScopeNamespace has cognitive complexity 17 (threshold 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.
CSharpResolver.ResolveForeach (cognitive 17) ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:1872— CSharpResolver.ResolveForeach has cognitive complexity 17 (threshold 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.
CSharpResolver.ResolveObjectCreation (cognitive 17) ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:2497— CSharpResolver.ResolveObjectCreation has cognitive complexity 17 (threshold 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.
ILParser.SetBranchTargets (cognitive 17) ICSharpCode.Decompiler/Disassembler/ILParser.cs:188— ILParser.SetBranchTargets has cognitive complexity 17 (threshold 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.
ReflectionDisassembler.DisassembleField (cognitive 17) ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:1288— ReflectionDisassembler.DisassembleField has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
IdStringProvider.FindDeclaringTypeOfEvent (cognitive 17) ICSharpCode.Decompiler/Documentation/IdStringProvider.cs:379— IdStringProvider.FindDeclaringTypeOfEvent has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
SwitchDetection.IsSingleCondition (cognitive 17) ICSharpCode.Decompiler/IL/ControlFlow/SwitchDetection.cs:655— SwitchDetection.IsSingleCondition has cognitive complexity 17 (threshold 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.
CachedDelegateInitialization.CachedDelegateInitializationVB (cognitive 17) ICSharpCode.Decompiler/IL/Transforms/CachedDelegateInitialization.cs:230— CachedDelegateInitialization.CachedDelegateInitializationVB has cognitive complexity 17 (threshold 15). 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.
DynamicCallSiteTransform.ExtractArgumentInfo (cognitive 17) ICSharpCode.Decompiler/IL/Transforms/DynamicCallSiteTransform.cs:593— DynamicCallSiteTransform.ExtractArgumentInfo has cognitive complexity 17 (threshold 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.
HighLevelLoopTransform.MatchDoWhileLoop (cognitive 17) ICSharpCode.Decompiler/IL/Transforms/HighLevelLoopTransform.cs:157— HighLevelLoopTransform.MatchDoWhileLoop has cognitive complexity 17 (threshold 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.
IndexRangeTransform.CSharpWillGenerateIndexer (cognitive 17) ICSharpCode.Decompiler/IL/Transforms/IndexRangeTransform.cs:569— IndexRangeTransform.CSharpWillGenerateIndexer has cognitive complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NullPropagationTransform.RunStatements (cognitive 17) ICSharpCode.Decompiler/IL/Transforms/NullPropagationTransform.cs:174— NullPropagationTransform.RunStatements has cognitive complexity 17 (threshold 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.
PatternMatchingTransform.CheckAllUsesDominatedBy (cognitive 17) ICSharpCode.Decompiler/IL/Transforms/PatternMatchingTransform.cs:539— PatternMatchingTransform.CheckAllUsesDominatedBy has cognitive complexity 17 (threshold 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.
SwitchOnStringTransform.ExtractStringValuesFromInitBlock (cognitive 17) ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:797— SwitchOnStringTransform.ExtractStringValuesFromInitBlock has cognitive complexity 17 (threshold 15). 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.
SwitchOnStringTransform.MatchRoslynEmptyStringCaseBlockHead (cognitive 17) ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:1654— SwitchOnStringTransform.MatchRoslynEmptyStringCaseBlockHead has cognitive complexity 17 (threshold 15). 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.
TransformArrayInitializers.HandleJaggedArrayInitializer (cognitive 17) ICSharpCode.Decompiler/IL/Transforms/TransformArrayInitializers.cs:794— TransformArrayInitializers.HandleJaggedArrayInitializer has cognitive complexity 17 (threshold 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.
TransformDisplayClassUsage.DetectDisplayClass (cognitive 17) ICSharpCode.Decompiler/IL/Transforms/TransformDisplayClassUsage.cs:297— TransformDisplayClassUsage.DetectDisplayClass has cognitive complexity 17 (threshold 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.
TransformDisplayClassUsage.HandleMonoStateMachine (cognitive 17) ICSharpCode.Decompiler/IL/Transforms/TransformDisplayClassUsage.cs:711— TransformDisplayClassUsage.HandleMonoStateMachine has cognitive complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TransformExpressionTrees.ReadParameters (cognitive 17) ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:324— TransformExpressionTrees.ReadParameters has cognitive complexity 17 (threshold 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.
TransformExpressionTrees.ConvertCast (cognitive 17) ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1007— TransformExpressionTrees.ConvertCast has cognitive complexity 17 (threshold 15). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1035, 1019). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
UsingTransform.TransformUsing (cognitive 17) ICSharpCode.Decompiler/IL/Transforms/UsingTransform.cs:80— UsingTransform.TransformUsing has cognitive complexity 17 (threshold 15). 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.
SRMExtensions.IsKnownType (cognitive 17) ICSharpCode.Decompiler/SRMExtensions.cs:280— SRMExtensions.IsKnownType has cognitive complexity 17 (threshold 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.
MetadataModule.GetInternalsVisibleTo (cognitive 17) ICSharpCode.Decompiler/TypeSystem/MetadataModule.cs:199— MetadataModule.GetInternalsVisibleTo has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
MetadataModule.FindMinimumAccessibilityForNRT (cognitive 17) ICSharpCode.Decompiler/TypeSystem/MetadataModule.cs:1072— MetadataModule.FindMinimumAccessibilityForNRT has cognitive complexity 17 (threshold 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.
ResourcesFile.ResourcesFile.ctor (cognitive 17) ICSharpCode.Decompiler/Util/ResourcesFile.cs:111— ResourcesFile.ResourcesFile.ctor has cognitive complexity 17 (threshold 15). 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.
TypesParser.ParseSelection (cognitive 17) ICSharpCode.ILSpyCmd/TypesParser.cs:29— TypesParser.ParseSelection has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
MyAssemblyResolver.ResolveCoreAsync (cognitive 17) ICSharpCode.ILSpyX/LoadedAssembly.cs:657— MyAssemblyResolver.ResolveCoreAsync has cognitive complexity 17 (threshold 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.
CompareEngine.MergeTrees (cognitive 17) ILSpy/CompareEngine.cs:173— CompareEngine.MergeTrees has cognitive complexity 17 (threshold 15). 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.
FlagsFilterPopup.OnArrowKeyDown (cognitive 17) ILSpy/Controls/FlagsFilterPopup.cs:120— FlagsFilterPopup.OnArrowKeyDown has cognitive complexity 17 (threshold 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.
DockWorkspace.ShowSelectedNode (cognitive 17) ILSpy/Docking/DockWorkspace.cs:791— DockWorkspace.ShowSelectedNode has cognitive complexity 17 (threshold 15). 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.
FilterStatePresenter.Describe (cognitive 17) ILSpy/Metadata/FilterStatePresenter.cs:32— FilterStatePresenter.Describe has cognitive complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SessionSettings.LoadFromXml (cognitive 17) ILSpy/SessionSettings.cs:138— SessionSettings.LoadFromXml has cognitive complexity 17 (threshold 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.
DecompilerTextView.ToggleFoldingAt (cognitive 17) ILSpy/TextView/DecompilerTextView.axaml.cs:623— DecompilerTextView.ToggleFoldingAt has cognitive complexity 17 (threshold 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.
MarkupExtensionRewritePass.InlineExtension (cognitive 16) ICSharpCode.BamlDecompiler/Rewrite/MarkupExtensionRewritePass.cs:170— MarkupExtensionRewritePass.InlineExtension has cognitive complexity 16 (threshold 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.
XamlExtension.ToString (cognitive 16) ICSharpCode.BamlDecompiler/Xaml/XamlExtension.cs:49— XamlExtension.ToString has cognitive complexity 16 (threshold 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.
AutoEventDecompiler.MatchCompareExchangeLoopMcs (cognitive 16) ICSharpCode.Decompiler/CSharp/AutoEventDecompiler.cs:315— AutoEventDecompiler.MatchCompareExchangeLoopMcs has cognitive complexity 16 (threshold 15). 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.
CallBuilder.Build (cognitive 16) ICSharpCode.Decompiler/CSharp/CallBuilder.cs:219— CallBuilder.Build has cognitive complexity 16 (threshold 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.
CallBuilder.HandleConstructorCall (cognitive 16) ICSharpCode.Decompiler/CSharp/CallBuilder.cs:1614— CallBuilder.HandleConstructorCall has cognitive complexity 16 (threshold 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.
CallBuilder.CanUseDelegateConstruction (cognitive 16) ICSharpCode.Decompiler/CSharp/CallBuilder.cs:1699— CallBuilder.CanUseDelegateConstruction has cognitive complexity 16 (threshold 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.
Disambiguator.CastArguments (cognitive 16) ICSharpCode.Decompiler/CSharp/Disambiguator.cs:897— Disambiguator.CastArguments has cognitive complexity 16 (threshold 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.
ExpressionBuilder.VisitStLoc (cognitive 16) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:855— ExpressionBuilder.VisitStLoc has cognitive complexity 16 (threshold 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.
ExpressionBuilder.HandleShift (cognitive 16) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:1941— ExpressionBuilder.HandleShift has cognitive complexity 16 (threshold 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.
ExpressionBuilder.VisitNullCoalescingInstruction (cognitive 16) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:4147— ExpressionBuilder.VisitNullCoalescingInstruction has cognitive complexity 16 (threshold 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.
RecordDecompiler.DetectOrderFromEquals (cognitive 16) ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:466— RecordDecompiler.DetectOrderFromEquals has cognitive complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CSharpConversions.MethodGroupConversion (cognitive 16) ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:1384— CSharpConversions.MethodGroupConversion has cognitive complexity 16 (threshold 15). 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.
CSharpConversions.IsExactlyMatching (cognitive 16) ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:1639— CSharpConversions.IsExactlyMatching has cognitive complexity 16 (threshold 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.
CSharpConversions.BetterConversionTarget (cognitive 16) ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:1705— CSharpConversions.BetterConversionTarget has cognitive complexity 16 (threshold 15). 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.
TypeInference.PhaseOne (cognitive 16) ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:288— TypeInference.PhaseOne has cognitive complexity 16 (threshold 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.
StatementBuilder.MatchGetEnumeratorPattern (cognitive 16) ICSharpCode.Decompiler/CSharp/StatementBuilder.cs:637— StatementBuilder.MatchGetEnumeratorPattern has cognitive complexity 16 (threshold 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.
Enumerator.MoveNext (cognitive 16) ICSharpCode.Decompiler/CSharp/Syntax/AstNodeCollection.cs:363— Enumerator.MoveNext has cognitive complexity 16 (threshold 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.
DocumentationReference.DoMatch (cognitive 16) ICSharpCode.Decompiler/CSharp/Syntax/DocumentationReference.cs:89— DocumentationReference.DoMatch has cognitive complexity 16 (threshold 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.
TypeSystemAstBuilder.ConvertDelegate (cognitive 16) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2229— TypeSystemAstBuilder.ConvertDelegate has cognitive complexity 16 (threshold 15). 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.
DocumentationIdSearch.Find (cognitive 16) ICSharpCode.Decompiler/Documentation/DocumentationIdSearch.cs:63— DocumentationIdSearch.Find has cognitive complexity 16 (threshold 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.
IdStringProvider.AppendTypeParameters (cognitive 16) ICSharpCode.Decompiler/Documentation/IdStringProvider.cs:695— IdStringProvider.AppendTypeParameters has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
DetectPinnedRegions.IsNullSafeArrayToPointerPattern (cognitive 16) ICSharpCode.Decompiler/IL/ControlFlow/DetectPinnedRegions.cs:362— DetectPinnedRegions.IsNullSafeArrayToPointerPattern has cognitive complexity 16 (threshold 15). 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.
DetectExitPoints.VisitBlockContainer (cognitive 16) ICSharpCode.Decompiler/IL/ControlFlow/ExitPoints.cs:181— DetectExitPoints.VisitBlockContainer has cognitive complexity 16 (threshold 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.
RuntimeAsyncExceptionRewriteTransform.ResolveEarlyReturnValue (cognitive 16) ICSharpCode.Decompiler/IL/ControlFlow/RuntimeAsyncExceptionRewriteTransform.cs:1317— RuntimeAsyncExceptionRewriteTransform.ResolveEarlyReturnValue has cognitive complexity 16 (threshold 15). 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.
DeconstructInstruction.IsAssignment (cognitive 16) ICSharpCode.Decompiler/IL/Instructions/DeconstructInstruction.cs:213— DeconstructInstruction.IsAssignment has cognitive complexity 16 (threshold 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.
CachedDelegateInitialization.CachedDelegateInitializationVBWithClosure (cognitive 16) ICSharpCode.Decompiler/IL/Transforms/CachedDelegateInitialization.cs:303— CachedDelegateInitialization.CachedDelegateInitializationVBWithClosure has cognitive complexity 16 (threshold 15). 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.
DeconstructionTransform.MatchDeconstructionCall (cognitive 16) ICSharpCode.Decompiler/IL/Transforms/DeconstructionTransform.cs:530— DeconstructionTransform.MatchDeconstructionCall has cognitive complexity 16 (threshold 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.
DelegateConstruction.Run (cognitive 16) ICSharpCode.Decompiler/IL/Transforms/DelegateConstruction.cs:38— DelegateConstruction.Run has cognitive complexity 16 (threshold 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.
ExpressionTransforms.TransformDynamicAddAssignOrRemoveAssign (cognitive 16) ICSharpCode.Decompiler/IL/Transforms/ExpressionTransforms.cs:755— ExpressionTransforms.TransformDynamicAddAssignOrRemoveAssign has cognitive complexity 16 (threshold 15). 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.
ILInlining.IsGeneratedTemporaryForAddressOf (cognitive 16) ICSharpCode.Decompiler/IL/Transforms/ILInlining.cs:333— ILInlining.IsGeneratedTemporaryForAddressOf has cognitive complexity 16 (threshold 15). 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.
IndexRangeTransform.MatchSliceLength (cognitive 16) ICSharpCode.Decompiler/IL/Transforms/IndexRangeTransform.cs:750— IndexRangeTransform.MatchSliceLength has cognitive complexity 16 (threshold 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.
LockTransform.MatchExitBlock (cognitive 16) ICSharpCode.Decompiler/IL/Transforms/LockTransform.cs:305— LockTransform.MatchExitBlock has cognitive complexity 16 (threshold 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.
TransformExpressionTrees.ConvertProperty (cognitive 16) ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1878— TransformExpressionTrees.ConvertProperty has cognitive complexity 16 (threshold 15). 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.
AttributeListBuilder.IgnoreAttribute (cognitive 16) ICSharpCode.Decompiler/TypeSystem/Implementation/AttributeListBuilder.cs:211— AttributeListBuilder.IgnoreAttribute has cognitive complexity 16 (threshold 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.
TupleType.GetTupleElementTypes (cognitive 16) ICSharpCode.Decompiler/TypeSystem/TupleType.cs:168— TupleType.GetTupleElementTypes has cognitive complexity 16 (threshold 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.
LongSet.MergeOverlapping (cognitive 16) ICSharpCode.Decompiler/Util/LongSet.cs:169— LongSet.MergeOverlapping has cognitive complexity 16 (threshold 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.
AssemblyTreeModel.RestoreSelectedPathAsync (cognitive 16) ILSpy/AssemblyTree/AssemblyTreeModel.cs:476— AssemblyTreeModel.RestoreSelectedPathAsync has cognitive complexity 16 (threshold 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.
AssemblyTreeModel.NavigateOnLaunchAsync (cognitive 16) ILSpy/AssemblyTree/AssemblyTreeModel.cs:826— AssemblyTreeModel.NavigateOnLaunchAsync has cognitive complexity 16 (threshold 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.
CSharpHighlightingTokenWriter.WriteIdentifier (cognitive 16) ILSpy/Languages/CSharpHighlightingTokenWriter.cs:348— CSharpHighlightingTokenWriter.WriteIdentifier has cognitive complexity 16 (threshold 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.
CSharpLanguage.CollectFieldsAndCtors (cognitive 16) ILSpy/Languages/CSharpLanguage.cs:633— CSharpLanguage.CollectFieldsAndCtors has cognitive complexity 16 (threshold 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.
RunningSearch.RunSearch (cognitive 16) ILSpy/Search/RunningSearch.cs:153— RunningSearch.RunSearch has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D4 · Code Duplication· Edited copy of a member (39 corresponding lines) · ×1
Edited copy of a member (39 corresponding lines) ICSharpCode.BamlDecompiler/Handlers/Records/OptimizedStaticResourceHandler.cs:44— ICSharpCode.BamlDecompiler/Handlers/Records/OptimizedStaticResourceHandler.cs:44-116 | ICSharpCode.BamlDecompiler/Handlers/Records/PropertyWithExtensionHandler.cs:35-122 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (4 members, 50+ identical tokens) ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:724— ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:724-787 | ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:838-1002 | ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:1085-1210 | ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:1275-1362 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Duplicated block (354 lines × 2) ICSharpCode.Decompiler/Util/CSharpPrimitiveCast.cs:51— ICSharpCode.Decompiler/Util/CSharpPrimitiveCast.cs:51-404 | ICSharpCode.Decompiler/Util/CSharpPrimitiveCast.cs:413-766 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (58 lines × 2) ILSpy/Languages/CSharpBracketSearcher.cs:160— ILSpy/Languages/CSharpBracketSearcher.cs:160-217 | ILSpy/Languages/CSharpBracketSearcher.cs:260-317 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ILSpy/Languages/CSharpBracketSearcher.cs:160` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (37 lines × 2) ICSharpCode.BamlDecompiler/Handlers/Records/OptimizedStaticResourceHandler.cs:59— ICSharpCode.BamlDecompiler/Handlers/Records/OptimizedStaticResourceHandler.cs:59-95 | ICSharpCode.BamlDecompiler/Handlers/Records/PropertyWithExtensionHandler.cs:68-104 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (35 lines × 2) ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:701— ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:701-735 | ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1526-1560 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:701` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (26 lines × 2) ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:809— ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:809-834 | ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:913-938 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:809` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–26 lines × 2) ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1281— ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1281-1306 | ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1641-1651 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1641` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (22 lines × 2) ICSharpCode.Decompiler/IL/Transforms/TransformAssignment.cs:879— ICSharpCode.Decompiler/IL/Transforms/TransformAssignment.cs:879-900 | ICSharpCode.Decompiler/IL/Transforms/TransformAssignment.cs:964-985 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/IL/Transforms/TransformAssignment.cs:879` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (23 lines × 2) ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:840— ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:840-862 | ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:944-966 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:840` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21 lines × 2) ICSharpCode.Decompiler/IL/Instructions/PatternMatching.cs:366— ICSharpCode.Decompiler/IL/Instructions/PatternMatching.cs:366-386 | ICSharpCode.Decompiler/IL/Instructions/PatternMatching.cs:449-469 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/IL/Instructions/PatternMatching.cs:366` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21–22 lines × 2) ICSharpCode.Decompiler/Output/TextTokenWriter.cs:119— ICSharpCode.Decompiler/Output/TextTokenWriter.cs:119-140 | ILSpy/Languages/CSharpHighlightingTokenWriter.cs:481-501 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (20 lines × 2) ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:653— ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:653-672 | ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:700-719 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:653` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (19 lines × 2) ILSpy/TreeNodes/IconResourceEntryNode.cs:62— ILSpy/TreeNodes/IconResourceEntryNode.cs:62-80 | ILSpy/TreeNodes/ImageResourceEntryNode.cs:66-84 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `ILSpy/TreeNodes/IconResourceEntryNode.cs:62` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16–17 lines × 2) ICSharpCode.Decompiler/IL/Transforms/DynamicCallSiteTransform.cs:395— ICSharpCode.Decompiler/IL/Transforms/DynamicCallSiteTransform.cs:395-411 | ICSharpCode.Decompiler/IL/Transforms/DynamicCallSiteTransform.cs:473-488 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (14–16 lines × 3) ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:716— ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:716-731 | ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1116-1129 | ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1541-1556 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (15–16 lines × 2) ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1470— ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1470-1484 | ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1608-1623 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1470` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1608` calls `Block` and `ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1470` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 4) ICSharpCode.BamlDecompiler/Handlers/Blocks/PropertyArrayHandler.cs:36— ICSharpCode.BamlDecompiler/Handlers/Blocks/PropertyArrayHandler.cs:36-49 | ICSharpCode.BamlDecompiler/Handlers/Blocks/PropertyComplexHandler.cs:36-49 | ICSharpCode.BamlDecompiler/Handlers/Blocks/PropertyDictionaryHandler.cs:36-49 | ICSharpCode.BamlDecompiler/Handlers/Blocks/PropertyListHandler.cs:36-49 — before extracting anything, compare `ICSharpCode.BamlDecompiler/Handlers/Blocks/PropertyArrayHandler.cs` and `ICSharpCode.BamlDecompiler/Handlers/Blocks/PropertyComplexHandler.cs` as WHOLE FILES: 88% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.BamlDecompiler/Handlers/Blocks/PropertyArrayHandler.cs:36` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (13–14 lines × 4) ICSharpCode.Decompiler/IL/Transforms/DynamicCallSiteTransform.cs:391— ICSharpCode.Decompiler/IL/Transforms/DynamicCallSiteTransform.cs:391-404 | ICSharpCode.Decompiler/IL/Transforms/DynamicCallSiteTransform.cs:469-482 | ICSharpCode.Decompiler/IL/Transforms/DynamicCallSiteTransform.cs:526-538 | ICSharpCode.Decompiler/IL/Transforms/DynamicCallSiteTransform.cs:556-569 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 4) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2388— ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2388-2395 | ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2430-2437 | ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2460-2467 | ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:2480-2487 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9–11 lines × 2) ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:678— ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:678-686 | ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:783-793 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7–10 lines × 2) ICSharpCode.BamlDecompiler/Handlers/Blocks/ElementHandler.cs:36— ICSharpCode.BamlDecompiler/Handlers/Blocks/ElementHandler.cs:36-45 | ICSharpCode.BamlDecompiler/Handlers/Records/StaticResourceStartHandler.cs:43-49 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 4) ICSharpCode.Decompiler/IL/Transforms/DynamicCallSiteTransform.cs:450— ICSharpCode.Decompiler/IL/Transforms/DynamicCallSiteTransform.cs:450-456 | ICSharpCode.Decompiler/IL/Transforms/DynamicCallSiteTransform.cs:489-495 | ICSharpCode.Decompiler/IL/Transforms/DynamicCallSiteTransform.cs:537-543 | ICSharpCode.Decompiler/IL/Transforms/DynamicCallSiteTransform.cs:576-582 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 5) ICSharpCode.BamlDecompiler/Handlers/Blocks/PropertyArrayHandler.cs:36— ICSharpCode.BamlDecompiler/Handlers/Blocks/PropertyArrayHandler.cs:36-42 | ICSharpCode.BamlDecompiler/Handlers/Blocks/PropertyComplexHandler.cs:36-42 | ICSharpCode.BamlDecompiler/Handlers/Blocks/PropertyDictionaryHandler.cs:36-42 | ICSharpCode.BamlDecompiler/Handlers/Blocks/PropertyListHandler.cs:36-42 | ICSharpCode.BamlDecompiler/Handlers/Records/PropertyWithStaticResourceIdHandler.cs:38-44 — before extracting anything, compare `ICSharpCode.BamlDecompiler/Handlers/Blocks/PropertyArrayHandler.cs` and `ICSharpCode.BamlDecompiler/Handlers/Blocks/PropertyComplexHandler.cs` as WHOLE FILES: 88% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 3) ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs:1423— ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs:1423-1429 | ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs:1487-1493 | ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs:1512-1518 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs:1423` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 3) ICSharpCode.Decompiler/TypeSystem/Implementation/SpecializedEvent.cs:29— ICSharpCode.Decompiler/TypeSystem/Implementation/SpecializedEvent.cs:29-37 | ICSharpCode.Decompiler/TypeSystem/Implementation/SpecializedField.cs:29-36 | ICSharpCode.Decompiler/TypeSystem/Implementation/SpecializedProperty.cs:29-36 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/TypeSystem/Implementation/SpecializedEvent.cs:29` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 4) ICSharpCode.Decompiler/TypeSystem/ApplyAttributeTypeVisitor.cs:70— ICSharpCode.Decompiler/TypeSystem/ApplyAttributeTypeVisitor.cs:70-74 | ICSharpCode.Decompiler/TypeSystem/ApplyAttributeTypeVisitor.cs:84-88 | ICSharpCode.Decompiler/TypeSystem/ApplyAttributeTypeVisitor.cs:97-101 | ICSharpCode.Decompiler/TypeSystem/ApplyAttributeTypeVisitor.cs:110-114 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/TypeSystem/ApplyAttributeTypeVisitor.cs:70` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) ILSpy/Metadata/CorTables/EventMapTableTreeNode.cs:46— ILSpy/Metadata/CorTables/EventMapTableTreeNode.cs:46-51 | ILSpy/Metadata/CorTables/NestedClassTableTreeNode.cs:46-51 | ILSpy/Metadata/CorTables/PropertyMapTableTreeNode.cs:46-51 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `ILSpy/Metadata/CorTables/EventMapTableTreeNode.cs:46` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ILSpy/Metadata/CorTables/EventMapTableTreeNode.cs:45` calls `GetTableRowCount` and `ILSpy/Metadata/CorTables/NestedClassTableTreeNode.cs:45` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 3) ICSharpCode.Decompiler/IL/Transforms/CachedDelegateInitialization.cs:125— ICSharpCode.Decompiler/IL/Transforms/CachedDelegateInitialization.cs:125-129 | ICSharpCode.Decompiler/IL/Transforms/CachedDelegateInitialization.cs:166-170 | ICSharpCode.Decompiler/IL/Transforms/CachedDelegateInitialization.cs:198-202 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ICSharpCode.Decompiler/IL/Transforms/CachedDelegateInitialization.cs:125` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (39 lines × 2) ICSharpCode.ILSpyCmd/TypesParser.cs:31— ICSharpCode.Decompiler.PowerShell/TypesParser.cs:32-70 | ICSharpCode.ILSpyCmd/TypesParser.cs:31-69 — `ICSharpCode.Decompiler.PowerShell/TypesParser.cs` and `ICSharpCode.ILSpyCmd/TypesParser.cs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 1 separate duplicated blocks between them, totalling at least 39 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Off the main sequence: ICSharpCode.Decompiler ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj:1— ICSharpCode.Decompiler: abstractness 0.13, instability 0.00, distance 0.87 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
Condition was already decided — an earlier guard makes this test constant ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:624— Control only reaches here when `reader.RemainingBytes < 1` is false, because the guard on line 612 exits otherwise. This test is therefore always false and everything it guards is unreachable. Implement the distinction that was intended, or delete the test.
IC1 · Incompleteness & stubs· Both branches are identical · ×1
Both branches are identical — the condition decides nothing ILSpy/Controls/MutexChipGroup.cs:114— The `if` and its `else` contain the same 1 statement, so no input can make the condition matter. Implement the distinction that was intended, or drop the branch and keep the body.
Third-party script without Subresource Integrity ICSharpCode.ILSpyX/MermaidDiagrammer/html/template.html:191— `https://cdn.jsdelivr.net/npm/mermaid@11.4.0/dist/mermaid.min.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session.
SC1 · Supply-chain hygiene· JavaScript dependencies are not locked · ×1
JavaScript dependencies are not locked — No package-lock.json / yarn.lock / pnpm-lock.yaml / bun.lock — JS installs aren't reproducible (SSDF PW.4.4). Commit your package manager's lockfile and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
Sync-over-async (deadlock risk) through `.Result` ICSharpCode.ILSpyX/LoadedAssembly.cs:374— Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
X18 · Disposal-pattern correctness· Finalizer on a type that owns no unmanaged resource · ×1
Finalizer on a type that owns no unmanaged resource ICSharpCode.Decompiler/Util/ResXResourceWriter.cs:96— `ResXResourceWriter` declares a finalizer (line 96), but nothing in the type is unmanaged: no `IntPtr`/`UIntPtr` or pointer field, no `SafeHandle`, no `HandleRef`, no `extern`/`DllImport` member and no `Marshal`/`GCHandle`/`NativeMemory` use. A finalizer can only release what the garbage collector cannot, so on a purely-managed type it releases nothing and costs something: every instance is put on the finalizer queue, survives at least one extra collection, and is then finalized on a thread that is NOT the disposing one — where the managed objects it touches may already have been finalized themselves. Delete the finalizer (and the `GC.SuppressFinalize` that exists to defuse it); if a handle is added later, wrap it in a `SafeHandle`, which brings its own correct finalization.
X2 · Cancellation propagation· Async local function without CancellationToken · ×1
Async local function without CancellationToken: RunRefresh ILSpy/AssemblyTree/AssemblyTreeModel.cs:1126— Neither takes a CancellationToken nor reads the one of the function it sits in, while it calls something that takes one — this work can't be stopped early once started. Take the token, or pass on the enclosing one.
X27 · Collection changed while being enumerated· Collection is structurally changed while it is being enumerated · ×1
Collection is structurally changed while it is being enumerated ICSharpCode.Decompiler/PartialTypeInfo.cs:77— `info.declaredMembers` is enumerated directly, and line 79 calls `info.declaredMembers.Add(…)` inside the loop body — a structural change to a `HashSet`. The next `MoveNext` throws `InvalidOperationException: Collection was modified; enumeration operation may not execute`, so every pass that reaches this call ends the loop by exception instead of by running out of items, and the remaining items are never seen.
X30 · Support guard that admits what it rejects· Support guard that admits what it rejects · ×1
Support guard that admits what it rejects ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:1734— `!(adjustedRR.IsError || NullableType.GetUnderlyingType(adjustedRR.Type).GetSt...` does not say what its shape suggests. By De Morgan a negated `||` distributes as `!adjustedRR.IsError && NullableType.GetUnderlyingType(adjustedRR.Type).GetStackType() == inst.UnderlyingResultType`, so this guard fires only where `adjustedRR.IsError` is ABSENT — and where `NullableType.GetUnderlyingType(adjustedRR.Type).GetStackType()` is EXACTLY `inst.UnderlyingResultType`, which is the one value the term `NullableType.GetUnderlyingType(adjustedRR.Type).GetStackType() != inst.Underl...` was written to refuse. The two halves disagree about what they are for: `adjustedRR.IsError` names something the code needs, and `NullableType.GetUnderlyingType(adjustedRR.Type).GetStackType() != inst.Underl...` names a value it cannot handle, and one `!(…)` cannot mean both. Everything with a `NullableType.GetUnderlyingType(adjustedRR.Type).GetStackType()` other than `inst.UnderlyingResultType` now passes this guard untested, including the values `adjustedRR.IsError` was there to admit.
X5 · Nullable reference types· Null guard scopes only part of the work it protects · ×1
Null guard scopes only part of the work it protects ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs:542— This method contradicts itself about `asm`: line 512 tests it for null before doing anything with it — the author's own statement that null is an input this code expects — but that `if` scopes only the block beneath it, and line 542 then dereferences `asm` as `asm.Name` AFTER the block has closed, where the guard no longer applies. A null `asm` skips the guarded body and reaches that line anyway, throwing NullReferenceException on exactly the input the guard was written for. If the dereference belongs to the guarded work, move it inside the block; if `asm` truly cannot be null by then, the guard above is misleading and should go.
Duplicated predicate ICSharpCode.ILSpyX/Search/MemberSearchStrategy.cs:115— `!CheckVisibility(@event) || !IsInNamespaceOrAssembly(@event)` appears character-identically in 2 files — ICSharpCode.ILSpyX/Search/MemberSearchStrategy.cs, ICSharpCode.ILSpyX/Search/MetadataTokenSearchStrategy.cs. 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 ICSharpCode.ILSpyX/Search/LiteralSearchStrategy.cs:114— `!CheckVisibility(field) || !IsInNamespaceOrAssembly(field)` appears character-identically in 3 files — ICSharpCode.ILSpyX/Search/LiteralSearchStrategy.cs, ICSharpCode.ILSpyX/Search/MemberSearchStrategy.cs, ICSharpCode.ILSpyX/Search/MetadataTokenSearchStrategy.cs. 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 ICSharpCode.ILSpyX/Search/MemberSearchStrategy.cs:70— `!CheckVisibility(method) || !IsInNamespaceOrAssembly(method)` appears character-identically in 2 files — ICSharpCode.ILSpyX/Search/MemberSearchStrategy.cs, ICSharpCode.ILSpyX/Search/MetadataTokenSearchStrategy.cs. 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 ICSharpCode.ILSpyX/Search/MemberSearchStrategy.cs:100— `!CheckVisibility(property) || !IsInNamespaceOrAssembly(property)` appears character-identically in 2 files — ICSharpCode.ILSpyX/Search/MemberSearchStrategy.cs, ICSharpCode.ILSpyX/Search/MetadataTokenSearchStrategy.cs. 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 ICSharpCode.ILSpyX/Search/MemberSearchStrategy.cs:55— `!CheckVisibility(type) || !IsInNamespaceOrAssembly(type)` appears character-identically in 2 files — ICSharpCode.ILSpyX/Search/MemberSearchStrategy.cs, ICSharpCode.ILSpyX/Search/MetadataTokenSearchStrategy.cs. 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 ILSpy/Controls/MutexChipGroup.cs:192— `!state.MutexSelections.TryGetValue(group.Name, out var sel) || sel is null` appears character-identically in 2 files — ILSpy/Controls/MutexChipGroup.cs, ILSpy/Metadata/FilterStatePresenter.cs. 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 ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs:300— `!typeDef.IsNested && RemoveEmbeddedAttributes.attributeNames.Contains(ns + "." + name)` appears character-identically in 2 files — ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs, ICSharpCode.Decompiler/DebugInfo/PortablePdbWriter.cs. 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 ICSharpCode.Decompiler/CSharp/ProjectDecompiler/TargetServices.cs:175— `(corflags & CorFlags.ILOnly) == 0 && (characteristics & Characteristics.Bit32Machine) != 0` appears character-identically in 2 files — ICSharpCode.Decompiler/CSharp/ProjectDecompiler/TargetServices.cs, ILSpy/Languages/Language.cs. 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 ICSharpCode.Decompiler/Util/BitSet.cs:161— `IsSupersetOf(other) && !SetEquals(other)` appears character-identically in 2 files — ICSharpCode.Decompiler/Util/BitSet.cs, ICSharpCode.Decompiler/Util/LongSet.cs. 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 ICSharpCode.Decompiler/TypeSystem/ByReferenceType.cs:55— `a != null && elementType.Equals(a.elementType)` appears character-identically in 2 files — ICSharpCode.Decompiler/TypeSystem/ByReferenceType.cs, ICSharpCode.Decompiler/TypeSystem/PointerType.cs. 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 ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:827— `body == null || body.Instructions.Count != 1` appears character-identically in 2 files — ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs, ICSharpCode.Decompiler/IL/Transforms/NullPropagationTransform.cs. 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 ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:475— `body == null || body.Instructions.Count == 0` appears character-identically in 2 files — ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs, ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs. 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 ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:3719— `c.Method.FullNameIs("System.Activator", "CreateInstance") && c.Method.TypeArguments.Count == 1` appears character-identically in 2 files — ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs, ICSharpCode.Decompiler/IL/Transforms/TransformCollectionAndObjectInitializers.cs. 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 ICSharpCode.BamlDecompiler/Xaml/XamlUtils.cs:228— `char.IsWhiteSpace(ch) || char.IsControl(ch) || char.IsSurrogate(ch)` appears character-identically in 2 files — ICSharpCode.BamlDecompiler/Xaml/XamlUtils.cs, ICSharpCode.Decompiler/IL/ILAmbience.cs. 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 ILSpy/Commands/SelectPdbContextMenuEntry.cs:56— `context.SelectedTreeNodes?.Length == 1 && context.SelectedTreeNodes[0] is AssemblyTreeNode asm && asm.LoadedAssembly.IsLoadedAsValidAssembly` appears character-identically in 2 files — ILSpy/Commands/SelectPdbContextMenuEntry.cs, ILSpy/Commands/SetTargetFrameworkContextMenuEntry.cs. 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 ICSharpCode.Decompiler/Output/TextTokenWriter.cs:137— `declaringType != null && declaringType.Kind == TypeKind.Delegate` appears character-identically in 2 files — ICSharpCode.Decompiler/Output/TextTokenWriter.cs, ILSpy/Languages/CSharpHighlightingTokenWriter.cs. 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 ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:1089— `declaringType.IsNil && member.Kind == HandleKind.TypeDefinition` appears character-identically in 2 files — ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs, ILSpy/Languages/Language.cs. 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 ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:2259— `doFinallyBodies.StoreInstructions.Count != 0 || doFinallyBodies.AddressCount != 0` appears character-identically in 2 files — ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs, ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs. 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 ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:1147— `f.GetConstantValue() is { } val && (ulong)CSharpPrimitiveCast.Cast(TypeCode.UInt64, val, false) == 0L` appears character-identically in 2 files — ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs, ICSharpCode.Decompiler/CSharp/TranslatedExpression.cs. 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 ICSharpCode.Decompiler/Documentation/DocumentationIdSearch.cs:101— `idString.Length < 2 || idString[1] != ':'` appears character-identically in 2 files — ICSharpCode.Decompiler/Documentation/DocumentationIdSearch.cs, ICSharpCode.Decompiler/Documentation/IdStringProvider.cs. 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 ICSharpCode.Decompiler/CSharp/OutputVisitor/InsertRequiredSpacesDecorator.cs:53— `identifier.IsVerbatim || CSharpOutputVisitor.IsKeyword(identifier.Name, identifier)` appears character-identically in 3 files — ICSharpCode.Decompiler/CSharp/OutputVisitor/InsertRequiredSpacesDecorator.cs, ICSharpCode.Decompiler/CSharp/OutputVisitor/TextWriterTokenWriter.cs, ICSharpCode.Decompiler/Output/TextTokenWriter.cs. 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 ICSharpCode.Decompiler/CSharp/StatementBuilder.cs:1303— `inst != null && PointerArithmeticOffset.IsFixedVariable(inst)` appears character-identically in 2 files — ICSharpCode.Decompiler/CSharp/StatementBuilder.cs, ICSharpCode.Decompiler/CSharp/TranslatedExpression.cs. 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 ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:763— `inst.MatchStFld(out var target, out var field, out var value) && target.MatchLdThis() && value.MatchLdLoc(out var arg) && arg.Kind == Variab…` appears character-identically in 2 files — ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs, ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs. 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 ICSharpCode.BamlDecompiler/Handlers/Records/PropertyWithStaticResourceIdHandler.cs:51— `key != null && record.StaticResourceId >= key.StaticResources.Count` appears character-identically in 2 files — ICSharpCode.BamlDecompiler/Handlers/Records/PropertyWithStaticResourceIdHandler.cs, ICSharpCode.BamlDecompiler/Handlers/Records/StaticResourceIdHandler.cs. 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 ILSpy/TextView/ThemeAwareHighlightingColorizer.cs:70— `lightColor.Foreground is null && lightColor.Background is null` appears character-identically in 2 files — ILSpy/TextView/ThemeAwareHighlightingColorizer.cs, ILSpy/Themes/ThemeManager.cs. 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.
Silent fallback default in catch ICSharpCode.ILSpyX/PdbProvider/PortableDebugInfoProvider.cs:129— `GetSequencePoints` swallows `BadImageFormatException` into `return EmptyList<Decompiler.DebugInfo.SequencePoint>.Instance;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch ICSharpCode.Decompiler/Documentation/XmlDocLoader.cs:235— `SafeGetXmlFiles` swallows every exception into `return Array.Empty<string>();` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch ICSharpCode.Decompiler/SRMExtensions.cs:799— `GetBaseTypeOrNil` swallows `BadImageFormatException` into `return default;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataField.cs:240— `DecodeTypeAndVolatileFlag` swallows `BadImageFormatException` and sets `ty = SpecialType.UnknownType;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch ICSharpCode.ILSpyX/Analyzers/Builtin/FieldAccessAnalyzer.cs:159— `IsUsedInMethod` swallows `BadImageFormatException` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch ICSharpCode.ILSpyX/Analyzers/Builtin/FindTypeInAttributeDecoder.cs:118— `GetTypeFromSerializedName` swallows `ReflectionNameParseException` into `return TokenSearchResult.NoResult;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch ILSpy/ContextMenuProvider.cs:168— `TryParseGesture` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch ILSpy/Processes/DiagnosticsPortScanner.Unix.cs:88— `IsProcessAlive` swallows `Exception` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch ILSpy/Processes/NetFrameworkProcesses.Windows.cs:142— `GetModules` swallows `Exception` into `return Array.Empty<ProcessModuleInfo>();` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch ILSpy/TextView/DecompilerTextEditor.cs:121— `TryGetDisplaySettings` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch ILSpy/TextView/DecompilerTextView.axaml.cs:762— `TryGetDisplaySettings` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch ILSpy/TextView/DecompilerTextView.axaml.cs:821— `TryGetContextMenuEntries` swallows every exception into `return Array.Empty<IContextMenuEntryExport>();` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch ILSpy/TreeNodes/AssemblyTreeNode.cs:280— `TryGetLanguageService` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch ILSpy/TreeNodes/AssemblyTreeNode.cs:534— `TryGetUseNestedNamespaceNodes` swallows every exception into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch ILSpy/TreeNodes/ExtensionTreeNode.cs:112— `TryGetDecompilerSettings` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch ILSpy/TreeNodes/MethodTreeNode.cs:129— `TryGetDecompilerSettings` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch ILSpy/Views/ExportProjectDialog.axaml.cs:235— `TryResolveSettings` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch ILSpy/Views/MetadataTablePage.axaml.cs:174— `TryGetContextMenuEntries` swallows every exception into `return Array.Empty<IContextMenuEntryExport>();` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Commented-out code ICSharpCode.Decompiler/CSharp/AutoEventDecompiler.cs:270— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code ICSharpCode.Decompiler/CSharp/AutoEventDecompiler.cs:272— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code ICSharpCode.Decompiler/CSharp/AutoEventDecompiler.cs:273— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code ICSharpCode.Decompiler/CSharp/AutoEventDecompiler.cs:309— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code ICSharpCode.Decompiler/CSharp/AutoEventDecompiler.cs:311— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:3045— 16 consecutive lines of code sit inside a `/* … */` block — a block of code switched off rather than removed, which rots and confuses. Delete it (version control remembers).
Commented-out code ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:3098— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpFormattingOptions.cs:973— 6 consecutive lines of code sit inside a `/* … */` block — a block of code switched off rather than removed, which rots and confuses. Delete it (version control remembers).
Commented-out code ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpFormattingOptions.cs:980— 30 consecutive lines of code sit inside a `/* … */` block — a block of code switched off rather than removed, which rots and confuses. Delete it (version control remembers).
Commented-out code ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpFormattingOptions.cs:1011— 19 consecutive lines of code sit inside a `/* … */` block — a block of code switched off rather than removed, which rots and confuses. Delete it (version control remembers).
Commented-out code ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpFormattingOptions.cs:1031— 20 consecutive lines of code sit inside a `/* … */` block — a block of code switched off rather than removed, which rots and confuses. Delete it (version control remembers).
Commented-out code ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:121— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:143— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:1277— 5 consecutive lines of code sit inside a `/* … */` block — a block of code switched off rather than removed, which rots and confuses. Delete it (version control remembers).
Disabled test ICSharpCode.Decompiler.Tests/ILPrettyTestRunner.cs:72— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test ICSharpCode.Decompiler.Tests/RoundtripAssembly.cs:126— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test ICSharpCode.Decompiler.Tests/Semantics/ConversionTests.cs:980— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test ICSharpCode.Decompiler.Tests/Semantics/ConversionTests.cs:1618— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test ICSharpCode.Decompiler.Tests/Semantics/ConversionTests.cs:1657— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test ICSharpCode.Decompiler.Tests/Semantics/ExplicitConversionTest.cs:734— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test ICSharpCode.Decompiler.Tests/Semantics/ExplicitConversionTest.cs:745— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test ICSharpCode.Decompiler.Tests/Semantics/OverloadResolutionTests.cs:322— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test ICSharpCode.Decompiler.Tests/Semantics/TypeInferenceTests.cs:656— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test ICSharpCode.Decompiler.Tests/Semantics/TypeInferenceTests.cs:676— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
README/code drift doc/CollectingEventTraces.md:38— doc/CollectingEventTraces.md documents the setting `Name:KeywordMask:Level`, but no code or configuration file names `KeywordMask`. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift doc/ImageListFormat.md:3— doc/ImageListFormat.md links to `ImageListDecoder.cs`, but `doc/ImageListDecoder.cs` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift doc/ImageListFormat.md:135— doc/ImageListFormat.md documents the environment variable `ILC_COLOR`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift doc/ImageListFormat.md:136— doc/ImageListFormat.md documents the environment variable `ILC_COLOR4`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift doc/ImageListFormat.md:137— doc/ImageListFormat.md documents the environment variable `ILC_COLOR8`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift doc/ImageListFormat.md:138— doc/ImageListFormat.md documents the environment variable `ILC_COLOR16`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift doc/ImageListFormat.md:139— doc/ImageListFormat.md documents the environment variable `ILC_COLOR24`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift doc/ImageListFormat.md:140— doc/ImageListFormat.md documents the environment variable `ILC_COLOR32`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
Silent fallback default on parse failure ICSharpCode.ILSpyX/PdbProvider/MonoCecilDebugInfoProvider.cs:108— `GetSequencePoints` returns `EmptyList<SequencePoint>.Instance` when `debugInfo.TryGetValue(handle, out var info)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure ICSharpCode.ILSpyX/PdbProvider/MonoCecilDebugInfoProvider.cs:118— `GetVariables` returns `EmptyList<Variable>.Instance` when `debugInfo.TryGetValue(handle, out var info)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure ICSharpCode.Decompiler/Documentation/XmlDocLoader.cs:199— `ParseVersionPrefix` falls back to `0` when `i < parts.Length && int.TryParse(parts[i], out int n)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure ILSpy/TextView/DefinitionLookup.cs:32— `GetDefinitionPosition` falls back to `-1` when `definitions.TryGetValue(definition, out var offset)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 234 significant file(s) lose their only recent owner: ICSharpCode.Decompiler/CSharp/Transforms/PatternStatementTransform.cs, ILSpy/Docking/DockWorkspace.cs, ICSharpCode.Decompiler/CSharp/Resolver/OverloadResolution.cs, ICSharpCode.Decompiler/CSharp/Resolver/CSharpOperators.cs, ILSpy/TextView/DecompilerTabPageModel.cs, ILSpy/TreeNodes/AssemblyTreeNode.cs, ICSharpCode.ILSpyX/TreeView/SharpTreeNode.cs, ILSpy/Metadata/MetadataColumnBuilder.cs (+226 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 12 significant file(s) lose their only recent owner: ICSharpCode.BamlDecompiler/Baml/BamlRecords.cs, ICSharpCode.Decompiler/Instrumentation/DecompilerEventSource.cs, ILSpy/ViewModels/OpenFromNuGetFeedDialogViewModel.cs, ICSharpCode.BamlDecompiler/Baml/BamlReader.cs, ICSharpCode.ILSpyX/Instrumentation/ILSpyXEventSource.cs, ICSharpCode.Decompiler/DecompilerException.cs, ICSharpCode.Decompiler/SingleFileBundle.cs, ILSpy/NuGetFeeds/NuGetFeedClient.cs (+4 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 3 significant file(s) lose their only recent owner: ICSharpCode.Decompiler/TypeSystem/KnownTypeCode.cs, ICSharpCode.Decompiler/TypeSystem/Implementation/MergedNamespace.cs, ICSharpCode.Decompiler/TypeSystem/SpecialType.cs. Pair on, review, or document these before any departure.
Fat interface: IMethod (17 members) ICSharpCode.Decompiler/TypeSystem/IMethod.cs:30— `IMethod` declares 17 members: `GetReturnTypeAttributes`, `ReturnTypeIsRefReadOnly`, `IsInitOnly`, `ThisIsRefReadOnly`, `TypeParameters`, `TypeArguments`, `IsExtensionMethod`, `IsLocalFunction`, `IsConstructor`, `IsDestructor`, `IsOperator`, `HasBody`, `IsAccessor`, `AccessorOwner`, `AccessorKind`, `ReducedFrom`, `Specialize`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: IType (25 members) ICSharpCode.Decompiler/TypeSystem/IType.cs:52— `IType` declares 25 members: `Kind`, `IsReferenceType`, `IsByRefLike`, `Nullability`, `ChangeNullability`, `GetDefinition`, `GetDefinitionOrUnknown`, `DeclaringType`, `TypeParameterCount`, `TypeParameters`, `TypeArguments`, `AcceptVisitor`, `VisitChildren`, `DirectBaseTypes`, `GetSubstitution`, `GetNestedTypes`, `GetNestedTypes`, `GetConstructors`, `GetMethods`, `GetMethods`, `GetProperties`, `GetFields`, `GetEvents`, `GetMembers`, `GetAccessors`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 25 declarations carry 23 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 23 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Orphaned file ICSharpCode.Decompiler/Solution/SolutionCreator.cs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file ICSharpCode.ILSpyX/Search/AssemblySearchStrategy.cs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
X7 · Silent fallback defaults· Silent fallback default on lookup miss · ×2
Silent fallback default on lookup miss ICSharpCode.Decompiler/TypeSystem/UsingScope.cs:71— `WithNestedNamespace` answers a miss of `Namespace.GetChildNamespace(simpleName)` with `new DummyNamespace(Namespace, simpleName)` — an entity fabricated around `simpleName`, which the caller cannot tell from a stored one. Return null or a not-found result, or throw.
Silent fallback default on lookup miss ICSharpCode.ILSpyX/Settings/ILSpySettings.cs:46— `this[]` answers a miss of `root.Element(section)` with `new XElement(section)` — an entity fabricated around `section`, which the caller cannot tell from a stored one. Return null or a not-found result, or throw.
C2 · Access Controls· No named authorization policies · ×1
No named authorization policies — Authorization IS enforced here (by imperative guard methods that throw on violation) — this is NOT a claim that the code is unprotected. What's missing is a NAMED rule set: the guards encode the access rules inline, so the rules can't be listed, reviewed or tested apart from the call sites that apply them. Recommendation, not a defect.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 3 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (252 single-owned of 509 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 509 of the 674 production source files in this repository met that bar). They are anonymized user #4 (1 file(s)), anonymized user #5 (1 file(s)), anonymized user #6 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: ICSharpCode.Decompiler/Solution/SolutionCreator.cs, ICSharpCode.Decompiler/TypeSystem/IParameter.cs, ICSharpCode.BamlDecompiler/Rewrite/AttributeRewritePass.cs.
No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 3 of 20 project(s) overshoot their size bounds, lowering Project Cohesion to 7.0/10. The most over is `ICSharpCode.Decompiler` (160832 LoC, 746 public types across 27 namespaces). Review these for cohesion — split a project that spans unrelated responsibilities.
Pass-through layer ICSharpCode.Decompiler/Output/TextOutputWriter.cs:25— TextOutputWriter: all 3 public methods forward their arguments unchanged to output and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call output directly, or give the layer a job.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
REDACTED
D34 · Knowledge Freshness· Further orphaned files (smaller) · ×1
Further orphaned files (smaller) — 2 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: ICSharpCode.Decompiler/Solution/SolutionCreator.cs, ICSharpCode.ILSpyX/Search/AssemblySearchStrategy.cs (3 orphaned of 509 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 509 of the 674 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
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.
No src/ separation — Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.
P12 · CI test-gate honesty· Sleep-based test synchronization · ×1
Sleep-based test synchronization — 12 Task.Delay/Thread.Sleep call(s) in test code synchronize with background work by sleeping — a known flakiness precursor on slow runners. Prefer polling with a deadline or completion signals.
No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
PF1 · Benchmark discipline· No performance benchmarks · ×1
No performance benchmarks — No benchmark suite was found by the two searches this check runs. FIRST, a BenchmarkDotNet package reference in any project file — every project the workspace loaded, plus a walk of project files on disk that never loaded, because a benchmark suite is exactly the project a partial load drops. SECOND, a script harness: a file whose name contains `benchmark` and ends `.py`, `.sh`, `.ps1`, `.bash`, `.rb`, `.js` or `.mjs`, credited ONLY when this repository's CI text also mentions benchmarks — a harness no pipeline runs is read as a fixture, deliberately. Neither search can see a benchmark suite in another ecosystem's idiom (a Go `testing.B` file, a JMH or criterion project, a pytest-benchmark run), so this is 'no benchmark found by those two searches', not a verdict that the repository has none. Where code is performance-sensitive, a benchmark guards against silent regressions — but it's a bonus here, not a deduction.
X2 · Cancellation propagation· Not all async methods take a CancellationToken · ×1
Not all async methods take a CancellationToken — Only 24/108 async methods accept a CancellationToken, so in-flight work can't be stopped early when the caller gives up — whatever ends it in your host (shutdown signal, timeout, abandoned request, user cancel). Thread a token through the call chain and honour it at each await and loop; where a method genuinely cannot be interrupted, omitting it is a deliberate choice — judge against your hosting model.
Nullable reference types not enabled everywhere — 7/10 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.
Null-forgiving operator (`!`) suppressions reduce the NRT score — ~1.1 `!` suppressions per 1k syntax nodes — 695 suppression(s) across the 641679 syntax node(s) in code where nullable warnings are ENABLED, which is the only code a `!` can suppress anything in (a `!` under `#nullable disable` is inert and is not counted, and its file's nodes are not in the denominator). Each one tells the compiler to trust you about null, suppressing the very safety NRTs provide.
Skipped (documented): Random_TestCase_1_With_NativeInts ICSharpCode.Decompiler.Tests/RoundtripAssembly.cs:125— Skipped with a documented reason — a deferral, not lazy debt: See https://github.com/icsharpcode/ILSpy/issues/2541 - Waiting for https://github.com/dotnet/roslyn/issues/45929
Skipped (documented): MethodGroupConversion_NoContravarianceDynamic ICSharpCode.Decompiler.Tests/Semantics/ConversionTests.cs:980— Skipped with a documented reason — a deferral, not lazy debt: Not sure if this conversion should be valid or not... NR and mcs both accept it as valid, csc treats it as invalid
Skipped (documented): LiftedTupleConversions ICSharpCode.Decompiler.Tests/Semantics/ConversionTests.cs:1618— Skipped with a documented reason — a deferral, not lazy debt: Known bug: CSharpConversions does not support nullable conversions derived from tuple conversions, but csc accepts them
Skipped (documented): SwitchExpressionConversion ICSharpCode.Decompiler.Tests/Semantics/ConversionTests.cs:1657— Skipped with a documented reason — a deferral, not lazy debt: C# standard 10.2.18 is not implemented: no ResolveResult represents a switch expression; the decompiler converts each arm separately in ILAst
Skipped (documented): ExplicitLiftedTupleConversions ICSharpCode.Decompiler.Tests/Semantics/ExplicitConversionTest.cs:734— Skipped with a documented reason — a deferral, not lazy debt: Known bug: CSharpConversions does not support nullable conversions derived from tuple conversions, but csc accepts them
Skipped (documented): UserDefinedExplicitConversion_ExplicitNumericConversionToNullableTarget ICSharpCode.Decompiler.Tests/Semantics/ExplicitConversionTest.cs:745— Skipped with a documented reason — a deferral, not lazy debt: Known bug: CSharpConversions rejects explicit user-defined conversions to a nullable target when the operator result needs an explicit numeric conversion, but csc accepts them
Skipped (documented): BetterFunctionMemberIsNotTransitive ICSharpCode.Decompiler.Tests/Semantics/OverloadResolutionTests.cs:322— Skipped with a documented reason — a deferral, not lazy debt: Overload Resolution bug
Skipped (documented): InParameterWithValueArgumentUsesLowerBoundInference ICSharpCode.Decompiler.Tests/Semantics/TypeInferenceTests.cs:655— Skipped with a documented reason — a deferral, not lazy debt: Not implemented: a value argument passed to an 'in' parameter must produce a lower-bound inference (spec 12.6.3.7); currently no bound at all is inferred because every by-reference parameter takes the exact-inference path.
Skipped (documented): TupleLiteralInputTypeInference ICSharpCode.Decompiler.Tests/Semantics/TypeInferenceTests.cs:675— Skipped with a documented reason — a deferral, not lazy debt: Not implemented: elementwise input type inference from a tuple literal (spec 12.6.3.7); the literal is currently inferred through its tuple type, which makes conflicting exact element bounds instead of elementwise lower-bound inferences.
Skipped (documented): Capture_Before_And_After_Toggle ILSpy.Tests/AssemblyList/UseNestedNamespaceNodesScreenshot.cs:38— Skipped with a documented reason — a deferral, not lazy debt: Visual evidence — requires ILSPY_TESTS_VISIBLE=1 so the headless platform renders.
Skipped (documented): BindTree_With_Large_AssemblyList_Reports_Phase_Timings ILSpy.Tests/Diagnostics/StartupPerfTests.cs:56— Skipped with a documented reason — a deferral, not lazy debt: Perf benchmark — emits timings for manual inspection
Skipped (documented): UI_Stays_Responsive_While_Many_Assemblies_Load ILSpy.Tests/Diagnostics/StartupPerfTests.cs:153— Skipped with a documented reason — a deferral, not lazy debt: Perf benchmark — emits dispatcher-latency stats for manual inspection
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 33 file(s) — `ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs`, `ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs`, `ICSharpCode.Decompiler/DebugInfo/AsyncDebugInfo.cs`, `ICSharpCode.Decompiler/Documentation/IdStringProvider.cs`, `ICSharpCode.Decompiler/Humanizer/Vocabulary.cs`, … (+28 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a167b0-be80-7da0-82b7-bf6f9d6ec3f6 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Appendix C — Personal-data map
Every field, property and record parameter whose name is conventional personal data — 50 field(s) across 1 category, each with an exact repo-relative file:line. This is the data inventory a compliance review starts from — right-to-erasure, retention, minimisation. Detected by NAME, from the C# syntax tree, with a deliberately specific identifier classifier — the same one the C1–C5 compliance cards use to decide whether personal data is present, so CardDefinition or FileName don't trip. Two caveats stated rather than glossed: those cards additionally require corroboration (a persistence/account signal, or two distinct PII categories) that this inventory deliberately does not, so it lists more than they gate on; and D32 Data Compliance shares nothing with it — that dimension is a separate semgrep ruleset for personal data leaking into logs, URLs and browser storage, and a clean D32 result says nothing about this list. Informational — it feeds no score.
Issues: 186 · Warnings: 1651 · Recommendations: 113 · Info: 26 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 23-10-2026 @ 07:36 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.