Public report — OfficeCLI, 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.
Watchdog 05-08-2026 @ 01:04 UTC Public
Code Health Audit

IOfficeAI/OfficeCLI

31% Weak
CriticalWeakAdequateStrongExemplary
lower third — near Critical

Large · 252,792 LoC · 1 projects · rebuild ~64.8 person-years · weakest lens: Code Health (25%)

Grounded in facts. Every number here is computed, not narrated — reproducible, tool-backed, and traceable to a line of code. How to trust this ▸

57/61dimensions tool-verifieddeterministic · confidence 1.0 · 4 LLM-assisted, advisory
2322findings with an exact file:lineof 2335 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
61/107dimensions across the health lenses252792 LoC · 1 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.

iOfficeAI/OfficeCLI carries serious gaps (31%). Several issues below can materially affect correctness, security, or the cost of changing it — and propagate to everything that depends on it.

The area that most needs attention is Code Health (25%) — changes there are slower and more error-prone. Readiness (27%) is the next concern — releases are harder to depend on — versioning, release notes and dependency hygiene are thin, so consumers can't easily tell what changed or trust an upgrade.

Leadership focus, highest impact first: TypeScript for the frontend (Type Safety); Break down the listed branch-heavy functions (Cyclomatic Complexity); each oversized file along the responsibilities already in it (Large Files).

For scale: Large (~252,792 production lines); rebuilding it from scratch would take roughly ~64.8 person-years (~37–124 engineers). Approximate, ±~30%.

How the score is built — each lens's share of the headline Width 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.
Code Health 25% · 46% weightReadiness 27% · 25% weightSecurity 30% · 14% weightMaturity 53% · 8% weightPerformance 60% · 4% weightArchitecture 72% · 2% weight

Raise Code Health 25 → 70 (the Healthy floor) ⇒ headline 31 → ~37.

Code composition — where the lines go
Business logic 84%Plumbing 16%
New since the last scan (40+)

40 finding(s) are new versus the previous scan (2026-07-29) — surfaced by this scheduled scan itself, no pull request required.

  • D1 · WordBatchEmitter.EmitWordWithWarnings (cyclomatic 21) src/officecli/Handlers/Word/WordBatchEmitter.cs
  • D1 · WordBatchEmitter.EmitWordWithWarnings (cyclomatic 17) src/officecli/Handlers/Word/WordBatchEmitter.cs
  • D4 · Duplicated block (17 lines × 2) src/officecli/Core/PivotTableHelper.Render.cs
  • D4 · Duplicated block (12 lines × 2) src/officecli/Core/PivotTableHelper.Render.cs
  • D4 · Duplicated block (10 lines × 2) src/officecli/Core/PivotTableHelper.Render.cs
  • D4 · Duplicated block (7 lines × 5) src/officecli/BlankDocCreator.cs
  • D15 · Hotspot: src/officecli/Core/Formula/FormulaEvaluator.Functions.cs src/officecli/Core/Formula/FormulaEvaluator.Functions.cs
  • D17 · EmptyCatchBlock src/officecli/CommandBuilder.View.cs
  • D17 · EmptyCatchBlock src/officecli/CommandBuilder.View.cs
  • D17 · EmptyCatchBlock src/officecli/CommandBuilder.cs
  • D17 · EmptyCatchBlock src/officecli/Core/HtmlScreenshot.cs
  • D17 · EmptyCatchBlock src/officecli/Core/HtmlScreenshot.cs
  • D17 · EmptyCatchBlock src/officecli/Core/HtmlScreenshot.cs
  • D17 · EmptyCatchBlock src/officecli/Core/HtmlScreenshot.cs
  • D17 · EmptyCatchBlock src/officecli/Core/HtmlScreenshot.cs
  • D17 · EmptyCatchBlock src/officecli/Core/PowerPointPngBackend.cs
  • D17 · EmptyCatchBlock src/officecli/Core/PowerPointPngBackend.cs
  • D17 · EmptyCatchBlock src/officecli/ResidentServer.cs
  • D17 · EmptyCatchBlock src/officecli/ResidentServer.cs
  • R10 · Duplicated block (7 lines × 2 locations) npm/lib/install-binary.js
  • R10 · Duplicated block (5 lines × 2 locations) src/officecli/Resources/watch-sse-core.js
  • R10 · Duplicated block (5 lines × 2 locations) src/officecli/Resources/watch-sse-core.js
  • P12 · Test suite runs only after the merge
  • X1 · Sync-over-async (deadlock risk) src/officecli/Core/Plugins/FormatHandlerSession.cs
  • X1 · Sync-over-async (deadlock risk) src/officecli/Core/Plugins/FormatHandlerSession.cs
  • X3 · Swallowed exception (empty catch) src/officecli/CommandBuilder.cs
  • X3 · Swallowed exception (empty catch) src/officecli/CommandBuilder.View.cs
  • X3 · Swallowed exception (empty catch) src/officecli/CommandBuilder.View.cs
  • X3 · Swallowed exception (empty catch) src/officecli/Core/HtmlScreenshot.cs
  • X3 · Swallowed exception (empty catch) src/officecli/Core/HtmlScreenshot.cs
  • X3 · Swallowed exception (empty catch) src/officecli/Core/HtmlScreenshot.cs
  • X3 · Swallowed exception (empty catch) src/officecli/Core/HtmlScreenshot.cs
  • X3 · Swallowed exception (empty catch) src/officecli/Core/HtmlScreenshot.cs
  • X3 · Swallowed exception (empty catch) src/officecli/Core/Plugins/FormatHandlerSession.cs
  • X3 · Swallowed exception (empty catch) src/officecli/Core/Plugins/FormatHandlerSession.cs
  • X3 · Swallowed exception (empty catch) src/officecli/Core/Plugins/FormatHandlerSession.cs
  • X3 · Swallowed exception (empty catch) src/officecli/Core/Plugins/FormatHandlerSession.cs
  • X3 · Swallowed exception (empty catch) src/officecli/Core/Plugins/FormatHandlerSession.cs
  • X3 · Swallowed exception (empty catch) src/officecli/Core/Plugins/FormatHandlerSession.cs
  • X3 · Swallowed exception (empty catch) src/officecli/Core/Plugins/FormatHandlerSession.cs

A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.

Rebuild cost & value ~ Modeled — €3,000,000–€16,000,000
Cost to rebuild€3,000,000–€16,000,000 (30.1–99.5 person-years (50,616–167,204 h), ~37–124 engineers)
Domain complexityStandard — harder problems cost more per line
Quality factor0.7× (at 31% quality) — the last 20% of quality is most of the work
Size & shapeLarge · 14% boilerplate · 2% straight-line · 84% branching logic
Dead frontend code~38 LoC unreachable (1 file(s)) — that slice of this estimate buys code with zero runtime value; deleting it is the cheapest win in this report (the R7 card lists every file)

This codebase represents roughly ~64.8 person-years of build effort (about ~€9,500,000 to rebuild). Its weakest lens is Code Health at 25% — the part of that asset most exposed by the findings below.

How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.0) — library/CLI, high decision density × a 0.7× 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
Resolve the 1 No automated tests finding(s) in Code Coverage.
+5.1 pts · Low effort · Code Coverage
2
Resolve the 1 No tests found finding(s) in Test Distribution.
+5.1 pts · Low effort · Test Distribution
3
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
+6.6 pts · Medium effort · Type Safety

Diagnosis — what's actually going on

Value concentrated against a weak lens · High · Value at risk
This is a Large asset (~64.8 person-years to rebuild), and its weakest lens is Code Health at 25%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
Evidence: valuation: Large, ~64.8 person-years rebuild (252,792 LoC) · weakest lens: Code Health 25%
→ Direct remediation budget at Code Health first — highest risk-reduction per euro on an asset this size.
The top fix pays for itself · High · Economics
The top-ranked fix costs roughly 1–3 engineer-days once. Not doing it costs about 170.4–1022.5 engineer-days every year, paid as drag on the ~1,212,015 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 6–13% 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: 298,853 line(s) changed over a 90-day window ⇒ ~1,212,015/year · D1/D2/D4/D6 code quality: averaging 5.8/10 ⇒ a 6–13% drag on each change · top-ranked remediation: Low effort ⇒ about 1–3 engineer-day(s)
→ Do the top-ranked fix now if this code will still be yours in 2 months.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
A velocity tax on every change · Medium · Economics
The code-quality signals (complexity, duplication, cohesion) average 5.8/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 6–13% 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 5.8/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 matrix

26 modules, 13 dependencies — 1 dependency cycle, 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.)

(global)OfficeCli.CoreOfficeCli.Core.Diagram…eCli.Core.TableStylesOfficeCli.Help…54361bce99fa5937f349bexamples.excelexamples.excel.chartsexamples.pptexamples.ppt.chartsexamples.ppt.oleexamples.ppt.picturesexamples.ppt.shapesexamples.ppt.tablesexamples.ppt.textboxes…mples.ppt.transitionsexamples.wordsdk.pythonsdk.python.officecli…s.morph-ppt.referenceOfficeCli.Core.Plugins…iceCli.Core.Rendering….TableStyles.Families…li.Handlers.RenderingOfficeCli.HandlersOfficeCli(global)1OfficeCli.Core2OfficeCli.Core.Diagram3…eCli.Core.TableStyles4OfficeCli.Help5…54361bce99fa5937f349b6examples.excel7examples.excel.charts8examples.ppt9examples.ppt.charts10examples.ppt.ole11examples.ppt.pictures12examples.ppt.shapes13examples.ppt.tables14examples.ppt.textboxes15…mples.ppt.transitions16examples.word17sdk.python18sdk.python.officecli19…s.morph-ppt.reference20OfficeCli.Core.Plugins21…iceCli.Core.Rendering22….TableStyles.Families23…li.Handlers.Rendering24OfficeCli.Handlers25OfficeCli2610111218271359112

At a glance — Code Health · 25% · Critical · gated by D1, D2, R1, R2, R3, X1

At a glance — Architecture · 72% · Adequate · gated by D26, AX5

At a glance — Maturity · 53% · Adequate · gated by D15, D16, M2

At a glance — Readiness · 27% · Weak · gated by D8, D9, R4, R6, P3

At a glance — Security · 30% · Weak · gated by D29, C1

At a glance — Performance · 60% · Adequate

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A03:2021 — Injection26High / Critical

Roadmap

Begin by establishing type safety in the frontend by adding a TypeScript check step and converting the highest-traffic modules. Next, reduce cyclomatic complexity in branch-heavy functions to improve maintainability. Then, split the three largest files into smaller, focused modules to improve code organization. Finally, address the 15 instances of sync-over-async patterns to prevent deadlocks, and resolve the 193 cases of swallowed exceptions to ensure robust error handling.

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

Do thisHelpsEffortDimension
Resolve the 1 No automated tests finding(s) in Code Coverage.+5.1 ptsLowCode Coverage
Resolve the 1 No tests found finding(s) in Test Distribution.+5.1 ptsLowTest Distribution
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.+6.6 ptsMediumType Safety
Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.+6.6 ptsMediumCyclomatic Complexity
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.+6.6 ptsMediumLarge Files
Sync-over-async (deadlock risk)+6.4 ptsMediumAsync correctness
Swallowed exception (empty catch)+6.0 ptsMediumException handling
Add a SAST step to CI running what this repository's stack ships: CodeQL's csharp pack (it analyses VB.NET too), or a security analyzer package — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.+5.7 ptsMediumSecurity & performance tooling

File quality

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

FileScoreBandWorst signal
src/officecli/Handlers/PowerPointHandler.cs1.0SlopExplicit Debt: EmptyCatchBlock
src/officecli/Core/Watch/WatchServer.cs1.0SlopExplicit Debt: EmptyCatchBlock
src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Text.cs1.7SlopExplicit Debt: EmptyCatchBlock
src/officecli/Handlers/Pptx/PowerPointHandler.Mutations.cs2.2SlopExplicit Debt: EmptyCatchBlock
src/officecli/ResidentServer.cs2.2SlopExplicit Debt: EmptyCatchBlock
src/officecli/Handlers/Excel/ExcelHandler.Remove.cs2.2SlopExplicit Debt: EmptyCatchBlock
src/officecli/Handlers/Word/WordHandler.Mutations.cs2.3SlopExplicit Debt: EmptyCatchBlock
src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Shapes.cs2.4SlopExplicit Debt: EmptyCatchBlock
src/officecli/Core/UpdateChecker.cs2.4SlopExplicit Debt: EmptyCatchBlock
src/officecli/Handlers/Word/WordHandler.Set.Element.cs2.5SlopExplicit Debt: EmptyCatchBlock
src/officecli/Handlers/Pptx/PowerPointHandler.Set.Media.cs2.8SlopExplicit Debt: EmptyCatchBlock
src/officecli/Handlers/Pptx/PowerPointHandler.Animations.cs2.8SlopExplicit Debt: EmptyCatchBlock
src/officecli/Handlers/Pptx/PowerPointHandler.SvgPreview.cs2.8SlopExplicit Debt: EmptyCatchBlock
src/officecli/Handlers/Word/WordBatchEmitter.Resources.cs2.8SlopExplicit Debt: EmptyCatchBlock
src/officecli/Core/WordPdfBackend.cs3.0SlopExplicit Debt: EmptyCatchBlock
src/officecli/Core/Plugins/FormatHandlerSession.cs3.0SlopExplicit Debt: EmptyCatchBlock
src/officecli/Core/HtmlScreenshot.cs3.0SlopExplicit Debt: EmptyCatchBlock
src/officecli/CommandBuilder.View.cs3.2SlopExplicit Debt: EmptyCatchBlock
src/officecli/Handlers/Word/WordHandler.Navigation.cs3.4SlopExplicit Debt: EmptyCatchBlock
src/officecli/Handlers/Word/WordHandler.Add.Misc.cs3.4SlopExplicit Debt: EmptyCatchBlock

Methodology & how to trust this report

Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 57 of 61 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 4 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.6 — 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 — 61 dimensions across the health lenses
D1D2D3D4D5D6D8D9D12D13D14D15D16D17D18D19D20D21D24D26D27D28D29D33D34D35D36D37AX10AX3AX4AX5AX6C1GD1IC1M1M2M3M4P1P2P3P4P6PF1PF2PF3R1R10R2R3R4R6R7R8R9X1X2X3X5

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

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

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

Tools & methods

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

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
jscpdCode duplication✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.302✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.302✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivySecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3✓ deterministic
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurementLocal LLM◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 019fcf73-1841-79e4-b72e-89e665c947b8.

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

Run transparency — what happened this run

A clean run — every tool resolved and ran, and every applicable dimension was measured at full confidence. No scanner was unavailable, no analysis timed out or crashed, and nothing fell back to a degraded estimate.

When something does degrade — a missing scanner, a shallow clone, an LLM hiccup — it is named here explicitly and its exact cause recorded in diagnostics.md, never absorbed silently into the score.

Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity (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.
  • D8 Code Coverage: Coverage is measured by building and running the test suite inside Watchdog's isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 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.
  • D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement.
  • 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.
  • D24 Comment Value: Comment value (WHY vs WHAT) is an LLM judgement over a bounded sample — it is advisory and cannot weigh a comment against the precise code change it was written to explain.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • 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 (5): D19, D20, D21, D24, 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.

Dimensions

D1 · Cyclomatic Complexity2.0 / 10Critical✓ Tool-verified

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

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

Maturity: DocumentedVerifiedPrevented · effective 2.0 / 10 · rule-coverage 100% · ceiling Prevented

758 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was ChartHelper.SetChartProperties at 805. A further 67 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 FormulaParser.CommandToSymbol at 213 — they are counted neither in the figure above nor in this dimension's score.

ChartHelper.SetChartProperties (cyclomatic 805)src/officecli/Core/Chart/ChartHelper.Setter.cs:219
PowerPointHandler.SetRunOrShapeProperties (cyclomatic 565)src/officecli/Handlers/Pptx/PowerPointHandler.ShapeProperties.cs:165
FormulaEvaluator.EvalFunction (cyclomatic 545)src/officecli/Core/Formula/FormulaEvaluator.Functions.cs:13
WordHandler.AddParagraph (cyclomatic 543)src/officecli/Handlers/Word/WordHandler.Add.Text.cs:13
WordHandler.ParagraphToNode (cyclomatic 468)src/officecli/Handlers/Word/WordHandler.Navigation.cs:3838

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

What to do

  1. Resolve the 1 ChartHelper.SetChartProperties (cyclomatic 805) finding(s) in Cyclomatic Complexity — start with ChartHelper.Setter.cs. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 PowerPointHandler.SetRunOrShapeProperties (cyclomatic 565) finding(s) in Cyclomatic Complexity — start with PowerPointHandler.ShapeProperties.cs. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 FormulaEvaluator.EvalFunction (cyclomatic 545) finding(s) in Cyclomatic Complexity — start with FormulaEvaluator.Functions.cs. — One of this dimension's main actionable groups (1 warning-level).
  4. 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.

D2 · Cognitive Complexity1.4 / 10Critical✓ Tool-verified

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

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

Maturity: DocumentedVerifiedPrevented · effective 1.4 / 10 · rule-coverage 100% · ceiling Prevented

1015 method(s) exceeded the cognitive complexity threshold of 15; the worst was ChartHelper.SetChartProperties at 1567.

(anonymous) (cognitive 34) · ×2src/officecli/Resources/watch-sse-core.js:147
(anonymous) (cognitive 16) · ×2src/officecli/Resources/watch-overlay.js:642
ChartHelper.SetChartProperties (cognitive 1567)src/officecli/Core/Chart/ChartHelper.Setter.cs:219
WordHandler.ParagraphToNode (cognitive 1182)src/officecli/Handlers/Word/WordHandler.Navigation.cs:3838
WordHandler.QueryDispatch (cognitive 1164)src/officecli/Handlers/Word/WordHandler.Query.cs:1735

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

What to do

  1. Resolve the 2 (anonymous) (cognitive 34) finding(s) in Cognitive Complexity — start with watch-sse-core.js (2). — One of this dimension's main actionable groups (2 warning-level).
  2. Resolve the 2 (anonymous) (cognitive 16) finding(s) in Cognitive Complexity — start with watch-overlay.js, preview.js. — One of this dimension's main actionable groups (2 warning-level).
  3. Resolve the 1 ChartHelper.SetChartProperties (cognitive 1567) finding(s) in Cognitive Complexity — start with ChartHelper.Setter.cs. — One of this dimension's main actionable groups (1 warning-level).
  4. 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.

D3 · God Classes8.3 / 10Strong✓ Tool-verified

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

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

Maturity: DocumentedVerifiedPrevented · effective 8.3 / 10 · rule-coverage 100% · ceiling Prevented

106 god class(es) detected.

FileTooLong: Chart/ChartSvgRenderer.cs · ×82src/officecli/Core/Chart/ChartSvgRenderer.cs:0
TooManyMethods: WordHandler · ×19src/officecli/Handlers/Word/WordHandler.HtmlPreview.Css.cs:0
ClassTooLong: ChartExBuilder · ×5src/officecli/Core/Chart/ChartExBuilder.cs:0

What to do

  1. Resolve the 82 FileTooLong finding(s) in God Classes — start with ChartSvgRenderer.cs, WordHandler.Navigation.cs, PowerPointHandler.cs. — One of this dimension's main actionable groups (82 warning-level).
  2. Resolve the 19 TooManyMethods finding(s) in God Classes — start with WordHandler.HtmlPreview.Css.cs, PowerPointHandler.HtmlPreview.Css.cs, ExcelHandler.HtmlPreview.cs. — One of this dimension's main actionable groups (19 warning-level).
  3. Resolve the 5 ClassTooLong finding(s) in God Classes — start with ChartExBuilder.cs, RawXmlHelper.cs, BlankDocCreator.cs. — One of this dimension's main actionable groups (5 warning-level).
  4. 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.

D4 · Code Duplication9.6 / 10Exemplary✓ Tool-verified

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.

Maturity: DocumentedVerifiedPrevented · effective 9.6 / 10 · rule-coverage 100% · ceiling Verified

203 duplicated block group(s) detected.

Duplicated block (8 lines × 2) · ×26src/officecli/CommandBuilder.cs:1324
Duplicated block (6 lines × 2) · ×24src/officecli/Core/Chart/ChartHelper.Builder.cs:1256
Duplicated block (5 lines × 2) · ×24src/officecli/CommandBuilder.View.cs:327
Duplicated block (9 lines × 2) · ×23src/officecli/CommandBuilder.Check.cs:16
Duplicated block (7 lines × 2) · ×20src/officecli/Core/Chart/ChartHelper.Reader.cs:622

+ 29 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.

D5 · Coupling10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.

Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.

Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

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

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

D6 · Cohesion (LCOM4)10.0 / 10Exemplary✓ Tool-verified

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

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

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

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 of 22 classes have LCOM4 above 3.

✓ On the Gold path — maintain.

Detailed fixes: d6_recommendation.md.

D8 · Code Coverage0.0 / 10Critical✓ Tool-verified

What it measures: How much of the code is actually exercised by tests.

Method: Coverage from coverlet runs or committed reports (Cobertura/OpenCover/lcov), computed per-file with structured exclusions for generated, trivial, and glue code. When the suite can't be built/run in-image AND no report is committed, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.

Maturity: DocumentedVerifiedPrevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Verified

No automated tests — no test code was found in this repository.

No automated tests

What to do

  1. Resolve the 1 No automated tests finding(s) in Code Coverage. — One of this dimension's main actionable groups (1 issue-level).
  2. Enforce Code Coverage in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D9 · Test Distribution0.0 / 10Critical✓ 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.

Maturity: DocumentedVerifiedPrevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

No test suite found.

No tests found

What to do

  1. Resolve the 1 No tests found finding(s) in Test Distribution. — One of this dimension's main actionable groups (1 recommendation-level).

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

D12 · Dependency Hygiene10.0 / 10Exemplary✓ Tool-verified

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.

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 outdated, 0 vulnerable, 0 deprecated packages.

✓ On the Gold path — maintain.

Detailed fixes: d12_recommendation.md.

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

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

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

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 of 2 packages use a banned license.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots1.4 / 10Critical✓ Tool-verified

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

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

Maturity: DocumentedVerifiedPrevented · effective 1.4 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: src/officecli/Handlers/Word/WordHandler.Navigation.cs (195×468=91260); src/officecli/Core/Chart/ChartHelper.Setter.cs (96×805=77280); src/officecli/Handlers/Pptx/PowerPointHandler.ShapeProperties.cs (103×565=58195)

Hotspot: src/officecli/Handlers/Word/WordHandler.Navigation.cs · ×10src/officecli/Handlers/Word/WordHandler.Navigation.cs

What to do

  1. Resolve the 10 Hotspot finding(s) in Churn × Complexity Hotspots — start with WordHandler.Navigation.cs, ChartHelper.Setter.cs, PowerPointHandler.ShapeProperties.cs. — One of this dimension's main actionable groups (10 warning-level).

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

D16 · Bus Factor0.9 / 10Critical✓ 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.

Maturity: DocumentedVerifiedPrevented · effective 0.9 / 10 · rule-coverage 100% · ceiling Documented

283 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is src/officecli/Handlers/Word/WordHandler.Navigation.cs.

Off-boarding risk: anonymized user #1

What to do

  1. Resolve the 1 Off-boarding risk 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.

D17 · Explicit Debt8.5 / 10Strong✓ Tool-verified

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.

Maturity: DocumentedVerifiedPrevented · effective 8.5 / 10 · rule-coverage 100% · ceiling Prevented

198 deducted debt markers + 0 dead symbols across 252792 LoC (0.8/KLoC) → score 8.5.

EmptyCatchBlock · ×193src/officecli/BlankDocCreator.cs:64
BarePragmaDisable · ×3src/officecli/Core/RawXmlHelper.cs:1043
TodoComment · ×2src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Text.cs:940

What to do

  1. Resolve the 193 EmptyCatchBlock finding(s) in Explicit Debt — start with ResidentServer.cs (20), UpdateChecker.cs (19), WatchServer.cs (16). — One of this dimension's main actionable groups (193 issue-level).
  2. Resolve the 3 BarePragmaDisable finding(s) in Explicit Debt — start with PowerPointHandler.View.cs (2), RawXmlHelper.cs. — One of this dimension's main actionable groups (3 warning-level).
  3. Resolve the 2 TodoComment finding(s) in Explicit Debt — start with PowerPointHandler.HtmlPreview.Text.cs, PowerPointHandler.SvgPreview.cs. — One of this dimension's main actionable groups (2 warning-level).
  4. Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D18 · Solution Shape8.0 / 10Strong✓ Tool-verified

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.

Maturity: DocumentedVerifiedPrevented · effective 8.0 / 10 · rule-coverage 100% · ceiling Documented

1 projects, 342 source files, 252792 hand-written lines of code (252792 production / 0 test), 0 inter-project edges (build status unknown — did not finish).

Solution references a project that does not existofficecli.slnx
Single-project monolith
Build status unknown

What to do

  1. Resolve the 1 Solution references a project that does not exist finding(s) in Solution Shape — start with officecli.slnx. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 Single-project monolith finding(s) in Solution Shape. — One of this dimension's main actionable groups (1 recommendation-level).

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

D19 · Documentation Quality / 10Strong◐ Sampled · advisory

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

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.

Maturity: DocumentedVerifiedPrevented · effective Strong / 10 · rule-coverage 100% · ceiling Documented

OfficeCLI's documentation is clear and complete for a single-binary CLI tool: an English README with a GitHub release badge, a multi-image PPT-process demo, a schemas/README explaining runtime-schema consumption (binary embedded vs contract tests), npm install notes including Developer ID signing, and examples directories. The README itself is long but clipped mid-table of the full outline; the visible content covers installation, quick start, usage, and an overview of the rendering pipeline, while the remaining sections are present in the outline and not yet shown.

The 'For AI Agents' section is cut off mid-table (PPT creation process) by the scanner; it cannot be confirmed whether the agent-getting-in-one-line guide is fully present or needs a fix.README.md
The editing rule (PR must update matching schema file) and Not here section are clipped mid-table; the visible layout and enforcement discipline are intact.schemas/README.md
XML-doc coverage: officeclisrc/officecli/officecli.csproj

What to do

  1. Resolve the 1 The 'For AI Agents' section is cut off mid-table (PPT creation process)… finding(s) in Documentation Quality — start with README.md. — One of this dimension's main actionable groups (1 recommendation-level).
  2. Resolve the 1 The editing rule (PR must update matching schema file) and Not here… finding(s) in Documentation Quality — start with README.md. — One of this dimension's main actionable groups (1 recommendation-level).

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

D20 · ADR Quality / 10Critical◐ Sampled · advisory

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.

Maturity: DocumentedVerifiedPrevented · effective Critical / 10 · rule-coverage 100% · ceiling Documented

No architecture decision records were found.

No ADRs found

What to do

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

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

D21 · Naming Consistency / 10Exemplary◐ Sampled · 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.

Maturity: DocumentedVerifiedPrevented · effective Exemplary / 10 · rule-coverage 100% · ceiling Verified

0 naming inconsistencies across 200 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

D24 · Comment Value / 10Exemplary◐ Sampled · advisory

What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).

Method: Judged by language model at low temperature (0.0-0.1) on deterministically sampled inline comments with surrounding code; findings verified back to sampled comments by substring match. Advisory, sampled.

Maturity: DocumentedVerifiedPrevented · effective Exemplary / 10 · rule-coverage 100% · ceiling Documented

62 valuable / 0 redundant across 200 sampled comments.

✓ On the Gold path — maintain.

Detailed fixes: d24_recommendation.md.

D26 · Project Cohesion0.0 / 10Critical✓ Tool-verified

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

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

Maturity: DocumentedVerifiedPrevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

1 of 1 projects flagged as possibly oversized/incoherent.

Split officecli

What to do

  1. Resolve the 1 Split officecli finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).

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

D27 · Navigability7.8 / 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.

Maturity: DocumentedVerifiedPrevented · effective 7.8 / 10 · rule-coverage 100% · ceiling Documented

79 % of calls cross a namespace and 3 % go through an interface, but 84 % 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

  1. Improve Navigability — currently 7.8/10. — 79 % of calls cross a namespace and 3 % go through an interface, but 84 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: large — vertical-slice locality expected.

Detailed fixes: d27_recommendation.md.

D28 · Secrets (history)10.0 / 10Exemplary○ Nothing flagged

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.

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

gitleaks scanned the full history AND the current working tree and found no secrets.

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)0.3 / 10Critical✓ Tool-verified

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

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

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

Maturity: DocumentedVerifiedPrevented · effective 0.3 / 10 · rule-coverage 100% · ceiling Documented

26 finding(s): 0 critical, 18 high, 8 medium, 0 low.

High: github-actions-mutable-action-tag · ×18.github/workflows/build.yml:48detected by semgrep finding
Medium: regular-expression-dos · ×8src/officecli/Core/GenericXmlQuery.cs:666detected by semgrep finding

What to do

  1. Resolve the 18 High finding(s) in Static Analysis (SAST) — start with build.yml (5), publish-npm.yml (4), publish-pypi.yml (3). — One of this dimension's main actionable groups (18 issue-level).
  2. Resolve the 8 Medium finding(s) in Static Analysis (SAST) — start with PowerPointHandler.cs (6), GenericXmlQuery.cs, PowerPointHandler.Query.cs. — One of this dimension's main actionable groups (8 warning-level).

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

D33 · JS/npm Dependency Vulnerabilities10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether JavaScript/npm dependencies have known published vulnerabilities (CVEs) — the npm ecosystem's biggest risk.

Method: JS/npm CVE scan via trivy fs --scanners vuln over JS manifests (package.json/yarn.lock/pnpm-lock/bun.lockb); 0-10 tight normalizer. NotApplicable without JS manifests. Exhaustive, deterministic.

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No known-vulnerable JS/npm dependencies.

✓ On the Gold path — maintain.

