Public report — DbRepository, published 20 Sep 2026.
Concrete security findings (which rule fired, in which file, on which line; CVE IDs, secret matches,
dependency versions) are REDACTED in this version; ask the repo owner for the full report.
Public
Codebase surveyMeasured under the Code Assurance Index · rubric rubric-2026.09.15 (frozen) · verify this surveyFiledcd_9bc9fe65c1454537b68a4af5e8f3a801
Filed 25 September 2026, 05:08 UTC
Public
28 critical315 serious128 minor6 could not be resolved — could be critical — see Limitations
This survey was produced by
Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
20 September 2026, 19:57 UTC
A measurement, not a certificate. The Code Assurance Index does not certify,
approve or guarantee this codebase; it records a reproducible number and the evidence it was computed from. The
standard is authored by Canine Development, who also build Watchdog — its only implementation today. That is said
here so the number is checked rather than believed.
Grounded in facts. Every number here is computed, not narrated — reproducible, tool-backed, and traceable to a line of code. How to trust this ▸
445findings with an exact file:lineof 471 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
67/117dimensions across the health lenses20058 LoC · 26 projects — wide & deep
This system is a workable asset carrying real risk, anchored by a 46% overall health score. While the core business logic is sound, the surrounding operational and security foundations are too fragile to support confident, rapid delivery. The value tied up here is significant: a medium-sized codebase with roughly 20,000 lines of production code, representing about half a person-year of effort to rebuild. This is not trivial boilerplate; nearly half the code is complex branching logic, meaning changes ripple deeply. The cost to rebuild is approximately €66,000, but the cost of failure—outages, security breaches, or delayed features—is far higher given the current state of readiness.
The primary risk lies in operational fragility. With a readiness score of just 39%, the system lacks the testing depth and observability needed for safe, independent operation. This creates a high probability of defects slipping into production and extends the time required to deploy changes, directly impacting delivery speed and reliability. Furthermore, security exposure is a critical concern. The presence of leaked secrets and the absence of automated security checks in the build pipeline mean that vulnerabilities can be introduced silently. This is not merely a technical debt issue; it is a direct threat to data integrity and compliance, potentially leading to severe business consequences if exploited.
Despite these risks, the system has genuine strengths. The domain modeling is excellent at 95%, indicating that the core business rules are well-understood and clearly expressed. This solid foundation makes future refactoring and feature development more predictable once the operational and security layers are stabilized. The architecture is also relatively healthy at 81%, suggesting that the structural design is robust and less prone to cascading failures from minor changes.
To maximize leverage, focus first on hardening the security pipeline. Integrating a static analysis tool into the continuous integration process is the highest-return action. It stops security regressions before they land, protecting the business from exposure with minimal ongoing effort. Simultaneously, address the leaked secrets immediately to eliminate immediate threats. These steps provide the quickest path to reducing risk and restoring confidence in the system’s ability to deliver safely.
How the score is built — each lens's share of the headlineWidth is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
233 finding(s) are new versus the previous scan (2026-07-20) — surfaced by this scheduled scan itself, no pull request required. Showing the first 100; the full set is in the report.
A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.
This codebase represents roughly ~0.5 person-years of build effort (about ~€66,000 to rebuild). Its weakest lens is Readiness at 39% — the part of that asset most exposed by the findings below.
How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.2) — library/CLI, DDD/clean architecture, high decision density × a 0.7× quality factor, at €60–95/h; indicative, ±~30%. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).
Top priorities
The highest-leverage moves; the full ranked list is in the Roadmap below.
1
Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with REDACTED, REDACTED.
Add a SAST step to CI running what this repository's stack ships: CodeQL's csharp pack, or a .NET security analyzer package — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
→ Prioritise tests + a second reviewer on the worst files (QueryableSqlBuilder.cs, DatabaseTypeExtensions.cs, InsertableSqlBuilder.cs).
Value concentrated against a weak lens · High · Value at risk
This is a REDACTED asset (~0.5 person-years to rebuild), and its weakest lens is Readiness at 39%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
→ Direct remediation budget at Readiness first — highest risk-reduction per euro on an asset this size.
Highest-leverage move · REDACTED · Leverage
Of everything flagged, the best return on effort is: Add a SAST step to CI running what this repository's stack ships: CodeQL's csharp pack, or a .NET security analyzer package — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Add a SAST step to CI running what this repository's stack ships: CodeQL's csharp pack, or a .NET security analyzer package — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Architecture — bounded-context dependency graph
Each box is a bounded context (its layer projects grouped, or a project count when large); arrows show dependencies between contexts. A shared kernel is where many arrows converge.
Architecture — module dependency matrix
Rows and columns are the same modules, ordered so that a module only depends on ones above it. A cell means the row depends on the column, and its number is how many type pairs create that dependency. Read one thing: is anything above the diagonal? A mark there is a dependency cycle. (A cycle is all this shows — an unusual but cycle-free dependency sits below the diagonal like any other.)
7 modules, 7 dependencies. Every dependency points down the layering — no cycles.
Module dependency matrix. The row depends on the column; the number is how many type pairs create the dependency. A cell above the diagonal is part of a dependency cycle.
DbRepository.DbFirst uses DbRepository. Changing DbRepository can break DbRepository.DbFirst, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
5→1 DbRepository.Extensions depends on DbRepository✕
Type pairs
28 distinct (type in DbRepository.Extensions → type in DbRepository) references. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
DbRepository.Util uses DbRepository. Changing DbRepository can break DbRepository.Util, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
7→1 DbRepository.CodeFirst depends on DbRepository✕
Type pairs
26 distinct (type in DbRepository.CodeFirst → type in DbRepository) references. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
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
A02:2021 — Cryptographic Failures
2
High / Critical
A03:2021 — Injection
1
REDACTED
Roadmap
First, integrate a security analysis step into the CI pipeline to block regressions and immediately resolve the two leaked secrets found in configuration files. Next, address the three banned license violations and establish a changelog to track release history. Finally, restrict the public API surface by making types internal by default to ensure internal changes do not break external consumers.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with REDACTED, REDACTED.
Add a SAST step to CI running what this repository's stack ships: CodeQL's csharp pack, or a .NET security analyzer package — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Encrypt sensitive data at rest (ASP.NET Core Data Protection / column encryption) and manage keys in a vault. Skip if delegated to infra (Postgres TDE, KMS, etc.).
Each finding names the diagnostic call and the expression inside its argument whose cost scales with a collection. Confirm from the two that the argument is built before the call — that is C#'s evaluation order, not a guess — then put the construction behind the same level check the sink applies: `if (logger.IsEnabled(LogLevel.Trace))` for Microsoft.Extensions.Logging, the repository's own debug flag where it has one, or a message template whose ARGUMENTS the logging framework only formats when the level is on. Moving the call is not the fix: it is the join/projection in the argument that is paid, wherever the call sits.
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 — 28
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 — 315
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 — 128
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 6
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 62 of 67 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 5 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 67 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, 445 of 471 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-contributor repository — bus factor is not applicable (1 contributor(s) across 394 commit(s) sampled, automation and bot accounts excluded). Concentration needs a team to concentrate: with one contributor there is nobody to spread the knowledge to, so there is nothing here for the owner to act on.
D18 Solution Shape — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. `dotnet build` reported 1 error(s), and the diagnostics it printed were: MSB4803: The task "ResolveComReference" is not supported on the .NET Core version of MSBuild. Please use the .NET Framework version of MSBuild. See https://aka.ms/msbuild/MSB4803 for further details.. None of them is a .NET compiler diagnostic, which is the only signal this check reads as "the code does not compile", so the failure is recorded as a build-environment gap rather than a code defect. The usual causes are a project that targets a platform this run cannot build (a Windows-only target framework on a Linux worker) or a build step that shells out to a tool the image does not carry. Solution Shape is scored on structure and is NOT capped. Semantic analysis is independent of this build and covers every project that loaded — but a project whose restore did not complete has no resolved references, so treat its results as absent rather than clean. ★ The reach of that test, stated so this classification can be checked rather than taken on trust: it reads the C# (CS), Visual Basic (BC) and F# (FS) compiler series, and treats SDK, NuGet-restore and MSBuild codes (NETSDK, NU, MSB) as evidence that the build did not run rather than that the code is broken — read the diagnostics named above and judge for yourself. You can widen what we reach: if this build is meant to run off its own platform, without host tooling we do not carry, the diagnostics named above are what stopped it. If it is deliberately platform-bound — a Windows-only desktop product, say — there is nothing to do here: the note records our reach, not a defect in your build.
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.
D23 Boundary Type-Coupling — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. At 23k LoC across 26 projects this is a large multi-module system that clearly needs explicit bounded contexts. Bounded contexts cannot be inferred from a codebase that is not physically organised by them (D-321), so with none declared there are no boundaries for the coupling pass to measure across. You can widen what we reach: name this codebase's bounded contexts (≥2 module groups, e.g. per subsystem) so cross-boundary type coupling can be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D39 IL Efficiency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. IL NOT MEASURED: the analyzer's own build of this repository failed for an ENVIRONMENT reason (exit 1) — MSBuild's engine or the CLR gave up, or our image does not carry the SDK band/targeting pack this repository needs. This is OUR limitation, not a defect in the repo, and it is not a statement that this repository fails to build. D18 owns the question of whether this repository builds; it was not answered here.
IC1 Incompleteness & stubs — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 48 further occurrence(s) are not listed individually; the score already reflects all 88.
P1 CI/CD gates — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. A CI pipeline exists and the word "test" appears, but no explicit test-runner invocation (your stack's test command, or a test job) was matched — so either the gate runs tests through a step this pass could not recognise, or "test" is incidental here (a path, "latest", a reporter). Which of the two it is cannot be settled from this dimension's evidence; the coverage dimensions report whether a suite exists at all. You can widen what we reach: name the test runner explicitly in the pipeline step (your stack's test command, or a job named for the suite) so the gate is unambiguous to a reader and to this pass.
X2 Cancellation propagation — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 39 further occurrence(s) are not listed individually; the score already reflects all 79.
X4 Structured logging — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 40 further occurrence(s) are not listed individually; the score already reflects all 80.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — 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 Watchdog's isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D11 Test Reliability: Flakiness is inferred from history/markers — Watchdog runs the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
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.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D18 Solution Shape: Build integrity reflects whether the solution compiled in this environment — a build that needs a private feed, a specific SDK, or a generated file absent from the repo can read as broken when it is merely unreproducible here.
D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
D24 Comment Value: Comment value (WHY vs WHAT) is an LLM judgement over a bounded sample — it is advisory and cannot weigh a comment against the precise code change it was written to explain.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
The LLM boundary
LLM-set scores this run (5): D19, D21, D24, D26, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
9 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was ExpressionExtensions.GetFieldNames at 48. A further 5 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 DatabaseTypeExtensions.MarkAsIdentifier at 30 — they are counted neither in the figure above nor in this dimension's score. 3 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: src/Sean.Core.DbRepository/Extensions/DatabaseTypeExtensions.cs (DatabaseTypeExtensions.MarkAsIdentifier at 30), src/Sean.Core.DbRepository/SqlBuilder/InsertableSqlBuilder.cs (InsertableSqlBuilder.BuildSqlCommand at 28), src/Sean.Core.DbRepository/Extensions/DbProviderFactoryExtensions.cs (DbProviderFactoryExtensions.GetDatabaseType at 21). 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.
+ 4 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 ExpressionExtensions.GetFieldNames (cyclomatic 48) finding(s) in Cyclomatic Complexity — start with ExpressionExtensions.cs. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 QueryableSqlBuilder.BuildSqlCommand (cyclomatic 40) finding(s) in Cyclomatic Complexity — start with QueryableSqlBuilder.cs. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 SqlParameterUtil.ParseSqlParameterTokensCore (cyclomatic 34) finding(s) in Cyclomatic Complexity — start with SqlParameterUtil.cs. — One of this dimension's main actionable groups (1 warning-level).
Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 17 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 ExpressionExtensions.GetFieldNames (cognitive 115) finding(s) in Cognitive Complexity — start with ExpressionExtensions.cs. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 SqlParameterUtil.ParseSqlParameterTokensCore (cognitive 45) finding(s) in Cognitive Complexity — start with SqlParameterUtil.cs. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 QueryableSqlBuilder.BuildSqlCommand (cognitive 27) finding(s) in Cognitive Complexity — start with QueryableSqlBuilder.cs. — One of this dimension's main actionable groups (1 warning-level).
Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes9.0 / 10Stronggated by 7 serious findings✓ 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 6 TooManyMethods finding(s) in God Classes — start with BaseRepository.cs (2), DbFactory.cs, QueryableSqlBuilder.cs. — One of this dimension's main actionable groups (6 warning-level).
Resolve the 1 FileTooLong finding(s) in God Classes — start with BaseRepository.cs. — One of this dimension's main actionable groups (1 warning-level).
Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
108 duplicated block group(s) detected. A further 7 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 42 of the 115 are in trees this repository does not ship — vendored, example/demo, 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.
+ 73 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 4 Duplicated block (24 lines × 2) finding(s) in Code Duplication — start with DataRowExtensions.cs, DbFactory.cs, CheckInLogEntity.cs. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 4 Duplicated block (20 lines × 2) finding(s) in Code Duplication — start with BaseRepository.cs (2), SqlGeneratorForFirebird.cs, SqlGeneratorForOpenGauss.cs. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 4 Duplicated block (13 lines × 3) finding(s) in Code Duplication — start with SqlGeneratorForClickHouse.cs, SqlGeneratorForMySql.cs, ITestSimpleService.cs. — One of this dimension's main actionable groups (4 warning-level).
Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling10.0 / 10Adequategated by 4 critical findings✓ 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.
Resolve the 4 Layer violation finding(s) in Coupling. — One of this dimension's main actionable groups (4 issue-level).
Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
What it measures: How much of the code is actually exercised by tests.
Method: Coverage from coverlet runs or committed reports (Cobertura/OpenCover/lcov), computed per-file with structured exclusions for generated, trivial, and glue code. When the suite can't be built/run in-image AND no report is committed, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.
+ 3 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 20 Low coverage finding(s) in Code Coverage — start with NamingConventionAttribute.cs, SequenceAttribute.cs, DeleteableSqlBuilder.cs. — One of this dimension's main actionable groups (20 warning-level).
Resolve the 2 CRAP 124 finding(s) in Code Coverage — start with DatabaseTypeExtensions.cs (2). — One of this dimension's main actionable groups (2 warning-level).
Resolve the 1 CRAP 191 finding(s) in Code Coverage — start with DbProviderFactoryExtensions.cs. — One of this dimension's main actionable groups (1 warning-level).
Enforce Code Coverage in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d8_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
482 test methods: 482 unit, 0 integration, 0 BDD, 0 e2e.
✓ On the Gold path — maintain.
Detailed fixes: d9_recommendation.md.
Do you agree with this assessment?
D10 · Test Quality10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
0 skipped, 0 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 482 tests.
✓ On the Gold path — maintain.
Detailed fixes: d10_recommendation.md.
Do you agree with this assessment?
D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests pass reliably, with no flakiness.
Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.
What it measures: Whether dependencies are current, secure, and not bloated.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
Enforce Secret Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
4 of 286 packages use a banned license. ★ DEPTH: this repository's MSBuild projects declare 49 direct `PackageReference`(s), and 205 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.
Banned license: MySql.Data · ×3
What to do
Resolve the 3 Banned license finding(s) in License Compliance. — One of this dimension's main actionable groups (3 issue-level).
Enforce License Compliance in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d14_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Top hotspots: src/Sean.Core.DbRepository/SqlBuilder/QueryableSqlBuilder.cs (3×40=120); src/Sean.Core.DbRepository/Extensions/DatabaseTypeExtensions.cs (3×30=90); src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/BaseSqlGenerator.cs (3×30=90) Repeated repair below the complexity floor: src/Sean.Core.DbRepository/Repository/BaseRepository.cs (6 of 7 changes were fixes); src/Sean.Core.DbRepository/Factory/DbFactory.cs (4 of 4 changes were fixes); src/Sean.Core.DbRepository/DbFirst/CodeGenerator/CodeGeneratorForMySql.cs (3 of 3 changes were fixes)
Resolve the 8 Hotspot finding(s) in Churn × Complexity Hotspots — start with QueryableSqlBuilder.cs, DatabaseTypeExtensions.cs, BaseSqlGenerator.cs. — One of this dimension's main actionable groups (8 warning-level).
Resolve the 4 Repeated repair finding(s) in Churn × Complexity Hotspots — start with BaseRepository.cs, DbFactory.cs, CodeGeneratorForMySql.cs. — One of this dimension's main actionable groups (4 warning-level).
Detailed fixes: d15_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.
Resolve the 15 WriteOnlyPrivateField finding(s) in Explicit Debt — start with UserService.cs (3), DBTest.cs (3), UserRepository.cs (3). — One of this dimension's main actionable groups (15 issue-level).
Resolve the 56 DeadPreprocessorBranch finding(s) in Explicit Debt — start with DIExtensions.cs (24), REDACTED (23), OracleTest.cs (2). — One of this dimension's main actionable groups (56 warning-level).
Resolve the 39 CommentedOutCode finding(s) in Explicit Debt — start with BaseRepository.cs (6), SqlGeneratorForQuestDB.cs (4), SqlGeneratorForShenTong.cs (4). — One of this dimension's main actionable groups (39 warning-level).
Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the solution is laid out in a sensible, conventional structure.
Method: Solution structure: project count, decomposition, shell-project detection, build success (confirmed failures cap the score); traced to actual .sln files and binaries. Deterministic.
26 projects, 879 source files, 37886 hand-written lines of code (23828 production / 14058 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), 50 inter-project edges (build NOT measured — `dotnet build` did not complete in the analyzer, so the build half of this dimension is unmeasured rather than failed: the score above rests on structure alone and is not capped. The diagnostics that stopped it are named under Limitations.)
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.
The README is a well-structured, multi-section document for an ORM framework covering the project's purpose (an ORM framework supporting databases like MySQL, MariaDB, TiDB, and SQL Server), its main features (DbFirst/CodeFirst, master-slave replication, sharding with custom table naming, expression tree parsing), a database list, GitHub/Gitee links, NuGet package listing, and test instructions. It also includes an outline for the full document: 🌈 简介; ⭐ 开源; 💖 Nuget Packages; 🍉 数据库; 💯 性能测试; 👉 使用示例; 数据库连接字符串配置; 数据库提供者工厂配置; 方式1:代码; 方式2:配置文件; 常用实体类特性; 增删改查示例; 仓储模式; 新增数据示例; 删除数据示例; 更新数据示例; 查询数据示例; WhereExpression示例; FieldExpression示例; ❓ 常见问题; if UseSqlite; endif. The test README gives concrete run commands for MySQL integration testing, which is a strong usage signal.
Resolve the 14 Low XML-doc coverage finding(s) in Documentation Quality — start with Sean.Core.DbRepository.csproj, Example.Dapper.Core.ConsoleApp.csproj, Sean.Core.DbRepository.Dapper.csproj. — One of this dimension's main actionable groups (14 warning-level).
Resolve the 1 Documentation finding(s) in Documentation Quality — start with README.md. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.
0 naming inconsistencies across 200 sampled symbols.
✓ On the Gold path — maintain.
Detailed fixes: d21_recommendation.md.
Do you agree with this assessment?
D24 · Comment ValueExemplary◐ Sampled · advisory
What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).
Method: Judged by language model at low temperature (0.0-0.1) on deterministically sampled inline comments with surrounding code; findings verified back to sampled comments by substring match. Advisory, sampled.
1 of 19 projects flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
56 % of calls cross a namespace and 3 % go through an interface, but 100 % 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).
1 finding(s): 0 critical, 0 high, 1 medium, 0 low. semgrep hit a parse error in 10 file(s) — `examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Services/TestService.cs` (line 12, lines 13–15), `examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Services/TestSimpleService.cs` (line 16, line 17, line 18, …), `examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Services/UserService.cs` (line 11, lines 12–14), `examples/ADO.NET/NetCore/Example.ADO.NETCore.ConsoleApp/Impls/CodeFirstTest.cs` (line 12), `examples/ADO.NET/NetCore/Example.ADO.NETCore.ConsoleApp/Impls/DBTest.cs` (lines 8–24), … (+5 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 10 of those file(s) — `examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Services/TestService.cs`, `examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Services/TestSimpleService.cs`, `examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Services/UserService.cs`, `examples/ADO.NET/NetCore/Example.ADO.NETCore.ConsoleApp/Impls/CodeFirstTest.cs`, `examples/ADO.NET/NetCore/Example.ADO.NETCore.ConsoleApp/Impls/DBTest.cs`, … (+5 more) — the break is a C# primary constructor, which semgrep's grammar cannot parse and which hides the type from every rule scoped to it; those files were re-scanned from a shadow copy with the constructor's parameter list blanked (line and column preserving), which restores the type to the rules, and 0 additional row(s) came from that pass. Only the header's own parameter list is unread in them.
REDACTED
What to do
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
Every significant source file has living knowledge — recently and meaningfully worked. Counted over 71 of the 141 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 2 Change coupling finding(s) in Change Coupling — start with DataRowExtensions.cs (2). — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether 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 14 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 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 — Whether any singleton service captures a scoped/transient dependency — a silent lifetime/threading bug.
Method: Roslyn scan: DI registrations parsed from AddSingleton/Scoped/Transient; each singleton checked for captured shorter-lifetime dependencies. Exhaustive, deterministic.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
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.
`Example.Dapper.Domain` is a Domain project but references `Example.Dapper.Infrastructure`, a Infrastructure project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
`Example.Dapper.Application` is a Application project but references `Example.Dapper.Infrastructure`, a Infrastructure project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
`Example.Dapper.Core.Domain` is a Domain project but references `Example.Dapper.Core.Infrastructure`, a Infrastructure project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
`Example.ADO.NETCore.Domain` is a Domain project but references `Example.ADO.NETCore.Infrastructure`, a Infrastructure project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
Other · Architecture — Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.
Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.
Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. Deterministic, type-level.
`IBaseRepository` declares 51 members: `Factory`, `DbType`, `TableName`, `Execute`, `Execute`, `Query`, `Query`, `Get`, `Get`, `ExecuteScalar`, `ExecuteScalar`, `ExecuteScalar`, `ExecuteScalar`, `ExecuteDataTable`, `ExecuteDataTable`, `ExecuteDataSet`, `ExecuteDataSet`, `ExecuteReader`, `ExecuteReader`, `Execute`, `ExecuteTransaction`, `ExecuteAutoTransaction`, `IsTableExists`, `IsTableFieldExists`, `AddTableField`, `DeleteAll`, `DropTable`, `ExecuteAsync`, `ExecuteAsync`, `QueryAsync`, `QueryAsync`, `GetAsync`, `GetAsync`, `ExecuteScalarAsync`, `ExecuteScalarAsync`, `ExecuteScalarAsync`, `ExecuteScalarAsync`, `ExecuteDataTableAsync`, `ExecuteDataTableAsync`, `ExecuteDataSetAsync`, and 11 more. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 51 declarations carry 31 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 31 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — src/Sean.Core.DbRepository/Contracts/IBaseRepository.cs:13
`IBaseRepository<TEntity>` declares 58 members: `Add`, `Add`, `AddOrUpdate`, `AddOrUpdate`, `Delete`, `Delete`, `Delete`, `DeleteAll`, `Update`, `Update`, `UpdateByDto`, `UpdateByDto`, `UpdateByDto`, `UpdateByDto`, `UpdateByDto`, `UpdateByDto`, `Increment`, `Decrement`, `Save`, `Save`, `PageQuery`, `Query`, `QueryOffset`, `Get`, `Count`, `Exists`, `IsTableExists`, `IsTableFieldExists`, `AddTableField`, `AddAsync`, `AddAsync`, `AddOrUpdateAsync`, `AddOrUpdateAsync`, `DeleteAsync`, `DeleteAsync`, `DeleteAsync`, `DeleteAllAsync`, `UpdateAsync`, `UpdateAsync`, `UpdateByDtoAsync`, and 18 more. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 58 declarations carry 36 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 36 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — src/Sean.Core.DbRepository/Contracts/IBaseRepository.cs:225
`IQueryable<TEntity>` declares 22 members under just 13 distinct name(s): `SelectFields`, `IgnoreFields`, `MaxField`, `MinField`, `SumField`, `AvgField`, `CountField`, `CountDistinctField`, `DistinctFields`, `SelectFields`, `IgnoreFields`, `MaxField`, `MinField`, `SumField`, `AvgField`, `CountField`, `CountDistinctField`, `DistinctFields`, `Top`, `Page`, `Offset`, `SetParameter`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. That is an OVERLOAD SET, not 22 separate responsibilities: a caller binds to 13 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller's side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER's — all 22 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface. — src/Sean.Core.DbRepository/Contracts/IQueryable.cs:6
`ISqlCommand` declares 17 members: `DbType`, `Sql`, `Parameter`, `Master`, `Transaction`, `Connection`, `CommandTimeout`, `CommandType`, `OutputParameterOptions`, `BindSqlParameterType`, `UnusedSqlParameterRemoved`, `SqlParameterSorted`, `UseQuestionMarkParameter`, `ConvertParameterToDictionaryByName`, `ConvertParameterToDictionaryByPosition`, `ConvertSqlToUseQuestionMarkParameter`, `ConvertSqlToNonParameter`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — src/Sean.Core.DbRepository/Contracts/ISqlCommand.cs:5
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
Where the width is an overload set rather than separate responsibilities, collapse the overloads instead — segregating those relieves no caller.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Do you agree with this assessment?
C1 · Data Protection0.0 / 10Critical✓ Tool-verified
Other · Security — Whether sensitive data is encrypted at rest and in transit and keys are vaulted.
Method: Roslyn plus filesystem scan: encryption presence (EF ColumnEncryption, key-vault references, HTTPS enforcement) and key-derivation KDF detection. Deterministic.
No data-protection or encryption usage (ASP.NET Data Protection, AES, column encryption, PBKDF2) was found — sensitive data at rest may be unprotected. If TDE/KMS/vault is delegated to infrastructure, ignore.
What to do
Encrypt sensitive data at rest (ASP.NET Core Data Protection / column encryption) and manage keys in a vault. Skip if delegated to infra (Postgres TDE, KMS, etc.).
Enforce HTTPS (UseHttpsRedirection / RequireHttpsMetadata) so data in transit is always encrypted.
Do you agree with this assessment?
DM12 · Ambient inputs in the domain9.5 / 10Exemplary✓ Tool-verified
Other · Domain Modelling — Whether domain types receive the time and randomness their rules depend on, rather than reading the process clock or a global random source directly — an ambient read makes the rule it feeds untestable at the instant that matters and lets two reads inside one operation disagree.
Method: Roslyn (DDD-gated, C#/VB only): domain-layer types scanned for ambient reads — DateTime/DateTimeOffset.Now/UtcNow/Today, Random.Shared, new Random(), Stopwatch.GetTimestamp — resolved against the semantic model, with a comment/string-stripped token fallback only where resolution fails. Body reads are scored; field/property initialisers are surfaced unscored. Apply/When folds excluded (ES1 owns them). Deterministic, symbol-resolved.
`CheckInLogRepository` reads `DateTime.Now` inside `SearchAsync`. The rule this feeds is not a function of its inputs: it cannot be tested at the instant that matters without moving the machine clock, and two reads inside one operation can observe different times. Pass the instant in as a parameter, or inject `TimeProvider`. — examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/CheckInLogRepository.cs:40
`TestRepository` reads `DateTime.Now` inside `TestCRUDAsync`. The rule this feeds is not a function of its inputs: it cannot be tested at the instant that matters without moving the machine clock, and two reads inside one operation can observe different times. Pass the instant in as a parameter, or inject `TimeProvider`. (×3) — examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs:121, examples/Dapper/NetFramework/Example.Dapper.Domain/Repositories/TestRepository.cs:118, examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/TestRepository.cs:121
What to do
Pass the instant into the domain method that needs it, or inject `TimeProvider` (BCL, .NET 8+) and read it there — then a test can choose the moment a rule is evaluated at.
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. (×2) — src/Sean.Core.DbRepository/Repository/BaseRepository.cs:138, examples/ADO.NET/NetCore/Example.ADO.NETCore.Infrastructure/Converter/DbParameterCollectionConverter.cs:29
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.
A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers). (×40) — src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:77, src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:82, src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:94, …
What to do
Clear the softer debt: remove commented-out code and dead branches, re-enable or delete skipped tests, and replace blanket warning suppressions with targeted ones.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
Add a 'Testing' section to the root README — how to run the test suite.
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
Add a README to the 18 of 19 project(s) that lack one — worth up to 1.9 pts.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
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 significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
Do you agree with this assessment?
P1 · CI/CD gates8.5 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
What to do
Run the test suite in CI via an explicit runner step (`dotnet test` for the toolchain this pipeline already uses) and gate merges on it.
Do you agree with this assessment?
P10 · Library API & versioning6.0 / 10Adequate✓ Tool-verified
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries. Exhaustive, deterministic.
849/939 types (90%) are public. For a library, every public type is a stability contract — make internal-by-default and expose only the intended API.
What to do
Make types internal by default; expose only the deliberate public API so internals can change without breaking consumers.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
No static application security testing detected. For this repository's stack, add CodeQL's csharp pack, or a .NET security analyzer package (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 1395 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
What to do
Add a SAST step to CI running what this repository's stack ships: CodeQL's csharp pack, or a .NET security analyzer package — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
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.
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.
Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.
Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. 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. 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. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether async methods accept a CancellationToken so work can be cancelled (adoption curve).
Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage.
Only 0/78 async methods accept a CancellationToken, so in-flight work can't be stopped early when the caller gives up — whatever ends it in your host (shutdown signal, timeout, abandoned request, user cancel). Thread a token through the call chain and honour it at each await and loop; where a method genuinely cannot be interrupted, omitting it is a deliberate choice — judge against your hosting model.
No CancellationToken parameter — this work can't be stopped early once started. (×39) — src/Sean.Core.DbRepository/Extensions/DbCommandExtensions.cs:59, src/Sean.Core.DbRepository/Extensions/DbCommandExtensions.cs:63, src/Sean.Core.DbRepository/Extensions/DbCommandExtensions.cs:67, …
What to do
Thread a CancellationToken through async methods so work stops promptly on cancellation.
Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `ArgumentNullException` tells the caller a parameter was null when it provably was not.
Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements controlled by an `if`, whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`). Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.
Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.
Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. Deterministic, provable per finding. Advisory.
`LogDebug` at line 124 is called with an argument built by `JsonConvert.SerializeObject(queryResult, Formatting.Indented)` (line 124), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. — examples/Dapper/NetCore/Example.Dapper.Core.Application/Services/TestSimpleService.cs:124
`LogDebug` at line 127 is called with an argument built by `JsonConvert.SerializeObject(getResult, Formatting.Indented)` (line 127), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. — examples/Dapper/NetCore/Example.Dapper.Core.Application/Services/TestSimpleService.cs:127
`LogDebug` at line 135 is called with an argument built by `JsonConvert.SerializeObject(executeDataTableResult, Formatting.Indented)` (line 135), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. — examples/Dapper/NetCore/Example.Dapper.Core.Application/Services/TestSimpleService.cs:135
`LogDebug` at line 175 is called with an argument built by `JsonConvert.SerializeObject(queryResult, Formatting.Indented)` (line 175), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. — examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs:175
`LogDebug` at line 178 is called with an argument built by `JsonConvert.SerializeObject(getResult, Formatting.Indented)` (line 178), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. — examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs:178
`LogDebug` at line 186 is called with an argument built by `JsonConvert.SerializeObject(executeDataTableResult, Formatting.Indented)` (line 186), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. — examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs:186
`LogDebug` at line 195 is called with an argument built by `JsonConvert.SerializeObject(getValueTupleData, Formatting.Indented)` (line 195), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. — examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs:195
`LogDebug` at line 197 is called with an argument built by `JsonConvert.SerializeObject(getDynamicData, Formatting.Indented)` (line 197), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. — examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs:197
`LogDebug` at line 132 is called with an argument built by `JsonConvert.SerializeObject(queryResult, Formatting.Indented)` (line 132), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. — examples/Dapper/NetFramework/Example.Dapper.Application/Services/TestSimpleService.cs:132
`LogDebug` at line 135 is called with an argument built by `JsonConvert.SerializeObject(getResult, Formatting.Indented)` (line 135), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. — examples/Dapper/NetFramework/Example.Dapper.Application/Services/TestSimpleService.cs:135
`LogDebug` at line 143 is called with an argument built by `JsonConvert.SerializeObject(executeDataTableResult, Formatting.Indented)` (line 143), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. — examples/Dapper/NetFramework/Example.Dapper.Application/Services/TestSimpleService.cs:143
`LogDebug` at line 172 is called with an argument built by `JsonConvert.SerializeObject(queryResult, Formatting.Indented)` (line 172), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. — examples/Dapper/NetFramework/Example.Dapper.Domain/Repositories/TestRepository.cs:172
`LogDebug` at line 175 is called with an argument built by `JsonConvert.SerializeObject(getResult, Formatting.Indented)` (line 175), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. — examples/Dapper/NetFramework/Example.Dapper.Domain/Repositories/TestRepository.cs:175
`LogDebug` at line 183 is called with an argument built by `JsonConvert.SerializeObject(executeDataTableResult, Formatting.Indented)` (line 183), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. — examples/Dapper/NetFramework/Example.Dapper.Domain/Repositories/TestRepository.cs:183
`LogDebug` at line 192 is called with an argument built by `JsonConvert.SerializeObject(getValueTupleData, Formatting.Indented)` (line 192), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. — examples/Dapper/NetFramework/Example.Dapper.Domain/Repositories/TestRepository.cs:192
`LogDebug` at line 194 is called with an argument built by `JsonConvert.SerializeObject(getDynamicData, Formatting.Indented)` (line 194), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. — examples/Dapper/NetFramework/Example.Dapper.Domain/Repositories/TestRepository.cs:194
`LogDebug` at line 123 is called with an argument built by `JsonConvert.SerializeObject(queryResult, Formatting.Indented)` (line 123), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. — examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Services/TestSimpleService.cs:123
`LogDebug` at line 126 is called with an argument built by `JsonConvert.SerializeObject(getResult, Formatting.Indented)` (line 126), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. — examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Services/TestSimpleService.cs:126
`LogDebug` at line 134 is called with an argument built by `JsonConvert.SerializeObject(executeDataTableResult, Formatting.Indented)` (line 134), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. — examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Services/TestSimpleService.cs:134
`LogDebug` at line 177 is called with an argument built by `JsonConvert.SerializeObject(queryResult, Formatting.Indented)` (line 177), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. — examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/TestRepository.cs:177
`LogDebug` at line 180 is called with an argument built by `JsonConvert.SerializeObject(getResult, Formatting.Indented)` (line 180), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. — examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/TestRepository.cs:180
`LogDebug` at line 188 is called with an argument built by `JsonConvert.SerializeObject(executeDataTableResult, Formatting.Indented)` (line 188), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. — examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/TestRepository.cs:188
`LogDebug` at line 195 is called with an argument built by `JsonConvert.SerializeObject(getTupleData, Formatting.Indented)` (line 195), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. — examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/TestRepository.cs:195
`LogDebug` at line 197 is called with an argument built by `JsonConvert.SerializeObject(getValueTupleData, Formatting.Indented)` (line 197), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. — examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/TestRepository.cs:197
`LogDebug` at line 199 is called with an argument built by `JsonConvert.SerializeObject(getDynamicData, Formatting.Indented)` (line 199), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region. — examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/TestRepository.cs:199
What to do
Each finding names the diagnostic call and the expression inside its argument whose cost scales with a collection. Confirm from the two that the argument is built before the call — that is C#'s evaluation order, not a guess — then put the construction behind the same level check the sink applies: `if (logger.IsEnabled(LogLevel.Trace))` for Microsoft.Extensions.Logging, the repository's own debug flag where it has one, or a message template whose ARGUMENTS the logging framework only formats when the level is on. Moving the call is not the fix: it is the join/projection in the argument that is paid, wherever the call sits.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.
Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. 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. 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.
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.
Do you agree with this assessment?
X32 · Type resolved by simple name across every loaded assembly10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a plugin lookup names the type it means — searching every assembly loaded into the process for a candidate whose SIMPLE name equals a string supplied at runtime, and taking the first one found, is decided by assembly LOAD ORDER rather than by this source, so the same name can resolve to a different type on the next run.
Method: Roslyn syntax only, no semantic model: every invocation of `First`/`FirstOrDefault`/`Single`/`SingleOrDefault` whose OWN expression subtree contains both a `GetAssemblies()` call and a `GetTypes()`/`GetExportedTypes()` call — a single-element pick out of every type loaded into the process. A nested selector in the same chain sees no `GetAssemblies()` in its own subtree and is outside the population, so one lookup counts once however many links its chain has. A finding additionally needs both remaining halves: the selector must be `First`/`FirstOrDefault` (`Single`/`SingleOrDefault` reports the ambiguity rather than resolving it, and is counted and never reported), and the chain must carry an `==` comparison of `<lambda parameter>.Name` against something that is not a literal. The receiver must be a plain identifier bound by one of the chain’s own lambdas, which places `assembly.GetName().Name == "X"` outside the rule by construction. One exemption: a `.Name` test joined by `&&` to a `FullName`/`AssemblyQualifiedName` test on the same identifier is spared; joined by `||` it is not. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.
Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. Deterministic.
Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it. (×40) — examples/Dapper/NetCore/Example.Dapper.Core.Application/Services/TestSimpleService.cs:75, examples/Dapper/NetCore/Example.Dapper.Core.Application/Services/TestSimpleService.cs:90, examples/Dapper/NetCore/Example.Dapper.Core.Application/Services/TestSimpleService.cs:99, …
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 `userName`: line 147 assigns it with `as string`, which hands back null rather than throwing when the value is not a `string`, but line 148 then dereferences it directly as `userName.ToUpper` 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 `userName` once before the first use and handle the null case, or cast with `(string)` so the failure is reported where it happens — rather than leaving the two readings side by side. — src/Sean.Core.DbRepository/Extensions/DatabaseTypeExtensions.cs:148
This method contradicts itself about `userName`: line 221 assigns it with `as string`, which hands back null rather than throwing when the value is not a `string`, but line 222 then dereferences it directly as `userName.ToUpper` 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 `userName` once before the first use and handle the null case, or cast with `(string)` so the failure is reported where it happens — rather than leaving the two readings side by side. — src/Sean.Core.DbRepository/Extensions/DatabaseTypeExtensions.cs:222
1/9 NRT-eligible project(s) enable <Nullable>enable</Nullable> (projects targeting a pre-C#-8 framework are excluded — NRTs aren't available there). NRTs catch a whole class of null-deref bugs at compile time.
What to do
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 `?.`.
Enable <Nullable>enable</Nullable> across all projects and resolve warnings rather than suppressing with `!`.
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 1 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, so there is nothing missing here.
Not evidenced — 5 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.
C3 Audit Trail — Repo shows no audit-logging mechanism (IAuditable, an immutable audit log, an EF SaveChanges interceptor) for sensitive changes — absence of evidence is not evidence of a working control. Record an audit trail in code (or document where it lives) so this dimension can be scored.
C4 Data Retention — Repo shows no data-retention / TTL / cleanup mechanism for personal data — absence of evidence is not evidence of a working control. Define retention periods and a purge/cleanup job (or TTL) in code, or document where retention is enforced, so this dimension can be scored.
C5 Data-Subject Rights — Repo shows no corroborated data-subject-rights mechanism (erasure / export-portability / consent) tied to a subject id or GDPR vocabulary — absence of evidence is not evidence of a working control. Implement erasure, data export/portability and consent tracking over the subject's records.
P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 44 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
AX2 Stateful singletons — no singleton implementations detected
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
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.
D16 Bus Factor — single-contributor repository — bus factor is not applicable
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.
D22 Internal API Consistency — No intentionally-exposed public API to evaluate for consistency.
D23 Boundary Type-Coupling — Cross-context type coupling could not be assessed — this codebase's bounded contexts are neither declared nor inferable.
D25 ADR Conformance — no ADRs to check
D30 Dependency Vulnerabilities — nuget: `dotnet list package --vulnerable` could not read this solution's dependency graph — it reported an error for at least one project and returned no package data at all (typically a packages.config / non-PackageReference project, which the command cannot read). An unreadable dependency graph is not a clean one; migrate the project(s) to PackageReference to enable this scan
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
D36 Supply-chain Provenance & Signing — The CI pipeline builds and tests but publishes no released artifact — no package publish, container push, GitHub release or deployment step. Supply-chain provenance, signing and SBOM attest RELEASED artifacts, so there is nothing to attest here. Add them to the release pipeline when this repo starts shipping artifacts (a published package, a container image, a deployed service or a tagged release).
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.
D39 IL Efficiency — IL not measured — the analyzer's build of the target did not succeed
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D43 Malicious Dependencies — nuget: `dotnet list package --vulnerable` could not read this solution's dependency graph — it reported an error for at least one project and returned no package data at all (typically a packages.config / non-PackageReference project, which the command cannot read). An unreadable dependency graph is not a clean one; migrate the project(s) to PackageReference to enable this scan
D7 Architectural Integrity — no checkable ADRs and no dependency cycles — architectural integrity not assessed
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (a Domain/Aggregates/ValueObjects layer)
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
P9 Domain vs controller coverage — coverage data present for 108 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
PF1 Benchmark discipline — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
PF2 Allocation hygiene — 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.
PF3 Async & latency hygiene — 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.
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.
X10 Duplicated predicate — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X7 Silent fallback defaults — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
WriteOnlyPrivateField examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Services/UserService.cs:16— private ILogger _logger — 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 examples/ADO.NET/NetCore/Example.ADO.NETCore.ConsoleApp/Impls/DBTest.cs:15— private ILogger _logger — 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 examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/UserRepository.cs:12— private ILogger _logger — 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 examples/Dapper/NetCore/Example.Dapper.Core.Application/Services/CheckInLogService.cs:15— private ILogger _logger — 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 examples/Dapper/NetCore/Example.Dapper.Core.Application/Services/UserService.cs:16— private ILogger _logger — 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 examples/Dapper/NetCore/Example.Dapper.Core.ConsoleApp/Impls/DBTest.cs:15— private ILogger _logger — 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 examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/CheckInLogRepository.cs:21— private ILogger _logger — 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 examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/UserRepository.cs:12— private ILogger _logger — 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 examples/Dapper/NetFramework/Example.Dapper.Application/Services/CheckInLogService.cs:14— private ILogger _logger — 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 examples/Dapper/NetFramework/Example.Dapper.Application/Services/TestService.cs:13— private ILogger _logger — 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 examples/Dapper/NetFramework/Example.Dapper.Application/Services/UserService.cs:13— private ILogger _logger — 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 examples/Dapper/NetFramework/Example.Dapper.ConsoleApp/Impls/DBTest.cs:9— private ILogger _logger — 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 examples/Dapper/NetFramework/Example.Dapper.Domain/Repositories/CheckInLogRepository.cs:19— private ILogger _logger — 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 examples/Dapper/NetFramework/Example.Dapper.Domain/Repositories/UserRepository.cs:11— private ILogger _logger — 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 examples/Dapper/NetFramework/Example.Dapper.Application/Services/TestSimpleService.cs:20— private CommonRepository<CheckInLogEntity> _checkInLogRepository — 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.
Dependency-rule violation: Example.Dapper.Domain (Domain) → Example.Dapper.Infrastructure (Infrastructure) — `Example.Dapper.Domain` is a Domain project but references `Example.Dapper.Infrastructure`, a Infrastructure project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
Dependency-rule violation: Example.Dapper.Application (Application) → Example.Dapper.Infrastructure (Infrastructure) — `Example.Dapper.Application` is a Application project but references `Example.Dapper.Infrastructure`, a Infrastructure project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
Dependency-rule violation: Example.Dapper.Core.Domain (Domain) → Example.Dapper.Core.Infrastructure (Infrastructure) — `Example.Dapper.Core.Domain` is a Domain project but references `Example.Dapper.Core.Infrastructure`, a Infrastructure project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
Dependency-rule violation: Example.ADO.NETCore.Domain (Domain) → Example.ADO.NETCore.Infrastructure (Infrastructure) — `Example.ADO.NETCore.Domain` is a Domain project but references `Example.ADO.NETCore.Infrastructure`, a Infrastructure project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
Banned license: MySql.Data — `MySql.Data` 26.7.0 resolves to SPDX id GPL-2.0-only WITH Universal-FOSS-exception-1.0, and this run's banned set is AGPL-3.0, GPL-2.0, GPL-3.0, LGPL-3.0. The match is a SUBSTRING of the id, not an exact comparison — which is how variants like `-only` and `-or-later` are caught, and it is the rule to apply if you re-check this by hand. The set is policy, not law: it is configurable, so a licence banned here may be acceptable in your context, and the row is then something to record an exception for rather than to fix. ★ This arm reads the resolved package list and knows nothing about dependency SCOPE — it cannot tell a runtime dependency from a build- or test-only one, so unlike the Bundler arm it is NOT claiming this ships to your users. Check where it sits before acting. ★ DEPTH: this repository's MSBuild projects declare 49 direct `PackageReference`(s), and 205 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.
Banned license: MySql.Data — `MySql.Data` 9.0.0 resolves to SPDX id GPL-2.0-only, and this run's banned set is AGPL-3.0, GPL-2.0, GPL-3.0, LGPL-3.0. The match is a SUBSTRING of the id, not an exact comparison — which is how variants like `-only` and `-or-later` are caught, and it is the rule to apply if you re-check this by hand. The set is policy, not law: it is configurable, so a licence banned here may be acceptable in your context, and the row is then something to record an exception for rather than to fix. ★ This arm reads the resolved package list and knows nothing about dependency SCOPE — it cannot tell a runtime dependency from a build- or test-only one, so unlike the Bundler arm it is NOT claiming this ships to your users. Check where it sits before acting. ★ DEPTH: this repository's MSBuild projects declare 49 direct `PackageReference`(s), and 205 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.
Banned license: MySql.EntityFrameworkCore — `MySql.EntityFrameworkCore` 8.0.5+MySQL9.0.0 resolves to SPDX id GPL-2.0-only, and this run's banned set is AGPL-3.0, GPL-2.0, GPL-3.0, LGPL-3.0. The match is a SUBSTRING of the id, not an exact comparison — which is how variants like `-only` and `-or-later` are caught, and it is the rule to apply if you re-check this by hand. The set is policy, not law: it is configurable, so a licence banned here may be acceptable in your context, and the row is then something to record an exception for rather than to fix. ★ This arm reads the resolved package list and knows nothing about dependency SCOPE — it cannot tell a runtime dependency from a build- or test-only one, so unlike the Bundler arm it is NOT claiming this ships to your users. Check where it sits before acting. ★ DEPTH: this repository's MSBuild projects declare 49 direct `PackageReference`(s), and 205 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.
DeadPreprocessorBranch examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/DBTest/OracleTest.cs:1— #if UseOracle — 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 examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Extensions/DIExtensions.cs:138— #if UseOracle — 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 examples/Dapper/NetCore/Example.Dapper.Core.Domain/DBTest/OracleTest.cs:1— #if UseOracle — 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 examples/Dapper/NetCore/Example.Dapper.Core.Domain/Extensions/DIExtensions.cs:137— #if UseOracle — 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 examples/Dapper/NetCore/Example.Dapper.Core.Domain/Extensions/DIExtensions.cs:187— #if UseOracle — 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 examples/Dapper/NetFramework/Example.Dapper.Domain/Extensions/DIExtensions.cs:135— #if UseOracle — 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 examples/Dapper/NetFramework/Example.Dapper.Domain/Extensions/DIExtensions.cs:174— #if UseOracle — 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:188— #if UseOracle — 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 examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/DBTest/QuestDBTest.cs:1— #if UseQuestDB — 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 examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Extensions/DIExtensions.cs:86— #if UseFirebird — 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 examples/Dapper/NetCore/Example.Dapper.Core.Domain/Extensions/DIExtensions.cs:85— #if UseFirebird — 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 examples/Dapper/NetFramework/Example.Dapper.Domain/Extensions/DIExtensions.cs:83— #if UseFirebird — 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:18— #if UseFirebird — 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:225— #if UseFirebird — 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 examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Extensions/DIExtensions.cs:104— #if UsePostgreSql || UseHighgoDB || UseIvorySQL || UseQuestDB — 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 examples/Dapper/NetCore/Example.Dapper.Core.Domain/Extensions/DIExtensions.cs:103— #if UsePostgreSql || UseHighgoDB || UseIvorySQL || UseQuestDB — 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 examples/Dapper/NetFramework/Example.Dapper.Domain/Extensions/DIExtensions.cs:101— #if UsePostgreSql || UseHighgoDB || UseIvorySQL || UseQuestDB — 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 examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Extensions/DIExtensions.cs:109— #if UseOpenGauss — 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 examples/Dapper/NetCore/Example.Dapper.Core.Domain/Extensions/DIExtensions.cs:108— #if UseOpenGauss — 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 examples/Dapper/NetFramework/Example.Dapper.Domain/Extensions/DIExtensions.cs:106— #if UseOpenGauss — 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:293— #if UseOpenGauss — 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 examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Extensions/DIExtensions.cs:130— #if UseMsAccess — 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 examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Extensions/DIExtensions.cs:152— #if UseMsAccess — 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 examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Extensions/OdbcConnectionExtensions.cs:1— #if UseMsAccess — 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 examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Extensions/OleDbConnectionExtensions.cs:1— #if UseMsAccess — 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.
Hotspot: src/Sean.Core.DbRepository/SqlBuilder/QueryableSqlBuilder.cs src/Sean.Core.DbRepository/SqlBuilder/QueryableSqlBuilder.cs:510— src/Sean.Core.DbRepository/SqlBuilder/QueryableSqlBuilder.cs changed 3 times in last 90 days, max cyclomatic complexity 40 in QueryableSqlBuilder.BuildSqlCommand at line 510. 3 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-13..2026-09-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-13 16:43:20 +08:00' --until='2026-09-11 16:43:20 +08:00' --full-history --no-merges -- src/Sean.Core.DbRepository/SqlBuilder/QueryableSqlBuilder.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: src/Sean.Core.DbRepository/Extensions/DatabaseTypeExtensions.cs src/Sean.Core.DbRepository/Extensions/DatabaseTypeExtensions.cs:71— src/Sean.Core.DbRepository/Extensions/DatabaseTypeExtensions.cs changed 3 times in last 90 days, max cyclomatic complexity 30 in DatabaseTypeExtensions.MarkAsIdentifier at line 71. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-13..2026-09-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-13 16:43:20 +08:00' --until='2026-09-11 16:43:20 +08:00' --full-history --no-merges -- src/Sean.Core.DbRepository/Extensions/DatabaseTypeExtensions.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: src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/BaseSqlGenerator.cs src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/BaseSqlGenerator.cs:145— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/BaseSqlGenerator.cs changed 3 times in last 90 days, max cyclomatic complexity 30 in BaseSqlGenerator.ConvertFieldDefaultValue at line 145. 3 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-13..2026-09-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-13 16:43:20 +08:00' --until='2026-09-11 16:43:20 +08:00' --full-history --no-merges -- src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/BaseSqlGenerator.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: src/Sean.Core.DbRepository/Util/SqlParameterUtil.cs src/Sean.Core.DbRepository/Util/SqlParameterUtil.cs:274— src/Sean.Core.DbRepository/Util/SqlParameterUtil.cs changed 2 times in last 90 days, max cyclomatic complexity 34 in SqlParameterUtil.ParseSqlParameterTokensCore at line 274. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-13..2026-09-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-13 16:43:20 +08:00' --until='2026-09-11 16:43:20 +08:00' --full-history --no-merges -- src/Sean.Core.DbRepository/Util/SqlParameterUtil.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: src/Sean.Core.DbRepository/SqlBuilder/InsertableSqlBuilder.cs src/Sean.Core.DbRepository/SqlBuilder/InsertableSqlBuilder.cs:122— src/Sean.Core.DbRepository/SqlBuilder/InsertableSqlBuilder.cs changed 2 times in last 90 days, max cyclomatic complexity 28 in InsertableSqlBuilder.BuildSqlCommand at line 122. 1 of those changes was a fix/bug commit, and the other 1 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-13..2026-09-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-13 16:43:20 +08:00' --until='2026-09-11 16:43:20 +08:00' --full-history --no-merges -- src/Sean.Core.DbRepository/SqlBuilder/InsertableSqlBuilder.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: src/Sean.Core.DbRepository/Util/SqlBuilderUtil.cs src/Sean.Core.DbRepository/Util/SqlBuilderUtil.cs:370— src/Sean.Core.DbRepository/Util/SqlBuilderUtil.cs changed 2 times in last 90 days, max cyclomatic complexity 26 in SqlBuilderUtil.ConvertToSqlString at line 370. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-13..2026-09-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-13 16:43:20 +08:00' --until='2026-09-11 16:43:20 +08:00' --full-history --no-merges -- src/Sean.Core.DbRepository/Util/SqlBuilderUtil.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: src/Sean.Core.DbRepository/ExpressionResolve/ConditionBuilder.cs src/Sean.Core.DbRepository/ExpressionResolve/ConditionBuilder.cs:43— src/Sean.Core.DbRepository/ExpressionResolve/ConditionBuilder.cs changed 3 times in last 90 days, max cyclomatic complexity 16 in ConditionBuilder.BuildLikeOrEqualCondition at line 43. 3 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-13..2026-09-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-13 16:43:20 +08:00' --until='2026-09-11 16:43:20 +08:00' --full-history --no-merges -- src/Sean.Core.DbRepository/ExpressionResolve/ConditionBuilder.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: src/Sean.Core.DbRepository/SqlBuilder/ReplaceableSqlBuilder.cs src/Sean.Core.DbRepository/SqlBuilder/ReplaceableSqlBuilder.cs:83— src/Sean.Core.DbRepository/SqlBuilder/ReplaceableSqlBuilder.cs changed 2 times in last 90 days, max cyclomatic complexity 15 in ReplaceableSqlBuilder.BuildSqlCommand at line 83. 1 of those changes was a fix/bug commit, and the other 1 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-13..2026-09-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-13 16:43:20 +08:00' --until='2026-09-11 16:43:20 +08:00' --full-history --no-merges -- src/Sean.Core.DbRepository/SqlBuilder/ReplaceableSqlBuilder.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: DbFactory src/Sean.Core.DbRepository/Factory/DbFactory.cs— TooManyMethods — 476 significant lines (blank, comment-only and punctuation-only lines excluded), 100 methods. The bar is 30 methods; this is 70 over it, 3.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: BaseRepository src/Sean.Core.DbRepository/Repository/BaseRepository.cs— TooManyMethods — 803 significant lines (blank, comment-only and punctuation-only lines excluded), 76 methods. The bar is 30 methods; this is 46 over it, 2.53× 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: QueryableSqlBuilder src/Sean.Core.DbRepository/SqlBuilder/QueryableSqlBuilder.cs— TooManyMethods — 486 significant lines (blank, comment-only and punctuation-only lines excluded), 66 methods. The bar is 30 methods; this is 36 over it, 2.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: BaseRepository src/Sean.Core.DbRepository/Repository/BaseRepository.cs— TooManyMethods — 461 significant lines (blank, comment-only and punctuation-only lines excluded), 60 methods. The bar is 30 methods; this is 30 over it, 2.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: UpdateableSqlBuilder src/Sean.Core.DbRepository/SqlBuilder/UpdateableSqlBuilder.cs— TooManyMethods — 166 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 30 methods; this is 6 over it, 1.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SqlParameterUtil src/Sean.Core.DbRepository/Util/SqlParameterUtil.cs— TooManyMethods — 305 significant lines (blank, comment-only and punctuation-only lines excluded), 34 methods. The bar is 30 methods; this is 4 over it, 1.13× 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.
Repeated repair: src/Sean.Core.DbRepository/Repository/BaseRepository.cs src/Sean.Core.DbRepository/Repository/BaseRepository.cs:1328— src/Sean.Core.DbRepository/Repository/BaseRepository.cs changed 7 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is BaseRepository.AddOrUpdate at line 1328), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: 禁用 Xugu 不安全的自增主键回写”; “fix: 修复泛型命令参数共享与自增主键回写”; “fix: 统一通用执行方法的连接生命周期并修复 Reader 资源释放”; “fix: 隔离共享生成器的并发初始化状态”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-06-13..2026-09-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-13 16:43:20 +08:00' --until='2026-09-11 16:43:20 +08:00' --full-history --no-merges -- src/Sean.Core.DbRepository/Repository/BaseRepository.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.
Repeated repair: src/Sean.Core.DbRepository/Factory/DbFactory.cs src/Sean.Core.DbRepository/Factory/DbFactory.cs:1814— src/Sean.Core.DbRepository/Factory/DbFactory.cs changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is DbFactory.OnConnectionSettingsChanged at line 1814), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: 支持标量查询的 Guid 文本转换”; “fix: 释放连接字符串初始化失败的连接”; “fix: 释放初始化失败的数据库命令”; “fix: 修复连接释放与 AddOrUpdate 事务一致性问题”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-06-13..2026-09-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-13 16:43:20 +08:00' --until='2026-09-11 16:43:20 +08:00' --full-history --no-merges -- src/Sean.Core.DbRepository/Factory/DbFactory.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.
Repeated repair: src/Sean.Core.DbRepository/DbFirst/CodeGenerator/CodeGeneratorForMySql.cs src/Sean.Core.DbRepository/DbFirst/CodeGenerator/CodeGeneratorForMySql.cs:9— src/Sean.Core.DbRepository/DbFirst/CodeGenerator/CodeGeneratorForMySql.cs changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 1 (its worst body is CodeGeneratorForMySql.CodeGeneratorForMySql.ctor at line 9), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: 按实际约束识别 MySQL 主键字段”; “fix: 按实际约束识别 MySQL 外键字段”; “fix: 参数化 MySQL 元数据查询中的库名和表名”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-06-13..2026-09-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-13 16:43:20 +08:00' --until='2026-09-11 16:43:20 +08:00' --full-history --no-merges -- src/Sean.Core.DbRepository/DbFirst/CodeGenerator/CodeGeneratorForMySql.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.
Repeated repair: src/Sean.Core.DbRepository/Extensions/DbDataReaderExtensions.cs src/Sean.Core.DbRepository/Extensions/DbDataReaderExtensions.cs:259— src/Sean.Core.DbRepository/Extensions/DbDataReaderExtensions.cs changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is DbDataReaderExtensions.CreateModelMapper at line 259), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: 修复可空类型、泛型实体和元组映射”; “fix: 修复 DataReader 限量读取越界消费”; “fix: 修复实体字段映射并复用列映射”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-06-13..2026-09-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-13 16:43:20 +08:00' --until='2026-09-11 16:43:20 +08:00' --full-history --no-merges -- src/Sean.Core.DbRepository/Extensions/DbDataReaderExtensions.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.
Duplicated block (24 lines × 2) src/Sean.Core.DbRepository/Extensions/DataRowExtensions.cs:59— src/Sean.Core.DbRepository/Extensions/DataRowExtensions.cs:59-82 | src/Sean.Core.DbRepository/Extensions/DbDataReaderExtensions.cs:293-316 — 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 `src/Sean.Core.DbRepository/Extensions/DataRowExtensions.cs:59` 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 (24 lines × 2) src/Sean.Core.DbRepository/Factory/DbFactory.cs:1721— src/Sean.Core.DbRepository/Factory/DbFactory.cs:1721-1744 | src/Sean.Core.DbRepository/Factory/DbFactory.cs:1761-1784 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/Factory/DbFactory.cs:1721` 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 (24 lines × 2) examples/Dapper/NetCore/Example.Dapper.Core.Domain/Entities/CheckInLogEntity.cs:11— examples/Dapper/NetCore/Example.Dapper.Core.Domain/Entities/CheckInLogEntity.cs:11-34 | examples/Dapper/NetFramework/Example.Dapper.Model/Entities/CheckInLogEntity.cs:11-34 — before extracting anything, compare `examples/Dapper/NetCore/Example.Dapper.Core.Domain/Entities/CheckInLogEntity.cs` and `examples/Dapper/NetFramework/Example.Dapper.Model/Entities/CheckInLogEntity.cs` as WHOLE FILES: 96% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/Dapper/NetCore/Example.Dapper.Core.Domain/Entities/CheckInLogEntity.cs:11` 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 (24 lines × 2) examples/ADO.NET/NetCore/Example.ADO.NETCore.Infrastructure/Extensions/DIExtensions.cs:31— examples/ADO.NET/NetCore/Example.ADO.NETCore.Infrastructure/Extensions/DIExtensions.cs:31-54 | examples/Dapper/NetCore/Example.Dapper.Core.Infrastructure/Extensions/DIExtensions.cs:31-54 — before extracting anything, compare `examples/ADO.NET/NetCore/Example.ADO.NETCore.Infrastructure/Extensions/DIExtensions.cs` and `examples/Dapper/NetCore/Example.Dapper.Core.Infrastructure/Extensions/DIExtensions.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (20 lines × 2) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs:68— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs:68-87 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForPostgreSql.cs:71-90 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForPostgreSql.cs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 156 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs:68` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (20 lines × 2) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOpenGauss.cs:92— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOpenGauss.cs:92-111 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForPostgreSql.cs:92-111 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOpenGauss.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForPostgreSql.cs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOpenGauss.cs:92` 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 (20 lines × 2) src/Sean.Core.DbRepository/Repository/BaseRepository.cs:1204— src/Sean.Core.DbRepository/Repository/BaseRepository.cs:1204-1223 | src/Sean.Core.DbRepository/Repository/BaseRepository.cs:1850-1869 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/Repository/BaseRepository.cs:1204` 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 (20 lines × 2) src/Sean.Core.DbRepository/Repository/BaseRepository.cs:1385— src/Sean.Core.DbRepository/Repository/BaseRepository.cs:1385-1404 | src/Sean.Core.DbRepository/Repository/BaseRepository.cs:2031-2050 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/Repository/BaseRepository.cs:1385` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13 lines × 3) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:123— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:123-135 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs:125-137 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForXugu.cs:125-137 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:123` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (13 lines × 3) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMySql.cs:46— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMySql.cs:46-58 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSqlServer.cs:41-53 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForXugu.cs:41-53 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMySql.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSqlServer.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMySql.cs:46` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 3) examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Contracts/ITestSimpleService.cs:11— examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Contracts/ITestSimpleService.cs:11-23 | examples/Dapper/NetCore/Example.Dapper.Core.Application/Contracts/ITestSimpleService.cs:11-23 | examples/Dapper/NetFramework/Example.Dapper.Application/Contracts/ITestSimpleService.cs:11-23 — before extracting anything, compare `examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Contracts/ITestSimpleService.cs` and `examples/Dapper/NetCore/Example.Dapper.Core.Application/Contracts/ITestSimpleService.cs` as WHOLE FILES: 89% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Contracts/ITestSimpleService.cs:11` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 3) examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/CommonRepository.cs:35— examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/CommonRepository.cs:35-47 | examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/CommonRepository.cs:75-87 | examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/TestRepository.cs:65-77 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (12 lines × 2) src/Sean.Core.DbRepository/ExpressionResolve/ConstantExtractor.cs:93— src/Sean.Core.DbRepository/ExpressionResolve/ConstantExtractor.cs:93-104 | src/Sean.Core.DbRepository/ExpressionResolve/ConstantExtractor.cs:135-146 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/ExpressionResolve/ConstantExtractor.cs:93` 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 (12 lines × 2) src/Sean.Core.DbRepository/SqlBuilder/OrderByClauseSqlBuilder.cs:68— src/Sean.Core.DbRepository/SqlBuilder/OrderByClauseSqlBuilder.cs:68-79 | src/Sean.Core.DbRepository/SqlBuilder/QueryableSqlBuilder.cs:454-465 — 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) src/Sean.Core.DbRepository/SqlBuilder/OrderByClauseSqlBuilder.cs:87— src/Sean.Core.DbRepository/SqlBuilder/OrderByClauseSqlBuilder.cs:87-98 | src/Sean.Core.DbRepository/SqlBuilder/QueryableSqlBuilder.cs:472-483 — 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 `src/Sean.Core.DbRepository/SqlBuilder/OrderByClauseSqlBuilder.cs:87` 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 (12 lines × 2) examples/Dapper/NetCore/Example.Dapper.Core.Application/Contracts/ICheckInLogService.cs:7— examples/Dapper/NetCore/Example.Dapper.Core.Application/Contracts/ICheckInLogService.cs:7-18 | examples/Dapper/NetFramework/Example.Dapper.Application/Contracts/ICheckInLogService.cs:7-18 — 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 `examples/Dapper/NetCore/Example.Dapper.Core.Application/Contracts/ICheckInLogService.cs:7` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) examples/ADO.NET/NetCore/Example.ADO.NETCore.Infrastructure/Extensions/DIExtensions.cs:56— examples/ADO.NET/NetCore/Example.ADO.NETCore.Infrastructure/Extensions/DIExtensions.cs:56-64 | examples/Dapper/NetCore/Example.Dapper.Core.Infrastructure/Extensions/DIExtensions.cs:56-64 — before extracting anything, compare `examples/ADO.NET/NetCore/Example.ADO.NETCore.Infrastructure/Extensions/DIExtensions.cs` and `examples/Dapper/NetCore/Example.Dapper.Core.Infrastructure/Extensions/DIExtensions.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/ADO.NET/NetCore/Example.ADO.NETCore.Infrastructure/Extensions/DIExtensions.cs:56` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) examples/Dapper/NetCore/Example.Dapper.Core.Domain/Handler/DuckDBDecimalTypeHandler.cs:10— examples/Dapper/NetCore/Example.Dapper.Core.Domain/Handler/DuckDBDecimalTypeHandler.cs:10-18 | examples/Dapper/NetFramework/Example.Dapper.Domain/Handler/DuckDBDecimalTypeHandler.cs:10-18 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) examples/Dapper/NetCore/Example.Dapper.Core.Domain/Handler/OracleBoolTypeHandler.cs:10— examples/Dapper/NetCore/Example.Dapper.Core.Domain/Handler/OracleBoolTypeHandler.cs:10-18 | examples/Dapper/NetFramework/Example.Dapper.Domain/Handler/OracleBoolTypeHandler.cs:10-18 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) examples/ADO.NET/NetCore/Example.ADO.NETCore.Infrastructure/Extensions/DIExtensions.cs:20— examples/ADO.NET/NetCore/Example.ADO.NETCore.Infrastructure/Extensions/DIExtensions.cs:20-28 | examples/Dapper/NetCore/Example.Dapper.Core.Infrastructure/Extensions/DIExtensions.cs:20-28 — before extracting anything, compare `examples/ADO.NET/NetCore/Example.ADO.NETCore.Infrastructure/Extensions/DIExtensions.cs` and `examples/Dapper/NetCore/Example.Dapper.Core.Infrastructure/Extensions/DIExtensions.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
DM12 · Ambient inputs in the domain· Domain type reads the wall clock · ×4
Domain type reads the wall clock: CheckInLogRepository examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/CheckInLogRepository.cs:40— `CheckInLogRepository` reads `DateTime.Now` inside `SearchAsync`. The rule this feeds is not a function of its inputs: it cannot be tested at the instant that matters without moving the machine clock, and two reads inside one operation can observe different times. Pass the instant in as a parameter, or inject `TimeProvider`.
Domain type reads the wall clock: TestRepository examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs:121— `TestRepository` reads `DateTime.Now` inside `TestCRUDAsync`. The rule this feeds is not a function of its inputs: it cannot be tested at the instant that matters without moving the machine clock, and two reads inside one operation can observe different times. Pass the instant in as a parameter, or inject `TimeProvider`.
Domain type reads the wall clock: TestRepository examples/Dapper/NetFramework/Example.Dapper.Domain/Repositories/TestRepository.cs:118— `TestRepository` reads `DateTime.Now` inside `TestCRUDAsync`. The rule this feeds is not a function of its inputs: it cannot be tested at the instant that matters without moving the machine clock, and two reads inside one operation can observe different times. Pass the instant in as a parameter, or inject `TimeProvider`.
Domain type reads the wall clock: TestRepository examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/TestRepository.cs:121— `TestRepository` reads `DateTime.Now` inside `TestCRUDAsync`. The rule this feeds is not a function of its inputs: it cannot be tested at the instant that matters without moving the machine clock, and two reads inside one operation can observe different times. Pass the instant in as a parameter, or inject `TimeProvider`.
Duplicated block (14 lines × 2) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMsAccess.cs:17— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMsAccess.cs:17-30 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForQuestDB.cs:16-29 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMsAccess.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForQuestDB.cs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 138 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMsAccess.cs:17` 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 (14 lines × 2) src/Sean.Core.DbRepository/DbFirst/CodeGenerator/CodeGeneratorForDameng.cs:15— src/Sean.Core.DbRepository/DbFirst/CodeGenerator/CodeGeneratorForDameng.cs:15-28 | src/Sean.Core.DbRepository/DbFirst/CodeGenerator/CodeGeneratorForOracle.cs:29-42 — 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 `src/Sean.Core.DbRepository/DbFirst/CodeGenerator/CodeGeneratorForDameng.cs:15` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) src/Sean.Core.DbRepository/Extensions/DataRowExtensions.cs:34— src/Sean.Core.DbRepository/Extensions/DataRowExtensions.cs:34-47 | src/Sean.Core.DbRepository/Extensions/DbDataReaderExtensions.cs:264-277 — 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 `src/Sean.Core.DbRepository/Extensions/DataRowExtensions.cs:34` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/Sean.Core.DbRepository/Extensions/DbDataReaderExtensions.cs:278` calls `GetColumnNames` and `src/Sean.Core.DbRepository/Extensions/DataRowExtensions.cs:48` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 2) src/Sean.Core.DbRepository/Extensions/ExpressionExtensions.cs:83— src/Sean.Core.DbRepository/Extensions/ExpressionExtensions.cs:83-95 | src/Sean.Core.DbRepository/Extensions/ExpressionExtensions.cs:109-121 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/Extensions/ExpressionExtensions.cs:83` 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 (13 lines × 2) src/Sean.Core.DbRepository/Repository/BaseRepository.cs:1560— src/Sean.Core.DbRepository/Repository/BaseRepository.cs:1560-1572 | src/Sean.Core.DbRepository/Repository/BaseRepository.cs:2231-2243 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/Repository/BaseRepository.cs:1560` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13 lines × 2) src/Sean.Core.DbRepository/Repository/BaseRepository.cs:1580— src/Sean.Core.DbRepository/Repository/BaseRepository.cs:1580-1592 | src/Sean.Core.DbRepository/Repository/BaseRepository.cs:2251-2263 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/Repository/BaseRepository.cs:1580` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11 lines × 2) src/Sean.Core.DbRepository/Extensions/DatabaseTypeExtensions.cs:163— src/Sean.Core.DbRepository/Extensions/DatabaseTypeExtensions.cs:163-173 | src/Sean.Core.DbRepository/Extensions/DatabaseTypeExtensions.cs:237-247 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/Extensions/DatabaseTypeExtensions.cs:163` 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 (11 lines × 2) src/Sean.Core.DbRepository/Util/SqlBuilderUtil.cs:71— src/Sean.Core.DbRepository/Util/SqlBuilderUtil.cs:71-81 | src/Sean.Core.DbRepository/Util/SqlBuilderUtil.cs:96-106 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/Util/SqlBuilderUtil.cs:71` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) src/Sean.Core.DbRepository/Util/SqlBuilderUtil.cs:121— src/Sean.Core.DbRepository/Util/SqlBuilderUtil.cs:121-131 | src/Sean.Core.DbRepository/Util/SqlBuilderUtil.cs:146-156 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/Util/SqlBuilderUtil.cs:121` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/Sean.Core.DbRepository/SqlBuilder/DeleteableSqlBuilder.cs:232— src/Sean.Core.DbRepository/SqlBuilder/DeleteableSqlBuilder.cs:232-238 | src/Sean.Core.DbRepository/SqlBuilder/UpdateableSqlBuilder.cs:328-334 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Extensions/DIExtensions.cs:25— examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Extensions/DIExtensions.cs:25-31 | examples/Dapper/NetCore/Example.Dapper.Core.Domain/Extensions/DIExtensions.cs:24-30 — before extracting anything, compare `examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Extensions/DIExtensions.cs` and `examples/Dapper/NetCore/Example.Dapper.Core.Domain/Extensions/DIExtensions.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Extensions/DIExtensions.cs:25` 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) examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/CheckInLogRepository.cs:32— examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/CheckInLogRepository.cs:32-38 | examples/Dapper/NetFramework/Example.Dapper.Domain/Repositories/CheckInLogRepository.cs:29-35 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Change coupling: DataRowExtensions.cs ↔ DbDataReaderExtensions.cs src/Sean.Core.DbRepository/Extensions/DataRowExtensions.cs— `src/Sean.Core.DbRepository/Extensions/DataRowExtensions.cs` and `src/Sean.Core.DbRepository/Extensions/DbDataReaderExtensions.cs` change together 82% of the time (9 of the 11 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 9 shared commits counted here, the most recent 3 are `bd8b5c88` fix: 修复可空类型、泛型实体和元组映射; `f4c88218` fix: 修复实体字段映射并复用列映射; `6e2651c2` [fix] Map properties — run `git show` on any of them.
Change coupling: DataRowExtensions.cs ↔ DbFactory.cs src/Sean.Core.DbRepository/Extensions/DataRowExtensions.cs— `src/Sean.Core.DbRepository/Extensions/DataRowExtensions.cs` and `src/Sean.Core.DbRepository/Factory/DbFactory.cs` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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 6 shared commits counted here, the most recent 3 are `6e2651c2` [fix] Map properties; `10a3b8f8` Paging query for SQL Server 2005 ~ 2008.; `43c9ebce` JsonSerializer — run `git show` on any of them.
Duplicated block (32 lines × 2) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOpenGauss.cs:22— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOpenGauss.cs:22-53 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForPostgreSql.cs:25-56 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOpenGauss.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForPostgreSql.cs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOpenGauss.cs:22` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (32 lines × 2) examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Services/TestService.cs:82— examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Services/TestService.cs:82-113 | examples/Dapper/NetCore/Example.Dapper.Core.Application/Services/TestService.cs:83-114 — before extracting anything, compare `examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Services/TestService.cs` and `examples/Dapper/NetCore/Example.Dapper.Core.Application/Services/TestService.cs` as WHOLE FILES: 87% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (22 lines × 2) src/Sean.Core.DbRepository/Extensions/ExpressionExtensions.cs:295— src/Sean.Core.DbRepository/Extensions/ExpressionExtensions.cs:295-316 | src/Sean.Core.DbRepository/Extensions/ExpressionExtensions.cs:320-341 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/Extensions/ExpressionExtensions.cs:295` 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 (22 lines × 2) examples/Dapper/NetCore/Example.Dapper.Core.Domain/Handler/DateTimeTypeHandler.cs:44— examples/Dapper/NetCore/Example.Dapper.Core.Domain/Handler/DateTimeTypeHandler.cs:44-65 | examples/Dapper/NetFramework/Example.Dapper.Domain/Handler/DateTimeTypeHandler.cs:44-65 — before extracting anything, compare `examples/Dapper/NetCore/Example.Dapper.Core.Domain/Handler/DateTimeTypeHandler.cs` and `examples/Dapper/NetFramework/Example.Dapper.Domain/Handler/DateTimeTypeHandler.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (17 lines × 2) src/Sean.Core.DbRepository/Extensions/DbDataReaderExtensions.cs:68— src/Sean.Core.DbRepository/Extensions/DbDataReaderExtensions.cs:68-84 | src/Sean.Core.DbRepository/Extensions/DbDataReaderExtensions.cs:190-206 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/Extensions/DbDataReaderExtensions.cs:68` 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 `dataReader` to `this IDataReader` in one and `this DbDataReader` 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 (17 lines × 2) examples/Dapper/NetCore/Example.Dapper.Core.Domain/Handler/DateTimeTypeHandler.cs:16— examples/Dapper/NetCore/Example.Dapper.Core.Domain/Handler/DateTimeTypeHandler.cs:16-32 | examples/Dapper/NetFramework/Example.Dapper.Domain/Handler/DateTimeTypeHandler.cs:16-32 — before extracting anything, compare `examples/Dapper/NetCore/Example.Dapper.Core.Domain/Handler/DateTimeTypeHandler.cs` and `examples/Dapper/NetFramework/Example.Dapper.Domain/Handler/DateTimeTypeHandler.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 2) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs:26— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs:26-41 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs:26-41 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 181 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs:26` 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 (16 lines × 2) src/Sean.Core.DbRepository/Repository/BaseRepository.cs:1239— src/Sean.Core.DbRepository/Repository/BaseRepository.cs:1239-1254 | src/Sean.Core.DbRepository/Repository/BaseRepository.cs:1885-1900 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/Repository/BaseRepository.cs:1239` 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. 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) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs:69— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs:69-83 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForQuestDB.cs:66-80 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForQuestDB.cs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 160 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs:69` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) src/Sean.Core.DbRepository/SqlBuilder/InsertableSqlBuilder.cs:241— src/Sean.Core.DbRepository/SqlBuilder/InsertableSqlBuilder.cs:241-255 | src/Sean.Core.DbRepository/SqlBuilder/ReplaceableSqlBuilder.cs:131-145 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 5) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:17— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:17-30 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs:17-30 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs:17-30 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs:17-30 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs:17-30 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:17` 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 (14 lines × 5) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMySql.cs:21— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMySql.cs:21-34 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOpenGauss.cs:17-30 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForPostgreSql.cs:20-33 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSqlServer.cs:17-30 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForXugu.cs:17-30 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMySql.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOpenGauss.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMySql.cs:21` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 6) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:63— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:63-74 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs:63-74 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs:68-79 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMySql.cs:68-79 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForQuestDB.cs:62-73 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSQLite.cs:59-70 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:63` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSQLite.cs:59` calls `Count` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:63` 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 (12 lines × 6) examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Contracts/ITestService.cs:8— examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Contracts/ITestService.cs:8-19 | examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Contracts/ITestSimpleService.cs:12-23 | examples/Dapper/NetCore/Example.Dapper.Core.Application/Contracts/ITestService.cs:8-19 | examples/Dapper/NetCore/Example.Dapper.Core.Application/Contracts/ITestSimpleService.cs:12-23 | examples/Dapper/NetFramework/Example.Dapper.Application/Contracts/ITestService.cs:8-19 | examples/Dapper/NetFramework/Example.Dapper.Application/Contracts/ITestSimpleService.cs:12-23 — before extracting anything, compare `examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Contracts/ITestSimpleService.cs` and `examples/Dapper/NetCore/Example.Dapper.Core.Application/Contracts/ITestSimpleService.cs` as WHOLE FILES: 89% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Contracts/ITestService.cs:8` 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 (12 lines × 3) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:90— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:90-101 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs:91-102 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForXugu.cs:91-102 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 3) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:67— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:67-78 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs:67-78 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSqlServer.cs:78-89 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:67` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 4) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:93— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:93-103 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs:94-104 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMySql.cs:111-121 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForXugu.cs:94-104 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:93` 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 (11 lines × 4) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:67— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:67-77 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs:67-77 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSQLite.cs:63-73 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSqlServer.cs:78-88 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:67` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) src/Sean.Core.DbRepository/Repository/BaseRepository.cs:1710— src/Sean.Core.DbRepository/Repository/BaseRepository.cs:1710-1719 | src/Sean.Core.DbRepository/Repository/BaseRepository.cs:2381-2390 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/Repository/BaseRepository.cs:1710` 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 (10 lines × 2) examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/CheckInLogRepository.cs:47— examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/CheckInLogRepository.cs:47-56 | examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/CheckInLogRepository.cs:58-67 — both copies are in the same file, so extract the 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 `examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/CheckInLogRepository.cs:47` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 2) src/Sean.Core.DbRepository.Dapper/Extensions/DbConnectionExtensions.cs:139— src/Sean.Core.DbRepository.Dapper/Extensions/DbConnectionExtensions.cs:139-146 | src/Sean.Core.DbRepository.Dapper/Extensions/DbConnectionExtensions.cs:155-162 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository.Dapper/Extensions/DbConnectionExtensions.cs:139` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) examples/Dapper/NetCore/Example.Dapper.Core.Domain/Extensions/DIExtensions.cs:208— examples/Dapper/NetCore/Example.Dapper.Core.Domain/Extensions/DIExtensions.cs:208-215 | examples/Dapper/NetFramework/Example.Dapper.Domain/Extensions/DIExtensions.cs:195-202 — before extracting anything, compare `examples/Dapper/NetCore/Example.Dapper.Core.Domain/Extensions/DIExtensions.cs` and `examples/Dapper/NetFramework/Example.Dapper.Domain/Extensions/DIExtensions.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (6 lines × 2) src/Sean.Core.DbRepository/SqlBuilder/InsertableSqlBuilder.cs:142— src/Sean.Core.DbRepository/SqlBuilder/InsertableSqlBuilder.cs:142-147 | src/Sean.Core.DbRepository/SqlBuilder/ReplaceableSqlBuilder.cs:106-111 — 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 (6 lines × 2) examples/Dapper/NetCore/Example.Dapper.Core.Application/Services/CheckInLogService.cs:61— examples/Dapper/NetCore/Example.Dapper.Core.Application/Services/CheckInLogService.cs:61-66 | examples/Dapper/NetFramework/Example.Dapper.Application/Services/CheckInLogService.cs:58-63 — 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.
D4 · Code Duplication· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (6 members, 50+ identical tokens) examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Services/TestSimpleService.cs:73— examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Services/TestSimpleService.cs:73-144 | examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/TestRepository.cs:122-212 | examples/Dapper/NetCore/Example.Dapper.Core.Application/Services/TestSimpleService.cs:74-145 | examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs:122-210 | examples/Dapper/NetFramework/Example.Dapper.Application/Services/TestSimpleService.cs:82-153 | examples/Dapper/NetFramework/Example.Dapper.Domain/Repositories/TestRepository.cs:119-207 — These 6 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 6 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 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/CommonRepository.cs:35— examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/CommonRepository.cs:35-47 | examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/CommonRepository.cs:75-87 | examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs:65-77 | examples/Dapper/NetFramework/Example.Dapper.Domain/Repositories/CommonRepository.cs:33-45 | examples/Dapper/NetFramework/Example.Dapper.Domain/Repositories/CommonRepository.cs:72-84 | examples/Dapper/NetFramework/Example.Dapper.Domain/Repositories/TestRepository.cs:62-74 — These 6 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 6 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 6 times.
Duplicated block (21 lines × 2) examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/TestRepository.cs:215— examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/TestRepository.cs:215-235 | examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs:213-233 — before extracting anything, compare `examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/TestRepository.cs` and `examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (21 lines × 2) examples/Dapper/NetCore/Example.Dapper.Core.Domain/Handler/MsAccessDateTimeHandler.cs:10— examples/Dapper/NetCore/Example.Dapper.Core.Domain/Handler/MsAccessDateTimeHandler.cs:10-30 | examples/Dapper/NetFramework/Example.Dapper.Domain/Handler/MsAccessDateTimeHandler.cs:10-30 — before extracting anything, compare `examples/Dapper/NetCore/Example.Dapper.Core.Domain/Handler/MsAccessDateTimeHandler.cs` and `examples/Dapper/NetFramework/Example.Dapper.Domain/Handler/MsAccessDateTimeHandler.cs` as WHOLE FILES: 92% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/Dapper/NetCore/Example.Dapper.Core.Domain/Handler/MsAccessDateTimeHandler.cs:10` 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.
CRAP 124: DatabaseTypeExtensions.GetSqlForTableExists src/Sean.Core.DbRepository/Extensions/DatabaseTypeExtensions.cs:120— Cyclomatic 26 with 47.4% file coverage — too complex for how untested it is (CRAP = CC²·(1−cov)³ + CC; ≥30 needs tests or simplification).
CRAP 124: DatabaseTypeExtensions.GetSqlForTableFieldExists src/Sean.Core.DbRepository/Extensions/DatabaseTypeExtensions.cs:195— Cyclomatic 26 with 47.4% file coverage — too complex for how untested it is (CRAP = CC²·(1−cov)³ + CC; ≥30 needs tests or simplification).
Unfinished stub — throws NotImplementedException src/Sean.Core.DbRepository/Repository/BaseRepository.cs:138— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException examples/ADO.NET/NetCore/Example.ADO.NETCore.Infrastructure/Converter/DbParameterCollectionConverter.cs:29— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
X5 · Nullable reference types· Symbol treated as nullable, then dereferenced unguarded · ×2
Symbol treated as nullable, then dereferenced unguarded src/Sean.Core.DbRepository/Extensions/DatabaseTypeExtensions.cs:148— This method contradicts itself about `userName`: line 147 assigns it with `as string`, which hands back null rather than throwing when the value is not a `string`, but line 148 then dereferences it directly as `userName.ToUpper` 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 `userName` once before the first use and handle the null case, or cast with `(string)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded src/Sean.Core.DbRepository/Extensions/DatabaseTypeExtensions.cs:222— This method contradicts itself about `userName`: line 221 assigns it with `as string`, which hands back null rather than throwing when the value is not a `string`, but line 222 then dereferences it directly as `userName.ToUpper` 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 `userName` once before the first use and handle the null case, or cast with `(string)` so the failure is reported where it happens — rather than leaving the two readings side by side.
C1 · Data Protection· No data-protection/encryption · ×1
No data-protection/encryption — No data-protection or encryption usage (ASP.NET Data Protection, AES, column encryption, PBKDF2) was found — sensitive data at rest may be unprotected. If TDE/KMS/vault is delegated to infrastructure, ignore.
ExpressionExtensions.GetFieldNames (cyclomatic 48) src/Sean.Core.DbRepository/Extensions/ExpressionExtensions.cs:207— ExpressionExtensions.GetFieldNames has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
QueryableSqlBuilder.BuildSqlCommand (cyclomatic 40) src/Sean.Core.DbRepository/SqlBuilder/QueryableSqlBuilder.cs:510— QueryableSqlBuilder.BuildSqlCommand has cyclomatic complexity 40 (threshold 15). Of this number, 35 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
SqlParameterUtil.ParseSqlParameterTokensCore (cyclomatic 34) src/Sean.Core.DbRepository/Util/SqlParameterUtil.cs:274— SqlParameterUtil.ParseSqlParameterTokensCore has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BaseSqlGenerator.ConvertFieldDefaultValue (cyclomatic 30) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/BaseSqlGenerator.cs:145— BaseSqlGenerator.ConvertFieldDefaultValue has cyclomatic complexity 30 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
DbParameterExtensions.SetParameterTypeAndValue (cyclomatic 29) src/Sean.Core.DbRepository/Extensions/DbParameterExtensions.cs:11— DbParameterExtensions.SetParameterTypeAndValue has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
QueryableSqlBuilder.GetQuerySql (cyclomatic 27) src/Sean.Core.DbRepository/SqlBuilder/QueryableSqlBuilder.cs:624— QueryableSqlBuilder.GetQuerySql 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.
SqlBuilderUtil.ConvertToSqlString (cyclomatic 26) src/Sean.Core.DbRepository/Util/SqlBuilderUtil.cs:370— SqlBuilderUtil.ConvertToSqlString 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.
WhereClauseParser.ParseMethodCallExpression (cyclomatic 20) src/Sean.Core.DbRepository/ExpressionResolve/WhereClauseParser.cs:95— WhereClauseParser.ParseMethodCallExpression has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ConditionBuilder.BuildLikeOrEqualCondition (cyclomatic 16) src/Sean.Core.DbRepository/ExpressionResolve/ConditionBuilder.cs:43— ConditionBuilder.BuildLikeOrEqualCondition 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.
ExpressionExtensions.GetFieldNames (cognitive 115) src/Sean.Core.DbRepository/Extensions/ExpressionExtensions.cs:207— ExpressionExtensions.GetFieldNames has cognitive complexity 115 (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.
SqlParameterUtil.ParseSqlParameterTokensCore (cognitive 45) src/Sean.Core.DbRepository/Util/SqlParameterUtil.cs:274— SqlParameterUtil.ParseSqlParameterTokensCore has cognitive complexity 45 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
QueryableSqlBuilder.BuildSqlCommand (cognitive 27) src/Sean.Core.DbRepository/SqlBuilder/QueryableSqlBuilder.cs:510— QueryableSqlBuilder.BuildSqlCommand has cognitive complexity 27 (threshold 15). Of this number, 17 points are the body's own statements and 10 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.
ConnectionStringOptions.CreateMultiFromConnectionName (cognitive 26) src/Sean.Core.DbRepository/Option/ConnectionStringOptions.cs:168— ConnectionStringOptions.CreateMultiFromConnectionName has cognitive complexity 26 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ConnectionStringOptions.CreateMultiFromConnectionName (cognitive 25) src/Sean.Core.DbRepository/Option/ConnectionStringOptions.cs:282— ConnectionStringOptions.CreateMultiFromConnectionName has cognitive complexity 25 (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.
QueryableSqlBuilder.HandleJoinField (cognitive 25) src/Sean.Core.DbRepository/SqlBuilder/QueryableSqlBuilder.cs:877— QueryableSqlBuilder.HandleJoinField 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.
ConditionBuilder.BuildLikeOrEqualCondition (cognitive 24) src/Sean.Core.DbRepository/ExpressionResolve/ConditionBuilder.cs:43— ConditionBuilder.BuildLikeOrEqualCondition 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.
DefaultSqlCommand.ConvertSqlToNonParameter (cognitive 23) src/Sean.Core.DbRepository/SqlModel/DefaultSqlCommand.cs:133— DefaultSqlCommand.ConvertSqlToNonParameter has cognitive complexity 23 (threshold 15). Most of this is not in the body itself: 11 of the 23 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 151, 169). 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.
ConditionBuilder.BuildInCondition (cognitive 21) src/Sean.Core.DbRepository/ExpressionResolve/ConditionBuilder.cs:101— ConditionBuilder.BuildInCondition has cognitive complexity 21 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
DbDataReaderExtensions.CreateModelMapper (cognitive 20) src/Sean.Core.DbRepository/Extensions/DbDataReaderExtensions.cs:259— DbDataReaderExtensions.CreateModelMapper has cognitive complexity 20 (threshold 15). Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 294, 270, 279). 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.
SqlGeneratorForMySql.GetCreateTableSql (cognitive 19) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMySql.cs:60— SqlGeneratorForMySql.GetCreateTableSql 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.
ConstantExtractor.ParseConstant (cognitive 19) src/Sean.Core.DbRepository/ExpressionResolve/ConstantExtractor.cs:11— ConstantExtractor.ParseConstant 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.
UpdateableSqlBuilder.BuildSqlCommand (cognitive 19) src/Sean.Core.DbRepository/SqlBuilder/UpdateableSqlBuilder.cs:276— UpdateableSqlBuilder.BuildSqlCommand has cognitive complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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.
DefaultSqlCommand.ConvertParameterToDictionaryByPosition (cognitive 19) src/Sean.Core.DbRepository/SqlModel/DefaultSqlCommand.cs:68— DefaultSqlCommand.ConvertParameterToDictionaryByPosition 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.
EntityInfoCache.BuildEntityInfo (cognitive 18) REDACTED:93— EntityInfoCache.BuildEntityInfo 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.
BaseSqlGenerator.GetCreateIndexSql (cognitive 18) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/BaseSqlGenerator.cs:197— BaseSqlGenerator.GetCreateIndexSql 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.
DbProviderFactoryManager.GetDbProviderFactory (cognitive 18) src/Sean.Core.DbRepository/DbProviderFactoryManager.cs:47— DbProviderFactoryManager.GetDbProviderFactory 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.
DataRowExtensions.CreateMapper (cognitive 18) src/Sean.Core.DbRepository/Extensions/DataRowExtensions.cs:29— DataRowExtensions.CreateMapper has cognitive complexity 18 (threshold 15). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 60, 40). 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.
DbParameterExtensions.SetParameterTypeAndValue (cognitive 18) src/Sean.Core.DbRepository/Extensions/DbParameterExtensions.cs:11— DbParameterExtensions.SetParameterTypeAndValue 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.
SqlGeneratorForOpenGauss.GetCreateTableSql (cognitive 17) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOpenGauss.cs:55— SqlGeneratorForOpenGauss.GetCreateTableSql 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.
SqlBuilderUtil.ConvertToSqlString (cognitive 16) src/Sean.Core.DbRepository/Util/SqlBuilderUtil.cs:370— SqlBuilderUtil.ConvertToSqlString 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.
SqlParameterUtil.ConvertToDbParameters (cognitive 16) src/Sean.Core.DbRepository/Util/SqlParameterUtil.cs:30— SqlParameterUtil.ConvertToDbParameters 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.
FileTooLong: Repository/BaseRepository.cs src/Sean.Core.DbRepository/Repository/BaseRepository.cs— FileTooLong — 1281 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 781 over it, 2.56× 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.
D4 · Code Duplication· Members sharing a duplicated core (32 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (32 members, 50+ identical tokens) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:56— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:56-103 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:106-135 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:56-104 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:107-137 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs:56-104 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs:107-137 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs:56-100 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs:103-129 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs:56-108 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs:111-146 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs:56-102 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs:105-135 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMsAccess.cs:56-98 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMsAccess.cs:101-127 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMySql.cs:61-121 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMySql.cs:124-166 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOpenGauss.cs:56-111 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOpenGauss.cs:114-149 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOracle.cs:56-114 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOracle.cs:117-156 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForPostgreSql.cs:59-111 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForPostgreSql.cs:114-149 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForQuestDB.cs:55-99 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForQuestDB.cs:102-132 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSQLite.cs:50-97 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSQLite.cs:100-126 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForShenTong.cs:56-108 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForShenTong.cs:111-146 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSqlServer.cs:56-118 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSqlServer.cs:121-156 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForXugu.cs:56-104 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForXugu.cs:107-137 — These 32 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 32 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 32 times.
D4 · Code Duplication· Members sharing a duplicated core (15 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (15 members, 50+ identical tokens) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:16— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:16-53 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:16-53 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs:16-53 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs:16-53 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs:16-53 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs:16-53 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMsAccess.cs:16-53 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMySql.cs:20-58 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOpenGauss.cs:16-53 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOracle.cs:16-53 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForPostgreSql.cs:19-56 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForQuestDB.cs:15-52 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForShenTong.cs:16-53 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSqlServer.cs:16-53 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForXugu.cs:16-53 — These 15 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 15 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 15 times.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (5 members, 50+ identical tokens) src/Sean.Core.DbRepository/SqlBuilder/CountableSqlBuilder.cs:138— src/Sean.Core.DbRepository/SqlBuilder/CountableSqlBuilder.cs:138-153 | src/Sean.Core.DbRepository/SqlBuilder/DeleteableSqlBuilder.cs:139-154 | src/Sean.Core.DbRepository/SqlBuilder/QueryableSqlBuilder.cs:308-323 | src/Sean.Core.DbRepository/SqlBuilder/UpdateableSqlBuilder.cs:199-214 | src/Sean.Core.DbRepository/SqlBuilder/WhereClauseSqlBuilder.cs:57-73 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Duplicated block (62 lines × 2) src/Sean.Core.DbRepository.Dapper/Repository/DapperBaseRepository.cs:13— src/Sean.Core.DbRepository.Dapper/Repository/DapperBaseRepository.cs:13-74 | src/Sean.Core.DbRepository.Dapper/Repository/DapperBaseRepository.cs:117-178 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository.Dapper/Repository/DapperBaseRepository.cs:13` 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 (36 lines × 2) src/Sean.Core.DbRepository/Repository/BaseRepository.cs:1329— src/Sean.Core.DbRepository/Repository/BaseRepository.cs:1329-1364 | src/Sean.Core.DbRepository/Repository/BaseRepository.cs:1975-2010 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/Repository/BaseRepository.cs:1329` 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 (34 lines × 2) src/Sean.Core.DbRepository/Repository/BaseRepository.cs:483— src/Sean.Core.DbRepository/Repository/BaseRepository.cs:483-516 | src/Sean.Core.DbRepository/Repository/BaseRepository.cs:891-924 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/Repository/BaseRepository.cs:483` 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 (33 lines × 2) src/Sean.Core.DbRepository/Repository/BaseRepository.cs:529— src/Sean.Core.DbRepository/Repository/BaseRepository.cs:529-561 | src/Sean.Core.DbRepository/Repository/BaseRepository.cs:937-969 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/Repository/BaseRepository.cs:529` 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 (31 lines × 4) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs:113— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs:113-143 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOpenGauss.cs:116-146 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForPostgreSql.cs:116-146 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSqlServer.cs:123-153 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOpenGauss.cs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 119 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs:113` 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 (28 lines × 2) src/Sean.Core.DbRepository/Repository/BaseRepository.cs:1276— src/Sean.Core.DbRepository/Repository/BaseRepository.cs:1276-1303 | src/Sean.Core.DbRepository/Repository/BaseRepository.cs:1922-1949 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/Repository/BaseRepository.cs:1276` 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 (17–21 lines × 3) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:88— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:88-104 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs:86-102 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForQuestDB.cs:79-99 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 188 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:88` 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 (12–20 lines × 4) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs:89— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs:89-100 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMsAccess.cs:87-98 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSQLite.cs:86-97 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForShenTong.cs:89-108 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMsAccess.cs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 156 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs:89` 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 (19 lines × 2) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMySql.cs:72— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMySql.cs:72-90 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMySql.cs:137-155 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMySql.cs:72` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–17 lines × 11) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:108— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:108-119 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:109-120 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs:109-120 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs:105-116 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs:107-118 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMsAccess.cs:103-114 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMySql.cs:126-137 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForQuestDB.cs:104-115 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSQLite.cs:102-113 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForShenTong.cs:113-129 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForXugu.cs:109-120 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:108` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–17 lines × 7) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:121— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:121-137 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs:117-129 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs:119-135 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMsAccess.cs:115-127 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForQuestDB.cs:116-132 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSQLite.cs:114-126 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForShenTong.cs:130-146 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:121` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (13–17 lines × 5) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs:77— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs:77-89 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs:70-86 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOracle.cs:79-91 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForPostgreSql.cs:80-92 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForShenTong.cs:77-89 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 144 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs:77` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs:89` calls `Append` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForShenTong.cs:92` 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 (12–16 lines × 11) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:120— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:120-135 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs:116-127 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs:129-140 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs:118-133 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMsAccess.cs:114-125 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOpenGauss.cs:132-143 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForPostgreSql.cs:132-143 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForQuestDB.cs:115-130 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSQLite.cs:113-124 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForShenTong.cs:129-140 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSqlServer.cs:139-150 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:120` 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 (15 lines × 5) src/Sean.Core.DbRepository/SqlBuilder/CountableSqlBuilder.cs:139— src/Sean.Core.DbRepository/SqlBuilder/CountableSqlBuilder.cs:139-153 | src/Sean.Core.DbRepository/SqlBuilder/DeleteableSqlBuilder.cs:140-154 | src/Sean.Core.DbRepository/SqlBuilder/QueryableSqlBuilder.cs:309-323 | src/Sean.Core.DbRepository/SqlBuilder/UpdateableSqlBuilder.cs:200-214 | src/Sean.Core.DbRepository/SqlBuilder/WhereClauseSqlBuilder.cs:59-73 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/SqlBuilder/WhereClauseSqlBuilder.cs:59` 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 (11–15 lines × 4) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:73— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:73-87 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs:78-88 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMySql.cs:95-105 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForXugu.cs:78-88 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:73` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (15 lines × 3) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs:23— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs:23-37 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs:23-37 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs:23-37 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 119 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs:23` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11–15 lines × 2) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:67— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:67-81 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:119-129 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:67` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–14 lines × 14) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:120— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:120-133 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs:116-125 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs:129-138 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs:69-82 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs:118-131 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMsAccess.cs:114-123 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOpenGauss.cs:132-141 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOracle.cs:137-146 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForPostgreSql.cs:132-141 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForQuestDB.cs:66-79 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForQuestDB.cs:115-128 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSQLite.cs:113-122 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForShenTong.cs:129-138 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSqlServer.cs:139-148 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs:69` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOracle.cs:136` calls `Clear` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs:128` 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 (13 lines × 8) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:41— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:41-53 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs:41-53 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs:41-53 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs:41-53 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs:41-53 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMsAccess.cs:41-53 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOracle.cs:41-53 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForShenTong.cs:41-53 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:41` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8–13 lines × 7) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:61— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:61-68 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs:61-68 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs:66-73 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMySql.cs:66-73 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForQuestDB.cs:60-67 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForShenTong.cs:61-73 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForXugu.cs:61-68 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:61` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12 lines × 15) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:16— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:16-27 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:16-27 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs:16-27 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs:16-27 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs:16-27 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs:16-27 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMsAccess.cs:16-27 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMySql.cs:20-31 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOpenGauss.cs:16-27 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOracle.cs:16-27 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForPostgreSql.cs:19-30 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForQuestDB.cs:15-26 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForShenTong.cs:16-27 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSqlServer.cs:16-27 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForXugu.cs:16-27 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:16` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–12 lines × 11) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:119— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:119-126 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs:119-126 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs:115-122 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs:117-124 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMsAccess.cs:113-120 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMySql.cs:136-143 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOracle.cs:136-143 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForQuestDB.cs:114-121 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSQLite.cs:112-119 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForShenTong.cs:124-135 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForXugu.cs:119-126 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:119` 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–12 lines × 8) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:61— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:61-67 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:61-67 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs:61-67 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs:66-72 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMySql.cs:66-72 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForQuestDB.cs:60-66 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForShenTong.cs:61-72 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForXugu.cs:61-67 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:61` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7–11 lines × 14) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:81— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:81-87 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:78-88 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs:82-88 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs:83-89 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs:83-89 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs:76-86 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMsAccess.cs:81-87 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMySql.cs:99-105 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOpenGauss.cs:86-92 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOracle.cs:85-91 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForPostgreSql.cs:86-92 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForShenTong.cs:83-89 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSqlServer.cs:89-95 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForXugu.cs:82-88 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:81` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:91` calls `Append` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs:92` 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 × 5) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs:61— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs:61-71 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOpenGauss.cs:61-71 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOracle.cs:63-73 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForPostgreSql.cs:64-74 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSqlServer.cs:67-77 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOpenGauss.cs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 119 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs:61` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOracle.cs:62` calls `AppendLine` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs:60` 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 (10 lines × 16) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:106— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:106-115 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:107-116 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs:107-116 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs:103-112 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs:111-120 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs:105-114 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMsAccess.cs:101-110 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMySql.cs:124-133 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOpenGauss.cs:114-123 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOracle.cs:117-126 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForPostgreSql.cs:114-123 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForQuestDB.cs:102-111 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSQLite.cs:100-109 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForShenTong.cs:111-120 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSqlServer.cs:121-130 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForXugu.cs:107-116 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:106` 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, `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOracle.cs:127` calls `AppendLine`, `StringBuilder` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:116` 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 × 6) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:67— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:67-76 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs:67-76 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs:120-129 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSQLite.cs:63-72 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSqlServer.cs:78-87 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForXugu.cs:120-129 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 24) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:67— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:67-75 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:120-128 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs:67-75 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs:120-128 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs:72-80 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs:116-124 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs:129-137 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs:69-77 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs:118-126 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMsAccess.cs:114-122 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMySql.cs:72-80 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMySql.cs:137-145 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOpenGauss.cs:74-82 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOpenGauss.cs:132-140 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOracle.cs:137-145 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForPostgreSql.cs:132-140 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForQuestDB.cs:66-74 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForQuestDB.cs:115-123 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSQLite.cs:63-71 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSQLite.cs:113-121 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForShenTong.cs:129-137 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSqlServer.cs:78-86 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSqlServer.cs:139-147 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForXugu.cs:120-128 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs:69` 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 before the matched lines, `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOracle.cs:136` calls `Clear` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs:128` 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 (8–9 lines × 6) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:59— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:59-66 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs:59-66 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMsAccess.cs:59-66 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForQuestDB.cs:58-65 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForShenTong.cs:59-67 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForXugu.cs:59-66 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 188 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:59` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 7) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:56— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:56-63 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs:56-63 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs:56-63 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMsAccess.cs:56-63 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForQuestDB.cs:55-62 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForShenTong.cs:56-63 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForXugu.cs:56-63 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:56` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 6) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:56— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:56-62 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs:56-62 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMySql.cs:61-67 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOpenGauss.cs:56-62 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForPostgreSql.cs:59-65 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSQLite.cs:50-56 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:56` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSQLite.cs:59` calls `Count` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:64` 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 (5 lines × 15) src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:85— src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:85-89 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:86-90 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDameng.cs:86-90 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDuckDB.cs:87-91 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs:87-91 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs:84-88 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMsAccess.cs:85-89 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForMySql.cs:103-107 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOpenGauss.cs:90-94 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForOracle.cs:89-93 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForPostgreSql.cs:90-94 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSQLite.cs:84-88 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForShenTong.cs:87-91 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForSqlServer.cs:93-97 | src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForXugu.cs:86-90 — before extracting anything, compare `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForFirebird.cs:93` calls `Add`, `ToString` and `src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:91` 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.
Near-duplicate member pair (81 shared lines) examples/Dapper/NetCore/Example.Dapper.Core.Domain/Extensions/DIExtensions.cs:24— examples/Dapper/NetCore/Example.Dapper.Core.Domain/Extensions/DIExtensions.cs:24-199 | examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Extensions/DIExtensions.cs:25-177 — These two members are variants of one another: 81 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· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (4 members, 50+ identical tokens) examples/Dapper/NetCore/Example.Dapper.Core.Domain/Handler/DateTimeTypeHandler.cs:16— examples/Dapper/NetCore/Example.Dapper.Core.Domain/Handler/DateTimeTypeHandler.cs:16-32 | examples/Dapper/NetCore/Example.Dapper.Core.Domain/Handler/DateTimeTypeHandler.cs:44-65 | examples/Dapper/NetFramework/Example.Dapper.Domain/Handler/DateTimeTypeHandler.cs:16-32 | examples/Dapper/NetFramework/Example.Dapper.Domain/Handler/DateTimeTypeHandler.cs:44-65 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Duplicated block (78 lines × 3) examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Entities/TestEntity.cs:12— examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Entities/TestEntity.cs:12-89 | examples/Dapper/NetCore/Example.Dapper.Core.Domain/Entities/TestEntity.cs:12-89 | examples/Dapper/NetFramework/Example.Dapper.Model/Entities/TestEntity.cs:12-89 — before extracting anything, compare `examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Entities/TestEntity.cs` and `examples/Dapper/NetCore/Example.Dapper.Core.Domain/Entities/TestEntity.cs` as WHOLE FILES: 99% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Entities/TestEntity.cs:12` 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 (70–72 lines × 3) examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/TestRepository.cs:122— examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/TestRepository.cs:122-193 | examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs:122-191 | examples/Dapper/NetFramework/Example.Dapper.Domain/Repositories/TestRepository.cs:119-188 — before extracting anything, compare `examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/TestRepository.cs` and `examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/TestRepository.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/TestRepository.cs:195` calls `LogDebug` and `examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs:194` 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 (72 lines × 2) examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Services/TestSimpleService.cs:73— examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Services/TestSimpleService.cs:73-144 | examples/Dapper/NetCore/Example.Dapper.Core.Application/Services/TestSimpleService.cs:74-145 — before extracting anything, compare `examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Services/TestSimpleService.cs` and `examples/Dapper/NetCore/Example.Dapper.Core.Application/Services/TestSimpleService.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (51–64 lines × 2) examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Extensions/DIExtensions.cs:114— examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Extensions/DIExtensions.cs:114-177 | examples/Dapper/NetCore/Example.Dapper.Core.Domain/Extensions/DIExtensions.cs:113-163 — before extracting anything, compare `examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Extensions/DIExtensions.cs` and `examples/Dapper/NetCore/Example.Dapper.Core.Domain/Extensions/DIExtensions.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Extensions/DIExtensions.cs:114` 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 (54 lines × 3) examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Entities/UserEntity.cs:11— examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Entities/UserEntity.cs:11-64 | examples/Dapper/NetCore/Example.Dapper.Core.Domain/Entities/UserEntity.cs:11-64 | examples/Dapper/NetFramework/Example.Dapper.Model/Entities/UserEntity.cs:11-64 — before extracting anything, compare `examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Entities/UserEntity.cs` and `examples/Dapper/NetCore/Example.Dapper.Core.Domain/Entities/UserEntity.cs` as WHOLE FILES: 98% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Entities/UserEntity.cs:11` 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 (35 lines × 3) examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Extensions/DIExtensions.cs:114— examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Extensions/DIExtensions.cs:114-148 | examples/Dapper/NetCore/Example.Dapper.Core.Domain/Extensions/DIExtensions.cs:113-147 | examples/Dapper/NetFramework/Example.Dapper.Domain/Extensions/DIExtensions.cs:111-145 — before extracting anything, compare `examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Extensions/DIExtensions.cs` and `examples/Dapper/NetCore/Example.Dapper.Core.Domain/Extensions/DIExtensions.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Extensions/DIExtensions.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 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 (27 lines × 3) examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Entities/TestEntity.cs:96— examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Entities/TestEntity.cs:96-122 | examples/Dapper/NetCore/Example.Dapper.Core.Domain/Entities/TestEntity.cs:96-122 | examples/Dapper/NetFramework/Example.Dapper.Model/Entities/TestEntity.cs:96-122 — before extracting anything, compare `examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Entities/TestEntity.cs` and `examples/Dapper/NetCore/Example.Dapper.Core.Domain/Entities/TestEntity.cs` as WHOLE FILES: 99% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Entities/TestEntity.cs:96` 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 (23 lines × 3) examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Extensions/DIExtensions.cs:61— examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Extensions/DIExtensions.cs:61-83 | examples/Dapper/NetCore/Example.Dapper.Core.Domain/Extensions/DIExtensions.cs:60-82 | examples/Dapper/NetFramework/Example.Dapper.Domain/Extensions/DIExtensions.cs:58-80 — before extracting anything, compare `examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Extensions/DIExtensions.cs` and `examples/Dapper/NetCore/Example.Dapper.Core.Domain/Extensions/DIExtensions.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (22 lines × 3) examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Entities/EntityBase.cs:9— examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Entities/EntityBase.cs:9-30 | examples/Dapper/NetCore/Example.Dapper.Core.Domain/Entities/EntityBase.cs:9-30 | examples/Dapper/NetFramework/Example.Dapper.Model/Entities/EntityBase.cs:9-30 — before extracting anything, compare `examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Entities/EntityBase.cs` and `examples/Dapper/NetCore/Example.Dapper.Core.Domain/Entities/EntityBase.cs` as WHOLE FILES: 96% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Entities/EntityBase.cs:9` 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 (19–21 lines × 2) examples/ADO.NET/NetCore/Example.ADO.NETCore.ConsoleApp/Program.cs:16— examples/ADO.NET/NetCore/Example.ADO.NETCore.ConsoleApp/Program.cs:16-36 | examples/Dapper/NetCore/Example.Dapper.Core.ConsoleApp/Program.cs:16-34 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (18–20 lines × 3) examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/TestRepository.cs:195— examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/TestRepository.cs:195-212 | examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs:191-210 | examples/Dapper/NetFramework/Example.Dapper.Domain/Repositories/TestRepository.cs:188-207 — before extracting anything, compare `examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/TestRepository.cs` and `examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/TestRepository.cs:195` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/TestRepository.cs:195` calls `LogDebug` and `examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs:191` 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 (16 lines × 4) examples/Dapper/NetCore/Example.Dapper.Core.Domain/Handler/DateTimeTypeHandler.cs:17— examples/Dapper/NetCore/Example.Dapper.Core.Domain/Handler/DateTimeTypeHandler.cs:17-32 | examples/Dapper/NetCore/Example.Dapper.Core.Domain/Handler/DateTimeTypeHandler.cs:50-65 | examples/Dapper/NetFramework/Example.Dapper.Domain/Handler/DateTimeTypeHandler.cs:17-32 | examples/Dapper/NetFramework/Example.Dapper.Domain/Handler/DateTimeTypeHandler.cs:50-65 — before extracting anything, compare `examples/Dapper/NetCore/Example.Dapper.Core.Domain/Handler/DateTimeTypeHandler.cs` and `examples/Dapper/NetFramework/Example.Dapper.Domain/Handler/DateTimeTypeHandler.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/Dapper/NetCore/Example.Dapper.Core.Domain/Handler/DateTimeTypeHandler.cs:50` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `value` to `object` in one and `DateTime?` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (14 lines × 3) examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Contracts/ITestService.cs:7— examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Contracts/ITestService.cs:7-20 | examples/Dapper/NetCore/Example.Dapper.Core.Application/Contracts/ITestService.cs:7-20 | examples/Dapper/NetFramework/Example.Dapper.Application/Contracts/ITestService.cs:7-20 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Contracts/ITestService.cs:7` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 6) examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/CommonRepository.cs:35— examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/CommonRepository.cs:35-47 | examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/CommonRepository.cs:75-87 | examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs:65-77 | examples/Dapper/NetFramework/Example.Dapper.Domain/Repositories/CommonRepository.cs:33-45 | examples/Dapper/NetFramework/Example.Dapper.Domain/Repositories/CommonRepository.cs:72-84 | examples/Dapper/NetFramework/Example.Dapper.Domain/Repositories/TestRepository.cs:62-74 — before extracting anything, compare `examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/CommonRepository.cs` and `examples/Dapper/NetFramework/Example.Dapper.Domain/Repositories/CommonRepository.cs` as WHOLE FILES: 88% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10–12 lines × 6) examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Services/TestSimpleService.cs:113— examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Services/TestSimpleService.cs:113-122 | examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/TestRepository.cs:165-176 | examples/Dapper/NetCore/Example.Dapper.Core.Application/Services/TestSimpleService.cs:114-123 | examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs:165-174 | examples/Dapper/NetFramework/Example.Dapper.Application/Services/TestSimpleService.cs:122-131 | examples/Dapper/NetFramework/Example.Dapper.Domain/Repositories/TestRepository.cs:162-171 — before extracting anything, compare `examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Services/TestSimpleService.cs` and `examples/Dapper/NetCore/Example.Dapper.Core.Application/Services/TestSimpleService.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11 lines × 3) examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Contracts/IUserService.cs:7— examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Contracts/IUserService.cs:7-17 | examples/Dapper/NetCore/Example.Dapper.Core.Application/Contracts/IUserService.cs:7-17 | examples/Dapper/NetFramework/Example.Dapper.Application/Contracts/IUserService.cs:7-17 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Contracts/IUserService.cs:7` 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) examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Services/TestSimpleService.cs:97— examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Services/TestSimpleService.cs:97-106 | examples/Dapper/NetCore/Example.Dapper.Core.Application/Services/TestSimpleService.cs:98-107 | examples/Dapper/NetFramework/Example.Dapper.Application/Services/TestSimpleService.cs:106-115 — before extracting anything, compare `examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Services/TestSimpleService.cs` and `examples/Dapper/NetCore/Example.Dapper.Core.Application/Services/TestSimpleService.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (25 lines × 2) examples/ADO.NET/NetCore/Example.ADO.NETCore.Infrastructure/DIManager.cs:14— examples/ADO.NET/NetCore/Example.ADO.NETCore.Infrastructure/DIManager.cs:14-38 | examples/Dapper/NetCore/Example.Dapper.Core.Infrastructure/DIManager.cs:14-38 — before extracting anything, compare `examples/ADO.NET/NetCore/Example.ADO.NETCore.Infrastructure/DIManager.cs` and `examples/Dapper/NetCore/Example.Dapper.Core.Infrastructure/DIManager.cs` as WHOLE FILES: 95% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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.
CRAP 191: DbProviderFactoryExtensions.GetDatabaseType src/Sean.Core.DbRepository/Extensions/DbProviderFactoryExtensions.cs:7— Cyclomatic 21 with 27.3% file coverage — too complex for how untested it is (CRAP = CC²·(1−cov)³ + CC; ≥30 needs tests or simplification).
CRAP 161: DatabaseTypeExtensions.MarkAsIdentifier src/Sean.Core.DbRepository/Extensions/DatabaseTypeExtensions.cs:71— Cyclomatic 30 with 47.4% file coverage — too complex for how untested it is (CRAP = CC²·(1−cov)³ + CC; ≥30 needs tests or simplification).
CRAP 96: ExpressionExtensions.GetFieldNames src/Sean.Core.DbRepository/Extensions/ExpressionExtensions.cs:207— Cyclomatic 48 with 72.4% file coverage — too complex for how untested it is (CRAP = CC²·(1−cov)³ + CC; ≥30 needs tests or simplification).
CRAP 89: QueryableSqlBuilder.BuildSqlCommand src/Sean.Core.DbRepository/SqlBuilder/QueryableSqlBuilder.cs:510— Cyclomatic 40 with 68.7% file coverage — too complex for how untested it is (CRAP = CC²·(1−cov)³ + CC; ≥30 needs tests or simplification).
CRAP 74: InsertableSqlBuilder.BuildSqlCommand src/Sean.Core.DbRepository/SqlBuilder/InsertableSqlBuilder.cs:122— Cyclomatic 28 with 61.1% file coverage — too complex for how untested it is (CRAP = CC²·(1−cov)³ + CC; ≥30 needs tests or simplification).
CRAP 56: EnumExtensions.ToSqlString src/Sean.Core.DbRepository/Extensions/EnumExtensions.cs:8— Cyclomatic 11 with 28.3% file coverage — too complex for how untested it is (CRAP = CC²·(1−cov)³ + CC; ≥30 needs tests or simplification).
SC1 · Supply-chain hygiene· NuGet dependencies are not locked · ×1
NuGet dependencies are not locked — No packages.lock.json and no central package management — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
Commented-out code src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForClickHouse.cs:77— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:82— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:94— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForDB2.cs:131— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs:80— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs:92— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForInformix.cs:129— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForQuestDB.cs:77— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForQuestDB.cs:83— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForQuestDB.cs:89— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForQuestDB.cs:126— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForShenTong.cs:64— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForShenTong.cs:70— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForShenTong.cs:95— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForShenTong.cs:99— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForShenTong.cs:121— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForShenTong.cs:127— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/Sean.Core.DbRepository/CodeFirst/SqlGenerator/SqlGeneratorForShenTong.cs:143— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/Sean.Core.DbRepository/DbProviderFactoryManager.cs:109— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/Sean.Core.DbRepository/DbProviderFactoryManager.cs:132— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/Sean.Core.DbRepository/DbProviderFactoryManager.cs:133— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/Sean.Core.DbRepository/DbProviderFactoryManager.cs:134— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/Sean.Core.DbRepository/DbProviderFactoryManager.cs:135— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/Sean.Core.DbRepository/DbProviderFactoryManager.cs:136— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code src/Sean.Core.DbRepository/DbProviderFactoryManager.cs:137— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Interpolated log message defeats structured logging examples/Dapper/NetCore/Example.Dapper.Core.Application/Services/TestSimpleService.cs:75— Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
Interpolated log message defeats structured logging examples/Dapper/NetCore/Example.Dapper.Core.Application/Services/TestSimpleService.cs:90— Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
Interpolated log message defeats structured logging examples/Dapper/NetCore/Example.Dapper.Core.Application/Services/TestSimpleService.cs:99— Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
Interpolated log message defeats structured logging examples/Dapper/NetCore/Example.Dapper.Core.Application/Services/TestSimpleService.cs:108— Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
Interpolated log message defeats structured logging examples/Dapper/NetCore/Example.Dapper.Core.Application/Services/TestSimpleService.cs:115— Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
Interpolated log message defeats structured logging examples/Dapper/NetCore/Example.Dapper.Core.Application/Services/TestSimpleService.cs:124— Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
Interpolated log message defeats structured logging examples/Dapper/NetCore/Example.Dapper.Core.Application/Services/TestSimpleService.cs:127— Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
Interpolated log message defeats structured logging examples/Dapper/NetCore/Example.Dapper.Core.Application/Services/TestSimpleService.cs:135— Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
Interpolated log message defeats structured logging examples/Dapper/NetCore/Example.Dapper.Core.Application/Services/TestSimpleService.cs:138— Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
Interpolated log message defeats structured logging examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/CommonRepository.cs:40— Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
Interpolated log message defeats structured logging examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/CommonRepository.cs:45— Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
Interpolated log message defeats structured logging examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/CommonRepository.cs:80— Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
Interpolated log message defeats structured logging examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/CommonRepository.cs:85— Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
Interpolated log message defeats structured logging examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs:70— Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
Interpolated log message defeats structured logging examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs:75— Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
Interpolated log message defeats structured logging examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs:123— Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
Interpolated log message defeats structured logging examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs:138— Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
Interpolated log message defeats structured logging examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs:147— Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
Interpolated log message defeats structured logging examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs:158— Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
Interpolated log message defeats structured logging examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs:166— Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
Interpolated log message defeats structured logging examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs:175— Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
Interpolated log message defeats structured logging examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs:178— Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
Interpolated log message defeats structured logging examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs:186— Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
Interpolated log message defeats structured logging examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs:195— Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
Interpolated log message defeats structured logging examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs:197— Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
+ 15 more in this group — see findings.md.
X23 · Unguarded diagnostic materialisation· Diagnostic log message is built whether or not it is wanted · ×25
Diagnostic log message is built whether or not it is wanted examples/Dapper/NetCore/Example.Dapper.Core.Application/Services/TestSimpleService.cs:124— `LogDebug` at line 124 is called with an argument built by `JsonConvert.SerializeObject(queryResult, Formatting.Indented)` (line 124), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
Diagnostic log message is built whether or not it is wanted examples/Dapper/NetCore/Example.Dapper.Core.Application/Services/TestSimpleService.cs:127— `LogDebug` at line 127 is called with an argument built by `JsonConvert.SerializeObject(getResult, Formatting.Indented)` (line 127), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
Diagnostic log message is built whether or not it is wanted examples/Dapper/NetCore/Example.Dapper.Core.Application/Services/TestSimpleService.cs:135— `LogDebug` at line 135 is called with an argument built by `JsonConvert.SerializeObject(executeDataTableResult, Formatting.Indented)` (line 135), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
Diagnostic log message is built whether or not it is wanted examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs:175— `LogDebug` at line 175 is called with an argument built by `JsonConvert.SerializeObject(queryResult, Formatting.Indented)` (line 175), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
Diagnostic log message is built whether or not it is wanted examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs:178— `LogDebug` at line 178 is called with an argument built by `JsonConvert.SerializeObject(getResult, Formatting.Indented)` (line 178), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
Diagnostic log message is built whether or not it is wanted examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs:186— `LogDebug` at line 186 is called with an argument built by `JsonConvert.SerializeObject(executeDataTableResult, Formatting.Indented)` (line 186), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
Diagnostic log message is built whether or not it is wanted examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs:195— `LogDebug` at line 195 is called with an argument built by `JsonConvert.SerializeObject(getValueTupleData, Formatting.Indented)` (line 195), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
Diagnostic log message is built whether or not it is wanted examples/Dapper/NetCore/Example.Dapper.Core.Domain/Repositories/TestRepository.cs:197— `LogDebug` at line 197 is called with an argument built by `JsonConvert.SerializeObject(getDynamicData, Formatting.Indented)` (line 197), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
Diagnostic log message is built whether or not it is wanted examples/Dapper/NetFramework/Example.Dapper.Application/Services/TestSimpleService.cs:132— `LogDebug` at line 132 is called with an argument built by `JsonConvert.SerializeObject(queryResult, Formatting.Indented)` (line 132), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
Diagnostic log message is built whether or not it is wanted examples/Dapper/NetFramework/Example.Dapper.Application/Services/TestSimpleService.cs:135— `LogDebug` at line 135 is called with an argument built by `JsonConvert.SerializeObject(getResult, Formatting.Indented)` (line 135), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
Diagnostic log message is built whether or not it is wanted examples/Dapper/NetFramework/Example.Dapper.Application/Services/TestSimpleService.cs:143— `LogDebug` at line 143 is called with an argument built by `JsonConvert.SerializeObject(executeDataTableResult, Formatting.Indented)` (line 143), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
Diagnostic log message is built whether or not it is wanted examples/Dapper/NetFramework/Example.Dapper.Domain/Repositories/TestRepository.cs:172— `LogDebug` at line 172 is called with an argument built by `JsonConvert.SerializeObject(queryResult, Formatting.Indented)` (line 172), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
Diagnostic log message is built whether or not it is wanted examples/Dapper/NetFramework/Example.Dapper.Domain/Repositories/TestRepository.cs:175— `LogDebug` at line 175 is called with an argument built by `JsonConvert.SerializeObject(getResult, Formatting.Indented)` (line 175), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
Diagnostic log message is built whether or not it is wanted examples/Dapper/NetFramework/Example.Dapper.Domain/Repositories/TestRepository.cs:183— `LogDebug` at line 183 is called with an argument built by `JsonConvert.SerializeObject(executeDataTableResult, Formatting.Indented)` (line 183), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
Diagnostic log message is built whether or not it is wanted examples/Dapper/NetFramework/Example.Dapper.Domain/Repositories/TestRepository.cs:192— `LogDebug` at line 192 is called with an argument built by `JsonConvert.SerializeObject(getValueTupleData, Formatting.Indented)` (line 192), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
Diagnostic log message is built whether or not it is wanted examples/Dapper/NetFramework/Example.Dapper.Domain/Repositories/TestRepository.cs:194— `LogDebug` at line 194 is called with an argument built by `JsonConvert.SerializeObject(getDynamicData, Formatting.Indented)` (line 194), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
Diagnostic log message is built whether or not it is wanted examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Services/TestSimpleService.cs:123— `LogDebug` at line 123 is called with an argument built by `JsonConvert.SerializeObject(queryResult, Formatting.Indented)` (line 123), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
Diagnostic log message is built whether or not it is wanted examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Services/TestSimpleService.cs:126— `LogDebug` at line 126 is called with an argument built by `JsonConvert.SerializeObject(getResult, Formatting.Indented)` (line 126), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
Diagnostic log message is built whether or not it is wanted examples/ADO.NET/NetCore/Example.ADO.NETCore.Application/Services/TestSimpleService.cs:134— `LogDebug` at line 134 is called with an argument built by `JsonConvert.SerializeObject(executeDataTableResult, Formatting.Indented)` (line 134), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
Diagnostic log message is built whether or not it is wanted examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/TestRepository.cs:177— `LogDebug` at line 177 is called with an argument built by `JsonConvert.SerializeObject(queryResult, Formatting.Indented)` (line 177), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
Diagnostic log message is built whether or not it is wanted examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/TestRepository.cs:180— `LogDebug` at line 180 is called with an argument built by `JsonConvert.SerializeObject(getResult, Formatting.Indented)` (line 180), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
Diagnostic log message is built whether or not it is wanted examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/TestRepository.cs:188— `LogDebug` at line 188 is called with an argument built by `JsonConvert.SerializeObject(executeDataTableResult, Formatting.Indented)` (line 188), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
Diagnostic log message is built whether or not it is wanted examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/TestRepository.cs:195— `LogDebug` at line 195 is called with an argument built by `JsonConvert.SerializeObject(getTupleData, Formatting.Indented)` (line 195), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
Diagnostic log message is built whether or not it is wanted examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/TestRepository.cs:197— `LogDebug` at line 197 is called with an argument built by `JsonConvert.SerializeObject(getValueTupleData, Formatting.Indented)` (line 197), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
Diagnostic log message is built whether or not it is wanted examples/ADO.NET/NetCore/Example.ADO.NETCore.Domain/Repositories/TestRepository.cs:199— `LogDebug` at line 199 is called with an argument built by `JsonConvert.SerializeObject(getDynamicData, Formatting.Indented)` (line 199), whose cost grows with the collection it walks. C# evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because LogDebug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `IsEnabled` test, no debug flag, no conditional-compilation region.
Fat interface: IBaseRepository (51 members) src/Sean.Core.DbRepository/Contracts/IBaseRepository.cs:13— `IBaseRepository` declares 51 members: `Factory`, `DbType`, `TableName`, `Execute`, `Execute`, `Query`, `Query`, `Get`, `Get`, `ExecuteScalar`, `ExecuteScalar`, `ExecuteScalar`, `ExecuteScalar`, `ExecuteDataTable`, `ExecuteDataTable`, `ExecuteDataSet`, `ExecuteDataSet`, `ExecuteReader`, `ExecuteReader`, `Execute`, `ExecuteTransaction`, `ExecuteAutoTransaction`, `IsTableExists`, `IsTableFieldExists`, `AddTableField`, `DeleteAll`, `DropTable`, `ExecuteAsync`, `ExecuteAsync`, `QueryAsync`, `QueryAsync`, `GetAsync`, `GetAsync`, `ExecuteScalarAsync`, `ExecuteScalarAsync`, `ExecuteScalarAsync`, `ExecuteScalarAsync`, `ExecuteDataTableAsync`, `ExecuteDataTableAsync`, `ExecuteDataSetAsync`, and 11 more. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 51 declarations carry 31 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 31 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: IBaseRepository<TEntity> (58 members) src/Sean.Core.DbRepository/Contracts/IBaseRepository.cs:225— `IBaseRepository<TEntity>` declares 58 members: `Add`, `Add`, `AddOrUpdate`, `AddOrUpdate`, `Delete`, `Delete`, `Delete`, `DeleteAll`, `Update`, `Update`, `UpdateByDto`, `UpdateByDto`, `UpdateByDto`, `UpdateByDto`, `UpdateByDto`, `UpdateByDto`, `Increment`, `Decrement`, `Save`, `Save`, `PageQuery`, `Query`, `QueryOffset`, `Get`, `Count`, `Exists`, `IsTableExists`, `IsTableFieldExists`, `AddTableField`, `AddAsync`, `AddAsync`, `AddOrUpdateAsync`, `AddOrUpdateAsync`, `DeleteAsync`, `DeleteAsync`, `DeleteAsync`, `DeleteAllAsync`, `UpdateAsync`, `UpdateAsync`, `UpdateByDtoAsync`, and 18 more. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 58 declarations carry 36 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 36 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: IQueryable<TEntity> (22 members) src/Sean.Core.DbRepository/Contracts/IQueryable.cs:6— `IQueryable<TEntity>` declares 22 members under just 13 distinct name(s): `SelectFields`, `IgnoreFields`, `MaxField`, `MinField`, `SumField`, `AvgField`, `CountField`, `CountDistinctField`, `DistinctFields`, `SelectFields`, `IgnoreFields`, `MaxField`, `MinField`, `SumField`, `AvgField`, `CountField`, `CountDistinctField`, `DistinctFields`, `Top`, `Page`, `Offset`, `SetParameter`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. That is an OVERLOAD SET, not 22 separate responsibilities: a caller binds to 13 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller's side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER's — all 22 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface.
Fat interface: ISqlCommand (17 members) src/Sean.Core.DbRepository/Contracts/ISqlCommand.cs:5— `ISqlCommand` declares 17 members: `DbType`, `Sql`, `Parameter`, `Master`, `Transaction`, `Connection`, `CommandTimeout`, `CommandType`, `OutputParameterOptions`, `BindSqlParameterType`, `UnusedSqlParameterRemoved`, `SqlParameterSorted`, `UseQuestionMarkParameter`, `ConvertParameterToDictionaryByName`, `ConvertParameterToDictionaryByPosition`, `ConvertSqlToUseQuestionMarkParameter`, `ConvertSqlToNonParameter`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Documentation: no usage examples README.md— The document is mostly feature/pricing text but does not show how to run it or point readers to the usage examples. Add a Usage section with a one-line 'how to run it' and an example of calling DbFactory/SqlFactory.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 1 of 19 project(s) overshoot their size bounds, lowering Project Cohesion to 8.9/10. The most over is `Sean.Core.DbRepository(net45)` (17703 LoC, 147 public types across 5 namespaces). Review these for cohesion — draw the boundary inside the assembly first (group each responsibility into its own namespace/folder and keep the cross-boundary members internal), since splitting a published assembly moves types between packages and breaks consumers.
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.
P10 · Library API & versioning· Large public API surface · ×1
Large public API surface — 849/939 types (90%) are public. For a library, every public type is a stability contract — make internal-by-default and expose only the intended API.
No SAST — No static application security testing detected. For this repository's stack, add CodeQL's csharp pack, or a .NET security analyzer package (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 1395 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
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.)
X2 · Cancellation propagation· Not all async methods take a CancellationToken · ×1
Not all async methods take a CancellationToken — Only 0/78 async methods accept a CancellationToken, so in-flight work can't be stopped early when the caller gives up — whatever ends it in your host (shutdown signal, timeout, abandoned request, user cancel). Thread a token through the call chain and honour it at each await and loop; where a method genuinely cannot be interrupted, omitting it is a deliberate choice — judge against your hosting model.
Nullable reference types not enabled everywhere — 1/9 NRT-eligible project(s) enable <Nullable>enable</Nullable> (projects targeting a pre-C#-8 framework are excluded — NRTs aren't available there). NRTs catch a whole class of null-deref bugs at compile time.
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.
nuget: not applicable — nuget: `dotnet list package --vulnerable` could not read this solution's dependency graph — it reported an error for at least one project and returned no package data at all (typically a packages.config / non-PackageReference project, which the command cannot read). An unreadable dependency graph is not a clean one; migrate the project(s) to PackageReference to enable this scan
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.
provenance: not applicable — The CI pipeline builds and tests but publishes no released artifact — no package publish, container push, GitHub release or deployment step. Supply-chain provenance, signing and SBOM attest RELEASED artifacts, so there is nothing to attest here. Add them to the release pipeline when this repo starts shipping artifacts (a published package, a container image, a deployed service or a tagged release).
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.
nuget: not applicable — nuget: `dotnet list package --vulnerable` could not read this solution's dependency graph — it reported an error for at least one project and returned no package data at all (typically a packages.config / non-PackageReference project, which the command cannot read). An unreadable dependency graph is not a clean one; migrate the project(s) to PackageReference to enable this scan
0
—
Run 01a0c065-55d8-711b-8839-97a0fa31bad7 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Appendix C — Personal-data map
Every field, property and record parameter whose name is conventional personal data — 22 field(s) across 2 categories, each with an exact repo-relative file:line. This is the data inventory a compliance review starts from — right-to-erasure, retention, minimisation. Detected by NAME, from the C# syntax tree, with a deliberately specific identifier classifier — the same one the C1–C5 compliance cards use to decide whether personal data is present, so CardDefinition or FileName don't trip. Two caveats stated rather than glossed: those cards additionally require corroboration (a persistence/account signal, or two distinct PII categories) that this inventory deliberately does not, so it lists more than they gate on; and D32 Data Compliance shares nothing with it — that dimension is a separate semgrep ruleset for personal data leaking into logs, URLs and browser storage, and a clean D32 result says nothing about this list. Informational — it feeds no score.
Issues: 28 · Warnings: 315 · Recommendations: 120 · Info: 8 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 20-09-2026 @ 19:57 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.