Public report — ILSpy, published 5 Aug 2026.
Concrete security findings (CVE IDs, secret matches, dependency versions) are hidden in this version;
ask the repo owner for the full report.
1296findings with an exact file:lineof 1318 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
49/93dimensions across the health lenses226199 LoC · 16 projects — wide & deep
Executive summary
Read through the Production lens — the standard calibration. *Green* means good enough to run in production. The score is absolute and comparable across repos.
icsharpcode/ILSpy is sound in substance but carries real gaps (67%). It is not in crisis, but the issues below raise the cost of changing it — friction its consumers ultimately inherit.
It is strongest in Architecture (97%) — the structure is clean and changes stay contained. Security (78%) is solid too.
The area that most needs attention is Performance (61%) — it raises ongoing delivery and operational cost. Maturity (68%) is the next concern — onboarding is slow — key decisions and the architecture aren't written down, so contributors have to reverse-engineer the intent.
Leadership focus, highest impact first: benchmarking harness for the hot paths and run it in CI… (Benchmark discipline); Make the call chain async end-to-end and await it (Async & latency hygiene); Raise allocation-aware density on the hot paths (Allocation hygiene).
For scale: Large (~226,199 production lines); rebuilding it from scratch would take roughly ~10.3 person-years (~5–20 engineers). Approximate, ±~30%.
It builds on a genuinely strong Architecture foundation (97%); the priorities above are the highest-leverage way to bring the rest up to that level.
How the score is built — each lens's share of the headlineWidth is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
This codebase represents roughly ~10.3 person-years of build effort (about ~€1,500,000 to rebuild). Its weakest lens is Performance at 61% — the part of that asset most exposed by the findings below.
How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.2) — desktop/game, high decision density × a 0.9× quality factor, at €60–95/h; indicative, ±~30%. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).
Top priorities
The highest-leverage moves; the full ranked list is in the Roadmap below.
1
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).
The top-ranked fix costs roughly 3–10 engineer-days once. Not doing it costs about 84.3–505.8 engineer-days every year, paid as drag on the ~901,972 lines this team changes annually — a bill that arrives whether or not anyone books it. On those figures the fix breaks even in roughly 1–2 months and is free after that. Method, stated so this is not read as a quotation: debt from the ranked task's effort band; interest = annual changed lines (measured, annualised from the 90-day window) ÷ an ASSUMED 150–400 lines per engineer-day × the 4–8% drag implied by the code-quality signals; breaking point = debt ÷ annual interest. A modelled planning range built from measured inputs and one named assumption — not a quotation, a valuation, or a certified figure.
Evidence: D15 churn: 222,404 line(s) changed over a 90-day window ⇒ ~901,972/year · D1/D2/D4/D6 code quality: averaging 6.5/10 ⇒ a 4–8% drag on each change · top-ranked remediation: Medium effort ⇒ about 3–10 engineer-day(s)
→ Do the top-ranked fix now if this code will still be yours in 2 months.
Value concentrated against a weak lens · Medium · Value at risk
This is a Large asset (~10.3 person-years to rebuild), and its weakest lens is Performance at 61%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
→ Direct remediation budget at Performance first — highest risk-reduction per euro on an asset this size.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: 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). The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ 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).
A velocity tax on every change · Medium · Economics
The code-quality signals (complexity, duplication, cohesion) average 6.5/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 4–8% more than in clean code, and the tax compounds as the codebase grows. (A modelled estimate, not a measured fact.)
Evidence: D1/D2/D4/D6 code quality: averaging 6.5/10 across the code-quality signals actually measured
→ Pay it down where churn is highest — the hotspots — not everywhere; that's where the tax is actually paid.
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 — module dependency matrix
93 modules, 418 dependencies — 4 dependency cycles, shown as the red cell(s) above the diagonal. Rows and columns are the same modules, ordered so that a module only depends on ones above it. A cell means the row depends on the column, and its number is how many type pairs create that dependency. Read one thing: is anything above the diagonal? A mark there is a dependency cycle. (A cycle is all this shows — an unusual but cycle-free dependency sits below the diagonal like any other.)
At a glance — Code Health · 78% · Adequate · gated by D2
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A03:2021 — Injection
41
High / Critical
A05:2021 — Security Misconfiguration
1
Medium
Roadmap
First, establish a benchmarking harness for hot paths and integrate it into CI to prevent performance regressions. Next, ensure the entire call chain is fully asynchronous, avoiding any blocking calls on tasks. Then, improve allocation hygiene on hot paths by increasing the use of efficient types like Span and pooling to reduce memory pressure. Finally, create and maintain architecture decision records to document significant design choices and their consequences.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
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).
Raise allocation-aware density on the hot paths — currently 121 use(s) across 229,776 production line(s) (~0.5/1k). More Span/Memory, pooling (ArrayPool/ObjectPool), stackalloc and ValueTask on the allocation-heavy paths climbs this toward 10.
Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree with `NNNN-title.md` names is the most discoverable form).
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. 46 of 49 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 3 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.7 — 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 — 49 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, 1296 of 1318 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.
D19 Documentation Quality — LLM provider failed — The model provider returned an unusable result, so this LLM-assisted dimension fell back to a measurement gap (confidence 0) rather than a penalty. Re-run with a reachable provider to score it.
D24 Comment Value — LLM provider failed — The model provider returned an unusable result, so this LLM-assisted dimension fell back to a measurement gap (confidence 0) rather than a penalty. Re-run with a reachable provider to score it.
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 (jscpd) — 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.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
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.
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.
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").
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.
D33 JS/npm Dependency Vulnerabilities: JS/npm CVE matching reads package manifests and lockfiles — risk from how a dependency is used, and advisories not yet published, fall outside this scan.
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.
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 (4): D20, D21, D22, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score (documentation, ADR quality, naming, comment value, onboarding) — D25 sets the ADR-conformance fraction over sampled code, D22 judges API accuracy over a sample. These 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.
359 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was CSharpPrimitiveCast.CSharpPrimitiveCastChecked at 170. A further 41 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.
+ 353 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 2 CSharpDecompiler.DoDecompile (cyclomatic 20) finding(s) in Cyclomatic Complexity — start with CSharpDecompiler.cs (2). — One of this dimension's main actionable groups (2 warning-level).
Resolve the 1 CSharpPrimitiveCast.CSharpPrimitiveCastChecked (cyclomatic 170) finding(s) in Cyclomatic Complexity — start with CSharpPrimitiveCast.cs. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 CSharpPrimitiveCast.CSharpPrimitiveCastUnchecked (cyclomatic 170) finding(s) in Cyclomatic Complexity — start with CSharpPrimitiveCast.cs. — One of this dimension's main actionable groups (1 warning-level).
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.
504 method(s) exceeded the cognitive complexity threshold of 15; the worst was SwitchOnStringTransform.MatchRoslynSwitchOnStringUsingLengthAndChar at 172.
+ 498 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 2 CSharpDecompiler.DoDecompile (cognitive 18) finding(s) in Cognitive Complexity — start with CSharpDecompiler.cs (2). — One of this dimension's main actionable groups (2 warning-level).
Resolve the 1 SwitchOnStringTransform.MatchRoslynSwitchOnStringUsingLengthAndChar… finding(s) in Cognitive Complexity — start with SwitchOnStringTransform.cs. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 DynamicCallSiteTransform.ScanCallSiteInitBlock (cognitive 162) finding(s) in Cognitive Complexity — start with DynamicCallSiteTransform.cs. — One of this dimension's main actionable groups (1 warning-level).
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.8 / 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 46 FileTooLong finding(s) in God Classes — start with ExpressionBuilder.cs, CSharpOutputVisitor.cs, CSharpDecompiler.cs. — One of this dimension's main actionable groups (46 warning-level).
Resolve the 31 TooManyMethods finding(s) in God Classes — start with CSharpOutputVisitor.cs, ExpressionBuilder.cs, CSharpResolver.cs. — One of this dimension's main actionable groups (31 warning-level).
Resolve the 21 ClassTooLong finding(s) in God Classes — start with DecompilerSettings.cs, SwitchOnStringTransform.cs, RecordDecompiler.cs. — One of this dimension's main actionable groups (21 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.
+ 14 more group(s) — more in Appendix A; the complete list is findings.md.
✓ On the Gold path — maintain.
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling9.5 / 10Exemplary✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
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.
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.
1509 test methods: 1509 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 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
What it measures: Whether dependencies are current, secure, and not bloated.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
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.
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor5.2 / 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.
404 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs.
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.
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.
16 projects, 1686 source files, 316800 hand-written lines of code (226199 production / 90601 test), plus 3387 generated (machine-written code — designer, scaffolded and tool-emitted files — excluded from quality), 23 inter-project edges (build status unknown — did not finish).
Monorepo: only 1 of 3 solutions was scored
Thin analysable surface across projects
Build status unknown
✓ On the Gold path — maintain.
Detailed fixes: d18_recommendation.md · top locations in Appendix A, every location in findings.md.
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 Consistency / 10Exemplary◐ 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.
3 of 16 projects flagged as possibly oversized/incoherent.
Split ICSharpCode.Decompiler
Split ILSpy
What to do
Resolve the 1 Split ICSharpCode.Decompiler finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 Split ILSpy 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.
Do you agree with this assessment?
D27 · Navigability8.2 / 10Strong✓ Tool-verified
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
46 % of calls cross a namespace and 12 % 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 to do
Improve Navigability — currently 8.2/10. — 46 % of calls cross a namespace and 12 % 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: Git-history secret scan via gitleaks detect over full history in an isolated checkout; each match flagged High. Exhaustive; degrades cleanly when tool absent.
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).
High: dependabot-missing-cooldown · ×41.github/dependabot.yml:6detected by semgrep finding
What to do
Resolve the 41 High finding(s) in Static Analysis (SAST) — start with build-ilspy.yml (26), codeql-analysis.yml (4), scorecard.yml (4). — One of this dimension's main actionable groups (41 issue-level).
Detailed fixes: d29_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.
89 of 846 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is ICSharpCode.Decompiler/IL/Transforms/NullableLiftingTransform.cs.
Resolve the 9 Orphaned knowledge finding(s) in Knowledge Freshness — start with NullableLiftingTransform.cs, DetectPinnedRegions.cs, LoopDetection.cs. — One of this dimension's main actionable groups (9 issue-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; coupling through a build step, config, or non-source file isn't seen.
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.
Resolve the 1 Unpinned build actions finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Secret passed as a command-line argument finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 No build provenance finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
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 dependencies have known published vulnerabilities (CVEs) per the OSV database — read natively from whatever lockfile the repository ships (Cargo, npm, Go, Python, Maven, RubyGems, …). D33 and D30 add ecosystem-specific scanners on top for npm and .NET.
Method: Multi-ecosystem dependency-CVE scan via osv-scanner --recursive (queries the osv.dev database + parses lockfiles natively across ecosystems: npm package-lock/yarn/pnpm/bun, Go go.mod, Rust Cargo.lock, Maven/Gradle pom.xml/gradle.lockfile, PyPI requirements.txt/poetry.lock/Pipfile.lock, Composer composer.lock, RubyGems Gemfile.lock, Hex mix.lock, pub pubspec.lock, Swift Package.resolved); severity tally (Critical/High/Medium/Low) to 0-10 tight normalizer (8.0). NotApplicable only when the repo declares no supported non-.NET dependency lockfile (a NuGet-only repo stays NotApplicable — .NET CVEs are D30's domain); coverage needs a resolved lockfile. Additive to D33 (trivy fs); exhaustive + deterministic, DB kept fresh.
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.
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 — check that business logic isn't leaking into the application/infrastructure layers (a thin domain is the anemic-domain smell).
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Other · Architecture — Whether 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 member counts; fat-interface threshold (over 15 members) flagged per type. Deterministic, type-level.
`IMethod` declares 17 members. 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. — IMethod.cs:30
`IType` declares 25 members. 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. — 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.
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. (×10) — ExpressionBuilder.cs:5014, ExpressionBuilder.cs:5016, ExpressionBuilder.cs:5117, …
A placeholder string ("Cannot replace trivia; remove it and att…") is still in shipped code — typical of generated boilerplate that was never filled in. — AstNode.cs:822
A placeholder string ("DecompilerSettings.AggressiveScalarRepla…") is still in shipped code — typical of generated boilerplate that was never filled in. — DecompilerSettings.cs:2275
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.
`VisitILFunction` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — 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. — ILAmbience.cs:40
`GetUnderlyingEnumType` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — 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. — LongSet.cs:368
`Error` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — CSharpLexer.cs:1107
A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something. (×11) — ILPrettyTestRunner.cs:54, RoundtripAssembly.cs:125, ConversionTests.cs:957, …
A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers). (×14) — AutoEventDecompiler.cs:134, AutoEventDecompiler.cs:136, AutoEventDecompiler.cs:137, …
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
Add a 'Testing' section to the root README — 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 13 of 16 project(s) that lack one — worth up to 1.6 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 `NNNN-title.md` documents 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 significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree with `NNNN-title.md` names is the most discoverable form).
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.
README omits the ILSpy.VSExtensions.slnx Visual Studio extension project entirely
What to do
Reconcile the README with reality: README omits the ILSpy.VSExtensions.slnx Visual Studio extension project entirely.
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. 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.
What to do
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 library 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 — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.
No benchmark suite was found. 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.
Raise allocation-aware density on the hot paths — currently 121 use(s) across 229,776 production line(s) (~0.5/1k). More Span/Memory, pooling (ArrayPool/ObjectPool), stackalloc and ValueTask on the allocation-heavy paths climbs this toward 10.
Readiness · Performance — Whether asynchronous code keeps its host responsive — a library awaits with ConfigureAwait(false) (so it never captures and stalls the host's context) and avoids sync-over-async blocking (.Wait()/.GetAwaiter().GetResult()) that wastes threads and risks deadlock.
Method: Production-source scan: sync-over-async blocking (.Wait()/.GetAwaiter().GetResult()) counted everywhere, and — for a 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 in a consumer with a synchronization context.
What to do
Make the call chain async end-to-end and await it — never block on a Task with .Wait()/.GetAwaiter().GetResult() in library code.
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.
Not included — 44 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.
C1 Data Protection — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C2 Access Controls — No access-control surface detected in the analyzed source — no web/app surface to authorize (no HTTP API or web-UI project) and no authorization code at all (no [Authorize]/policies, no imperative guard methods). Access control is therefore N/A here — this is a library/CLI, which is authorized by its CALLER, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
C3 Audit Trail — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C4 Data Retention — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C5 Data-Subject Rights — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
D11 Test Reliability — Test reliability not measured — analyzer environment
D19 Documentation Quality — LLM evaluation failed
D23 Boundary Type-Coupling — Bounded contexts not declared
D24 Comment Value — LLM evaluation failed
D25 ADR Conformance — no ADRs to check
D30 Dependency Vulnerabilities — the solution did not restore on the analyzer's .NET SDK (an SDK/target-framework/restore mismatch, common for an older codebase), so there was no restored dependency graph to scan for NuGet CVEs — excluded rather than scored; re-run on an SDK that can restore this solution
D32 Data Compliance (PII/GDPR) — No PII/GDPR-handling patterns detected (p/gdpr ruleset) — no data-compliance surface to assess.
D39 IL Efficiency — The target did not build, so no IL was available to measure.
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 — test suite did not build
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this check looks for (5 value object(s))
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this check looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this check looks for
P12 CI test-gate honesty — 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.
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.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
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) into the repo working tree before the scan — a CI step is the usual place, since the artefact is commonly gitignored, or wire coverage collection into CI, to enable this cross-layer check
S1 Web-Security Posture — No web surface detected in the analyzed source — no HTTP API or web-UI project (no controllers/minimal-API endpoints, no Razor/Blazor views) and no web middleware (HTTPS redirection, HSTS, security headers, cookies). Transport security, security headers, secure cookies, CSRF/input-validation and middleware-order controls are therefore N/A here — this is a library/CLI/worker, not a web app. Crypto hygiene was still checked and found nothing to flag. If this codebase becomes web-facing, the dimension reactivates automatically.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X6 Hand-rolled structured-format parsing — Reported, not scored — this card publishes what it found rather than grading it. Its content is the findings and the key metric above.
X7 Silent fallback defaults — Reported, not scored — this card publishes what it found rather than grading it. Its content is the findings and the key metric above.
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.
High: dependabot-missing-cooldown .github/dependabot.yml:6— This Dependabot configuration does not set a cooldown period. Newly published packages can be malicious or unstable. Add a `cooldown` block with `default-days: 7` to each `package-ecosystem` entry under `updates` to wait 7 days before proposing updates to newly published package versions. Reference: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#cooldown. This is a semgrep security-AUDIT rule reporting a POLICY that is absent or weaker than its recommendation, not an exploitable defect. Confirm whether the current setting is a deliberate decision for this repository — and apply the change where it is not; where it is (a policy your release process already enforces elsewhere, or one this repository has consciously opted out of), record the decision and leave the configuration as it is.
High: github-actions-mutable-action-tag .github/workflows/build-frontends.yml:25— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v7`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v7 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-frontends.yml:30— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/setup-dotnet@<40-character SHA>`. This step references `actions/setup-dotnet@v6`; resolve the SHA it points at today with `gh api repos/actions/setup-dotnet/commits/v6 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-frontends.yml:56— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/upload-artifact@<40-character SHA>`. This step references `actions/upload-artifact@v7`; resolve the SHA it points at today with `gh api repos/actions/upload-artifact/commits/v7 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-ilspy.yml:47— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v7`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v7 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-ilspy.yml:53— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/setup-dotnet@<40-character SHA>`. This step references `actions/setup-dotnet@v6`; resolve the SHA it points at today with `gh api repos/actions/setup-dotnet/commits/v6 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-ilspy.yml:64— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: microsoft/setup-msbuild@<40-character SHA>`. This step references `microsoft/setup-msbuild@v3`; resolve the SHA it points at today with `gh api repos/microsoft/setup-msbuild/commits/v3 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-ilspy.yml:109— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/upload-artifact@<40-character SHA>`. This step references `actions/upload-artifact@v7`; resolve the SHA it points at today with `gh api repos/actions/upload-artifact/commits/v7 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-ilspy.yml:116— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/upload-artifact@<40-character SHA>`. This step references `actions/upload-artifact@v7`; resolve the SHA it points at today with `gh api repos/actions/upload-artifact/commits/v7 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-ilspy.yml:126— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/upload-artifact@<40-character SHA>`. This step references `actions/upload-artifact@v7`; resolve the SHA it points at today with `gh api repos/actions/upload-artifact/commits/v7 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-ilspy.yml:134— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: test-summary/action@<40-character SHA>`. This step references `test-summary/action@v2`; resolve the SHA it points at today with `gh api repos/test-summary/action/commits/v2 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-ilspy.yml:187— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/upload-artifact@<40-character SHA>`. This step references `actions/upload-artifact@v7`; resolve the SHA it points at today with `gh api repos/actions/upload-artifact/commits/v7 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-ilspy.yml:195— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/upload-artifact@<40-character SHA>`. This step references `actions/upload-artifact@v7`; resolve the SHA it points at today with `gh api repos/actions/upload-artifact/commits/v7 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-ilspy.yml:210— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/upload-artifact@<40-character SHA>`. This step references `actions/upload-artifact@v7`; resolve the SHA it points at today with `gh api repos/actions/upload-artifact/commits/v7 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-ilspy.yml:225— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/upload-artifact@<40-character SHA>`. This step references `actions/upload-artifact@v7`; resolve the SHA it points at today with `gh api repos/actions/upload-artifact/commits/v7 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-ilspy.yml:239— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/upload-artifact@<40-character SHA>`. This step references `actions/upload-artifact@v7`; resolve the SHA it points at today with `gh api repos/actions/upload-artifact/commits/v7 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-ilspy.yml:247— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/upload-artifact@<40-character SHA>`. This step references `actions/upload-artifact@v7`; resolve the SHA it points at today with `gh api repos/actions/upload-artifact/commits/v7 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-ilspy.yml:255— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/upload-artifact@<40-character SHA>`. This step references `actions/upload-artifact@v7`; resolve the SHA it points at today with `gh api repos/actions/upload-artifact/commits/v7 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-ilspy.yml:263— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/upload-artifact@<40-character SHA>`. This step references `actions/upload-artifact@v7`; resolve the SHA it points at today with `gh api repos/actions/upload-artifact/commits/v7 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-ilspy.yml:271— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/upload-artifact@<40-character SHA>`. This step references `actions/upload-artifact@v7`; resolve the SHA it points at today with `gh api repos/actions/upload-artifact/commits/v7 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-ilspy.yml:279— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/upload-artifact@<40-character SHA>`. This step references `actions/upload-artifact@v7`; resolve the SHA it points at today with `gh api repos/actions/upload-artifact/commits/v7 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-ilspy.yml:315— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v7`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v7 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-ilspy.yml:321— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/setup-dotnet@<40-character SHA>`. This step references `actions/setup-dotnet@v6`; resolve the SHA it points at today with `gh api repos/actions/setup-dotnet/commits/v6 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-ilspy.yml:381— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/upload-artifact@<40-character SHA>`. This step references `actions/upload-artifact@v7`; resolve the SHA it points at today with `gh api repos/actions/upload-artifact/commits/v7 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-ilspy.yml:388— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/upload-artifact@<40-character SHA>`. This step references `actions/upload-artifact@v7`; resolve the SHA it points at today with `gh api repos/actions/upload-artifact/commits/v7 --jq .sha`.
Orphaned knowledge ICSharpCode.Decompiler/IL/Transforms/NullableLiftingTransform.cs— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge ICSharpCode.Decompiler/IL/ControlFlow/DetectPinnedRegions.cs— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge ICSharpCode.Decompiler/IL/ControlFlow/LoopDetection.cs— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge ICSharpCode.Decompiler/FlowAnalysis/DataFlowVisitor.cs— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge ICSharpCode.Decompiler/IL/Transforms/IndexRangeTransform.cs— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge ICSharpCode.ILSpyX/Search/CSharpLexer.cs— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge ICSharpCode.Decompiler/Util/CSharpPrimitiveCast.cs— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge ICSharpCode.Decompiler/IL/ControlFlow/ConditionDetection.cs— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge ICSharpCode.Decompiler/Metadata/LightJson/JsonValue.cs— 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.
NoWarnInCsproj — 23 warning codes suppressed in one element ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj:26— 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 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— 1573 — 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 Directory.Build.props:3— NU1510 — 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.
EmptyCatchBlock ICSharpCode.ILSpyCmd/DotNetToolUpdateChecker.cs:64— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Narrow the catch to the exception you actually expect, record it through whatever this codebase already uses to report problems, or — where swallowing really is correct, as it often is on a teardown/dispose path where throwing would mask the original failure — write down WHY in a comment on the catch. The comment has to give the reason: a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all and leaves this row in place. Any of the three makes the decision reviewable; all three clear this row.
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:413— // 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:272— // 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/CSharp/Resolver/CSharpConversions.cs:127— // 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:276— // 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:480— // 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:669— // 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:412— // TODO: revisit after decision has been made regarding the type system. — 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:437— // TODO: revisit after decision has been made regarding the type system. — 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:495— // TODO: revisit after decision has been made regarding the type system. — 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:523— // TODO: revisit after decision has been made regarding the type system. — 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:622— // TODO: revisit after decision has been made regarding the type system. — 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:690— // TODO: revisit after decision has been made regarding the type system. — 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:557— // 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:572— // 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:798— // 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:814— // 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:884— // 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.
FileTooLong: CSharp/ExpressionBuilder.cs ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:0— FileTooLong — 2975 significant lines (blank, comment-only and punctuation-only lines excluded). 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:0— FileTooLong — 1983 significant lines (blank, comment-only and punctuation-only lines excluded). 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:0— FileTooLong — 1557 significant lines (blank, comment-only and punctuation-only lines excluded). 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:0— FileTooLong — 1524 significant lines (blank, comment-only and punctuation-only lines excluded). 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:0— FileTooLong — 1485 significant lines (blank, comment-only and punctuation-only lines excluded). 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:0— FileTooLong — 1441 significant lines (blank, comment-only and punctuation-only lines excluded). 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:0— FileTooLong — 1410 significant lines (blank, comment-only and punctuation-only lines excluded). 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:0— FileTooLong — 1391 significant lines (blank, comment-only and punctuation-only lines excluded). 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:0— FileTooLong — 1263 significant lines (blank, comment-only and punctuation-only lines excluded). 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.Decompiler/DecompilerSettings.cs ICSharpCode.Decompiler/DecompilerSettings.cs:0— FileTooLong — 1258 significant lines (blank, comment-only and punctuation-only lines excluded). 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:0— FileTooLong — 1101 significant lines (blank, comment-only and punctuation-only lines excluded). 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:0— FileTooLong — 1064 significant lines (blank, comment-only and punctuation-only lines excluded). 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:0— FileTooLong — 993 significant lines (blank, comment-only and punctuation-only lines excluded). 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:0— FileTooLong — 972 significant lines (blank, comment-only and punctuation-only lines excluded). 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:0— FileTooLong — 887 significant lines (blank, comment-only and punctuation-only lines excluded). 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:0— FileTooLong — 804 significant lines (blank, comment-only and punctuation-only lines excluded). 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:0— FileTooLong — 801 significant lines (blank, comment-only and punctuation-only lines excluded). 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:0— FileTooLong — 789 significant lines (blank, comment-only and punctuation-only lines excluded). 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:0— FileTooLong — 719 significant lines (blank, comment-only and punctuation-only lines excluded). 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:0— FileTooLong — 710 significant lines (blank, comment-only and punctuation-only lines excluded). 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:0— FileTooLong — 698 significant lines (blank, comment-only and punctuation-only lines excluded). 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:0— FileTooLong — 672 significant lines (blank, comment-only and punctuation-only lines excluded). 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/CSharpOperators.cs ICSharpCode.Decompiler/CSharp/Resolver/CSharpOperators.cs:0— FileTooLong — 630 significant lines (blank, comment-only and punctuation-only lines excluded). 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: Documentation/IdStringProvider.cs ICSharpCode.Decompiler/Documentation/IdStringProvider.cs:0— FileTooLong — 618 significant lines (blank, comment-only and punctuation-only lines excluded). 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:0— FileTooLong — 616 significant lines (blank, comment-only and punctuation-only lines excluded). 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.
TooManyMethods: CSharpOutputVisitor ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpOutputVisitor.cs:0— TooManyMethods — 1972 significant lines (blank, comment-only and punctuation-only lines excluded), 179 methods. 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:0— TooManyMethods — 2948 significant lines (blank, comment-only and punctuation-only lines excluded), 164 methods. 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:0— TooManyMethods — 1499 significant lines (blank, comment-only and punctuation-only lines excluded), 95 methods. 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:0— TooManyMethods — 854 significant lines (blank, comment-only and punctuation-only lines excluded), 91 methods. 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:0— TooManyMethods — 1527 significant lines (blank, comment-only and punctuation-only lines excluded), 69 methods. 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:0— TooManyMethods — 1457 significant lines (blank, comment-only and punctuation-only lines excluded), 67 methods. 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:0— TooManyMethods — 444 significant lines (blank, comment-only and punctuation-only lines excluded), 67 methods. 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:0— TooManyMethods — 1306 significant lines (blank, comment-only and punctuation-only lines excluded), 64 methods. 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:0— TooManyMethods — 577 significant lines (blank, comment-only and punctuation-only lines excluded), 64 methods. 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:0— TooManyMethods — 938 significant lines (blank, comment-only and punctuation-only lines excluded), 61 methods. 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:0— TooManyMethods — 531 significant lines (blank, comment-only and punctuation-only lines excluded), 55 methods, declared across 2 files: TreeView/SharpTreeNode.cs (36), TreeView/FlatListTreeNode.cs (19). 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:0— TooManyMethods — 979 significant lines (blank, comment-only and punctuation-only lines excluded), 54 methods. 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:0— TooManyMethods — 1310 significant lines (blank, comment-only and punctuation-only lines excluded), 53 methods. 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:0— TooManyMethods — 1054 significant lines (blank, comment-only and punctuation-only lines excluded), 50 methods. 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:0— TooManyMethods — 1249 significant lines (blank, comment-only and punctuation-only lines excluded), 49 methods. 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:0— TooManyMethods — 1306 significant lines (blank, comment-only and punctuation-only lines excluded), 47 methods. 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: DecompilerSyntaxTreeGenerator ICSharpCode.Decompiler.Generators/DecompilerSyntaxTreeGenerator.cs:0— TooManyMethods — 498 significant lines (blank, comment-only and punctuation-only lines excluded), 45 methods. 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.
TooManyMethods: AssemblyTreeModel ILSpy/AssemblyTree/AssemblyTreeModel.cs:0— TooManyMethods — 488 significant lines (blank, comment-only and punctuation-only lines excluded), 44 methods. 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:0— TooManyMethods — 593 significant lines (blank, comment-only and punctuation-only lines excluded), 43 methods. 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:0— TooManyMethods — 687 significant lines (blank, comment-only and punctuation-only lines excluded), 39 methods. 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:0— TooManyMethods — 287 significant lines (blank, comment-only and punctuation-only lines excluded), 39 methods. 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:0— TooManyMethods — 290 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. 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:0— TooManyMethods — 504 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods. 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.
TooManyMethods: TransformArrayInitializers ICSharpCode.Decompiler/IL/Transforms/TransformArrayInitializers.cs:0— TooManyMethods — 702 significant lines (blank, comment-only and punctuation-only lines excluded), 34 methods. 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:0— TooManyMethods — 568 significant lines (blank, comment-only and punctuation-only lines excluded), 34 methods. 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.
BarePragmaDisable ICSharpCode.Decompiler.Tests/Output/CSharpAmbienceTests.cs:399— #pragma warning disable 169, 67 — the disable has no matching restore, 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. Close it with the matching restore directive immediately after the construct it covers, or fix the cause and drop the directive entirely.
BarePragmaDisable ICSharpCode.Decompiler.Tests/Output/ILAmbienceTests.cs:324— #pragma warning disable 169, 67 — the disable has no matching restore, 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. Close it with the matching restore directive immediately after the construct it covers, or fix the cause and drop the directive entirely.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Correctness/Comparisons.cs:22— #pragma warning disable 652 — the disable has no matching restore, 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. Close it with the matching restore directive immediately after the construct it covers, or fix the cause and drop the directive entirely.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Correctness/OverloadResolution.cs:287— #pragma warning disable CS9193 — the disable has no matching restore, 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. Close it with the matching restore directive immediately after the construct it covers, or fix the cause and drop the directive entirely.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Correctness/Switch.cs:192— #pragma warning disable CS0162 — the disable has no matching restore, 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. Close it with the matching restore directive immediately after the construct it covers, or fix the cause and drop the directive entirely.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/CS73_StackAllocInitializers.cs:1— #pragma warning disable format — the disable has no matching restore, 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. Close it with the matching restore directive immediately after the construct it covers, or fix the cause and drop the directive entirely.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/ExpressionTrees.cs:1— #pragma warning disable format — the disable has no matching restore, 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. Close it with the matching restore directive immediately after the construct it covers, or fix the cause and drop the directive entirely.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/MemberTests.cs:33— #pragma warning disable format — the disable has no matching restore, 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. Close it with the matching restore directive immediately after the construct it covers, or fix the cause and drop the directive entirely.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/TupleTests.cs:92— #pragma warning disable format — the disable has no matching restore, 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. Close it with the matching restore directive immediately after the construct it covers, or fix the cause and drop the directive entirely.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/TupleTests.cs:97— #pragma warning disable format — the disable has no matching restore, 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. Close it with the matching restore directive immediately after the construct it covers, or fix the cause and drop the directive entirely.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomTaskType.cs:1— #pragma warning disable 1998 — the disable has no matching restore, 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. Close it with the matching restore directive immediately after the construct it covers, or fix the cause and drop the directive entirely.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomTaskType.cs:147— #pragma warning disable CS8981 — the disable has no matching restore, 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. Close it with the matching restore directive immediately after the construct it covers, or fix the cause and drop the directive entirely.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/QualifierTests.cs:142— #pragma warning disable CS8981 — the disable has no matching restore, 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. Close it with the matching restore directive immediately after the construct it covers, or fix the cause and drop the directive entirely.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.cs:756— #pragma warning disable 251 — the disable has no matching restore, 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. Close it with the matching restore directive immediately after the construct it covers, or fix the cause and drop the directive entirely.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/Issue3598.cs:7— #pragma warning disable CS0414, CS9113, CS9124 — the disable has no matching restore, 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. Close it with the matching restore directive immediately after the construct it covers, or fix the cause and drop the directive entirely.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/LocalFunctions.cs:40— #pragma warning disable CS0219 — the disable has no matching restore, 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. Close it with the matching restore directive immediately after the construct it covers, or fix the cause and drop the directive entirely.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/LocalFunctions.cs:211— #pragma warning disable CS0219 — the disable has no matching restore, 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. Close it with the matching restore directive immediately after the construct it covers, or fix the cause and drop the directive entirely.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/VariableNaming.cs:50— #pragma warning disable CS0219 — the disable has no matching restore, 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. Close it with the matching restore directive immediately after the construct it covers, or fix the cause and drop the directive entirely.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/LocalFunctions.cs:85— #pragma warning disable CS8387 — the disable has no matching restore, 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. Close it with the matching restore directive immediately after the construct it covers, or fix the cause and drop the directive entirely.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/LocalFunctions.cs:176— #pragma warning disable CS8387 — the disable has no matching restore, 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. Close it with the matching restore directive immediately after the construct it covers, or fix the cause and drop the directive entirely.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/StringInterpolation.cs:40— #pragma warning disable IDE0043 — the disable has no matching restore, 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. Close it with the matching restore directive immediately after the construct it covers, or fix the cause and drop the directive entirely.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TestCases/Pretty/TypeMemberTests.cs:533— #pragma warning disable 0108 — the disable has no matching restore, 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. Close it with the matching restore directive immediately after the construct it covers, or fix the cause and drop the directive entirely.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TestCases/VBPretty/ParameterizedProperties.cs:1— #pragma warning disable 657 — the disable has no matching restore, 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. Close it with the matching restore directive immediately after the construct it covers, or fix the cause and drop the directive entirely.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TypeSystem/TypeSystemTestCase.cs:47— #pragma warning disable CS0465 — the disable has no matching restore, 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. Close it with the matching restore directive immediately after the construct it covers, or fix the cause and drop the directive entirely.
BarePragmaDisable ICSharpCode.Decompiler.Tests/TypeSystem/TypeSystemTestCase.cs:303— #pragma warning disable 67 — the disable has no matching restore, 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. Close it with the matching restore directive immediately after the construct it covers, or fix the cause and drop the directive entirely.
ClassTooLong: DecompilerSettings ICSharpCode.Decompiler/DecompilerSettings.cs:0— ClassTooLong — 1253 significant lines (blank, comment-only and punctuation-only lines excluded), 6 methods. 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: SwitchOnStringTransform ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs:0— ClassTooLong — 1093 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. 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:0— ClassTooLong — 792 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. 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:0— ClassTooLong — 779 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. 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:0— ClassTooLong — 712 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. 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:0— ClassTooLong — 670 significant lines (blank, comment-only and punctuation-only lines excluded), 3 methods. 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: TransformAssignment ICSharpCode.Decompiler/IL/Transforms/TransformAssignment.cs:0— ClassTooLong — 593 significant lines (blank, comment-only and punctuation-only lines excluded), 17 methods. 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: TypeInference ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:0— ClassTooLong — 570 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. 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: NullableLiftingTransform ICSharpCode.Decompiler/IL/Transforms/NullableLiftingTransform.cs:0— ClassTooLong — 545 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. 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:0— ClassTooLong — 544 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. 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: ILSpyCmdProgram ICSharpCode.ILSpyCmd/IlspyCmdProgram.cs:0— ClassTooLong — 534 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. 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:0— ClassTooLong — 527 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. 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:0— ClassTooLong — 517 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. 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:0— ClassTooLong — 500 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. 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:0— ClassTooLong — 491 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. 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:0— ClassTooLong — 458 significant lines (blank, comment-only and punctuation-only lines excluded), 9 methods. 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:0— ClassTooLong — 427 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. 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:0— ClassTooLong — 411 significant lines (blank, comment-only and punctuation-only lines excluded), 9 methods. 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:0— ClassTooLong — 404 significant lines (blank, comment-only and punctuation-only lines excluded), 12 methods. 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:0— ClassTooLong — 403 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. 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:0— ClassTooLong — 402 significant lines (blank, comment-only and punctuation-only lines excluded), 13 methods. 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 (10 lines × 2) ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:538— ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:538-547 | ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:651-660 — 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/Resolver/CSharpConversions.cs:1683— ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:1683-1692 | ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs:1699-1708 — 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:1683` 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:852— ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:852-861 | ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:872-881 — 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 (10 lines × 2) ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:1120— ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:1120-1129 | ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:1159-1168 — 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/Disassembler/ReflectionDisassembler.cs:1120` 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/InstructionOutputExtensions.cs:156— ICSharpCode.Decompiler/IL/InstructionOutputExtensions.cs:156-165 | ICSharpCode.Decompiler/IL/InstructionOutputExtensions.cs:257-266 — 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:156` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 2) ICSharpCode.Decompiler/IL/Transforms/CachedDelegateInitialization.cs:229— ICSharpCode.Decompiler/IL/Transforms/CachedDelegateInitialization.cs:229-238 | ICSharpCode.Decompiler/IL/Transforms/CachedDelegateInitialization.cs:302-311 — 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/CachedDelegateInitialization.cs:229` 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 (10 lines × 2) ICSharpCode.Decompiler/TypeSystem/Implementation/SpecializedMethod.cs:230— ICSharpCode.Decompiler/TypeSystem/Implementation/SpecializedMethod.cs:230-239 | ICSharpCode.Decompiler/TypeSystem/VarArgInstanceMethod.cs:88-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:230` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) ICSharpCode.Decompiler/Util/TreeTraversal.cs:48— ICSharpCode.Decompiler/Util/TreeTraversal.cs:48-57 | ICSharpCode.Decompiler/Util/TreeTraversal.cs:95-104 — 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/TreeTraversal.cs:48` 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.BamlDecompiler/Rewrite/ConnectionIdRewritePass.cs:316— ICSharpCode.BamlDecompiler/Rewrite/ConnectionIdRewritePass.cs:316-325 | ICSharpCode.BamlDecompiler/Rewrite/ConnectionIdRewritePass.cs:332-341 — 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.BamlDecompiler/Rewrite/ConnectionIdRewritePass.cs:316` 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 (10 lines × 2) ILSpy/Commands/DecompileAllCommand.cs:72— ILSpy/Commands/DecompileAllCommand.cs:72-81 | ILSpy/Commands/DecompileAllCommand.cs:141-150 — 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:72` 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) ILSpy/Commands/DecompileAllCommand.cs:91— ILSpy/Commands/DecompileAllCommand.cs:91-100 | ILSpy/Commands/DecompileAllCommand.cs:161-170 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ILSpy/Commands/DecompileAllCommand.cs:91` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:698— ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:698-704 | ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs:444-450 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, 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:698` 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/InstructionOutputExtensions.cs:226— ICSharpCode.Decompiler/IL/InstructionOutputExtensions.cs:226-232 | ICSharpCode.Decompiler/IL/InstructionOutputExtensions.cs:278-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. 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/IL/Transforms/CachedDelegateInitialization.cs:166— ICSharpCode.Decompiler/IL/Transforms/CachedDelegateInitialization.cs:166-172 | ICSharpCode.Decompiler/IL/Transforms/CachedDelegateInitialization.cs:198-204 — 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 (7 lines × 2) ICSharpCode.Decompiler/IL/Transforms/DetectCatchWhenConditionBlocks.cs:181— ICSharpCode.Decompiler/IL/Transforms/DetectCatchWhenConditionBlocks.cs:181-187 | ICSharpCode.Decompiler/IL/Transforms/DetectCatchWhenConditionBlocks.cs:196-202 — 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 (7 lines × 2) ICSharpCode.Decompiler/IL/Transforms/LockTransform.cs:96— ICSharpCode.Decompiler/IL/Transforms/LockTransform.cs:96-102 | ICSharpCode.Decompiler/IL/Transforms/LockTransform.cs:142-148 — 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:96` 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 (7 lines × 2) ICSharpCode.Decompiler/IL/Transforms/LockTransform.cs:199— ICSharpCode.Decompiler/IL/Transforms/LockTransform.cs:199-205 | ICSharpCode.Decompiler/IL/Transforms/LockTransform.cs:296-302 — 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 lines × 2) ICSharpCode.Decompiler/IL/Transforms/TransformArrayInitializers.cs:61— ICSharpCode.Decompiler/IL/Transforms/TransformArrayInitializers.cs:61-67 | ICSharpCode.Decompiler/IL/Transforms/TransformArrayInitializers.cs:237-243 — 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:61` 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/TransformExpressionTrees.cs:731— ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:731-737 | ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:813-819 — 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 lines × 2) ICSharpCode.Decompiler/IL/Transforms/UsingTransform.cs:84— ICSharpCode.Decompiler/IL/Transforms/UsingTransform.cs:84-90 | ICSharpCode.Decompiler/IL/Transforms/UsingTransform.cs:155-161 — 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.Decompiler/IL/Transforms/UsingTransform.cs:157— ICSharpCode.Decompiler/IL/Transforms/UsingTransform.cs:157-163 | ICSharpCode.Decompiler/IL/Transforms/UsingTransform.cs:492-498 — 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/Handlers/Blocks/KeyElementStartHandler.cs:42— ICSharpCode.BamlDecompiler/Handlers/Blocks/KeyElementStartHandler.cs:42-48 | ICSharpCode.BamlDecompiler/Handlers/Records/DefAttributeKeyStringHandler.cs:42-48 — 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. 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.
Hotspot: ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs— ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs changed 25 times in last 90 days, max complexity 84. 3 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, 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.
Hotspot: ILSpy/Languages/CSharpHighlightingTokenWriter.cs ILSpy/Languages/CSharpHighlightingTokenWriter.cs— ILSpy/Languages/CSharpHighlightingTokenWriter.cs changed 13 times in last 90 days, max complexity 102. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first.
Hotspot: ICSharpCode.Decompiler.Generators/DecompilerSyntaxTreeGenerator.cs ICSharpCode.Decompiler.Generators/DecompilerSyntaxTreeGenerator.cs— ICSharpCode.Decompiler.Generators/DecompilerSyntaxTreeGenerator.cs changed 40 times in last 90 days, max complexity 31. 1 of those changes was a fix/bug commit, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, 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.
Hotspot: ILSpy/TextView/DecompilerTextView.axaml.cs ILSpy/TextView/DecompilerTextView.axaml.cs— ILSpy/TextView/DecompilerTextView.axaml.cs changed 67 times in last 90 days, max complexity 18. 4 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, 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.
Hotspot: ILSpy/Docking/DockWorkspace.cs ILSpy/Docking/DockWorkspace.cs— ILSpy/Docking/DockWorkspace.cs changed 75 times in last 90 days, max complexity 15. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first.
Hotspot: ILSpy/Languages/CSharpLanguage.cs ILSpy/Languages/CSharpLanguage.cs— ILSpy/Languages/CSharpLanguage.cs changed 35 times in last 90 days, max complexity 24. 1 of those changes was a fix/bug commit, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, 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.
Hotspot: ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs— ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs changed 18 times in last 90 days, max complexity 46. 4 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, 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.
Hotspot: ILSpy/TreeNodes/AssemblyTreeNode.cs ILSpy/TreeNodes/AssemblyTreeNode.cs— ILSpy/TreeNodes/AssemblyTreeNode.cs changed 41 times in last 90 days, max complexity 18. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, 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.
Hotspot: ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs— ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs changed 18 times in last 90 days, max complexity 37. 6 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, 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.
Hotspot: ILSpy/Metadata/MetadataTablesTreeNode.cs ILSpy/Metadata/MetadataTablesTreeNode.cs— ILSpy/Metadata/MetadataTablesTreeNode.cs changed 12 times in last 90 days, max complexity 45. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first.
HackComment ICSharpCode.Decompiler/CSharp/CallBuilder.cs:567— // 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:1183— // 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:3681— // 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:650— // 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:605— // 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:657— // 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:68— // 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:53— // 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:641— // 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.
Low cohesion: ILInstruction (LCOM4 81) ICSharpCode.Decompiler/IL/Instructions/ILInstruction.cs:56— ILInstruction's methods form 81 groups that share no state and don't call each other — a sign it may have several responsibilities. Review whether it splits into focused classes.
Low cohesion: SecurityDeclarationDecoder (LCOM4 6) ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs:485— SecurityDeclarationDecoder's methods form 6 groups that share no state and don't call each other — a sign it may have several responsibilities. Review whether it splits into focused classes.
Low cohesion: SharpTreeView (LCOM4 6) ILSpy/Controls/TreeView/SharpTreeView.cs:46— SharpTreeView's methods form 6 groups that share no state and don't call each other — a sign it may have several responsibilities. Review whether it splits into focused classes.
Low cohesion: AbstractTypeParameter (LCOM4 5) ICSharpCode.Decompiler/TypeSystem/Implementation/AbstractTypeParameter.cs:28— AbstractTypeParameter's methods form 5 groups that share no state and don't call each other — a sign it may have several responsibilities. Review whether it splits into focused classes.
Low cohesion: MetadataTypeDefinition (LCOM4 5) ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataTypeDefinition.cs:36— MetadataTypeDefinition's methods form 5 groups that share no state and don't call each other — a sign it may have several responsibilities. Review whether it splits into focused classes.
Low cohesion: NormalizeTypeVisitor (LCOM4 5) ICSharpCode.Decompiler/TypeSystem/NormalizeTypeVisitor.cs:25— NormalizeTypeVisitor's methods form 5 groups that share no state and don't call each other — a sign it may have several responsibilities. Review whether it splits into focused classes.
Low cohesion: AstNode (LCOM4 4) ICSharpCode.Decompiler/CSharp/Syntax/AstNode.cs:41— AstNode's methods form 4 groups that share no state and don't call each other — a sign it may have several responsibilities. Review whether it splits into focused classes.
Low cohesion: AssemblyListPane (LCOM4 4) ILSpy/AssemblyTree/AssemblyListPane.axaml.cs:40— AssemblyListPane's methods form 4 groups that share no state and don't call each other — a sign it may have several responsibilities. Review whether it splits into focused classes.
Low cohesion: CSharpLanguage (LCOM4 4) ILSpy/Languages/CSharpLanguage.cs:53— CSharpLanguage's methods form 4 groups that share no state and don't call each other — a sign it may have several responsibilities. Review whether it splits into focused classes.
Duplicated block (8 lines × 2) ICSharpCode.Decompiler/CSharp/AutoEventDecompiler.cs:142— ICSharpCode.Decompiler/CSharp/AutoEventDecompiler.cs:142-149 | ICSharpCode.Decompiler/CSharp/AutoEventDecompiler.cs:180-187 — 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/AutoEventDecompiler.cs:142` 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 (8 lines × 2) ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:646— ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:646-653 | ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:900-907 — 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 (8 lines × 2) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:1567— ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:1567-1574 | ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:1587-1594 — 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 (8 lines × 2) ICSharpCode.Decompiler/IL/ILReader.cs:1885— ICSharpCode.Decompiler/IL/ILReader.cs:1885-1895 | ICSharpCode.Decompiler/IL/ILReader.cs:1896-1903 — 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:1896` 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) ICSharpCode.Decompiler/IL/Instructions/DynamicInstructions.cs:410— ICSharpCode.Decompiler/IL/Instructions/DynamicInstructions.cs:410-417 | ICSharpCode.Decompiler/IL/Instructions/DynamicInstructions.cs:452-459 — 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.Decompiler/IL/Transforms/TransformArrayInitializers.cs:85— ICSharpCode.Decompiler/IL/Transforms/TransformArrayInitializers.cs:85-92 | ICSharpCode.Decompiler/IL/Transforms/TransformArrayInitializers.cs:258-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/Transforms/TransformArrayInitializers.cs:85` 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/TypeSystem/ApplyAttributeTypeVisitor.cs:95— ICSharpCode.Decompiler/TypeSystem/ApplyAttributeTypeVisitor.cs:95-102 | ICSharpCode.Decompiler/TypeSystem/ApplyAttributeTypeVisitor.cs:108-115 — 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:95` 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 (8 lines × 2) ILSpy/Controls/Omnibar/OmnibarViewModel.cs:206— ILSpy/Controls/Omnibar/OmnibarViewModel.cs:206-213 | ILSpy/Search/SearchPaneModel.cs:237-244 — 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 (6 lines × 2) ICSharpCode.Decompiler/IL/Transforms/LockTransform.cs:186— ICSharpCode.Decompiler/IL/Transforms/LockTransform.cs:186-191 | ICSharpCode.Decompiler/IL/Transforms/LockTransform.cs:234-239 — 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:186` 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/TransformExpressionTrees.cs:942— ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:942-947 | ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1036-1041 — 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/TransformExpressionTrees.cs:1082— ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1082-1087 | ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1103-1108 — 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:1082` 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/TransformExpressionTrees.cs:1290— ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1290-1295 | ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1311-1316 — 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:1290` 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/TypeSystem/Implementation/MetadataMethod.cs:260— ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataMethod.cs:260-265 | ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataMethod.cs:276-281 — 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/Implementation/MetadataMethod.cs:260` 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.BamlDecompiler/Handlers/Blocks/ElementHandler.cs:36— ICSharpCode.BamlDecompiler/Handlers/Blocks/ElementHandler.cs:36-43 | ICSharpCode.BamlDecompiler/Handlers/Records/StaticResourceStartHandler.cs:43-48 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) ICSharpCode.BamlDecompiler/Handlers/Records/DefAttributeKeyTypeHandler.cs:48— ICSharpCode.BamlDecompiler/Handlers/Records/DefAttributeKeyTypeHandler.cs:48-53 | ICSharpCode.BamlDecompiler/Handlers/Records/PropertyTypeReferenceHandler.cs:53-58 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (6 lines × 2) ILSpy/TreeNodes/CursorResourceEntryNode.cs:88— ILSpy/TreeNodes/CursorResourceEntryNode.cs:88-93 | ILSpy/TreeNodes/IconResourceEntryNode.cs:83-88 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `ILSpy/TreeNodes/CursorResourceEntryNode.cs:88` 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 (15 lines × 2) ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:800— ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:800-814 | ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:904-918 — 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:800` 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/Instructions/BinaryNumericInstruction.cs:191— ICSharpCode.Decompiler/IL/Instructions/BinaryNumericInstruction.cs:191-205 | ICSharpCode.Decompiler/IL/Instructions/CompoundAssignmentInstruction.cs:279-293 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (15 lines × 2) ICSharpCode.Decompiler/IL/Transforms/InlineArrayTransform.cs:99— ICSharpCode.Decompiler/IL/Transforms/InlineArrayTransform.cs:99-113 | ICSharpCode.Decompiler/IL/Transforms/InlineArrayTransform.cs:119-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:99` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) ICSharpCode.BamlDecompiler/Handlers/Records/PropertyWithStaticResourceIdHandler.cs:44— ICSharpCode.BamlDecompiler/Handlers/Records/PropertyWithStaticResourceIdHandler.cs:44-58 | ICSharpCode.BamlDecompiler/Handlers/Records/StaticResourceIdHandler.cs:32-46 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (15 lines × 2) ILSpy/TreeNodes/IconResourceEntryNode.cs:62— ILSpy/TreeNodes/IconResourceEntryNode.cs:62-76 | ILSpy/TreeNodes/ImageResourceEntryNode.cs:66-80 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (12 lines × 2) ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:905— ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:905-916 | ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs:1095-1106 — 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/ControlFlow/AsyncAwaitDecompiler.cs:471— ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:471-484 | ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:638-649 — 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:471` 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/IL/ILAmbience.cs:160— ICSharpCode.Decompiler/IL/ILAmbience.cs:160-171 | ICSharpCode.Decompiler/IL/ILAmbience.cs:286-297 — 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/ILAmbience.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 (12 lines × 2) ICSharpCode.Decompiler/Util/BitSet.cs:203— ICSharpCode.Decompiler/Util/BitSet.cs:203-214 | ICSharpCode.Decompiler/Util/BitSet.cs:240-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:203` 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) ILSpy/Analyzers/AnalyzerTreeView.axaml.cs:56— ILSpy/Analyzers/AnalyzerTreeView.axaml.cs:56-67 | ILSpy/Search/SearchPane.axaml.cs:65-76 — 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/Analyzers/AnalyzerTreeView.axaml.cs:56` 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 (9 lines × 2) ICSharpCode.Decompiler/IL/ILReader.cs:1953— ICSharpCode.Decompiler/IL/ILReader.cs:1953-1961 | ICSharpCode.Decompiler/IL/ILReader.cs:2147-2155 — 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:1953` 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/TransformAssignment.cs:875— ICSharpCode.Decompiler/IL/Transforms/TransformAssignment.cs:875-883 | ICSharpCode.Decompiler/IL/Transforms/TransformAssignment.cs:960-968 — 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:875` 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 (9 lines × 2) ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:847— ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:847-864 | ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1091-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. 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/TypeSystem/ApplyAttributeTypeVisitor.cs:67— ICSharpCode.Decompiler/TypeSystem/ApplyAttributeTypeVisitor.cs:67-75 | ICSharpCode.Decompiler/TypeSystem/ApplyAttributeTypeVisitor.cs:81-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:67` 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/TypeSystem/Implementation/SpecializedMember.cs:320— ICSharpCode.Decompiler/TypeSystem/Implementation/SpecializedMember.cs:320-328 | ICSharpCode.Decompiler/TypeSystem/Implementation/SpecializedMethod.cs:235-243 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, 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 (11 lines × 2) ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:703— ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:703-713 | ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:750-760 — 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:703` 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 (11 lines × 2) ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:728— ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:728-738 | ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:743-753 — 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 (11 lines × 2) ICSharpCode.Decompiler/TypeSystem/ParameterizedType.cs:150— ICSharpCode.Decompiler/TypeSystem/ParameterizedType.cs:150-160 | ICSharpCode.Decompiler/TypeSystem/ParameterizedType.cs:418-428 — 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/ParameterizedType.cs:150` 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 (11 lines × 2) ICSharpCode.ILSpyX/Search/CSharpLexer.cs:1023— ICSharpCode.ILSpyX/Search/CSharpLexer.cs:1023-1033 | ICSharpCode.ILSpyX/Search/CSharpLexer.cs:1042-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:1023` 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.
Change coupling: CSharpOutputVisitor.cs ↔ DepthFirstAstVisitor.cs ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpOutputVisitor.cs— `ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpOutputVisitor.cs` and `ICSharpCode.Decompiler/CSharp/Syntax/DepthFirstAstVisitor.cs` change together 58% of the time (15 of the 26 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well). 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.
Change coupling: AvaloniaEditTextOutput.cs ↔ DecompilerTextView.axaml.cs ILSpy/TextView/AvaloniaEditTextOutput.cs— `ILSpy/TextView/AvaloniaEditTextOutput.cs` and `ILSpy/TextView/DecompilerTextView.axaml.cs` change together 55% of the time (12 of the 22 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well). 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.
Change coupling: CreateDiagramContextMenuEntry.cs ↔ ExtractPackageEntryContextMenuEntry.cs ILSpy/Commands/CreateDiagramContextMenuEntry.cs— `ILSpy/Commands/CreateDiagramContextMenuEntry.cs` and `ILSpy/Commands/ExtractPackageEntryContextMenuEntry.cs` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well). 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.
Duplicated block (14 lines × 2) ICSharpCode.Decompiler/CSharp/Transforms/PatternStatementTransform.cs:393— ICSharpCode.Decompiler/CSharp/Transforms/PatternStatementTransform.cs:393-408 | ICSharpCode.Decompiler/CSharp/Transforms/PatternStatementTransform.cs:501-514 — 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:393` 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 (14 lines × 2) ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs:1416— ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs:1416-1429 | ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs:1480-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:1416` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) ICSharpCode.Decompiler/Util/CSharpPrimitiveCast.cs:51— ICSharpCode.Decompiler/Util/CSharpPrimitiveCast.cs:51-64 | ICSharpCode.Decompiler/Util/CSharpPrimitiveCast.cs:413-426 — 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/CSharpPrimitiveCast.cs:51` 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 × 2) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:1022— ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:1022-1026 | ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:1062-1066 — 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:1022` 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/Transforms/TransformExpressionTrees.cs:960— ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:960-964 | ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:1045-1050 — 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:960` 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 × 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.
CSharpDecompiler.DoDecompile (cyclomatic 20) ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:2515— 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:2583— 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:2515— 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:2583— 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.
Duplicated block (21 lines × 2) ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:827— ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:827-847 | ICSharpCode.Decompiler/CSharp/Resolver/TypeInference.cs:931-951 — 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:827` 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 (21 lines × 2) ICSharpCode.Decompiler/IL/Instructions/PatternMatching.cs:382— ICSharpCode.Decompiler/IL/Instructions/PatternMatching.cs:382-402 | ICSharpCode.Decompiler/IL/Instructions/PatternMatching.cs:409-429 — 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:382` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) ICSharpCode.Decompiler/IL/Instructions/PatternMatching.cs:359— ICSharpCode.Decompiler/IL/Instructions/PatternMatching.cs:359-375 | ICSharpCode.Decompiler/IL/Instructions/PatternMatching.cs:442-458 — 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:359` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) ICSharpCode.Decompiler/Util/CollectionExtensions.cs:330— ICSharpCode.Decompiler/Util/CollectionExtensions.cs:330-346 | ICSharpCode.Decompiler/Util/CollectionExtensions.cs:372-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:330` 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 × 4) ICSharpCode.Decompiler/IL/Transforms/DynamicCallSiteTransform.cs:430— ICSharpCode.Decompiler/IL/Transforms/DynamicCallSiteTransform.cs:430-438 | ICSharpCode.Decompiler/IL/Transforms/DynamicCallSiteTransform.cs:469-477 | ICSharpCode.Decompiler/IL/Transforms/DynamicCallSiteTransform.cs:517-525 | ICSharpCode.Decompiler/IL/Transforms/DynamicCallSiteTransform.cs:556-564 — 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 (9 lines × 4) ICSharpCode.BamlDecompiler/Handlers/Blocks/PropertyArrayHandler.cs:36— ICSharpCode.BamlDecompiler/Handlers/Blocks/PropertyArrayHandler.cs:36-44 | ICSharpCode.BamlDecompiler/Handlers/Blocks/PropertyComplexHandler.cs:36-44 | ICSharpCode.BamlDecompiler/Handlers/Blocks/PropertyDictionaryHandler.cs:36-44 | ICSharpCode.BamlDecompiler/Handlers/Blocks/PropertyListHandler.cs:36-44 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
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.
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.
TranslatedExpression.ConvertTo (cyclomatic 124) ICSharpCode.Decompiler/CSharp/TranslatedExpression.cs:195— TranslatedExpression.ConvertTo has cyclomatic complexity 124 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CSharpResolver.ResolveBinaryOperator (cyclomatic 109) ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:594— 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:133— 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:315— 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:1630— 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.
DecompilerSettings.GetMinimumRequiredVersion (cyclomatic 73) ICSharpCode.Decompiler/DecompilerSettings.cs:182— DecompilerSettings.GetMinimumRequiredVersion has cyclomatic complexity 73 (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.MemberIsHidden (cyclomatic 71) ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:336— CSharpDecompiler.MemberIsHidden has cyclomatic complexity 71 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
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.
CallBuilder.Build (cyclomatic 68) ICSharpCode.Decompiler/CSharp/CallBuilder.cs:332— CallBuilder.Build 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.
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.
MetadataTableDumper.LoadRows (cyclomatic 65) ICSharpCode.ILSpyCmd/MetadataTableDumper.cs:94— MetadataTableDumper.LoadRows has cyclomatic complexity 65 (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.
TransformExpressionTrees.ConvertInstruction (cyclomatic 62) ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs:270— TransformExpressionTrees.ConvertInstruction has cyclomatic complexity 62 (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:644— 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 55) ICSharpCode.Decompiler/CSharp/Transforms/IntroduceQueryExpressions.cs:137— IntroduceQueryExpressions.DecompileQuery has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
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.
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.
TransformAssignment.HandleCompoundAssign (cyclomatic 54) ICSharpCode.Decompiler/IL/Transforms/TransformAssignment.cs:340— TransformAssignment.HandleCompoundAssign 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:290— 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:891— 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.
CallBuilder.GetRequiredTransformationsForCall (cyclomatic 49) ICSharpCode.Decompiler/CSharp/CallBuilder.cs:1152— CallBuilder.GetRequiredTransformationsForCall 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.
CSharpDecompiler.IsAccessorInterfaceImplementationRuntimeHelper (cyclomatic 49) ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs:449— CSharpDecompiler.IsAccessorInterfaceImplementationRuntimeHelper 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.
MethodBodyDisassembler.WriteInstruction (cyclomatic 49) ICSharpCode.Decompiler/Disassembler/MethodBodyDisassembler.cs:327— MethodBodyDisassembler.WriteInstruction 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.
NullableLiftingTransform.Lift (cyclomatic 49) ICSharpCode.Decompiler/IL/Transforms/NullableLiftingTransform.cs:181— NullableLiftingTransform.Lift 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.
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.
TransformCollectionAndObjectInitializers.Run (cyclomatic 49) ICSharpCode.Decompiler/IL/Transforms/TransformCollectionAndObjectInitializers.cs:37— TransformCollectionAndObjectInitializers.Run 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.
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.
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.
CSharpResolver.ResolveUnaryOperator (cyclomatic 46) ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:326— CSharpResolver.ResolveUnaryOperator 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:730— 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:1897— 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:593— 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.
Block.CheckInvariant (cyclomatic 45) ICSharpCode.Decompiler/IL/Instructions/Block.cs:106— Block.CheckInvariant has cyclomatic complexity 45 (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.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.
VariableScope.VariableScope.ctor (cyclomatic 44) ICSharpCode.Decompiler/IL/Transforms/AssignVariableNames.cs:77— VariableScope.VariableScope.ctor has cyclomatic complexity 44 (threshold 15). Of this number, 39 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
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:972— 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.ConvertEnumValue (cyclomatic 43) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:1306— 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.
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:168— 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.
TypeSystemAstBuilder.ConvertTypeHelper (cyclomatic 42) ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs:312— TypeSystemAstBuilder.ConvertTypeHelper has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
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.
AsyncAwaitDecompiler.NormalizeAwaitOnCompletedDualBranch (cyclomatic 41) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:1532— AsyncAwaitDecompiler.NormalizeAwaitOnCompletedDualBranch has cyclomatic complexity 41 (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.
CSharpResolver.BinaryNumericPromotion (cyclomatic 40) ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:1065— 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.
NullPropagationTransform.IsValidAccessChain (cyclomatic 40) ICSharpCode.Decompiler/IL/Transforms/NullPropagationTransform.cs:251— NullPropagationTransform.IsValidAccessChain 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.
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:736— 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:1803— 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.
RunningSearch.ParseInput (cyclomatic 39) ILSpy/Search/RunningSearch.cs:296— RunningSearch.ParseInput 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.
ConstructorInitializerAnalyzer.Analyze (cyclomatic 38) ICSharpCode.Decompiler/CSharp/Transforms/TransformFieldAndConstructorInitializers.cs:282— ConstructorInitializerAnalyzer.Analyze 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.
AsyncAwaitDecompiler.AnalyzeAwaitBlock (cyclomatic 38) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:1615— AsyncAwaitDecompiler.AnalyzeAwaitBlock has cyclomatic complexity 38 (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.
AccessPathElement.GetAccessPath (cyclomatic 38) ICSharpCode.Decompiler/IL/Transforms/TransformCollectionAndObjectInitializers.cs:347— 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.HandleBinaryNumeric (cyclomatic 37) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:1619— ExpressionBuilder.HandleBinaryNumeric 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.
ExpressionBuilder.VisitConv (cyclomatic 37) ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs:2227— 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.
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:99— 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.
AsyncAwaitDecompiler.CheckResumeBlock (cyclomatic 36) ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs:2001— AsyncAwaitDecompiler.CheckResumeBlock has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AwaitInFinallyTransform.Run (cyclomatic 36) ICSharpCode.Decompiler/IL/ControlFlow/AwaitInFinallyTransform.cs:30— AwaitInFinallyTransform.Run has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
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.
ILSpyCmdProgram.OnExecuteAsync (cyclomatic 36) ICSharpCode.ILSpyCmd/IlspyCmdProgram.cs:227— ILSpyCmdProgram.OnExecuteAsync has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TransformAssignment.CheckImplicitTruncation (cyclomatic 35) ICSharpCode.Decompiler/IL/Transforms/TransformAssignment.cs:580— 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.
RemoveCompilerGeneratedAssemblyAttributes.Run (cyclomatic 34) ICSharpCode.Decompiler/CSharp/Transforms/EscapeInvalidIdentifiers.cs:76— 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.
ILTypeExtensions.InferType (cyclomatic 34) ICSharpCode.Decompiler/IL/ILTypeExtensions.cs:169— ILTypeExtensions.InferType 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.
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:938— 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.
CSharpResolver.LookupSimpleNameOrTypeName (cyclomatic 33) ICSharpCode.Decompiler/CSharp/Resolver/CSharpResolver.cs:1472— 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.
OverloadResolution.CheckApplicability (cyclomatic 33) ICSharpCode.Decompiler/CSharp/Resolver/OverloadResolution.cs:639— OverloadResolution.CheckApplicability 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.
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. ...
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.