Detailed fixes: d33_recommendation.md.

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

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

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

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

Every significant source file has living knowledge — recently and meaningfully worked.

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md.

D35 · Change Coupling9.9 / 10Exemplary✓ Tool-verified

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

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

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling; coupling through a build step, config, or non-source file isn't seen.

Maturity: DocumentedVerifiedPrevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: WatchServer.cs↔watch-sse-core.js 60%; ExcelHandler.cs↔WordHandler.cs 51%

Change coupling: WatchServer.cs ↔ watch-sse-core.js · ×2src/officecli/Core/Watch/WatchServer.cs

✓ On the Gold path — maintain.

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

D36 · Supply-chain Provenance & Signing5.0 / 10Adequate✓ Tool-verified

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.

Maturity: DocumentedVerifiedPrevented · effective 5.0 / 10 · rule-coverage 100% · ceiling Documented

2/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).

Unpinned build actions
Secret passed as a command-line argument
No SBOM

What to do

  1. Resolve the 1 Unpinned build actions finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  2. 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).
  3. Resolve the 1 No SBOM 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.

D37 · Vulnerability-disclosure Policy10.0 / 10Exemplary✓ Tool-verified

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.

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

A vulnerability-disclosure policy (SECURITY.md) is published with a reporting contact.

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

Frontend & cross-cutting dimensions

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

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

Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified.

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).
AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

AX5 · Architecture & structure3.0 / 10Weak✓ Tool-verified

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.

  • ~252.8k production LoC (476 types) across 1 project(s) / 25 namespace(s) with no recognised architectural style or layering — at this size, deliberate module boundaries would help. No DDD/clean/vertical-slice/CQRS/transaction-script organisation was detected — code is likely organised ad hoc, which makes change and onboarding harder as it grows.

What to do

  • Introduce deliberate module boundaries — by feature (vertical slices) if your team prefers, or by layer (domain/application/infrastructure). Even splitting into a few cohesive projects with a clear dependency direction would help.
AX6 · Interface segregation8.7 / 10Strong✓ Tool-verified

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.

  • `IDocumentHandler` declares 21 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. — IDocumentHandler.cs:65

What to do

  • Split fat interfaces into focused role-interfaces so clients depend only on what they use.
C1 · Data Protection0.0 / 10Critical✓ Tool-verified

Other · Security — Whether sensitive data is encrypted at rest and in transit and keys are vaulted.

Method: Roslyn plus filesystem scan: encryption presence (EF ColumnEncryption, key-vault references, HTTPS enforcement) and key-derivation KDF detection. Deterministic.

  • No data-protection or encryption usage (ASP.NET Data Protection, AES, column encryption, PBKDF2) was found — sensitive data at rest may be unprotected. If TDE/KMS/vault is delegated to infrastructure, ignore.

What to do

  • Encrypt sensitive data at rest (ASP.NET Core Data Protection / column encryption) and manage keys in a vault. Skip if delegated to infra (Postgres TDE, KMS, etc.).
  • Enforce HTTPS (UseHttpsRedirection / RequireHttpsMetadata) so data in transit is always encrypted.
GD1 · Unfinished & placeholder code9.9 / 10Exemplary✓ Tool-verified

Other · Code Health — Unreviewed-generation residue: shipped members still throwing NotImplementedException, and placeholder string literals left in non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.

Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.

  • A placeholder string ("Replacement text for --find matches. Equ…") is still in shipped code — typical of generated boilerplate that was never filled in. — CommandBuilder.Set.cs:21
  • A placeholder string ("Excel only supports 'find' with 'replace…") is still in shipped code — typical of generated boilerplate that was never filled in. — ExcelHandler.Set.cs:67
  • A placeholder string ("hyperlink requires --prop link=<url>. Ex…") is still in shipped code — typical of generated boilerplate that was never filled in. — PowerPointHandler.Hyperlinks.cs:165
  • A placeholder string ("text insertion/replacement via range is …") is still in shipped code — typical of generated boilerplate that was never filled in. (×2) — PowerPointHandler.Set.cs:77, WordHandler.Set.cs:108
  • A placeholder string ("tooltip requires an existing hyperlink —…") is still in shipped code — typical of generated boilerplate that was never filled in. — PowerPointHandler.Set.Shape.cs:1921

What to do

  • Finish or delete NotImplementedException stubs and replace placeholder literals before shipping.
IC1 · Incompleteness & stubs10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Unfinished work detected by code SHAPE, not keywords: members that only throw a "not implemented" exception, methods that take inputs and return a constant, async methods that never await, dead `if (false)` / `#if false` branches, and skeleton types most of whose members are holes. A real, objective slice of technical debt.

Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.

M1 · Documentation (README)7.3 / 10Strong✓ Tool-verified

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 a README to the 1 of 1 project(s) that lack one — worth up to 2 pts.
M2 · Architecture documentation3.0 / 10Weak✓ Tool-verified

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

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

  • No Architecture Decision Records found — no conventional ADR directory, no `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).
M3 · Folder & project structure8.0 / 10Strong✓ Tool-verified

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.

  • No test surface was found — there are no tests here to separate from production code, so the folder question hasn't been reached yet.

What to do

  • Start a test surface where your build system looks for one (tests/, test/, spec/, or your ecosystem's test source set) — the separation follows from putting the first tests in the right place.
M4 · Documentation accuracy8.0 / 10Strong◐ Sampled · advisory

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 advertises Docker containerisation, but no Dockerfile/compose file exists

What to do

  • Reconcile the README with reality: README advertises Docker containerisation, but no Dockerfile/compose file exists.
P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

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

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

P2 · Observability7.0 / 10Strong✓ Tool-verified

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

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

What to do

  • Consider OpenTelemetry tracing/metrics and a health-check endpoint for operability.
P3 · Security & performance tooling0.0 / 10Critical✓ Tool-verified

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

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

  • No static application security testing detected. For this repository's stack, add CodeQL's csharp pack (it analyses VB.NET too), or a security analyzer package (or `semgrep --config=auto`, which runs on any language) as a CI step.

What to do

  • Add a SAST step to CI running what this repository's stack ships: CodeQL's csharp pack (it analyses VB.NET too), or a security analyzer package — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback7.0 / 10Strong✓ Tool-verified

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.

P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

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.

PF1 · Benchmark discipline6.0 / 10Adequate✓ Tool-verified

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).
PF2 · Allocation hygiene6.0 / 10Adequate✓ Tool-verified

Readiness · Performance — Whether the code is written to minimise allocations so it doesn't pressure its host's memory manager — buffer/slice views over copies, object pooling, stack or value-type allocation, and buffer writers. Reward-only: credited where present, never penalised where a simpler style is fine.

Method: Production-source scan: density (per 1k LoC) of allocation-aware APIs — Span/Memory, ArrayPool/ObjectPool, stackalloc, ValueTask, value-type structs, IBufferWriter, string.Create, SkipLocalsInit. Reward-only. Deterministic, syntax/text detection.

What to do

  • Raise allocation-aware density on the hot paths — currently 13 use(s) across 252,815 production line(s) (~0.1/1k). More Span/Memory, pooling (ArrayPool/ObjectPool), stackalloc and ValueTask on the allocation-heavy paths climbs this toward 10.
PF3 · Async & latency hygiene6.0 / 10Adequate✓ Tool-verified

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.

  • 15 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.
R1 · Type Safety0.0 / 10Critical✓ Tool-verified

React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.

Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.

  • 0 typed · 9 plain JS — the untyped files are npm/install.js, npm/lib/install-binary.js, npm/officecli.js, sdk/node/demo.js, sdk/node/index.js, sdk/node/smoke.js (+3 more).

What to do

  • Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
R10 · Code Duplication8.8 / 10Strong✓ Tool-verified

React / JS · Code Health — Copy-pasted token-identical blocks across the frontend (the D4 clone algorithm over JS/TS tokens, D-386).

Method: Copy-pasted token-identical blocks across the frontend (the D4 clone algorithm run over JS/TS tokens). Deterministic.

  • src/officecli/Resources/watch-overlay.js:828 · src/officecli/Resources/watch-overlay.js:868 — 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. — watch-overlay.js:828
  • src/officecli/Resources/watch-sse-core.js:162 · src/officecli/Resources/watch-sse-core.js:231 — 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. — watch-sse-core.js:162
  • npm/lib/install-binary.js:1 · sdk/node/index.js:1 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — install-binary.js:1
  • src/officecli/Resources/watch-sse-core.js:30 · src/officecli/Resources/watch-sse-core.js:79 — 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. — watch-sse-core.js:30
  • src/officecli/Resources/watch-overlay.js:669 · src/officecli/Resources/watch-overlay.js:674 — 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. — watch-overlay.js:669
  • src/officecli/Resources/watch-sse-core.js:41 · src/officecli/Resources/watch-sse-core.js:147 — 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. — watch-sse-core.js:41
  • src/officecli/Resources/watch-sse-core.js:61 · src/officecli/Resources/watch-sse-core.js:66 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — watch-sse-core.js:61

What to do

  • Extract the duplicated blocks into shared functions/components.
R2 · Cyclomatic Complexity0.0 / 10Critical✓ Tool-verified

React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.

Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.

  • Branch-heavy code is where defects cluster — extract decisions into smaller functions. (×8) — watch-overlay.js:423, watch-sse-core.js:318, watch-overlay.js:822, …

What to do

  • Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
R3 · Large Files0.0 / 10Critical✓ Tool-verified

React / JS · Code Health — How many source files exceed the large-file threshold.

Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.

  • 3 file(s) over 400 lines (counted as significant lines — blank lines excluded — over production source only, tests excluded), largest first: src/officecli/Resources/watch-overlay.js (1013), sdk/node/index.js (604), src/officecli/Resources/watch-sse-core.js (455).

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage2.5 / 10Weak✓ Tool-verified

React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.

Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.

  • No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×6) — watch-overlay.js, watch-sse-core.js, preview.js, …

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R6 · Tooling0.0 / 10Critical✓ Tool-verified

React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.

Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.

  • test ✗ · lint ✗ · typecheck ✗

What to do

  • Add a test runner (vitest / jest / playwright) and eslint and type checking (adopt TypeScript, or type-check the existing JavaScript with `checkJs`) as package.json scripts and run them in CI.
R7 · Dead Code9.7 / 10Exemplary✓ Tool-verified

React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).

Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.

  • 3 file(s) (~1737 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package.
  • Unreachable from the 5 application, 2 tooling and 1 test entry point(s) detected in this repo. Gate removals on your build/type-check — an undetected custom entry would make these reachable.
  • no import path from any entry point (5 application, 2 tooling, 1 test roots considered) — demo.js

What to do

  • Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R8 · Dependency Hygiene10.0 / 10Exemplary✓ Tool-verified

React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.

Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.

R9 · Circular Imports10.0 / 10Exemplary✓ Tool-verified

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

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

X1 · Async correctness3.4 / 10Weak✓ Tool-verified

Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.

Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.

  • Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process. (×14) — CommandBuilder.cs:160, CommandBuilder.Watch.cs:99, MermaidImageRenderer.cs:85, …
  • Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` wastes a thread and, if the task needs a context this one is holding, deadlocks. `Dispose()` returns void by contract, so it cannot simply `await`: signal the work to stop first (cancel its token, set its stop flag) so the wait is short, give the wait a TIMEOUT so a hung task cannot hang shutdown, and — where callers can use it — add an awaitable teardown (`DisposeAsync`/`StopAsync`) beside the synchronous one and let `Dispose()` remain the bounded fallback. — FormatHandlerSession.cs:344

What to do

  • Sync-over-async (deadlock risk)
X2 · Cancellation propagation9.4 / 10Exemplary✓ Tool-verified

Other · Code Health — Whether async methods accept a CancellationToken so work can be cancelled (adoption curve).

Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage.

  • Only 26/29 async methods accept a CancellationToken, so in-flight work can't be stopped early when the caller gives up — whatever ends it in your host (shutdown signal, timeout, abandoned request, user cancel). Thread a token through the call chain and honour it at each await and loop; where a method genuinely cannot be interrupted, omitting it is a deliberate choice — judge against your hosting model.
  • No CancellationToken parameter — this work can't be stopped early once started. (×2) — WatchServer.cs:446, ResidentServer.cs:2709
  • No CancellationToken parameter — the body observes an ambient token instead (a field or a context object), so the work does stop on cancellation, but a caller cannot cancel this call independently of the owner that created that token. — McpServer.cs:21

What to do

  • Thread a CancellationToken through async methods so work stops promptly on cancellation.
X3 · Exception handling5.0 / 10Adequate✓ Tool-verified

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×19) — BlankDocCreator.cs:64, CommandBuilder.cs:1889, CommandBuilder.Plugins.cs:168, …
  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `Dispose()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch. (×6) — FormatHandlerSession.cs:339, FormatHandlerSession.cs:350, FormatHandlerSession.cs:355, …

What to do

  • Swallowed exception (empty catch)
X5 · Nullable reference types9.2 / 10Exemplary✓ Tool-verified

Other · Code Health — Whether nullable reference types are enabled and not undermined by heavy `!` suppression.

Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.

  • ~1.0 `!` suppressions per 1k syntax nodes — 1563 suppression(s) across the 1494782 syntax node(s) in code where nullable warnings are ENABLED, which is the only code a `!` can suppress anything in (a `!` under `#nullable disable` is inert and is not counted, and its file's nodes are not in the denominator). Each one tells the compiler to trust you about null, suppressing the very safety NRTs provide.

What to do

  • Enable <Nullable>enable</Nullable> across all projects and resolve warnings rather than suppressing with `!`.

Reference — by lens

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

