Public report of xADDBx/ToyBox-Wrath, published 17 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 17 November 2026, 18:05 UTC · Survey ID cd_a74b2b4a6cd54e3684f2048536712f99
xADDBx/ToyBox-Wrath
Measured 17 November 2026, 18:04 UTC, at code version c447325
Knowledge freshness is not measured: Freshness signal contradicted by repo activity.
CAI scoreProvisional
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A medium codebase: 35,631 lines of product code in 1 project, tests not counted · Estimated rebuild effort: about 1.1 person-years · Weakest lens: Production Readiness, 41.7
Findings by how serious they are
37 critical629 serious35 minor
1 dimension is left out of the score. we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. It counts neither for nor against the score, and Limitations lists it with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
17 November 2026, 18:04 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
The code didn't build, so the score is provisional
We couldn't build the code: the build stopped with 5528 errors. The dimensions that need a working build, such as complexity, duplication and dead code, were measured on an incomplete picture of the code, so their grades and the score are provisional. Fix the build errors and run the survey again for a final score. The first errors: CS0246: The type or namespace name 'TMPro' could not be found (are you missing a using directive or an assembly reference?); CS0246: The type or namespace name 'UnityEngine' could not be found (are you missing a using directive or an assembly reference?); CS0246: The type or namespace name 'Kingmaker' could not be found (are you missing a using directive or an assembly reference?); CS0246: The type or namespace name 'HarmonyLib' could not be found (are you missing a using directive or an assembly reference?); CS0246: The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?)
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
55of 55 dimensions measured by tools.
682of 701 findings point to an exact file and line, so you can open each one in the code. The other 19 concern the repository as a whole, such as missing documentation.
55dimensions across 6 lenses, read from 35,631 lines of product code in 1 project.
xADDBx/ToyBox-Wrath has a provisional result, because the code didn't build. Its score is held back in part because the project has no automated tests. It scores 48.0 out of 100, and the ratings may change once the code builds. 16 of its 37 critical findings are security problems in the build pipeline and in its code.
Production Readiness, at 41.7, is the weakest lens and counts most in the score. The best first step for the work it takes is fixing the silenced warnings, worth about 2.4 points. Adding automated security scanning would lift Production Readiness itself, worth about 4.0 points. Raising Production Readiness to 70 would lift the score to about 53.5.
Eight pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Six secrets can leak from the build pipeline, and eleven errors are caught and ignored, so failures can go unnoticed. Pinning each tool to an exact version, limiting each secret to its own step and handling or logging the ignored errors would close these risks. Fixing the weaknesses the scanner points to would fix the two security weaknesses in the code. The four data fields that are written but never read need removing.
The product code is 35,631 lines, about €160,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Production Readiness rose from 41.7 to 70, the lowest score rated Strong, the score would rise from 48.0 to about 53.5.
Code composition: what the lines of code are
Business logic 57%Supporting code 43%
Rebuild cost: about €160,000 · Estimate
Cost to rebuild
€53,000 to €280,000, for 887 to 2,911 hours of work, about 1.1 person-years for 1 to 3 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.7 at a score of 48. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Medium: 35,631 lines of product code, of which 32% is declarations and boilerplate, 10% straight logic and 57% logic with branches
Comment lines
The estimate prices 34,044 lines. Comment lines count towards the size of 35,631 lines but aren't priced as work.
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 1 FileScopedPragmaDisable finding(s) in Explicit Debt — start with Accessors.cs.
Raises the score by about 2.4 points · Low effort · Explicit Debt
2
Resolve the 4 WriteOnlyPrivateField finding(s) in Explicit Debt — start with CasterHelpers.cs, SelectedCharacterObserver.cs, Main.cs.
Raises the score by about 2.4 points · Low effort · Explicit Debt
3
Resolve the 1 Build failed finding(s) in Solution Shape.
Raises the score by about 2.2 points · Low effort · Solution Shape
Diagnosis: what the measurements show together
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
If you do one thing first · First action
Fix the build. The code didn't build, so the dimensions that need a working build were measured on an incomplete picture of the code, and every grade in this report is provisional. Once the build works, the next survey gives a final score. The compiler's first errors: CS0246: The type or namespace name 'TMPro' could not be found (are you missing a using directive or an assembly reference?); CS0246: The type or namespace name 'UnityEngine' could not be found (are you missing a using directive or an assembly reference?); CS0246: The type or namespace name 'Kingmaker' could not be found (are you missing a using directive or an assembly reference?); CS0246: The type or namespace name 'HarmonyLib' could not be found (are you missing a using directive or an assembly reference?); CS0246: The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?)
Based on: Solution Shape
Where the investment is most exposed · Value at risk
This code would cost about €160,000 to build again, about 1.1 person-years of work. Its weakest lens is Production Readiness, at 41.7 (Weak). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.3 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 4% to 10% on every change. The history of the code shows how much it changes: about 600 lines over the last 90 days, which is about 2,433 lines a year. At that pace, the extra work comes to an estimated 0.3 to 1.6 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
18 modules, with 14 dependencies between them. One loop runs through 4 of the modules, marked above the diagonal.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
ToyBox.classes.MonkeyPatchin.BagOfPatches uses ToyBox, so a change to ToyBox can break ToyBox.classes.MonkeyPatchin.BagOfPatches, while a change to ToyBox.classes.MonkeyPatchin.BagOfPatches can't break ToyBox.
Position
Below the diagonal: ToyBox.classes.MonkeyPatchin.BagOfPatches uses a module listed above it, which is the healthy direction.
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
17
High / Critical
A03:2025 — Software Supply Chain Failures
8
Medium
Roadmap
Top priorities: Resolve the 1 No automated tests finding(s) in Code Coverage; The .NET analyzers are running but not blocking — tighten them (set <AnalysisMode>All</AnalysisMode>, or treat analyzer warnings as errors on CI) so a security/quality regression fails the build rather than scrolling past as a warning; Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 FileScopedPragmaDisable finding(s) in Explicit Debt — start with Accessors.cs.
The .NET analyzers are running but not blocking — tighten them (set <AnalysisMode>All</AnalysisMode>, or treat analyzer warnings as errors on CI) so a security/quality regression fails the build rather than scrolling past as a warning.
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 37
A definite problem that already costs you something and drags the score down: a
missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here
tends to cause failures elsewhere.
Serious — 629
Likely wrong, but not failing yet. It degrades
the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to
carry for two years either.
Minor — 35
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 1
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 55 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 55 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 682 of 701 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D22 Internal API Consistency — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. The loaded project set declares no packable project and no `.Contracts` project, so there is no intentionally-exposed surface for API consistency to be judged over.
D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `ToyBox/Classes/MainUI/BagOfTricks.cs`, `ToyBox/Classes/MainUI/EnhancedUI/EnhancedSpellbookController.cs`, `ToyBox/Classes/MainUI/PatchTool/Utils/InstantiationHelper.cs`, `ToyBox/Classes/ModKit/DataViewer/ReflectionTreeView.cs`, `ToyBox/Classes/MonkeyPatchin/BagOfPatches/ActionBar.cs`, … (+2 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
D34 Knowledge Freshness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. File-level freshness contradicts repo activity: 31 commits in the last 90 days, yet 103 of 120 significant files carry no living knowledge. Those two readings cannot both be true, so the per-file recency signal is treated as unreliable here and freshness is not scored for this run.
AX2 Stateful singletons — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 35 further occurrence(s) are not listed individually; the score already reflects all 75.
IC1 Incompleteness & stubs — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 393 further occurrence(s) are not listed individually; the score already reflects all 433.
P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D8 Code Coverage: Coverage is measured by building and running the test suite inside our 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.
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 publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
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.
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.
62 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was SearchAndPick.OnGUI at 70. A further 2 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 BulkSellLogic.canBulkSellCount at 17 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: ToyBox/Classes/Infrastructure/WrathExtensions.cs (UI.Color at 16). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 57 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 3 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with SearchAndPick.OnGUI (cyclomatic 70), PartyEditor.OnGUI (cyclomatic 65), PatchOperation.Apply (cyclomatic 63). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 3 together lifts Cyclomatic Complexity from 5.7 to about 5.9/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 94 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 7 bodies over 120 down to 120 or less in Cognitive Complexity — start with QuestEditor.OnGUI (cognitive 214), BlueprintListUI.OnGUI (cognitive 145), SearchAndPick.OnGUI (cognitive 135). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 7 together lifts Cognitive Complexity from 2.0 to about 2.9/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes6.5 / 10Adequate✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 24 MethodTooLong finding(s) in God Classes — start with ArmiesEditor.cs (2), FactsEditor.cs (2), UI+Browser.cs (2). — One of this dimension's main actionable groups (24 warning-level).
Resolve the 6 ClassTooLong finding(s) in God Classes — start with PartyEditor.cs, BagOfTricks.cs, ArmiesEditor.cs. — One of this dimension's main actionable groups (6 warning-level).
Resolve the 5 FileTooLong finding(s) in God Classes — start with MiscWrath.cs, BagOfTricks.cs, TweaksWrath.cs. — One of this dimension's main actionable groups (5 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
57 duplicated block group(s) detected. 6.3 % of the production lines (2,235 of 35,631) are in a reported copy. A further 48 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 2 of the 105 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.
+ 49 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 8 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with Dialog+NPCs.cs (2), BlueprintListUI.cs (2), MulticlassPicker.cs. — One of this dimension's main actionable groups (8 warning-level).
Resolve the 7 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with StatsEditor.cs (2), MiscWrath.cs, BlueprintExtensions.cs. — One of this dimension's main actionable groups (7 warning-level).
Resolve the 5 Duplicated block (7 lines × 3) finding(s) in Code Duplication — start with BlueprintActionWrath.cs (3), MiscWrath.cs, PatchOperation.cs. — One of this dimension's main actionable groups (5 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
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.
What it measures: How much of the code is actually exercised by tests.
Method: Coverage from the analyzer's own run of the suite, computed per-file with structured exclusions for generated, trivial, and glue code. A coverage report found in the repository is never read. When the suite can't be built/run in-image, 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.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 16 packages use a banned license. ★ DEPTH: this repository's MSBuild projects declare 3 direct `PackageReference`(s), and 13 further package(s) were reached beyond them by closing the graph over nuget.org's own nuspec dependency graph — so a banned licence pulled in only by a dependency's OWN dependencies is inside this verdict. A package whose licence nuget.org could not be asked for is not graded, and version ranges are taken at their lower bound, so this is the closure as that graph states it rather than a restored consumer's exact resolution.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Resolve the 2 Hotspot finding(s) in Churn × Complexity Hotspots — start with BagOfTricks.cs, MiscWrath.cs. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.6 / 10Exemplary✓ 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.
6 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is ToyBox/Classes/MainUI/PatchTool/UI/PatchToolTabUI.cs. Counted over 120 of the 147 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
+ 4 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 11 EmptyCatchBlock finding(s) in Explicit Debt — start with Performance.cs, ActionsWrath.cs, SearchAndPick.cs. — One of this dimension's main actionable groups (11 issue-level).
Resolve the 4 WriteOnlyPrivateField finding(s) in Explicit Debt — start with CasterHelpers.cs, SelectedCharacterObserver.cs, Main.cs. — One of this dimension's main actionable groups (4 issue-level).
Resolve the 1 FileScopedPragmaDisable finding(s) in Explicit Debt — start with Accessors.cs. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D18 · Solution Shape3.0 / 10Weak✓ 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.
1 projects, 182 source files, 35631 hand-written lines of code (35631 production / 0 test — the split is derived per file: test is what its project, its own path, or a compile-guarded region marks as test, and a file carrying no test signal counts as production), 0 inter-project edges (build failed).
Build failed
What to do
Resolve the 1 Build failed finding(s) in Solution Shape. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d18_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).
Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.
Resolve the 7 redundant comment finding(s) in Comment Value — start with BlueprintExtensionsQuest.cs (2), MiscWrath.cs (2), ActionsWrath.cs. — One of this dimension's main actionable groups (7 recommendation-level).
Detailed fixes: d24_recommendation.md · top locations in Appendix A, every location in findings.md.
One project, `ToyBox` (35631 LoC, 381 public types across 18 namespaces): over its size bounds, but its parts reference each other, so it reads as one coherent unit.
✓ On the Gold path — maintain.
Detailed fixes: d26_recommendation.md.
Do you agree with this assessment?
D27 · Navigability8.4 / 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. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
84 % of calls cross a namespace and 0 % go through an interface, but 82 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: medium — clean/modular boundaries expected.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
17 finding(s): 0 critical, 16 high, 1 medium, 0 low. 8 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 7 file(s) — `ToyBox/Classes/MainUI/BagOfTricks.cs` (lines 28–667, line 670, line 671, …), `ToyBox/Classes/MainUI/EnhancedUI/EnhancedSpellbookController.cs` (lines 338–344), `ToyBox/Classes/MainUI/PatchTool/Utils/InstantiationHelper.cs` (line 121), `ToyBox/Classes/ModKit/DataViewer/ReflectionTreeView.cs` (lines 402–422), `ToyBox/Classes/MonkeyPatchin/BagOfPatches/ActionBar.cs` (lines 16–91), … (+2 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. In 4 of those file(s) — `ToyBox/Classes/MainUI/BagOfTricks.cs`, `ToyBox/Classes/ModKit/DataViewer/ReflectionTreeView.cs`, `ToyBox/Classes/MonkeyPatchin/BagOfPatches/ActionBar.cs`, `ToyBox/Classes/MonkeyPatchin/EnhancedUI/LocalMap.cs` — the break is at a TYPE DECLARATION (a C# primary constructor semgrep's grammar cannot parse), so the loss is wider than the named lines: rules scoped to that type see no type to scope to and are blind over its whole body, while rules matching statements keep working there. Absence of a type-scoped finding in those types is not evidence of anything. Separately, one or more rules could not re-parse an embedded snippet in 2 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 4 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED, REDACTED. — One of this dimension's main actionable groups (4 issue-level).
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
No action in Static Analysis (SAST) — all 8 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (8 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 3 Change coupling finding(s) in Change Coupling — start with BraaainzEditor.cs (2), BlueprintListUI.cs. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
+ 3 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 0 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.
Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.
`BlueprintLoader` keeps one instance of itself in the static `loader`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (bpsByType, closeCount, _startedLoadingShards, _callback, _workerTasks, toLoad; e.g. `bpsByType` at line 100). — ToyBox/Classes/Infrastructure/Blueprints/BlueprintLoader.cs:31
`Browser` is not registered, but `AchievementsUnlocker` creates it and keeps it in the static `AchievementBrowser`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (searchQueryChanged, _needsRedoCollation, _collationFinished, needsReloadData, prevCollationKey, _searchText; e.g. `searchQueryChanged` at line 91). — ToyBox/Classes/ModKit/UI/UI+Browser.cs:47
`FeaturesTreeEditor` is not registered, but `FactsEditor` creates it and keeps it in the static `treeEditor`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_buttonStyle, _selectedCharacter, _featuresTree; e.g. `_buttonStyle` at line 34). — ToyBox/Classes/MainUI/PartyEditor/FeaturesTreeEditor.cs:16
`RemappableInt` is not registered, but `EnhancedInventory` creates it and keeps it in the static `FilterMapper`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (m_mapping; e.g. `m_mapping` at line 8). — ToyBox/Classes/MainUI/EnhancedUI/RemappableInt.cs:4
`EtudesTreeModel` keeps one instance of itself in the static `_instance`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (etudes, loadedEtudes, conflictingGroups; e.g. `etudes` at line 32). — ToyBox/Classes/MainUI/Etudes/EtudeTreeModel.cs:15
`PatchToolTabUI` is not registered, but `PatchToolUIManager` creates it and keeps it in the static `instances`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (CurrentState, Target, showBlueprintPicker, visited, showPatchManager, showFieldsEditor; e.g. `CurrentState` at line 45). — ToyBox/Classes/MainUI/PatchTool/UI/PatchToolTabUI.cs:23
`ReflectionSearch` keeps one instance of itself in the static `_shared`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (isSearching, _cancellationTokenSource; e.g. `isSearching` at line 102). — ToyBox/Classes/ModKit/DataViewer/ReflectionSearch.cs:67
`ReflectionTreeView` keeps one instance of itself in the static `ExpandedObjects`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (visitCount, searchDepth, searchBreadth, _tree, _buttonStyle, _valueStyle; e.g. `visitCount` at line 70). — ToyBox/Classes/ModKit/DataViewer/ReflectionTreeView.cs:14
`BlueprintPickerGUI` is not registered, but the singleton `PatchToolTabUI` creates it and keeps it in `pickerGUIs`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (showBrowserPicker, category, categorySearchString, bps, showBrowser, pickerText; e.g. `showBrowserPicker` at line 30). — ToyBox/Classes/MainUI/PatchTool/UI/BlueprintPickerGUI.cs:16
`PatchState` is not registered, but the singleton `PatchToolTabUI` creates it and keeps it in `CurrentState`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (Blueprint, Operations, IsDirty; e.g. `Blueprint` at line 32). — ToyBox/Classes/MainUI/PatchTool/Infrastructure/PatchState.cs:13
`ObjectExtensions` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (FieldsByTypeCache; e.g. `FieldsByTypeCache` at line 58). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ToyBox/Classes/MainUI/PatchTool/Utils/DeepCopy.cs:9
`BlueprintExtensions` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_cachedCollationNames, PropertyAccessors, BadList, TypeNamesCache; e.g. `_cachedCollationNames` at line 32). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ToyBox/Classes/Infrastructure/Blueprints/BlueprintExtensions.cs:27
`CharacterPicker` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (PartyFilterChoices, _selectedIndex; e.g. `PartyFilterChoices` at line 17). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ToyBox/Classes/Infrastructure/CharacterPicker.cs:11
`ReflectionBasedSerializer_PerformancePatches` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (TypeConstructorCache, ArrayTypeConstructorCache, HasAttributeCache, IsListOfCache, IsListCache, IsOrSubclassOfCache; e.g. `TypeConstructorCache` at line 118). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ToyBox/Classes/Infrastructure/Performance.cs:22
`UIHelpers` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (WidgetPaths; e.g. `WidgetPaths` at line 80). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ToyBox/Classes/Infrastructure/UIWidgetHelpers.cs:22
`BagOfTricks` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (UnitToCopy, showDLC6RomanceOverrideMenu, showBuffDurationExceptions; e.g. `UnitToCopy` at line 103). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ToyBox/Classes/MainUI/BagOfTricks.cs:29
`AchievementsUnlocker` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (availableAchievements, unlocked; e.g. `availableAchievements` at line 21). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ToyBox/Classes/MainUI/Browser/AchievementsUnlocker.cs:11
`BlueprintAction` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (actionsForType; e.g. `actionsForType` at line 46). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ToyBox/Classes/MainUI/Browser/BlueprintAction.cs:37
`BlueprintActions` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (featureSelectionItems, parametrizedSelectionItems; e.g. `featureSelectionItems` at line 122). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ToyBox/Classes/MainUI/Browser/BlueprintAction.cs:114
`BlueprintListUI` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (hasRepeatableAction, maxActions, needsLayout, repeatCount, paramBPValueNames, ParamSelected; e.g. `hasRepeatableAction` at line 47). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:20
`BuffExclusionEditor` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_buffExceptions, _defaultBuffExceptions, _allBuffs, _searchResults, _displayedBuffs, _showCurrentExceptions; e.g. `_buffExceptions` at line 33). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ToyBox/Classes/MainUI/Browser/BuffExclusionEditor.cs:10
`Editor` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (editorsForType; e.g. `editorsForType` at line 28). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ToyBox/Classes/MainUI/Browser/Editor.cs:10
`FactsEditor` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_showTree, FeatureBrowserDict, BuffBrowserDict, AbilityBrowserDict; e.g. `_showTree` at line 333). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ToyBox/Classes/MainUI/Browser/FactsEditor.cs:30
`SearchAndPick` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (hasRepeatableAction, maxActions, blueprints, needsRedoKeys, collationKeys, keyToDisplayName; e.g. `hasRepeatableAction` at line 173). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ToyBox/Classes/MainUI/Browser/SearchAndPick.cs:44
`DialogEditor` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (Visited; e.g. `Visited` at line 42). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ToyBox/Classes/MainUI/DialogEditor.cs:31
`EnhancedInventory` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (m_area_load_handler; e.g. `m_area_load_handler` at line 68). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ToyBox/Classes/MainUI/EnhancedUI/EnhancedInventory.cs:19
`GameSavesBrowser` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (nameEditState, _currentSaves, _allSaves; e.g. `nameEditState` at line 40). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ToyBox/Classes/MainUI/EnhancedUI/GameSaves.cs:12
`LootHelper` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (m_FakePlayerChest; e.g. `m_FakePlayerChest` at line 161). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ToyBox/Classes/MainUI/EnhancedUI/LootHelper.cs:31
`PhatLoot` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (searchText; e.g. `searchText` at line 174). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ToyBox/Classes/MainUI/EnhancedUI/PhatLoot.cs:15
`EtudeChildrenDrawer` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (newParentFromContestComand, newParentID; e.g. `newParentFromContestComand` at line 35). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ToyBox/Classes/MainUI/Etudes/EtudeChildrenDrawer.cs:12
`EtudesEditor` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_areas, _parent, _selected, searchTextInput, searchText, _showOnlyFlagLikes; e.g. `_areas` at line 64). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ToyBox/Classes/MainUI/Etudes/EtudesEditor.cs:23
`Main` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_resetRequested, _resetRequestTime, Settings, ModEntry, _modId, HarmonyInstance; e.g. `_resetRequested` at line 82). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ToyBox/Classes/MainUI/Main.cs:38
`MulticlassPicker` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (areYouSure1, areYouSure2, areYouSure3; e.g. `areYouSure1` at line 250). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ToyBox/Classes/MainUI/MulticlassPicker.cs:12
`PartyEditor` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (editMultiClass, multiclassEditCharacter, selectedCharacter, selectedSpellbook, selectedSpellbookLevel, charToAdd; e.g. `editMultiClass` at line 33). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ToyBox/Classes/MainUI/PartyEditor/ClassesEditor.cs:25
`QuestEditor` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_selectedQuests; e.g. `_selectedQuests` at line 76). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ToyBox/Classes/MainUI/QuestEditor.cs:66
`SettingsUI` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (uiCulture, cultures, cultureSearchText; e.g. `uiCulture` at line 77). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ToyBox/Classes/Models/Settings+UI.cs:10
`Settings` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (initial_settings, cachedPerSave; e.g. `initial_settings` at line 76). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ToyBox/Classes/Models/Settings.cs:60
`SaveLoadPCViewPatch` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (SaveFileSearchText, _searchBar, _collectionVirtualView; e.g. `SaveFileSearchText` at line 40). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ToyBox/Classes/MonkeyPatchin/EnhancedUI/SaveLoadViews.cs:34
`GlobalMapRandomEncounterController_OnRandomEncounterStarted_Patch` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (m_DescriptionRef; e.g. `m_DescriptionRef` at line 389). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ToyBox/Classes/MonkeyPatchin/PreviewManagerWrath.cs:384
`PreviewUtilities` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (m_BoldLabel, m_BoxLabel, m_YellowBoxLabel; e.g. `m_BoldLabel` at line 21). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — ToyBox/Classes/MonkeyPatchin/PreviewUtilities.cs:16
What to do
Keep singletons stateless or back their state with thread-safe types (Concurrent*/Immutable*); otherwise concurrent callers race.
A `static` field is one slot for the whole process, however its type is created: back it with a thread-safe type (ConcurrentDictionary, Interlocked), take a lock around every write, or move it into a registered singleton that does.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
The namespaces ModKit ↔ ModKit.Utility ↔ ToyBox ↔ ToyBox.Multiclass depend on each other. The lightest dependency in the cycle is ModKit → ModKit.Utility (ModKit.KeyBindings → ModKit.Utility.SerializableDictionary, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — ToyBox/Classes/ModKit/UI/KeyBindings/KeyBindings.cs:3
What to do
Break namespace cycles inside a project by moving the shared type to a namespace both sides can use, or by inverting the back edge behind an interface.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Other · Architecture — Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.
Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.
~35.6k production LoC (622 types) across 1 project(s) / 19 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.
Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.
Other · Code Health — Unreviewed-generation residue: shipped members still throwing NotImplementedException, and placeholder string literals left in non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.
Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.
A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface. (×5) — ToyBox/Classes/Infrastructure/Teleport.cs:85, ToyBox/Classes/Infrastructure/UIWidgetHelpers.cs:53, ToyBox/Classes/Infrastructure/UIWidgetHelpers.cs:54, …
What to do
Finish or delete NotImplementedException stubs and replace placeholder literals before shipping.
Other · Code Health — Unfinished work detected by code SHAPE, not keywords: members that only throw a "not implemented" exception, methods that take inputs and return a constant, async methods that never await, dead `if (false)` / `#if false` branches, and skeleton types most of whose members are holes. A real, objective slice of technical debt.
Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.
`InventoryScreen` is a shipped member whose body only throws — and it is REACHED: ToyBox/Classes/Infrastructure/UIWidgetHelpers.cs:43 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it. — ToyBox/Classes/Infrastructure/UIWidgetHelpers.cs:53
`LocalMapScreen` is a shipped member whose body only throws — and it is REACHED: ToyBox/Classes/Infrastructure/UIWidgetHelpers.cs:44 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it. — ToyBox/Classes/Infrastructure/UIWidgetHelpers.cs:54
Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored. (×30) — ToyBox/Classes/Infrastructure/Blueprints/BlueprintDataSource.cs:11, ToyBox/Classes/Infrastructure/TeleportWrath.cs:101, ToyBox/Classes/Infrastructure/UnitEntityDataUtils.cs:158, …
`OnAfterBPLoad` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — ToyBox/Classes/Infrastructure/Blueprints/BlueprintLoader.cs:244
`Dispose` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — ToyBox/Classes/Infrastructure/Teleport.cs:85
`OnGUI` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. (×2) — ToyBox/Classes/MainUI/DialogEditor.cs:59, ToyBox/Classes/MainUI/DialogEditor.cs:62
Both arms of `mythicLevel < 10 ? … : …` are `" my"`, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition. — ToyBox/Classes/MainUI/PartyEditor/PartyEditor.cs:201
The `default:` section (reached by `NoOperation`) throws `NotImplementedException` while the member's other paths do the work — the branch was never written, so every input that reaches it fails at run time. Implement the branch, or reject the input where it enters with an exception that says it is not supported. (×2) — ToyBox/Classes/MainUI/PatchTool/Infrastructure/PatchOperation.cs:197, ToyBox/Classes/MainUI/PatchTool/Infrastructure/PatchOperation.cs:279
`SetValue` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — ToyBox/Classes/ModKit/DataViewer/ReflectionTree.cs:481
What to do
Finish or delete the unfinished stubs (NotImplementedException / empty / constant-returning bodies) — they are dead surface that looks live.
Clear the softer debt: remove commented-out code and dead branches, re-enable or delete skipped tests, and replace blanket warning suppressions with targeted ones.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
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.
`ToyBox/ToyBox.csproj` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — ToyBox/ToyBox.csproj:60
What to do
The .NET analyzers are running but not blocking — tighten them (set <AnalysisMode>All</AnalysisMode>, or treat analyzer warnings as errors on CI) so a security/quality regression fails the build rather than scrolling past as a warning.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
What to do
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
What to do
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
1 blocking call(s) on async work (.Wait()/.GetAwaiter().GetResult()) — these waste a thread and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
`task.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). — ToyBox/Classes/Infrastructure/Blueprints/BlueprintLoader.cs:168
What to do
Make the call chain async end-to-end and await it — never block on a Task with .Wait()/.GetAwaiter().GetResult().
Do you agree with this assessment?
X1 · Async correctness3.5 / 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. — ToyBox/Classes/Infrastructure/Blueprints/BlueprintLoader.cs:168
Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.
Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.
Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.
`_cancellationTokenSource` is a `CancellationTokenSource` this type creates itself, and here (line 109) a new instance is written over it — but `StartSearch` itself reads through `_cancellationTokenSource` before replacing it, so it expects an instance to be there, and nothing earlier in `StartSearch` disposes, closes, saves or hands on the instance being replaced. The assignment makes it unreachable while it still holds what it holds (a timer that keeps firing, a callback registered on a longer-lived token, a socket, a handle), and no later `Dispose` can reach it: the type's own disposal releases only the CURRENT instance. The cost accumulates once per overwrite. Release the previous instance first (`_cancellationTokenSource?.Dispose();` before the assignment), or swap it out with `Interlocked.Exchange` and dispose what comes back. — ToyBox/Classes/ModKit/DataViewer/ReflectionSearch.cs:109
`_searchCancellationTokenSource` is a `CancellationTokenSource` this type creates itself, and here (line 384) a new instance is written over it — but `Update` itself reads through `_searchCancellationTokenSource` before replacing it, so it expects an instance to be there, and nothing earlier in `Update` disposes, closes, saves or hands on the instance being replaced. The assignment makes it unreachable while it still holds what it holds (a timer that keeps firing, a callback registered on a longer-lived token, a socket, a handle), and no later `Dispose` can reach it: the type's own disposal releases only the CURRENT instance. The cost accumulates once per overwrite. Release the previous instance first (`_searchCancellationTokenSource?.Dispose();` before the assignment), or swap it out with `Interlocked.Exchange` and dispose what comes back. — ToyBox/Classes/ModKit/UI/UI+Browser.cs:384
What to do
Each finding names the value and the span that decides who owns it — the `new` that created it, or the constructor parameter that handed it over. Confirm ownership from that span, then make the disposal match it: release what this type created, leave what it was injected with to whoever created THAT, and drop a finalizer whose type holds nothing unmanaged to release.
Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `ArgumentNullException` tells the caller a parameter was null when it provably was not.
Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements (or a repository exception type deriving from it) controlled by an `if` — directly or through the `using`, `lock` or `try` that wraps the throw — whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`); in the `else` branch, for a conjunct of the admitting condition that is FALSE of a non-null `p`. Range guards are read for bounds that leave nothing and for a `p > C.Count` bound whose index then reaches `C[p]`, `C.RemoveAt(p)` or a method of the same type that indexes with it. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.
Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a `foreach` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is enumerating invalidates the enumerator it is holding, so the next `MoveNext` throws `InvalidOperationException` and the remaining items are never seen.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×12) — ToyBox/Classes/Infrastructure/Performance.cs:64, ToyBox/Classes/MainUI/ActionsWrath.cs:158, ToyBox/Classes/MainUI/Browser/SearchAndPick.cs:450, …
`catch` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. (×6) — ToyBox/Classes/MainUI/EnchantmentEditor.cs:608, ToyBox/Classes/ModKit/DataViewer/ReflectionTree.cs:551, ToyBox/Classes/ModKit/DataViewer/ReflectionTree.cs:584, …
What to do
Swallowed exception (empty catch)
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether nullable reference types are enabled and not undermined by heavy `!` suppression.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
This method contradicts itself about `ch`: line 388 writes `ch?.Progression`, which says `ch` can be null, but line 387 then dereferences it directly as `ch.Descriptor` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `ch` truly cannot be null here, the `?.` is misleading. Settle it one way — test `ch` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — ToyBox/Classes/Infrastructure/Blueprints/BlueprintExtensions.cs:387
This method contradicts itself about `unit`: line 161 writes `unit?.CharacterName`, which says `unit` can be null, but line 163 then dereferences it directly as `unit.Facts` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `unit` truly cannot be null here, the `?.` is misleading. Settle it one way — test `unit` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — ToyBox/Classes/Infrastructure/CasterHelpers.cs:163
This method contradicts itself about `spellbook`: line 161 writes `spellbook?.`, which says `spellbook` can be null, but line 165 then dereferences it directly as `spellbook.Blueprint` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `spellbook` truly cannot be null here, the `?.` is misleading. Settle it one way — test `spellbook` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — ToyBox/Classes/Infrastructure/CasterHelpers.cs:165
This method contradicts itself about `uiSettings`: line 192 writes `uiSettings?.CleanupSlots`, which says `uiSettings` can be null, but line 193 then dereferences it directly as `uiSettings.Dirty` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `uiSettings` truly cannot be null here, the `?.` is misleading. Settle it one way — test `uiSettings` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — ToyBox/Classes/MainUI/ActionsWrath.cs:193
This method contradicts itself about `ch`: line 106 writes `ch?.Progression`, which says `ch` can be null, but line 105 then dereferences it directly as `ch.Descriptor` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `ch` truly cannot be null here, the `?.` is misleading. Settle it one way — test `ch` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:105
This method contradicts itself about `ch`: line 130 writes `ch?.`, which says `ch` can be null, but line 132 then dereferences it directly as `ch.AddFeatureSelection` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `ch` truly cannot be null here, the `?.` is misleading. Settle it one way — test `ch` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:132
This method contradicts itself about `ch`: line 152 writes `ch?.Descriptor`, which says `ch` can be null, but line 161 then dereferences it directly as `ch.Descriptor` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `ch` truly cannot be null here, the `?.` is misleading. Settle it one way — test `ch` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:161
This method contradicts itself about `add`: line 154 writes `add?.canPerform`, which says `add` can be null, but line 160 then dereferences it directly as `add.BlueprintActionButton` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `add` truly cannot be null here, the `?.` is misleading. Settle it one way — test `add` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — ToyBox/Classes/MainUI/Browser/FactsEditor.cs:160
This method contradicts itself about `remove`: line 155 writes `remove?.canPerform`, which says `remove` can be null, but line 157 then dereferences it directly as `remove.BlueprintActionButton` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `remove` truly cannot be null here, the `?.` is misleading. Settle it one way — test `remove` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — ToyBox/Classes/MainUI/Browser/FactsEditor.cs:157
This method contradicts itself about `taskBlueprint`: line 102 assigns it with `as BlueprintKingdomProject`, which hands back null rather than throwing when the value is not a `BlueprintKingdomProject`, but line 103 then dereferences it directly as `taskBlueprint.MechanicalDescription` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `taskBlueprint` once before the first use and handle the null case, or cast with `(BlueprintKingdomProject)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ToyBox/Classes/MainUI/Crusade/EventEditor.cs:103
This method contradicts itself about `objective`: line 210 writes `objective?.State`, which says `objective` can be null, but line 211 then dereferences it directly as `objective.titleColored` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `objective` truly cannot be null here, the `?.` is misleading. Settle it one way — test `objective` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — ToyBox/Classes/MainUI/Dialog+NPCs.cs:211
This method contradicts itself about `dialogController`: line 57 writes `dialogController?.`, which says `dialogController` can be null, but line 51 then dereferences it directly as `dialogController.CurrentCue` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `dialogController` truly cannot be null here, the `?.` is misleading. Settle it one way — test `dialogController` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — ToyBox/Classes/MainUI/DialogEditor.cs:51
This method contradicts itself about `markerVm`: line 179 assigns it with `as LocalMapCommonMarkerVM`, which hands back null rather than throwing when the value is not a `LocalMapCommonMarkerVM`, but line 180 then dereferences it directly as `markerVm.m_Marker` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `markerVm` once before the first use and handle the null case, or cast with `(LocalMapCommonMarkerVM)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ToyBox/Classes/MainUI/EnhancedUI/ItemRarity.cs:180
This method contradicts itself about `MOV`: line 182 assigns it with `as MapObjectView`, which hands back null rather than throwing when the value is not a `MapObjectView`, but line 183 then dereferences it directly as `MOV.Data` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `MOV` once before the first use and handle the null case, or cast with `(MapObjectView)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ToyBox/Classes/MainUI/EnhancedUI/ItemRarity.cs:183
This method contradicts itself about `classes`: line 75 writes `classes?.Count`, which says `classes` can be null, but line 77 then dereferences it directly as `classes.Count` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `classes` truly cannot be null here, the `?.` is misleading. Settle it one way — test `classes` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — ToyBox/Classes/MainUI/MulticlassPicker.cs:77
This method contradicts itself about `text`: line 237 writes `text?.`, which says `text` can be null, but line 234 then dereferences it directly as `text.Length` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `text` truly cannot be null here, the `?.` is misleading. Settle it one way — test `text` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — ToyBox/Classes/MainUI/PartyEditor/StatsEditor.cs:234
This method contradicts itself about `tmpList`: line 123 assigns it with `as IList`, which hands back null rather than throwing when the value is not a `IList`, but line 125 then dereferences it directly as `tmpList.Add` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `tmpList` once before the first use and handle the null case, or cast with `(IList)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ToyBox/Classes/MainUI/PatchTool/Infrastructure/PatchOperation.cs:125
This method contradicts itself about `bpRef`: line 242 assigns it with `as BlueprintReferenceBase`, which hands back null rather than throwing when the value is not a `BlueprintReferenceBase`, but line 243 then dereferences it directly as `bpRef.ReadGuidFromJson` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `bpRef` once before the first use and handle the null case, or cast with `(BlueprintReferenceBase)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ToyBox/Classes/MainUI/PatchTool/Infrastructure/PatchOperation.cs:243
This method contradicts itself about `array`: line 444 assigns it with `as Array`, which hands back null rather than throwing when the value is not a `Array`, but line 445 then dereferences it directly as `array.Length` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `array` once before the first use and handle the null case, or cast with `(Array)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ToyBox/Classes/MainUI/PatchTool/UI/PatchToolTabUI.cs:445
This method contradicts itself about `list2`: line 452 assigns it with `as IEnumerable<object>`, which hands back null rather than throwing when the value is not a `IEnumerable<object>`, but line 453 then dereferences it directly as `list2.Count` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `list2` once before the first use and handle the null case, or cast with `(IEnumerable<object>)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ToyBox/Classes/MainUI/PatchTool/UI/PatchToolTabUI.cs:453
This method contradicts itself about `values`: line 66 tests it for null before doing anything with it — the author's own statement that null is an input this code expects — but that `if` scopes only the block beneath it, and line 88 then dereferences `values` as `values.Select` AFTER the block has closed, where the guard no longer applies. A null `values` skips the guarded body and reaches that line anyway, throwing NullReferenceException on exactly the input the guard was written for. If the dereference belongs to the guarded work, move it inside the block; if `values` truly cannot be null by then, the guard above is misleading and should go. — ToyBox/Classes/ModKit/Utility/Utilities.cs:88
This method contradicts itself about `rectTransform`: line 74 assigns it with `as RectTransform`, which hands back null rather than throwing when the value is not a `RectTransform`, but line 76 then dereferences it directly as `rectTransform.anchorMin` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `rectTransform` once before the first use and handle the null case, or cast with `(RectTransform)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ToyBox/Classes/MonkeyPatchin/BagOfPatches/ActionBar.cs:76
This method contradicts itself about `__instance`: line 31 writes `__instance?.IsEmployee`, which says `__instance` can be null, but line 33 then dereferences it directly as `__instance.IsFirstCharacterLevel` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `__instance` truly cannot be null here, the `?.` is misleading. Settle it one way — test `__instance` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — ToyBox/Classes/MonkeyPatchin/BagOfPatches/NewChar.cs:33
This method contradicts itself about `___m_KingdomEventView`: line 181 writes `___m_KingdomEventView?.Task`, which says `___m_KingdomEventView` can be null, but line 180 then dereferences it directly as `___m_KingdomEventView.Blueprint` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `___m_KingdomEventView` truly cannot be null here, the `?.` is misleading. Settle it one way — test `___m_KingdomEventView` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — ToyBox/Classes/MonkeyPatchin/BagOfPatches/TweaksWrath.cs:180
This method contradicts itself about `spell`: line 678 writes `spell?.Blueprint`, which says `spell` can be null, but line 677 then dereferences it directly as `spell.SourceItemUsableBlueprint` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `spell` truly cannot be null here, the `?.` is misleading. Settle it one way — test `spell` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — ToyBox/Classes/MonkeyPatchin/BagOfPatches/TweaksWrath.cs:677
This method contradicts itself about `view`: line 157 writes `view?.transform`, which says `view` can be null, but line 146 then dereferences it directly as `view.transform` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `view` truly cannot be null here, the `?.` is misleading. Settle it one way — test `view` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — ToyBox/Classes/MonkeyPatchin/HighlightObjectToggle.cs:146
This method contradicts itself about `view`: line 175 writes `view?.transform`, which says `view` can be null, but line 167 then dereferences it directly as `view.transform` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `view` truly cannot be null here, the `?.` is misleading. Settle it one way — test `view` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — ToyBox/Classes/MonkeyPatchin/HighlightObjectToggle.cs:167
This method contradicts itself about `feature`: line 251 writes `feature?.SetSource`, which says `feature` can be null, but line 252 then dereferences it directly as `feature.Name` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `feature` truly cannot be null here, the `?.` is misleading. Settle it one way — test `feature` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — ToyBox/Classes/MonkeyPatchin/Multiclass/LevelUP+Multiclass.cs:252
This method contradicts itself about `unit`: line 165 writes `unit?.`, which says `unit` can be null, but line 158 then dereferences it directly as `unit.HashKey` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `unit` truly cannot be null here, the `?.` is misleading. Settle it one way — test `unit` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — ToyBox/Classes/MonkeyPatchin/Multiclass/MulticlassMod.cs:158
What to do
Where a method uses `?.` on a symbol and then dereferences it directly, settle the question once: test it before the first use and handle null, or drop the `?.`.
Where a method null-tests a symbol and then uses it after the guarded block closes, move the trailing work inside the block — the guard skips its body on null, it does not stop the method.
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 3 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
SC1 Supply-chain hygiene — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X10 Duplicated predicate — 13 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 57 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AX1 Captive dependencies — no DI registrations detected
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
AXB1 Runtime evidence locked — no reproducible boot — This repository has nothing the runtime tiers could boot or serve — no markup, no UI framework or web-server dependency, no UI component source, no native UI project and no API definition — nothing here is a surface to boot — so runtime a11y/egress/header evidence has no subject here. Not applicable: this is neither a gap in the scan nor a finding about your code.
C1 Data Protection — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C2 Access Controls — No access-control surface detected in the analyzed source — no web/app surface to authorize (no HTTP API or web-UI project) and no authorization code at all (no [Authorize]/policies, no imperative guard methods). Access control is therefore N/A here — this is a library/CLI, which is authorized by its CALLER, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
C3 Audit Trail — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C4 Data Retention — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C5 Data-Subject Rights — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
D10 Test Quality — No tests were found in the analyzed repository to assess for quality.
D11 Test Reliability — No test suite was found to re-run, so reliability couldn't be assessed. Two searches produced that zero and both came back empty: the classifier that reads the loaded workspace recognised no suite it could run, and a walk of the source on disk — which covers the JS/TS `*.test.*` and `*.spec.*` conventions and probes for a Pester suite — found no test source in any other ecosystem either. Neither search reaches a suite that is missing from the loaded workspace and carries no name either walk recognises, so this is 'no suite found by those two searches', not a verdict that the repository has none.
D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
D21 Naming Consistency — D21 withholds its case and prefix conventions rows: 13 candidate(s) found and not reported.
D22 Internal API Consistency — No intentionally-exposed public API to evaluate for consistency.
D23 Boundary Type-Coupling — single shared-core project — no cross-context coupling to assess
D25 ADR Conformance — no ADRs to check
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — 7 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D34 Knowledge Freshness — knowledge concentrated in recent work — freshness signal contradicted by repo activity
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
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 none of the 3 signals this lens looks for
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P2 Observability — This repo is a library, not a deployed service — it has no process to operate, so production observability (structured logging, tracing/metrics, health checks) is N/A. A library may log via an injected ILogger, but the absence of operational telemetry is not a defect here. If it grows a host (web API, worker), the dimension reactivates.
P7 Outbound HTTP resilience — not applicable — this isn't a service/API/worker
P8 Schema migrations — no EF Core usage detected
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF1 Benchmark discipline — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
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.
X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X2 Cancellation propagation — no async method does work a token could cancel
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X32 Type resolved by simple name across every loaded assembly — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's C# was read, and every log call in it goes through a logger that takes one finished message — its own wrapper, log4net, Console or Debug — so an interpolated message there loses nothing the API could have kept. Calls through Microsoft.Extensions.Logging, Serilog, NLog or ZLogger, or any logger with a message-template overload, would be judged.
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
EmptyCatchBlock ToyBox/Classes/Infrastructure/Performance.cs:64— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ToyBox/Classes/MainUI/ActionsWrath.cs:158— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ToyBox/Classes/MainUI/Browser/SearchAndPick.cs:450— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ToyBox/Classes/MainUI/Crusade/ArmiesEditor.cs:665— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ToyBox/Classes/MainUI/EnhancedUI/ItemRarity.cs:126— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ToyBox/Classes/MainUI/EnhancedUI/PhatLoot.cs:164— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ToyBox/Classes/MainUI/PartyEditor/StatsEditor.cs:501— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ToyBox/Classes/MainUI/PatchTool/UI/PatchToolTabUI.cs:350— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ToyBox/Classes/MainUI/PatchTool/Utils/InstantiationHelper.cs:82— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ToyBox/Classes/MonkeyPatchin/BagOfPatches/Summons.cs:64— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ToyBox/Classes/MonkeyPatchin/EnhancedUI/InventoryStashVM.cs:42— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
WriteOnlyPrivateField ToyBox/Classes/Infrastructure/CasterHelpers.cs:18— private Dictionary<string, List<int>> UnitSpellsKnown — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField ToyBox/Classes/MainUI/EnhancedUI/SelectedCharacterObserver.cs:17— private IDisposable m_SelectedUnitUpdate — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField ToyBox/Classes/MainUI/Main.cs:245— private bool IsDumpingBin — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField ToyBox/Classes/MonkeyPatchin/ModUI.cs:18— private Dictionary<int, float> scrollOffsets — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
Unfinished stub — throws NotImplementedException ToyBox/Classes/Infrastructure/UIWidgetHelpers.cs:53— `InventoryScreen` is a shipped member whose body only throws — and it is REACHED: ToyBox/Classes/Infrastructure/UIWidgetHelpers.cs:43 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it.
Unfinished stub — throws NotImplementedException ToyBox/Classes/Infrastructure/UIWidgetHelpers.cs:54— `LocalMapScreen` is a shipped member whose body only throws — and it is REACHED: ToyBox/Classes/Infrastructure/UIWidgetHelpers.cs:44 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it.
Namespace dependency cycle ToyBox/Classes/ModKit/UI/KeyBindings/KeyBindings.cs:3— The namespaces ModKit ↔ ModKit.Utility ↔ ToyBox ↔ ToyBox.Multiclass depend on each other. The lightest dependency in the cycle is ModKit → ModKit.Utility (ModKit.KeyBindings → ModKit.Utility.SerializableDictionary, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
FileScopedPragmaDisable ToyBox/Classes/Infrastructure/Borrowed/Accessors.cs:10— #pragma warning disable 618 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
InvertedNullGuard ToyBox/Classes/MainUI/MulticlassPicker.cs:180— if (chArchetype != null) … else … chArchetype.Name — the guard has already decided this variable is null on the way into this branch, and nothing here gives it another value, so this dereference cannot run without throwing a NullReferenceException. It survives because the branch is the uncommon one: the code is correct on every input where the variable is set, and crashes on exactly the case the branch was written to handle. Decide which the line meant — if it is reporting the absence, it must not read through the missing value (use the other variable that identifies it, or a literal); if it is meant to work on a value, it belongs in the other branch.
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. Start with the code you change most often: add a suite in a framework a runner can collect (xUnit, NUnit or MSTest), and run it in CI so the gap cannot reopen.
DeadPreprocessorBranch ToyBox/Classes/Infrastructure/Blueprints/BlueprintDataSource.cs:11— #if false — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ToyBox/Classes/Infrastructure/TeleportWrath.cs:101— #if false — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ToyBox/Classes/Infrastructure/UnitEntityDataUtils.cs:158— #if false — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch REDACTED:239— #if false — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ToyBox/Classes/Infrastructure/WrathExtensions.cs:138— #if false — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ToyBox/Classes/MainUI/ActionsWrath.cs:64— #if false — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ToyBox/Classes/MainUI/BagOfTricks.cs:655— #if false — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ToyBox/Classes/MainUI/Browser/SearchAndPick.cs:148— #if false — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ToyBox/Classes/MainUI/Crusade/ArmiesEditor.cs:494— #if false — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ToyBox/Classes/MainUI/DialogEditor.cs:150— #if false — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ToyBox/Classes/MainUI/EnhancedUI/EnhancedInventoryController.cs:40— #if false — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ToyBox/Classes/MainUI/EnhancedUI/EnhancedInventoryController.cs:176— #if false — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ToyBox/Classes/MainUI/EnhancedUI/EnhancedInventoryController.cs:218— #if false — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ToyBox/Classes/MainUI/EnhancedUI/ItemRarity.cs:136— #if false — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ToyBox/Classes/MainUI/EnhancedUI/OnAreaLoad.cs:27— #if false — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ToyBox/Classes/MainUI/EnhancedUI/PhatLoot.cs:37— #if false — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ToyBox/Classes/MainUI/Etudes/EtudeChildrenDrawer.cs:62— #if false — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ToyBox/Classes/MainUI/Etudes/EtudesEditor.cs:200— #if false — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ToyBox/Classes/MainUI/Etudes/ReferenceGraph.cs:43— #if false — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ToyBox/Classes/MainUI/LevelUp.cs:110— #if false — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ToyBox/Classes/MainUI/LevelUp.cs:163— #if false — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ToyBox/Classes/MainUI/Main.cs:55— #if false — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ToyBox/Classes/MainUI/Main.cs:326— #if false — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ToyBox/Classes/MainUI/PartyEditor/PartyEditor.cs:104— #if false — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch ToyBox/Classes/MainUI/PartyEditor/StatsEditor.cs:267— #if false — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
AX2 · Stateful singletons· Process-global static state · ×30
Process-global static state: ObjectExtensions ToyBox/Classes/MainUI/PatchTool/Utils/DeepCopy.cs:9— `ObjectExtensions` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (FieldsByTypeCache; e.g. `FieldsByTypeCache` at line 58). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: BlueprintExtensions ToyBox/Classes/Infrastructure/Blueprints/BlueprintExtensions.cs:27— `BlueprintExtensions` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_cachedCollationNames, PropertyAccessors, BadList, TypeNamesCache; e.g. `_cachedCollationNames` at line 32). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: CharacterPicker ToyBox/Classes/Infrastructure/CharacterPicker.cs:11— `CharacterPicker` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (PartyFilterChoices, _selectedIndex; e.g. `PartyFilterChoices` at line 17). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: ReflectionBasedSerializer_PerformancePatches ToyBox/Classes/Infrastructure/Performance.cs:22— `ReflectionBasedSerializer_PerformancePatches` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (TypeConstructorCache, ArrayTypeConstructorCache, HasAttributeCache, IsListOfCache, IsListCache, IsOrSubclassOfCache; e.g. `TypeConstructorCache` at line 118). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: UIHelpers ToyBox/Classes/Infrastructure/UIWidgetHelpers.cs:22— `UIHelpers` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (WidgetPaths; e.g. `WidgetPaths` at line 80). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: BagOfTricks ToyBox/Classes/MainUI/BagOfTricks.cs:29— `BagOfTricks` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (UnitToCopy, showDLC6RomanceOverrideMenu, showBuffDurationExceptions; e.g. `UnitToCopy` at line 103). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: AchievementsUnlocker ToyBox/Classes/MainUI/Browser/AchievementsUnlocker.cs:11— `AchievementsUnlocker` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (availableAchievements, unlocked; e.g. `availableAchievements` at line 21). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: BlueprintAction ToyBox/Classes/MainUI/Browser/BlueprintAction.cs:37— `BlueprintAction` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (actionsForType; e.g. `actionsForType` at line 46). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: BlueprintActions ToyBox/Classes/MainUI/Browser/BlueprintAction.cs:114— `BlueprintActions` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (featureSelectionItems, parametrizedSelectionItems; e.g. `featureSelectionItems` at line 122). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: BlueprintListUI ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:20— `BlueprintListUI` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (hasRepeatableAction, maxActions, needsLayout, repeatCount, paramBPValueNames, ParamSelected; e.g. `hasRepeatableAction` at line 47). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: BuffExclusionEditor ToyBox/Classes/MainUI/Browser/BuffExclusionEditor.cs:10— `BuffExclusionEditor` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_buffExceptions, _defaultBuffExceptions, _allBuffs, _searchResults, _displayedBuffs, _showCurrentExceptions; e.g. `_buffExceptions` at line 33). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: Editor ToyBox/Classes/MainUI/Browser/Editor.cs:10— `Editor` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (editorsForType; e.g. `editorsForType` at line 28). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: FactsEditor ToyBox/Classes/MainUI/Browser/FactsEditor.cs:30— `FactsEditor` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_showTree, FeatureBrowserDict, BuffBrowserDict, AbilityBrowserDict; e.g. `_showTree` at line 333). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: SearchAndPick ToyBox/Classes/MainUI/Browser/SearchAndPick.cs:44— `SearchAndPick` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (hasRepeatableAction, maxActions, blueprints, needsRedoKeys, collationKeys, keyToDisplayName; e.g. `hasRepeatableAction` at line 173). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: DialogEditor ToyBox/Classes/MainUI/DialogEditor.cs:31— `DialogEditor` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (Visited; e.g. `Visited` at line 42). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: EnhancedInventory ToyBox/Classes/MainUI/EnhancedUI/EnhancedInventory.cs:19— `EnhancedInventory` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (m_area_load_handler; e.g. `m_area_load_handler` at line 68). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: GameSavesBrowser ToyBox/Classes/MainUI/EnhancedUI/GameSaves.cs:12— `GameSavesBrowser` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (nameEditState, _currentSaves, _allSaves; e.g. `nameEditState` at line 40). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: LootHelper ToyBox/Classes/MainUI/EnhancedUI/LootHelper.cs:31— `LootHelper` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (m_FakePlayerChest; e.g. `m_FakePlayerChest` at line 161). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: PhatLoot ToyBox/Classes/MainUI/EnhancedUI/PhatLoot.cs:15— `PhatLoot` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (searchText; e.g. `searchText` at line 174). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: EtudeChildrenDrawer ToyBox/Classes/MainUI/Etudes/EtudeChildrenDrawer.cs:12— `EtudeChildrenDrawer` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (newParentFromContestComand, newParentID; e.g. `newParentFromContestComand` at line 35). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: EtudesEditor ToyBox/Classes/MainUI/Etudes/EtudesEditor.cs:23— `EtudesEditor` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_areas, _parent, _selected, searchTextInput, searchText, _showOnlyFlagLikes; e.g. `_areas` at line 64). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: Main ToyBox/Classes/MainUI/Main.cs:38— `Main` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_resetRequested, _resetRequestTime, Settings, ModEntry, _modId, HarmonyInstance; e.g. `_resetRequested` at line 82). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: MulticlassPicker ToyBox/Classes/MainUI/MulticlassPicker.cs:12— `MulticlassPicker` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (areYouSure1, areYouSure2, areYouSure3; e.g. `areYouSure1` at line 250). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: PartyEditor ToyBox/Classes/MainUI/PartyEditor/ClassesEditor.cs:25— `PartyEditor` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (editMultiClass, multiclassEditCharacter, selectedCharacter, selectedSpellbook, selectedSpellbookLevel, charToAdd; e.g. `editMultiClass` at line 33). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: QuestEditor ToyBox/Classes/MainUI/QuestEditor.cs:66— `QuestEditor` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_selectedQuests; e.g. `_selectedQuests` at line 76). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
+ 5 more in this group — see findings.md.
IC1 · Incompleteness & stubs· Dead `#if false` region · ×30
Dead `#if false` region ToyBox/Classes/Infrastructure/Blueprints/BlueprintDataSource.cs:11— Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored.
Dead `#if false` region ToyBox/Classes/Infrastructure/TeleportWrath.cs:101— Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored.
Dead `#if false` region ToyBox/Classes/Infrastructure/UnitEntityDataUtils.cs:158— Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored.
Dead `#if false` region REDACTED:239— Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored.
Dead `#if false` region ToyBox/Classes/Infrastructure/WrathExtensions.cs:138— Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored.
Dead `#if false` region ToyBox/Classes/MainUI/ActionsWrath.cs:64— Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored.
Dead `#if false` region ToyBox/Classes/MainUI/BagOfTricks.cs:655— Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored.
Dead `#if false` region ToyBox/Classes/MainUI/Browser/SearchAndPick.cs:148— Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored.
Dead `#if false` region ToyBox/Classes/MainUI/Crusade/ArmiesEditor.cs:494— Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored.
Dead `#if false` region ToyBox/Classes/MainUI/DialogEditor.cs:150— Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored.
Dead `#if false` region ToyBox/Classes/MainUI/EnhancedUI/EnhancedInventoryController.cs:40— Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored.
Dead `#if false` region ToyBox/Classes/MainUI/EnhancedUI/EnhancedInventoryController.cs:176— Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored.
Dead `#if false` region ToyBox/Classes/MainUI/EnhancedUI/EnhancedInventoryController.cs:218— Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored.
Dead `#if false` region ToyBox/Classes/MainUI/EnhancedUI/ItemRarity.cs:136— Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored.
Dead `#if false` region ToyBox/Classes/MainUI/EnhancedUI/OnAreaLoad.cs:27— Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored.
Dead `#if false` region ToyBox/Classes/MainUI/EnhancedUI/PhatLoot.cs:37— Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored.
Dead `#if false` region ToyBox/Classes/MainUI/Etudes/EtudeChildrenDrawer.cs:62— Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored.
Dead `#if false` region ToyBox/Classes/MainUI/Etudes/EtudesEditor.cs:200— Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored.
Dead `#if false` region ToyBox/Classes/MainUI/Etudes/ReferenceGraph.cs:43— Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored.
Dead `#if false` region ToyBox/Classes/MainUI/LevelUp.cs:101— Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored.
Dead `#if false` region ToyBox/Classes/MainUI/LevelUp.cs:110— Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored.
Dead `#if false` region ToyBox/Classes/MainUI/LevelUp.cs:163— Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored.
Dead `#if false` region ToyBox/Classes/MainUI/Main.cs:55— Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored.
Dead `#if false` region ToyBox/Classes/MainUI/Main.cs:326— Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored.
Dead `#if false` region ToyBox/Classes/MainUI/PartyEditor/PartyEditor.cs:104— Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored.
TodoComment ToyBox/Classes/MainUI/ActionsWrath.cs:55— // TODO - do this right once I build the etude browser and understand this better — 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 ToyBox/Classes/MainUI/BagOfTricks.cs:727— // TODO: do we need this for RT? — 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 ToyBox/Classes/MainUI/BagOfTricks.cs:737— // TODO: is this right? — 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 ToyBox/Classes/MainUI/Browser/AchievementsUnlocker.cs:16— //TODO: Check in RT release version whether there is a good heuristic to check if an achievement is blocked on the platform — 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 ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:142— // TODO -don't show increase or decrease actions until we redo actions into a proper value editor that gives us Add/Remove and numeric item with the ability to show values. For now users can edit ranks in the Facts Editor — 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 ToyBox/Classes/MainUI/Browser/SearchAndPick.cs:385— // TODO -don't show increase or decrease actions until we redo actions into a proper value editor that gives us Add/Remove and numeric item with the ability to show values. For now users can edit ranks in the Facts Editor — 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 ToyBox/Classes/MainUI/Browser/BuffExclusionEditor.cs:211— // TODO: Very expensive; we should probably port all of this to Browser — 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 ToyBox/Classes/MainUI/Crusade/EventEditor.cs:66— //TODO: toggle to ignore specific restrictions — 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 ToyBox/Classes/MainUI/EnhancedUI/EnhancedInventory.cs:91— // TODO: bring this back once we implement this for RT — 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 ToyBox/Classes/MainUI/EnhancedUI/EnhancedUI.cs:141— // TODO: Update EnumHelper.ValidFilterCategories for RT — 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 ToyBox/Classes/MainUI/EnhancedUI/GameSaves.cs:54— // TODO: add refresh — 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 ToyBox/Classes/MainUI/Etudes/EtudesEditor.cs:30— // TODO: is this still the right root etude? — 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 ToyBox/Classes/MainUI/Main.cs:394— // TODO - Find out why the intiative tracker comes up when I do Game.ResetUI. The following kludge makes it go away — 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 ToyBox/Classes/MainUI/Main.cs:426— // Game.Instance.UI.GetCameraRig().TickRotate(); // Kludge - TODO: do something better... — 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 ToyBox/Classes/MainUI/PartyEditor/PartyEditor.cs:149— // TODO - understand the difference between ch.Progression and ch.Descriptor().Progression — 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 ToyBox/Classes/MainUI/PartyEditor/SpellsEditor.cs:137— // todo: why are there duplicates here? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ToyBox/Classes/Models/Settings.cs:226— // TODO - port this — 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 ToyBox/Classes/Models/Settings.cs:363— // TODO - implement — 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 ToyBox/Classes/Models/Settings.cs:504— // big switch - TODO - do we need this? — 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 ToyBox/Classes/MonkeyPatchin/BagOfPatches/ActionBar.cs:32— //rowCount += 1; // nudge for spell group ??? TODO - why? — 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 ToyBox/Classes/MonkeyPatchin/BagOfPatches/MovementWrath.cs:110— // TODO - can we get rid of the other map movement multipliers and do them all here? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ToyBox/Classes/MonkeyPatchin/EnhancedUI/LocalMap.cs:139— // Calculate a zoom factor based on info used previously to scale the Frame Block. In our new world we will center the Frame Block in middle of the ContentGroup and then pan the map behind it. TODO - make it rotate so that it matches exactly the view of the camera (Frame Block will always point up) — 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 ToyBox/Classes/MonkeyPatchin/EnhancedUI/LocalMap.cs:190— // TODO: Factor the above into a helper function and take zoom as a paremeter so we can call it to reset everything back to normal when we turn off Enhanced Map — 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 ToyBox/Classes/MonkeyPatchin/MoveThroughOthers.cs:8— // TODO - do we really need this? Someone requested it but I don't observe any movement restrictions — 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 ToyBox/Classes/MonkeyPatchin/Multiclass/LevelUP+Multiclass.cs:59— // TODO - this is from the mod but we need to figure out if max level 20 still makes sense with mythic levels — 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.
+ 3 more in this group — see findings.md.
X5 · Nullable reference types· Symbol treated as nullable, then dereferenced unguarded · ×28
Symbol treated as nullable, then dereferenced unguarded ToyBox/Classes/Infrastructure/Blueprints/BlueprintExtensions.cs:387— This method contradicts itself about `ch`: line 388 writes `ch?.Progression`, which says `ch` can be null, but line 387 then dereferences it directly as `ch.Descriptor` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `ch` truly cannot be null here, the `?.` is misleading. Settle it one way — test `ch` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ToyBox/Classes/Infrastructure/CasterHelpers.cs:163— This method contradicts itself about `unit`: line 161 writes `unit?.CharacterName`, which says `unit` can be null, but line 163 then dereferences it directly as `unit.Facts` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `unit` truly cannot be null here, the `?.` is misleading. Settle it one way — test `unit` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ToyBox/Classes/Infrastructure/CasterHelpers.cs:165— This method contradicts itself about `spellbook`: line 161 writes `spellbook?.`, which says `spellbook` can be null, but line 165 then dereferences it directly as `spellbook.Blueprint` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `spellbook` truly cannot be null here, the `?.` is misleading. Settle it one way — test `spellbook` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ToyBox/Classes/MainUI/ActionsWrath.cs:193— This method contradicts itself about `uiSettings`: line 192 writes `uiSettings?.CleanupSlots`, which says `uiSettings` can be null, but line 193 then dereferences it directly as `uiSettings.Dirty` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `uiSettings` truly cannot be null here, the `?.` is misleading. Settle it one way — test `uiSettings` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:105— This method contradicts itself about `ch`: line 106 writes `ch?.Progression`, which says `ch` can be null, but line 105 then dereferences it directly as `ch.Descriptor` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `ch` truly cannot be null here, the `?.` is misleading. Settle it one way — test `ch` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:132— This method contradicts itself about `ch`: line 130 writes `ch?.`, which says `ch` can be null, but line 132 then dereferences it directly as `ch.AddFeatureSelection` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `ch` truly cannot be null here, the `?.` is misleading. Settle it one way — test `ch` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:161— This method contradicts itself about `ch`: line 152 writes `ch?.Descriptor`, which says `ch` can be null, but line 161 then dereferences it directly as `ch.Descriptor` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `ch` truly cannot be null here, the `?.` is misleading. Settle it one way — test `ch` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ToyBox/Classes/MainUI/Browser/FactsEditor.cs:160— This method contradicts itself about `add`: line 154 writes `add?.canPerform`, which says `add` can be null, but line 160 then dereferences it directly as `add.BlueprintActionButton` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `add` truly cannot be null here, the `?.` is misleading. Settle it one way — test `add` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ToyBox/Classes/MainUI/Browser/FactsEditor.cs:157— This method contradicts itself about `remove`: line 155 writes `remove?.canPerform`, which says `remove` can be null, but line 157 then dereferences it directly as `remove.BlueprintActionButton` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `remove` truly cannot be null here, the `?.` is misleading. Settle it one way — test `remove` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ToyBox/Classes/MainUI/Crusade/EventEditor.cs:103— This method contradicts itself about `taskBlueprint`: line 102 assigns it with `as BlueprintKingdomProject`, which hands back null rather than throwing when the value is not a `BlueprintKingdomProject`, but line 103 then dereferences it directly as `taskBlueprint.MechanicalDescription` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `taskBlueprint` once before the first use and handle the null case, or cast with `(BlueprintKingdomProject)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ToyBox/Classes/MainUI/Dialog+NPCs.cs:211— This method contradicts itself about `objective`: line 210 writes `objective?.State`, which says `objective` can be null, but line 211 then dereferences it directly as `objective.titleColored` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `objective` truly cannot be null here, the `?.` is misleading. Settle it one way — test `objective` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ToyBox/Classes/MainUI/DialogEditor.cs:51— This method contradicts itself about `dialogController`: line 57 writes `dialogController?.`, which says `dialogController` can be null, but line 51 then dereferences it directly as `dialogController.CurrentCue` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `dialogController` truly cannot be null here, the `?.` is misleading. Settle it one way — test `dialogController` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ToyBox/Classes/MainUI/EnhancedUI/ItemRarity.cs:180— This method contradicts itself about `markerVm`: line 179 assigns it with `as LocalMapCommonMarkerVM`, which hands back null rather than throwing when the value is not a `LocalMapCommonMarkerVM`, but line 180 then dereferences it directly as `markerVm.m_Marker` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `markerVm` once before the first use and handle the null case, or cast with `(LocalMapCommonMarkerVM)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ToyBox/Classes/MainUI/EnhancedUI/ItemRarity.cs:183— This method contradicts itself about `MOV`: line 182 assigns it with `as MapObjectView`, which hands back null rather than throwing when the value is not a `MapObjectView`, but line 183 then dereferences it directly as `MOV.Data` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `MOV` once before the first use and handle the null case, or cast with `(MapObjectView)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ToyBox/Classes/MainUI/MulticlassPicker.cs:77— This method contradicts itself about `classes`: line 75 writes `classes?.Count`, which says `classes` can be null, but line 77 then dereferences it directly as `classes.Count` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `classes` truly cannot be null here, the `?.` is misleading. Settle it one way — test `classes` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ToyBox/Classes/MainUI/PartyEditor/StatsEditor.cs:234— This method contradicts itself about `text`: line 237 writes `text?.`, which says `text` can be null, but line 234 then dereferences it directly as `text.Length` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `text` truly cannot be null here, the `?.` is misleading. Settle it one way — test `text` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ToyBox/Classes/MainUI/PatchTool/Infrastructure/PatchOperation.cs:125— This method contradicts itself about `tmpList`: line 123 assigns it with `as IList`, which hands back null rather than throwing when the value is not a `IList`, but line 125 then dereferences it directly as `tmpList.Add` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `tmpList` once before the first use and handle the null case, or cast with `(IList)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ToyBox/Classes/MainUI/PatchTool/Infrastructure/PatchOperation.cs:243— This method contradicts itself about `bpRef`: line 242 assigns it with `as BlueprintReferenceBase`, which hands back null rather than throwing when the value is not a `BlueprintReferenceBase`, but line 243 then dereferences it directly as `bpRef.ReadGuidFromJson` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `bpRef` once before the first use and handle the null case, or cast with `(BlueprintReferenceBase)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ToyBox/Classes/MainUI/PatchTool/UI/PatchToolTabUI.cs:445— This method contradicts itself about `array`: line 444 assigns it with `as Array`, which hands back null rather than throwing when the value is not a `Array`, but line 445 then dereferences it directly as `array.Length` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `array` once before the first use and handle the null case, or cast with `(Array)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ToyBox/Classes/MainUI/PatchTool/UI/PatchToolTabUI.cs:453— This method contradicts itself about `list2`: line 452 assigns it with `as IEnumerable<object>`, which hands back null rather than throwing when the value is not a `IEnumerable<object>`, but line 453 then dereferences it directly as `list2.Count` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `list2` once before the first use and handle the null case, or cast with `(IEnumerable<object>)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ToyBox/Classes/MonkeyPatchin/BagOfPatches/ActionBar.cs:76— This method contradicts itself about `rectTransform`: line 74 assigns it with `as RectTransform`, which hands back null rather than throwing when the value is not a `RectTransform`, but line 76 then dereferences it directly as `rectTransform.anchorMin` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `rectTransform` once before the first use and handle the null case, or cast with `(RectTransform)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ToyBox/Classes/MonkeyPatchin/BagOfPatches/NewChar.cs:33— This method contradicts itself about `__instance`: line 31 writes `__instance?.IsEmployee`, which says `__instance` can be null, but line 33 then dereferences it directly as `__instance.IsFirstCharacterLevel` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `__instance` truly cannot be null here, the `?.` is misleading. Settle it one way — test `__instance` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ToyBox/Classes/MonkeyPatchin/BagOfPatches/TweaksWrath.cs:180— This method contradicts itself about `___m_KingdomEventView`: line 181 writes `___m_KingdomEventView?.Task`, which says `___m_KingdomEventView` can be null, but line 180 then dereferences it directly as `___m_KingdomEventView.Blueprint` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `___m_KingdomEventView` truly cannot be null here, the `?.` is misleading. Settle it one way — test `___m_KingdomEventView` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ToyBox/Classes/MonkeyPatchin/BagOfPatches/TweaksWrath.cs:677— This method contradicts itself about `spell`: line 678 writes `spell?.Blueprint`, which says `spell` can be null, but line 677 then dereferences it directly as `spell.SourceItemUsableBlueprint` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `spell` truly cannot be null here, the `?.` is misleading. Settle it one way — test `spell` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ToyBox/Classes/MonkeyPatchin/HighlightObjectToggle.cs:146— This method contradicts itself about `view`: line 157 writes `view?.transform`, which says `view` can be null, but line 146 then dereferences it directly as `view.transform` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `view` truly cannot be null here, the `?.` is misleading. Settle it one way — test `view` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
MethodTooLong: BagOfTricks.OnGUI ToyBox/Classes/MainUI/BagOfTricks.cs:126— MethodTooLong — OnGUI runs 528 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 428 over it, 5.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PartyEditor.OnStatsGUI ToyBox/Classes/MainUI/PartyEditor/StatsEditor.cs:108— MethodTooLong — OnStatsGUI runs 289 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 189 over it, 2.89× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SearchAndPick.OnGUI ToyBox/Classes/MainUI/Browser/SearchAndPick.cs:179— MethodTooLong — OnGUI runs 230 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 130 over it, 2.30× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ArmiesEditor.ArmiesGUI ToyBox/Classes/MainUI/Crusade/ArmiesEditor.cs:325— MethodTooLong — ArmiesGUI runs 222 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 122 over it, 2.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PatchToolTabUI.FieldGUI ToyBox/Classes/MainUI/PatchTool/UI/PatchToolTabUI.cs:250— MethodTooLong — FieldGUI runs 218 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 118 over it, 2.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: BlueprintListUI.OnGUI ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:32— MethodTooLong — OnGUI runs 204 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 104 over it, 2.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: EnhancedUI.OnGUI ToyBox/Classes/MainUI/EnhancedUI/EnhancedUI.cs:21— MethodTooLong — OnGUI runs 203 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 103 over it, 2.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: BlueprintActions.InitializeActionsWrath ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:49— MethodTooLong — InitializeActionsWrath runs 189 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 89 over it, 1.89× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PatchOperation.Apply ToyBox/Classes/MainUI/PatchTool/Infrastructure/PatchOperation.cs:65— MethodTooLong — Apply runs 179 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 79 over it, 1.79× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ArmiesEditor.OnGUI ToyBox/Classes/MainUI/Crusade/ArmiesEditor.cs:115— MethodTooLong — OnGUI runs 174 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 74 over it, 1.74× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PhatLoot.OnGUI ToyBox/Classes/MainUI/EnhancedUI/PhatLoot.cs:35— MethodTooLong — OnGUI runs 168 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 68 over it, 1.68× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: EnchantmentEditor.OnGUI ToyBox/Classes/MainUI/EnchantmentEditor.cs:51— MethodTooLong — OnGUI runs 157 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 57 over it, 1.57× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PartyEditor.OnGUI ToyBox/Classes/MainUI/PartyEditor/PartyEditor.cs:112— MethodTooLong — OnGUI runs 154 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 54 over it, 1.54× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PartyEditor.OnSpellsGUI ToyBox/Classes/MainUI/PartyEditor/SpellsEditor.cs:23— MethodTooLong — OnSpellsGUI runs 145 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 45 over it, 1.45× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CrusadeEditor.OnGUI ToyBox/Classes/MainUI/Crusade/CrusadeEditor.cs:19— MethodTooLong — OnGUI runs 143 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 43 over it, 1.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PartyEditor.OnClassesGUI ToyBox/Classes/MainUI/PartyEditor/ClassesEditor.cs:26— MethodTooLong — OnClassesGUI runs 141 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 41 over it, 1.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: LevelUp.OnGUI ToyBox/Classes/MainUI/LevelUp.cs:12— MethodTooLong — OnGUI runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: FactsEditor.BlueprintDetailGUI ToyBox/Classes/MainUI/Browser/FactsEditor.cs:177— MethodTooLong — BlueprintDetailGUI runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: MulticlassPicker.PickerRow ToyBox/Classes/MainUI/MulticlassPicker.cs:65— MethodTooLong — PickerRow runs 118 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 18 over it, 1.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: EtudesEditor.DrawEtude ToyBox/Classes/MainUI/Etudes/EtudesEditor.cs:192— MethodTooLong — DrawEtude runs 116 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 16 over it, 1.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: FactsEditor.BlueprintRowGUI ToyBox/Classes/MainUI/Browser/FactsEditor.cs:41— MethodTooLong — BlueprintRowGUI runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Browser.Update ToyBox/Classes/ModKit/UI/UI+Browser.cs:253— MethodTooLong — Update runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: QuestEditor.OnGUI ToyBox/Classes/MainUI/QuestEditor.cs:72— MethodTooLong — OnGUI runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Browser.OnGUI ToyBox/Classes/ModKit/UI/UI+Browser.cs:123— MethodTooLong — OnGUI runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Dead code: HoverHandler ToyBox/Classes/Infrastructure/Teleport.cs:78— NamedType HoverHandler — Roslyn's SymbolFinder walked every project the solution loads, including ToyBox, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: RemoveSpellCount ToyBox/Classes/MainUI/EnhancedUI/EnhancedSpellbookController.cs:275— Method RemoveSpellCount — Roslyn's SymbolFinder walked every project the solution loads, including ToyBox, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: OpenCloseParents ToyBox/Classes/MainUI/Etudes/EtudesEditor.cs:585— Method OpenCloseParents — Roslyn's SymbolFinder walked every project the solution loads, including ToyBox, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: Dump ToyBox/Classes/MainUI/Main.cs:246— Method Dump — Roslyn's SymbolFinder walked every project the solution loads, including ToyBox, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: IAlignmentShiftProvider.AlignmentShift ToyBox/Classes/MainUI/PartyEditor/StatsEditor.cs:26— Property IAlignmentShiftProvider.AlignmentShift — Roslyn's SymbolFinder walked every project the solution loads, including ToyBox, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: ActionBar ToyBox/Classes/MonkeyPatchin/BagOfPatches/ActionBar.cs:17— NamedType ActionBar — Roslyn's SymbolFinder walked every project the solution loads, including ToyBox, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: NoFriendlyFire ToyBox/Classes/MonkeyPatchin/BagOfPatches/Combat/NoFriendlyFire.cs:26— NamedType NoFriendlyFire — Roslyn's SymbolFinder walked every project the solution loads, including ToyBox, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: Development ToyBox/Classes/MonkeyPatchin/BagOfPatches/DevelopmentWrath.cs:22— NamedType Development — Roslyn's SymbolFinder walked every project the solution loads, including ToyBox, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: Infinites ToyBox/Classes/MonkeyPatchin/BagOfPatches/Limits/Infinites.cs:24— NamedType Infinites — Roslyn's SymbolFinder walked every project the solution loads, including ToyBox, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: MetamagicPatches ToyBox/Classes/MonkeyPatchin/BagOfPatches/Limits/Metamagic.cs:22— NamedType MetamagicPatches — Roslyn's SymbolFinder walked every project the solution loads, including ToyBox, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: Unrestricted ToyBox/Classes/MonkeyPatchin/BagOfPatches/Limits/Unrestricted.cs:20— NamedType Unrestricted — Roslyn's SymbolFinder walked every project the solution loads, including ToyBox, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: Movement ToyBox/Classes/MonkeyPatchin/BagOfPatches/MovementWrath.cs:22— NamedType Movement — Roslyn's SymbolFinder walked every project the solution loads, including ToyBox, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: Multipliers ToyBox/Classes/MonkeyPatchin/BagOfPatches/Multipliers.cs:35— NamedType Multipliers — Roslyn's SymbolFinder walked every project the solution loads, including ToyBox, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: NewChar ToyBox/Classes/MonkeyPatchin/BagOfPatches/NewChar.cs:20— NamedType NewChar — Roslyn's SymbolFinder walked every project the solution loads, including ToyBox, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: Pets ToyBox/Classes/MonkeyPatchin/BagOfPatches/Pets.cs:12— NamedType Pets — Roslyn's SymbolFinder walked every project the solution loads, including ToyBox, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: Selectors ToyBox/Classes/MonkeyPatchin/BagOfPatches/Selectors.cs:14— NamedType Selectors — Roslyn's SymbolFinder walked every project the solution loads, including ToyBox, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: Summons ToyBox/Classes/MonkeyPatchin/BagOfPatches/Summons.cs:33— NamedType Summons — Roslyn's SymbolFinder walked every project the solution loads, including ToyBox, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: CustomEnchantmentStackingFix ToyBox/Classes/MonkeyPatchin/CustomEnchantmentStackingFix.cs:12— NamedType CustomEnchantmentStackingFix — Roslyn's SymbolFinder walked every project the solution loads, including ToyBox, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: Prepare ToyBox/Classes/MonkeyPatchin/HighlightObjectToggle.cs:27— Method Prepare — Roslyn's SymbolFinder walked every project the solution loads, including ToyBox, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: FirstReplacement ToyBox/Classes/MonkeyPatchin/Multiclass/Archetypes.cs:81— Method FirstReplacement — Roslyn's SymbolFinder walked every project the solution loads, including ToyBox, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: AllowProceed ToyBox/Classes/MonkeyPatchin/Multiclass/LevelUP+Multiclass.cs:77— Method AllowProceed — Roslyn's SymbolFinder walked every project the solution loads, including ToyBox, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: PartyView ToyBox/Classes/MonkeyPatchin/PartyView.cs:24— NamedType PartyView — Roslyn's SymbolFinder walked every project the solution loads, including ToyBox, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: Prepare ToyBox/Classes/MonkeyPatchin/PreviewManagerWrath.cs:388— Method Prepare — Roslyn's SymbolFinder walked every project the solution loads, including ToyBox, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Swallowed exception (empty catch) ToyBox/Classes/Infrastructure/Performance.cs:64— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) ToyBox/Classes/MainUI/ActionsWrath.cs:158— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) ToyBox/Classes/MainUI/Browser/SearchAndPick.cs:450— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) ToyBox/Classes/MainUI/Crusade/ArmiesEditor.cs:665— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) ToyBox/Classes/MainUI/EnhancedUI/ItemRarity.cs:126— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) ToyBox/Classes/MainUI/EnhancedUI/PhatLoot.cs:164— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) ToyBox/Classes/MainUI/PartyEditor/StatsEditor.cs:501— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) ToyBox/Classes/MainUI/PatchTool/UI/PatchToolTabUI.cs:350— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) ToyBox/Classes/MainUI/PatchTool/Utils/InstantiationHelper.cs:82— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) ToyBox/Classes/ModKit/DataViewer/ReflectionTreeView.cs:359— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) ToyBox/Classes/MonkeyPatchin/BagOfPatches/Summons.cs:64— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) ToyBox/Classes/MonkeyPatchin/EnhancedUI/InventoryStashVM.cs:42— 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.
FixmeComment ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:49— // FIXME - perf bottleneck — 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.
FixmeComment ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:107— // FIXME - perf bottleneck — 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.
FixmeComment ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:110— // FIXME - perf bottleneck — 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.
FixmeComment ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:128— // FIXME - perf bottleneck — 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.
FixmeComment ToyBox/Classes/MainUI/Browser/SearchAndPick.cs:321— // FIXME - perf bottleneck — 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.
FixmeComment ToyBox/Classes/MainUI/Browser/SearchAndPick.cs:371— // FIXME - perf bottleneck — 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.
FixmeComment ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:88— // FIXME - horrible perf bottleneck — 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.
FixmeComment ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:96— // FIXME - horrible perf bottleneck — 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.
FixmeComment ToyBox/Classes/MainUI/Browser/SearchAndPick.cs:323— // FIXME - horrible perf bottleneck — 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.
FixmeComment ToyBox/Classes/MainUI/EnhancedUI/OnAreaLoad.cs:89— // controller.Awake(); // FIXME - why do I have to call this? What is the proper way to get this controller installed and get awake called by the framework and not by Marria — 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.
FixmeComment ToyBox/Classes/MonkeyPatchin/BagOfPatches/Multipliers.cs:141— // FIXME - why did Bag of Tricks do this? — 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.
Stateful shared instance: BlueprintLoader ToyBox/Classes/Infrastructure/Blueprints/BlueprintLoader.cs:31— `BlueprintLoader` keeps one instance of itself in the static `loader`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (bpsByType, closeCount, _startedLoadingShards, _callback, _workerTasks, toLoad; e.g. `bpsByType` at line 100).
Stateful shared instance: Browser ToyBox/Classes/ModKit/UI/UI+Browser.cs:47— `Browser` is not registered, but `AchievementsUnlocker` creates it and keeps it in the static `AchievementBrowser`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (searchQueryChanged, _needsRedoCollation, _collationFinished, needsReloadData, prevCollationKey, _searchText; e.g. `searchQueryChanged` at line 91).
Stateful shared instance: FeaturesTreeEditor ToyBox/Classes/MainUI/PartyEditor/FeaturesTreeEditor.cs:16— `FeaturesTreeEditor` is not registered, but `FactsEditor` creates it and keeps it in the static `treeEditor`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_buttonStyle, _selectedCharacter, _featuresTree; e.g. `_buttonStyle` at line 34).
Stateful shared instance: RemappableInt ToyBox/Classes/MainUI/EnhancedUI/RemappableInt.cs:4— `RemappableInt` is not registered, but `EnhancedInventory` creates it and keeps it in the static `FilterMapper`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (m_mapping; e.g. `m_mapping` at line 8).
Stateful shared instance: EtudesTreeModel ToyBox/Classes/MainUI/Etudes/EtudeTreeModel.cs:15— `EtudesTreeModel` keeps one instance of itself in the static `_instance`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (etudes, loadedEtudes, conflictingGroups; e.g. `etudes` at line 32).
Stateful shared instance: PatchToolTabUI ToyBox/Classes/MainUI/PatchTool/UI/PatchToolTabUI.cs:23— `PatchToolTabUI` is not registered, but `PatchToolUIManager` creates it and keeps it in the static `instances`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (CurrentState, Target, showBlueprintPicker, visited, showPatchManager, showFieldsEditor; e.g. `CurrentState` at line 45).
Stateful shared instance: ReflectionSearch ToyBox/Classes/ModKit/DataViewer/ReflectionSearch.cs:67— `ReflectionSearch` keeps one instance of itself in the static `_shared`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (isSearching, _cancellationTokenSource; e.g. `isSearching` at line 102).
Stateful shared instance: ReflectionTreeView ToyBox/Classes/ModKit/DataViewer/ReflectionTreeView.cs:14— `ReflectionTreeView` keeps one instance of itself in the static `ExpandedObjects`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (visitCount, searchDepth, searchBreadth, _tree, _buttonStyle, _valueStyle; e.g. `visitCount` at line 70).
Stateful shared instance: BlueprintPickerGUI ToyBox/Classes/MainUI/PatchTool/UI/BlueprintPickerGUI.cs:16— `BlueprintPickerGUI` is not registered, but the singleton `PatchToolTabUI` creates it and keeps it in `pickerGUIs`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (showBrowserPicker, category, categorySearchString, bps, showBrowser, pickerText; e.g. `showBrowserPicker` at line 30).
Stateful shared instance: PatchState ToyBox/Classes/MainUI/PatchTool/Infrastructure/PatchState.cs:13— `PatchState` is not registered, but the singleton `PatchToolTabUI` creates it and keeps it in `CurrentState`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (Blueprint, Operations, IsDirty; e.g. `Blueprint` at line 32).
Duplicated block (6 lines × 2) ToyBox/Classes/MainUI/MulticlassPicker.cs:112— ToyBox/Classes/MainUI/MulticlassPicker.cs:112-117 | ToyBox/Classes/MainUI/MulticlassPicker.cs:169-174 — both copies are in the same file, so extract the 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) ToyBox/Classes/MainUI/QuestEditor.cs:127— ToyBox/Classes/MainUI/QuestEditor.cs:127-132 | ToyBox/Classes/MainUI/QuestEditor.cs:174-179 — both copies are in the same file, so extract the 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 `ToyBox/Classes/MainUI/QuestEditor.cs:127` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ToyBox/Classes/MainUI/QuestEditor.cs:172` calls `Space` and `ToyBox/Classes/MainUI/QuestEditor.cs:125` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) ToyBox/Classes/MainUI/Dialog+NPCs.cs:235— ToyBox/Classes/MainUI/Dialog+NPCs.cs:235-240 | ToyBox/Classes/MainUI/Dialog+NPCs.cs:243-248 — both copies are in the same file, so extract the 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 `ToyBox/Classes/MainUI/Dialog+NPCs.cs:235` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) ToyBox/Classes/ModKit/UI/UI+Browser.cs:280— ToyBox/Classes/ModKit/UI/UI+Browser.cs:280-285 | ToyBox/Classes/ModKit/UI/UI+Browser.cs:485-490 — both copies are in the same file, so extract the 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 `ToyBox/Classes/ModKit/UI/UI+Browser.cs:280` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) ToyBox/Classes/ModKit/UI/UI+Pickers.cs:70— ToyBox/Classes/ModKit/UI/UI+Pickers.cs:70-75 | ToyBox/Classes/ModKit/UI/UI+Pickers.cs:85-90 — both copies are in the same file, so extract the 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 `ToyBox/Classes/ModKit/UI/UI+Pickers.cs:70` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:73— ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:73-78 | ToyBox/Classes/MainUI/Browser/SearchAndPick.cs:309-314 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6 lines × 2) ToyBox/Classes/MainUI/Dialog+NPCs.cs:198— ToyBox/Classes/MainUI/Dialog+NPCs.cs:198-203 | ToyBox/Classes/MainUI/Dialog+NPCs.cs:229-234 — both copies are in the same file, so extract the 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 `ToyBox/Classes/MainUI/Dialog+NPCs.cs:198` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:116— ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:116-121 | ToyBox/Classes/MainUI/Browser/SearchAndPick.cs:359-364 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:310— ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:310-316 | ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:347-353 — both copies are in the same file, so extract the 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 `ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:310` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) ToyBox/Classes/Infrastructure/Blueprints/BlueprintExtensions.cs:74— ToyBox/Classes/Infrastructure/Blueprints/BlueprintExtensions.cs:74-80 | ToyBox/Classes/Infrastructure/Blueprints/BlueprintExtensions.cs:88-94 — both copies are in the same file, so extract the 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 `ToyBox/Classes/Infrastructure/Blueprints/BlueprintExtensions.cs:74` 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 `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 2) ToyBox/Classes/MainUI/BagOfTricks.cs:456— ToyBox/Classes/MainUI/BagOfTricks.cs:456-462 | ToyBox/Classes/MainUI/EnhancedUI/EnhancedUI.cs:47-53 — 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 `ToyBox/Classes/MainUI/BagOfTricks.cs:456` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (7 lines × 2) ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:86— ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:86-92 | ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.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.
Duplicated block (7 lines × 2) ToyBox/Classes/MainUI/PartyEditor/StatsEditor.cs:149— ToyBox/Classes/MainUI/PartyEditor/StatsEditor.cs:149-155 | ToyBox/Classes/MainUI/PartyEditor/StatsEditor.cs:191-197 — both copies are in the same file, so extract the 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 `ToyBox/Classes/MainUI/PartyEditor/StatsEditor.cs:149` 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) ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:218— ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:218-224 | ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:255-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. Read the line range as the matched WINDOW rather than a finished unit: at `ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:218` 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) ToyBox/Classes/MainUI/PartyEditor/StatsEditor.cs:68— ToyBox/Classes/MainUI/PartyEditor/StatsEditor.cs:68-74 | ToyBox/Classes/MainUI/PartyEditor/StatsEditor.cs:92-98 — both copies are in the same file, so extract the 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 `ToyBox/Classes/MainUI/PartyEditor/StatsEditor.cs:68` 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.
ClassTooLong: PartyEditor ToyBox/Classes/MainUI/PartyEditor/PartyEditor.cs— ClassTooLong — 906 significant lines (blank, comment-only and punctuation-only lines excluded), 12 methods, declared across 4 files: PartyEditor/PartyEditor.cs (5), PartyEditor/StatsEditor.cs (4), PartyEditor/SpellsEditor.cs (2), PartyEditor/ClassesEditor.cs (1). The bar is 400 significant lines; this is 506 over it, 2.27× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
ClassTooLong: BagOfTricks ToyBox/Classes/MainUI/BagOfTricks.cs— ClassTooLong — 598 significant lines (blank, comment-only and punctuation-only lines excluded), 3 methods. The bar is 400 significant lines; this is 198 over it, 1.50× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
ClassTooLong: ArmiesEditor ToyBox/Classes/MainUI/Crusade/ArmiesEditor.cs— ClassTooLong — 505 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. The bar is 400 significant lines; this is 105 over it, 1.26× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
ClassTooLong: Settings ToyBox/Classes/Models/Settings.cs— ClassTooLong — 453 significant lines (blank, comment-only and punctuation-only lines excluded), 4 methods. The bar is 400 significant lines; this is 53 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: EnchantmentEditor ToyBox/Classes/MainUI/EnchantmentEditor.cs— ClassTooLong — 437 significant lines (blank, comment-only and punctuation-only lines excluded), 17 methods. The bar is 400 significant lines; this is 37 over it, 1.09× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
ClassTooLong: PatchToolTabUI ToyBox/Classes/MainUI/PatchTool/UI/PatchToolTabUI.cs— ClassTooLong — 431 significant lines (blank, comment-only and punctuation-only lines excluded), 10 methods. The bar is 400 significant lines; this is 31 over it, 1.08× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Swallowed exception (caught, then discarded) ToyBox/Classes/MainUI/EnchantmentEditor.cs:608— `catch` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) ToyBox/Classes/ModKit/DataViewer/ReflectionTree.cs:551— `catch` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) ToyBox/Classes/ModKit/DataViewer/ReflectionTree.cs:584— `catch` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) ToyBox/Classes/ModKit/DataViewer/ReflectionTree.cs:617— `catch` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) ToyBox/Classes/MonkeyPatchin/BagOfPatches/DevelopmentWrath.cs:81— `catch` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) ToyBox/Classes/MonkeyPatchin/BagOfPatches/TweaksWrath.cs:679— `catch` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
FileTooLong: BagOfPatches/MiscWrath.cs ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs— FileTooLong — 626 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 126 over it, 1.25× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: MainUI/BagOfTricks.cs ToyBox/Classes/MainUI/BagOfTricks.cs— FileTooLong — 624 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 124 over it, 1.25× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: BagOfPatches/TweaksWrath.cs ToyBox/Classes/MonkeyPatchin/BagOfPatches/TweaksWrath.cs— FileTooLong — 592 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 92 over it, 1.18× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Crusade/ArmiesEditor.cs ToyBox/Classes/MainUI/Crusade/ArmiesEditor.cs— FileTooLong — 524 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 24 over it, 1.05× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Models/Settings.cs ToyBox/Classes/Models/Settings.cs— FileTooLong — 504 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 4 over it, 1.01× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
Duplicated block (7 lines × 3) ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:200— ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:200-206 | ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:217-223 | ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:237-243 — 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 `ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:200` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 3) ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:75— ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:75-81 | ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:97-103 | ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:122-128 — 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 `ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:75` 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 × 3) ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:76— ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:76-82 | ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:86-92 | ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:98-104 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7 lines × 3) ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:86— ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:86-92 | ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:98-104 | ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:110-116 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:109` calls `Count` and `ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:85` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 3) ToyBox/Classes/MainUI/PatchTool/Infrastructure/PatchOperation.cs:104— ToyBox/Classes/MainUI/PatchTool/Infrastructure/PatchOperation.cs:104-110 | ToyBox/Classes/MainUI/PatchTool/Infrastructure/PatchOperation.cs:143-149 | ToyBox/Classes/MainUI/PatchTool/Infrastructure/PatchOperation.cs:180-186 — 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 `ToyBox/Classes/MainUI/PatchTool/Infrastructure/PatchOperation.cs:104` 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) ToyBox/Classes/MainUI/BagOfTricks.cs:421— ToyBox/Classes/MainUI/BagOfTricks.cs:421-428 | ToyBox/Classes/MainUI/EnhancedUI/EnhancedUI.cs:67-74 — 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 `ToyBox/Classes/MainUI/BagOfTricks.cs:421` 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) ToyBox/Classes/ModKit/UI/UI+Pickers.cs:16— ToyBox/Classes/ModKit/UI/UI+Pickers.cs:16-23 | ToyBox/Classes/ModKit/UI/UI+Pickers.cs:35-42 — both copies are in the same file, so extract the 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) ToyBox/Classes/ModKit/UI/UI+Pickers.cs:47— ToyBox/Classes/ModKit/UI/UI+Pickers.cs:47-54 | ToyBox/Classes/ModKit/UI/UI+Pickers.cs:59-66 — both copies are in the same file, so extract the 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) REDACTED:116— REDACTED:116-123 | REDACTED:128-135 — both copies are in the same file, so extract the 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 first that the copies are not typed on the same thing: the declarations holding them bind `v` to `this int` in one and `this float` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (8 lines × 2) ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:166— ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:166-173 | ToyBox/Classes/MainUI/Browser/SearchAndPick.cs:416-423 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:166` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:174` calls `Add` and `ToyBox/Classes/MainUI/Browser/SearchAndPick.cs:424` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) ToyBox/Classes/MainUI/PartyEditor/StatsEditor.cs:392— ToyBox/Classes/MainUI/PartyEditor/StatsEditor.cs:392-396 | ToyBox/Classes/MainUI/PartyEditor/StatsEditor.cs:410-414 — both copies are in the same file, so extract the 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 `ToyBox/Classes/MainUI/PartyEditor/StatsEditor.cs:392` 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) ToyBox/Classes/MainUI/ActionsWrath.cs:248— ToyBox/Classes/MainUI/ActionsWrath.cs:248-252 | ToyBox/Classes/MainUI/ActionsWrath.cs:267-271 — both copies are in the same file, so extract the 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 `ToyBox/Classes/MainUI/ActionsWrath.cs:248` 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) ToyBox/Classes/MonkeyPatchin/EnhancedUI/LootWrath.cs:168— ToyBox/Classes/MonkeyPatchin/EnhancedUI/LootWrath.cs:168-172 | ToyBox/Classes/MonkeyPatchin/EnhancedUI/LootWrath.cs:185-189 — both copies are in the same file, so extract the 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 `ToyBox/Classes/MonkeyPatchin/EnhancedUI/LootWrath.cs:168` 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) ToyBox/Classes/MonkeyPatchin/Multiclass/MulticlassMod.cs:98— ToyBox/Classes/MonkeyPatchin/Multiclass/MulticlassMod.cs:98-102 | ToyBox/Classes/MonkeyPatchin/Multiclass/MulticlassMod.cs:116-120 — both copies are in the same file, so extract the 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 first that the copies are not typed on the same thing: the declarations holding them bind `ch` to `this UnitEntityData` in one and `this UnitDescriptor` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (5 lines × 2) ToyBox/Classes/MainUI/EnhancedUI/LootHelper.cs:76— ToyBox/Classes/MainUI/EnhancedUI/LootHelper.cs:76-80 | ToyBox/Classes/MainUI/EnhancedUI/LootHelper.cs:98-102 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Unfinished stub — throws NotImplementedException ToyBox/Classes/Infrastructure/Teleport.cs:85— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException ToyBox/Classes/Infrastructure/UIWidgetHelpers.cs:53— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException ToyBox/Classes/Infrastructure/UIWidgetHelpers.cs:54— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException ToyBox/Classes/ModKit/DataViewer/ReflectionTree.cs:481— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException ToyBox/Classes/ModKit/Utility/Extensions/CodeInstructionExtensions.cs:317— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Duplicated block (9 lines × 2) ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:197— ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:197-205 | ToyBox/Classes/MainUI/Browser/SearchAndPick.cs:453-461 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:197` 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) ToyBox/Classes/MainUI/Crusade/ArmiesEditor.cs:582— ToyBox/Classes/MainUI/Crusade/ArmiesEditor.cs:582-590 | ToyBox/Classes/MainUI/Crusade/ArmiesEditor.cs:592-600 — both copies are in the same file, so extract the 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 `ToyBox/Classes/MainUI/Crusade/ArmiesEditor.cs:582` 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) ToyBox/Classes/MonkeyPatchin/EnhancedUI/LocalMap.cs:352— ToyBox/Classes/MonkeyPatchin/EnhancedUI/LocalMap.cs:352-360 | ToyBox/Classes/MonkeyPatchin/EnhancedUI/LocalMap.cs:365-373 — both copies are in the same file, so extract the 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 `ToyBox/Classes/MonkeyPatchin/EnhancedUI/LocalMap.cs:352` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `ToyBox/Classes/MonkeyPatchin/EnhancedUI/LocalMap.cs:376` calls `HarmonyPatch` and `ToyBox/Classes/MonkeyPatchin/EnhancedUI/LocalMap.cs:361` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) ToyBox/Classes/Infrastructure/Blueprints/BlueprintExtensions.cs:122— ToyBox/Classes/Infrastructure/Blueprints/BlueprintExtensions.cs:122-130 | ToyBox/Classes/Infrastructure/Blueprints/BlueprintExtensions.cs:167-175 — both copies are in the same file, so extract the 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 `ToyBox/Classes/Infrastructure/Blueprints/BlueprintExtensions.cs:122` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Change coupling: BraaainzEditor.cs ↔ FactsEditor.cs ToyBox/Classes/MainUI/BraaainzEditor.cs:1— `ToyBox/Classes/MainUI/BraaainzEditor.cs` and `ToyBox/Classes/MainUI/Browser/FactsEditor.cs` change together 60% of the time (9 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `4ea6714c` Impl (at that commit the files were still `ToyBox/classes/MainUI/BraaainzEditor.cs` and `ToyBox/classes/MainUI/Browser/FactsEditor.cs`); `4ceddb87` Search as you type option (#1039) (at that commit the files were still `ToyBox/classes/MainUI/BraaainzEditor.cs` and `ToyBox/classes/MainUI/Browser/FactsEditor.cs`); `97cf1642` added basic saves tab (at that commit the files were still `ToyBox/classes/MainUI/BraaainzEditor.cs` and `ToyBox/classes/MainUI/Browser/FactsEditor.cs`) — run `git show` on any of them.
Change coupling: BlueprintListUI.cs ↔ SearchAndPick.cs ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:1— `ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs` and `ToyBox/Classes/MainUI/Browser/SearchAndPick.cs` change together 59% of the time (34 of the 58 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 34 shared commits counted here, the most recent 3 are `4a2dffcb` Fix Skill Point Cap; `a77d7905` Search 'n Pick now displays localized names (if available) and allows… (at that commit the files were still `ToyBox/classes/MainUI/Browser/BlueprintListUI.cs` and `ToyBox/classes/MainUI/Browser/SearchAndPick.cs`); `afe838d3` Search 'n Pick: Fixed crasher when you select categories that have no… (at that commit the files were still `ToyBox/classes/MainUI/Browser/BlueprintListUI.cs` and `ToyBox/classes/MainUI/Browser/SearchAndPick.cs`) — run `git show` on any of them.
Change coupling: BraaainzEditor.cs ↔ SpellsEditor.cs ToyBox/Classes/MainUI/BraaainzEditor.cs:1— `ToyBox/Classes/MainUI/BraaainzEditor.cs` and `ToyBox/Classes/MainUI/PartyEditor/SpellsEditor.cs` change together 53% of the time (8 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `4ea6714c` Impl (at that commit the files were still `ToyBox/classes/MainUI/BraaainzEditor.cs` and `ToyBox/classes/MainUI/PartyEditor/SpellsEditor.cs`); `4ceddb87` Search as you type option (#1039) (at that commit the files were still `ToyBox/classes/MainUI/BraaainzEditor.cs` and `ToyBox/classes/MainUI/PartyEditor/SpellsEditor.cs`); `97cf1642` added basic saves tab (at that commit the files were still `ToyBox/classes/MainUI/BraaainzEditor.cs` and `ToyBox/classes/MainUI/PartyEditor/SpellsEditor.cs`) — run `git show` on any of them.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×3
Edited copy of a member (14 corresponding lines) ToyBox/Classes/MainUI/Dialog+NPCs.cs:190— ToyBox/Classes/MainUI/Dialog+NPCs.cs:190-203 | ToyBox/Classes/MainUI/Dialog+NPCs.cs:204-220 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) ToyBox/Classes/ModKit/UI/UI+Toggles.cs:33— ToyBox/Classes/ModKit/UI/UI+Toggles.cs:33-47 | ToyBox/Classes/ModKit/UI/UI+Toggles.cs:92-105 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) ToyBox/Classes/ModKit/Utility/Reflection/ReflectionFieldCache.cs:216— ToyBox/Classes/ModKit/Utility/Reflection/ReflectionFieldCache.cs:216-229 | ToyBox/Classes/ModKit/Utility/Reflection/ReflectionFieldCache.cs:231-246 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×3
Edited copy of a member (20 corresponding lines) ToyBox/Classes/MainUI/EnhancedUI/EnhancedSpellbookController.cs:358— ToyBox/Classes/MainUI/EnhancedUI/EnhancedSpellbookController.cs:358-378 | ToyBox/Classes/MainUI/EnhancedUI/EnhancedSpellbookController.cs:380-399 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) ToyBox/Classes/ModKit/Utility/Reflection/ReflectionFieldCache.cs:83— ToyBox/Classes/ModKit/Utility/Reflection/ReflectionFieldCache.cs:83-102 | ToyBox/Classes/ModKit/Utility/Reflection/ReflectionFieldCache.cs:129-151 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) ToyBox/Classes/Infrastructure/Borrowed/Accessors.cs:74— ToyBox/Classes/Infrastructure/Borrowed/Accessors.cs:74-93 | ToyBox/Classes/Infrastructure/Borrowed/Accessors.cs:133-152 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×3
Edited copy of a member (12 corresponding lines) REDACTED:115— REDACTED:115-126 | REDACTED:127-138 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) ToyBox/Classes/ModKit/UI/UI+Pickers.cs:46— ToyBox/Classes/ModKit/UI/UI+Pickers.cs:46-57 | ToyBox/Classes/ModKit/UI/UI+Pickers.cs:58-69 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) ToyBox/Classes/Infrastructure/Teleport.cs:43— ToyBox/Classes/Infrastructure/Teleport.cs:43-55 | ToyBox/Classes/Infrastructure/Teleport.cs:56-67 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×3
Edited copy of a member (11 corresponding lines) ToyBox/Classes/MonkeyPatchin/BagOfPatches/Combat/NoFriendlyFire.cs:99— ToyBox/Classes/MonkeyPatchin/BagOfPatches/Combat/NoFriendlyFire.cs:99-109 | ToyBox/Classes/MonkeyPatchin/BagOfPatches/Combat/NoFriendlyFire.cs:114-144 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) ToyBox/Classes/MonkeyPatchin/EnhancedUI/LocalMap.cs:350— ToyBox/Classes/MonkeyPatchin/EnhancedUI/LocalMap.cs:350-360 | ToyBox/Classes/MonkeyPatchin/EnhancedUI/LocalMap.cs:363-373 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) ToyBox/Classes/MonkeyPatchin/BagOfPatches/Clipboard+Guids.cs:49— ToyBox/Classes/MonkeyPatchin/BagOfPatches/Clipboard+Guids.cs:49-60 | ToyBox/Classes/MonkeyPatchin/BagOfPatches/Clipboard+Guids.cs:64-74 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×3
Edited copy of a member (17 corresponding lines) ToyBox/Classes/MonkeyPatchin/HighlightObjectToggle.cs:145— ToyBox/Classes/MonkeyPatchin/HighlightObjectToggle.cs:145-164 | ToyBox/Classes/MonkeyPatchin/HighlightObjectToggle.cs:166-182 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) ToyBox/Classes/ModKit/Utility/Reflection/ReflectionPropertyCache.cs:81— ToyBox/Classes/ModKit/Utility/Reflection/ReflectionPropertyCache.cs:81-97 | ToyBox/Classes/ModKit/Utility/Reflection/ReflectionPropertyCache.cs:99-117 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) ToyBox/Classes/Infrastructure/Borrowed/Accessors.cs:40— ToyBox/Classes/Infrastructure/Borrowed/Accessors.cs:40-56 | ToyBox/Classes/Infrastructure/Borrowed/Accessors.cs:57-73 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×3
Edited copy of a member (15 corresponding lines) ToyBox/Classes/Infrastructure/Performance.cs:115— ToyBox/Classes/Infrastructure/Performance.cs:115-129 | ToyBox/Classes/Infrastructure/Performance.cs:130-144 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) ToyBox/Classes/MonkeyPatchin/BagOfPatches/Multipliers.cs:191— ToyBox/Classes/MonkeyPatchin/BagOfPatches/Multipliers.cs:191-205 | ToyBox/Classes/MonkeyPatchin/BagOfPatches/Multipliers.cs:214-231 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) ToyBox/Classes/MonkeyPatchin/Vendor/BulkSellLogic.cs:131— ToyBox/Classes/MonkeyPatchin/Vendor/BulkSellLogic.cs:131-147 | ToyBox/Classes/MonkeyPatchin/Vendor/BulkSellLogic.cs:149-163 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×3
Edited copy of a member (8 corresponding lines) ToyBox/Classes/MainUI/Dialog+NPCs.cs:235— ToyBox/Classes/MainUI/Dialog+NPCs.cs:235-242 | ToyBox/Classes/MainUI/Dialog+NPCs.cs:243-250 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) ToyBox/Classes/MainUI/EnhancedUI/ItemRarity.cs:146— ToyBox/Classes/MainUI/EnhancedUI/ItemRarity.cs:146-155 | ToyBox/Classes/MainUI/EnhancedUI/ItemRarity.cs:156-163 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) ToyBox/Classes/MainUI/Browser/FactsEditor.cs:370— ToyBox/Classes/MainUI/Browser/FactsEditor.cs:370-377 | ToyBox/Classes/MainUI/Browser/FactsEditor.cs:378-385 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (17 lines × 2) ToyBox/Classes/Infrastructure/Borrowed/Accessors.cs:75— ToyBox/Classes/Infrastructure/Borrowed/Accessors.cs:75-91 | ToyBox/Classes/Infrastructure/Borrowed/Accessors.cs:134-150 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (17 lines × 2) ToyBox/Classes/MainUI/PatchTool/UI/AddItemState.cs:30— ToyBox/Classes/MainUI/PatchTool/UI/AddItemState.cs:30-46 | ToyBox/Classes/MainUI/PatchTool/UI/AddItemState.cs:77-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 `ToyBox/Classes/MainUI/PatchTool/UI/AddItemState.cs:30` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (17 lines × 2) ToyBox/Classes/MonkeyPatchin/Multiclass/MultipleClasses.cs:186— ToyBox/Classes/MonkeyPatchin/Multiclass/MultipleClasses.cs:186-202 | ToyBox/Classes/MonkeyPatchin/Multiclass/MultipleClasses.cs:216-232 — both copies are in the same file, so extract the 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.
IC1 · Incompleteness & stubs· Empty method body · ×3
Empty method body — does nothing with its inputs ToyBox/Classes/Infrastructure/Blueprints/BlueprintLoader.cs:244— `OnAfterBPLoad` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs ToyBox/Classes/MainUI/DialogEditor.cs:59— `OnGUI` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs ToyBox/Classes/MainUI/DialogEditor.cs:62— `OnGUI` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Hotspot: ToyBox/Classes/MainUI/BagOfTricks.cs ToyBox/Classes/MainUI/BagOfTricks.cs:126— ToyBox/Classes/MainUI/BagOfTricks.cs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in BagOfTricks.OnGUI at line 126. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 15:55:20 +02:00' --until='2026-10-24 15:55:20 +02:00' --full-history --no-merges -- ToyBox/Classes/MainUI/BagOfTricks.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:190— ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in ModelReplacers.CheckAndReplace at line 190. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 15:55:20 +02:00' --until='2026-10-24 15:55:20 +02:00' --full-history --no-merges -- ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
TooManyMethods: UI ToyBox/Classes/ModKit/UI/UI+Controls.cs— TooManyMethods — 1315 significant lines (blank, comment-only and punctuation-only lines excluded), 157 methods, declared across 11 files: UI/UI+Controls.cs (40), UI/UI+Wrappers.cs (35), UI/UI+Pickers.cs (29), UI/UI+Toggles.cs (16), +7 more file(s). The bar is 30 methods; this is 127 over it, 5.23× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
TooManyMethods: Actions ToyBox/Classes/MainUI/ActionsWrath.cs— TooManyMethods — 317 significant lines (blank, comment-only and punctuation-only lines excluded), 41 methods, declared across 2 files: MainUI/ActionsWrath.cs (35), MainUI/Actions.cs (6). The bar is 30 methods; this is 11 over it, 1.37× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (4 members, 50+ identical tokens) ToyBox/Classes/ModKit/UI/UI+Pickers.cs:15— ToyBox/Classes/ModKit/UI/UI+Pickers.cs:15-26 | ToyBox/Classes/ModKit/UI/UI+Pickers.cs:34-45 | ToyBox/Classes/ModKit/UI/UI+Pickers.cs:70-84 | ToyBox/Classes/ModKit/UI/UI+Pickers.cs:85-95 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:604— ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:604-613 | ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:618-627 | ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:633-642 | ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:648-657 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×2
Edited copy of a member (18 corresponding lines) ToyBox/Classes/MainUI/EnchantmentEditor.cs:430— ToyBox/Classes/MainUI/EnchantmentEditor.cs:430-447 | ToyBox/Classes/MainUI/EnchantmentEditor.cs:448-466 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) ToyBox/Classes/MonkeyPatchin/BagOfPatches/LevelUpPatchesWrath.cs:72— ToyBox/Classes/MonkeyPatchin/BagOfPatches/LevelUpPatchesWrath.cs:72-89 | ToyBox/Classes/MonkeyPatchin/BagOfPatches/LevelUpPatchesWrath.cs:92-109 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×2
Edited copy of a member (10 corresponding lines) ToyBox/Classes/ModKit/UI/UI+Toggles.cs:48— ToyBox/Classes/ModKit/UI/UI+Toggles.cs:48-57 | ToyBox/Classes/ModKit/UI/UI+Toggles.cs:58-67 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) ToyBox/Classes/ModKit/Utility/Extensions/CodeInstructionExtensions.cs:271— ToyBox/Classes/ModKit/Utility/Extensions/CodeInstructionExtensions.cs:271-280 | ToyBox/Classes/ModKit/Utility/Extensions/CodeInstructionExtensions.cs:286-295 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×2
Edited copy of a member (6 corresponding lines) ToyBox/Classes/MonkeyPatchin/Multiclass/MulticlassMod.cs:90— ToyBox/Classes/MonkeyPatchin/Multiclass/MulticlassMod.cs:90-95 | ToyBox/Classes/MonkeyPatchin/Multiclass/MulticlassMod.cs:108-113 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) ToyBox/Classes/MonkeyPatchin/EnhancedUI/ItemsFilterPCView.cs:101— ToyBox/Classes/MonkeyPatchin/EnhancedUI/ItemsFilterPCView.cs:101-106 | ToyBox/Classes/MonkeyPatchin/EnhancedUI/ItemsFilterSearchPCView.cs:51-56 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (18 lines × 2) ToyBox/Classes/MainUI/Browser/BlueprintAction.cs:141— ToyBox/Classes/MainUI/Browser/BlueprintAction.cs:141-158 | ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:191-208 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (18 lines × 2) ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:178— ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:178-195 | ToyBox/Classes/MainUI/Browser/SearchAndPick.cs:427-444 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:178` 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) ToyBox/Classes/Infrastructure/Performance.cs:116— ToyBox/Classes/Infrastructure/Performance.cs:116-126 | ToyBox/Classes/Infrastructure/Performance.cs:131-141 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:201— ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:201-211 | ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:218-229 — both copies are in the same file, so extract the 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 `ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:201` 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 × 4) ToyBox/Classes/Infrastructure/Performance.cs:87— ToyBox/Classes/Infrastructure/Performance.cs:87-91 | ToyBox/Classes/Infrastructure/Performance.cs:93-97 | ToyBox/Classes/Infrastructure/Performance.cs:99-103 | ToyBox/Classes/Infrastructure/Performance.cs:105-109 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 4) ToyBox/Classes/ModKit/UI/UI+Pickers.cs:20— ToyBox/Classes/ModKit/UI/UI+Pickers.cs:20-24 | ToyBox/Classes/ModKit/UI/UI+Pickers.cs:39-43 | ToyBox/Classes/ModKit/UI/UI+Pickers.cs:71-75 | ToyBox/Classes/ModKit/UI/UI+Pickers.cs:86-90 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. 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.
Unfinished stub — throws NotImplementedException ToyBox/Classes/Infrastructure/Teleport.cs:85— `Dispose` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException ToyBox/Classes/ModKit/DataViewer/ReflectionTree.cs:481— `SetValue` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished branch — throws NotImplementedException ToyBox/Classes/MainUI/PatchTool/Infrastructure/PatchOperation.cs:197— The `default:` section (reached by `NoOperation`) throws `NotImplementedException` while the member's other paths do the work — the branch was never written, so every input that reaches it fails at run time. Implement the branch, or reject the input where it enters with an exception that says it is not supported.
Unfinished branch — throws NotImplementedException ToyBox/Classes/MainUI/PatchTool/Infrastructure/PatchOperation.cs:279— The `default:` section (reached by `NoOperation`) throws `NotImplementedException` while the member's other paths do the work — the branch was never written, so every input that reaches it fails at run time. Implement the branch, or reject the input where it enters with an exception that says it is not supported.
Sync-over-async blocking — 1 blocking call(s) on async work (.Wait()/.GetAwaiter().GetResult()) — these waste a thread and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking ToyBox/Classes/Infrastructure/Blueprints/BlueprintLoader.cs:168— `task.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
X18 · Disposal-pattern correctness· Owned disposable field overwritten without releasing the previous instance · ×2
Owned disposable field overwritten without releasing the previous instance ToyBox/Classes/ModKit/DataViewer/ReflectionSearch.cs:109— `_cancellationTokenSource` is a `CancellationTokenSource` this type creates itself, and here (line 109) a new instance is written over it — but `StartSearch` itself reads through `_cancellationTokenSource` before replacing it, so it expects an instance to be there, and nothing earlier in `StartSearch` disposes, closes, saves or hands on the instance being replaced. The assignment makes it unreachable while it still holds what it holds (a timer that keeps firing, a callback registered on a longer-lived token, a socket, a handle), and no later `Dispose` can reach it: the type's own disposal releases only the CURRENT instance. The cost accumulates once per overwrite. Release the previous instance first (`_cancellationTokenSource?.Dispose();` before the assignment), or swap it out with `Interlocked.Exchange` and dispose what comes back.
Owned disposable field overwritten without releasing the previous instance ToyBox/Classes/ModKit/UI/UI+Browser.cs:384— `_searchCancellationTokenSource` is a `CancellationTokenSource` this type creates itself, and here (line 384) a new instance is written over it — but `Update` itself reads through `_searchCancellationTokenSource` before replacing it, so it expects an instance to be there, and nothing earlier in `Update` disposes, closes, saves or hands on the instance being replaced. The assignment makes it unreachable while it still holds what it holds (a timer that keeps firing, a callback registered on a longer-lived token, a socket, a handle), and no later `Dispose` can reach it: the type's own disposal releases only the CURRENT instance. The cost accumulates once per overwrite. Release the previous instance first (`_searchCancellationTokenSource?.Dispose();` before the assignment), or swap it out with `Interlocked.Exchange` and dispose what comes back.
Appears unstructured (no recognised architecture) — ~35.6k production LoC (622 types) across 1 project(s) / 19 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.
SearchAndPick.OnGUI (cyclomatic 70) ToyBox/Classes/MainUI/Browser/SearchAndPick.cs:179— SearchAndPick.OnGUI has cyclomatic complexity 70 (threshold 15). Most of this is not in the body itself: 14 of the 70 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 306, 201, 276, …). 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.
PartyEditor.OnGUI (cyclomatic 65) ToyBox/Classes/MainUI/PartyEditor/PartyEditor.cs:112— PartyEditor.OnGUI 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.
PatchOperation.Apply (cyclomatic 63) ToyBox/Classes/MainUI/PatchTool/Infrastructure/PatchOperation.cs:65— PatchOperation.Apply 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.
PartyEditor.OnStatsGUI (cyclomatic 58) ToyBox/Classes/MainUI/PartyEditor/StatsEditor.cs:108— PartyEditor.OnStatsGUI has cyclomatic complexity 58 (threshold 15). Of this number, 47 points are the body's own statements and 11 belong to 7 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.
Browser.Update (cyclomatic 57) ToyBox/Classes/ModKit/UI/UI+Browser.cs:253— Browser.Update has cyclomatic complexity 57 (threshold 15). Of this number, 55 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.
BlueprintListUI.OnGUI (cyclomatic 55) ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:32— BlueprintListUI.OnGUI 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.
PatchToolTabUI.FieldGUI (cyclomatic 50) ToyBox/Classes/MainUI/PatchTool/UI/PatchToolTabUI.cs:250— PatchToolTabUI.FieldGUI has cyclomatic complexity 50 (threshold 15). Of this number, 45 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.
QuestEditor.OnGUI (cyclomatic 45) ToyBox/Classes/MainUI/QuestEditor.cs:72— QuestEditor.OnGUI has cyclomatic complexity 45 (threshold 15). Of this number, 43 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.
MulticlassPicker.PickerRow (cyclomatic 43) ToyBox/Classes/MainUI/MulticlassPicker.cs:65— MulticlassPicker.PickerRow has cyclomatic complexity 43 (threshold 15). Of this number, 36 points are the body's own statements and 7 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.
BagOfTricks.OnGUI (cyclomatic 40) ToyBox/Classes/MainUI/BagOfTricks.cs:126— BagOfTricks.OnGUI has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 2 of the 40 points are its own statements and the rest belongs to 24 function literals inside it that branch (lines 528, 721, 293, …). 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.
GameHistoryLog_HandlePartyCombatStateChanged_Patch.Postfix (cyclomatic 40) ToyBox/Classes/MonkeyPatchin/BagOfPatches/TweaksWrath.cs:221— GameHistoryLog_HandlePartyCombatStateChanged_Patch.Postfix has cyclomatic complexity 40 (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.
BlueprintActions.InitializeActionsWrath (cyclomatic 37) ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:49— BlueprintActions.InitializeActionsWrath has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 1 of the 37 points is its own statement and the rest belongs to 20 function literals inside it that branch (lines 134, 174, 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.
ArmiesEditor.ArmiesGUI (cyclomatic 36) ToyBox/Classes/MainUI/Crusade/ArmiesEditor.cs:325— ArmiesEditor.ArmiesGUI has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 3 of the 36 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 340, 469). 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.
PhatLoot.OnGUI (cyclomatic 36) ToyBox/Classes/MainUI/EnhancedUI/PhatLoot.cs:35— PhatLoot.OnGUI has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 3 of the 36 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 183, 196, 159, …). 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.
EtudesEditor.DrawEtude (cyclomatic 36) ToyBox/Classes/MainUI/Etudes/EtudesEditor.cs:192— EtudesEditor.DrawEtude 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.
ArmiesEditor.OnGUI (cyclomatic 34) ToyBox/Classes/MainUI/Crusade/ArmiesEditor.cs:115— ArmiesEditor.OnGUI has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 10 of the 34 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 220, 200, 124, …). 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.
PartyEditor.OnSpellsGUI (cyclomatic 33) ToyBox/Classes/MainUI/PartyEditor/SpellsEditor.cs:23— PartyEditor.OnSpellsGUI has cyclomatic complexity 33 (threshold 15). Of this number, 18 points are the body's own statements and 15 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.
KingdomUIEventWindow_SetDescription_Patch.Prefix (cyclomatic 33) ToyBox/Classes/MonkeyPatchin/PreviewManagerWrath.cs:478— KingdomUIEventWindow_SetDescription_Patch.Prefix has cyclomatic complexity 33 (threshold 15). Of this number, 31 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.
UI.EditKeyBind (cyclomatic 32) ToyBox/Classes/ModKit/UI/KeyBindings/UI+KeyBindings.cs:12— UI.EditKeyBind 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.
FactsEditor.BlueprintDetailGUI (cyclomatic 31) ToyBox/Classes/MainUI/Browser/FactsEditor.cs:177— FactsEditor.BlueprintDetailGUI has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 4 of the 31 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 250, 195, 228, …). 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.
FactsEditor.BlueprintRowGUI (cyclomatic 30) ToyBox/Classes/MainUI/Browser/FactsEditor.cs:41— FactsEditor.BlueprintRowGUI has cyclomatic complexity 30 (threshold 15). Of this number, 24 points are the body's own statements and 6 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.
ItemsFilter_ShouldShowItem_ItemEntity.Prefix (cyclomatic 30) ToyBox/Classes/MonkeyPatchin/EnhancedUI/ItemsFilter.cs:36— ItemsFilter_ShouldShowItem_ItemEntity.Prefix 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.
ModelReplacers.CheckAndReplace (cyclomatic 29) ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:190— ModelReplacers.CheckAndReplace 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.
Browser.OnGUI (cyclomatic 28) ToyBox/Classes/ModKit/UI/UI+Browser.cs:123— Browser.OnGUI has cyclomatic complexity 28 (threshold 15). Of this number, 23 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.
ModelReplacers.CheckAndReplace (cyclomatic 27) ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:299— ModelReplacers.CheckAndReplace 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.
ItemsFilter_IsMatchSearchRequest_Patch.Prefix (cyclomatic 27) ToyBox/Classes/MonkeyPatchin/EnhancedUI/ItemsFilter.cs:211— ItemsFilter_IsMatchSearchRequest_Patch.Prefix 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.
ItemSlotViewPatch.RefreshItem (cyclomatic 27) ToyBox/Classes/MonkeyPatchin/EnhancedUI/LootWrath.cs:180— ItemSlotViewPatch.RefreshItem 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.
EnhancedUI.OnGUI (cyclomatic 26) ToyBox/Classes/MainUI/EnhancedUI/EnhancedUI.cs:21— EnhancedUI.OnGUI has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 14 function literals inside it that branch (lines 175, 43, 51, …). 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.
CameraRigPatch.TickScroll (cyclomatic 26) ToyBox/Classes/MonkeyPatchin/BagOfPatches/CameraWrath.cs:128— CameraRigPatch.TickScroll has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EnhancedSpellbookController.ShouldShowSpell (cyclomatic 23) ToyBox/Classes/MainUI/EnhancedUI/EnhancedSpellbookController.cs:279— EnhancedSpellbookController.ShouldShowSpell has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ApplySpellbookPatch.Apply (cyclomatic 23) ToyBox/Classes/MonkeyPatchin/Multiclass/LevelUP+Multiclass.cs:90— ApplySpellbookPatch.Apply has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PreviewManager.CollateAnswerData (cyclomatic 23) ToyBox/Classes/MonkeyPatchin/PreviewManagerWrath.cs:102— PreviewManager.CollateAnswerData has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PartyEditor.OnClassesGUI (cyclomatic 22) ToyBox/Classes/MainUI/PartyEditor/ClassesEditor.cs:26— PartyEditor.OnClassesGUI has cyclomatic complexity 22 (threshold 15). Of this number, 18 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.
PatchToolTabUI.NestedGUI (cyclomatic 22) ToyBox/Classes/MainUI/PatchTool/UI/PatchToolTabUI.cs:169— PatchToolTabUI.NestedGUI has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CachedMethod.CachedMethod.ctor (cyclomatic 22) ToyBox/Classes/ModKit/Utility/Reflection/ReflectionMethodCache.cs:91— CachedMethod.CachedMethod.ctor has cyclomatic complexity 22 (threshold 15). Of this number, 15 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CameraRigPatch.TickRotate (cyclomatic 22) ToyBox/Classes/MonkeyPatchin/BagOfPatches/CameraWrath.cs:197— CameraRigPatch.TickRotate has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EnchantmentEditor.OnGUI (cyclomatic 21) ToyBox/Classes/MainUI/EnchantmentEditor.cs:51— EnchantmentEditor.OnGUI has cyclomatic complexity 21 (threshold 15). Of this number, 16 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.
Main.OnUpdate (cyclomatic 21) ToyBox/Classes/MainUI/Main.cs:405— Main.OnUpdate has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DialogAnswerViewPatch.SetAnswer (cyclomatic 21) ToyBox/Classes/MonkeyPatchin/PreviewManagerWrath.cs:577— DialogAnswerViewPatch.SetAnswer has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
UI.Toggle (cyclomatic 20) ToyBox/Classes/ModKit/UI/Private/Toggle.cs:22— UI.Toggle has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PreviewManager.CalculateEventResult (cyclomatic 20) ToyBox/Classes/MonkeyPatchin/PreviewManagerWrath.cs:50— PreviewManager.CalculateEventResult has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
KingdomUIEventWindowFooter_Initialize_Patch.Prefix (cyclomatic 20) ToyBox/Classes/MonkeyPatchin/PreviewManagerWrath.cs:409— KingdomUIEventWindowFooter_Initialize_Patch.Prefix has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DialogAndNPCs.OnGUI (cyclomatic 19) ToyBox/Classes/MainUI/Dialog+NPCs.cs:37— DialogAndNPCs.OnGUI has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 92, 75, 63, …). 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.
FeaturesTreeEditor.OnGUI (cyclomatic 19) ToyBox/Classes/MainUI/PartyEditor/FeaturesTreeEditor.cs:26— FeaturesTreeEditor.OnGUI has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PatchToolUtils.GetInstantiableTypes (cyclomatic 19) ToyBox/Classes/MainUI/PatchTool/Utils/InstantiationHelper.cs:9— PatchToolUtils.GetInstantiableTypes has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SelectClass_Apply_Patch.Postfix (cyclomatic 19) ToyBox/Classes/MonkeyPatchin/Multiclass/MultipleClasses.cs:44— SelectClass_Apply_Patch.Postfix has cyclomatic complexity 19 (threshold 15). Of this number, 16 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.
BulkSellLogic.ShouldSellHowManyOfThisWeapon (cyclomatic 19) ToyBox/Classes/MonkeyPatchin/Vendor/BulkSellLogic.cs:70— BulkSellLogic.ShouldSellHowManyOfThisWeapon has cyclomatic complexity 19 (threshold 15). Of this number, 13 points are the body's own statements and 6 belong to 2 function literals inside it that branch. 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.
EtudesTreeModel.UpdateEtudeData (cyclomatic 18) ToyBox/Classes/MainUI/Etudes/EtudeTreeModel.cs:61— EtudesTreeModel.UpdateEtudeData has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CompanionInParty_CheckCondition_Patch.Postfix (cyclomatic 18) ToyBox/Classes/MonkeyPatchin/BagOfPatches/Dialog.cs:60— CompanionInParty_CheckCondition_Patch.Postfix has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ItemEntity_Name_Patch.Postfix (cyclomatic 18) ToyBox/Classes/MonkeyPatchin/EnhancedUI/LootWrath.cs:248— ItemEntity_Name_Patch.Postfix has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ReflectionBasedSerializer_PerformancePatches.GetMethods (cyclomatic 17) ToyBox/Classes/Infrastructure/Performance.cs:33— ReflectionBasedSerializer_PerformancePatches.GetMethods has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Actions.AddAbility (cyclomatic 17) ToyBox/Classes/MainUI/ActionsWrath.cs:227— Actions.AddAbility has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EtudesEditor.OnGUI (cyclomatic 17) ToyBox/Classes/MainUI/Etudes/EtudesEditor.cs:60— EtudesEditor.OnGUI has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: 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.
LocalMapBaseViewPatch.SetDrawResult (cyclomatic 17) ToyBox/Classes/MonkeyPatchin/EnhancedUI/LocalMap.cs:110— LocalMapBaseViewPatch.SetDrawResult has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EnchantmentEditor.EnchantmentsListGUI (cyclomatic 16) ToyBox/Classes/MainUI/EnchantmentEditor.cs:302— EnchantmentEditor.EnchantmentsListGUI has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 337, 308, 310). 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.
MulticlassPicker.MigrationOptions (cyclomatic 16) ToyBox/Classes/MainUI/MulticlassPicker.cs:217— MulticlassPicker.MigrationOptions has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FeaturesTree.FeaturesTree.ctor (cyclomatic 16) ToyBox/Classes/MainUI/PartyEditor/FeaturesTreeEditor.cs:103— FeaturesTree.FeaturesTree.ctor has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BlueprintPickerGUI.OnGUI (cyclomatic 16) ToyBox/Classes/MainUI/PatchTool/UI/BlueprintPickerGUI.cs:26— BlueprintPickerGUI.OnGUI has cyclomatic complexity 16 (threshold 15). Of this number, 12 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.
CameraZoomPatch.TickZoom (cyclomatic 16) ToyBox/Classes/MonkeyPatchin/BagOfPatches/CameraWrath.cs:35— CameraZoomPatch.TickZoom has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DialogControllerPatch.AddAnswers (cyclomatic 16) ToyBox/Classes/MonkeyPatchin/BagOfPatches/Dialog.cs:264— DialogControllerPatch.AddAnswers has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RuleRollDice_Roll_Patch.Postfix (cyclomatic 16) ToyBox/Classes/MonkeyPatchin/BagOfPatches/DiceRollsWrath.cs:34— RuleRollDice_Roll_Patch.Postfix has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LocalMapVMPatch.SetMarkers (cyclomatic 16) ToyBox/Classes/MonkeyPatchin/EnhancedUI/LocalMap.cs:60— LocalMapVMPatch.SetMarkers has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
Build failed — The target solution did not build cleanly (errors: 5528), which caps Solution Shape at 3/10 — the most basic shape signal is that it compiles. First errors: CS0246: The type or namespace name 'TMPro' could not be found (are you missing a using directive or an assembly reference?); CS0246: The type or namespace name 'UnityEngine' could not be found (are you missing a using directive or an assembly reference?); CS0246: The type or namespace name 'Kingmaker' could not be found (are you missing a using directive or an assembly reference?); CS0246: The type or namespace name 'HarmonyLib' could not be found (are you missing a using directive or an assembly reference?); CS0246: The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?).
QuestEditor.OnGUI (cognitive 214) ToyBox/Classes/MainUI/QuestEditor.cs:72— QuestEditor.OnGUI has cognitive complexity 214 (threshold 15). Of this number, 204 points are the body's own statements and 10 belong to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
BlueprintListUI.OnGUI (cognitive 145) ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:32— BlueprintListUI.OnGUI has cognitive complexity 145 (threshold 15). Of this number, 142 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
SearchAndPick.OnGUI (cognitive 135) ToyBox/Classes/MainUI/Browser/SearchAndPick.cs:179— SearchAndPick.OnGUI has cognitive complexity 135 (threshold 15). Of this number, 19 points are the body's own statements and 116 belong to 7 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
PatchToolTabUI.FieldGUI (cognitive 132) ToyBox/Classes/MainUI/PatchTool/UI/PatchToolTabUI.cs:250— PatchToolTabUI.FieldGUI has cognitive complexity 132 (threshold 15). Of this number, 119 points are the body's own statements and 13 belong to 3 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
Browser.Update (cognitive 129) ToyBox/Classes/ModKit/UI/UI+Browser.cs:253— Browser.Update has cognitive complexity 129 (threshold 15). Of this number, 120 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
PatchOperation.Apply (cognitive 127) ToyBox/Classes/MainUI/PatchTool/Infrastructure/PatchOperation.cs:65— PatchOperation.Apply has cognitive complexity 127 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartyEditor.OnStatsGUI (cognitive 123) ToyBox/Classes/MainUI/PartyEditor/StatsEditor.cs:108— PartyEditor.OnStatsGUI has cognitive complexity 123 (threshold 15). Of this number, 87 points are the body's own statements and 36 belong to 7 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
PartyEditor.OnGUI (cognitive 119) ToyBox/Classes/MainUI/PartyEditor/PartyEditor.cs:112— PartyEditor.OnGUI has cognitive complexity 119 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArmiesEditor.ArmiesGUI (cognitive 108) ToyBox/Classes/MainUI/Crusade/ArmiesEditor.cs:325— ArmiesEditor.ArmiesGUI has cognitive complexity 108 (threshold 15). Most of this is not in the body itself: 3 of the 108 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 340, 469). 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.
EtudesEditor.DrawEtude (cognitive 103) ToyBox/Classes/MainUI/Etudes/EtudesEditor.cs:192— EtudesEditor.DrawEtude has cognitive complexity 103 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
FactsEditor.BlueprintDetailGUI (cognitive 100) ToyBox/Classes/MainUI/Browser/FactsEditor.cs:177— FactsEditor.BlueprintDetailGUI has cognitive complexity 100 (threshold 15). Most of this is not in the body itself: 2 of the 100 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 250, 195, 228, …). 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.
PartyEditor.OnSpellsGUI (cognitive 97) ToyBox/Classes/MainUI/PartyEditor/SpellsEditor.cs:23— PartyEditor.OnSpellsGUI has cognitive complexity 97 (threshold 15). Of this number, 45 points are the body's own statements and 52 belong to 6 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
GameHistoryLog_HandlePartyCombatStateChanged_Patch.Postfix (cognitive 76) ToyBox/Classes/MonkeyPatchin/BagOfPatches/TweaksWrath.cs:221— GameHistoryLog_HandlePartyCombatStateChanged_Patch.Postfix has cognitive complexity 76 (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.
PhatLoot.OnGUI (cognitive 72) ToyBox/Classes/MainUI/EnhancedUI/PhatLoot.cs:35— PhatLoot.OnGUI has cognitive complexity 72 (threshold 15). Most of this is not in the body itself: 2 of the 72 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 183, 159, 196, …). 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.
MulticlassPicker.PickerRow (cognitive 70) ToyBox/Classes/MainUI/MulticlassPicker.cs:65— MulticlassPicker.PickerRow has cognitive complexity 70 (threshold 15). Of this number, 56 points are the body's own statements and 14 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DialogControllerPatch.AddAnswers (cognitive 70) ToyBox/Classes/MonkeyPatchin/BagOfPatches/Dialog.cs:264— DialogControllerPatch.AddAnswers has cognitive complexity 70 (threshold 15). Of this number, 69 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ArmiesEditor.OnGUI (cognitive 68) ToyBox/Classes/MainUI/Crusade/ArmiesEditor.cs:115— ArmiesEditor.OnGUI has cognitive complexity 68 (threshold 15). Most of this is not in the body itself: 10 of the 68 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 220, 124, 157, …). 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.
Browser.OnGUI (cognitive 67) ToyBox/Classes/ModKit/UI/UI+Browser.cs:123— Browser.OnGUI has cognitive complexity 67 (threshold 15). Of this number, 49 points are the body's own statements and 18 belong to 3 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
PreviewManager.CollateAnswerData (cognitive 67) ToyBox/Classes/MonkeyPatchin/PreviewManagerWrath.cs:102— PreviewManager.CollateAnswerData has cognitive complexity 67 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
BlueprintActions.InitializeActionsWrath (cognitive 61) ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:49— BlueprintActions.InitializeActionsWrath has cognitive complexity 61 (threshold 15). None of this is in the body itself: all 61 points belong to 20 function literals inside it that branch (lines 134, 151, 174, …). 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.
FactsEditor.BlueprintRowGUI (cognitive 57) ToyBox/Classes/MainUI/Browser/FactsEditor.cs:41— FactsEditor.BlueprintRowGUI has cognitive complexity 57 (threshold 15). Of this number, 33 points are the body's own statements and 24 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
KingdomUIEventWindow_SetDescription_Patch.Prefix (cognitive 52) ToyBox/Classes/MonkeyPatchin/PreviewManagerWrath.cs:478— KingdomUIEventWindow_SetDescription_Patch.Prefix has cognitive complexity 52 (threshold 15). Of this number, 50 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BagOfTricks.OnGUI (cognitive 47) ToyBox/Classes/MainUI/BagOfTricks.cs:126— BagOfTricks.OnGUI has cognitive complexity 47 (threshold 15). Most of this is not in the body itself: 1 of the 47 points is its own statement and the rest belongs to 24 function literals inside it that branch (lines 721, 528, 293, …). 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.
Actions.AddAbility (cognitive 46) ToyBox/Classes/MainUI/ActionsWrath.cs:227— Actions.AddAbility has cognitive complexity 46 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
DialogAndNPCs.OnGUI (cognitive 45) ToyBox/Classes/MainUI/Dialog+NPCs.cs:37— DialogAndNPCs.OnGUI has cognitive complexity 45 (threshold 15). Most of this is not in the body itself: 7 of the 45 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 92, 75, 63, …). 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.
LocalMapBaseViewPatch.SetDrawResult (cognitive 44) ToyBox/Classes/MonkeyPatchin/EnhancedUI/LocalMap.cs:110— LocalMapBaseViewPatch.SetDrawResult has cognitive complexity 44 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ItemSlotViewPatch.RefreshItem (cognitive 44) ToyBox/Classes/MonkeyPatchin/EnhancedUI/LootWrath.cs:180— ItemSlotViewPatch.RefreshItem has cognitive complexity 44 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
PatchToolUtils.GetInstantiableTypes (cognitive 43) ToyBox/Classes/MainUI/PatchTool/Utils/InstantiationHelper.cs:9— PatchToolUtils.GetInstantiableTypes has cognitive complexity 43 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
PatchToolTabUI.NestedGUI (cognitive 42) ToyBox/Classes/MainUI/PatchTool/UI/PatchToolTabUI.cs:169— PatchToolTabUI.NestedGUI has cognitive complexity 42 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UI.EditKeyBind (cognitive 42) ToyBox/Classes/ModKit/UI/KeyBindings/UI+KeyBindings.cs:12— UI.EditKeyBind has cognitive complexity 42 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PartyEditor.OnClassesGUI (cognitive 41) ToyBox/Classes/MainUI/PartyEditor/ClassesEditor.cs:26— PartyEditor.OnClassesGUI has cognitive complexity 41 (threshold 15). Of this number, 36 points are the body's own statements and 5 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EnchantmentEditor.OnGUI (cognitive 38) ToyBox/Classes/MainUI/EnchantmentEditor.cs:51— EnchantmentEditor.OnGUI has cognitive complexity 38 (threshold 15). Of this number, 26 points are the body's own statements and 12 belong to 3 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
EnhancedSpellbookController.Update (cognitive 37) ToyBox/Classes/MainUI/EnhancedUI/EnhancedSpellbookController.cs:216— EnhancedSpellbookController.Update has cognitive complexity 37 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ItemsFilter_ShouldShowItem_ItemEntity.Prefix (cognitive 37) ToyBox/Classes/MonkeyPatchin/EnhancedUI/ItemsFilter.cs:36— ItemsFilter_ShouldShowItem_ItemEntity.Prefix has cognitive complexity 37 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
SelectClass_Apply_Patch.Postfix (cognitive 37) ToyBox/Classes/MonkeyPatchin/Multiclass/MultipleClasses.cs:44— SelectClass_Apply_Patch.Postfix has cognitive complexity 37 (threshold 15). Of this number, 28 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BlueprintPickerGUI.OnGUI (cognitive 35) ToyBox/Classes/MainUI/PatchTool/UI/BlueprintPickerGUI.cs:26— BlueprintPickerGUI.OnGUI has cognitive complexity 35 (threshold 15). Of this number, 21 points are the body's own statements and 14 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ModelReplacers.CheckAndReplace (cognitive 35) ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:190— ModelReplacers.CheckAndReplace has cognitive complexity 35 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FeaturesTreeEditor.OnGUI (cognitive 33) ToyBox/Classes/MainUI/PartyEditor/FeaturesTreeEditor.cs:26— FeaturesTreeEditor.OnGUI has cognitive complexity 33 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
CameraRigPatch.TickScroll (cognitive 33) ToyBox/Classes/MonkeyPatchin/BagOfPatches/CameraWrath.cs:128— CameraRigPatch.TickScroll has cognitive complexity 33 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ModelReplacers.CheckAndReplace (cognitive 33) ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:299— ModelReplacers.CheckAndReplace has cognitive complexity 33 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ApplySpellbookPatch.Apply (cognitive 32) ToyBox/Classes/MonkeyPatchin/Multiclass/LevelUP+Multiclass.cs:90— ApplySpellbookPatch.Apply has cognitive complexity 32 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Main.FindPatchesWithoutGuardClause (cognitive 30) ToyBox/Classes/MainUI/Main.cs:90— Main.FindPatchesWithoutGuardClause has cognitive complexity 30 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FeaturesTree.FeaturesTree.ctor (cognitive 30) ToyBox/Classes/MainUI/PartyEditor/FeaturesTreeEditor.cs:103— FeaturesTree.FeaturesTree.ctor has cognitive complexity 30 (threshold 15). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CasterHelpers.GetOriginalCasterLevel (cognitive 29) ToyBox/Classes/Infrastructure/CasterHelpers.cs:20— CasterHelpers.GetOriginalCasterLevel has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EnhancedUI.OnGUI (cognitive 29) ToyBox/Classes/MainUI/EnhancedUI/EnhancedUI.cs:21— EnhancedUI.OnGUI has cognitive complexity 29 (threshold 15). None of this is in the body itself: all 29 points belong to 14 function literals inside it that branch (lines 175, 85, 240, …). 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.
Main.Load (cognitive 29) ToyBox/Classes/MainUI/Main.cs:118— Main.Load has cognitive complexity 29 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
Main.OnGUI (cognitive 29) ToyBox/Classes/MainUI/Main.cs:286— Main.OnGUI has cognitive complexity 29 (threshold 15). Most of this is not in the body itself: 12 of the 29 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 341, 336). 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.
KingdomUIEventWindowFooter_Initialize_Patch.Prefix (cognitive 29) ToyBox/Classes/MonkeyPatchin/PreviewManagerWrath.cs:409— KingdomUIEventWindowFooter_Initialize_Patch.Prefix has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Main.OnUpdate (cognitive 28) ToyBox/Classes/MainUI/Main.cs:405— Main.OnUpdate has cognitive complexity 28 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UI.Toggle (cognitive 28) ToyBox/Classes/ModKit/UI/Private/Toggle.cs:22— UI.Toggle has cognitive complexity 28 (threshold 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
BlueprintLoader.HandleChunks (cognitive 27) ToyBox/Classes/Infrastructure/Blueprints/BlueprintLoader.cs:179— BlueprintLoader.HandleChunks has cognitive complexity 27 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EnchantmentEditor.EnchantmentsListGUI (cognitive 27) ToyBox/Classes/MainUI/EnchantmentEditor.cs:302— EnchantmentEditor.EnchantmentsListGUI has cognitive complexity 27 (threshold 15). None of this is in the body itself: all 27 points belong to 3 function literals inside it that branch (lines 337, 310, 308). 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.
RuleRollDice_Roll_Patch.Postfix (cognitive 26) ToyBox/Classes/MonkeyPatchin/BagOfPatches/DiceRollsWrath.cs:34— RuleRollDice_Roll_Patch.Postfix has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BlueprintExtensions.GetSearchKey (cognitive 25) ToyBox/Classes/Infrastructure/Blueprints/BlueprintExtensions.cs:98— BlueprintExtensions.GetSearchKey has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CachedMethod.CachedMethod.ctor (cognitive 25) ToyBox/Classes/ModKit/Utility/Reflection/ReflectionMethodCache.cs:91— CachedMethod.CachedMethod.ctor has cognitive complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Utilities.TrimCommonPrefix (cognitive 25) ToyBox/Classes/ModKit/Utility/Utilities.cs:62— Utilities.TrimCommonPrefix has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BlueprintExtensions.GetTitle (cognitive 24) ToyBox/Classes/Infrastructure/Blueprints/BlueprintExtensions.cs:58— BlueprintExtensions.GetTitle has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BlueprintExtensions.GetSortKey (cognitive 24) ToyBox/Classes/Infrastructure/Blueprints/BlueprintExtensions.cs:143— BlueprintExtensions.GetSortKey has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EventEditor.OnGUI (cognitive 24) ToyBox/Classes/MainUI/Crusade/EventEditor.cs:16— EventEditor.OnGUI has cognitive complexity 24 (threshold 15). Most of this is not in the body itself: 2 of the 24 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 68, 38, 27). 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.
PatchToolTabUI.OnGUI (cognitive 24) ToyBox/Classes/MainUI/PatchTool/UI/PatchToolTabUI.cs:50— PatchToolTabUI.OnGUI has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LocalizationManager.Export (cognitive 24) ToyBox/Classes/ModKit/ModKit/LocalizationManager.cs:143— LocalizationManager.Export has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CompanionInParty_CheckCondition_Patch.Postfix (cognitive 24) ToyBox/Classes/MonkeyPatchin/BagOfPatches/Dialog.cs:60— CompanionInParty_CheckCondition_Patch.Postfix has cognitive complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ReflectionBasedSerializer_PerformancePatches.GetMethods (cognitive 23) ToyBox/Classes/Infrastructure/Performance.cs:33— ReflectionBasedSerializer_PerformancePatches.GetMethods has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PatchToolUIManager.OnGUI (cognitive 23) ToyBox/Classes/MainUI/PatchTool/UI/PatchToolUIManager.cs:14— PatchToolUIManager.OnGUI has cognitive complexity 23 (threshold 15). Of this number, 20 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PreviewManager.CalculateEventResult (cognitive 23) ToyBox/Classes/MonkeyPatchin/PreviewManagerWrath.cs:50— PreviewManager.CalculateEventResult has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Updater.Update (cognitive 22) REDACTED:17— Updater.Update has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EtudesTreeModel.PrepareNewEtudeData (cognitive 22) ToyBox/Classes/MainUI/Etudes/EtudeTreeModel.cs:139— EtudesTreeModel.PrepareNewEtudeData has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CameraRigPatch.TickRotate (cognitive 22) ToyBox/Classes/MonkeyPatchin/BagOfPatches/CameraWrath.cs:197— CameraRigPatch.TickRotate has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EnhancedSpellbookController.ShouldShowSpell (cognitive 21) ToyBox/Classes/MainUI/EnhancedUI/EnhancedSpellbookController.cs:279— EnhancedSpellbookController.ShouldShowSpell has cognitive complexity 21 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MulticlassPicker.MigrationOptions (cognitive 21) ToyBox/Classes/MainUI/MulticlassPicker.cs:217— MulticlassPicker.MigrationOptions has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AbilityTargetsAround_Select_Patch.Postfix (cognitive 21) ToyBox/Classes/MonkeyPatchin/BagOfPatches/Combat/NoFriendlyFire.cs:32— AbilityTargetsAround_Select_Patch.Postfix has cognitive complexity 21 (threshold 15). Of this number, 15 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
EtudeStatus_CheckCondition_Patch.Postfix (cognitive 21) ToyBox/Classes/MonkeyPatchin/BagOfPatches/Romance.cs:247— EtudeStatus_CheckCondition_Patch.Postfix has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MulticlassCheckBoxHelper.MulticlassCheckBoxChanged (cognitive 21) ToyBox/Classes/MonkeyPatchin/Multiclass/MultipleClasses.cs:375— MulticlassCheckBoxHelper.MulticlassCheckBoxChanged has cognitive complexity 21 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Actions.CanAddAbility (cognitive 20) ToyBox/Classes/MainUI/ActionsWrath.cs:203— Actions.CanAddAbility has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PatchToolUtils.CreateObjectOfType (cognitive 20) ToyBox/Classes/MainUI/PatchTool/Utils/PatchToolUtils.cs:53— PatchToolUtils.CreateObjectOfType has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CameraZoomPatch.TickZoom (cognitive 20) ToyBox/Classes/MonkeyPatchin/BagOfPatches/CameraWrath.cs:35— CameraZoomPatch.TickZoom has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Condition_Check_Patch.Postfix (cognitive 20) ToyBox/Classes/MonkeyPatchin/BagOfPatches/Romance.cs:213— Condition_Check_Patch.Postfix has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DialogAnswerViewPatch.SetAnswer (cognitive 20) ToyBox/Classes/MonkeyPatchin/PreviewManagerWrath.cs:577— DialogAnswerViewPatch.SetAnswer has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EnchantmentEditor.TargetItemGUI (cognitive 19) ToyBox/Classes/MainUI/EnchantmentEditor.cs:269— EnchantmentEditor.TargetItemGUI has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArmyData_Add_Patch.Postfix (cognitive 19) ToyBox/Classes/MonkeyPatchin/BagOfPatches/Crusade.cs:203— ArmyData_Add_Patch.Postfix has cognitive complexity 19 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
EtudesEditor.OnGUI (cognitive 18) ToyBox/Classes/MainUI/Etudes/EtudesEditor.cs:60— EtudesEditor.OnGUI has cognitive complexity 18 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
KeyBindings.OnUpdate (cognitive 18) ToyBox/Classes/ModKit/UI/KeyBindings/KeyBindings.cs:84— KeyBindings.OnUpdate has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CodeInstructionExtensions.ReplaceAll (cognitive 18) ToyBox/Classes/ModKit/Utility/Extensions/CodeInstructionExtensions.cs:153— CodeInstructionExtensions.ReplaceAll has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
MultiplyFeatPoints_LevelUpHelper_AddFeatures_Patch.Prefix (cognitive 18) ToyBox/Classes/MonkeyPatchin/BagOfPatches/LevelUpPatchesWrath.cs:696— MultiplyFeatPoints_LevelUpHelper_AddFeatures_Patch.Prefix has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ItemsFilter_IsMatchSearchRequest_Patch.Prefix (cognitive 18) ToyBox/Classes/MonkeyPatchin/EnhancedUI/ItemsFilter.cs:211— ItemsFilter_IsMatchSearchRequest_Patch.Prefix has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KingdomUIEventWindow_SetHeader_Patch.Postfix (cognitive 18) ToyBox/Classes/MonkeyPatchin/PreviewManagerWrath.cs:322— KingdomUIEventWindow_SetHeader_Patch.Postfix has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CasterHelpers.GetAllSpells (cognitive 17) ToyBox/Classes/Infrastructure/CasterHelpers.cs:280— CasterHelpers.GetAllSpells has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReflectionBasedSerializer_PerformancePatches.Transpiler (cognitive 17) ToyBox/Classes/Infrastructure/Performance.cs:69— ReflectionBasedSerializer_PerformancePatches.Transpiler has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PatchToolTabUI.PopulateFieldsAndObjects (cognitive 17) ToyBox/Classes/MainUI/PatchTool/UI/PatchToolTabUI.cs:554— PatchToolTabUI.PopulateFieldsAndObjects has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Browser.UpdateSearchResults (cognitive 17) ToyBox/Classes/ModKit/UI/UI+Browser.cs:413— Browser.UpdateSearchResults has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UI.PagedVPicker (cognitive 17) ToyBox/Classes/ModKit/UI/UI+Pickers.cs:350— UI.PagedVPicker has cognitive complexity 17 (threshold 15). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 380, 389). 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.
KingdomUIEventWindow_OnClose_Patch.Postfix (cognitive 17) ToyBox/Classes/MonkeyPatchin/BagOfPatches/TweaksWrath.cs:131— KingdomUIEventWindow_OnClose_Patch.Postfix has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ItemEntity_Name_Patch.Postfix (cognitive 17) ToyBox/Classes/MonkeyPatchin/EnhancedUI/LootWrath.cs:248— ItemEntity_Name_Patch.Postfix has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BlueprintIdCache.NeedsCacheRebuilt.get (cognitive 16) ToyBox/Classes/Infrastructure/Blueprints/BlueprintIdCache.cs:55— BlueprintIdCache.NeedsCacheRebuilt.get 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.
DialogEditor.OnGUI (cognitive 16) ToyBox/Classes/MainUI/DialogEditor.cs:65— DialogEditor.OnGUI 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.
EtudesTreeModel.UpdateEtudeData (cognitive 16) ToyBox/Classes/MainUI/Etudes/EtudeTreeModel.cs:61— EtudesTreeModel.UpdateEtudeData has cognitive complexity 16 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
LocalizationManager.localize (cognitive 16) ToyBox/Classes/ModKit/ModKit/LocalizationManager.cs:82— LocalizationManager.localize 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.
Browser.Collate (cognitive 16) ToyBox/Classes/ModKit/UI/UI+Browser.cs:452— Browser.Collate has cognitive complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UI.GridPicker (cognitive 16) ToyBox/Classes/ModKit/UI/UI+Pickers.cs:233— UI.GridPicker 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.
Near-duplicate member pair (62 shared lines) ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:38— ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:38-301 | ToyBox/Classes/MainUI/Browser/SearchAndPick.cs:179-484 — These two members are variants of one another: 62 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Edited copy of a member (108 corresponding lines) · ×1
Edited copy of a member (108 corresponding lines) ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:190— ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:190-297 | ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:299-409 — These two members are one piece of code written twice and then edited apart: 108 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (42 corresponding lines) · ×1
Edited copy of a member (42 corresponding lines) ToyBox/Classes/ModKit/UI/UI+Controls.cs:419— ToyBox/Classes/ModKit/UI/UI+Controls.cs:419-460 | ToyBox/Classes/ModKit/UI/UI+Controls.cs:470-511 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 40+ corresponding lines) · ×1
Edited copies of one member (3 members, 40+ corresponding lines) ToyBox/Classes/Infrastructure/Blueprints/BlueprintExtensions.cs:58— ToyBox/Classes/Infrastructure/Blueprints/BlueprintExtensions.cs:58-97 | ToyBox/Classes/Infrastructure/Blueprints/BlueprintExtensions.cs:98-142 | ToyBox/Classes/Infrastructure/Blueprints/BlueprintExtensions.cs:143-187 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 40 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×1
Edited copy of a member (24 corresponding lines) ToyBox/Classes/MainUI/PartyEditor/StatsEditor.cs:51— ToyBox/Classes/MainUI/PartyEditor/StatsEditor.cs:51-83 | ToyBox/Classes/MainUI/PartyEditor/StatsEditor.cs:84-107 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×1
Edited copy of a member (22 corresponding lines) ToyBox/Classes/MonkeyPatchin/EnhancedUI/ItemsFilterPCView.cs:75— ToyBox/Classes/MonkeyPatchin/EnhancedUI/ItemsFilterPCView.cs:75-96 | ToyBox/Classes/MonkeyPatchin/EnhancedUI/ItemsFilterSearchPCView.cs:27-48 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 14+ corresponding lines) · ×1
Edited copies of one member (3 members, 14+ corresponding lines) ToyBox/Classes/ModKit/Utility/Reflection/ReflectionFieldCache.cs:26— ToyBox/Classes/ModKit/Utility/Reflection/ReflectionFieldCache.cs:26-41 | ToyBox/Classes/ModKit/Utility/Reflection/ReflectionMethodCache.cs:60-73 | ToyBox/Classes/ModKit/Utility/Reflection/ReflectionPropertyCache.cs:26-41 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×1
Edited copy of a member (19 corresponding lines) ToyBox/Classes/Infrastructure/UnitEntityDataUtils.cs:89— ToyBox/Classes/Infrastructure/UnitEntityDataUtils.cs:89-107 | ToyBox/Classes/Infrastructure/UnitEntityDataUtils.cs:108-132 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 5+ corresponding lines) · ×1
Edited copies of one member (3 members, 5+ corresponding lines) ToyBox/Classes/MonkeyPatchin/BagOfPatches/Limits/Unrestricted.cs:68— ToyBox/Classes/MonkeyPatchin/BagOfPatches/Limits/Unrestricted.cs:68-72 | ToyBox/Classes/MonkeyPatchin/BagOfPatches/Romance.cs:186-190 | ToyBox/Classes/MonkeyPatchin/BagOfPatches/Romance.cs:194-198 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×1
Edited copy of a member (13 corresponding lines) ToyBox/Classes/MonkeyPatchin/Multiclass/Archetypes.cs:312— ToyBox/Classes/MonkeyPatchin/Multiclass/Archetypes.cs:312-324 | ToyBox/Classes/MonkeyPatchin/Multiclass/Archetypes.cs:329-346 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×1
Edited copy of a member (9 corresponding lines) ToyBox/Classes/MonkeyPatchin/Multiclass/MulticlassMod.cs:97— ToyBox/Classes/MonkeyPatchin/Multiclass/MulticlassMod.cs:97-106 | ToyBox/Classes/MonkeyPatchin/Multiclass/MulticlassMod.cs:115-123 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 11+ corresponding lines) · ×1
Edited copies of one member (3 members, 11+ corresponding lines) ToyBox/Classes/ModKit/Utility/Reflection/ReflectionFieldCache.cs:11— ToyBox/Classes/ModKit/Utility/Reflection/ReflectionFieldCache.cs:11-24 | ToyBox/Classes/ModKit/Utility/Reflection/ReflectionMethodCache.cs:48-58 | ToyBox/Classes/ModKit/Utility/Reflection/ReflectionPropertyCache.cs:11-24 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×1
Edited copy of a member (16 corresponding lines) ToyBox/Classes/MainUI/Browser/BlueprintAction.cs:44— ToyBox/Classes/MainUI/Browser/BlueprintAction.cs:44-66 | ToyBox/Classes/MainUI/Browser/Editor.cs:26-41 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×1
Edited copy of a member (4 corresponding lines) ToyBox/Classes/MainUI/Browser/Editor.cs:62— ToyBox/Classes/MainUI/Browser/Editor.cs:62-65 | ToyBox/Classes/MainUI/Browser/Editor.cs:72-75 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×1
Edited copy of a member (7 corresponding lines) ToyBox/Classes/MainUI/Browser/BlueprintAction.cs:118— ToyBox/Classes/MainUI/Browser/BlueprintAction.cs:118-124 | ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:40-47 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (5 corresponding lines) · ×1
Edited copy of a member (5 corresponding lines) ToyBox/Classes/ModKit/Utility/Extensions/CodeInstructionExtensions.cs:115— ToyBox/Classes/ModKit/Utility/Extensions/CodeInstructionExtensions.cs:115-119 | ToyBox/Classes/ModKit/Utility/Extensions/CodeInstructionExtensions.cs:135-139 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 7+ corresponding lines) · ×1
Edited copies of one member (4 members, 7+ corresponding lines) ToyBox/Classes/Infrastructure/Borrowed/Accessors.cs:94— ToyBox/Classes/Infrastructure/Borrowed/Accessors.cs:94-100 | ToyBox/Classes/Infrastructure/Borrowed/Accessors.cs:101-107 | ToyBox/Classes/Infrastructure/Borrowed/Accessors.cs:108-114 | ToyBox/Classes/Infrastructure/Borrowed/Accessors.cs:115-121 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 12+ corresponding lines) · ×1
Edited copies of one member (3 members, 12+ corresponding lines) ToyBox/Classes/ModKit/UI/UI+Controls.cs:272— ToyBox/Classes/ModKit/UI/UI+Controls.cs:272-283 | ToyBox/Classes/ModKit/UI/UI+Controls.cs:284-295 | ToyBox/Classes/ModKit/UI/UI+Pickers.cs:181-192 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Duplicated block (30–32 lines × 2) ToyBox/Classes/ModKit/Utility/Extensions/CodeInstructionExtensions.cs:36— ToyBox/Classes/ModKit/Utility/Extensions/CodeInstructionExtensions.cs:36-65 | ToyBox/Classes/ModKit/Utility/Extensions/CodeInstructionExtensions.cs:68-99 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ToyBox/Classes/ModKit/Utility/Extensions/CodeInstructionExtensions.cs:36` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (29 lines × 2) ToyBox/Classes/ModKit/UI/UI+Controls.cs:432— ToyBox/Classes/ModKit/UI/UI+Controls.cs:432-460 | ToyBox/Classes/ModKit/UI/UI+Controls.cs:483-511 — both copies are in the same file, so extract the 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 `ToyBox/Classes/ModKit/UI/UI+Controls.cs:432` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–22 lines × 3) ToyBox/Classes/MonkeyPatchin/BagOfPatches/Combat/NoFriendlyFire.cs:99— ToyBox/Classes/MonkeyPatchin/BagOfPatches/Combat/NoFriendlyFire.cs:99-109 | ToyBox/Classes/MonkeyPatchin/BagOfPatches/Combat/NoFriendlyFire.cs:114-123 | ToyBox/Classes/MonkeyPatchin/BagOfPatches/Combat/NoFriendlyFire.cs:148-169 — 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 `ToyBox/Classes/MonkeyPatchin/BagOfPatches/Combat/NoFriendlyFire.cs:114` 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 first that the copies are not typed on the same thing: the declarations holding them bind `__instance` to `RuleSkillCheck` in one and `RulePartyStatCheck` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (15–16 lines × 2) ToyBox/Classes/MainUI/BagOfTricks.cs:477— ToyBox/Classes/MainUI/BagOfTricks.cs:477-492 | ToyBox/Classes/MainUI/EnhancedUI/EnhancedUI.cs:82-96 — 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 `ToyBox/Classes/MainUI/BagOfTricks.cs:477` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (15 lines × 2) ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:137— ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:137-151 | ToyBox/Classes/MainUI/Browser/SearchAndPick.cs:380-394 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:137` 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) ToyBox/Classes/MainUI/EnhancedUI/EnhancedUI.cs:121— ToyBox/Classes/MainUI/EnhancedUI/EnhancedUI.cs:121-133 | ToyBox/Classes/MainUI/EnhancedUI/PhatLoot.cs:127-139 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (12 lines × 2) ToyBox/Classes/MainUI/PatchTool/Infrastructure/PatchOperation.cs:143— ToyBox/Classes/MainUI/PatchTool/Infrastructure/PatchOperation.cs:143-154 | ToyBox/Classes/MainUI/PatchTool/Infrastructure/PatchOperation.cs:180-191 — both copies are in the same file, so extract the 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 `ToyBox/Classes/MainUI/PatchTool/Infrastructure/PatchOperation.cs:143` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `ToyBox/Classes/MainUI/PatchTool/Infrastructure/PatchOperation.cs:192` calls `nameof`, `AddToElementsList` and `ToyBox/Classes/MainUI/PatchTool/Infrastructure/PatchOperation.cs:155` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 3) ToyBox/Classes/Infrastructure/Blueprints/BlueprintExtensions.cs:60— ToyBox/Classes/Infrastructure/Blueprints/BlueprintExtensions.cs:60-70 | ToyBox/Classes/Infrastructure/Blueprints/BlueprintExtensions.cs:100-110 | ToyBox/Classes/Infrastructure/Blueprints/BlueprintExtensions.cs:145-155 — 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 `ToyBox/Classes/Infrastructure/Blueprints/BlueprintExtensions.cs:60` 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 × 3) ToyBox/Classes/ModKit/UI/UI+Controls.cs:373— ToyBox/Classes/ModKit/UI/UI+Controls.cs:373-382 | ToyBox/Classes/ModKit/UI/UI+Controls.cs:442-451 | ToyBox/Classes/ModKit/UI/UI+Controls.cs:493-502 — 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 `ToyBox/Classes/ModKit/UI/UI+Controls.cs:373` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ToyBox/Classes/ModKit/UI/UI+Controls.cs:441` calls `Round`, `Pow` and `ToyBox/Classes/ModKit/UI/UI+Controls.cs:372` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) ToyBox/Classes/MainUI/MulticlassPicker.cs:120— ToyBox/Classes/MainUI/MulticlassPicker.cs:120-129 | ToyBox/Classes/MainUI/MulticlassPicker.cs:184-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. Read the line range as the matched WINDOW rather than a finished unit: at `ToyBox/Classes/MainUI/MulticlassPicker.cs:120` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 4) ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:605— ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:605-613 | ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:619-627 | ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:634-642 | ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:649-657 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `__instance` to `ref UnitEntityData` in one and `ref BlueprintUnit` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:631` calls `HarmonyPatch` and `ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:617` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9–10 lines × 2) ToyBox/Classes/MainUI/BraaainzEditor.cs:103— ToyBox/Classes/MainUI/BraaainzEditor.cs:103-112 | ToyBox/Classes/MainUI/BraaainzEditor.cs:131-139 — both copies are in the same file, so extract the 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 `ToyBox/Classes/MainUI/BraaainzEditor.cs:103` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 × 3) ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:138— ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:138-142 | ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:162-166 | ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:178-182 — 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 `ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:138` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) ToyBox/Classes/MainUI/PatchTool/Infrastructure/PatchOperation.cs:96— ToyBox/Classes/MainUI/PatchTool/Infrastructure/PatchOperation.cs:96-101 | ToyBox/Classes/MainUI/PatchTool/Infrastructure/PatchOperation.cs:133-138 | ToyBox/Classes/MainUI/PatchTool/Infrastructure/PatchOperation.cs:169-174 — 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 `ToyBox/Classes/MainUI/PatchTool/Infrastructure/PatchOperation.cs:96` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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· Edited copies of one member (4 members, 9+ corresponding lines) · ×1
Edited copies of one member (4 members, 9+ corresponding lines) ToyBox/Classes/MonkeyPatchin/Vendor/BulkSellLogic.cs:185— ToyBox/Classes/MonkeyPatchin/Vendor/BulkSellLogic.cs:185-193 | ToyBox/Classes/MonkeyPatchin/Vendor/BulkSellLogic.cs:195-204 | ToyBox/Classes/MonkeyPatchin/Vendor/BulkSellLogic.cs:206-215 | ToyBox/Classes/MonkeyPatchin/Vendor/BulkSellLogic.cs:217-226 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
IC1 · Incompleteness & stubs· Both branches are identical · ×1
Both branches are identical — the condition decides nothing ToyBox/Classes/MainUI/PartyEditor/PartyEditor.cs:201— Both arms of `mythicLevel < 10 ? … : …` are `" my"`, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
SC1 · Supply-chain hygiene· NuGet dependencies are not locked · ×1
NuGet dependencies are not locked ToyBox/ToyBox.csproj:60— ToyBox/ToyBox.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
Sync-over-async (deadlock risk) ToyBox/Classes/Infrastructure/Blueprints/BlueprintLoader.cs:168— 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.
X5 · Nullable reference types· Null guard scopes only part of the work it protects · ×1
Null guard scopes only part of the work it protects ToyBox/Classes/ModKit/Utility/Utilities.cs:88— This method contradicts itself about `values`: line 66 tests it for null before doing anything with it — the author's own statement that null is an input this code expects — but that `if` scopes only the block beneath it, and line 88 then dereferences `values` as `values.Select` AFTER the block has closed, where the guard no longer applies. A null `values` skips the guarded body and reaches that line anyway, throwing NullReferenceException on exactly the input the guard was written for. If the dereference belongs to the guarded work, move it inside the block; if `values` truly cannot be null by then, the guard above is misleading and should go.
Duplicated predicate ToyBox/Classes/MainUI/MulticlassPicker.cs:76— `!cd.CharacterClass.IsMythic && ch.IsClassGestalt(cd.CharacterClass)` appears character-identically in 2 files — ToyBox/Classes/MainUI/MulticlassPicker.cs, ToyBox/Classes/MainUI/PartyEditor/ClassesEditor.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate ToyBox/Classes/ModKit/UI/KeyBindings/KeyBind.cs:20— `Input.GetKey(KeyCode.LeftAlt) || Input.GetKey(KeyCode.RightAlt)` appears character-identically in 2 files — ToyBox/Classes/ModKit/UI/KeyBindings/KeyBind.cs, ToyBox/Classes/ModKit/UI/KeyBindings/UI+KeyBindings.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate ToyBox/Classes/ModKit/UI/KeyBindings/KeyBind.cs:19— `Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightControl)` appears character-identically in 2 files — ToyBox/Classes/ModKit/UI/KeyBindings/KeyBind.cs, ToyBox/Classes/ModKit/UI/KeyBindings/UI+KeyBindings.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate ToyBox/Classes/ModKit/UI/KeyBindings/KeyBind.cs:18— `Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift)` appears character-identically in 4 files — ToyBox/Classes/ModKit/UI/KeyBindings/KeyBind.cs, ToyBox/Classes/ModKit/UI/KeyBindings/UI+KeyBindings.cs, ToyBox/Classes/MonkeyPatchin/BagOfPatches/Clipboard+Guids.cs, ToyBox/Classes/MonkeyPatchin/BagOfPatches/TweaksWrath.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:190— `Settings.showComponents && bpso.ComponentsArray?.Length > 0` appears character-identically in 2 files — ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs, ToyBox/Classes/MainUI/Browser/SearchAndPick.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:195— `Settings.showElements && bpso.ElementsArray?.Count > 0` appears character-identically in 2 files — ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs, ToyBox/Classes/MainUI/Browser/SearchAndPick.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:143— `action.name == "<" || action.name == ">"` appears character-identically in 2 files — ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs, ToyBox/Classes/MainUI/Browser/SearchAndPick.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate ToyBox/Classes/MainUI/Browser/SearchAndPick.cs:311— `bp is BlueprintItem itemBlueprint && itemBlueprint.FlavorText?.Length > 0` appears character-identically in 2 files — ToyBox/Classes/MainUI/Browser/SearchAndPick.cs, ToyBox/Classes/MainUI/PatchTool/UI/BlueprintPickerGUI.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate ToyBox/Classes/MonkeyPatchin/EnhancedUI/ItemsFilter.cs:71— `cb != null && (!cb.m_Settings.Once || !cb.m_Triggered)` appears character-identically in 2 files — ToyBox/Classes/MonkeyPatchin/EnhancedUI/ItemsFilter.cs, ToyBox/Classes/MonkeyPatchin/EnhancedUI/LootWrath.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate ToyBox/Classes/MainUI/MulticlassPicker.cs:78— `cd.CharacterClass.IsMythic && ch.IsClassGestalt(cd.CharacterClass)` appears character-identically in 2 files — ToyBox/Classes/MainUI/MulticlassPicker.cs, ToyBox/Classes/MainUI/PartyEditor/ClassesEditor.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate ToyBox/Classes/MainUI/MulticlassPicker.cs:80— `ch.IsClassGestalt(cd.CharacterClass) || !cd.CharacterClass.IsMythic && classCount - gestaltCount > 1 || cd.CharacterClass.IsMythic && mythic…` appears character-identically in 2 files — ToyBox/Classes/MainUI/MulticlassPicker.cs, ToyBox/Classes/MainUI/PartyEditor/ClassesEditor.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate ToyBox/Classes/Infrastructure/Teleport.cs:46— `currentMode == GameModeType.Default || currentMode == GameModeType.Pause` appears character-identically in 2 files — ToyBox/Classes/Infrastructure/Teleport.cs, ToyBox/Classes/Infrastructure/UnitEntityDataUtils.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs:187— `description != null && description.Length > 0` appears character-identically in 2 files — ToyBox/Classes/MainUI/Browser/BlueprintListUI.cs, ToyBox/Classes/MainUI/Browser/SearchAndPick.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
redundant comment ToyBox/Classes/Infrastructure/Blueprints/BlueprintExtensionsQuest.cs:113— "dialog cue conditions" repeats the code it sits on: 3 of its 3 words (dialog, cue, conditions) are already in `var dialogCueConditions = dialogInteractions`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment ToyBox/Classes/Infrastructure/Blueprints/BlueprintExtensionsQuest.cs:123— "action interaction conditions" repeats the code it sits on: 3 of its 3 words (action, interaction, conditions) are already in `var actionInteractionConditions = actionInteractions`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment ToyBox/Classes/MainUI/ActionsWrath.cs:387— "from KingdomTimelineManager.Advance" repeats the code it sits on: 4 of its 4 words (kingdom, timeline, manager, advance) are already in `if (!KingdomTimelineManager.CanAdvanceTime()) {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment ToyBox/Classes/MainUI/Browser/BlueprintActionWrath.cs:297— "BlueprintActivatableAbility" repeats the code it sits on: 3 of its 3 words (blueprint, activatable, ability) are already in `BlueprintAction.Register<BlueprintActivatableAbility>("Add".localize(),`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment ToyBox/Classes/ModKit/UI/UI+Controls.cs:123— "Action Text Fields" repeats the code it sits on: 3 of its 3 words (action, text, fields) are already in `public static void ActionTextField(ref string text,`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:288— "Giant Fly checks" repeats the code it sits on: 3 of its 3 words (giant, fly, checks) are already in `if (giantFlyBegone) {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment ToyBox/Classes/MonkeyPatchin/BagOfPatches/MiscWrath.cs:400— "Giant Fly checks" repeats the code it sits on: 3 of its 3 words (giant, fly, checks) are already in `if (giantFlyBegone) {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 5 significant file(s) lose their only recent owner: ToyBox/Classes/MainUI/PatchTool/UI/PatchToolTabUI.cs, ToyBox/Classes/MonkeyPatchin/BagOfPatches/Dialog.cs, ToyBox/Classes/Infrastructure/Blueprints/BlueprintLoader.cs, ToyBox/Classes/MainUI/PatchTool/Infrastructure/PatchOperation.cs, ToyBox/Classes/Infrastructure/Update/VersionChecker.cs. Pair on, review, or document these before any departure.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 1 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (6 single-owned of 120 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 120 of the 147 production source files in this repository met that bar). They are anonymized user #2 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: ToyBox/Classes/Infrastructure/Compatibility.cs.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M2 · Architecture documentation· No architecture diagram/doc · ×1
No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
No dependency-update automation ToyBox/ToyBox.csproj:60— `ToyBox/ToyBox.csproj` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
No release approval gate — The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
Silent fallback default in catch ToyBox/Classes/MainUI/Crusade/ArmiesEditor.cs:665— `ArmyDistance` swallows every exception and returns `dist` still holding `-1.0f` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Outdated: BepInEx.AssemblyPublicizer.MSBuild — BepInEx.AssemblyPublicizer.MSBuild 0.4.2 → 0.4.3 available (referenced by ToyBox).
Outdated: Microsoft.NETFramework.ReferenceAssemblies — Microsoft.NETFramework.ReferenceAssemblies 1.0.2 → 1.0.3 available (referenced by ToyBox).
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 7 file(s) — `ToyBox/Classes/MainUI/BagOfTricks.cs`, `ToyBox/Classes/MainUI/EnhancedUI/EnhancedSpellbookController.cs`, `ToyBox/Classes/MainUI/PatchTool/Utils/InstantiationHelper.cs`, `ToyBox/Classes/ModKit/DataViewer/ReflectionTreeView.cs`, `ToyBox/Classes/MonkeyPatchin/BagOfPatches/ActionBar.cs`, … (+2 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1eaae-fc06-7e4f-b14b-f6e793a01e12 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 37 · Warnings: 629 · Recommendations: 33 · Info: 2 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 17-11-2026 @ 18:04 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.