LensScoreRatingImpact
Code Health25%Critical — gated by D1, D2, R1, R2, R3, X1Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture72%Adequate — gated by D26, AX5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity53%Adequate — gated by D15, D16, M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness27%Weak — gated by D8, D9, R4, R6, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security30%Weak — gated by D29, C1Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance60%AdequateStrongest area.
Not included — 46 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — no DI registrations detected
  • AX2 Stateful singletons — no singleton implementations detected
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • 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 — Repo shows no audit-logging mechanism (IAuditable, an immutable audit log, an EF SaveChanges interceptor) for sensitive changes — absence of evidence is not evidence of a working control. Record an audit trail in code (or document where it lives) so this dimension can be scored.
  • C4 Data Retention — Repo shows no data-retention / TTL / cleanup mechanism for personal data — absence of evidence is not evidence of a working control. Define retention periods and a purge/cleanup job (or TTL) in code, or document where retention is enforced, so this dimension can be scored.
  • C5 Data-Subject Rights — Repo shows no corroborated data-subject-rights mechanism (erasure / export-portability / consent) tied to a subject id or GDPR vocabulary — absence of evidence is not evidence of a working control. Implement erasure, data export/portability and consent tracking over the subject's records.
  • D10 Test Quality — No tests were found in the analyzed repository to assess for quality.
  • D11 Test Reliability — Test reliability not included
  • D22 Internal API Consistency — No exposed public API
  • D23 Boundary Type-Coupling — At only 252792 LoC across a single project the codebase is trivially small and has no boundaries to declare.
  • 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
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Terraform, Kubernetes/Helm, CloudFormation); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — No PII/GDPR-handling patterns detected (p/gdpr ruleset) — no data-compliance surface to assess.
  • D38 OSV Dependency Vulnerabilities — Scanner failed to run — not a clean result
  • 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
  • DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this check looks for (4 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.
  • 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
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • R5 Dependency Freshness — no package-lock.json — dependency freshness not measured (would require an npm lockfile); JS/npm CVEs are scored in D33 (JS/npm Dependency Vulnerabilities)
  • 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.
  • X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X6 Hand-rolled structured-format parsing — 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.

Issue — 212 finding(s)
D17 · Explicit Debt · EmptyCatchBlock · ×193
  • EmptyCatchBlock src/officecli/BlankDocCreator.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.
  • EmptyCatchBlock src/officecli/CommandBuilder.Plugins.cs:168 — 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.
  • EmptyCatchBlock src/officecli/CommandBuilder.View.cs:334 — 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.
  • EmptyCatchBlock src/officecli/CommandBuilder.View.cs:460 — 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.
  • EmptyCatchBlock src/officecli/CommandBuilder.View.cs:611 — 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.
  • EmptyCatchBlock src/officecli/CommandBuilder.cs:1889 — 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.
  • EmptyCatchBlock src/officecli/Core/CliLogger.cs:35 — 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.
  • EmptyCatchBlock src/officecli/Core/Formula/FormulaEvaluator.Helpers.cs:355 — 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.
  • EmptyCatchBlock src/officecli/Core/HtmlScreenshot.cs:60 — 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.
  • EmptyCatchBlock src/officecli/Core/HtmlScreenshot.cs:321 — 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.
  • EmptyCatchBlock src/officecli/Core/HtmlScreenshot.cs:322 — 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.
  • EmptyCatchBlock src/officecli/Core/HtmlScreenshot.cs:325 — 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.
  • EmptyCatchBlock src/officecli/Core/HtmlScreenshot.cs:573 — 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.
  • EmptyCatchBlock src/officecli/Core/HtmlScreenshot.cs:598 — 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.
  • EmptyCatchBlock src/officecli/Core/Installer.cs:264 — 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.
  • EmptyCatchBlock src/officecli/Core/Installer.cs:294 — 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.
  • EmptyCatchBlock src/officecli/Core/Plugins/DumpReaderInvoker.cs:195 — 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.
  • EmptyCatchBlock src/officecli/Core/Plugins/FormatHandlerProxy.cs:354 — 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.
  • EmptyCatchBlock src/officecli/Core/Plugins/FormatHandlerSession.cs:339 — 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.
  • EmptyCatchBlock src/officecli/Core/Plugins/FormatHandlerSession.cs:350 — 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.
  • EmptyCatchBlock src/officecli/Core/Plugins/FormatHandlerSession.cs:355 — 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.
  • EmptyCatchBlock src/officecli/Core/Plugins/FormatHandlerSession.cs:356 — 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.
  • EmptyCatchBlock src/officecli/Core/Plugins/FormatHandlerSession.cs:366 — 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.
  • EmptyCatchBlock src/officecli/Core/Plugins/FormatHandlerSession.cs:369 — 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.
  • EmptyCatchBlock src/officecli/Core/Plugins/FormatHandlerSession.cs:374 — 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.
  • + 168 more in this group — see findings.md.
D29 · Static Analysis (SAST) · High · ×18
  • High: github-actions-mutable-action-tag .github/workflows/build.yml:48 — 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@v5`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v5 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/build.yml:51 — 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@v5`; resolve the SHA it points at today with `gh api repos/actions/setup-dotnet/commits/v5 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/build.yml:202 — 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@v6`; resolve the SHA it points at today with `gh api repos/actions/upload-artifact/commits/v6 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/build.yml:215 — 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/download-artifact@<40-character SHA>`. This step references `actions/download-artifact@v8`; resolve the SHA it points at today with `gh api repos/actions/download-artifact/commits/v8 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/build.yml:231 — 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: softprops/action-gh-release@<40-character SHA>`. This step references `softprops/action-gh-release@v3`; resolve the SHA it points at today with `gh api repos/softprops/action-gh-release/commits/v3 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/publish-npm.yml:42 — 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@v5`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v5 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/publish-npm.yml:44 — 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-node@<40-character SHA>`. This step references `actions/setup-node@v6`; resolve the SHA it points at today with `gh api repos/actions/setup-node/commits/v6 --jq .sha`.
  • High: run-shell-injection .github/workflows/publish-npm.yml:56 — Using variable interpolation `${{...}}` with `github` context data in a `run:` step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. `github` context data can have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment variable with `env:` to store the data and use the environment variable in the `run:` script. Reference it as a shell VARIABLE rather than a `${{ }}` interpolation, using your shell's own syntax (`"$ENVVAR"` in bash, `$env:ENVVAR` in PowerShell), so the value is passed as data and never re-expanded as code.
  • High: run-shell-injection .github/workflows/publish-npm.yml:92 — Using variable interpolation `${{...}}` with `github` context data in a `run:` step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. `github` context data can have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment variable with `env:` to store the data and use the environment variable in the `run:` script. Reference it as a shell VARIABLE rather than a `${{ }}` interpolation, using your shell's own syntax (`"$ENVVAR"` in bash, `$env:ENVVAR` in PowerShell), so the value is passed as data and never re-expanded as code.
  • High: github-actions-mutable-action-tag .github/workflows/publish-pypi.yml:31 — 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@v5`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v5 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/publish-pypi.yml:33 — 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-python@<40-character SHA>`. This step references `actions/setup-python@v5`; resolve the SHA it points at today with `gh api repos/actions/setup-python/commits/v5 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/publish-pypi.yml:61 — 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: pypa/gh-action-pypi-publish@<40-character SHA>`. This step references `pypa/gh-action-pypi-publish@release/v1`; resolve the SHA it points at today with `gh api repos/pypa/gh-action-pypi-publish/commits/release/v1 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/publish-sdk.yml:46 — 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@v5`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v5 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/publish-sdk.yml:48 — 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-node@<40-character SHA>`. This step references `actions/setup-node@v6`; resolve the SHA it points at today with `gh api repos/actions/setup-node/commits/v6 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/sdk-smoke.yml:36 — 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@v5`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v5 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/sdk-smoke.yml:38 — 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-node@<40-character SHA>`. This step references `actions/setup-node@v6`; resolve the SHA it points at today with `gh api repos/actions/setup-node/commits/v6 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/sdk-smoke.yml:42 — 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-python@<40-character SHA>`. This step references `actions/setup-python@v5`; resolve the SHA it points at today with `gh api repos/actions/setup-python/commits/v5 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/skill-parity.yml:31 — 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@v5`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v5 --jq .sha`.
D8 · Code Coverage · No automated tests · ×1
  • No automated tests — No automated tests — no test code was found in this repository. Untested code is the largest single risk to changing it safely.
Warning — 2110 finding(s)
D3 · God Classes · FileTooLong · ×82
  • FileTooLong: Chart/ChartSvgRenderer.cs src/officecli/Core/Chart/ChartSvgRenderer.cs:0 — FileTooLong — 3299 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: Word/WordHandler.Navigation.cs src/officecli/Handlers/Word/WordHandler.Navigation.cs:0 — FileTooLong — 3295 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: Handlers/PowerPointHandler.cs src/officecli/Handlers/PowerPointHandler.cs:0 — FileTooLong — 2729 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: Chart/ChartHelper.Setter.cs src/officecli/Core/Chart/ChartHelper.Setter.cs:0 — FileTooLong — 2657 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: Pptx/PowerPointHandler.ShapeProperties.cs src/officecli/Handlers/Pptx/PowerPointHandler.ShapeProperties.cs:0 — FileTooLong — 2283 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: Word/WordBatchEmitter.Paragraph.cs src/officecli/Handlers/Word/WordBatchEmitter.Paragraph.cs:0 — FileTooLong — 2173 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: Excel/ExcelHandler.HtmlPreview.cs src/officecli/Handlers/Excel/ExcelHandler.HtmlPreview.cs:0 — FileTooLong — 2135 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: Word/WordHandler.Set.Element.cs src/officecli/Handlers/Word/WordHandler.Set.Element.cs:0 — FileTooLong — 2008 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: Word/WordHandler.Query.cs src/officecli/Handlers/Word/WordHandler.Query.cs:0 — FileTooLong — 1945 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: Formula/FormulaParser.cs src/officecli/Core/Formula/FormulaParser.cs:0 — FileTooLong — 1892 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: Word/WordHandler.Add.Misc.cs src/officecli/Handlers/Word/WordHandler.Add.Misc.cs:0 — FileTooLong — 1791 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: Pptx/PowerPointHandler.Animations.cs src/officecli/Handlers/Pptx/PowerPointHandler.Animations.cs:0 — FileTooLong — 1780 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: Pptx/PowerPointHandler.NodeBuilder.cs src/officecli/Handlers/Pptx/PowerPointHandler.NodeBuilder.cs:0 — FileTooLong — 1759 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: Pptx/PowerPointHandler.HtmlPreview.Css.cs src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:0 — FileTooLong — 1727 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: Word/WordHandler.Add.Text.cs src/officecli/Handlers/Word/WordHandler.Add.Text.cs:0 — FileTooLong — 1700 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: Word/WordHandler.HtmlPreview.Css.cs src/officecli/Handlers/Word/WordHandler.HtmlPreview.Css.cs:0 — FileTooLong — 1651 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: Pptx/PowerPointHandler.Query.cs src/officecli/Handlers/Pptx/PowerPointHandler.Query.cs:0 — FileTooLong — 1636 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: Pptx/PowerPointHandler.HtmlPreview.Shapes.cs src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Shapes.cs:0 — FileTooLong — 1585 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: Word/WordHandler.Add.Structure.cs src/officecli/Handlers/Word/WordHandler.Add.Structure.cs:0 — FileTooLong — 1581 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: Word/WordBatchEmitter.Resources.cs src/officecli/Handlers/Word/WordBatchEmitter.Resources.cs:0 — FileTooLong — 1552 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: Watch/WatchServer.cs src/officecli/Core/Watch/WatchServer.cs:0 — FileTooLong — 1494 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: Word/WordHandler.HtmlPreview.cs src/officecli/Handlers/Word/WordHandler.HtmlPreview.cs:0 — FileTooLong — 1487 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: Word/WordHandler.Mutations.cs src/officecli/Handlers/Word/WordHandler.Mutations.cs:0 — FileTooLong — 1413 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: officecli/ResidentServer.cs src/officecli/ResidentServer.cs:0 — FileTooLong — 1371 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: Formula/FormulaEvaluator.Functions.cs src/officecli/Core/Formula/FormulaEvaluator.Functions.cs:0 — FileTooLong — 1368 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.
  • + 57 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×26
  • Duplicated block (8 lines × 2) src/officecli/CommandBuilder.cs:1324 — src/officecli/CommandBuilder.cs:1324-1334 | src/officecli/CommandBuilder.cs:1376-1383 — 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) src/officecli/Core/Chart/ChartExBuilder.Setter.cs:103 — src/officecli/Core/Chart/ChartExBuilder.Setter.cs:103-110 | src/officecli/Core/Chart/ChartExBuilder.Setter.cs:116-126 — 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 `src/officecli/Core/Chart/ChartExBuilder.Setter.cs:103` 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) src/officecli/Core/Chart/ChartHelper.Setter.cs:3868 — src/officecli/Core/Chart/ChartHelper.Setter.cs:3868-3875 | src/officecli/Core/Chart/ChartHelper.SetterHelpers.cs:1004-1013 — 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 `src/officecli/Core/Chart/ChartHelper.Setter.cs:3868` 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) src/officecli/Core/Chart/ChartHelper.Setter.cs:4133 — src/officecli/Core/Chart/ChartHelper.Setter.cs:4133-4140 | src/officecli/Core/Chart/ChartHelper.SetterHelpers.cs:1179-1186 — 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 `src/officecli/Core/Chart/ChartHelper.Setter.cs:4133` 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) src/officecli/Core/Chart/ChartSvgRenderer.cs:534 — src/officecli/Core/Chart/ChartSvgRenderer.cs:534-541 | src/officecli/Core/Chart/ChartSvgRenderer.cs:786-794 — 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 `src/officecli/Core/Chart/ChartSvgRenderer.cs:534` 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) src/officecli/Core/Chart/ChartSvgRenderer.cs:698 — src/officecli/Core/Chart/ChartSvgRenderer.cs:698-705 | src/officecli/Core/Chart/ChartSvgRenderer.cs:997-1007 — 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 `src/officecli/Core/Chart/ChartSvgRenderer.cs:698` 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) src/officecli/Core/Chart/ChartSvgRenderer.cs:2778 — src/officecli/Core/Chart/ChartSvgRenderer.cs:2778-2785 | src/officecli/Core/Chart/ChartSvgRenderer.cs:2796-2803 — 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 `src/officecli/Core/Chart/ChartSvgRenderer.cs:2778` 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) src/officecli/Core/Formula/FormulaEvaluator.Spill.cs:340 — src/officecli/Core/Formula/FormulaEvaluator.Spill.cs:340-347 | src/officecli/Core/Formula/FormulaEvaluator.Spill.cs:356-363 — 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 `src/officecli/Core/Formula/FormulaEvaluator.Spill.cs:340` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) src/officecli/Core/Formula/FormulaParser.cs:483 — src/officecli/Core/Formula/FormulaParser.cs:483-490 | src/officecli/Core/Formula/FormulaParser.cs:866-873 — 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 `src/officecli/Core/Formula/FormulaParser.cs:483` 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) src/officecli/Core/PivotTableHelper.Render.cs:417 — src/officecli/Core/PivotTableHelper.Render.cs:417-426 | src/officecli/Core/PivotTableHelper.Render.cs:478-485 — 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 `src/officecli/Core/PivotTableHelper.Render.cs:417` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) src/officecli/Core/PivotTableHelper.Render.cs:642 — src/officecli/Core/PivotTableHelper.Render.cs:642-649 | src/officecli/Core/PivotTableHelper.Render.cs:963-970 — 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 `src/officecli/Core/PivotTableHelper.Render.cs:642` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) src/officecli/Core/PivotTableHelper.Render.cs:662 — src/officecli/Core/PivotTableHelper.Render.cs:662-669 | src/officecli/Core/PivotTableHelper.Render.cs:993-1000 — 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 `src/officecli/Core/PivotTableHelper.Render.cs:662` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) src/officecli/Core/PivotTableHelper.Render.cs:674 — src/officecli/Core/PivotTableHelper.Render.cs:674-681 | src/officecli/Core/PivotTableHelper.Render.cs:974-981 — 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 `src/officecli/Core/PivotTableHelper.Render.cs:674` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) src/officecli/Core/PivotTableHelper.Render.cs:2478 — src/officecli/Core/PivotTableHelper.Render.cs:2478-2485 | src/officecli/Core/PivotTableHelper.Render.cs:2522-2529 — 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 `src/officecli/Core/PivotTableHelper.Render.cs:2478` 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) src/officecli/Handlers/Excel/ExcelHandler.Helpers.Ole.cs:27 — src/officecli/Handlers/Excel/ExcelHandler.Helpers.Ole.cs:27-34 | src/officecli/Handlers/Pptx/PowerPointHandler.Helpers.Ole.cs:23-30 — 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 `src/officecli/Handlers/Excel/ExcelHandler.Helpers.Ole.cs:27` 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) src/officecli/Handlers/Excel/ExcelHandler.HtmlPreview.cs:4201 — src/officecli/Handlers/Excel/ExcelHandler.HtmlPreview.cs:4201-4208 | src/officecli/Handlers/Excel/ExcelHandler.HtmlPreview.cs:4209-4216 — 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) src/officecli/Handlers/Excel/ExcelHandler.HtmlPreview.Pictures.cs:32 — src/officecli/Handlers/Excel/ExcelHandler.HtmlPreview.Pictures.cs:32-39 | src/officecli/Handlers/Excel/ExcelHandler.HtmlPreview.Shapes.cs:34-41 — 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 `src/officecli/Handlers/Excel/ExcelHandler.HtmlPreview.Pictures.cs:32` 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) src/officecli/Handlers/Excel/ExcelHandler.SheetShift.cs:113 — src/officecli/Handlers/Excel/ExcelHandler.SheetShift.cs:113-120 | src/officecli/Handlers/Excel/ExcelHandler.SheetShift.cs:136-143 — 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 `src/officecli/Handlers/Excel/ExcelHandler.SheetShift.cs:113` 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) src/officecli/Handlers/PowerPointHandler.cs:2527 — src/officecli/Handlers/PowerPointHandler.cs:2527-2534 | src/officecli/Handlers/PowerPointHandler.cs:3144-3151 — 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 `src/officecli/Handlers/PowerPointHandler.cs:2527` 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) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Media.cs:815 — src/officecli/Handlers/Pptx/PowerPointHandler.Add.Media.cs:815-822 | src/officecli/Handlers/Pptx/PowerPointHandler.Add.Table.cs:244-253 — 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 (8 lines × 2) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Misc.cs:1971 — src/officecli/Handlers/Pptx/PowerPointHandler.Add.Misc.cs:1971-1978 | src/officecli/Handlers/Pptx/PowerPointHandler.Add.Model3D.cs:59-66 — 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 (8 lines × 2) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Shape.cs:64 — src/officecli/Handlers/Pptx/PowerPointHandler.Add.Shape.cs:64-71 | src/officecli/Handlers/Pptx/PowerPointHandler.Add.Shape.cs:101-109 — 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) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Text.cs:356 — src/officecli/Handlers/Pptx/PowerPointHandler.Add.Text.cs:356-363 | src/officecli/Handlers/Pptx/PowerPointHandler.Add.Text.cs:750-757 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:1922 — src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:1922-1929 | src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:2009-2016 — 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) src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:1980 — src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:1980-1987 | src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:2121-2128 — 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.
  • + 1 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×24
  • Duplicated block (6 lines × 2) src/officecli/Core/Chart/ChartHelper.Builder.cs:1256 — src/officecli/Core/Chart/ChartHelper.Builder.cs:1256-1261 | src/officecli/Core/Chart/ChartHelper.Builder.cs:1266-1271 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) src/officecli/Core/Chart/ChartHelper.Builder.cs:1268 — src/officecli/Core/Chart/ChartHelper.Builder.cs:1268-1273 | src/officecli/Core/Chart/ChartHelper.Builder.cs:1309-1314 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) src/officecli/Core/Chart/ChartHelper.Builder.cs:1598 — src/officecli/Core/Chart/ChartHelper.Builder.cs:1598-1603 | src/officecli/Handlers/Pptx/PowerPointHandler.Fill.cs:417-423 — 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) src/officecli/Core/Chart/ChartHelper.Reader.cs:2126 — src/officecli/Core/Chart/ChartHelper.Reader.cs:2126-2131 | src/officecli/Core/Chart/ChartHelper.Reader.cs:2136-2141 — 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 `src/officecli/Core/Chart/ChartHelper.Reader.cs:2126` 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) src/officecli/Core/Chart/ChartHelper.SetterHelpers.cs:672 — src/officecli/Core/Chart/ChartHelper.SetterHelpers.cs:672-677 | src/officecli/Core/Chart/ChartHelper.SetterHelpers.cs:1166-1171 — 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) src/officecli/Core/Formula/FormulaEvaluator.Functions.cs:1017 — src/officecli/Core/Formula/FormulaEvaluator.Functions.cs:1017-1022 | src/officecli/Core/Formula/FormulaEvaluator.Functions.cs:1035-1040 — 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 (6 lines × 2) src/officecli/Core/Formula/FormulaEvaluator.Regression.cs:173 — src/officecli/Core/Formula/FormulaEvaluator.Regression.cs:173-178 | src/officecli/Core/Formula/FormulaEvaluator.Regression.cs:253-258 — 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 `src/officecli/Core/Formula/FormulaEvaluator.Regression.cs:173` 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 (6 lines × 2) src/officecli/Core/Formula/FormulaEvaluator.Securities.cs:300 — src/officecli/Core/Formula/FormulaEvaluator.Securities.cs:300-305 | src/officecli/Core/Formula/FormulaEvaluator.Securities.cs:315-320 — 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 (6 lines × 2) src/officecli/Core/ParseHelpers.cs:130 — src/officecli/Core/ParseHelpers.cs:130-135 | src/officecli/Core/ParseHelpers.cs:147-152 — 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 `src/officecli/Core/ParseHelpers.cs:130` 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 (6 lines × 2) src/officecli/Core/PivotTableHelper.Definition.cs:782 — src/officecli/Core/PivotTableHelper.Definition.cs:782-787 | src/officecli/Core/PivotTableHelper.Definition.cs:788-793 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) src/officecli/Core/PivotTableHelper.Definition.cs:918 — src/officecli/Core/PivotTableHelper.Definition.cs:918-923 | src/officecli/Core/PivotTableHelper.Definition.cs:924-929 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) src/officecli/Core/PivotTableHelper.Readback.cs:69 — src/officecli/Core/PivotTableHelper.Readback.cs:69-76 | src/officecli/Core/PivotTableHelper.Readback.cs:81-86 — 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 `src/officecli/Core/PivotTableHelper.Readback.cs:69` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) src/officecli/Core/PivotTableHelper.Render.cs:1794 — src/officecli/Core/PivotTableHelper.Render.cs:1794-1799 | src/officecli/Core/PivotTableHelper.Render.cs:1800-1805 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) src/officecli/Handlers/Excel/ExcelHandler.Helpers.Cell.cs:235 — src/officecli/Handlers/Excel/ExcelHandler.Helpers.Cell.cs:235-240 | src/officecli/Handlers/Excel/ExcelHandler.Helpers.Cell.cs:244-249 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) src/officecli/Handlers/Excel/ExcelHandler.Helpers.Drawing.cs:165 — src/officecli/Handlers/Excel/ExcelHandler.Helpers.Drawing.cs:165-170 | src/officecli/Handlers/Excel/ExcelHandler.Helpers.Drawing.cs:196-201 — 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) src/officecli/Handlers/Excel/ExcelHandler.Helpers.Drawing.cs:182 — src/officecli/Handlers/Excel/ExcelHandler.Helpers.Drawing.cs:182-187 | src/officecli/Handlers/Excel/ExcelHandler.Helpers.Drawing.cs:197-203 — 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 (6 lines × 2) src/officecli/Handlers/Excel/ExcelHandler.HtmlPreview.cs:843 — src/officecli/Handlers/Excel/ExcelHandler.HtmlPreview.cs:843-848 | src/officecli/Handlers/Excel/ExcelHandler.HtmlPreview.cs:861-866 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) src/officecli/Handlers/Excel/ExcelHandler.HtmlPreview.cs:1396 — src/officecli/Handlers/Excel/ExcelHandler.HtmlPreview.cs:1396-1408 | src/officecli/Handlers/Excel/ExcelHandler.HtmlPreview.cs:1410-1415 — 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 (6 lines × 2) src/officecli/Handlers/Excel/ExcelHandler.Query.Cf.cs:195 — src/officecli/Handlers/Excel/ExcelHandler.Query.Cf.cs:195-202 | src/officecli/Handlers/Excel/ExcelHandler.Query.Cf.cs:206-211 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/officecli/Handlers/Excel/ExcelHandler.Query.Cf.cs:195` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (6 lines × 2) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Misc.cs:1119 — src/officecli/Handlers/Pptx/PowerPointHandler.Add.Misc.cs:1119-1124 | src/officecli/Handlers/Pptx/PowerPointHandler.Add.Misc.cs:1127-1132 — 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 `src/officecli/Handlers/Pptx/PowerPointHandler.Add.Misc.cs:1119` 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) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Shape.cs:519 — src/officecli/Handlers/Pptx/PowerPointHandler.Add.Shape.cs:519-524 | src/officecli/Handlers/Pptx/PowerPointHandler.Add.Shape.cs:529-534 — 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 `src/officecli/Handlers/Pptx/PowerPointHandler.Add.Shape.cs:519` 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) src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.cs:623 — src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.cs:623-628 | src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.cs:636-641 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:471 — src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:471-476 | src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:484-489 — 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 `src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (6 lines × 2) src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:1099 — src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:1099-1104 | src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:1113-1118 — 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 `src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:1099` 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.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×24
  • Duplicated block (5 lines × 2) src/officecli/CommandBuilder.View.cs:327 — src/officecli/CommandBuilder.View.cs:327-331 | src/officecli/CommandBuilder.View.cs:605-609 — 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 `src/officecli/CommandBuilder.View.cs:327` 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 (5 lines × 2) src/officecli/Core/Chart/ChartSvgRenderer.cs:543 — src/officecli/Core/Chart/ChartSvgRenderer.cs:543-547 | src/officecli/Core/Chart/ChartSvgRenderer.cs:796-800 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) src/officecli/Core/Chart/ChartSvgRenderer.cs:555 — src/officecli/Core/Chart/ChartSvgRenderer.cs:555-559 | src/officecli/Core/Chart/ChartSvgRenderer.cs:813-817 — 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 `src/officecli/Core/Chart/ChartSvgRenderer.cs:555` 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) src/officecli/Core/Chart/ChartSvgRenderer.cs:657 — src/officecli/Core/Chart/ChartSvgRenderer.cs:657-661 | src/officecli/Core/Chart/ChartSvgRenderer.cs:945-949 — 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 `src/officecli/Core/Chart/ChartSvgRenderer.cs:657` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) src/officecli/Core/Chart/ChartSvgRenderer.cs:830 — src/officecli/Core/Chart/ChartSvgRenderer.cs:830-834 | src/officecli/Core/Chart/ChartSvgRenderer.cs:872-876 — 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 `src/officecli/Core/Chart/ChartSvgRenderer.cs:830` 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) src/officecli/Core/Chart/ChartSvgRenderer.cs:1409 — src/officecli/Core/Chart/ChartSvgRenderer.cs:1409-1413 | src/officecli/Core/Chart/ChartSvgRenderer.cs:1416-1420 — 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 `src/officecli/Core/Chart/ChartSvgRenderer.cs:1409` 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) src/officecli/Core/Chart/ChartSvgRenderer.cs:2101 — src/officecli/Core/Chart/ChartSvgRenderer.cs:2101-2105 | src/officecli/Core/Chart/ChartSvgRenderer.cs:2108-2112 — 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 `src/officecli/Core/Chart/ChartSvgRenderer.cs:2101` 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) src/officecli/Core/Chart/ChartSvgRenderer.cs:2937 — src/officecli/Core/Chart/ChartSvgRenderer.cs:2937-2941 | src/officecli/Core/Chart/ChartSvgRenderer.cs:2961-2965 — 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 `src/officecli/Core/Chart/ChartSvgRenderer.cs:2937` 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) src/officecli/Core/Chart/ChartSvgRenderer.cs:5538 — src/officecli/Core/Chart/ChartSvgRenderer.cs:5538-5542 | src/officecli/Core/Chart/ChartSvgRenderer.cs:5549-5553 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (5 lines × 2) src/officecli/Core/Chart/ChartSvgRenderer.CxExtract.cs:397 — src/officecli/Core/Chart/ChartSvgRenderer.CxExtract.cs:397-401 | src/officecli/Core/Chart/ChartSvgRenderer.CxExtract.cs:438-442 — 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 `src/officecli/Core/Chart/ChartSvgRenderer.CxExtract.cs:397` 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) src/officecli/Core/Formula/FormulaEvaluator.Functions.cs:1145 — src/officecli/Core/Formula/FormulaEvaluator.Functions.cs:1145-1150 | src/officecli/Core/Formula/FormulaEvaluator.Helpers.cs:548-552 — 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 (5 lines × 2) src/officecli/Core/Formula/FormulaEvaluator.Functions.cs:1348 — src/officecli/Core/Formula/FormulaEvaluator.Functions.cs:1348-1352 | src/officecli/Core/Formula/FormulaEvaluator.Helpers.cs:363-367 — 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 `src/officecli/Core/Formula/FormulaEvaluator.Functions.cs:1348` 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) src/officecli/Core/Formula/FormulaEvaluator.Functions.cs:1706 — src/officecli/Core/Formula/FormulaEvaluator.Functions.cs:1706-1710 | src/officecli/Core/Formula/FormulaEvaluator.Functions.cs:1716-1720 — 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 (5 lines × 2) src/officecli/Core/Formula/FormulaEvaluator.Helpers.cs:405 — src/officecli/Core/Formula/FormulaEvaluator.Helpers.cs:405-409 | src/officecli/Core/Formula/FormulaEvaluator.Helpers.cs:436-440 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/officecli/Core/Formula/FormulaEvaluator.Helpers.cs:405` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (5 lines × 2) src/officecli/Core/Formula/FormulaEvaluator.Securities.cs:217 — src/officecli/Core/Formula/FormulaEvaluator.Securities.cs:217-222 | src/officecli/Core/Formula/FormulaEvaluator.Securities.cs:231-235 — 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 `src/officecli/Core/Formula/FormulaEvaluator.Securities.cs:217` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (5 lines × 2) src/officecli/Core/Formula/FormulaEvaluator.Spill.cs:84 — src/officecli/Core/Formula/FormulaEvaluator.Spill.cs:84-88 | src/officecli/Core/Formula/FormulaEvaluator.SpillLambda.cs:101-105 — 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. 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) src/officecli/Core/Formula/FormulaEvaluator.Spill.cs:97 — src/officecli/Core/Formula/FormulaEvaluator.Spill.cs:97-101 | src/officecli/Core/Formula/FormulaEvaluator.SpillLambda.cs:85-89 — 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. 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) src/officecli/Handlers/Excel/ExcelHandler.Add.cs:1246 — src/officecli/Handlers/Excel/ExcelHandler.Add.cs:1246-1250 | src/officecli/Handlers/Excel/ExcelHandler.Add.Tables.cs:364-368 — 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 `src/officecli/Handlers/Excel/ExcelHandler.Add.cs:1246` 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) src/officecli/Handlers/Excel/ExcelHandler.Add.Tables.cs:1579 — src/officecli/Handlers/Excel/ExcelHandler.Add.Tables.cs:1579-1583 | src/officecli/Handlers/Excel/ExcelHandler.Add.Tables.cs:1591-1595 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) src/officecli/Handlers/Excel/ExcelHandler.Helpers.Node.cs:424 — src/officecli/Handlers/Excel/ExcelHandler.Helpers.Node.cs:424-429 | src/officecli/Handlers/Excel/ExcelHandler.Helpers.Node.cs:778-782 — 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 `src/officecli/Handlers/Excel/ExcelHandler.Helpers.Node.cs:424` 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 (5 lines × 2) src/officecli/Handlers/Excel/ExcelHandler.Query.Cf.cs:83 — src/officecli/Handlers/Excel/ExcelHandler.Query.Cf.cs:83-87 | src/officecli/Handlers/Excel/ExcelHandler.Query.Cf.cs:89-93 — 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 `src/officecli/Handlers/Excel/ExcelHandler.Query.Cf.cs:83` 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) src/officecli/Handlers/Excel/ExcelHandler.Query.cs:427 — src/officecli/Handlers/Excel/ExcelHandler.Query.cs:427-431 | src/officecli/Handlers/Excel/ExcelHandler.Query.cs:433-437 — 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 `src/officecli/Handlers/Excel/ExcelHandler.Query.cs:427` 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) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Media.cs:105 — src/officecli/Handlers/Pptx/PowerPointHandler.Add.Media.cs:105-110 | src/officecli/Handlers/Pptx/PowerPointHandler.Add.Model3D.cs:66-70 — 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 (5 lines × 2) src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:861 — src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:861-865 | src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:876-880 — 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 `src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:861` 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.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×23
  • Duplicated block (9 lines × 2) src/officecli/CommandBuilder.Check.cs:16 — src/officecli/CommandBuilder.Check.cs:16-24 | src/officecli/CommandBuilder.Refresh.cs:16-25 — 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 `src/officecli/CommandBuilder.Check.cs:16` 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) src/officecli/CommandBuilder.Goto.cs:29 — src/officecli/CommandBuilder.Goto.cs:29-37 | src/officecli/CommandBuilder.Mark.cs:248-256 — 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 `src/officecli/CommandBuilder.Goto.cs:29` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9 lines × 2) src/officecli/Core/Chart/ChartHelper.Reader.cs:1932 — src/officecli/Core/Chart/ChartHelper.Reader.cs:1932-1940 | src/officecli/Core/Chart/ChartHelper.Reader.cs:1942-1953 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) src/officecli/Core/Chart/ChartHelper.Reader.cs:1955 — src/officecli/Core/Chart/ChartHelper.Reader.cs:1955-1963 | src/officecli/Core/Chart/ChartHelper.Reader.cs:1964-1978 — 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) src/officecli/Core/Chart/ChartSvgRenderer.cs:5060 — src/officecli/Core/Chart/ChartSvgRenderer.cs:5060-5068 | src/officecli/Core/Chart/ChartSvgRenderer.cs:5133-5141 — 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 `src/officecli/Core/Chart/ChartSvgRenderer.cs:5060` 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) src/officecli/Core/Formula/FormulaEvaluator.Functions.cs:1159 — src/officecli/Core/Formula/FormulaEvaluator.Functions.cs:1159-1168 | src/officecli/Core/Formula/FormulaEvaluator.Helpers.cs:557-565 — 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. 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) src/officecli/Core/Formula/FormulaEvaluator.Regression.cs:144 — src/officecli/Core/Formula/FormulaEvaluator.Regression.cs:144-152 | src/officecli/Core/Formula/FormulaEvaluator.Regression.cs:217-225 — 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) src/officecli/Core/Formula/FormulaParser.cs:501 — src/officecli/Core/Formula/FormulaParser.cs:501-509 | src/officecli/Core/Formula/FormulaParser.cs:880-888 — 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 `src/officecli/Core/Formula/FormulaParser.cs:501` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) src/officecli/Core/FormulaRefShifter.cs:145 — src/officecli/Core/FormulaRefShifter.cs:145-153 | src/officecli/Core/FormulaRefShifter.cs:231-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 `src/officecli/Core/FormulaRefShifter.cs:145` 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) src/officecli/Core/PivotTableHelper.Definition.cs:1684 — src/officecli/Core/PivotTableHelper.Definition.cs:1684-1692 | src/officecli/Core/PivotTableHelper.Parse.cs:769-778 — 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 `src/officecli/Core/PivotTableHelper.Definition.cs:1684` 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) src/officecli/Core/PivotTableHelper.Render.cs:593 — src/officecli/Core/PivotTableHelper.Render.cs:593-603 | src/officecli/Core/PivotTableHelper.Render.cs:918-926 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) src/officecli/Core/Plugins/FormatHandlerProxy.cs:202 — src/officecli/Core/Plugins/FormatHandlerProxy.cs:202-210 | src/officecli/Core/Plugins/FormatHandlerProxy.cs:222-230 — 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 `src/officecli/Core/Plugins/FormatHandlerProxy.cs:202` 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) src/officecli/Handlers/Excel/ExcelHandler.Add.Drawings.cs:486 — src/officecli/Handlers/Excel/ExcelHandler.Add.Drawings.cs:486-494 | src/officecli/Handlers/Excel/ExcelHandler.Add.Drawings.cs:902-910 — 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 `src/officecli/Handlers/Excel/ExcelHandler.Add.Drawings.cs:486` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9 lines × 2) src/officecli/Handlers/Excel/ExcelHandler.Add.Tables.cs:502 — src/officecli/Handlers/Excel/ExcelHandler.Add.Tables.cs:502-511 | src/officecli/Handlers/Excel/ExcelHandler.Add.Tables.cs:1656-1664 — 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 `src/officecli/Handlers/Excel/ExcelHandler.Add.Tables.cs:502` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9 lines × 2) src/officecli/Handlers/Excel/ExcelHandler.Add.Tables.cs:1378 — src/officecli/Handlers/Excel/ExcelHandler.Add.Tables.cs:1378-1386 | src/officecli/Handlers/Excel/ExcelHandler.Add.Tables.cs:1552-1560 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/officecli/Handlers/Excel/ExcelHandler.Add.Tables.cs:1378` 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) src/officecli/Handlers/Excel/ExcelHandler.Remove.cs:1131 — src/officecli/Handlers/Excel/ExcelHandler.Remove.cs:1131-1139 | src/officecli/Handlers/Excel/ExcelHandler.Remove.cs:1153-1161 — 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 `src/officecli/Handlers/Excel/ExcelHandler.Remove.cs:1131` 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) src/officecli/Handlers/Excel/ExcelHandler.Set.Sheet.cs:166 — src/officecli/Handlers/Excel/ExcelHandler.Set.Sheet.cs:166-174 | src/officecli/Handlers/Excel/ExcelHandler.Set.Sheet.cs:185-193 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) src/officecli/Handlers/PowerPointHandler.cs:2437 — src/officecli/Handlers/PowerPointHandler.cs:2437-2445 | src/officecli/Handlers/PowerPointHandler.cs:2598-2606 — 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 `src/officecli/Handlers/PowerPointHandler.cs:2437` 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) src/officecli/Handlers/PowerPointHandler.cs:4186 — src/officecli/Handlers/PowerPointHandler.cs:4186-4194 | src/officecli/Handlers/PowerPointHandler.cs:4908-4916 — 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 `src/officecli/Handlers/PowerPointHandler.cs:4186` 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 (9 lines × 2) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Table.cs:430 — src/officecli/Handlers/Pptx/PowerPointHandler.Add.Table.cs:430-438 | src/officecli/Handlers/Pptx/PowerPointHandler.Add.Table.cs:510-518 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/officecli/Handlers/Pptx/PowerPointHandler.Add.Table.cs:510` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9 lines × 2) src/officecli/Handlers/Pptx/PowerPointHandler.Animations.cs:2535 — src/officecli/Handlers/Pptx/PowerPointHandler.Animations.cs:2535-2544 | src/officecli/Handlers/Pptx/PowerPointHandler.Animations.cs:2586-2594 — 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 `src/officecli/Handlers/Pptx/PowerPointHandler.Animations.cs:2535` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9 lines × 2) src/officecli/Handlers/Pptx/PowerPointHandler.Helpers.Zoom3D.cs:161 — src/officecli/Handlers/Pptx/PowerPointHandler.Helpers.Zoom3D.cs:161-169 | src/officecli/Handlers/Pptx/PowerPointHandler.Helpers.Zoom3D.cs:248-256 — 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 `src/officecli/Handlers/Pptx/PowerPointHandler.Helpers.Zoom3D.cs:161` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:2036 — src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:2036-2044 | src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:2065-2073 — 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.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×20
  • Duplicated block (7 lines × 2) src/officecli/Core/Chart/ChartHelper.Reader.cs:622 — src/officecli/Core/Chart/ChartHelper.Reader.cs:622-628 | src/officecli/Core/Chart/ChartHelper.Reader.cs:652-658 — 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 `src/officecli/Core/Chart/ChartHelper.Reader.cs:622` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) src/officecli/Core/Chart/ChartHelper.Reader.cs:2363 — src/officecli/Core/Chart/ChartHelper.Reader.cs:2363-2369 | src/officecli/Core/Chart/ChartHelper.Reader.cs:2371-2377 — 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 `src/officecli/Core/Chart/ChartHelper.Reader.cs:2363` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) src/officecli/Core/Chart/ChartSvgRenderer.cs:509 — src/officecli/Core/Chart/ChartSvgRenderer.cs:509-515 | src/officecli/Core/Chart/ChartSvgRenderer.cs:770-776 — 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 `src/officecli/Core/Chart/ChartSvgRenderer.cs:509` 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) src/officecli/Core/Chart/ChartSvgRenderer.cs:1925 — src/officecli/Core/Chart/ChartSvgRenderer.cs:1925-1931 | src/officecli/Core/Chart/ChartSvgRenderer.cs:1982-1988 — 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 `src/officecli/Core/Chart/ChartSvgRenderer.cs:1925` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) src/officecli/Core/Formula/FormulaEvaluator.Regression.cs:94 — src/officecli/Core/Formula/FormulaEvaluator.Regression.cs:94-100 | src/officecli/Core/Formula/FormulaEvaluator.Regression.cs:103-109 — 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 `src/officecli/Core/Formula/FormulaEvaluator.Regression.cs:94` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) src/officecli/Core/Formula/FormulaParser.cs:604 — src/officecli/Core/Formula/FormulaParser.cs:604-613 | src/officecli/Core/Formula/FormulaParser.cs:618-624 — 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 `src/officecli/Core/Formula/FormulaParser.cs:604` 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) src/officecli/Core/Formula/FormulaParser.cs:3272 — src/officecli/Core/Formula/FormulaParser.cs:3272-3278 | src/officecli/Core/Formula/FormulaParser.cs:3284-3290 — 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 `src/officecli/Core/Formula/FormulaParser.cs:3272` 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) src/officecli/Core/PivotTableHelper.Render.cs:653 — src/officecli/Core/PivotTableHelper.Render.cs:653-659 | src/officecli/Core/PivotTableHelper.Render.cs:984-990 — 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 `src/officecli/Core/PivotTableHelper.Render.cs:653` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) src/officecli/Core/PivotTableHelper.Render.cs:1212 — src/officecli/Core/PivotTableHelper.Render.cs:1212-1218 | src/officecli/Core/PivotTableHelper.Render.cs:1676-1682 — 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 `src/officecli/Core/PivotTableHelper.Render.cs:1212` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) src/officecli/Core/PivotTableHelper.Render.cs:1357 — src/officecli/Core/PivotTableHelper.Render.cs:1357-1363 | src/officecli/Core/PivotTableHelper.Render.cs:1378-1384 — 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 `src/officecli/Core/PivotTableHelper.Render.cs:1357` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) src/officecli/Core/PivotTableHelper.Render.cs:1368 — src/officecli/Core/PivotTableHelper.Render.cs:1368-1374 | src/officecli/Core/PivotTableHelper.Render.cs:1416-1422 — 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 `src/officecli/Core/PivotTableHelper.Render.cs:1368` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) src/officecli/Handlers/Excel/ExcelHandler.Add.Drawings.cs:736 — src/officecli/Handlers/Excel/ExcelHandler.Add.Drawings.cs:736-742 | src/officecli/Handlers/Excel/ExcelHandler.Add.Drawings.cs:843-849 — 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) src/officecli/Handlers/Excel/ExcelHandler.Add.Tables.cs:1185 — src/officecli/Handlers/Excel/ExcelHandler.Add.Tables.cs:1185-1191 | src/officecli/Handlers/Excel/ExcelHandler.Add.Tables.cs:1378-1384 — 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 `src/officecli/Handlers/Excel/ExcelHandler.Add.Tables.cs:1185` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7 lines × 2) src/officecli/Handlers/Excel/ExcelHandler.Set.Ranges.cs:601 — src/officecli/Handlers/Excel/ExcelHandler.Set.Ranges.cs:601-607 | src/officecli/Handlers/Excel/ExcelHandler.Set.Ranges.cs:620-626 — 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 `src/officecli/Handlers/Excel/ExcelHandler.Set.Ranges.cs:601` 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) src/officecli/Handlers/Excel/ExcelHandler.SheetShift.cs:282 — src/officecli/Handlers/Excel/ExcelHandler.SheetShift.cs:282-288 | src/officecli/Handlers/Excel/ExcelHandler.SheetShift.cs:299-305 — 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) src/officecli/Handlers/PowerPointHandler.cs:4174 — src/officecli/Handlers/PowerPointHandler.cs:4174-4180 | src/officecli/Handlers/PowerPointHandler.cs:4896-4902 — 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) src/officecli/Handlers/Pptx/PowerPointHandler.Align.cs:105 — src/officecli/Handlers/Pptx/PowerPointHandler.Align.cs:105-111 | src/officecli/Handlers/Pptx/PowerPointHandler.Align.cs:127-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 `src/officecli/Handlers/Pptx/PowerPointHandler.Align.cs:105` 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) src/officecli/Handlers/Pptx/PowerPointHandler.Animations.cs:2667 — src/officecli/Handlers/Pptx/PowerPointHandler.Animations.cs:2667-2673 | src/officecli/Handlers/Pptx/PowerPointHandler.Animations.cs:2716-2733 — 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) src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:78 — src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:78-84 | src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:98-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 `src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:78` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:1690 — src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:1690-1696 | src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:1713-1719 — 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.
D3 · God Classes · TooManyMethods · ×19
  • TooManyMethods: WordHandler src/officecli/Handlers/Word/WordHandler.HtmlPreview.Css.cs:0 — TooManyMethods — 32882 significant lines (blank, comment-only and punctuation-only lines excluded), 914 methods, declared across 46 files: Word/WordHandler.HtmlPreview.Css.cs (71), Word/WordHandler.Navigation.cs (68), Handlers/WordHandler.cs (59), Word/WordHandler.Add.Misc.cs (56), +42 more file(s). 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: PowerPointHandler src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:0 — TooManyMethods — 30236 significant lines (blank, comment-only and punctuation-only lines excluded), 847 methods, declared across 53 files: Pptx/PowerPointHandler.HtmlPreview.Css.cs (96), Handlers/PowerPointHandler.cs (82), Pptx/PowerPointHandler.Animations.cs (59), Pptx/PowerPointHandler.Effects.cs (44), +49 more file(s). 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: ExcelHandler src/officecli/Handlers/Excel/ExcelHandler.HtmlPreview.cs:0 — TooManyMethods — 17957 significant lines (blank, comment-only and punctuation-only lines excluded), 531 methods, declared across 42 files: Excel/ExcelHandler.HtmlPreview.cs (91), Excel/ExcelHandler.Helpers.Drawing.cs (37), Excel/ExcelHandler.Remove.cs (29), Excel/ExcelHandler.DumpSupport.cs (26), +38 more file(s). 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: FormulaEvaluator src/officecli/Core/Formula/FormulaEvaluator.Functions.cs:0 — TooManyMethods — 3949 significant lines (blank, comment-only and punctuation-only lines excluded), 386 methods, declared across 14 files: Formula/FormulaEvaluator.Functions.cs (102), Formula/FormulaEvaluator.Helpers.cs (62), Formula/FormulaEvaluator.cs (51), Formula/FormulaEvaluator.Securities.cs (39), +10 more file(s). 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: ChartHelper src/officecli/Core/Chart/ChartHelper.Builder.cs:0 — TooManyMethods — 7421 significant lines (blank, comment-only and punctuation-only lines excluded), 182 methods, declared across 7 files: Chart/ChartHelper.Builder.cs (44), Chart/ChartHelper.SetterHelpers.cs (38), Chart/ChartHelper.Setter.cs (35), Chart/ChartHelper.Reader.cs (34), +3 more file(s). 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: WordBatchEmitter src/officecli/Handlers/Word/WordBatchEmitter.Paragraph.cs:0 — TooManyMethods — 5534 significant lines (blank, comment-only and punctuation-only lines excluded), 156 methods, declared across 8 files: Word/WordBatchEmitter.Paragraph.cs (63), Word/WordBatchEmitter.Resources.cs (54), Word/WordBatchEmitter.cs (12), Word/WordBatchEmitter.Table.cs (11), +4 more file(s). 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: PivotTableHelper src/officecli/Core/PivotTableHelper.cs:0 — TooManyMethods — 4387 significant lines (blank, comment-only and punctuation-only lines excluded), 119 methods, declared across 6 files: Core/PivotTableHelper.cs (32), Core/PivotTableHelper.Cache.cs (25), Core/PivotTableHelper.Definition.cs (20), Core/PivotTableHelper.Parse.cs (20), +2 more file(s). 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: CommandBuilder src/officecli/CommandBuilder.cs:0 — TooManyMethods — 3365 significant lines (blank, comment-only and punctuation-only lines excluded), 88 methods, declared across 14 files: officecli/CommandBuilder.cs (44), officecli/CommandBuilder.Plugins.cs (7), officecli/CommandBuilder.GetQuery.cs (6), officecli/CommandBuilder.Batch.cs (5), +10 more file(s). 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: ChartSvgRenderer src/officecli/Core/Chart/ChartSvgRenderer.cs:0 — TooManyMethods — 3546 significant lines (blank, comment-only and punctuation-only lines excluded), 80 methods, declared across 2 files: Chart/ChartSvgRenderer.cs (65), Chart/ChartSvgRenderer.CxExtract.cs (15). 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: WatchServer src/officecli/Core/Watch/WatchServer.cs:0 — TooManyMethods — 1488 significant lines (blank, comment-only and punctuation-only lines excluded), 76 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: PptxBatchEmitter src/officecli/Handlers/Pptx/PptxBatchEmitter.cs:0 — TooManyMethods — 2593 significant lines (blank, comment-only and punctuation-only lines excluded), 68 methods, declared across 7 files: Pptx/PptxBatchEmitter.cs (26), Pptx/PptxBatchEmitter.Shape.cs (15), Pptx/PptxBatchEmitter.Resources.cs (10), Pptx/PptxBatchEmitter.Media.cs (9), +3 more file(s). 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: ResidentServer src/officecli/ResidentServer.cs:0 — TooManyMethods — 1336 significant lines (blank, comment-only and punctuation-only lines excluded), 56 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: FormulaParser src/officecli/Core/Formula/FormulaParser.cs:0 — TooManyMethods — 1883 significant lines (blank, comment-only and punctuation-only lines excluded), 43 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: ExcelBatchEmitter src/officecli/Handlers/Excel/ExcelBatchEmitter.cs:0 — TooManyMethods — 1076 significant lines (blank, comment-only and punctuation-only lines excluded), 43 methods, declared across 2 files: Excel/ExcelBatchEmitter.cs (23), Excel/ExcelBatchEmitter.Elements.cs (20). 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: WordPdfBackend src/officecli/Core/WordPdfBackend.cs:0 — TooManyMethods — 484 significant lines (blank, comment-only and punctuation-only lines excluded), 40 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: ExcelStyleManager src/officecli/Core/ExcelStyleManager.cs:0 — TooManyMethods — 1033 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: AttributeFilter src/officecli/Core/AttributeFilter.cs:0 — TooManyMethods — 520 significant lines (blank, comment-only and punctuation-only lines excluded), 39 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: WordNumFmtRenderer src/officecli/Core/WordNumFmtRenderer.cs:0 — TooManyMethods — 355 significant lines (blank, comment-only and punctuation-only lines excluded), 34 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: FormatHandlerProxy src/officecli/Core/Plugins/FormatHandlerProxy.cs:0 — TooManyMethods — 202 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.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×17
  • Duplicated block (10 lines × 2) src/officecli/Core/Chart/ChartSvgRenderer.cs:637 — src/officecli/Core/Chart/ChartSvgRenderer.cs:637-650 | src/officecli/Core/Chart/ChartSvgRenderer.cs:931-940 — 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 `src/officecli/Core/Chart/ChartSvgRenderer.cs:637` 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) src/officecli/Core/Chart/ChartSvgRenderer.cs:5074 — src/officecli/Core/Chart/ChartSvgRenderer.cs:5074-5083 | src/officecli/Core/Chart/ChartSvgRenderer.cs:5152-5161 — 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 `src/officecli/Core/Chart/ChartSvgRenderer.cs:5074` 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) src/officecli/Core/ExcelStyleManager.cs:1206 — src/officecli/Core/ExcelStyleManager.cs:1206-1215 | src/officecli/Core/ExcelStyleManager.cs:1229-1238 — 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) src/officecli/Core/PivotTableHelper.Render.cs:1193 — src/officecli/Core/PivotTableHelper.Render.cs:1193-1203 | src/officecli/Core/PivotTableHelper.Render.cs:1657-1666 — 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 `src/officecli/Core/PivotTableHelper.Render.cs:1193` 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 (10 lines × 2) src/officecli/Handlers/Excel/ExcelHandler.Helpers.Drawing.cs:936 — src/officecli/Handlers/Excel/ExcelHandler.Helpers.Drawing.cs:936-946 | src/officecli/Handlers/Excel/ExcelHandler.Helpers.Drawing.cs:964-973 — 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 `src/officecli/Handlers/Excel/ExcelHandler.Helpers.Drawing.cs:936` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) src/officecli/Handlers/Excel/ExcelHandler.Helpers.Sheet.cs:396 — src/officecli/Handlers/Excel/ExcelHandler.Helpers.Sheet.cs:396-407 | src/officecli/Handlers/Excel/ExcelHandler.Helpers.Sheet.cs:437-446 — 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 `src/officecli/Handlers/Excel/ExcelHandler.Helpers.Sheet.cs:396` 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) src/officecli/Handlers/Excel/ExcelHandler.Remove.cs:1180 — src/officecli/Handlers/Excel/ExcelHandler.Remove.cs:1180-1190 | src/officecli/Handlers/Excel/ExcelHandler.Remove.cs:1318-1327 — 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 `src/officecli/Handlers/Excel/ExcelHandler.Remove.cs:1180` 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) src/officecli/Handlers/Excel/ExcelHandler.Remove.cs:1677 — src/officecli/Handlers/Excel/ExcelHandler.Remove.cs:1677-1686 | src/officecli/Handlers/Excel/ExcelHandler.Remove.cs:1723-1732 — 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 `src/officecli/Handlers/Excel/ExcelHandler.Remove.cs:1677` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) src/officecli/Handlers/Excel/ExcelHandler.Set.Sheet.cs:682 — src/officecli/Handlers/Excel/ExcelHandler.Set.Sheet.cs:682-691 | src/officecli/Handlers/Excel/ExcelHandler.Set.Sheet.cs:750-761 — 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 `src/officecli/Handlers/Excel/ExcelHandler.Set.Sheet.cs:682` 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) src/officecli/Handlers/Excel/ExcelHandler.SheetShift.cs:80 — src/officecli/Handlers/Excel/ExcelHandler.SheetShift.cs:80-89 | src/officecli/Handlers/Excel/ExcelHandler.SheetShift.cs:164-173 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/officecli/Handlers/Excel/ExcelHandler.SheetShift.cs:80` 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 (10 lines × 2) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Misc.cs:2017 — src/officecli/Handlers/Pptx/PowerPointHandler.Add.Misc.cs:2017-2026 | src/officecli/Handlers/Pptx/PowerPointHandler.Add.Model3D.cs:90-100 — 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 (10 lines × 2) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Misc.cs:2138 — src/officecli/Handlers/Pptx/PowerPointHandler.Add.Misc.cs:2138-2147 | src/officecli/Handlers/Pptx/PowerPointHandler.Add.Model3D.cs:162-171 — 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 (10 lines × 2) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Table.cs:192 — src/officecli/Handlers/Pptx/PowerPointHandler.Add.Table.cs:192-201 | src/officecli/Handlers/Pptx/PowerPointHandler.Add.Table.cs:511-520 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/officecli/Handlers/Pptx/PowerPointHandler.Add.Table.cs:192` 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) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Text.cs:514 — src/officecli/Handlers/Pptx/PowerPointHandler.Add.Text.cs:514-523 | src/officecli/Handlers/Pptx/PowerPointHandler.Add.Text.cs:657-666 — 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) src/officecli/Handlers/Pptx/PowerPointHandler.Animations.cs:1297 — src/officecli/Handlers/Pptx/PowerPointHandler.Animations.cs:1297-1310 | src/officecli/Handlers/Pptx/PowerPointHandler.Animations.cs:1463-1472 — 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) src/officecli/Handlers/Pptx/PowerPointHandler.Helpers.Zoom3D.cs:129 — src/officecli/Handlers/Pptx/PowerPointHandler.Helpers.Zoom3D.cs:129-138 | src/officecli/Handlers/Pptx/PowerPointHandler.Helpers.Zoom3D.cs:221-230 — 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) src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:1949 — src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:1949-1958 | src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:1978-1987 — 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.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×14
  • Duplicated block (11 lines × 2) src/officecli/Core/Chart/ChartExBuilder.Setter.cs:177 — src/officecli/Core/Chart/ChartExBuilder.Setter.cs:177-187 | src/officecli/Core/Chart/ChartExBuilder.Setter.cs:189-199 — 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 `src/officecli/Core/Chart/ChartExBuilder.Setter.cs:177` 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 (11 lines × 2) src/officecli/Core/Chart/ChartHelper.Builder.cs:192 — src/officecli/Core/Chart/ChartHelper.Builder.cs:192-202 | src/officecli/Core/Chart/ChartHelper.Builder.cs:218-228 — 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 `src/officecli/Core/Chart/ChartHelper.Builder.cs:192` 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) src/officecli/Core/Chart/ChartSvgRenderer.cs:4395 — src/officecli/Core/Chart/ChartSvgRenderer.cs:4395-4405 | src/officecli/Core/Chart/ChartSvgRenderer.cs:4438-4448 — 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 `src/officecli/Core/Chart/ChartSvgRenderer.cs:4395` 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) src/officecli/Core/ExcelStyleManager.cs:1243 — src/officecli/Core/ExcelStyleManager.cs:1243-1256 | src/officecli/Core/ExcelStyleManager.cs:1370-1380 — 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 `src/officecli/Core/ExcelStyleManager.cs:1243` 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 (11 lines × 2) src/officecli/Core/PivotTableHelper.cs:1757 — src/officecli/Core/PivotTableHelper.cs:1757-1768 | src/officecli/Core/PivotTableHelper.cs:1776-1786 — 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 `src/officecli/Core/PivotTableHelper.cs:1757` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) src/officecli/Core/PivotTableHelper.Render.cs:1228 — src/officecli/Core/PivotTableHelper.Render.cs:1228-1238 | src/officecli/Core/PivotTableHelper.Render.cs:1692-1702 — 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 `src/officecli/Core/PivotTableHelper.Render.cs:1228` 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) src/officecli/Handlers/Excel/ExcelHandler.Add.Chart.cs:97 — src/officecli/Handlers/Excel/ExcelHandler.Add.Chart.cs:97-108 | src/officecli/Handlers/Excel/ExcelHandler.Add.Drawings.cs:314-324 — 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 `src/officecli/Handlers/Excel/ExcelHandler.Add.Chart.cs:97` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) src/officecli/Handlers/Excel/ExcelHandler.Helpers.Drawing.cs:410 — src/officecli/Handlers/Excel/ExcelHandler.Helpers.Drawing.cs:410-420 | src/officecli/Handlers/Excel/ExcelHandler.Helpers.Drawing.cs:551-561 — 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 `src/officecli/Handlers/Excel/ExcelHandler.Helpers.Drawing.cs:410` 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) src/officecli/Handlers/Excel/ExcelHandler.Remove.cs:440 — src/officecli/Handlers/Excel/ExcelHandler.Remove.cs:440-450 | src/officecli/Handlers/Excel/ExcelHandler.Remove.cs:459-471 — 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 `src/officecli/Handlers/Excel/ExcelHandler.Remove.cs:440` 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) src/officecli/Handlers/PowerPointHandler.cs:4197 — src/officecli/Handlers/PowerPointHandler.cs:4197-4207 | src/officecli/Handlers/PowerPointHandler.cs:4919-4929 — 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 `src/officecli/Handlers/PowerPointHandler.cs:4197` 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) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Misc.cs:1370 — src/officecli/Handlers/Pptx/PowerPointHandler.Add.Misc.cs:1370-1380 | src/officecli/Handlers/Pptx/PowerPointHandler.Add.Misc.cs:1382-1396 — 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 `src/officecli/Handlers/Pptx/PowerPointHandler.Add.Misc.cs:1370` 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) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Misc.cs:2114 — src/officecli/Handlers/Pptx/PowerPointHandler.Add.Misc.cs:2114-2124 | src/officecli/Handlers/Pptx/PowerPointHandler.Add.Model3D.cs:141-152 — 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 (11 lines × 2) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Text.cs:236 — src/officecli/Handlers/Pptx/PowerPointHandler.Add.Text.cs:236-246 | src/officecli/Handlers/Pptx/PowerPointHandler.Add.Text.cs:692-702 — 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 `src/officecli/Handlers/Pptx/PowerPointHandler.Add.Text.cs:236` 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) src/officecli/Handlers/Pptx/PowerPointHandler.Animations.cs:3065 — src/officecli/Handlers/Pptx/PowerPointHandler.Animations.cs:3065-3077 | src/officecli/Handlers/Pptx/PowerPointHandler.Animations.cs:3120-3130 — 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 `src/officecli/Handlers/Pptx/PowerPointHandler.Animations.cs:3065` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×13
  • Duplicated block (12 lines × 2) src/officecli/Core/Chart/ChartHelper.Reader.cs:2509 — src/officecli/Core/Chart/ChartHelper.Reader.cs:2509-2520 | src/officecli/Core/Chart/ChartHelper.Reader.cs:2547-2559 — 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 `src/officecli/Core/Chart/ChartHelper.Reader.cs:2509` 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) src/officecli/Core/Chart/ChartSvgRenderer.cs:4337 — src/officecli/Core/Chart/ChartSvgRenderer.cs:4337-4353 | src/officecli/Core/Chart/ChartSvgRenderer.cs:4362-4373 — 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 `src/officecli/Core/Chart/ChartSvgRenderer.cs:4337` 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 (12 lines × 2) src/officecli/Core/Formula/FormulaParser.cs:1180 — src/officecli/Core/Formula/FormulaParser.cs:1180-1191 | src/officecli/Core/Formula/FormulaParser.cs:1204-1215 — 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 `src/officecli/Core/Formula/FormulaParser.cs:1180` 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) src/officecli/Core/PivotTableHelper.Render.cs:2337 — src/officecli/Core/PivotTableHelper.Render.cs:2337-2350 | src/officecli/Core/PivotTableHelper.Render.cs:2415-2426 — 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 `src/officecli/Core/PivotTableHelper.Render.cs:2337` 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 (12 lines × 2) src/officecli/Core/TypedAttributeFallback.cs:135 — src/officecli/Core/TypedAttributeFallback.cs:135-160 | src/officecli/Core/TypedAttributeFallback.cs:252-263 — 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 `src/officecli/Core/TypedAttributeFallback.cs:135` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note 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 (12 lines × 2) src/officecli/Handlers/Excel/ExcelHandler.Helpers.Drawing.cs:775 — src/officecli/Handlers/Excel/ExcelHandler.Helpers.Drawing.cs:775-786 | src/officecli/Handlers/Excel/ExcelHandler.Helpers.Drawing.cs:805-816 — 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 `src/officecli/Handlers/Excel/ExcelHandler.Helpers.Drawing.cs:775` 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) src/officecli/Handlers/Excel/ExcelHandler.Helpers.Ole.cs:49 — src/officecli/Handlers/Excel/ExcelHandler.Helpers.Ole.cs:49-62 | src/officecli/Handlers/Pptx/PowerPointHandler.Helpers.Ole.cs:41-52 — 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 `src/officecli/Handlers/Excel/ExcelHandler.Helpers.Ole.cs:49` 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) src/officecli/Handlers/Excel/ExcelHandler.Query.cs:86 — src/officecli/Handlers/Excel/ExcelHandler.Query.cs:86-97 | src/officecli/Handlers/Excel/ExcelHandler.Query.cs:191-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. Read the line range as the matched WINDOW rather than a finished unit: at `src/officecli/Handlers/Excel/ExcelHandler.Query.cs:86` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) src/officecli/Handlers/Excel/ExcelHandler.Query.cs:464 — src/officecli/Handlers/Excel/ExcelHandler.Query.cs:464-477 | src/officecli/Handlers/Excel/ExcelHandler.Query.cs:485-496 — 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) src/officecli/Handlers/Excel/ExcelHandler.Query.cs:1385 — src/officecli/Handlers/Excel/ExcelHandler.Query.cs:1385-1396 | src/officecli/Handlers/Excel/ExcelHandler.Query.cs:1420-1431 — 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 `src/officecli/Handlers/Excel/ExcelHandler.Query.cs:1385` 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 (12 lines × 2) src/officecli/Handlers/Excel/ExcelHandler.Remove.cs:1433 — src/officecli/Handlers/Excel/ExcelHandler.Remove.cs:1433-1444 | src/officecli/Handlers/Excel/ExcelHandler.Remove.cs:1525-1536 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) src/officecli/Handlers/Excel/ExcelHandler.Set.Workbook.cs:157 — src/officecli/Handlers/Excel/ExcelHandler.Set.Workbook.cs:157-169 | src/officecli/Handlers/Excel/ExcelHandler.Set.Workbook.cs:185-196 — 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 `src/officecli/Handlers/Excel/ExcelHandler.Set.Workbook.cs:157` 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 (12 lines × 2) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Misc.cs:1226 — src/officecli/Handlers/Pptx/PowerPointHandler.Add.Misc.cs:1226-1237 | src/officecli/Handlers/Pptx/PowerPointHandler.Add.Misc.cs:1566-1601 — 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.
D15 · Churn × Complexity Hotspots · Hotspot · ×10
  • Hotspot: src/officecli/Handlers/Word/WordHandler.Navigation.cs src/officecli/Handlers/Word/WordHandler.Navigation.cs — src/officecli/Handlers/Word/WordHandler.Navigation.cs changed 195 times in last 90 days, max complexity 468. 167 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: src/officecli/Core/Chart/ChartHelper.Setter.cs src/officecli/Core/Chart/ChartHelper.Setter.cs — src/officecli/Core/Chart/ChartHelper.Setter.cs changed 96 times in last 90 days, max complexity 805. 87 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: src/officecli/Handlers/Pptx/PowerPointHandler.ShapeProperties.cs src/officecli/Handlers/Pptx/PowerPointHandler.ShapeProperties.cs — src/officecli/Handlers/Pptx/PowerPointHandler.ShapeProperties.cs changed 103 times in last 90 days, max complexity 565. 92 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: src/officecli/Handlers/Word/WordHandler.Add.Text.cs src/officecli/Handlers/Word/WordHandler.Add.Text.cs — src/officecli/Handlers/Word/WordHandler.Add.Text.cs changed 91 times in last 90 days, max complexity 543. 71 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: src/officecli/Handlers/Pptx/PowerPointHandler.NodeBuilder.cs src/officecli/Handlers/Pptx/PowerPointHandler.NodeBuilder.cs — src/officecli/Handlers/Pptx/PowerPointHandler.NodeBuilder.cs changed 137 times in last 90 days, max complexity 346. 119 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: src/officecli/Handlers/PowerPointHandler.cs src/officecli/Handlers/PowerPointHandler.cs — src/officecli/Handlers/PowerPointHandler.cs changed 89 times in last 90 days, max complexity 461. 71 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: src/officecli/Core/Chart/ChartHelper.Reader.cs src/officecli/Core/Chart/ChartHelper.Reader.cs — src/officecli/Core/Chart/ChartHelper.Reader.cs changed 73 times in last 90 days, max complexity 396. 66 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: src/officecli/Core/Chart/ChartSvgRenderer.cs src/officecli/Core/Chart/ChartSvgRenderer.cs — src/officecli/Core/Chart/ChartSvgRenderer.cs changed 108 times in last 90 days, max complexity 241. 102 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: src/officecli/Handlers/Word/WordHandler.Query.cs src/officecli/Handlers/Word/WordHandler.Query.cs — src/officecli/Handlers/Word/WordHandler.Query.cs changed 62 times in last 90 days, max complexity 401. 46 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: src/officecli/Core/Formula/FormulaEvaluator.Functions.cs src/officecli/Core/Formula/FormulaEvaluator.Functions.cs — src/officecli/Core/Formula/FormulaEvaluator.Functions.cs changed 45 times in last 90 days, max complexity 545. 27 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.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×9
  • Duplicated block (13 lines × 2) src/officecli/Core/ExcelStyleManager.cs:189 — src/officecli/Core/ExcelStyleManager.cs:189-201 | src/officecli/Core/ExcelStyleManager.cs:211-228 — 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 `src/officecli/Core/ExcelStyleManager.cs:189` 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 (13 lines × 2) src/officecli/Core/PivotTableHelper.Parse.cs:678 — src/officecli/Core/PivotTableHelper.Parse.cs:678-698 | src/officecli/Core/PivotTableHelper.Parse.cs:709-721 — 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 `src/officecli/Core/PivotTableHelper.Parse.cs:678` 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 (13 lines × 2) src/officecli/Handlers/Excel/ExcelHandler.Add.Cf.cs:731 — src/officecli/Handlers/Excel/ExcelHandler.Add.Cf.cs:731-743 | src/officecli/Handlers/Excel/ExcelHandler.Add.Cf.cs:845-857 — 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 `src/officecli/Handlers/Excel/ExcelHandler.Add.Cf.cs:731` 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 (13 lines × 2) src/officecli/Handlers/Excel/ExcelHandler.Query.cs:1548 — src/officecli/Handlers/Excel/ExcelHandler.Query.cs:1548-1560 | src/officecli/Handlers/Excel/ExcelHandler.Query.cs:1579-1591 — 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 `src/officecli/Handlers/Excel/ExcelHandler.Query.cs:1548` 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 (13 lines × 2) src/officecli/Handlers/Excel/ExcelHandler.Set.Ranges.cs:675 — src/officecli/Handlers/Excel/ExcelHandler.Set.Ranges.cs:675-687 | src/officecli/Handlers/Excel/ExcelHandler.Set.Ranges.cs:708-720 — 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 `src/officecli/Handlers/Excel/ExcelHandler.Set.Ranges.cs:675` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) src/officecli/Handlers/Excel/ExcelHandler.Set.Sheet.cs:211 — src/officecli/Handlers/Excel/ExcelHandler.Set.Sheet.cs:211-225 | src/officecli/Handlers/Excel/ExcelHandler.Set.Sheet.cs:249-261 — 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 (13 lines × 2) src/officecli/Handlers/Excel/ExcelHandler.Set.Sheet.cs:446 — src/officecli/Handlers/Excel/ExcelHandler.Set.Sheet.cs:446-458 | src/officecli/Handlers/Excel/ExcelHandler.Set.Sheet.cs:463-475 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Text.cs:372 — src/officecli/Handlers/Pptx/PowerPointHandler.Add.Text.cs:372-386 | src/officecli/Handlers/Pptx/PowerPointHandler.Add.Text.cs:924-936 — 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 `src/officecli/Handlers/Pptx/PowerPointHandler.Add.Text.cs:372` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) src/officecli/Handlers/Pptx/PowerPointHandler.Animations.cs:1646 — src/officecli/Handlers/Pptx/PowerPointHandler.Animations.cs:1646-1660 | src/officecli/Handlers/Pptx/PowerPointHandler.Animations.cs:2089-2101 — 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 `src/officecli/Handlers/Pptx/PowerPointHandler.Animations.cs:1646` 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.
D29 · Static Analysis (SAST) · Medium · ×8
  • Medium: regular-expression-dos src/officecli/Core/GenericXmlQuery.cs:666 — When using `System.Text.RegularExpressions` to process untrusted input, pass a timeout. A malicious user can provide input to `RegularExpressions` that abuses the backtracking behaviour of this regular expression engine. This will lead to excessive CPU usage, causing a Denial-of-Service attack. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
  • Medium: regular-expression-dos src/officecli/Handlers/PowerPointHandler.cs:4164 — When using `System.Text.RegularExpressions` to process untrusted input, pass a timeout. A malicious user can provide input to `RegularExpressions` that abuses the backtracking behaviour of this regular expression engine. This will lead to excessive CPU usage, causing a Denial-of-Service attack. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
  • Medium: regular-expression-dos src/officecli/Handlers/PowerPointHandler.cs:4251 — When using `System.Text.RegularExpressions` to process untrusted input, pass a timeout. A malicious user can provide input to `RegularExpressions` that abuses the backtracking behaviour of this regular expression engine. This will lead to excessive CPU usage, causing a Denial-of-Service attack. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
  • Medium: regular-expression-dos src/officecli/Handlers/PowerPointHandler.cs:4286 — When using `System.Text.RegularExpressions` to process untrusted input, pass a timeout. A malicious user can provide input to `RegularExpressions` that abuses the backtracking behaviour of this regular expression engine. This will lead to excessive CPU usage, causing a Denial-of-Service attack. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
  • Medium: regular-expression-dos src/officecli/Handlers/PowerPointHandler.cs:4331 — When using `System.Text.RegularExpressions` to process untrusted input, pass a timeout. A malicious user can provide input to `RegularExpressions` that abuses the backtracking behaviour of this regular expression engine. This will lead to excessive CPU usage, causing a Denial-of-Service attack. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
  • Medium: regular-expression-dos src/officecli/Handlers/PowerPointHandler.cs:4397 — When using `System.Text.RegularExpressions` to process untrusted input, pass a timeout. A malicious user can provide input to `RegularExpressions` that abuses the backtracking behaviour of this regular expression engine. This will lead to excessive CPU usage, causing a Denial-of-Service attack. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
  • Medium: regular-expression-dos src/officecli/Handlers/PowerPointHandler.cs:4889 — When using `System.Text.RegularExpressions` to process untrusted input, pass a timeout. A malicious user can provide input to `RegularExpressions` that abuses the backtracking behaviour of this regular expression engine. This will lead to excessive CPU usage, causing a Denial-of-Service attack. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
  • Medium: regular-expression-dos src/officecli/Handlers/Pptx/PowerPointHandler.Query.cs:1525 — When using `System.Text.RegularExpressions` to process untrusted input, pass a timeout. A malicious user can provide input to `RegularExpressions` that abuses the backtracking behaviour of this regular expression engine. This will lead to excessive CPU usage, causing a Denial-of-Service attack. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
D3 · God Classes · ClassTooLong · ×5
  • ClassTooLong: ChartExBuilder src/officecli/Core/Chart/ChartExBuilder.cs:0 — ClassTooLong — 888 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods, declared across 2 files: Chart/ChartExBuilder.cs (23), Chart/ChartExBuilder.Setter.cs (7). 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: RawXmlHelper src/officecli/Core/RawXmlHelper.cs:0 — ClassTooLong — 568 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: BlankDocCreator src/officecli/BlankDocCreator.cs:0 — ClassTooLong — 434 significant lines (blank, comment-only and punctuation-only lines excluded), 7 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: FontMetricsReader src/officecli/Core/FontMetricsReader.cs:0 — ClassTooLong — 412 significant lines (blank, comment-only and punctuation-only lines excluded), 24 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: ParseHelpers src/officecli/Core/ParseHelpers.cs:0 — ClassTooLong — 410 significant lines (blank, comment-only and punctuation-only lines excluded), 30 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.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×4
  • Duplicated block (5 lines × 3) src/officecli/Core/PivotTableHelper.Set.cs:447 — src/officecli/Core/PivotTableHelper.Set.cs:447-452 | src/officecli/Core/PivotTableHelper.Set.cs:454-458 | src/officecli/Core/PivotTableHelper.Set.cs:460-467 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/officecli/Core/PivotTableHelper.Set.cs:447` 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 × 3) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Misc.cs:1001 — src/officecli/Handlers/Pptx/PowerPointHandler.Add.Misc.cs:1001-1005 | src/officecli/Handlers/Pptx/PowerPointHandler.Add.Misc.cs:1006-1010 | src/officecli/Handlers/Pptx/PowerPointHandler.Add.Misc.cs:1011-1015 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 3) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Shape.cs:504 — src/officecli/Handlers/Pptx/PowerPointHandler.Add.Shape.cs:504-508 | src/officecli/Handlers/Pptx/PowerPointHandler.Add.Shape.cs:521-525 | src/officecli/Handlers/Pptx/PowerPointHandler.Add.Shape.cs:531-535 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/officecli/Handlers/Pptx/PowerPointHandler.Add.Shape.cs:504` 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 × 3) src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:2137 — src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:2137-2141 | src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:2162-2166 | src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:2324-2328 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:2137` 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.
D17 · Explicit Debt · BarePragmaDisable · ×3
  • BarePragmaDisable src/officecli/Core/RawXmlHelper.cs:1043 — #pragma warning disable OOXML0001 — 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 src/officecli/Handlers/Pptx/PowerPointHandler.View.cs:9 — #pragma warning disable OOXML0001 — 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 src/officecli/Handlers/Pptx/PowerPointHandler.View.cs:576 — #pragma warning disable OOXML0001 — 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.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×3
  • Duplicated block (21 lines × 2) src/officecli/Core/Chart/ChartSvgRenderer.cs:485 — src/officecli/Core/Chart/ChartSvgRenderer.cs:485-505 | src/officecli/Core/Chart/ChartSvgRenderer.cs:735-755 — 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 `src/officecli/Core/Chart/ChartSvgRenderer.cs:485` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) src/officecli/Handlers/Excel/ExcelHandler.Add.cs:564 — src/officecli/Handlers/Excel/ExcelHandler.Add.cs:564-584 | src/officecli/Handlers/Excel/ExcelHandler.Add.cs:600-620 — 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 `src/officecli/Handlers/Excel/ExcelHandler.Add.cs:564` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (21 lines × 2) src/officecli/Handlers/Excel/ExcelHandler.HtmlPreview.Charts.cs:175 — src/officecli/Handlers/Excel/ExcelHandler.HtmlPreview.Charts.cs:175-198 | src/officecli/Handlers/Excel/ExcelHandler.HtmlPreview.Charts.cs:502-522 — 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.
D17 · Explicit Debt · TodoComment · ×2
  • TodoComment src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Text.cs:940 — // TODO CONSISTENCY(underline-variants): CSS has no dot-dash — 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 src/officecli/Handlers/Pptx/PowerPointHandler.SvgPreview.cs:128 — // TODO: Chart — 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.
D2 · Cognitive Complexity · (anonymous) (cognitive 34) · ×2
  • (anonymous) (cognitive 34) src/officecli/Resources/watch-sse-core.js:147 — (anonymous) has cognitive complexity 34 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous) (cognitive 34) src/officecli/Resources/watch-sse-core.js:355 — (anonymous) has cognitive complexity 34 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 16) · ×2
  • (anonymous) (cognitive 16) src/officecli/Resources/watch-overlay.js:642 — (anonymous) has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous) (cognitive 16) src/officecli/Resources/preview.js:128 — (anonymous) has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D35 · Change Coupling · Change coupling · ×2
  • Change coupling: WatchServer.cs ↔ watch-sse-core.js src/officecli/Core/Watch/WatchServer.cs — `src/officecli/Core/Watch/WatchServer.cs` and `src/officecli/Resources/watch-sse-core.js` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge.
  • Change coupling: ExcelHandler.cs ↔ WordHandler.cs src/officecli/Handlers/ExcelHandler.cs — `src/officecli/Handlers/ExcelHandler.cs` and `src/officecli/Handlers/WordHandler.cs` change together 51% of the time (18 of the 35 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.
D4 · Code Duplication · Duplicated block (12 lines × 5) · ×2
  • Duplicated block (12 lines × 5) src/officecli/Handlers/Excel/ExcelHandler.Set.Sheet.cs:277 — src/officecli/Handlers/Excel/ExcelHandler.Set.Sheet.cs:277-288 | src/officecli/Handlers/Excel/ExcelHandler.Set.Sheet.cs:423-434 | src/officecli/Handlers/Excel/ExcelHandler.Set.Sheet.cs:444-455 | src/officecli/Handlers/Excel/ExcelHandler.Set.Sheet.cs:461-472 | src/officecli/Handlers/Excel/ExcelHandler.Set.Sheet.cs:478-491 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/officecli/Handlers/Excel/ExcelHandler.Set.Sheet.cs:277` 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 (12 lines × 5) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Media.cs:1053 — src/officecli/Handlers/Pptx/PowerPointHandler.Add.Media.cs:1053-1064 | src/officecli/Handlers/Pptx/PowerPointHandler.Add.Misc.cs:1186-1197 | src/officecli/Handlers/Pptx/PowerPointHandler.Add.Misc.cs:1943-1962 | src/officecli/Handlers/Pptx/PowerPointHandler.Add.Table.cs:19-30 | src/officecli/Handlers/Pptx/PowerPointHandler.Add.Text.cs:23-34 — there are 5 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×2
  • Duplicated block (7 lines × 3) src/officecli/Handlers/Pptx/PowerPointHandler.Fill.cs:288 — src/officecli/Handlers/Pptx/PowerPointHandler.Fill.cs:288-295 | src/officecli/Handlers/Pptx/PowerPointHandler.Fill.cs:309-315 | src/officecli/Handlers/Pptx/PowerPointHandler.Fill.cs:378-384 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/officecli/Handlers/Pptx/PowerPointHandler.Fill.cs:288` 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 × 3) src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:2772 — src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:2772-2778 | src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:2807-2813 | src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:2826-2832 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×2
  • Duplicated block (6 lines × 3) src/officecli/Core/Formula/FormulaEvaluator.Securities.cs:328 — src/officecli/Core/Formula/FormulaEvaluator.Securities.cs:328-333 | src/officecli/Core/Formula/FormulaEvaluator.Securities.cs:338-343 | src/officecli/Core/Formula/FormulaEvaluator.Securities.cs:348-353 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (6 lines × 3) src/officecli/Core/WordNumFmtRenderer.cs:426 — src/officecli/Core/WordNumFmtRenderer.cs:426-431 | src/officecli/Core/WordNumFmtRenderer.cs:542-547 | src/officecli/Core/WordNumFmtRenderer.cs:568-573 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/officecli/Core/WordNumFmtRenderer.cs:426` 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.
D1 · Cyclomatic Complexity · ChartHelper.SetChartProperties (cyclomatic 805) · ×1
  • ChartHelper.SetChartProperties (cyclomatic 805) src/officecli/Core/Chart/ChartHelper.Setter.cs:219 — ChartHelper.SetChartProperties has cyclomatic complexity 805 (threshold 15). Of this number, 794 points are the body's own statements and 11 belong to 8 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.
D1 · Cyclomatic Complexity · PowerPointHandler.SetRunOrShapeProperties (cyclomatic 565) · ×1
  • PowerPointHandler.SetRunOrShapeProperties (cyclomatic 565) src/officecli/Handlers/Pptx/PowerPointHandler.ShapeProperties.cs:165 — PowerPointHandler.SetRunOrShapeProperties has cyclomatic complexity 565 (threshold 15). Of this number, 560 points are the body's own statements and 5 belong to 4 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.
D1 · Cyclomatic Complexity · FormulaEvaluator.EvalFunction (cyclomatic 545) · ×1
  • FormulaEvaluator.EvalFunction (cyclomatic 545) src/officecli/Core/Formula/FormulaEvaluator.Functions.cs:13 — FormulaEvaluator.EvalFunction has cyclomatic complexity 545 (threshold 15). Of this number, 527 points are the body's own statements and 18 belong to 8 function literals inside it that branch. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · WordHandler.AddParagraph (cyclomatic 543) · ×1
  • WordHandler.AddParagraph (cyclomatic 543) src/officecli/Handlers/Word/WordHandler.Add.Text.cs:13 — WordHandler.AddParagraph has cyclomatic complexity 543 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.ParagraphToNode (cyclomatic 468) · ×1
  • WordHandler.ParagraphToNode (cyclomatic 468) src/officecli/Handlers/Word/WordHandler.Navigation.cs:3838 — WordHandler.ParagraphToNode has cyclomatic complexity 468 (threshold 15). Of this number, 442 points are the body's own statements and 26 belong to 22 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.
D1 · Cyclomatic Complexity · PowerPointHandler.AddPart (cyclomatic 461) · ×1
  • PowerPointHandler.AddPart (cyclomatic 461) src/officecli/Handlers/PowerPointHandler.cs:692 — PowerPointHandler.AddPart has cyclomatic complexity 461 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.QueryDispatch (cyclomatic 401) · ×1
  • WordHandler.QueryDispatch (cyclomatic 401) src/officecli/Handlers/Word/WordHandler.Query.cs:1735 — WordHandler.QueryDispatch has cyclomatic complexity 401 (threshold 15). Of this number, 397 points are the body's own statements and 4 belong to 4 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.
D1 · Cyclomatic Complexity · ChartHelper.ReadChartProperties (cyclomatic 396) · ×1
  • ChartHelper.ReadChartProperties (cyclomatic 396) src/officecli/Core/Chart/ChartHelper.Reader.cs:31 — ChartHelper.ReadChartProperties has cyclomatic complexity 396 (threshold 15). Of this number, 374 points are the body's own statements and 22 belong to 6 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.
D1 · Cyclomatic Complexity · PowerPointHandler.Get (cyclomatic 393) · ×1
  • PowerPointHandler.Get (cyclomatic 393) src/officecli/Handlers/Pptx/PowerPointHandler.Query.cs:18 — PowerPointHandler.Get has cyclomatic complexity 393 (threshold 15). Of this number, 390 points are the body's own statements and 3 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.
D1 · Cyclomatic Complexity · PowerPointHandler.ShapeToNode (cyclomatic 346) · ×1
  • PowerPointHandler.ShapeToNode (cyclomatic 346) src/officecli/Handlers/Pptx/PowerPointHandler.NodeBuilder.cs:866 — PowerPointHandler.ShapeToNode has cyclomatic complexity 346 (threshold 15). Of this number, 340 points are the body's own statements and 6 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.
D1 · Cyclomatic Complexity · WordHandler.AddRun (cyclomatic 308) · ×1
  • WordHandler.AddRun (cyclomatic 308) src/officecli/Handlers/Word/WordHandler.Add.Text.cs:2162 — WordHandler.AddRun has cyclomatic complexity 308 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FormulaParser.ParseCommand (cyclomatic 297) · ×1
  • FormulaParser.ParseCommand (cyclomatic 297) src/officecli/Core/Formula/FormulaParser.cs:1284 — FormulaParser.ParseCommand has cyclomatic complexity 297 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.SetTableCellProperties (cyclomatic 278) · ×1
  • PowerPointHandler.SetTableCellProperties (cyclomatic 278) src/officecli/Handlers/Pptx/PowerPointHandler.ShapeProperties.cs:2699 — PowerPointHandler.SetTableCellProperties has cyclomatic complexity 278 (threshold 15). Of this number, 277 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.
D1 · Cyclomatic Complexity · ExcelHandler.SetSheetLevel (cyclomatic 250) · ×1
  • ExcelHandler.SetSheetLevel (cyclomatic 250) src/officecli/Handlers/Excel/ExcelHandler.Set.Sheet.cs:31 — ExcelHandler.SetSheetLevel has cyclomatic complexity 250 (threshold 15). Of this number, 246 points are the body's own statements and 4 belong to 4 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.
D1 · Cyclomatic Complexity · PowerPointHandler.AddShape (cyclomatic 247) · ×1
  • PowerPointHandler.AddShape (cyclomatic 247) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Shape.cs:15 — PowerPointHandler.AddShape has cyclomatic complexity 247 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ChartSvgRenderer.RenderBarChartSvg (cyclomatic 241) · ×1
  • ChartSvgRenderer.RenderBarChartSvg (cyclomatic 241) src/officecli/Core/Chart/ChartSvgRenderer.cs:252 — ChartSvgRenderer.RenderBarChartSvg has cyclomatic complexity 241 (threshold 15). Of this number, 239 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.
D1 · Cyclomatic Complexity · ExcelHandler.Get (cyclomatic 228) · ×1
  • ExcelHandler.Get (cyclomatic 228) src/officecli/Handlers/Excel/ExcelHandler.Query.cs:16 — ExcelHandler.Get has cyclomatic complexity 228 (threshold 15). Of this number, 221 points are the body's own statements and 7 belong to 6 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.
D1 · Cyclomatic Complexity · WordHandler.Get (cyclomatic 223) · ×1
  • WordHandler.Get (cyclomatic 223) src/officecli/Handlers/Word/WordHandler.Query.cs:95 — WordHandler.Get has cyclomatic complexity 223 (threshold 15). Of this number, 222 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.
D1 · Cyclomatic Complexity · ChartSvgRenderer.ExtractChartInfo (cyclomatic 208) · ×1
  • ChartSvgRenderer.ExtractChartInfo (cyclomatic 208) src/officecli/Core/Chart/ChartSvgRenderer.cs:3325 — ChartSvgRenderer.ExtractChartInfo has cyclomatic complexity 208 (threshold 15). Of this number, 204 points are the body's own statements and 4 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.
D1 · Cyclomatic Complexity · WordHandler.ApplyRunFormatting (cyclomatic 205) · ×1
  • WordHandler.ApplyRunFormatting (cyclomatic 205) src/officecli/Handlers/Word/WordHandler.Helpers.RunFormat.cs:572 — WordHandler.ApplyRunFormatting has cyclomatic complexity 205 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelHandler.QueryDispatch (cyclomatic 202) · ×1
  • ExcelHandler.QueryDispatch (cyclomatic 202) src/officecli/Handlers/Excel/ExcelHandler.Query.cs:1102 — ExcelHandler.QueryDispatch has cyclomatic complexity 202 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.PresetGeometryToCss (cyclomatic 201) · ×1
  • PowerPointHandler.PresetGeometryToCss (cyclomatic 201) src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:2384 — PowerPointHandler.PresetGeometryToCss has cyclomatic complexity 201 (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.
D1 · Cyclomatic Complexity · PowerPointHandler.QueryDispatch (cyclomatic 194) · ×1
  • PowerPointHandler.QueryDispatch (cyclomatic 194) src/officecli/Handlers/Pptx/PowerPointHandler.Query.cs:1547 — PowerPointHandler.QueryDispatch has cyclomatic complexity 194 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.Remove (cyclomatic 192) · ×1
  • WordHandler.Remove (cyclomatic 192) src/officecli/Handlers/Word/WordHandler.Mutations.cs:18 — WordHandler.Remove has cyclomatic complexity 192 (threshold 15). Of this number, 181 points are the body's own statements and 11 belong to 11 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.
D1 · Cyclomatic Complexity · WordHandler.RunToNode (cyclomatic 188) · ×1
  • WordHandler.RunToNode (cyclomatic 188) src/officecli/Handlers/Word/WordHandler.Navigation.cs:2081 — WordHandler.RunToNode has cyclomatic complexity 188 (threshold 15). Of this number, 186 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.
D1 · Cyclomatic Complexity · ExcelHandler.Remove (cyclomatic 186) · ×1
  • ExcelHandler.Remove (cyclomatic 186) src/officecli/Handlers/Excel/ExcelHandler.Remove.cs:17 — ExcelHandler.Remove has cyclomatic complexity 186 (threshold 15). Of this number, 184 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.
D1 · Cyclomatic Complexity · PowerPointHandler.RenderShape (cyclomatic 181) · ×1
  • PowerPointHandler.RenderShape (cyclomatic 181) src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Shapes.cs:21 — PowerPointHandler.RenderShape has cyclomatic complexity 181 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.NavigateToElement (cyclomatic 181) · ×1
  • WordHandler.NavigateToElement (cyclomatic 181) src/officecli/Handlers/Word/WordHandler.Navigation.cs:1016 — WordHandler.NavigateToElement has cyclomatic complexity 181 (threshold 15). Of this number, 155 points are the body's own statements and 26 belong to 15 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.
D1 · Cyclomatic Complexity · PowerPointHandler.AddConnector (cyclomatic 171) · ×1
  • PowerPointHandler.AddConnector (cyclomatic 171) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Misc.cs:17 — PowerPointHandler.AddConnector has cyclomatic complexity 171 (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.
D1 · Cyclomatic Complexity · WordHandler.RenderBodyHtml (cyclomatic 171) · ×1
  • WordHandler.RenderBodyHtml (cyclomatic 171) src/officecli/Handlers/Word/WordHandler.HtmlPreview.cs:2461 — WordHandler.RenderBodyHtml has cyclomatic complexity 171 (threshold 15). Of this number, 169 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.
D1 · Cyclomatic Complexity · WordBatchEmitter.EmitTable (cyclomatic 167) · ×1
  • WordBatchEmitter.EmitTable (cyclomatic 167) src/officecli/Handlers/Word/WordBatchEmitter.Table.cs:102 — WordBatchEmitter.EmitTable has cyclomatic complexity 167 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.AddStyle (cyclomatic 167) · ×1
  • WordHandler.AddStyle (cyclomatic 167) src/officecli/Handlers/Word/WordHandler.Add.Structure.cs:1137 — WordHandler.AddStyle has cyclomatic complexity 167 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.RenderTableHtml (cyclomatic 163) · ×1
  • WordHandler.RenderTableHtml (cyclomatic 163) src/officecli/Handlers/Word/WordHandler.HtmlPreview.Tables.cs:26 — WordHandler.RenderTableHtml has cyclomatic complexity 163 (threshold 15). Of this number, 150 points are the body's own statements and 13 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PivotTableHelper.RenderGeneralPivot (cyclomatic 162) · ×1
  • PivotTableHelper.RenderGeneralPivot (cyclomatic 162) src/officecli/Core/PivotTableHelper.Render.cs:1754 — PivotTableHelper.RenderGeneralPivot has cyclomatic complexity 162 (threshold 15). Of this number, 159 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.
D1 · Cyclomatic Complexity · PowerPointHandler.AddPicture (cyclomatic 162) · ×1
  • PowerPointHandler.AddPicture (cyclomatic 162) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Media.cs:16 — PowerPointHandler.AddPicture has cyclomatic complexity 162 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.AddTable (cyclomatic 160) · ×1
  • WordHandler.AddTable (cyclomatic 160) src/officecli/Handlers/Word/WordHandler.Add.Table.cs:45 — WordHandler.AddTable has cyclomatic complexity 160 (threshold 15). Of this number, 158 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.
D1 · Cyclomatic Complexity · ChartHelper.SetAxisProperties (cyclomatic 158) · ×1
  • ChartHelper.SetAxisProperties (cyclomatic 158) src/officecli/Core/Chart/ChartHelper.Axis.cs:208 — ChartHelper.SetAxisProperties has cyclomatic complexity 158 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.AddSection (cyclomatic 158) · ×1
  • WordHandler.AddSection (cyclomatic 158) src/officecli/Handlers/Word/WordHandler.Add.Structure.cs:79 — WordHandler.AddSection has cyclomatic complexity 158 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.SetElementTableCell (cyclomatic 158) · ×1
  • WordHandler.SetElementTableCell (cyclomatic 158) src/officecli/Handlers/Word/WordHandler.Set.Element.cs:1755 — WordHandler.SetElementTableCell has cyclomatic complexity 158 (threshold 15). Of this number, 155 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.
D1 · Cyclomatic Complexity · CommandBuilder.BuildViewCommand (cyclomatic 154) · ×1
  • CommandBuilder.BuildViewCommand (cyclomatic 154) src/officecli/CommandBuilder.View.cs:12 — CommandBuilder.BuildViewCommand has cyclomatic complexity 154 (threshold 15). Most of this is not in the body itself: 1 of the 154 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 57, 116). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · ExcelHandler.CellToNode (cyclomatic 149) · ×1
  • ExcelHandler.CellToNode (cyclomatic 149) src/officecli/Handlers/Excel/ExcelHandler.Helpers.Node.cs:295 — ExcelHandler.CellToNode has cyclomatic complexity 149 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelHandler.ApplySheetRangeMutations (cyclomatic 149) · ×1
  • ExcelHandler.ApplySheetRangeMutations (cyclomatic 149) src/officecli/Handlers/Excel/ExcelHandler.SheetShift.cs:63 — ExcelHandler.ApplySheetRangeMutations has cyclomatic complexity 149 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.AddRun (cyclomatic 146) · ×1
  • PowerPointHandler.AddRun (cyclomatic 146) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Text.cs:603 — PowerPointHandler.AddRun has cyclomatic complexity 146 (threshold 15). Of this number, 143 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.
D1 · Cyclomatic Complexity · ExcelHandler.ApplyCellProperties (cyclomatic 139) · ×1
  • ExcelHandler.ApplyCellProperties (cyclomatic 139) src/officecli/Handlers/Excel/ExcelHandler.Set.Cells.cs:90 — ExcelHandler.ApplyCellProperties has cyclomatic complexity 139 (threshold 15). Of this number, 135 points are the body's own statements and 4 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.
D1 · Cyclomatic Complexity · WordHandler.GetParagraphInlineCss (cyclomatic 138) · ×1
  • WordHandler.GetParagraphInlineCss (cyclomatic 138) src/officecli/Handlers/Word/WordHandler.HtmlPreview.Css.cs:336 — WordHandler.GetParagraphInlineCss has cyclomatic complexity 138 (threshold 15). Of this number, 136 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.
D1 · Cyclomatic Complexity · WordHandler.SetElementTable (cyclomatic 136) · ×1
  • WordHandler.SetElementTable (cyclomatic 136) src/officecli/Handlers/Word/WordHandler.Set.Element.cs:2654 — WordHandler.SetElementTable has cyclomatic complexity 136 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.AddField (cyclomatic 134) · ×1
  • WordHandler.AddField (cyclomatic 134) src/officecli/Handlers/Word/WordHandler.Add.Misc.cs:1267 — WordHandler.AddField has cyclomatic complexity 134 (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.
D1 · Cyclomatic Complexity · WordHandler.RenderRunHtml (cyclomatic 134) · ×1
  • WordHandler.RenderRunHtml (cyclomatic 134) src/officecli/Handlers/Word/WordHandler.HtmlPreview.Text.cs:711 — WordHandler.RenderRunHtml has cyclomatic complexity 134 (threshold 15). Of this number, 123 points are the body's own statements and 11 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.Remove (cyclomatic 133) · ×1
  • PowerPointHandler.Remove (cyclomatic 133) src/officecli/Handlers/Pptx/PowerPointHandler.Mutations.cs:16 — PowerPointHandler.Remove has cyclomatic complexity 133 (threshold 15). Of this number, 132 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.
D1 · Cyclomatic Complexity · ChartExBuilder.HandleSetKey (cyclomatic 131) · ×1
  • ChartExBuilder.HandleSetKey (cyclomatic 131) src/officecli/Core/Chart/ChartExBuilder.Setter.cs:72 — ChartExBuilder.HandleSetKey has cyclomatic complexity 131 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ChartSvgRenderer.RenderLineChartSvg (cyclomatic 129) · ×1
  • ChartSvgRenderer.RenderLineChartSvg (cyclomatic 129) src/officecli/Core/Chart/ChartSvgRenderer.cs:1267 — ChartSvgRenderer.RenderLineChartSvg has cyclomatic complexity 129 (threshold 15). Of this number, 128 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.
D1 · Cyclomatic Complexity · WordHandler.TrySetSectionLayout (cyclomatic 129) · ×1
  • WordHandler.TrySetSectionLayout (cyclomatic 129) src/officecli/Handlers/Word/WordHandler.Set.SectionLayout.cs:17 — WordHandler.TrySetSectionLayout has cyclomatic complexity 129 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.AddPicture (cyclomatic 126) · ×1
  • WordHandler.AddPicture (cyclomatic 126) src/officecli/Handlers/Word/WordHandler.Add.Media.cs:302 — WordHandler.AddPicture has cyclomatic complexity 126 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.SetElementRun (cyclomatic 123) · ×1
  • WordHandler.SetElementRun (cyclomatic 123) src/officecli/Handlers/Word/WordHandler.Set.Element.cs:192 — WordHandler.SetElementRun has cyclomatic complexity 123 (threshold 15). Of this number, 121 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.
D1 · Cyclomatic Complexity · ExcelHandler.AddTable (cyclomatic 121) · ×1
  • ExcelHandler.AddTable (cyclomatic 121) src/officecli/Handlers/Excel/ExcelHandler.Add.Tables.cs:1058 — ExcelHandler.AddTable has cyclomatic complexity 121 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.RenderTextBody (cyclomatic 121) · ×1
  • PowerPointHandler.RenderTextBody (cyclomatic 121) src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Text.cs:17 — PowerPointHandler.RenderTextBody has cyclomatic complexity 121 (threshold 15). Of this number, 117 points are the body's own statements and 4 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.
D1 · Cyclomatic Complexity · WordHandler.GetRunInlineCss (cyclomatic 120) · ×1
  • WordHandler.GetRunInlineCss (cyclomatic 120) src/officecli/Handlers/Word/WordHandler.HtmlPreview.Css.cs:1549 — WordHandler.GetRunInlineCss has cyclomatic complexity 120 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ResidentServer.ExecuteView (cyclomatic 119) · ×1
  • ResidentServer.ExecuteView (cyclomatic 119) src/officecli/ResidentServer.cs:1458 — ResidentServer.ExecuteView has cyclomatic complexity 119 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.ApplyPicturePropertiesCore (cyclomatic 116) · ×1
  • PowerPointHandler.ApplyPicturePropertiesCore (cyclomatic 116) src/officecli/Handlers/Pptx/PowerPointHandler.Set.Media.cs:45 — PowerPointHandler.ApplyPicturePropertiesCore has cyclomatic complexity 116 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.ApplyParagraphLevelProperty (cyclomatic 116) · ×1
  • WordHandler.ApplyParagraphLevelProperty (cyclomatic 116) src/officecli/Handlers/Word/WordHandler.Set.cs:1050 — WordHandler.ApplyParagraphLevelProperty has cyclomatic complexity 116 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.ApplyConnectorProps (cyclomatic 115) · ×1
  • PowerPointHandler.ApplyConnectorProps (cyclomatic 115) src/officecli/Handlers/Pptx/PowerPointHandler.Set.Shape.cs:833 — PowerPointHandler.ApplyConnectorProps has cyclomatic complexity 115 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.SetElementParagraph (cyclomatic 115) · ×1
  • WordHandler.SetElementParagraph (cyclomatic 115) src/officecli/Handlers/Word/WordHandler.Set.Element.cs:1135 — WordHandler.SetElementParagraph has cyclomatic complexity 115 (threshold 15). Of this number, 114 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.
D1 · Cyclomatic Complexity · FormulaParser.ToLatexByName (cyclomatic 114) · ×1
  • FormulaParser.ToLatexByName (cyclomatic 114) src/officecli/Core/Formula/FormulaParser.cs:318 — FormulaParser.ToLatexByName has cyclomatic complexity 114 (threshold 15). Of this number, 112 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.
D1 · Cyclomatic Complexity · PivotTableHelper.SetPivotTableProperties (cyclomatic 114) · ×1
  • PivotTableHelper.SetPivotTableProperties (cyclomatic 114) src/officecli/Core/PivotTableHelper.Set.cs:13 — PivotTableHelper.SetPivotTableProperties has cyclomatic complexity 114 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordBatchEmitter.FilterEmittableProps (cyclomatic 114) · ×1
  • WordBatchEmitter.FilterEmittableProps (cyclomatic 114) src/officecli/Handlers/Word/WordBatchEmitter.Filters.cs:138 — WordBatchEmitter.FilterEmittableProps has cyclomatic complexity 114 (threshold 15). Of this number, 111 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.
D1 · Cyclomatic Complexity · WordBatchEmitter.TryEmitFieldRun (cyclomatic 114) · ×1
  • WordBatchEmitter.TryEmitFieldRun (cyclomatic 114) src/officecli/Handlers/Word/WordBatchEmitter.Paragraph.cs:2183 — WordBatchEmitter.TryEmitFieldRun has cyclomatic complexity 114 (threshold 15). Of this number, 113 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.
D1 · Cyclomatic Complexity · WordHandler.BeginTrackChangeIfRequested (cyclomatic 111) · ×1
  • WordHandler.BeginTrackChangeIfRequested (cyclomatic 111) src/officecli/Handlers/Word/WordHandler.Set.Revision.cs:106 — WordHandler.BeginTrackChangeIfRequested has cyclomatic complexity 111 (threshold 15). Of this number, 86 points are the body's own statements and 25 belong to 6 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.
D1 · Cyclomatic Complexity · PowerPointHandler.RenderPicture (cyclomatic 108) · ×1
  • PowerPointHandler.RenderPicture (cyclomatic 108) src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Shapes.cs:1391 — PowerPointHandler.RenderPicture has cyclomatic complexity 108 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CommandBuilder.ExecuteBatchItem (cyclomatic 107) · ×1
  • CommandBuilder.ExecuteBatchItem (cyclomatic 107) src/officecli/CommandBuilder.cs:897 — CommandBuilder.ExecuteBatchItem has cyclomatic complexity 107 (threshold 15). Of this number, 106 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.
D1 · Cyclomatic Complexity · PowerPointHandler.RenderRun (cyclomatic 106) · ×1
  • PowerPointHandler.RenderRun (cyclomatic 106) src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Text.cs:755 — PowerPointHandler.RenderRun has cyclomatic complexity 106 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.TableToNode (cyclomatic 105) · ×1
  • PowerPointHandler.TableToNode (cyclomatic 105) src/officecli/Handlers/Pptx/PowerPointHandler.NodeBuilder.cs:388 — PowerPointHandler.TableToNode has cyclomatic complexity 105 (threshold 15). Of this number, 104 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.
D1 · Cyclomatic Complexity · PowerPointHandler.PictureToNode (cyclomatic 105) · ×1
  • PowerPointHandler.PictureToNode (cyclomatic 105) src/officecli/Handlers/Pptx/PowerPointHandler.NodeBuilder.cs:2579 — PowerPointHandler.PictureToNode has cyclomatic complexity 105 (threshold 15). Of this number, 104 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.
D1 · Cyclomatic Complexity · WordBatchEmitter.CollapseFieldChains (cyclomatic 105) · ×1
  • WordBatchEmitter.CollapseFieldChains (cyclomatic 105) src/officecli/Handlers/Word/WordBatchEmitter.Fields.cs:199 — WordBatchEmitter.CollapseFieldChains has cyclomatic complexity 105 (threshold 15). Of this number, 103 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.
D1 · Cyclomatic Complexity · ExcelHandler.RenderSheetTable (cyclomatic 102) · ×1
  • ExcelHandler.RenderSheetTable (cyclomatic 102) src/officecli/Handlers/Excel/ExcelHandler.HtmlPreview.cs:312 — ExcelHandler.RenderSheetTable has cyclomatic complexity 102 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.SetSectionPath (cyclomatic 101) · ×1
  • WordHandler.SetSectionPath (cyclomatic 101) src/officecli/Handlers/Word/WordHandler.Set.Dispatch.cs:805 — WordHandler.SetSectionPath 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.
D1 · Cyclomatic Complexity · CommandBuilder.BuildSetCommand (cyclomatic 100) · ×1
  • CommandBuilder.BuildSetCommand (cyclomatic 100) src/officecli/CommandBuilder.Set.cs:12 — CommandBuilder.BuildSetCommand has cyclomatic complexity 100 (threshold 15). Most of this is not in the body itself: 1 of the 100 points is its own statement and the rest belongs to one function literal inside it that branches (line 32). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · WordBatchEmitter.EmitParagraph (cyclomatic 100) · ×1
  • WordBatchEmitter.EmitParagraph (cyclomatic 100) src/officecli/Handlers/Word/WordBatchEmitter.Paragraph.cs:50 — WordBatchEmitter.EmitParagraph has cyclomatic complexity 100 (threshold 15). Of this number, 66 points are the body's own statements and 34 belong to 8 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.
D1 · Cyclomatic Complexity · WordHandler.TableToNode (cyclomatic 100) · ×1
  • WordHandler.TableToNode (cyclomatic 100) src/officecli/Handlers/Word/WordHandler.Navigation.cs:3013 — WordHandler.TableToNode has cyclomatic complexity 100 (threshold 15). Of this number, 97 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.
D1 · Cyclomatic Complexity · PowerPointHandler.ViewAsIssues (cyclomatic 98) · ×1
  • PowerPointHandler.ViewAsIssues (cyclomatic 98) src/officecli/Handlers/Pptx/PowerPointHandler.View.cs:515 — PowerPointHandler.ViewAsIssues has cyclomatic complexity 98 (threshold 15). Of this number, 95 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.
D1 · Cyclomatic Complexity · PowerPointHandler.Set (cyclomatic 97) · ×1
  • PowerPointHandler.Set (cyclomatic 97) src/officecli/Handlers/Pptx/PowerPointHandler.Set.cs:15 — PowerPointHandler.Set has cyclomatic complexity 97 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PivotTableHelper.RenderMatrixPivot (cyclomatic 94) · ×1
  • PivotTableHelper.RenderMatrixPivot (cyclomatic 94) src/officecli/Core/PivotTableHelper.Render.cs:1293 — PivotTableHelper.RenderMatrixPivot has cyclomatic complexity 94 (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.
D1 · Cyclomatic Complexity · PowerPointHandler.AddParagraph (cyclomatic 94) · ×1
  • PowerPointHandler.AddParagraph (cyclomatic 94) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Text.cs:177 — PowerPointHandler.AddParagraph has cyclomatic complexity 94 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ChartSvgRenderer.RenderAreaChartSvg (cyclomatic 93) · ×1
  • ChartSvgRenderer.RenderAreaChartSvg (cyclomatic 93) src/officecli/Core/Chart/ChartSvgRenderer.cs:1995 — ChartSvgRenderer.RenderAreaChartSvg has cyclomatic complexity 93 (threshold 15). Of this number, 92 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.
D1 · Cyclomatic Complexity · FormulaEvaluator.Tokenize (cyclomatic 93) · ×1
  • FormulaEvaluator.Tokenize (cyclomatic 93) src/officecli/Core/Formula/FormulaEvaluator.cs:373 — FormulaEvaluator.Tokenize has cyclomatic complexity 93 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.ReadCellProps (cyclomatic 93) · ×1
  • WordHandler.ReadCellProps (cyclomatic 93) src/officecli/Handlers/Word/WordHandler.Navigation.cs:6387 — WordHandler.ReadCellProps has cyclomatic complexity 93 (threshold 15). Of this number, 92 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.
D1 · Cyclomatic Complexity · WordHandler.GetRootNode (cyclomatic 91) · ×1
  • WordHandler.GetRootNode (cyclomatic 91) src/officecli/Handlers/Word/WordHandler.Navigation.cs:92 — WordHandler.GetRootNode has cyclomatic complexity 91 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PivotTableHelper.RenderPivotIntoSheetCore (cyclomatic 90) · ×1
  • PivotTableHelper.RenderPivotIntoSheetCore (cyclomatic 90) src/officecli/Core/PivotTableHelper.Render.cs:100 — PivotTableHelper.RenderPivotIntoSheetCore has cyclomatic complexity 90 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.AddCell (cyclomatic 90) · ×1
  • WordHandler.AddCell (cyclomatic 90) src/officecli/Handlers/Word/WordHandler.Add.Table.cs:1177 — WordHandler.AddCell has cyclomatic complexity 90 (threshold 15). Of this number, 89 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.
D1 · Cyclomatic Complexity · WordHandler.AddFormField (cyclomatic 88) · ×1
  • WordHandler.AddFormField (cyclomatic 88) src/officecli/Handlers/Word/WordHandler.FormFields.cs:293 — WordHandler.AddFormField has cyclomatic complexity 88 (threshold 15). Of this number, 85 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.
D1 · Cyclomatic Complexity · PowerPointHandler.ApplyTransition (cyclomatic 87) · ×1
  • PowerPointHandler.ApplyTransition (cyclomatic 87) src/officecli/Handlers/Pptx/PowerPointHandler.Animations.cs:323 — PowerPointHandler.ApplyTransition has cyclomatic complexity 87 (threshold 15). Of this number, 86 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.
D1 · Cyclomatic Complexity · WordHandler.Set (cyclomatic 87) · ×1
  • WordHandler.Set (cyclomatic 87) src/officecli/Handlers/Word/WordHandler.Set.cs:14 — WordHandler.Set has cyclomatic complexity 87 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.SetStylePath (cyclomatic 87) · ×1
  • WordHandler.SetStylePath (cyclomatic 87) src/officecli/Handlers/Word/WordHandler.Set.Dispatch.cs:1639 — WordHandler.SetStylePath has cyclomatic complexity 87 (threshold 15). Of this number, 86 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.
D1 · Cyclomatic Complexity · ChartHelper.HandleSeriesDottedProperty (cyclomatic 86) · ×1
  • ChartHelper.HandleSeriesDottedProperty (cyclomatic 86) src/officecli/Core/Chart/ChartHelper.SetterHelpers.cs:686 — ChartHelper.HandleSeriesDottedProperty has cyclomatic complexity 86 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelHandler.AddShape (cyclomatic 85) · ×1
  • ExcelHandler.AddShape (cyclomatic 85) src/officecli/Handlers/Excel/ExcelHandler.Add.Drawings.cs:577 — ExcelHandler.AddShape has cyclomatic complexity 85 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.RenderConnector (cyclomatic 85) · ×1
  • PowerPointHandler.RenderConnector (cyclomatic 85) src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Shapes.cs:1878 — PowerPointHandler.RenderConnector has cyclomatic complexity 85 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ChartSvgRenderer.RenderChartSvgContent (cyclomatic 84) · ×1
  • ChartSvgRenderer.RenderChartSvgContent (cyclomatic 84) src/officecli/Core/Chart/ChartSvgRenderer.cs:4518 — ChartSvgRenderer.RenderChartSvgContent 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.
D1 · Cyclomatic Complexity · SchemaHelpRenderer.RenderHuman (cyclomatic 83) · ×1
  • SchemaHelpRenderer.RenderHuman (cyclomatic 83) src/officecli/Help/SchemaHelpRenderer.cs:33 — SchemaHelpRenderer.RenderHuman has cyclomatic complexity 83 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ChartHelper.BuildChartSpace (cyclomatic 82) · ×1
  • ChartHelper.BuildChartSpace (cyclomatic 82) src/officecli/Core/Chart/ChartHelper.Builder.cs:14 — ChartHelper.BuildChartSpace has cyclomatic complexity 82 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.RenderTable (cyclomatic 82) · ×1
  • PowerPointHandler.RenderTable (cyclomatic 82) src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Tables.cs:18 — PowerPointHandler.RenderTable has cyclomatic complexity 82 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.AddComment (cyclomatic 82) · ×1
  • WordHandler.AddComment (cyclomatic 82) src/officecli/Handlers/Word/WordHandler.Add.Misc.cs:13 — WordHandler.AddComment has cyclomatic complexity 82 (threshold 15). Of this number, 80 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.
D1 · Cyclomatic Complexity · WordHandler.ResolveParagraphStyleCss (cyclomatic 82) · ×1
  • WordHandler.ResolveParagraphStyleCss (cyclomatic 82) src/officecli/Handlers/Word/WordHandler.HtmlPreview.Css.cs:1257 — WordHandler.ResolveParagraphStyleCss has cyclomatic complexity 82 (threshold 15). Of this number, 81 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.
D1 · Cyclomatic Complexity · ExcelStyleManager.ApplyStyle (cyclomatic 81) · ×1
  • ExcelStyleManager.ApplyStyle (cyclomatic 81) src/officecli/Core/ExcelStyleManager.cs:74 — ExcelStyleManager.ApplyStyle has cyclomatic complexity 81 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.AddEquation (cyclomatic 81) · ×1
  • WordHandler.AddEquation (cyclomatic 81) src/officecli/Handlers/Word/WordHandler.Add.Text.cs:1785 — WordHandler.AddEquation has cyclomatic complexity 81 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.SetFieldPath (cyclomatic 80) · ×1
  • WordHandler.SetFieldPath (cyclomatic 80) src/officecli/Handlers/Word/WordHandler.Set.Dispatch.cs:175 — WordHandler.SetFieldPath has cyclomatic complexity 80 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelHandler.EvaluateCfRule (cyclomatic 79) · ×1
  • ExcelHandler.EvaluateCfRule (cyclomatic 79) src/officecli/Handlers/Excel/ExcelHandler.HtmlPreview.cs:1690 — ExcelHandler.EvaluateCfRule has cyclomatic complexity 79 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.BuildSectionNode (cyclomatic 79) · ×1
  • WordHandler.BuildSectionNode (cyclomatic 79) src/officecli/Handlers/Word/WordHandler.Query.cs:973 — WordHandler.BuildSectionNode has cyclomatic complexity 79 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.ValidateParentChild (cyclomatic 78) · ×1
  • WordHandler.ValidateParentChild (cyclomatic 78) src/officecli/Handlers/Word/WordHandler.Add.cs:319 — WordHandler.ValidateParentChild has cyclomatic complexity 78 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · PivotTableHelper.RebuildFieldAreas (cyclomatic 77) · ×1
  • PivotTableHelper.RebuildFieldAreas (cyclomatic 77) src/officecli/Core/PivotTableHelper.Set.cs:405 — PivotTableHelper.RebuildFieldAreas has cyclomatic complexity 77 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelHandler.GetShapeNode (cyclomatic 77) · ×1
  • ExcelHandler.GetShapeNode (cyclomatic 77) src/officecli/Handlers/Excel/ExcelHandler.Helpers.Drawing.cs:473 — ExcelHandler.GetShapeNode has cyclomatic complexity 77 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelHandler.ApplyNumberFormatCore (cyclomatic 76) · ×1
  • ExcelHandler.ApplyNumberFormatCore (cyclomatic 76) src/officecli/Handlers/Excel/ExcelHandler.HtmlPreview.cs:3425 — ExcelHandler.ApplyNumberFormatCore has cyclomatic complexity 76 (threshold 15). Of this number, 72 points are the body's own statements and 4 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.
D1 · Cyclomatic Complexity · WordHandler.ViewAsIssues (cyclomatic 76) · ×1
  • WordHandler.ViewAsIssues (cyclomatic 76) src/officecli/Handlers/Word/WordHandler.View.cs:1174 — WordHandler.ViewAsIssues has cyclomatic complexity 76 (threshold 15). Of this number, 75 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.
D1 · Cyclomatic Complexity · CommandBuilder.BuildBatchCommand (cyclomatic 74) · ×1
  • CommandBuilder.BuildBatchCommand (cyclomatic 74) src/officecli/CommandBuilder.Batch.cs:118 — CommandBuilder.BuildBatchCommand has cyclomatic complexity 74 (threshold 15). Most of this is not in the body itself: 1 of the 74 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 149, 189). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · PivotTableHelper.ReadPivotTableProperties (cyclomatic 74) · ×1
  • PivotTableHelper.ReadPivotTableProperties (cyclomatic 74) src/officecli/Core/PivotTableHelper.Readback.cs:15 — PivotTableHelper.ReadPivotTableProperties has cyclomatic complexity 74 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordBatchEmitter.TryEmitPictureRun (cyclomatic 74) · ×1
  • WordBatchEmitter.TryEmitPictureRun (cyclomatic 74) src/officecli/Handlers/Word/WordBatchEmitter.Paragraph.cs:2665 — WordBatchEmitter.TryEmitPictureRun has cyclomatic complexity 74 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.ViewAsHtmlCore (cyclomatic 74) · ×1
  • WordHandler.ViewAsHtmlCore (cyclomatic 74) src/officecli/Handlers/Word/WordHandler.HtmlPreview.cs:143 — WordHandler.ViewAsHtmlCore has cyclomatic complexity 74 (threshold 15). Of this number, 69 points are the body's own statements and 5 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.
D1 · Cyclomatic Complexity · PivotTableHelper.CreatePivotTable (cyclomatic 73) · ×1
  • PivotTableHelper.CreatePivotTable (cyclomatic 73) src/officecli/Core/PivotTableHelper.cs:904 — PivotTableHelper.CreatePivotTable has cyclomatic complexity 73 (threshold 15). Of this number, 72 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.
D1 · Cyclomatic Complexity · ExcelHandler.ViewAsIssues (cyclomatic 73) · ×1
  • ExcelHandler.ViewAsIssues (cyclomatic 73) src/officecli/Handlers/Excel/ExcelHandler.View.cs:528 — ExcelHandler.ViewAsIssues has cyclomatic complexity 73 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.AddGroup (cyclomatic 73) · ×1
  • PowerPointHandler.AddGroup (cyclomatic 73) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Misc.cs:798 — PowerPointHandler.AddGroup has cyclomatic complexity 73 (threshold 15). Of this number, 64 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.AddSdt (cyclomatic 73) · ×1
  • WordHandler.AddSdt (cyclomatic 73) src/officecli/Handlers/Word/WordHandler.Add.Misc.cs:2123 — WordHandler.AddSdt has cyclomatic complexity 73 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PptxBatchEmitter.EmitChart (cyclomatic 72) · ×1
  • PptxBatchEmitter.EmitChart (cyclomatic 72) src/officecli/Handlers/Pptx/PptxBatchEmitter.Charts.cs:17 — PptxBatchEmitter.EmitChart has cyclomatic complexity 72 (threshold 15). Of this number, 70 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.
D1 · Cyclomatic Complexity · WordHandler.GetTableCellInlineCss (cyclomatic 72) · ×1
  • WordHandler.GetTableCellInlineCss (cyclomatic 72) src/officecli/Handlers/Word/WordHandler.HtmlPreview.Css.cs:2219 — WordHandler.GetTableCellInlineCss has cyclomatic complexity 72 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelHandler.PopulateCfNodeFromRule (cyclomatic 71) · ×1
  • ExcelHandler.PopulateCfNodeFromRule (cyclomatic 71) src/officecli/Handlers/Excel/ExcelHandler.Query.Cf.cs:22 — ExcelHandler.PopulateCfNodeFromRule 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.
D1 · Cyclomatic Complexity · PowerPointHandler.AddPlaceholder (cyclomatic 71) · ×1
  • PowerPointHandler.AddPlaceholder (cyclomatic 71) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Misc.cs:1184 — PowerPointHandler.AddPlaceholder has cyclomatic complexity 71 (threshold 15). Of this number, 68 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WordBatchEmitter.TryEmitTextbox (cyclomatic 71) · ×1
  • WordBatchEmitter.TryEmitTextbox (cyclomatic 71) src/officecli/Handlers/Word/WordBatchEmitter.Paragraph.cs:3530 — WordBatchEmitter.TryEmitTextbox 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.
D1 · Cyclomatic Complexity · ExcelHandler.SetTableByPath (cyclomatic 70) · ×1
  • ExcelHandler.SetTableByPath (cyclomatic 70) src/officecli/Handlers/Excel/ExcelHandler.Set.Tables.cs:371 — ExcelHandler.SetTableByPath has cyclomatic complexity 70 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.SetTablePropsCore (cyclomatic 69) · ×1
  • PowerPointHandler.SetTablePropsCore (cyclomatic 69) src/officecli/Handlers/Pptx/PowerPointHandler.Set.Table.cs:228 — PowerPointHandler.SetTablePropsCore 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.RenderParagraphContentHtml (cyclomatic 69) · ×1
  • WordHandler.RenderParagraphContentHtml (cyclomatic 69) src/officecli/Handlers/Word/WordHandler.HtmlPreview.Text.cs:379 — WordHandler.RenderParagraphContentHtml 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PivotTableHelper.RenderMultiColPivot (cyclomatic 68) · ×1
  • PivotTableHelper.RenderMultiColPivot (cyclomatic 68) src/officecli/Core/PivotTableHelper.Render.cs:903 — PivotTableHelper.RenderMultiColPivot has cyclomatic complexity 68 (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.
D1 · Cyclomatic Complexity · ExcelHandler.Set (cyclomatic 68) · ×1
  • ExcelHandler.Set (cyclomatic 68) src/officecli/Handlers/Excel/ExcelHandler.Set.cs:19 — ExcelHandler.Set has cyclomatic complexity 68 (threshold 15). Of this number, 66 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.
D1 · Cyclomatic Complexity · WordBatchEmitter.BuildChartProps (cyclomatic 68) · ×1
  • WordBatchEmitter.BuildChartProps (cyclomatic 68) src/officecli/Handlers/Word/WordBatchEmitter.Charts.cs:9 — WordBatchEmitter.BuildChartProps 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.
D1 · Cyclomatic Complexity · WordHandler.AddLvl (cyclomatic 68) · ×1
  • WordHandler.AddLvl (cyclomatic 68) src/officecli/Handlers/Word/WordHandler.Add.Structure.cs:2425 — WordHandler.AddLvl has cyclomatic complexity 68 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CommandBuilder.BuildAddCommand (cyclomatic 67) · ×1
  • CommandBuilder.BuildAddCommand (cyclomatic 67) src/officecli/CommandBuilder.Add.cs:13 — CommandBuilder.BuildAddCommand has cyclomatic complexity 67 (threshold 15). Most of this is not in the body itself: 1 of the 67 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 57, 28, 151, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · OutputFormatter.EnrichFromMessage (cyclomatic 67) · ×1
  • OutputFormatter.EnrichFromMessage (cyclomatic 67) src/officecli/Core/OutputFormatter.cs:317 — OutputFormatter.EnrichFromMessage has cyclomatic complexity 67 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ExcelHandler.Move (cyclomatic 67) · ×1
  • ExcelHandler.Move (cyclomatic 67) src/officecli/Handlers/Excel/ExcelHandler.Add.cs:168 — ExcelHandler.Move has cyclomatic complexity 67 (threshold 15). Of this number, 66 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.
D1 · Cyclomatic Complexity · WordHandler.ProcessFindInParagraph (cyclomatic 67) · ×1
  • WordHandler.ProcessFindInParagraph (cyclomatic 67) src/officecli/Handlers/Word/WordHandler.Helpers.FindReplace.cs:291 — WordHandler.ProcessFindInParagraph has cyclomatic complexity 67 (threshold 15). Of this number, 65 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.
D1 · Cyclomatic Complexity · ExcelHandler.SetShapeByPath (cyclomatic 66) · ×1
  • ExcelHandler.SetShapeByPath (cyclomatic 66) src/officecli/Handlers/Excel/ExcelHandler.Set.Drawings.cs:398 — ExcelHandler.SetShapeByPath has cyclomatic complexity 66 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelHandler.RewriteSidecarRefsAfterSort (cyclomatic 65) · ×1
  • ExcelHandler.RewriteSidecarRefsAfterSort (cyclomatic 65) src/officecli/Handlers/Excel/ExcelHandler.Set.Ranges.cs:578 — ExcelHandler.RewriteSidecarRefsAfterSort 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.
D1 · Cyclomatic Complexity · ExcelHandler.SetCfByPath (cyclomatic 65) · ×1
  • ExcelHandler.SetCfByPath (cyclomatic 65) src/officecli/Handlers/Excel/ExcelHandler.Set.Tables.cs:826 — ExcelHandler.SetCfByPath 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.
D1 · Cyclomatic Complexity · ExcelHandler.TrySetWorkbookSetting (cyclomatic 65) · ×1
  • ExcelHandler.TrySetWorkbookSetting (cyclomatic 65) src/officecli/Handlers/Excel/ExcelHandler.Set.Workbook.cs:23 — ExcelHandler.TrySetWorkbookSetting 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.
D1 · Cyclomatic Complexity · WordHandler.AddHyperlink (cyclomatic 65) · ×1
  • WordHandler.AddHyperlink (cyclomatic 65) src/officecli/Handlers/Word/WordHandler.Add.Misc.cs:935 — WordHandler.AddHyperlink has cyclomatic complexity 65 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WordHandler.ResolveEffectiveParagraphStyleProperties (cyclomatic 65) · ×1
  • WordHandler.ResolveEffectiveParagraphStyleProperties (cyclomatic 65) src/officecli/Handlers/Word/WordHandler.StyleList.cs:527 — WordHandler.ResolveEffectiveParagraphStyleProperties 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.
D1 · Cyclomatic Complexity · ExcelHandler.SortRangeRows (cyclomatic 64) · ×1
  • ExcelHandler.SortRangeRows (cyclomatic 64) src/officecli/Handlers/Excel/ExcelHandler.Set.Ranges.cs:241 — ExcelHandler.SortRangeRows has cyclomatic complexity 64 (threshold 15). Of this number, 62 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.
D1 · Cyclomatic Complexity · PowerPointHandler.RenderShapeSvg (cyclomatic 64) · ×1
  • PowerPointHandler.RenderShapeSvg (cyclomatic 64) src/officecli/Handlers/Pptx/PowerPointHandler.SvgPreview.cs:189 — PowerPointHandler.RenderShapeSvg has cyclomatic complexity 64 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.Add (cyclomatic 64) · ×1
  • WordHandler.Add (cyclomatic 64) src/officecli/Handlers/Word/WordHandler.Add.cs:18 — WordHandler.Add has cyclomatic complexity 64 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · WordHandler.SetAbstractNumPath (cyclomatic 64) · ×1
  • WordHandler.SetAbstractNumPath (cyclomatic 64) src/officecli/Handlers/Word/WordHandler.Set.Dispatch.cs:1253 — WordHandler.SetAbstractNumPath has cyclomatic complexity 64 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PivotTableHelper.RenderMultiRowPivot (cyclomatic 63) · ×1
  • PivotTableHelper.RenderMultiRowPivot (cyclomatic 63) src/officecli/Core/PivotTableHelper.Render.cs:577 — PivotTableHelper.RenderMultiRowPivot has cyclomatic complexity 63 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelBatchEmitter.EmitSheet (cyclomatic 63) · ×1
  • ExcelBatchEmitter.EmitSheet (cyclomatic 63) src/officecli/Handlers/Excel/ExcelBatchEmitter.cs:324 — ExcelBatchEmitter.EmitSheet has cyclomatic complexity 63 (threshold 15). Of this number, 59 points are the body's own statements and 4 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.
D1 · Cyclomatic Complexity · PowerPointHandler.Move (cyclomatic 63) · ×1
  • PowerPointHandler.Move (cyclomatic 63) src/officecli/Handlers/Pptx/PowerPointHandler.Mutations.cs:694 — PowerPointHandler.Move has cyclomatic complexity 63 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.RunToNode (cyclomatic 63) · ×1
  • PowerPointHandler.RunToNode (cyclomatic 63) src/officecli/Handlers/Pptx/PowerPointHandler.NodeBuilder.cs:2237 — PowerPointHandler.RunToNode has cyclomatic complexity 63 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.PopulateAnimationNode (cyclomatic 63) · ×1
  • PowerPointHandler.PopulateAnimationNode (cyclomatic 63) src/officecli/Handlers/Pptx/PowerPointHandler.Query.cs:2448 — PowerPointHandler.PopulateAnimationNode has cyclomatic complexity 63 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordBatchEmitter.TryEmitInlineSectionBreak (cyclomatic 63) · ×1
  • WordBatchEmitter.TryEmitInlineSectionBreak (cyclomatic 63) src/officecli/Handlers/Word/WordBatchEmitter.Paragraph.cs:691 — WordBatchEmitter.TryEmitInlineSectionBreak has cyclomatic complexity 63 (threshold 15). Of this number, 46 points are the body's own statements and 17 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.
D1 · Cyclomatic Complexity · ChartSvgRenderer.RenderBar3DSvg (cyclomatic 61) · ×1
  • ChartSvgRenderer.RenderBar3DSvg (cyclomatic 61) src/officecli/Core/Chart/ChartSvgRenderer.cs:4990 — ChartSvgRenderer.RenderBar3DSvg has cyclomatic complexity 61 (threshold 15). Of this number, 58 points are the body's own statements and 3 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.
D1 · Cyclomatic Complexity · ExcelHandler.AddCfExtended (cyclomatic 61) · ×1
  • ExcelHandler.AddCfExtended (cyclomatic 61) src/officecli/Handlers/Excel/ExcelHandler.Add.Cf.cs:631 — ExcelHandler.AddCfExtended has cyclomatic complexity 61 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · WordHandler.AddBookmark (cyclomatic 61) · ×1
  • WordHandler.AddBookmark (cyclomatic 61) src/officecli/Handlers/Word/WordHandler.Add.Misc.cs:383 — WordHandler.AddBookmark has cyclomatic complexity 61 (threshold 15). Of this number, 57 points are the body's own statements and 4 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.
D1 · Cyclomatic Complexity · PowerPointHandler.ConnectorToNode (cyclomatic 60) · ×1
  • PowerPointHandler.ConnectorToNode (cyclomatic 60) src/officecli/Handlers/Pptx/PowerPointHandler.NodeBuilder.cs:3136 — PowerPointHandler.ConnectorToNode has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.BuildAbstractNumElement (cyclomatic 60) · ×1
  • WordHandler.BuildAbstractNumElement (cyclomatic 60) src/officecli/Handlers/Word/WordHandler.Add.Structure.cs:2238 — WordHandler.BuildAbstractNumElement has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.CopyFrom (cyclomatic 60) · ×1
  • WordHandler.CopyFrom (cyclomatic 60) src/officecli/Handlers/Word/WordHandler.Mutations.cs:1650 — WordHandler.CopyFrom has cyclomatic complexity 60 (threshold 15). Of this number, 54 points are the body's own statements and 6 belong to 6 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.
D1 · Cyclomatic Complexity · WordHandler.PopulateDocSettings (cyclomatic 60) · ×1
  • WordHandler.PopulateDocSettings (cyclomatic 60) src/officecli/Handlers/Word/WordHandler.Navigation.DocSettings.cs:15 — WordHandler.PopulateDocSettings has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelHandler.CopyFrom (cyclomatic 59) · ×1
  • ExcelHandler.CopyFrom (cyclomatic 59) src/officecli/Handlers/Excel/ExcelHandler.Add.cs:702 — ExcelHandler.CopyFrom has cyclomatic complexity 59 (threshold 15). Of this number, 57 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.
D1 · Cyclomatic Complexity · WordHandler.MatchesRunSelector (cyclomatic 59) · ×1
  • WordHandler.MatchesRunSelector (cyclomatic 59) src/officecli/Handlers/Word/WordHandler.Selector.cs:259 — WordHandler.MatchesRunSelector has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ChartSvgRenderer.RenderScatterChartSvg (cyclomatic 58) · ×1
  • ChartSvgRenderer.RenderScatterChartSvg (cyclomatic 58) src/officecli/Core/Chart/ChartSvgRenderer.cs:2479 — ChartSvgRenderer.RenderScatterChartSvg has cyclomatic complexity 58 (threshold 15). Of this number, 57 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.
D1 · Cyclomatic Complexity · CompoundFile.ReadStream (cyclomatic 58) · ×1
  • CompoundFile.ReadStream (cyclomatic 58) src/officecli/Core/CompoundFile.cs:214 — CompoundFile.ReadStream has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelHandler.AddValidation (cyclomatic 58) · ×1
  • ExcelHandler.AddValidation (cyclomatic 58) src/officecli/Handlers/Excel/ExcelHandler.Add.Tables.cs:501 — ExcelHandler.AddValidation has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordBatchEmitter.EmitNoteReference (cyclomatic 58) · ×1
  • WordBatchEmitter.EmitNoteReference (cyclomatic 58) src/officecli/Handlers/Word/WordBatchEmitter.Resources.cs:2085 — WordBatchEmitter.EmitNoteReference has cyclomatic complexity 58 (threshold 15). Of this number, 53 points are the body's own statements and 5 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.
D1 · Cyclomatic Complexity · PowerPointHandler.AddTable (cyclomatic 57) · ×1
  • PowerPointHandler.AddTable (cyclomatic 57) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Table.cs:17 — PowerPointHandler.AddTable has cyclomatic complexity 57 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.ApplyShapeAnimation (cyclomatic 57) · ×1
  • PowerPointHandler.ApplyShapeAnimation (cyclomatic 57) src/officecli/Handlers/Pptx/PowerPointHandler.Animations.cs:787 — PowerPointHandler.ApplyShapeAnimation has cyclomatic complexity 57 (threshold 15). Of this number, 56 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.
D1 · Cyclomatic Complexity · PptxBatchEmitter.EmitSlide (cyclomatic 57) · ×1
  • PptxBatchEmitter.EmitSlide (cyclomatic 57) src/officecli/Handlers/Pptx/PptxBatchEmitter.cs:501 — PptxBatchEmitter.EmitSlide has cyclomatic complexity 57 (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.
D1 · Cyclomatic Complexity · WordHandler.AddRow (cyclomatic 57) · ×1
  • WordHandler.AddRow (cyclomatic 57) src/officecli/Handlers/Word/WordHandler.Add.Table.cs:826 — WordHandler.AddRow has cyclomatic complexity 57 (threshold 15). Of this number, 56 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.
D1 · Cyclomatic Complexity · FormulaParser.ParseMatrix (cyclomatic 56) · ×1
  • FormulaParser.ParseMatrix (cyclomatic 56) src/officecli/Core/Formula/FormulaParser.cs:2369 — FormulaParser.ParseMatrix has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.GetSmartArtsOnSlide (cyclomatic 56) · ×1
  • PowerPointHandler.GetSmartArtsOnSlide (cyclomatic 56) src/officecli/Handlers/PowerPointHandler.cs:3313 — PowerPointHandler.GetSmartArtsOnSlide has cyclomatic complexity 56 (threshold 15). Of this number, 53 points are the body's own statements and 3 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.
D1 · Cyclomatic Complexity · ChartSvgRenderer.RenderPieChartSvg (cyclomatic 55) · ×1
  • ChartSvgRenderer.RenderPieChartSvg (cyclomatic 55) src/officecli/Core/Chart/ChartSvgRenderer.cs:1647 — ChartSvgRenderer.RenderPieChartSvg has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ChartSvgRenderer.RenderComboChartSvg (cyclomatic 55) · ×1
  • ChartSvgRenderer.RenderComboChartSvg (cyclomatic 55) src/officecli/Core/Chart/ChartSvgRenderer.cs:2653 — ChartSvgRenderer.RenderComboChartSvg has cyclomatic complexity 55 (threshold 15). Of this number, 54 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.
D1 · Cyclomatic Complexity · ExcelHandler.RenderExcelChart (cyclomatic 55) · ×1
  • ExcelHandler.RenderExcelChart (cyclomatic 55) src/officecli/Handlers/Excel/ExcelHandler.HtmlPreview.Charts.cs:97 — ExcelHandler.RenderExcelChart has cyclomatic complexity 55 (threshold 15). Of this number, 52 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WordBatchEmitter.EmitBody (cyclomatic 55) · ×1
  • WordBatchEmitter.EmitBody (cyclomatic 55) src/officecli/Handlers/Word/WordBatchEmitter.cs:628 — WordBatchEmitter.EmitBody has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.SetDocumentProperties (cyclomatic 55) · ×1
  • WordHandler.SetDocumentProperties (cyclomatic 55) src/officecli/Handlers/Word/WordHandler.Add.cs:613 — WordHandler.SetDocumentProperties has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.AddFooter (cyclomatic 55) · ×1
  • WordHandler.AddFooter (cyclomatic 55) src/officecli/Handlers/Word/WordHandler.Add.Structure.cs:2864 — WordHandler.AddFooter has cyclomatic complexity 55 (threshold 15). Of this number, 54 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.
D1 · Cyclomatic Complexity · WordHandler.RenderShapeHtml (cyclomatic 55) · ×1
  • WordHandler.RenderShapeHtml (cyclomatic 55) src/officecli/Handlers/Word/WordHandler.HtmlPreview.Shapes.cs:1037 — WordHandler.RenderShapeHtml has cyclomatic complexity 55 (threshold 15). Of this number, 52 points are the body's own statements and 3 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.
D1 · Cyclomatic Complexity · WordHandler.AddHeader (cyclomatic 54) · ×1
  • WordHandler.AddHeader (cyclomatic 54) src/officecli/Handlers/Word/WordHandler.Add.Structure.cs:2664 — WordHandler.AddHeader has cyclomatic complexity 54 (threshold 15). Of this number, 53 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.
D1 · Cyclomatic Complexity · WordHandler.CreateImageNode (cyclomatic 54) · ×1
  • WordHandler.CreateImageNode (cyclomatic 54) src/officecli/Handlers/Word/WordHandler.ImageHelpers.cs:374 — WordHandler.CreateImageNode 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.
D1 · Cyclomatic Complexity · WordHandler.Move (cyclomatic 54) · ×1
  • WordHandler.Move (cyclomatic 54) src/officecli/Handlers/Word/WordHandler.Mutations.cs:1210 — WordHandler.Move has cyclomatic complexity 54 (threshold 15). Of this number, 49 points are the body's own statements and 5 belong to 4 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.
D1 · Cyclomatic Complexity · FlowchartLayout.Layout (cyclomatic 53) · ×1
  • FlowchartLayout.Layout (cyclomatic 53) src/officecli/Core/Diagram/FlowchartLayout.cs:47 — FlowchartLayout.Layout has cyclomatic complexity 53 (threshold 15). Of this number, 51 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.
D1 · Cyclomatic Complexity · FlowchartLayout.BkPosition (cyclomatic 53) · ×1
  • FlowchartLayout.BkPosition (cyclomatic 53) src/officecli/Core/Diagram/FlowchartLayout.cs:424 — FlowchartLayout.BkPosition has cyclomatic complexity 53 (threshold 15). Of this number, 51 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.
D1 · Cyclomatic Complexity · PowerPointHandler.RenderTextBodyFO (cyclomatic 53) · ×1
  • PowerPointHandler.RenderTextBodyFO (cyclomatic 53) src/officecli/Handlers/Pptx/PowerPointHandler.SvgPreview.cs:1158 — PowerPointHandler.RenderTextBodyFO has cyclomatic complexity 53 (threshold 15). Of this number, 52 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.AddOle (cyclomatic 53) · ×1
  • WordHandler.AddOle (cyclomatic 53) src/officecli/Handlers/Word/WordHandler.Add.Media.cs:1232 — WordHandler.AddOle has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.RenderImageHtml (cyclomatic 53) · ×1
  • WordHandler.RenderImageHtml (cyclomatic 53) src/officecli/Handlers/Word/WordHandler.HtmlPreview.Shapes.cs:229 — WordHandler.RenderImageHtml has cyclomatic complexity 53 (threshold 15). Of this number, 50 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.
D1 · Cyclomatic Complexity · WordHandler.RejectAllChanges (cyclomatic 52) · ×1
  • WordHandler.RejectAllChanges (cyclomatic 52) src/officecli/Handlers/Word/WordHandler.Mutations.cs:2208 — WordHandler.RejectAllChanges has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.SetShapeProps (cyclomatic 52) · ×1
  • WordHandler.SetShapeProps (cyclomatic 52) src/officecli/Handlers/Word/WordHandler.Set.Element.cs:3216 — WordHandler.SetShapeProps has cyclomatic complexity 52 (threshold 15). Of this number, 47 points are the body's own statements and 5 belong to 5 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ChartHelper.ApplySeriesReferences (cyclomatic 51) · ×1
  • ChartHelper.ApplySeriesReferences (cyclomatic 51) src/officecli/Core/Chart/ChartHelper.Builder.cs:475 — ChartHelper.ApplySeriesReferences has cyclomatic complexity 51 (threshold 15). Of this number, 48 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.
D1 · Cyclomatic Complexity · PivotTableHelper.BuildPivotTableDefinition (cyclomatic 51) · ×1
  • PivotTableHelper.BuildPivotTableDefinition (cyclomatic 51) src/officecli/Core/PivotTableHelper.Definition.cs:130 — PivotTableHelper.BuildPivotTableDefinition 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.
D1 · Cyclomatic Complexity · ExcelStyleManager.GetOrCreateNumFmt (cyclomatic 50) · ×1
  • ExcelStyleManager.GetOrCreateNumFmt (cyclomatic 50) src/officecli/Core/ExcelStyleManager.cs:657 — ExcelStyleManager.GetOrCreateNumFmt has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.AddChart (cyclomatic 50) · ×1
  • PowerPointHandler.AddChart (cyclomatic 50) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Media.cs:642 — PowerPointHandler.AddChart has cyclomatic complexity 50 (threshold 15). Of this number, 48 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.
D1 · Cyclomatic Complexity · PptxBatchEmitter.ScanSlideExoticContent (cyclomatic 50) · ×1
  • PptxBatchEmitter.ScanSlideExoticContent (cyclomatic 50) src/officecli/Handlers/Pptx/PptxBatchEmitter.cs:1104 — PptxBatchEmitter.ScanSlideExoticContent has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.ElementToNode (cyclomatic 49) · ×1
  • WordHandler.ElementToNode (cyclomatic 49) src/officecli/Handlers/Word/WordHandler.Navigation.cs:6028 — WordHandler.ElementToNode 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.
D1 · Cyclomatic Complexity · ExcelHandler.AddAutoFilter (cyclomatic 48) · ×1
  • ExcelHandler.AddAutoFilter (cyclomatic 48) src/officecli/Handlers/Excel/ExcelHandler.Add.Tables.cs:715 — ExcelHandler.AddAutoFilter has cyclomatic complexity 48 (threshold 15). Of this number, 47 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.
D1 · Cyclomatic Complexity · ExcelHandler.ApplyNumberFormat (cyclomatic 48) · ×1
  • ExcelHandler.ApplyNumberFormat (cyclomatic 48) src/officecli/Handlers/Excel/ExcelHandler.HtmlPreview.cs:3218 — ExcelHandler.ApplyNumberFormat has cyclomatic complexity 48 (threshold 15). Of this number, 46 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.ReadShapeAnimation (cyclomatic 48) · ×1
  • PowerPointHandler.ReadShapeAnimation (cyclomatic 48) src/officecli/Handlers/Pptx/PowerPointHandler.Animations.cs:2229 — PowerPointHandler.ReadShapeAnimation 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.
D1 · Cyclomatic Complexity · WordBatchEmitter.EmitComments (cyclomatic 48) · ×1
  • WordBatchEmitter.EmitComments (cyclomatic 48) src/officecli/Handlers/Word/WordBatchEmitter.Resources.cs:1604 — WordBatchEmitter.EmitComments 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.
D1 · Cyclomatic Complexity · WordHandler.SetElementTableRow (cyclomatic 48) · ×1
  • WordHandler.SetElementTableRow (cyclomatic 48) src/officecli/Handlers/Word/WordHandler.Set.Element.cs:2455 — WordHandler.SetElementTableRow 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.
D1 · Cyclomatic Complexity · ExcelHandler.AddSparkline (cyclomatic 47) · ×1
  • ExcelHandler.AddSparkline (cyclomatic 47) src/officecli/Handlers/Excel/ExcelHandler.Add.Drawings.cs:945 — ExcelHandler.AddSparkline has cyclomatic complexity 47 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ExcelHandler.SetValidationByPath (cyclomatic 47) · ×1
  • ExcelHandler.SetValidationByPath (cyclomatic 47) src/officecli/Handlers/Excel/ExcelHandler.Set.Tables.cs:171 — ExcelHandler.SetValidationByPath has cyclomatic complexity 47 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · WordBatchEmitter.ShouldCollapseSingleRun (cyclomatic 47) · ×1
  • WordBatchEmitter.ShouldCollapseSingleRun (cyclomatic 47) src/officecli/Handlers/Word/WordBatchEmitter.Paragraph.cs:1224 — WordBatchEmitter.ShouldCollapseSingleRun has cyclomatic complexity 47 (threshold 15). Of this number, 45 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WordHandler.RawSet (cyclomatic 47) · ×1
  • WordHandler.RawSet (cyclomatic 47) src/officecli/Handlers/WordHandler.cs:1550 — WordHandler.RawSet has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelHandler.AddDataBar (cyclomatic 46) · ×1
  • ExcelHandler.AddDataBar (cyclomatic 46) src/officecli/Handlers/Excel/ExcelHandler.Add.Cf.cs:84 — ExcelHandler.AddDataBar 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.
D1 · Cyclomatic Complexity · PowerPointHandler.ParseGlbBoundingBox (cyclomatic 46) · ×1
  • PowerPointHandler.ParseGlbBoundingBox (cyclomatic 46) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Model3D.cs:458 — PowerPointHandler.ParseGlbBoundingBox 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.
D1 · Cyclomatic Complexity · PowerPointHandler.RenderTextBodySvg (cyclomatic 46) · ×1
  • PowerPointHandler.RenderTextBodySvg (cyclomatic 46) src/officecli/Handlers/Pptx/PowerPointHandler.SvgPreview.cs:548 — PowerPointHandler.RenderTextBodySvg 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.
D1 · Cyclomatic Complexity · WordHandler.MatchesParagraphAttrs (cyclomatic 46) · ×1
  • WordHandler.MatchesParagraphAttrs (cyclomatic 46) src/officecli/Handlers/Word/WordHandler.Selector.cs:160 — WordHandler.MatchesParagraphAttrs 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.
D1 · Cyclomatic Complexity · FlowchartLayout.Route (cyclomatic 45) · ×1
  • FlowchartLayout.Route (cyclomatic 45) src/officecli/Core/Diagram/FlowchartLayout.cs:255 — FlowchartLayout.Route has cyclomatic complexity 45 (threshold 15). Of this number, 40 points are the body's own statements and 5 belong to 4 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.
D1 · Cyclomatic Complexity · PivotTableHelper.ParseValueFields (cyclomatic 45) · ×1
  • PivotTableHelper.ParseValueFields (cyclomatic 45) src/officecli/Core/PivotTableHelper.Parse.cs:122 — PivotTableHelper.ParseValueFields has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelHandler.GetIconHtml (cyclomatic 45) · ×1
  • ExcelHandler.GetIconHtml (cyclomatic 45) src/officecli/Handlers/Excel/ExcelHandler.HtmlPreview.cs:1632 — ExcelHandler.GetIconHtml 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.
D1 · Cyclomatic Complexity · PowerPointHandler.AddMedia (cyclomatic 45) · ×1
  • PowerPointHandler.AddMedia (cyclomatic 45) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Media.cs:828 — PowerPointHandler.AddMedia has cyclomatic complexity 45 (threshold 15). Of this number, 44 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ExcelHandler.AddNamedRange (cyclomatic 44) · ×1
  • ExcelHandler.AddNamedRange (cyclomatic 44) src/officecli/Handlers/Excel/ExcelHandler.Add.Tables.cs:20 — ExcelHandler.AddNamedRange 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.
D1 · Cyclomatic Complexity · PowerPointHandler.ReadTransitionDirection (cyclomatic 44) · ×1
  • PowerPointHandler.ReadTransitionDirection (cyclomatic 44) src/officecli/Handlers/Pptx/PowerPointHandler.Animations.cs:2742 — PowerPointHandler.ReadTransitionDirection 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.
D1 · Cyclomatic Complexity · WordHandler.AppendW14CssEffects (cyclomatic 44) · ×1
  • WordHandler.AppendW14CssEffects (cyclomatic 44) src/officecli/Handlers/Word/WordHandler.HtmlPreview.Css.cs:1959 — WordHandler.AppendW14CssEffects 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.
D1 · Cyclomatic Complexity · CommandBuilder.RunHelp (cyclomatic 43) · ×1
  • CommandBuilder.RunHelp (cyclomatic 43) src/officecli/CommandBuilder.Help.cs:201 — CommandBuilder.RunHelp has cyclomatic complexity 43 (threshold 15). Of this number, 41 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.
D1 · Cyclomatic Complexity · ChartExBuilder.BuildExtendedChartSpace (cyclomatic 43) · ×1
  • ChartExBuilder.BuildExtendedChartSpace (cyclomatic 43) src/officecli/Core/Chart/ChartExBuilder.cs:42 — ChartExBuilder.BuildExtendedChartSpace 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.
D1 · Cyclomatic Complexity · PowerPointHandler.ResolvePptParagraphsForFindInternal (cyclomatic 43) · ×1
  • PowerPointHandler.ResolvePptParagraphsForFindInternal (cyclomatic 43) src/officecli/Handlers/Pptx/PowerPointHandler.Helpers.FindReplace.cs:431 — PowerPointHandler.ResolvePptParagraphsForFindInternal 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.
D1 · Cyclomatic Complexity · WordHandler.ReadW14TextEffects (cyclomatic 43) · ×1
  • WordHandler.ReadW14TextEffects (cyclomatic 43) src/officecli/Handlers/Word/WordHandler.Helpers.TextEffect.cs:270 — WordHandler.ReadW14TextEffects 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.
D1 · Cyclomatic Complexity · TableStyleResolver.MergeRegions (cyclomatic 42) · ×1
  • TableStyleResolver.MergeRegions (cyclomatic 42) src/officecli/Core/TableStyles/TableStyleResolver.cs:70 — TableStyleResolver.MergeRegions has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelHandler.ApplyChartPositionSet (cyclomatic 42) · ×1
  • ExcelHandler.ApplyChartPositionSet (cyclomatic 42) src/officecli/Handlers/Excel/ExcelHandler.Helpers.Chart.cs:138 — ExcelHandler.ApplyChartPositionSet has cyclomatic complexity 42 (threshold 15). Of this number, 41 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelHandler.GetCellStyleCss (cyclomatic 42) · ×1
  • ExcelHandler.GetCellStyleCss (cyclomatic 42) src/officecli/Handlers/Excel/ExcelHandler.HtmlPreview.cs:2184 — ExcelHandler.GetCellStyleCss has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelHandler.SetOleByPath (cyclomatic 42) · ×1
  • ExcelHandler.SetOleByPath (cyclomatic 42) src/officecli/Handlers/Excel/ExcelHandler.Set.Drawings.cs:128 — ExcelHandler.SetOleByPath has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.BuildChartFrame (cyclomatic 42) · ×1
  • WordHandler.BuildChartFrame (cyclomatic 42) src/officecli/Handlers/Word/WordHandler.Helpers.Chart.cs:194 — WordHandler.BuildChartFrame 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.
D1 · Cyclomatic Complexity · ChartHelper.BuildAxisNode (cyclomatic 41) · ×1
  • ChartHelper.BuildAxisNode (cyclomatic 41) src/officecli/Core/Chart/ChartHelper.Axis.cs:44 — ChartHelper.BuildAxisNode 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.
D1 · Cyclomatic Complexity · ChartSvgRenderer.ExtractCxChartInfo (cyclomatic 41) · ×1
  • ChartSvgRenderer.ExtractCxChartInfo (cyclomatic 41) src/officecli/Core/Chart/ChartSvgRenderer.CxExtract.cs:36 — ChartSvgRenderer.ExtractCxChartInfo has cyclomatic complexity 41 (threshold 15). Of this number, 40 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.
D1 · Cyclomatic Complexity · PivotTableHelper.BuildTreeAxisItems (cyclomatic 41) · ×1
  • PivotTableHelper.BuildTreeAxisItems (cyclomatic 41) src/officecli/Core/PivotTableHelper.Definition.cs:1063 — PivotTableHelper.BuildTreeAxisItems 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.
D1 · Cyclomatic Complexity · PowerPointHandler.CustomGeometryToClipPath (cyclomatic 41) · ×1
  • PowerPointHandler.CustomGeometryToClipPath (cyclomatic 41) src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:217 — PowerPointHandler.CustomGeometryToClipPath 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.
D1 · Cyclomatic Complexity · PowerPointHandler.SetMediaByPath (cyclomatic 41) · ×1
  • PowerPointHandler.SetMediaByPath (cyclomatic 41) src/officecli/Handlers/Pptx/PowerPointHandler.Set.Media.cs:957 — PowerPointHandler.SetMediaByPath has cyclomatic complexity 41 (threshold 15). Of this number, 40 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.
D1 · Cyclomatic Complexity · PowerPointHandler.SetShapeAnimationByPath (cyclomatic 41) · ×1
  • PowerPointHandler.SetShapeAnimationByPath (cyclomatic 41) src/officecli/Handlers/Pptx/PowerPointHandler.Set.Shape.cs:1950 — PowerPointHandler.SetShapeAnimationByPath 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.
D1 · Cyclomatic Complexity · PptxBatchEmitter.EmitShape (cyclomatic 41) · ×1
  • PptxBatchEmitter.EmitShape (cyclomatic 41) src/officecli/Handlers/Pptx/PptxBatchEmitter.Shape.cs:186 — PptxBatchEmitter.EmitShape 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.
D1 · Cyclomatic Complexity · WordHandler.ReadRowProps (cyclomatic 41) · ×1
  • WordHandler.ReadRowProps (cyclomatic 41) src/officecli/Handlers/Word/WordHandler.Navigation.cs:6196 — WordHandler.ReadRowProps 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.
D1 · Cyclomatic Complexity · WordHandler.MergeRunProperties (cyclomatic 41) · ×1
  • WordHandler.MergeRunProperties (cyclomatic 41) src/officecli/Handlers/Word/WordHandler.StyleList.cs:175 — WordHandler.MergeRunProperties has cyclomatic complexity 41 (threshold 15). Of this number, 40 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FormulaEvaluator.EvalLinest (cyclomatic 40) · ×1
  • FormulaEvaluator.EvalLinest (cyclomatic 40) src/officecli/Core/Formula/FormulaEvaluator.Regression.cs:140 — FormulaEvaluator.EvalLinest has cyclomatic complexity 40 (threshold 15). Of this number, 39 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ExcelHandler.ParseSrcRect (cyclomatic 40) · ×1
  • ExcelHandler.ParseSrcRect (cyclomatic 40) src/officecli/Handlers/Excel/ExcelHandler.Helpers.Drawing.cs:92 — ExcelHandler.ParseSrcRect 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.
D1 · Cyclomatic Complexity · PowerPointHandler.ParseTransitionFromXml (cyclomatic 40) · ×1
  • PowerPointHandler.ParseTransitionFromXml (cyclomatic 40) src/officecli/Handlers/Pptx/PowerPointHandler.Animations.cs:2450 — PowerPointHandler.ParseTransitionFromXml 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.
D1 · Cyclomatic Complexity · PowerPointHandler.ReadSlideTransition (cyclomatic 40) · ×1
  • PowerPointHandler.ReadSlideTransition (cyclomatic 40) src/officecli/Handlers/Pptx/PowerPointHandler.Animations.cs:2639 — PowerPointHandler.ReadSlideTransition 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.
D1 · Cyclomatic Complexity · WordBatchEmitter.BuildFieldAddProps (cyclomatic 40) · ×1
  • WordBatchEmitter.BuildFieldAddProps (cyclomatic 40) src/officecli/Handlers/Word/WordBatchEmitter.Fields.cs:786 — WordBatchEmitter.BuildFieldAddProps 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.
D1 · Cyclomatic Complexity · ChartSvgRenderer.RenderArea3DSvg (cyclomatic 39) · ×1
  • ChartSvgRenderer.RenderArea3DSvg (cyclomatic 39) src/officecli/Core/Chart/ChartSvgRenderer.cs:5354 — ChartSvgRenderer.RenderArea3DSvg has cyclomatic complexity 39 (threshold 15). Of this number, 38 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelHandler.FindAndReplace (cyclomatic 39) · ×1
  • ExcelHandler.FindAndReplace (cyclomatic 39) src/officecli/Handlers/Excel/ExcelHandler.Helpers.Sheet.cs:383 — ExcelHandler.FindAndReplace has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelHandler.BuildRowInnerHtml (cyclomatic 39) · ×1
  • ExcelHandler.BuildRowInnerHtml (cyclomatic 39) src/officecli/Handlers/Excel/ExcelHandler.HtmlPreview.cs:806 — ExcelHandler.BuildRowInnerHtml has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelHandler.QueryRowsByColumnPredicate (cyclomatic 39) · ×1
  • ExcelHandler.QueryRowsByColumnPredicate (cyclomatic 39) src/officecli/Handlers/Excel/ExcelHandler.Query.RowWhere.cs:60 — ExcelHandler.QueryRowsByColumnPredicate has cyclomatic complexity 39 (threshold 15). Of this number, 38 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelHandler.SetSparklineByPath (cyclomatic 39) · ×1
  • ExcelHandler.SetSparklineByPath (cyclomatic 39) src/officecli/Handlers/Excel/ExcelHandler.Set.Drawings.cs:20 — ExcelHandler.SetSparklineByPath has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.CheckTextOverflow (cyclomatic 39) · ×1
  • PowerPointHandler.CheckTextOverflow (cyclomatic 39) src/officecli/Handlers/Pptx/PowerPointHandler.ShapeProperties.cs:3896 — PowerPointHandler.CheckTextOverflow has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PptxBatchEmitter.EmitParagraph (cyclomatic 39) · ×1
  • PptxBatchEmitter.EmitParagraph (cyclomatic 39) src/officecli/Handlers/Pptx/PptxBatchEmitter.Shape.cs:921 — PptxBatchEmitter.EmitParagraph has cyclomatic complexity 39 (threshold 15). Of this number, 34 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.
D1 · Cyclomatic Complexity · SchemaHelpLoader.ValidateProperties (cyclomatic 39) · ×1
  • SchemaHelpLoader.ValidateProperties (cyclomatic 39) src/officecli/Help/SchemaHelpLoader.cs:549 — SchemaHelpLoader.ValidateProperties has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelStyleManager.GetOrCreateFont (cyclomatic 38) · ×1
  • ExcelStyleManager.GetOrCreateFont (cyclomatic 38) src/officecli/Core/ExcelStyleManager.cs:922 — ExcelStyleManager.GetOrCreateFont 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.
D1 · Cyclomatic Complexity · FormulaEvaluator.EvalXlookup (cyclomatic 38) · ×1
  • FormulaEvaluator.EvalXlookup (cyclomatic 38) src/officecli/Core/Formula/FormulaEvaluator.Functions.cs:1134 — FormulaEvaluator.EvalXlookup has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.ProcessFindInPptParagraph (cyclomatic 38) · ×1
  • PowerPointHandler.ProcessFindInPptParagraph (cyclomatic 38) src/officecli/Handlers/Pptx/PowerPointHandler.Helpers.FindReplace.cs:107 — PowerPointHandler.ProcessFindInPptParagraph has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.Swap (cyclomatic 38) · ×1
  • PowerPointHandler.Swap (cyclomatic 38) src/officecli/Handlers/Pptx/PowerPointHandler.Mutations.cs:959 — PowerPointHandler.Swap has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.SetParagraphOnShapeCore (cyclomatic 38) · ×1
  • PowerPointHandler.SetParagraphOnShapeCore (cyclomatic 38) src/officecli/Handlers/Pptx/PowerPointHandler.Set.Shape.cs:203 — PowerPointHandler.SetParagraphOnShapeCore has cyclomatic complexity 38 (threshold 15). Of this number, 37 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.SetSlideByPath (cyclomatic 38) · ×1
  • PowerPointHandler.SetSlideByPath (cyclomatic 38) src/officecli/Handlers/Pptx/PowerPointHandler.Set.Slide.cs:313 — PowerPointHandler.SetSlideByPath has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.RenderChartHtml (cyclomatic 38) · ×1
  • WordHandler.RenderChartHtml (cyclomatic 38) src/officecli/Handlers/Word/WordHandler.HtmlPreview.Charts.cs:17 — WordHandler.RenderChartHtml 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.
D1 · Cyclomatic Complexity · WordHandler.BuildSectionHfBundles (cyclomatic 38) · ×1
  • WordHandler.BuildSectionHfBundles (cyclomatic 38) src/officecli/Handlers/Word/WordHandler.HtmlPreview.cs:3395 — WordHandler.BuildSectionHfBundles has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.SetHeaderFooter (cyclomatic 38) · ×1
  • WordHandler.SetHeaderFooter (cyclomatic 38) src/officecli/Handlers/Word/WordHandler.Set.cs:573 — WordHandler.SetHeaderFooter 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.
D1 · Cyclomatic Complexity · WordHandler.ViewAsTextJson (cyclomatic 38) · ×1
  • WordHandler.ViewAsTextJson (cyclomatic 38) src/officecli/Handlers/Word/WordHandler.View.cs:1035 — WordHandler.ViewAsTextJson has cyclomatic complexity 38 (threshold 15). Of this number, 37 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AttributeFilter.MatchOne (cyclomatic 37) · ×1
  • AttributeFilter.MatchOne (cyclomatic 37) src/officecli/Core/AttributeFilter.cs:510 — AttributeFilter.MatchOne has cyclomatic complexity 37 (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.
D1 · Cyclomatic Complexity · ChartSvgRenderer.RenderBubbleChartSvg (cyclomatic 37) · ×1
  • ChartSvgRenderer.RenderBubbleChartSvg (cyclomatic 37) src/officecli/Core/Chart/ChartSvgRenderer.cs:2336 — ChartSvgRenderer.RenderBubbleChartSvg has cyclomatic complexity 37 (threshold 15). Of this number, 36 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.ReadBackground (cyclomatic 37) · ×1
  • PowerPointHandler.ReadBackground (cyclomatic 37) src/officecli/Handlers/Pptx/PowerPointHandler.Background.cs:560 — PowerPointHandler.ReadBackground has cyclomatic complexity 37 (threshold 15). Of this number, 34 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.
D1 · Cyclomatic Complexity · PowerPointHandler.RenderChart (cyclomatic 37) · ×1
  • PowerPointHandler.RenderChart (cyclomatic 37) src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Charts.cs:20 — PowerPointHandler.RenderChart has cyclomatic complexity 37 (threshold 15). Of this number, 35 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WordHandler.RenderOlePreviewHtml (cyclomatic 37) · ×1
  • WordHandler.RenderOlePreviewHtml (cyclomatic 37) src/officecli/Handlers/Word/WordHandler.HtmlPreview.Text.cs:1309 — WordHandler.RenderOlePreviewHtml has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.ViewAsAnnotated (cyclomatic 37) · ×1
  • WordHandler.ViewAsAnnotated (cyclomatic 37) src/officecli/Handlers/Word/WordHandler.View.cs:510 — WordHandler.ViewAsAnnotated has cyclomatic complexity 37 (threshold 15). Of this number, 36 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SchemaHelpRenderer.RenderUsageBlock (cyclomatic 37) · ×1
  • SchemaHelpRenderer.RenderUsageBlock (cyclomatic 37) src/officecli/Help/SchemaHelpRenderer.cs:233 — SchemaHelpRenderer.RenderUsageBlock has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ResidentServer.ExecuteSet (cyclomatic 37) · ×1
  • ResidentServer.ExecuteSet (cyclomatic 37) src/officecli/ResidentServer.cs:2099 — ResidentServer.ExecuteSet has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelHandler.AddChart (cyclomatic 36) · ×1
  • ExcelHandler.AddChart (cyclomatic 36) src/officecli/Handlers/Excel/ExcelHandler.Add.Chart.cs:21 — ExcelHandler.AddChart has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.ConvertOmmlNode (cyclomatic 36) · ×1
  • PowerPointHandler.ConvertOmmlNode (cyclomatic 36) src/officecli/Handlers/Pptx/PowerPointHandler.SvgPreview.cs:1919 — PowerPointHandler.ConvertOmmlNode has cyclomatic complexity 36 (threshold 15). Of this number, 34 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.
D1 · Cyclomatic Complexity · WordHandler.ReadDocDefaults (cyclomatic 36) · ×1
  • WordHandler.ReadDocDefaults (cyclomatic 36) src/officecli/Handlers/Word/WordHandler.HtmlPreview.cs:1608 — WordHandler.ReadDocDefaults has cyclomatic complexity 36 (threshold 15). Of this number, 35 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WordHandler.ResolveAnchorPosition (cyclomatic 36) · ×1
  • WordHandler.ResolveAnchorPosition (cyclomatic 36) src/officecli/Handlers/Word/WordHandler.Navigation.cs:460 — WordHandler.ResolveAnchorPosition has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PivotTableHelper.RefreshPivotCacheFromSource (cyclomatic 35) · ×1
  • PivotTableHelper.RefreshPivotCacheFromSource (cyclomatic 35) src/officecli/Core/PivotTableHelper.Readback.cs:368 — PivotTableHelper.RefreshPivotCacheFromSource has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelHandler.GetPictureNode (cyclomatic 35) · ×1
  • ExcelHandler.GetPictureNode (cyclomatic 35) src/officecli/Handlers/Excel/ExcelHandler.Helpers.Drawing.cs:341 — ExcelHandler.GetPictureNode has cyclomatic complexity 35 (threshold 15). Of this number, 33 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.
D1 · Cyclomatic Complexity · PowerPointHandler.ApplyTableBorderFanOut (cyclomatic 35) · ×1
  • PowerPointHandler.ApplyTableBorderFanOut (cyclomatic 35) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Table.cs:273 — PowerPointHandler.ApplyTableBorderFanOut has cyclomatic complexity 35 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · PptxBatchEmitter.FilterEmittableProps (cyclomatic 35) · ×1
  • PptxBatchEmitter.FilterEmittableProps (cyclomatic 35) src/officecli/Handlers/Pptx/PptxBatchEmitter.Filters.cs:114 — PptxBatchEmitter.FilterEmittableProps has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.ViewAsText (cyclomatic 35) · ×1
  • WordHandler.ViewAsText (cyclomatic 35) src/officecli/Handlers/Word/WordHandler.View.cs:330 — WordHandler.ViewAsText has cyclomatic complexity 35 (threshold 15). Of this number, 34 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.
D1 · Cyclomatic Complexity · ChartSvgRenderer.AppendTrendline (cyclomatic 34) · ×1
  • ChartSvgRenderer.AppendTrendline (cyclomatic 34) src/officecli/Core/Chart/ChartSvgRenderer.cs:1099 — ChartSvgRenderer.AppendTrendline has cyclomatic complexity 34 (threshold 15). Of this number, 33 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelBatchEmitter.EmitPivotTables (cyclomatic 34) · ×1
  • ExcelBatchEmitter.EmitPivotTables (cyclomatic 34) src/officecli/Handlers/Excel/ExcelBatchEmitter.Elements.cs:662 — ExcelBatchEmitter.EmitPivotTables has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.SetOleByPath (cyclomatic 34) · ×1
  • PowerPointHandler.SetOleByPath (cyclomatic 34) src/officecli/Handlers/Pptx/PowerPointHandler.Set.Media.cs:826 — PowerPointHandler.SetOleByPath has cyclomatic complexity 34 (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.
D1 · Cyclomatic Complexity · PowerPointHandler.SetGroupByPath (cyclomatic 34) · ×1
  • PowerPointHandler.SetGroupByPath (cyclomatic 34) src/officecli/Handlers/Pptx/PowerPointHandler.Set.Shape.cs:583 — PowerPointHandler.SetGroupByPath has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PptxBatchEmitter.NormalizeSlideRawSlice (cyclomatic 34) · ×1
  • PptxBatchEmitter.NormalizeSlideRawSlice (cyclomatic 34) src/officecli/Handlers/Pptx/PptxBatchEmitter.cs:1414 — PptxBatchEmitter.NormalizeSlideRawSlice has cyclomatic complexity 34 (threshold 15). Of this number, 27 points are the body's own statements and 7 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PptxBatchEmitter.EmitTable (cyclomatic 34) · ×1
  • PptxBatchEmitter.EmitTable (cyclomatic 34) src/officecli/Handlers/Pptx/PptxBatchEmitter.Table.cs:17 — PptxBatchEmitter.EmitTable has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordBatchEmitter.EmitPlainOrHyperlinkRun (cyclomatic 34) · ×1
  • WordBatchEmitter.EmitPlainOrHyperlinkRun (cyclomatic 34) src/officecli/Handlers/Word/WordBatchEmitter.Paragraph.cs:4334 — WordBatchEmitter.EmitPlainOrHyperlinkRun has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordBatchEmitter.EmitHeaderFooterPart (cyclomatic 34) · ×1
  • WordBatchEmitter.EmitHeaderFooterPart (cyclomatic 34) src/officecli/Handlers/Word/WordBatchEmitter.Resources.cs:1379 — WordBatchEmitter.EmitHeaderFooterPart has cyclomatic complexity 34 (threshold 15). Of this number, 30 points are the body's own statements and 4 belong to one function literal inside it that branches. 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.
D1 · Cyclomatic Complexity · WordHandler.GetOleEmitData (cyclomatic 34) · ×1
  • WordHandler.GetOleEmitData (cyclomatic 34) src/officecli/Handlers/WordHandler.cs:515 — WordHandler.GetOleEmitData has cyclomatic complexity 34 (threshold 15). Of this number, 33 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CommandBuilder.BuildMarkCommand (cyclomatic 33) · ×1
  • CommandBuilder.BuildMarkCommand (cyclomatic 33) src/officecli/CommandBuilder.Mark.cs:21 — CommandBuilder.BuildMarkCommand has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 1 of the 33 points is its own statement and the rest belongs to one function literal inside it that branches (line 38). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · ChartHelper.DetectChartType (cyclomatic 33) · ×1
  • ChartHelper.DetectChartType (cyclomatic 33) src/officecli/Core/Chart/ChartHelper.Reader.cs:1694 — ChartHelper.DetectChartType has cyclomatic complexity 33 (threshold 15). Of this number, 31 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ModernFunctionQualifier.AutoQuoteSheetRefs (cyclomatic 33) · ×1
  • ModernFunctionQualifier.AutoQuoteSheetRefs (cyclomatic 33) src/officecli/Core/Formula/ModernFunctionQualifier.cs:406 — ModernFunctionQualifier.AutoQuoteSheetRefs has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RawXmlHelper.ExecuteOnXmlString (cyclomatic 33) · ×1
  • RawXmlHelper.ExecuteOnXmlString (cyclomatic 33) src/officecli/Core/RawXmlHelper.cs:116 — RawXmlHelper.ExecuteOnXmlString has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelBatchEmitter.EmitCharts (cyclomatic 33) · ×1
  • ExcelBatchEmitter.EmitCharts (cyclomatic 33) src/officecli/Handlers/Excel/ExcelBatchEmitter.Elements.cs:376 — ExcelBatchEmitter.EmitCharts has cyclomatic complexity 33 (threshold 15). Of this number, 27 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ExcelHandler.AddPicture (cyclomatic 33) · ×1
  • ExcelHandler.AddPicture (cyclomatic 33) src/officecli/Handlers/Excel/ExcelHandler.Add.Drawings.cs:264 — ExcelHandler.AddPicture has cyclomatic complexity 33 (threshold 15). Of this number, 30 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.
D1 · Cyclomatic Complexity · ExcelHandler.ParseDataRangeForChart (cyclomatic 33) · ×1
  • ExcelHandler.ParseDataRangeForChart (cyclomatic 33) src/officecli/Handlers/Excel/ExcelHandler.Helpers.Chart.cs:403 — ExcelHandler.ParseDataRangeForChart has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelHandler.BuildConditionalFormatMap (cyclomatic 33) · ×1
  • ExcelHandler.BuildConditionalFormatMap (cyclomatic 33) src/officecli/Handlers/Excel/ExcelHandler.HtmlPreview.cs:1167 — ExcelHandler.BuildConditionalFormatMap has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.AddAnimation (cyclomatic 33) · ×1
  • PowerPointHandler.AddAnimation (cyclomatic 33) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Misc.cs:1675 — PowerPointHandler.AddAnimation 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.
D1 · Cyclomatic Complexity · PowerPointHandler.BuildGradientFill (cyclomatic 33) · ×1
  • PowerPointHandler.BuildGradientFill (cyclomatic 33) src/officecli/Handlers/Pptx/PowerPointHandler.Background.cs:890 — PowerPointHandler.BuildGradientFill has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.GetShapeFillCss (cyclomatic 33) · ×1
  • PowerPointHandler.GetShapeFillCss (cyclomatic 33) src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:23 — PowerPointHandler.GetShapeFillCss has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PptxBatchEmitter.EmitGenericAlternateContentForSlide (cyclomatic 33) · ×1
  • PptxBatchEmitter.EmitGenericAlternateContentForSlide (cyclomatic 33) src/officecli/Handlers/Pptx/PptxBatchEmitter.Media.cs:558 — PptxBatchEmitter.EmitGenericAlternateContentForSlide has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.AddNum (cyclomatic 33) · ×1
  • WordHandler.AddNum (cyclomatic 33) src/officecli/Handlers/Word/WordHandler.Add.Structure.cs:2042 — WordHandler.AddNum has cyclomatic complexity 33 (threshold 15). Of this number, 31 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.SetGroupProps (cyclomatic 33) · ×1
  • WordHandler.SetGroupProps (cyclomatic 33) src/officecli/Handlers/Word/WordHandler.Set.Element.cs:3363 — WordHandler.SetGroupProps has cyclomatic complexity 33 (threshold 15). Of this number, 29 points are the body's own statements and 4 belong to 4 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.
D1 · Cyclomatic Complexity · WordHandler.ResolveEffectiveRunPropertiesCore (cyclomatic 33) · ×1
  • WordHandler.ResolveEffectiveRunPropertiesCore (cyclomatic 33) src/officecli/Handlers/Word/WordHandler.StyleList.cs:34 — WordHandler.ResolveEffectiveRunPropertiesCore has cyclomatic complexity 33 (threshold 15). Of this number, 32 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ResidentServer.ProcessRequest (cyclomatic 33) · ×1
  • ResidentServer.ProcessRequest (cyclomatic 33) src/officecli/ResidentServer.cs:736 — ResidentServer.ProcessRequest has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CommandBuilder.BuildPluginsLintCommand (cyclomatic 32) · ×1
  • CommandBuilder.BuildPluginsLintCommand (cyclomatic 32) src/officecli/CommandBuilder.Plugins.cs:205 — CommandBuilder.BuildPluginsLintCommand has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 1 of the 32 points is its own statement and the rest belongs to one function literal inside it that branches (line 226). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · PivotTableHelper.ComputePivotGeometry (cyclomatic 32) · ×1
  • PivotTableHelper.ComputePivotGeometry (cyclomatic 32) src/officecli/Core/PivotTableHelper.cs:1681 — PivotTableHelper.ComputePivotGeometry has cyclomatic complexity 32 (threshold 15). Of this number, 29 points are the body's own statements and 3 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.
D1 · Cyclomatic Complexity · ExcelBatchEmitter.EmitConditionalFormats (cyclomatic 32) · ×1
  • ExcelBatchEmitter.EmitConditionalFormats (cyclomatic 32) src/officecli/Handlers/Excel/ExcelBatchEmitter.Elements.cs:147 — ExcelBatchEmitter.EmitConditionalFormats has cyclomatic complexity 32 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ExcelHandler.SetRange (cyclomatic 32) · ×1
  • ExcelHandler.SetRange (cyclomatic 32) src/officecli/Handlers/Excel/ExcelHandler.Set.Ranges.cs:21 — ExcelHandler.SetRange has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.RawSet (cyclomatic 32) · ×1
  • PowerPointHandler.RawSet (cyclomatic 32) src/officecli/Handlers/PowerPointHandler.cs:235 — PowerPointHandler.RawSet has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.EmitEffectiveRunProperties (cyclomatic 32) · ×1
  • WordHandler.EmitEffectiveRunProperties (cyclomatic 32) src/officecli/Handlers/Word/WordHandler.StyleList.cs:417 — WordHandler.EmitEffectiveRunProperties has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ChartHelper.RebuildComboChart (cyclomatic 31) · ×1
  • ChartHelper.RebuildComboChart (cyclomatic 31) src/officecli/Core/Chart/ChartHelper.Advanced.cs:500 — ChartHelper.RebuildComboChart has cyclomatic complexity 31 (threshold 15). Of this number, 30 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.
D1 · Cyclomatic Complexity · ChartSvgRenderer.RenderRadarChartSvg (cyclomatic 31) · ×1
  • ChartSvgRenderer.RenderRadarChartSvg (cyclomatic 31) src/officecli/Core/Chart/ChartSvgRenderer.cs:2234 — ChartSvgRenderer.RenderRadarChartSvg has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WatchServer.HandlePostSwitchAsync (cyclomatic 31) · ×1
  • WatchServer.HandlePostSwitchAsync (cyclomatic 31) src/officecli/Core/Watch/WatchServer.cs:2583 — WatchServer.HandlePostSwitchAsync has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelBatchEmitter.ClassifyCell (cyclomatic 31) · ×1
  • ExcelBatchEmitter.ClassifyCell (cyclomatic 31) src/officecli/Handlers/Excel/ExcelBatchEmitter.cs:716 — ExcelBatchEmitter.ClassifyCell has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelHandler.GetFormattedCellValue (cyclomatic 31) · ×1
  • ExcelHandler.GetFormattedCellValue (cyclomatic 31) src/officecli/Handlers/Excel/ExcelHandler.HtmlPreview.cs:2714 — ExcelHandler.GetFormattedCellValue has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelHandler.Import (cyclomatic 31) · ×1
  • ExcelHandler.Import (cyclomatic 31) src/officecli/Handlers/Excel/ExcelHandler.Import.cs:22 — ExcelHandler.Import has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelHandler.AddSlicer (cyclomatic 31) · ×1
  • ExcelHandler.AddSlicer (cyclomatic 31) src/officecli/Handlers/Excel/ExcelHandler.Slicer.cs:67 — ExcelHandler.AddSlicer has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PowerPointHandler.MatchesGenericAttributes (cyclomatic 31) · ×1
  • PowerPointHandler.MatchesGenericAttributes (cyclomatic 31) src/officecli/Handlers/Pptx/PowerPointHandler.Selector.cs:276 — PowerPointHandler.MatchesGenericAttributes has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.BuildAnimValueFromProps (cyclomatic 31) · ×1
  • PowerPointHandler.BuildAnimValueFromProps (cyclomatic 31) src/officecli/Handlers/Pptx/PowerPointHandler.Set.Shape.cs:2223 — PowerPointHandler.BuildAnimValueFromProps has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WordHandler.EnsureAllParaIds (cyclomatic 31) · ×1
  • WordHandler.EnsureAllParaIds (cyclomatic 31) src/officecli/Handlers/Word/WordHandler.Helpers.Field.cs:325 — WordHandler.EnsureAllParaIds has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.CollectInlinedPartsEmitData (cyclomatic 31) · ×1
  • WordHandler.CollectInlinedPartsEmitData (cyclomatic 31) src/officecli/Handlers/WordHandler.cs:1245 — WordHandler.CollectInlinedPartsEmitData has cyclomatic complexity 31 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · applyMarks (cyclomatic 31) · ×1
  • applyMarks (cyclomatic 31) src/officecli/Resources/watch-overlay.js:423 — applyMarks has cyclomatic complexity 31 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · ChartSvgRenderer.RenderMultiRingDoughnut (cyclomatic 30) · ×1
  • ChartSvgRenderer.RenderMultiRingDoughnut (cyclomatic 30) src/officecli/Core/Chart/ChartSvgRenderer.cs:1797 — ChartSvgRenderer.RenderMultiRingDoughnut has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ChartSvgRenderer.ExtractFillColor (cyclomatic 30) · ×1
  • ChartSvgRenderer.ExtractFillColor (cyclomatic 30) src/officecli/Core/Chart/ChartSvgRenderer.cs:4299 — ChartSvgRenderer.ExtractFillColor has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ChartSvgRenderer.RenderLegendHtml (cyclomatic 30) · ×1
  • ChartSvgRenderer.RenderLegendHtml (cyclomatic 30) src/officecli/Core/Chart/ChartSvgRenderer.cs:4795 — ChartSvgRenderer.RenderLegendHtml has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DrawingColorBuilder.ParseColorTransformSuffix (cyclomatic 30) · ×1
  • DrawingColorBuilder.ParseColorTransformSuffix (cyclomatic 30) src/officecli/Core/DrawingColorBuilder.cs:95 — DrawingColorBuilder.ParseColorTransformSuffix has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FormulaParser.Tokenize (cyclomatic 30) · ×1
  • FormulaParser.Tokenize (cyclomatic 30) src/officecli/Core/Formula/FormulaParser.cs:985 — FormulaParser.Tokenize has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UpdateChecker.RunRefresh (cyclomatic 30) · ×1
  • UpdateChecker.RunRefresh (cyclomatic 30) src/officecli/Core/UpdateChecker.cs:103 — UpdateChecker.RunRefresh has cyclomatic complexity 30 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · WatchServer.HandlePostSendAsync (cyclomatic 30) · ×1
  • WatchServer.HandlePostSendAsync (cyclomatic 30) src/officecli/Core/Watch/WatchServer.cs:2278 — WatchServer.HandlePostSendAsync has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelHandler.RefreshStaleFormulaCaches (cyclomatic 30) · ×1
  • ExcelHandler.RefreshStaleFormulaCaches (cyclomatic 30) src/officecli/Handlers/Excel/ExcelHandler.FormulaCache.cs:124 — ExcelHandler.RefreshStaleFormulaCaches has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.ResolveEffectiveDefRpCore (cyclomatic 30) · ×1
  • PowerPointHandler.ResolveEffectiveDefRpCore (cyclomatic 30) src/officecli/Handlers/Pptx/PowerPointHandler.StyleList.cs:70 — PowerPointHandler.ResolveEffectiveDefRpCore has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PptxBatchEmitter.EmitPresentationProps (cyclomatic 30) · ×1
  • PptxBatchEmitter.EmitPresentationProps (cyclomatic 30) src/officecli/Handlers/Pptx/PptxBatchEmitter.cs:295 — PptxBatchEmitter.EmitPresentationProps has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordBatchEmitter.EmitOneNoteSpecialNotesFixup (cyclomatic 30) · ×1
  • WordBatchEmitter.EmitOneNoteSpecialNotesFixup (cyclomatic 30) src/officecli/Handlers/Word/WordBatchEmitter.Resources.cs:372 — WordBatchEmitter.EmitOneNoteSpecialNotesFixup has cyclomatic complexity 30 (threshold 15). Of this number, 27 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.
D1 · Cyclomatic Complexity · WordHandler.AcceptAllChanges (cyclomatic 30) · ×1
  • WordHandler.AcceptAllChanges (cyclomatic 30) src/officecli/Handlers/Word/WordHandler.Mutations.cs:2044 — WordHandler.AcceptAllChanges has cyclomatic complexity 30 (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.
D1 · Cyclomatic Complexity · ChartHelper.ConvertSeriesToType (cyclomatic 29) · ×1
  • ChartHelper.ConvertSeriesToType (cyclomatic 29) src/officecli/Core/Chart/ChartHelper.Advanced.cs:662 — ChartHelper.ConvertSeriesToType has cyclomatic complexity 29 (threshold 15). Of this number, 28 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WatchServer.HandleWatchMessage (cyclomatic 29) · ×1
  • WatchServer.HandleWatchMessage (cyclomatic 29) src/officecli/Core/Watch/WatchServer.cs:649 — WatchServer.HandleWatchMessage has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelHandler.PopulateAutoFilterCriteria (cyclomatic 29) · ×1
  • ExcelHandler.PopulateAutoFilterCriteria (cyclomatic 29) src/officecli/Handlers/Excel/ExcelHandler.Add.Tables.cs:971 — ExcelHandler.PopulateAutoFilterCriteria has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelHandler.BuildAlignmentCss (cyclomatic 29) · ×1
  • ExcelHandler.BuildAlignmentCss (cyclomatic 29) src/officecli/Handlers/Excel/ExcelHandler.HtmlPreview.cs:2557 — ExcelHandler.BuildAlignmentCss has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelHandler.Raw (cyclomatic 29) · ×1
  • ExcelHandler.Raw (cyclomatic 29) src/officecli/Handlers/ExcelHandler.cs:115 — ExcelHandler.Raw has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.ResolveShapeId (cyclomatic 29) · ×1
  • PowerPointHandler.ResolveShapeId (cyclomatic 29) src/officecli/Handlers/Pptx/PowerPointHandler.Add.Misc.cs:697 — PowerPointHandler.ResolveShapeId has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.BuildClickGroup (cyclomatic 29) · ×1
  • PowerPointHandler.BuildClickGroup (cyclomatic 29) src/officecli/Handlers/Pptx/PowerPointHandler.Animations.cs:1245 — PowerPointHandler.BuildClickGroup has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.ApplyPptRunFormatting (cyclomatic 29) · ×1
  • PowerPointHandler.ApplyPptRunFormatting (cyclomatic 29) src/officecli/Handlers/Pptx/PowerPointHandler.Helpers.RunFormat.cs:437 — PowerPointHandler.ApplyPptRunFormatting has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · PowerPointHandler.GradientToCss (cyclomatic 29) · ×1
  • PowerPointHandler.GradientToCss (cyclomatic 29) src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Css.cs:612 — PowerPointHandler.GradientToCss has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.TableBorderToCss (cyclomatic 29) · ×1
  • PowerPointHandler.TableBorderToCss (cyclomatic 29) src/officecli/Handlers/Pptx/PowerPointHandler.HtmlPreview.Tables.cs:470 — PowerPointHandler.TableBorderToCss has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · PptxBatchEmitter.EmitGroup (cyclomatic 29) · ×1
  • PptxBatchEmitter.EmitGroup (cyclomatic 29) src/officecli/Handlers/Pptx/PptxBatchEmitter.Shape.cs:739 — PptxBatchEmitter.EmitGroup has cyclomatic complexity 29 (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.
D1 · Cyclomatic Complexity · WordBatchEmitter.IsRichBlockSdt (cyclomatic 29) · ×1
  • WordBatchEmitter.IsRichBlockSdt (cyclomatic 29) src/officecli/Handlers/Word/WordBatchEmitter.Resources.cs:3057 — WordBatchEmitter.IsRichBlockSdt has cyclomatic complexity 29 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WordHandler.ResolveIndentationFromStyle (cyclomatic 29) · ×1
  • WordHandler.ResolveIndentationFromStyle (cyclomatic 29) src/officecli/Handlers/Word/WordHandler.HtmlPreview.Css.cs:1210 — WordHandler.ResolveIndentationFromStyle has cyclomatic complexity 29 (threshold 15). Of this number, 28 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.GetCjkFontFallback (cyclomatic 29) · ×1
  • WordHandler.GetCjkFontFallback (cyclomatic 29) src/officecli/Handlers/Word/WordHandler.HtmlPreview.Css.cs:3325 — WordHandler.GetCjkFontFallback has cyclomatic complexity 29 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WordHandler.CollectFormFieldEntries (cyclomatic 29) · ×1
  • WordHandler.CollectFormFieldEntries (cyclomatic 29) src/officecli/Handlers/Word/WordHandler.View.cs:1596 — WordHandler.CollectFormFieldEntries has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FormulaEvaluator.EvalDatabase (cyclomatic 28) · ×1
  • FormulaEvaluator.EvalDatabase (cyclomatic 28) src/officecli/Core/Formula/FormulaEvaluator.Functions.cs:2004 — FormulaEvaluator.EvalDatabase has cyclomatic complexity 28 (threshold 15). Of this number, 26 points are the body's own statements and 2 belong to one function literal inside it that branches. 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.
D1 · Cyclomatic Complexity · ImageSource.TryGetDimensions (cyclomatic 28) · ×1
  • ImageSource.TryGetDimensions (cyclomatic 28) src/officecli/Core/ImageSource.cs:247 — ImageSource.TryGetDimensions has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OleHelper.AddEmbeddedPartFromBytes (cyclomatic 28) · ×1
  • OleHelper.AddEmbeddedPartFromBytes (cyclomatic 28) src/officecli/Core/OleHelper.cs:297 — OleHelper.AddEmbeddedPartFromBytes has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · PivotTableHelper.ResolveDefinedName (cyclomatic 28) · ×1
  • PivotTableHelper.ResolveDefinedName (cyclomatic 28) src/officecli/Core/PivotTableHelper.Cache.cs:1261 — PivotTableHelper.ResolveDefinedName has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExcelHandler.AddPart (cyclomatic 28) · ×1
  • ExcelHandler.AddPart (cyclomatic 28) src/officecli/Handlers/Excel/ExcelHandler.Add.cs:1016 — ExcelHandler.AddPart has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.GetMediaOnSlide (cyclomatic 28) · ×1
  • PowerPointHandler.GetMediaOnSlide (cyclomatic 28) src/officecli/Handlers/PowerPointHandler.cs:3576 — PowerPointHandler.GetMediaOnSlide has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.ResolveIdPath (cyclomatic 28) · ×1
  • PowerPointHandler.ResolveIdPath (cyclomatic 28) src/officecli/Handlers/Pptx/PowerPointHandler.Helpers.Path.cs:226 — PowerPointHandler.ResolveIdPath has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PowerPointHandler.FindUnsupportedDescendant (cyclomatic 28) · ×1
  • PowerPointHandler.FindUnsupportedDescendant (cyclomatic 28) src/officecli/Handlers/Pptx/PowerPointHandler.Selector.cs:50 — PowerPointHandler.FindUnsupportedDescendant has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.ResolveShapeFillCss (cyclomatic 28) · ×1
  • WordHandler.ResolveShapeFillCss (cyclomatic 28) src/officecli/Handlers/Word/WordHandler.HtmlPreview.Css.cs:131 — WordHandler.ResolveShapeFillCss has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WordHandler.RenderCellListItem (cyclomatic 28) · ×1
  • WordHandler.RenderCellListItem (cyclomatic 28) src/officecli/Handlers/Word/WordHandler.HtmlPreview.Tables.cs:1019 — WordHandler.RenderCellListItem has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WordHandler.MoveWithTrackChange (cyclomatic 28) · ×1
  • WordHandler.MoveWithTrackChange (cyclomatic 28) src/officecli/Handlers/Word/WordHandler.Mutations.cs:1456 — WordHandler.MoveWithTrackChange has cyclomatic complexity 28 (threshold 15). Of this number, 26 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 28) · ×1
  • (anonymous) (cyclomatic 28) src/officecli/Resources/watch-sse-core.js:318 — (anonymous) has cyclomatic complexity 28 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · BatchItemConverter.Read (cyclomatic 27) · ×1
  • BatchItemConverter.Read (cyclomatic 27) src/officecli/BatchTypes.cs:71 — BatchItemConverter.Read has cyclomatic complexity 27 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ChartHelper.AddReferenceLine (cyclomatic 27) · ×1
  • ChartHelper.AddReferenceLine (cyclomatic 27) src/officecli/Core/Chart/ChartHelper.Advanced.cs:30 — ChartHelper.AddReferenceLine has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ChartHelper.ApplySecondaryAxis (cyclomatic 27) · ×1
  • ChartHelper.ApplySecondaryAxis (cyclomatic 27) src/officecli/Core/Chart/ChartHelper.Setter.cs:4189 — ChartHelper.ApplySecondaryAxis has cyclomatic complexity 27 (threshold 15). Of this number, 24 points are the body's own state...

    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.