Public report — sea-orm, published 29 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 survey Measured under the Code Assurance Index · rubric rubric-2026.09.17 (frozen) · verify this survey Filed cd_4245842f131d452786d8aee8050f99fc Filed 29 September 2026, 04:53 UTC Public

SeaQL/sea-Orm

Measured 29 September 2026, 04:23 UTC

77% Strong
CriticalWeakAdequateStrongExemplary

Large · 108,596 LoC · 29 projects · rebuild ~1.8 person-years · weakest lens: Security (74%)

Findings by grade

64 critical 773 serious 13 minor 50 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
29 September 2026, 04:23 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 ▸

40/45dimensions tool-verifieddeterministic · confidence 1.0 · 5 LLM-assisted, advisory
828findings with an exact file:lineof 850 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
45/127dimensions across the health lenses108596 LoC · 29 projects — wide & deep
Chapters

Executive summary

The platform is a strong, well-architected asset with an overall health score of 77%. It is a large, mature system with significant production logic and robust architectural foundations. However, it carries a hidden tax on delivery speed due to code quality gaps that are not yet critical but are actively slowing the team down.

The system represents substantial value, containing over 100,000 lines of production code and nearly 60,000 lines of tests. Rebuilding this core logic from scratch would cost approximately €260,000 and require 1.8 person-years of effort. This high replacement cost underscores the importance of maintaining the current codebase efficiently rather than risking a costly rewrite. The architecture is exceptionally sound, ensuring that changes do not ripple unpredictably, and the domain modeling is perfect, meaning the business logic is clearly represented.

The primary risk is a velocity tax on every change. Code quality signals indicate that modifications in weaker areas cost 5–10% more effort than in clean code. This inefficiency compounds annually, costing the team roughly 8.7 to 52 engineer-days per year in drag. While the architecture is solid, the lack of documented architectural decisions means new teams may struggle to understand context, and the absence of a clear testing guide in the documentation slows onboarding. These gaps create reliability and security exposure risks that are not yet critical but are preventable.

What is genuinely good is the system’s structural integrity. The architecture score of 98% and domain modeling of 100% indicate a highly coherent system where business rules are well-isolated and changes are contained. Performance is also rated at 100%, ensuring the system meets its operational targets. These strengths provide a stable foundation that makes targeted improvements highly effective.

Focus first on resolving the lack of architectural decision records. This single action pays for itself within months by reducing the annual velocity tax. Documenting key decisions will clarify context for future changes, reducing the 5–10% efficiency drag. This is the highest-leverage move, as it addresses the root cause of the speed tax without requiring significant engineering effort. Other improvements, such as adding a testing section to the README, should follow once the decision framework is in place. The picture is partial, as event-driven patterns and accessibility were not measured, but the current data is sufficient to guide immediate action.

How the score is built — each lens's share of the headline Width is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
Security 74% · 46% weightMaturity 75% · 25% weightReadiness 77% · 14% weightCode Health 81% · 8% weightArchitecture 98% · 4% weightDomain Modelling 100% · 2% weightPerformance 100% · 1% weight

No single dominant problem — the weakest areas are close, so progress on any of them moves the score.

Code composition — where the lines go
Tests 100%
New since the last scan (14+)

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

  • D4 · Edited copy of a member (21 corresponding lines) sea-orm-sync/src/schema/builder.rs
  • D4 · Members sharing a duplicated core (4 members, 50+ identical tokens) sea-orm-sync/src/entity/column.rs
  • D4 · Duplicated block (28 lines × 2) sea-orm-sync/src/entity/link.rs
  • D4 · Duplicated block (8 lines × 2) sea-orm-sync/src/query/select.rs
  • D4 · Duplicated block (5 lines × 2) sea-orm-sync/src/entity/column.rs
  • D4 · Duplicated block (5 lines × 2) sea-orm-sync/src/entity/column.rs
  • D5 · Off the main sequence: entity (issues/1599/entity)
  • D5 · Off the main sequence: sea-orm-codegen
  • D22 · Redundant/Confusingly named operations: `arrow_array_to_value` and `arrow_array_to_value_alt` have identical signatures and likely perform the same core conversion, with `alt` being a fallback or variant. This creates ambiguity for users on which to use.
  • D22 · Duplicate intent: `execute` and `exec_stmt` appear to be synonyms for executing a SQL statement. Having two methods with different names for the same action is confusing.
  • D22 · Type duplication: `MigratorTraitSelf` and `MigratorTrait` expose identical method signatures for querying migration status (`get_migration_with_status`, `get_pending_migrations`, `get_applied_migrations`). This suggests one trait is redundant or they are meant to be implemented together but are exposed as separate public types causing confusion.
  • D22 · Confusingly named operations: `from_json` and `set_from_json` likely perform similar JSON deserialization into the model. The distinction is unclear from the signature alone.
  • D29 · REDACTED
  • D29 · REDACTED

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

Rebuild cost & value ~ Modeled — €88,000–€440,000
Cost to rebuild€88,000–€440,000 (0.9–2.8 person-years (1,465–4,648 h), ~1–4 engineers)
Domain complexityStandard — harder problems cost more per line
Quality factor1.2× (at 77% quality) — the last 20% of quality is most of the work
Size & shapeLarge · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)

This codebase represents roughly ~1.8 person-years of build effort (about ~€260,000 to rebuild). Its weakest lens is Security at 74% — the part of that asset most exposed by the findings below.

How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.0) — standard service × a 1.2× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source · effort from total production LoC as straight-line logic (the tier split is a C#-only syntax walk), a conservative lower bound. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).

Top priorities

The highest-leverage moves; the full ranked list is in the Roadmap below.

1
Resolve the 1 No ADRs found finding(s) in ADR Quality.
+2.4 pts · Low effort · ADR Quality
2
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).
+2.4 pts · Medium effort · Architecture documentation
3
Add a 'Testing' section to the root README — how to run the test suite.
+2.4 pts · Medium effort · Documentation (README)

Diagnosis — what's actually going on

The top fix pays for itself · High · Economics
The top-ranked fix costs roughly 1–3 engineer-days once. Not doing it costs about 8.7–52.1 engineer-days every year, paid as drag on the ~76,743 lines this team changes annually — a bill that arrives whether or not anyone books it. On those figures the fix breaks even in roughly 1–4 months and is free after that. Method, stated so this is not read as a quotation: debt from the ranked task's effort band; interest = annual changed lines (measured, annualised from the 90-day window) ÷ an ASSUMED 150–400 lines per engineer-day × the 5–10% drag implied by the code-quality signals; breaking point = debt ÷ annual interest. A modelled planning range built from measured inputs and one named assumption — not a quotation, a valuation, or a certified figure.
Evidence: D15 churn: 18,923 line(s) changed over a 90-day window ⇒ ~76,743/year · D1/D2/D4 code quality: averaging 6.2/10 ⇒ a 5–10% drag on each change · top-ranked remediation: Low effort ⇒ about 1–3 engineer-day(s)
→ Do the top-ranked fix now if this code will still be yours in 4 months.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Resolve the 1 No ADRs found finding(s) in ADR Quality. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Resolve the 1 No ADRs found finding(s) in ADR Quality.
A velocity tax on every change · Medium · Economics
The code-quality signals (complexity, duplication, cohesion) average 6.2/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 5–10% more than in clean code, and the tax compounds as the codebase grows. (A modelled estimate, not a measured fact.)
Evidence: D1/D2/D4 code quality: averaging 6.2/10 across the code-quality signals actually measured
→ Pay it down where churn is highest — the hotspots — not everywhere; that's where the tax is actually paid.

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways — a layering smell or cycle. A clean layered graph has none.

arch entity (issues/1599/entity) entity) graphql graphql graphql->entity (issues/1599/entity) sea-orm sea-orm sea-orm-arrow sea-orm-arrow sea-orm->sea-orm-arrow sea-orm-macros sea-orm-macros sea-orm->sea-orm-macros sea-orm-cli sea-orm-cli sea-orm-codegen sea-orm-codegen sea-orm-cli->sea-orm-codegen sea-orm-issues-1143 sea-orm-issues-1143 sea-orm-issues-1278 sea-orm-issues-1278 sea-orm-issues-1357 sea-orm-issues-1357 sea-orm-issues-1473 sea-orm-issues-1473 sea-orm-issues-1790 sea-orm-issues-1790 sea-orm-issues-249-app sea-orm-issues-249-app service service sea-orm-issues-249-app->service sea-orm-issues-262 sea-orm-issues-262 sea-orm-issues-319 sea-orm-issues-319 sea-orm-migration sea-orm-migration sea-orm-migration->sea-orm-cli sea-orm-rocket sea-orm-rocket sea-orm-rocket-codegen sea-orm-rocket-codegen sea-orm-rocket->sea-orm-rocket-codegen sea-orm-sync sea-orm-sync sea-orm-sync->sea-orm-arrow sea-orm-sync->sea-orm-macros __more__ +9 more projects

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.)

377 modules, 555 dependencies. 3 dependency cycles across 28 modules, marked above the diagonal.

Showing the 40 most-connected modules; 337 more are not drawn.

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.
depends on →1 sea_orm_issues_1278.entity2 sea_orm_macros.derives.active_enum_display3 sea_orm_macros.derives.active_model_ex4 sea_orm_rocket.database5 sea_orm_sync.database6 sea_orm_sync.entity.compound.belongs_to7 sea_orm_sync.entity.identity8 sea_orm_sync.error9 sea_orm_sync.rbac.entity.permission10 sea_orm_sync.rbac.entity.resource11 sea_orm_sync.rbac.entity.role12 sea_orm_sync.rbac.entity.user13 sea_orm_codegen.error14 sea_orm_sync.database.statement15 sea_orm_sync.entity.compound.has_many16 sea_orm_sync.query.helper17 sea_orm_sync.rbac.engine18 sea_orm_sync.database.connection19 sea_orm_sync.database.mock20 sea_orm_sync.database.proxy21 sea_orm_sync.query.traits22 sea_orm_sync.driver.mock23 sea_orm_sync.driver.rusqlite24 sea_orm_sync.database.transaction25 sea_orm_sync.executor.query26 sea_orm_sync.database.restricted_connection27 sea_orm_sync.executor.select28 sea_orm_sync.query.select29 sea_orm_sync.entity.relation30 sea_orm_sync.entity.base_entity31 sea_orm_sync.entity.column32 sea_orm.query.select33 sea_orm_sync.entity.column_def34 sea_orm_sync.schema35 sea_orm_sync.schema.builder36 sea_orm_sync.database.executor37 sea_orm_sync.database.db_connection38 sea_orm.database.db_connection39 sea_orm.database.restricted_connection40 sea_orm.database.transaction
1 sea_orm_issues_1278.entity
2 sea_orm_macros.derives.active_enum_display
3 sea_orm_macros.derives.active_model_ex
4 sea_orm_rocket.database
5 sea_orm_sync.database
6 sea_orm_sync.entity.compound.belongs_to
7 sea_orm_sync.entity.identity
8 sea_orm_sync.error
9 sea_orm_sync.rbac.entity.permission
10 sea_orm_sync.rbac.entity.resource
11 sea_orm_sync.rbac.entity.role
12 sea_orm_sync.rbac.entity.user
13 sea_orm_codegen.error1
14 sea_orm_sync.database.statement1
15 sea_orm_sync.entity.compound.has_many1
16 sea_orm_sync.query.helper11
17 sea_orm_sync.rbac.engine1111
18 sea_orm_sync.database.connection22
19 sea_orm_sync.database.mock311
20 sea_orm_sync.database.proxy11
21 sea_orm_sync.query.traits1
22 sea_orm_sync.driver.mock21
23 sea_orm_sync.driver.rusqlite1134
24 sea_orm_sync.database.transaction111118121
25 sea_orm_sync.executor.query111111
26 sea_orm_sync.database.restricted_connection123211111
27 sea_orm_sync.executor.select1210
28 sea_orm_sync.query.select1248111
29 sea_orm_sync.entity.relation22
30 sea_orm_sync.entity.base_entity111
31 sea_orm_sync.entity.column13
32 sea_orm.query.select124811131
33 sea_orm_sync.entity.column_def1
34 sea_orm_sync.schema11
35 sea_orm_sync.schema.builder121
36 sea_orm_sync.database.executor115111
37 sea_orm_sync.database.db_connection1116111112
38 sea_orm.database.db_connection11161111121
39 sea_orm.database.restricted_connection1232111111
40 sea_orm.database.transaction111118121
Dependency, pointing down the layeringAbove the diagonal — part of a cycleThe module itself
…rm_issues_1278.entity…s.active_enum_display…rives.active_model_ex…a_orm_rocket.databasesea_orm_sync.database…y.compound.belongs_to…_sync.entity.identitysea_orm_sync.error…bac.entity.permission….rbac.entity.resource…sync.rbac.entity.role…sync.rbac.entity.usersea_orm_codegen.error…nc.database.statement…ity.compound.has_many…orm_sync.query.helper…_orm_sync.rbac.engine…c.database.connection…rm_sync.database.mock…m_sync.database.proxy…orm_sync.query.traits…_orm_sync.driver.mock…_sync.driver.rusqlite….database.transaction…m_sync.executor.query…restricted_connection…_sync.executor.select…orm_sync.query.select…_sync.entity.relation…nc.entity.base_entity…rm_sync.entity.columnsea_orm.query.select…ync.entity.column_defsea_orm_sync.schema…m_sync.schema.builder…ync.database.executor…atabase.db_connection…atabase.db_connection…restricted_connection….database.transaction…rm_issues_1278.entity1…s.active_enum_display2…rives.active_model_ex3…a_orm_rocket.database4sea_orm_sync.database5…y.compound.belongs_to6…_sync.entity.identity7sea_orm_sync.error8…bac.entity.permission9….rbac.entity.resource10…sync.rbac.entity.role11…sync.rbac.entity.user12sea_orm_codegen.error13…nc.database.statement14…ity.compound.has_many15…orm_sync.query.helper16…_orm_sync.rbac.engine17…c.database.connection18…rm_sync.database.mock19…m_sync.database.proxy20…orm_sync.query.traits21…_orm_sync.driver.mock22…_sync.driver.rusqlite23….database.transaction24…m_sync.executor.query25…restricted_connection26…_sync.executor.select27…orm_sync.query.select28…_sync.entity.relation29…nc.entity.base_entity30…rm_sync.entity.column31sea_orm.query.select32…ync.entity.column_def33sea_orm_sync.schema34…m_sync.schema.builder35…ync.database.executor36…atabase.db_connection37…atabase.db_connection38…restricted_connection39….database.transaction40111111111223111112111341111181211111111232111111210124811122111131248111311111211151111116111112111611111211232111111111118121+337 more modules (most-connected shown)

At a glance — Code Health · 81% · Strong ·

At a glance — Architecture · 98% · Exemplary ·

At a glance — Maturity · 75% · Strong ·

At a glance — Readiness · 77% · Strong ·

At a glance — Security · 74% · Adequate · gated by D36 ·

At a glance — Domain Modelling · 100% · Exemplary ·

At a glance — Performance · 100% · Exemplary ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A03:2021 — Injection64High / Critical
A05:2021 — Security Misconfiguration5Medium
A02:2021 — Cryptographic Failures4High / Critical

Roadmap

First, resolve the missing Architecture Decision Records by documenting significant design choices with their context and consequences in a centralized location. Next, enhance the root README by adding a clear section on how to run the test suite. Then, extend structured logging to all remaining runnable modules to ensure full production diagnosability. Finally, improve the overall quality of the documentation to address current gaps and inconsistencies.

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

Do thisHelpsEffortDimension
Resolve the 1 No ADRs found finding(s) in ADR Quality.+2.4 ptsLowADR Quality
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).+2.4 ptsMediumArchitecture documentation
Add a 'Testing' section to the root README — how to run the test suite.+2.4 ptsMediumDocumentation (README)
Resolve the 3 REDACTED finding(s) in Secrets (history) — start with REDACTED (3).+1.0 ptsLowSecrets (history)
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.+2.0 ptsMediumObservability
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED.+1.0 ptsLowStatic Analysis (SAST)
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2).+1.0 ptsLowStatic Analysis (SAST)
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing.+0.7 ptsLowSupply-chain Provenance & Signing

File quality

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

FileScoreBandWorst signal
REDACTED0.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.9MixedIaC & Container Security: Medium IaC: REDACTED
sea-orm-sync/src/schema/builder.rs6.0MixedExplicit Debt: TodoComment
src/schema/builder.rs6.0MixedExplicit Debt: TodoComment
sea-orm-macros/src/derives/active_enum.rs6.0MixedExplicit Debt: TodoComment
sea-orm-macros/src/derives/active_model_ex.rs6.0MixedExplicit Debt: TodoComment
sea-orm-sync/src/query/loader.rs6.0MixedExplicit Debt: TodoComment
sea-orm-sync/src/driver/rusqlite.rs6.0MixedExplicit Debt: TodoComment
src/query/loader.rs6.7MixedExplicit Debt: TodoComment
sea-orm-arrow/src/lib.rs7.0MixedCyclomatic Complexity: sea_orm_arrow::values_to_arrow_array (cyclomatic 52)
sea-orm-macros/src/derives/model_ex.rs7.0MixedCyclomatic Complexity: sea_orm_macros::derives::model_ex::expand_sea_orm_model (cyclomatic 25)
sea-orm-sync/src/entity/active_model.rs7.0MixedCyclomatic Complexity: sea_orm_sync::entity::active_model::establish_links (cyclomatic 25)
sea-orm-sync/src/rbac/engine/mod.rs7.0MixedCyclomatic Complexity: RbacEngine::user_can (cyclomatic 21)
sea-orm-sync/src/query/insert.rs7.0MixedCognitive Complexity: InsertMany::many (cognitive 18)
sea-orm-sync/src/schema/entity.rs7.0MixedCognitive Complexity: sea_orm_sync::schema::entity::column_def_from_entity_column (cognitive 18)
sea-orm-sync/src/executor/consolidate.rs7.0MixedCognitive Complexity: sea_orm_sync::executor::consolidate::consolidate_query_result_of_ordered_rows (cognitive 16)
sea-orm-sync/src/executor/query.rs7.0MixedGod Classes: FileTooLong: executor/query.rs
sea-orm-macros/src/derives/entity_loader.rs7.0MixedGod Classes: FunctionTooLong: sea_orm_macros::derives::entity_loader::expand_entity_loader

How the grades work

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 — 64

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 — 773

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 — 13

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved — 50

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. 40 of 45 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 1.0 — 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 — 45 dimensions across the health lenses
D1D2D3D4D5D9D11D13D14D15D16D17D19D20D21D22D26D28D29D30D31D34D35D36D43D44AX10AX3AX4AX9DM1DM2DM4DM5DM6M1M2M3M4P1P2P3P4P6PF3

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

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

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a0eb67-024f-7cb9-9d7b-57f72c152648.

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

Run transparency — what happened this run

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.

  • D6 Cohesion (LCOM4) — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D8 Code Coverage — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.rs) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo. To have real coverage read, produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
  • D12 Dependency Hygiene — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — 100 direct Cargo declaration(s) were read, but the outdated signal needs crates.io, and no committed Cargo.lock resolves them to versions, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
  • D14 License Compliance — 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. This repository declares a Cargo manifest, but the licence verdict published here was taken over its npm package dependencies. Nothing was read about its Cargo dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • AX1 Captive dependencies — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AX2 Stateful singletons — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • C1 Data Protection — 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. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — 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. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — 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. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
  • C4 Data Retention — 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. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
  • C5 Data-Subject Rights — 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. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
  • DM3 Integration-event 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. Not scored — a domain type leaking across a crate boundary cannot be told apart from source alone from a legitimate shared-kernel crate. Reported as guidance rather than measured.
  • DM7 Repository granularity — 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. Not scored — detecting 'a repository per CHILD entity' needs the aggregate-root structure, which is not resolvable from source alone here. Reported as guidance rather than measured.
  • ED5 Idempotency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check finds retry-prone mutations by walking the repository's declared types, and NONE was loaded on this run, so it had nothing to look at. That is a limit of the analyzer's reach — it reads .NET projects — not a finding that this repository has no command handlers or message consumers.
  • GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • P10 Library API & versioning — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads NuGet packaging and C# public API only, and no .NET project was loaded for this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • P8 Schema migrations — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. The schema may be created by a runner, a deploy script or a config file outside what this check reads, so an absence here is our blind spot rather than a missing migration strategy. The card abstains instead of scoring. You can widen what we reach: if the schema is created and evolved by a tool this check does not name, naming it lets us teach the detector to read it.
  • PF1 Benchmark discipline — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • PF2 Allocation hygiene — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • S1 Web-Security Posture — 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. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X1 Async correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X10 Duplicated predicate — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X12 Unreachable branch — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X13 Undrained process stream — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X14 Bypassable address classification — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X15 Unvalidated length from an untrusted reader — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X16 Unfloored truncation loop — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X17 Uncapped recursion over a caller-supplied document — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X18 Disposal-pattern correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X19 Unrestored process-global state — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X2 Cancellation propagation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X20 Mistyped argument guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X21 Side-effecting pattern guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X22 Contradicted release guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X23 Unguarded diagnostic materialisation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X24 Document value interpolated into markup unescaped — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X25 Inert configuration knob — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X26 Unsynchronised callback handoff — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X27 Collection changed while being enumerated — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X28 Index access outside its own emptiness guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X29 Per-element action decided by a fixed element — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X3 Exception handling — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X30 Support guard that admits what it rejects — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X32 Type resolved by simple name across every loaded assembly — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X4 Structured logging — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X5 Nullable reference types — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X6 Hand-rolled structured-format parsing — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X7 Silent fallback defaults — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

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.
  • 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.
  • 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.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
  • D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • D22 Internal API Consistency: API-surface coherence is an LLM judgement over a sample of the public surface — consistency of intent across the whole API is approximated, not exhaustively verified.
  • 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.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a 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.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • DM4 Rich vs anemic domain model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
  • DM6 Domain ↔ infrastructure boundary: Infrastructure reached through a hand-rolled wrapper, a domain-named facade, reflection, or a string-keyed service locator resolves to a non-infra type and isn't seen; the body scan is symbol resolution over syntax, not full dataflow. A clean result means "no resolved infra reference in a domain body", not a proof of purity.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

The LLM boundary

LLM-set scores this run (5): D19, D21, D22, 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.

Dimensions

D1 · Cyclomatic Complexity6.2 / 10Adequate✓ Tool-verified

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

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

Maturity: Documented → Verified → Prevented · effective 6.2 / 10 · rule-coverage 100% · ceiling Prevented

31 function(s) exceeded the cyclomatic complexity threshold of 15; the worst was sea_orm_macros::derives::entity_model::expand_derive_entity_model at 87. A further 11 function(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 sea_orm_sync::driver::sqlx_postgres::from_sqlx_postgres_row_to_proxy_row at 53 — they are counted neither in the figure above nor in this dimension's score. 9 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: sea-orm-sync/src/driver/sqlx_postgres.rs (sea_orm_sync::driver::sqlx_postgres::from_sqlx_postgres_row_to_proxy_row at 53), src/driver/sqlx_postgres.rs (sea_orm::driver::sqlx_postgres::from_sqlx_postgres_row_to_proxy_row at 53), sea-orm-codegen/src/entity/writer/mermaid.rs (sea_orm_codegen::entity::writer::mermaid::col_type_name at 36), sea-orm-sync/src/dynamic/model.rs (sea_orm_sync::dynamic::model::try_get at 32), src/dynamic/model.rs (sea_orm::dynamic::model::try_get at 32), and 4 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

sea_orm_macros::derives::entity_model::expand_derive_entity_model (cyclomatic 87) · ×7sea-orm-macros/src/derives/entity_model.rs:59
sea_orm_arrow::values_to_arrow_array (cyclomatic 52) · ×2sea-orm-arrow/src/lib.rs:695
Column::get_def_inner::write_col_def (cyclomatic 49) · ×2sea-orm-codegen/src/entity/column.rs:134
EntitySchemaInfo::sync (cyclomatic 44) · ×2sea-orm-sync/src/schema/builder.rs:390
sea_orm_cli::commands::generate::run_generate_command (cyclomatic 21) · ×2sea-orm-cli/src/commands/generate.rs:116

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

What to do

  1. Resolve the 7 sea_orm_macros finding(s) in Cyclomatic Complexity — start with arrow_schema.rs (3), entity_model.rs, value_type_match.rs. — One of this dimension's main actionable groups (7 warning-level).
  2. Resolve the 2 sea_orm_arrow finding(s) in Cyclomatic Complexity — start with lib.rs (2). — One of this dimension's main actionable groups (2 warning-level).
  3. Resolve the 2 Column finding(s) in Cyclomatic Complexity — start with column.rs (2). — One of this dimension's main actionable groups (2 warning-level).
  4. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D2 · Cognitive Complexity4.9 / 10Weak✓ Tool-verified

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

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

Maturity: Documented → Verified → Prevented · effective 4.9 / 10 · rule-coverage 100% · ceiling Prevented

51 function(s) exceeded the cognitive complexity threshold of 15; the worst was sea_orm_macros::derives::entity_model::expand_derive_entity_model at 279.

sea_orm_macros::derives::entity_model::expand_derive_entity_model (cognitive 279) · ×9sea-orm-macros/src/derives/entity_model.rs:59
sea_orm_sync::entity::active_model::establish_links (cognitive 55) · ×3sea-orm-sync/src/entity/active_model.rs:1210
sea_orm::entity::active_model::establish_links (cognitive 55) · ×3src/entity/active_model.rs:1221
sea_orm_codegen::merge::merge_derives (cognitive 28) · ×3sea-orm-codegen/src/merge/mod.rs:265
EntityWriter::gen_dense_model_struct (cognitive 21) · ×3sea-orm-codegen/src/entity/writer/dense.rs:182

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

What to do

  1. Resolve the 9 sea_orm_macros finding(s) in Cognitive Complexity — start with model_ex.rs (3), arrow_schema.rs (2), entity_model.rs. — One of this dimension's main actionable groups (9 warning-level).
  2. Resolve the 3 sea_orm_sync finding(s) in Cognitive Complexity — start with active_model.rs, entity.rs, consolidate.rs. — One of this dimension's main actionable groups (3 warning-level).
  3. Resolve the 3 sea_orm finding(s) in Cognitive Complexity — start with active_model.rs, entity.rs, consolidate.rs. — One of this dimension's main actionable groups (3 warning-level).
  4. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

Maturity: Documented → Verified → Prevented · effective 8.6 / 10 · rule-coverage 100% · ceiling Prevented

52 god class(es) detected.

FileTooLong: executor/query.rs · ×18sea-orm-sync/src/executor/query.rs
FunctionTooLong: sea_orm_macros::derives::entity_model::expand_derive_entity_model · ×11sea-orm-macros/src/derives/entity_model.rs:59
MethodTooLong: EntityTransformer.transform · ×9sea-orm-codegen/src/entity/transformer.rs:12
ClassTooLong: DatabaseTransaction · ×8src/database/transaction.rs:33
TooManyMethods: ConnectOptions · ×5sea-orm-sync/src/database/mod.rs:81

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

What to do

  1. Resolve the 18 FileTooLong finding(s) in God Classes — start with query.rs (2), loader.rs (2), sqlx_postgres.rs (2). — One of this dimension's main actionable groups (18 warning-level).
  2. Resolve the 11 FunctionTooLong finding(s) in God Classes — start with lib.rs (3), sqlx_postgres.rs (2), sqlx_mysql.rs (2). — One of this dimension's main actionable groups (11 warning-level).
  3. Resolve the 9 MethodTooLong finding(s) in God Classes — start with builder.rs (4), transformer.rs, relation.rs. — One of this dimension's main actionable groups (9 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D4 · Code Duplication7.5 / 10Strong✓ Tool-verified

What it measures: Copy-pasted code that should be shared instead.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.

Maturity: Documented → Verified → Prevented · effective 7.5 / 10 · rule-coverage 100% · ceiling Verified

556 duplicated block group(s) detected. A further 42 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 8 of the 598 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.

Duplicated block (7 lines × 2) · ×61sea-orm-macros/src/derives/entity_loader.rs:309
Duplicated block (6 lines × 2) · ×52sea-orm-arrow/src/lib.rs:1295
Duplicated block (8 lines × 2) · ×42issues/1357/src/main.rs:20
Duplicated block (11 lines × 2) · ×35sea-orm-arrow/src/lib.rs:934
Duplicated block (9 lines × 2) · ×31sea-orm-arrow/src/lib.rs:828

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

What to do

  1. Resolve the 61 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with query.rs (6), transaction.rs (4), insert.rs (4). — One of this dimension's main actionable groups (61 warning-level).
  2. Resolve the 52 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with active_value.rs (8), consolidate.rs (7), helper.rs (5). — One of this dimension's main actionable groups (52 warning-level).
  3. Resolve the 42 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with transaction.rs (4), rusqlite.rs (4), builder.rs (3). — One of this dimension's main actionable groups (42 warning-level).
  4. 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.

D5 · Coupling9.4 / 10Stronggated by 2 serious 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.

Maturity: Documented → Verified → Prevented · effective 9.4 / 10 · rule-coverage 100% · ceiling Prevented

29 production modules (Cargo), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 2 module(s) off the main sequence, with abstractness counted on 21 of the 29 (the rest declare no modelled class or interface, export only macros, or have no source directory of their own).

Off the main sequence: entity (issues/1599/entity) · ×2

What to do

  1. Resolve the 2 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (2 warning-level).
  2. 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.

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

1153 test methods: 662 unit, 491 integration, 0 BDD, 0 e2e. The Rust suite contributes 1153 `#[test]` function(s) across 249 file(s) declaring at least one; its unit/integration split is Cargo's own — 140 of those file(s) are integration-test targets under a crate's tests/ directory, and the rest are #[test] functions compiled into the crate they test.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 flaky across 1 measured tier(s). Rust (repository root, 249 test files): measured (0 flaky).

✓ On the Gold path — maintain.

Detailed fixes: d11_recommendation.md.

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

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

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

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

REDACTED scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 of 7 shipped npm package(s) use a banned license. Licences were resolved from registry.npmjs.org over the 7 production dependency(ies) this repository's committed lockfile resolves, across 0 product package.json manifest(s). Its 21 `devDependencies` declaration(s) are excluded: a consumer installs none of them. ★ DEPTH: this is the DIRECT production set the lockfile resolves, NOT the transitive closure — only one of the four lock dialects this pass reads states a full graph, so a banned licence pulled in only by a dependency's OWN dependencies is outside this verdict, exactly as the JVM arm's declaration-site verdict is. ★ Each licence is the one the registry publishes for the package's CURRENT release rather than for the pinned version, which is the same caveat the Hex and RubyGems arms carry. ★ COVERAGE OF THIS VERDICT: it grades this repository's npm package dependencies and nothing else. The repository also declares a Cargo manifest, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.9 / 10Stronggated by 5 serious findings✓ Tool-verified

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

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

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: src/schema/builder.rs (4×44=176); sea-orm-macros/src/derives/active_model_ex.rs (6×21=126); sea-orm-macros/src/derives/model_ex.rs (4×25=100)

Hotspot: src/schema/builder.rs · ×5src/schema/builder.rs:394

What to do

  1. Resolve the 5 Hotspot finding(s) in Churn × Complexity Hotspots — start with builder.rs (2), active_model_ex.rs, model_ex.rs. — One of this dimension's main actionable groups (5 warning-level).

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

D16 · Bus Factor8.6 / 10Strong✓ Tool-verified

What it measures: Whether knowledge is concentrated in too few people (the "bus factor").

Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.

Maturity: Documented → Verified → Prevented · effective 8.6 / 10 · rule-coverage 100% · ceiling Documented

32 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is sea-orm-arrow/src/lib.rs. Counted over 226 of the 446 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)

What to do

  1. Resolve the 1 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
  2. Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).

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

D17 · Explicit Debt10.0 / 10Stronggated by 18 serious findings✓ Tool-verified

What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.

Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

18 deducted task-comment markers across 108596 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

TodoComment · ×14examples/loco_example/tests/requests/notes.rs:8
FixmeComment · ×4sea-orm-sync/tests/json_struct_tests.rs:172

What to do

  1. Resolve the 14 TodoComment finding(s) in Explicit Debt — start with downloader.rs (3), rusqlite.rs (2), loader.rs (2). — One of this dimension's main actionable groups (14 warning-level).
  2. Resolve the 4 FixmeComment finding(s) in Explicit Debt — start with json_struct_tests.rs (4). — One of this dimension's main actionable groups (4 warning-level).
  3. 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.

D19 · Documentation QualityStrong◐ Sampled · advisory

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

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

Maturity: Documented → Verified → Prevented · effective Strong / 10 · rule-coverage 100% · ceiling Documented

The repository's root README is a strong overview (SeaORM: powerful ORM for Rust web services) with links to the crate, build status, and Discord. It also documents Getting Started, an expressive entity format section, and several architecture topics such as Smart Entity Loader, Schema first or Entity first, Synchronous Support, and the migration CLI. The sea-orm-cli/README.md is a focused directory README (SeaORM CLI install/usage, generate/entity/migrate commands), while the examples directories each have their own READMEs covering integration with Actix/Axum/GraphQL/jsonrpsee/Loco, plus one full SeaORM MySQL example and a Loco REST starter. The architecture/design docs are absent from this summary. (6 of 25 sampled documents could not be assessed: 1 of 2 evaluation groups failed.)

What to do

  1. Improve Documentation Quality — currently 8.0/10. — The repository's root README is a strong overview (SeaORM: powerful ORM for Rust web services) with links to the crate, build status, and Discord. It also documents Getting Started, an expressive entity format section, and several architecture topics such as Smart Entity Loader, Schema first or Entity first, Synchronous Support, and the migration CLI. The sea-orm-cli/README.md is a focused directory README (SeaORM CLI install/usage, generate/entity/migrate commands), while the examples directories each have their own READMEs covering integration with Actix/Axum/GraphQL/jsonrpsee/Loco, plus one full SeaORM MySQL example and a Loco REST starter. The architecture/design docs are absent from this summary. (6 of 25 sampled documents could not be assessed: 1 of 2 evaluation groups failed.)

Detailed fixes: d19_recommendation.md.

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

What it measures: Whether architecture decisions are recorded well (context, decision, consequences).

Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

No architecture decision records were found.

No ADRs found

What to do

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

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

D21 · Naming ConsistencyExemplary◐ Sampled · advisory

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.

Maturity: Documented → Verified → Prevented · effective Exemplary / 10 · rule-coverage 100% · ceiling Verified

0 naming inconsistencies across 0 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

D22 · Internal API ConsistencyAdequate◐ Sampled · advisory

What it measures: Whether the internal API surface is consistent and coherent.

Method: Judged by language model at low temperature over a sample of the public API surface (IsPackable or .Contracts types). Sampled, advisory; confidence discounted by model uncertainty.

Maturity: Documented → Verified → Prevented · effective Adequate / 10 · rule-coverage 100% · ceiling Verified

4 API inconsistencies across a 400-member sample of 449 exposed types.

Redundant/Confusingly named operations: `arrow_array_to_value` and `arrow_array_to_value_alt` have identical signatures and likely perform the same core conversion, with `alt` being a fallback or variant. This creates ambiguity for users on which to use.
Duplicate intent: `execute` and `exec_stmt` appear to be synonyms for executing a SQL statement. Having two methods with different names for the same action is confusing.
Type duplication: `MigratorTraitSelf` and `MigratorTrait` expose identical method signatures for querying migration status (`get_migration_with_status`, `get_pending_migrations`, `get_applied_migrations`). This suggests one trait is redundant or they are meant to be implemented together but are exposed as separate public types causing confusion.
Confusingly named operations: `from_json` and `set_from_json` likely perform similar JSON deserialization into the model. The distinction is unclear from the signature alone.

What to do

  1. Resolve the 1 Redundant/Confusingly named operations finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 Duplicate intent finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Type duplication finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).

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

D26 · Project Cohesion8.6 / 10Strong✓ Tool-verified

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

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

Maturity: Documented → Verified → Prevented · effective 8.6 / 10 · rule-coverage 100% · ceiling Documented

2 of 28 build units (Cargo) flagged as possibly oversized/incoherent.

Split sea-orm-sync

What to do

  1. Resolve the 1 Split sea-orm-sync 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.

D28 · Secrets (history)7.0 / 10Adequategated by 3 critical findings✓ Tool-verified

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.

Maturity: Documented → Verified → Prevented · effective 7.0 / 10 · rule-coverage 100% · ceiling Documented

3 finding(s): 0 critical, 3 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

REDACTED
REDACTED

What to do

  1. Resolve the 3 REDACTED finding(s) in Secrets (history) — start with REDACTED (3). — One of this dimension's main actionable groups (3 issue-level).
  2. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

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

D29 · Static Analysis (SAST)5.1 / 10Adequate✓ Tool-verified

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

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

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

Maturity: Documented → Verified → Prevented · effective 5.1 / 10 · rule-coverage 100% · ceiling Documented

64 finding(s): 0 critical, 61 high, 3 medium, 0 low. 58 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 1 file(s) — `src/database/mock.rs` (line 468, line 510, line 541, …) — 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. Separately, one or more rules could not re-parse an embedded snippet in 2 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. No action in Static Analysis (SAST) — all 58 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (58 issue-level, 0 of them charged here).

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

D30 · Dependency Vulnerabilities10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle, npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No known-vulnerable dependencies in any ecosystem this repository declares.

✓ On the Gold path — maintain.

Detailed fixes: d30_recommendation.md.

D31 · IaC & Container Security9.5 / 10Stronggated by 5 serious findings✓ Tool-verified

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (Dockerfile/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

Maturity: Documented → Verified → Prevented · effective 9.5 / 10 · rule-coverage 100% · ceiling Documented

5 finding(s): 0 critical, 0 high, 5 medium, 0 low.

REDACTED

What to do

  1. Resolve the 5 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (5). — One of this dimension's main actionable groups (5 warning-level).

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

D34 · Knowledge Freshness9.6 / 10Exemplary✓ Tool-verified

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

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

Maturity: Documented → Verified → Prevented · effective 9.6 / 10 · rule-coverage 100% · ceiling Documented

9 of 226 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is src/entity/primary_key.rs. Counted over 226 of the 446 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned files with no living knowledge

✓ On the Gold path — maintain.

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

D35 · Change Coupling10.0 / 10Stronggated by 1 serious finding✓ Tool-verified

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

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

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. 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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: query.rs↔transaction.rs 60%

Change coupling: query.rs ↔ transaction.rssrc/database/stream/query.rs

What to do

  1. Resolve the 1 Change coupling finding(s) in Change Coupling — start with query.rs. — One of this dimension's main actionable groups (1 warning-level).

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

D36 · Supply-chain Provenance & Signing0.0 / 10Critical✓ Tool-verified

What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.

Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).

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

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. SCORED, not informational.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 0 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

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

Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. 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. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.

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

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

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

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

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

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

AX9 · CQS / query purity10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.

Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.

Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.

DM1 · Aggregate boundaries10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether an aggregate references another aggregate by identity rather than embedding it by object reference.

Method: Roslyn (DDD-gated): aggregate roots identified by convention; each aggregate field checked for direct references to other aggregates versus id-only. Deterministic, DDD-native.

Coverage: Population: aggregate roots identified by AggregateRoot/IAggregateRoot base/interface NAME convention; reference-by-identity then checked exhaustively within that set — a root not using those names is invisible.

DM2 · Strongly-typed ids10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether domain identifiers are strongly typed (a newtype wrapper) rather than raw primitives — consistency once an idiom exists.

Method: Roslyn (DDD-gated): strongly-typed id adoption on domain entities/events; raw Guid/int/string ids counted versus wrapped types. An id wrapper is recognised by VALUE SEMANTICS, not by being a struct — a record struct, a record class (`record ApartmentId(Guid Value)`) or a class declared by a typed-id base (`class MemberId : TypedIdValueBase`) all count, while a plain mutable class (reference equality) and a verb-phrase query record (`GetCustomerById`) do not. Deterministic, adoption percentage.

Coverage: Population: id-like members by *Id/*Key NAME suffix; strongly-typed-ID shape then checked semantically — non-suffixed identifiers are not seen.

DM4 · Rich vs anemic domain model10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether domain entities own their behaviour (invariant-enforcing commands) rather than being data-only structs driven by a foreign service.

Method: Roslyn (DDD-gated): entity method BODIES classified mutator-vs-query — only methods that mutate the entity's own declared state count as invariant-protecting behaviour, so a getter/passthrough doesn't rescue an anemic class. Deterministic, exhaustive over domain-layer entities.

Coverage: Population: entities by name/base convention; rich-vs-anemic judged by classifying each method body mutator-vs-query — logic-bearing domain types outside the convention are invisible.

DM5 · Encapsulated state10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether a domain type's identity-bearing field stays immutable — a `pub` mutable field under a hand-rolled Hash/PartialEq breaks the value-identity invariant.

Method: Roslyn (DDD-gated): entities scanned for publicly writable state — public setters, and (C#/VB) own mutable collections handed out through an auto-property, a public field or a bare-field expression getter, where a computed/copying getter is never charged. One finding per entity; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.

Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.

DM6 · Domain ↔ infrastructure boundary10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether the domain layer stays free of infrastructure dependencies — a domain aggregate fused to a persistence ORM (diesel/sea-orm/sqlx) on its own declaration (active-record) couples the domain to infrastructure. The clean-architecture dependency rule.

Method: Roslyn (DDD-gated): domain-layer types scanned for infrastructure usage in member SIGNATURES and inside method/accessor BODIES — resolved calls and object-creations into EF/Marten/HTTP/Mongo/Redis/message-bus types (not just a namespace allowlist). Deterministic, symbol-resolved, exhaustive over domain-layer bodies, DDD-native.

Coverage: Domain layer identified by NAMESPACE heuristic; infrastructure then resolved by symbol in member SIGNATURES and method/accessor BODIES — rename the layer and the check evaporates.

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

Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.

Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.

What to do

  • Add a 'Testing' section to the root README — how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
  • Add a README to the 48 of 89 project(s) that lack one — worth up to 1.1 pts.
M2 · Architecture documentation5.0 / 10Adequate✓ Tool-verified

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

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

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.

What to do

  • Record 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).
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

M4 · Documentation accuracy9.0 / 10Exemplary◐ Sampled · advisory

Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).

Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.

P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

  • Only 10/24 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `issues/1143`, `issues/1278`, `issues/1357`, `issues/1473`, `issues/249/app` and 9 more.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
  • Add a health-check endpoint (a /health route on your axum/actix router) so orchestrators and load balancers can probe liveness/readiness.
P3 · Security & performance tooling4.0 / 10Weak✓ Tool-verified

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

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

What to do

  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback10.0 / 10Exemplary✓ Tool-verified

Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.

Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.

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

Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

PF3 · Async & latency hygiene10.0 / 10Exemplary✓ Tool-verified

Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.

Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from the language model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin) or inside a Java method returning a Reactor Mono/Flux — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

Reference — by lens

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

LensScoreRatingImpact
Code Health81%StrongSolid.
Architecture98%ExemplarySolid.
Maturity75%StrongSolid.
Readiness77%StrongSolid.
Security74%Adequate — gated by D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling100%ExemplaryStrongest area.
Performance100%ExemplarySolid.
Not evidenced — 4 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 — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 78 check(s) not relevant to this codebase

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

  • AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX2 Stateful singletons — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — compose up failed (exit 18 — an image could not be pulled) — mariadb_lts Pulling postgres_16 Pulling mysql_5_7 Pulling postgres_14 Pulling mysql_lts Pulling mariadb_lts Error Get "https://registry-1.docker.io/v2/": Forbidden mysql_5_7 Error context canceled mysql_lts Error context canceled postgres_14 Error context canceled postgres_16 Error context canceled Error response from daemon: Get "https://registry-1.docker.io/v2/": Forbidden; the earlier `compose pull` step reported: mysql_5_7 Pulling postgres_14 Pulling postgres_16 Pulling mariadb_lts Pulling postgres_14 Error Get "https://registry-1.docker.io/v2/": Forbidden mariadb_lts Error Get "https://registry-1.docker.io/v2/": Forbidden mysql_lts Error context canceled mysql_5_7 Error context canceled postgres_16 Error context canceled Error response from daemon: Get "https://registry-1.docker.io/v2/": Forbidden; the runtime sandbox reaches registries only through the in-fence pull-through mirror, so an image the mirror does not carry cannot be fetched — this is a limit of our sandbox, not of your stack; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • D10 Test Quality — ~57668 lines of test source are present (.rs) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D12 Dependency Hygiene — Not scored — 100 direct Cargo declaration(s) were read, but the outdated signal needs crates.io, and no committed Cargo.lock resolves them to versions, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout nor 2+ sibling source directories each declaring an aggregate root. Aggregate roots were found in only one source directory (sea-orm-sync), which is a layered codebase, not two contexts. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling 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"]`.
  • D24 Comment Value — No inline comments to assess — comment value is not applicable here.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — symbol resolution incomplete — too few calls resolved to assess navigability
  • 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.
  • 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 — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • 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.
  • D6 Cohesion (LCOM4) — D6 reads a CS/VB/GO/SCALA/SWIFT/DART/JAVA/PY/KT/TS/TSX/MTS/CTS/JS/JSX/MJS/CJS/PHP class graph only — this repository's production source is .rs, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • DM3 Integration-event coupling — not scored — a domain type leaking across a crate boundary cannot be told apart from source alone from a legitimate shared-kernel crate. Reported as guidance rather than measured
  • DM7 Repository granularity — not scored — detecting 'a repository per CHILD entity' needs the aggregate-root structure, which is not resolvable from source alone here. Reported as guidance rather than measured
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
  • ED5 Idempotency — This check finds retry-prone mutations (command handlers and message/event consumers) by walking the repository's declared types, and none was loaded here, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C# syntax, and none was loaded for this repository. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P10 Library API & versioning — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • 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'.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the Rust source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — SeaORM, sqlx is declared, but the schema-migration mechanism could not be identified. Our limit, not a verdict on this repository.
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • PF2 Allocation hygiene — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X10 Duplicated predicate — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X12 Unreachable branch — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X13 Undrained process stream — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X14 Bypassable address classification — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X15 Unvalidated length from an untrusted reader — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X16 Unfloored truncation loop — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X17 Uncapped recursion over a caller-supplied document — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X18 Disposal-pattern correctness — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X19 Unrestored process-global state — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X20 Mistyped argument guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X21 Side-effecting pattern guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X22 Contradicted release guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X23 Unguarded diagnostic materialisation — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X24 Document value interpolated into markup unescaped — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X25 Inert configuration knob — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X26 Unsynchronised callback handoff — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X27 Collection changed while being enumerated — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X28 Index access outside its own emptiness guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X29 Per-element action decided by a fixed element — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X3 Exception handling — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X30 Support guard that admits what it rejects — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X32 Type resolved by simple name across every loaded assembly — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X6 Hand-rolled structured-format parsing — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X7 Silent fallback defaults — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • 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.

Critical — 64 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 33 more in this group — see findings.md.
D28 · Secrets (history) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
Serious — 773 finding(s)
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×61
  • Duplicated block (7 lines × 2) sea-orm-macros/src/derives/entity_loader.rs:309 — sea-orm-macros/src/derives/entity_loader.rs:309-315 | sea-orm-macros/src/derives/entity_loader.rs:365-371 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) sea-orm-macros/src/derives/entity_loader.rs:330 — sea-orm-macros/src/derives/entity_loader.rs:330-336 | sea-orm-macros/src/derives/entity_loader.rs:394-400 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) sea-orm-sync/src/database/db_connection.rs:458 — sea-orm-sync/src/database/db_connection.rs:458-464 | src/database/db_connection.rs:493-499 — before extracting anything, compare `sea-orm-sync/src/database/db_connection.rs` and `src/database/db_connection.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 162 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 (7 lines × 2) sea-orm-sync/src/database/db_connection.rs:504 — sea-orm-sync/src/database/db_connection.rs:504-510 | src/database/db_connection.rs:548-554 — before extracting anything, compare `sea-orm-sync/src/database/db_connection.rs` and `src/database/db_connection.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 162 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 (7 lines × 2) sea-orm-sync/src/database/transaction.rs:408 — sea-orm-sync/src/database/transaction.rs:408-414 | src/database/transaction.rs:438-444 — before extracting anything, compare `sea-orm-sync/src/database/transaction.rs` and `src/database/transaction.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 222 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 (7 lines × 2) sea-orm-sync/src/database/transaction.rs:417 — sea-orm-sync/src/database/transaction.rs:417-423 | src/database/transaction.rs:447-453 — before extracting anything, compare `sea-orm-sync/src/database/transaction.rs` and `src/database/transaction.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 222 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 (7 lines × 2) sea-orm-sync/src/database/transaction.rs:463 — sea-orm-sync/src/database/transaction.rs:463-469 | src/database/transaction.rs:494-500 — before extracting anything, compare `sea-orm-sync/src/database/transaction.rs` and `src/database/transaction.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 222 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 (7 lines × 2) sea-orm-sync/src/database/transaction.rs:470 — sea-orm-sync/src/database/transaction.rs:470-476 | src/database/transaction.rs:502-508 — before extracting anything, compare `sea-orm-sync/src/database/transaction.rs` and `src/database/transaction.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 222 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 (7 lines × 2) sea-orm-sync/src/dynamic/model.rs:148 — sea-orm-sync/src/dynamic/model.rs:148-154 | src/dynamic/model.rs:148-154 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) sea-orm-sync/src/entity/relation.rs:567 — sea-orm-sync/src/entity/relation.rs:567-573 | src/entity/relation.rs:567-573 — before extracting anything, compare `sea-orm-sync/src/entity/relation.rs` and `src/entity/relation.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 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 (7 lines × 2) sea-orm-sync/src/executor/cursor.rs:86 — sea-orm-sync/src/executor/cursor.rs:86-92 | src/executor/cursor.rs:86-92 — before extracting anything, compare `sea-orm-sync/src/executor/cursor.rs` and `src/executor/cursor.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 217 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 (7 lines × 2) sea-orm-sync/src/executor/cursor.rs:167 — sea-orm-sync/src/executor/cursor.rs:167-173 | src/executor/cursor.rs:167-173 — before extracting anything, compare `sea-orm-sync/src/executor/cursor.rs` and `src/executor/cursor.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 217 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 (7 lines × 2) sea-orm-sync/src/executor/update.rs:148 — sea-orm-sync/src/executor/update.rs:148-154 | src/executor/update.rs:153-159 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) sea-orm-sync/src/query/loader.rs:1289 — sea-orm-sync/src/query/loader.rs:1289-1295 | src/query/loader.rs:1377-1383 — before extracting anything, compare `sea-orm-sync/src/query/loader.rs` and `src/query/loader.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 254 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 (7 lines × 2) sea-orm-sync/src/rbac/schema.rs:49 — sea-orm-sync/src/rbac/schema.rs:49-55 | src/rbac/schema.rs:53-59 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) sea-orm-sync/src/database/sea_schema_shim.rs:67 — sea-orm-sync/src/database/sea_schema_shim.rs:67-73 | src/database/sea_schema_shim.rs:76-82 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) sea-orm-sync/src/database/executor.rs:42 — sea-orm-sync/src/database/executor.rs:42-48 | src/database/executor.rs:43-49 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) sea-orm-sync/src/database/mock.rs:103 — sea-orm-sync/src/database/mock.rs:103-109 | src/database/mock.rs:103-109 — before extracting anything, compare `sea-orm-sync/src/database/mock.rs` and `src/database/mock.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 140 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 (7 lines × 2) sea-orm-sync/src/database/mock.rs:391 — sea-orm-sync/src/database/mock.rs:391-397 | src/database/mock.rs:391-397 — before extracting anything, compare `sea-orm-sync/src/database/mock.rs` and `src/database/mock.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 140 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 (7 lines × 2) sea-orm-sync/src/database/restricted_connection.rs:519 — sea-orm-sync/src/database/restricted_connection.rs:519-525 | src/database/restricted_connection.rs:560-566 — before extracting anything, compare `sea-orm-sync/src/database/restricted_connection.rs` and `src/database/restricted_connection.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 69 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 (7 lines × 2) sea-orm-sync/src/database/restricted_connection.rs:527 — sea-orm-sync/src/database/restricted_connection.rs:527-533 | src/database/restricted_connection.rs:568-574 — before extracting anything, compare `sea-orm-sync/src/database/restricted_connection.rs` and `src/database/restricted_connection.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 69 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 (7 lines × 2) sea-orm-sync/src/database/restricted_connection.rs:550 — sea-orm-sync/src/database/restricted_connection.rs:550-556 | src/database/restricted_connection.rs:591-597 — before extracting anything, compare `sea-orm-sync/src/database/restricted_connection.rs` and `src/database/restricted_connection.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 69 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 (7 lines × 2) sea-orm-sync/src/driver/mock.rs:121 — sea-orm-sync/src/driver/mock.rs:121-127 | src/driver/mock.rs:122-128 — before extracting anything, compare `sea-orm-sync/src/driver/mock.rs` and `src/driver/mock.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 83 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 (7 lines × 2) sea-orm-sync/src/driver/rusqlite.rs:708 — sea-orm-sync/src/driver/rusqlite.rs:708-714 | src/driver/rusqlite.rs:708-714 — before extracting anything, compare `sea-orm-sync/src/driver/rusqlite.rs` and `src/driver/rusqlite.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 358 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 (7 lines × 2) sea-orm-sync/src/entity/active_model_ex.rs:310 — sea-orm-sync/src/entity/active_model_ex.rs:310-316 | src/entity/active_model_ex.rs:310-316 — before extracting anything, compare `sea-orm-sync/src/entity/active_model_ex.rs` and `src/entity/active_model_ex.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 134 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.
  • + 36 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×52
  • Duplicated block (6 lines × 2) sea-orm-arrow/src/lib.rs:1295 — sea-orm-arrow/src/lib.rs:1295-1300 | sea-orm-arrow/src/lib.rs:1332-1337 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) sea-orm-sync/src/database/mod.rs:186 — sea-orm-sync/src/database/mod.rs:186-191 | src/database/mod.rs:202-207 — before extracting anything, compare `sea-orm-sync/src/database/mod.rs` and `src/database/mod.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 79 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 (6 lines × 2) sea-orm-sync/src/driver/mock.rs:192 — sea-orm-sync/src/driver/mock.rs:192-197 | src/driver/mock.rs:193-198 — before extracting anything, compare `sea-orm-sync/src/driver/mock.rs` and `src/driver/mock.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 83 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 (6 lines × 2) sea-orm-sync/src/entity/active_value.rs:623 — sea-orm-sync/src/entity/active_value.rs:623-628 | src/entity/active_value.rs:623-628 — before extracting anything, compare `sea-orm-sync/src/entity/active_value.rs` and `src/entity/active_value.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 69 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 (6 lines × 2) sea-orm-sync/src/executor/cursor.rs:140 — sea-orm-sync/src/executor/cursor.rs:140-145 | src/executor/cursor.rs:140-145 — before extracting anything, compare `sea-orm-sync/src/executor/cursor.rs` and `src/executor/cursor.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 217 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 (6 lines × 2) sea-orm-sync/src/query/combine.rs:47 — sea-orm-sync/src/query/combine.rs:47-52 | src/query/combine.rs:47-52 — before extracting anything, compare `sea-orm-sync/src/query/combine.rs` and `src/query/combine.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 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 (6 lines × 2) sea-orm-sync/src/query/helper.rs:902 — sea-orm-sync/src/query/helper.rs:902-907 | src/query/helper.rs:902-907 — before extracting anything, compare `sea-orm-sync/src/query/helper.rs` and `src/query/helper.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 75 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 (6 lines × 2) sea-orm-sync/src/query/helper.rs:917 — sea-orm-sync/src/query/helper.rs:917-922 | src/query/helper.rs:917-922 — before extracting anything, compare `sea-orm-sync/src/query/helper.rs` and `src/query/helper.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 75 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 (6 lines × 2) sea-orm-sync/src/query/insert.rs:316 — sea-orm-sync/src/query/insert.rs:316-321 | src/query/insert.rs:316-321 — before extracting anything, compare `sea-orm-sync/src/query/insert.rs` and `src/query/insert.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 162 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 (6 lines × 2) sea-orm-sync/src/value/text_uuid.rs:49 — sea-orm-sync/src/value/text_uuid.rs:49-54 | src/value/text_uuid.rs:49-54 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) sea-orm-sync/src/database/connection.rs:119 — sea-orm-sync/src/database/connection.rs:119-124 | src/database/connection.rs:131-136 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) sea-orm-sync/src/database/mock.rs:179 — sea-orm-sync/src/database/mock.rs:179-184 | src/database/mock.rs:179-184 — before extracting anything, compare `sea-orm-sync/src/database/mock.rs` and `src/database/mock.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 140 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 (6 lines × 2) sea-orm-sync/src/database/mock.rs:347 — sea-orm-sync/src/database/mock.rs:347-352 | src/database/mock.rs:347-352 — before extracting anything, compare `sea-orm-sync/src/database/mock.rs` and `src/database/mock.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 140 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 (6 lines × 2) sea-orm-sync/src/database/transaction.rs:747 — sea-orm-sync/src/database/transaction.rs:747-752 | src/database/transaction.rs:799-804 — before extracting anything, compare `sea-orm-sync/src/database/transaction.rs` and `src/database/transaction.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 222 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 (6 lines × 2) sea-orm-sync/src/dynamic/entity.rs:34 — sea-orm-sync/src/dynamic/entity.rs:34-39 | src/dynamic/entity.rs:34-39 — before extracting anything, compare `sea-orm-sync/src/dynamic/entity.rs` and `src/dynamic/entity.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 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 (6 lines × 2) sea-orm-sync/src/dynamic/execute.rs:40 — sea-orm-sync/src/dynamic/execute.rs:40-45 | src/dynamic/execute.rs:40-45 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) sea-orm-sync/src/entity/active_model_ex.rs:148 — sea-orm-sync/src/entity/active_model_ex.rs:148-153 | src/entity/active_model_ex.rs:148-153 — before extracting anything, compare `sea-orm-sync/src/entity/active_model_ex.rs` and `src/entity/active_model_ex.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 134 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 (6 lines × 2) sea-orm-sync/src/entity/active_model_ex.rs:283 — sea-orm-sync/src/entity/active_model_ex.rs:283-288 | src/entity/active_model_ex.rs:283-288 — before extracting anything, compare `sea-orm-sync/src/entity/active_model_ex.rs` and `src/entity/active_model_ex.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 134 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 (6 lines × 2) sea-orm-sync/src/entity/active_model_ex.rs:302 — sea-orm-sync/src/entity/active_model_ex.rs:302-307 | src/entity/active_model_ex.rs:302-307 — before extracting anything, compare `sea-orm-sync/src/entity/active_model_ex.rs` and `src/entity/active_model_ex.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 134 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 (6 lines × 2) sea-orm-sync/src/entity/active_model_ex.rs:454 — sea-orm-sync/src/entity/active_model_ex.rs:454-459 | src/entity/active_model_ex.rs:454-459 — before extracting anything, compare `sea-orm-sync/src/entity/active_model_ex.rs` and `src/entity/active_model_ex.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 134 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 (6 lines × 2) sea-orm-sync/src/entity/active_value.rs:276 — sea-orm-sync/src/entity/active_value.rs:276-281 | src/entity/active_value.rs:276-281 — before extracting anything, compare `sea-orm-sync/src/entity/active_value.rs` and `src/entity/active_value.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 69 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 (6 lines × 2) sea-orm-sync/src/entity/active_value.rs:288 — sea-orm-sync/src/entity/active_value.rs:288-293 | src/entity/active_value.rs:288-293 — before extracting anything, compare `sea-orm-sync/src/entity/active_value.rs` and `src/entity/active_value.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 69 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 (6 lines × 2) sea-orm-sync/src/entity/active_value.rs:296 — sea-orm-sync/src/entity/active_value.rs:296-301 | src/entity/active_value.rs:296-301 — before extracting anything, compare `sea-orm-sync/src/entity/active_value.rs` and `src/entity/active_value.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 69 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 (6 lines × 2) sea-orm-sync/src/entity/active_value.rs:314 — sea-orm-sync/src/entity/active_value.rs:314-319 | src/entity/active_value.rs:314-319 — before extracting anything, compare `sea-orm-sync/src/entity/active_value.rs` and `src/entity/active_value.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 69 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 (6 lines × 2) sea-orm-sync/src/entity/active_value.rs:351 — sea-orm-sync/src/entity/active_value.rs:351-356 | src/entity/active_value.rs:351-356 — before extracting anything, compare `sea-orm-sync/src/entity/active_value.rs` and `src/entity/active_value.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 69 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.
  • + 27 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×42
  • Duplicated block (8 lines × 2) issues/1357/src/main.rs:20 — issues/1357/src/main.rs:20-27 | issues/1357/src/main.rs:32-39 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) sea-orm-arrow/src/lib.rs:818 — sea-orm-arrow/src/lib.rs:818-825 | sea-orm-arrow/src/lib.rs:1100-1107 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) sea-orm-codegen/src/util.rs:6 — sea-orm-codegen/src/util.rs:6-13 | sea-orm-macros/src/derives/util.rs:319-326 — 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 (8 lines × 2) sea-orm-macros/src/derives/entity_loader.rs:319 — sea-orm-macros/src/derives/entity_loader.rs:319-326 | sea-orm-macros/src/derives/entity_loader.rs:379-386 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) sea-orm-macros/src/derives/entity_loader.rs:817 — sea-orm-macros/src/derives/entity_loader.rs:817-824 | sea-orm-macros/src/derives/entity_loader.rs:833-840 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) sea-orm-macros/src/derives/model_ex.rs:824 — sea-orm-macros/src/derives/model_ex.rs:824-831 | sea-orm-macros/src/derives/model_ex.rs:995-1002 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) sea-orm-sync/src/database/db_connection.rs:328 — sea-orm-sync/src/database/db_connection.rs:328-335 | src/database/db_connection.rs:353-360 — before extracting anything, compare `sea-orm-sync/src/database/db_connection.rs` and `src/database/db_connection.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 162 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 (8 lines × 2) sea-orm-sync/src/database/stream/query.rs:41 — sea-orm-sync/src/database/stream/query.rs:41-48 | src/database/stream/query.rs:43-50 — 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 (8 lines × 2) sea-orm-sync/src/database/stream/transaction.rs:45 — sea-orm-sync/src/database/stream/transaction.rs:45-52 | src/database/stream/transaction.rs:46-53 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) sea-orm-sync/src/database/tracing_spans.rs:68 — sea-orm-sync/src/database/tracing_spans.rs:68-75 | src/database/tracing_spans.rs:68-75 — before extracting anything, compare `sea-orm-sync/src/database/tracing_spans.rs` and `src/database/tracing_spans.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 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 (8 lines × 2) sea-orm-sync/src/database/transaction.rs:426 — sea-orm-sync/src/database/transaction.rs:426-433 | src/database/transaction.rs:456-463 — before extracting anything, compare `sea-orm-sync/src/database/transaction.rs` and `src/database/transaction.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 222 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 (8 lines × 2) sea-orm-sync/src/database/transaction.rs:455 — sea-orm-sync/src/database/transaction.rs:455-462 | src/database/transaction.rs:485-492 — before extracting anything, compare `sea-orm-sync/src/database/transaction.rs` and `src/database/transaction.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 222 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 (8 lines × 2) sea-orm-sync/src/database/transaction.rs:545 — sea-orm-sync/src/database/transaction.rs:545-552 | src/database/transaction.rs:578-585 — before extracting anything, compare `sea-orm-sync/src/database/transaction.rs` and `src/database/transaction.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 222 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 (8 lines × 2) sea-orm-sync/src/driver/rusqlite.rs:158 — sea-orm-sync/src/driver/rusqlite.rs:158-165 | src/driver/rusqlite.rs:158-165 — before extracting anything, compare `sea-orm-sync/src/driver/rusqlite.rs` and `src/driver/rusqlite.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 358 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 (8 lines × 2) sea-orm-sync/src/driver/rusqlite.rs:472 — sea-orm-sync/src/driver/rusqlite.rs:472-479 | src/driver/rusqlite.rs:472-479 — before extracting anything, compare `sea-orm-sync/src/driver/rusqlite.rs` and `src/driver/rusqlite.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 358 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 (8 lines × 2) sea-orm-sync/src/entity/column.rs:139 — sea-orm-sync/src/entity/column.rs:139-146 | src/entity/column.rs:139-146 — before extracting anything, compare `sea-orm-sync/src/entity/column.rs` and `src/entity/column.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 92 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 (8 lines × 2) sea-orm-sync/src/entity/column.rs:171 — sea-orm-sync/src/entity/column.rs:171-178 | src/entity/column.rs:171-178 — before extracting anything, compare `sea-orm-sync/src/entity/column.rs` and `src/entity/column.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 92 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 (8 lines × 2) sea-orm-sync/src/executor/cursor.rs:108 — sea-orm-sync/src/executor/cursor.rs:108-115 | src/executor/cursor.rs:108-115 — before extracting anything, compare `sea-orm-sync/src/executor/cursor.rs` and `src/executor/cursor.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 217 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 (8 lines × 2) sea-orm-sync/src/executor/paginator.rs:287 — sea-orm-sync/src/executor/paginator.rs:287-294 | src/executor/paginator.rs:294-301 — before extracting anything, compare `sea-orm-sync/src/executor/paginator.rs` and `src/executor/paginator.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 52 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 (8 lines × 2) sea-orm-sync/src/query/combine.rs:202 — sea-orm-sync/src/query/combine.rs:202-209 | src/query/combine.rs:202-209 — before extracting anything, compare `sea-orm-sync/src/query/combine.rs` and `src/query/combine.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 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 (8 lines × 2) sea-orm-sync/src/query/select.rs:359 — sea-orm-sync/src/query/select.rs:359-366 | src/query/select.rs:359-366 — 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 (8 lines × 2) sea-orm-sync/src/schema/builder.rs:254 — sea-orm-sync/src/schema/builder.rs:254-261 | src/schema/builder.rs:258-265 — before extracting anything, compare `sea-orm-sync/src/schema/builder.rs` and `src/schema/builder.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 428 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 (8 lines × 2) sea-orm-sync/src/schema/builder.rs:670 — sea-orm-sync/src/schema/builder.rs:670-677 | src/schema/builder.rs:679-686 — before extracting anything, compare `sea-orm-sync/src/schema/builder.rs` and `src/schema/builder.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 428 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 (8 lines × 2) sea-orm-sync/src/database/connection.rs:99 — sea-orm-sync/src/database/connection.rs:99-106 | src/database/connection.rs:111-118 — 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 (8 lines × 2) sea-orm-sync/src/database/db_connection.rs:544 — sea-orm-sync/src/database/db_connection.rs:544-551 | src/database/db_connection.rs:590-597 — before extracting anything, compare `sea-orm-sync/src/database/db_connection.rs` and `src/database/db_connection.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 162 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.
  • + 17 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×35
  • Duplicated block (11 lines × 2) sea-orm-arrow/src/lib.rs:934 — sea-orm-arrow/src/lib.rs:934-944 | sea-orm-arrow/src/lib.rs:1226-1236 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) sea-orm-arrow/src/lib.rs:946 — sea-orm-arrow/src/lib.rs:946-956 | sea-orm-arrow/src/lib.rs:1238-1248 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) sea-orm-cli/src/commands/generate.rs:226 — sea-orm-cli/src/commands/generate.rs:226-236 | sea-orm-cli/src/commands/generate.rs:306-316 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) sea-orm-macros/src/derives/model_ex.rs:771 — sea-orm-macros/src/derives/model_ex.rs:771-781 | sea-orm-macros/src/derives/model_ex.rs:965-975 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) sea-orm-sync/src/database/mock.rs:188 — sea-orm-sync/src/database/mock.rs:188-198 | src/database/mock.rs:188-198 — before extracting anything, compare `sea-orm-sync/src/database/mock.rs` and `src/database/mock.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 140 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 (11 lines × 2) sea-orm-sync/src/database/mock.rs:202 — sea-orm-sync/src/database/mock.rs:202-212 | src/database/mock.rs:202-212 — before extracting anything, compare `sea-orm-sync/src/database/mock.rs` and `src/database/mock.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 140 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 (11 lines × 2) sea-orm-sync/src/database/mod.rs:165 — sea-orm-sync/src/database/mod.rs:165-175 | src/database/mod.rs:181-191 — before extracting anything, compare `sea-orm-sync/src/database/mod.rs` and `src/database/mod.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 79 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 (11 lines × 2) sea-orm-sync/src/database/stream/metric.rs:45 — sea-orm-sync/src/database/stream/metric.rs:45-55 | src/database/stream/metric.rs:47-57 — before extracting anything, compare `sea-orm-sync/src/database/stream/metric.rs` and `src/database/stream/metric.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 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 (11 lines × 2) sea-orm-sync/src/database/transaction.rs:128 — sea-orm-sync/src/database/transaction.rs:128-138 | src/database/transaction.rs:140-150 — before extracting anything, compare `sea-orm-sync/src/database/transaction.rs` and `src/database/transaction.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 222 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 (11 lines × 2) sea-orm-sync/src/database/transaction.rs:139 — sea-orm-sync/src/database/transaction.rs:139-149 | src/database/transaction.rs:152-162 — before extracting anything, compare `sea-orm-sync/src/database/transaction.rs` and `src/database/transaction.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 222 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 (11 lines × 2) sea-orm-sync/src/database/transaction.rs:242 — sea-orm-sync/src/database/transaction.rs:242-252 | src/database/transaction.rs:267-277 — before extracting anything, compare `sea-orm-sync/src/database/transaction.rs` and `src/database/transaction.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 222 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 (11 lines × 2) sea-orm-sync/src/database/transaction.rs:296 — sea-orm-sync/src/database/transaction.rs:296-306 | src/database/transaction.rs:324-334 — before extracting anything, compare `sea-orm-sync/src/database/transaction.rs` and `src/database/transaction.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 222 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 (11 lines × 2) sea-orm-sync/src/database/transaction.rs:585 — sea-orm-sync/src/database/transaction.rs:585-595 | src/database/transaction.rs:619-629 — before extracting anything, compare `sea-orm-sync/src/database/transaction.rs` and `src/database/transaction.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 222 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 (11 lines × 2) sea-orm-sync/src/database/transaction.rs:596 — sea-orm-sync/src/database/transaction.rs:596-606 | src/database/transaction.rs:631-641 — before extracting anything, compare `sea-orm-sync/src/database/transaction.rs` and `src/database/transaction.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 222 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 (11 lines × 2) sea-orm-sync/src/driver/rusqlite.rs:502 — sea-orm-sync/src/driver/rusqlite.rs:502-512 | src/driver/rusqlite.rs:502-512 — before extracting anything, compare `sea-orm-sync/src/driver/rusqlite.rs` and `src/driver/rusqlite.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 358 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 (11 lines × 2) sea-orm-sync/src/driver/sqlx_mysql.rs:533 — sea-orm-sync/src/driver/sqlx_mysql.rs:533-543 | src/driver/sqlx_mysql.rs:541-551 — before extracting anything, compare `sea-orm-sync/src/driver/sqlx_mysql.rs` and `src/driver/sqlx_mysql.rs` as WHOLE FILES: this scan already matched 8 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. 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 (11 lines × 2) sea-orm-sync/src/entity/compound.rs:27 — sea-orm-sync/src/entity/compound.rs:27-37 | src/entity/compound.rs:28-38 — 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 (11 lines × 2) sea-orm-sync/src/executor/insert.rs:443 — sea-orm-sync/src/executor/insert.rs:443-453 | src/executor/insert.rs:451-461 — before extracting anything, compare `sea-orm-sync/src/executor/insert.rs` and `src/executor/insert.rs` as WHOLE FILES: this scan already matched 8 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 (11 lines × 2) sea-orm-sync/src/query/loader.rs:1050 — sea-orm-sync/src/query/loader.rs:1050-1060 | src/query/loader.rs:1134-1144 — before extracting anything, compare `sea-orm-sync/src/query/loader.rs` and `src/query/loader.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 254 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 (11 lines × 2) sea-orm-sync/src/query/loader.rs:1374 — sea-orm-sync/src/query/loader.rs:1374-1384 | src/query/loader.rs:1462-1472 — before extracting anything, compare `sea-orm-sync/src/query/loader.rs` and `src/query/loader.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 254 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 (11 lines × 2) sea-orm-sync/src/query/update.rs:217 — sea-orm-sync/src/query/update.rs:217-227 | src/query/update.rs:217-227 — before extracting anything, compare `sea-orm-sync/src/query/update.rs` and `src/query/update.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 50 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 (11 lines × 2) sea-orm-sync/src/schema/builder.rs:26 — sea-orm-sync/src/schema/builder.rs:26-36 | src/schema/builder.rs:26-36 — before extracting anything, compare `sea-orm-sync/src/schema/builder.rs` and `src/schema/builder.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 428 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 (11 lines × 2) sea-orm-sync/src/schema/builder.rs:657 — sea-orm-sync/src/schema/builder.rs:657-667 | src/schema/builder.rs:666-676 — before extracting anything, compare `sea-orm-sync/src/schema/builder.rs` and `src/schema/builder.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 428 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 (11 lines × 2) sea-orm-sync/src/schema/topology.rs:165 — sea-orm-sync/src/schema/topology.rs:165-175 | src/schema/topology.rs:165-175 — before extracting anything, compare `sea-orm-sync/src/schema/topology.rs` and `src/schema/topology.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 95 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 (11 lines × 2) sea-orm-sync/src/driver/sqlx_common.rs:59 — sea-orm-sync/src/driver/sqlx_common.rs:59-69 | src/driver/sqlx_common.rs:61-71 — before extracting anything, compare `sea-orm-sync/src/driver/sqlx_common.rs` and `src/driver/sqlx_common.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 39 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.
  • + 10 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×31
  • Duplicated block (9 lines × 2) sea-orm-arrow/src/lib.rs:828 — sea-orm-arrow/src/lib.rs:828-836 | sea-orm-arrow/src/lib.rs:1110-1118 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) sea-orm-arrow/src/lib.rs:838 — sea-orm-arrow/src/lib.rs:838-846 | sea-orm-arrow/src/lib.rs:1120-1128 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) sea-orm-arrow/src/lib.rs:848 — sea-orm-arrow/src/lib.rs:848-856 | sea-orm-arrow/src/lib.rs:1130-1138 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) sea-orm-macros/src/derives/into_active_model.rs:65 — sea-orm-macros/src/derives/into_active_model.rs:65-78 | sea-orm-macros/src/derives/partial_model.rs:76-84 — before extracting anything, compare `sea-orm-macros/src/derives/into_active_model.rs` and `sea-orm-macros/src/derives/partial_model.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 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 (9 lines × 2) sea-orm-sync/src/database/stream/metric.rs:77 — sea-orm-sync/src/database/stream/metric.rs:77-85 | src/database/stream/metric.rs:79-87 — before extracting anything, compare `sea-orm-sync/src/database/stream/metric.rs` and `src/database/stream/metric.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 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 (9 lines × 2) sea-orm-sync/src/database/transaction.rs:607 — sea-orm-sync/src/database/transaction.rs:607-615 | src/database/transaction.rs:643-651 — before extracting anything, compare `sea-orm-sync/src/database/transaction.rs` and `src/database/transaction.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 222 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 (9 lines × 2) sea-orm-sync/src/driver/mock.rs:159 — sea-orm-sync/src/driver/mock.rs:159-167 | src/driver/mock.rs:160-168 — before extracting anything, compare `sea-orm-sync/src/driver/mock.rs` and `src/driver/mock.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 83 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 (9 lines × 2) sea-orm-sync/src/dynamic/model.rs:48 — sea-orm-sync/src/dynamic/model.rs:48-56 | src/dynamic/model.rs:48-56 — 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 (9 lines × 2) sea-orm-sync/src/entity/identity.rs:76 — sea-orm-sync/src/entity/identity.rs:76-84 | src/entity/identity.rs:76-84 — before extracting anything, compare `sea-orm-sync/src/entity/identity.rs` and `src/entity/identity.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 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 (9 lines × 2) sea-orm-sync/src/executor/cursor.rs:124 — sea-orm-sync/src/executor/cursor.rs:124-132 | src/executor/cursor.rs:124-132 — before extracting anything, compare `sea-orm-sync/src/executor/cursor.rs` and `src/executor/cursor.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 217 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 (9 lines × 2) sea-orm-sync/src/query/loader.rs:1266 — sea-orm-sync/src/query/loader.rs:1266-1274 | src/query/loader.rs:1354-1362 — before extracting anything, compare `sea-orm-sync/src/query/loader.rs` and `src/query/loader.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 254 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 (9 lines × 2) sea-orm-sync/src/query/util.rs:47 — sea-orm-sync/src/query/util.rs:47-55 | src/query/util.rs:47-55 — before extracting anything, compare `sea-orm-sync/src/query/util.rs` and `src/query/util.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 179 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 (9 lines × 2) sea-orm-sync/src/rbac/engine/snapshot.rs:73 — sea-orm-sync/src/rbac/engine/snapshot.rs:73-81 | src/rbac/engine/snapshot.rs:73-81 — before extracting anything, compare `sea-orm-sync/src/rbac/engine/snapshot.rs` and `src/rbac/engine/snapshot.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 54 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 (9 lines × 2) sea-orm-sync/src/schema/builder.rs:339 — sea-orm-sync/src/schema/builder.rs:339-347 | src/schema/builder.rs:343-351 — before extracting anything, compare `sea-orm-sync/src/schema/builder.rs` and `src/schema/builder.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 428 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 (9 lines × 2) sea-orm-sync/src/database/mock.rs:72 — sea-orm-sync/src/database/mock.rs:72-80 | src/database/mock.rs:72-80 — before extracting anything, compare `sea-orm-sync/src/database/mock.rs` and `src/database/mock.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 140 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 (9 lines × 2) sea-orm-sync/src/database/restricted_connection.rs:435 — sea-orm-sync/src/database/restricted_connection.rs:435-443 | sea-orm-sync/src/database/transaction.rs:170-178 — 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 (9 lines × 2) sea-orm-sync/src/driver/rusqlite.rs:416 — sea-orm-sync/src/driver/rusqlite.rs:416-424 | src/driver/rusqlite.rs:416-424 — before extracting anything, compare `sea-orm-sync/src/driver/rusqlite.rs` and `src/driver/rusqlite.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 358 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 (9 lines × 2) sea-orm-sync/src/driver/rusqlite.rs:644 — sea-orm-sync/src/driver/rusqlite.rs:644-652 | src/driver/rusqlite.rs:644-652 — before extracting anything, compare `sea-orm-sync/src/driver/rusqlite.rs` and `src/driver/rusqlite.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 358 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 (9 lines × 2) sea-orm-sync/src/driver/sqlx_sqlite.rs:334 — sea-orm-sync/src/driver/sqlx_sqlite.rs:334-342 | src/driver/sqlx_sqlite.rs:341-349 — before extracting anything, compare `sea-orm-sync/src/driver/sqlx_sqlite.rs` and `src/driver/sqlx_sqlite.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 101 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 (9 lines × 2) sea-orm-sync/src/entity/active_model.rs:789 — sea-orm-sync/src/entity/active_model.rs:789-797 | src/entity/active_model.rs:797-805 — before extracting anything, compare `sea-orm-sync/src/entity/active_model.rs` and `src/entity/active_model.rs` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 431 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 (9 lines × 2) sea-orm-sync/src/entity/active_model.rs:824 — sea-orm-sync/src/entity/active_model.rs:824-832 | src/entity/active_model.rs:832-840 — before extracting anything, compare `sea-orm-sync/src/entity/active_model.rs` and `src/entity/active_model.rs` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 431 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 (9 lines × 2) sea-orm-sync/src/entity/active_model_ex.rs:291 — sea-orm-sync/src/entity/active_model_ex.rs:291-299 | src/entity/active_model_ex.rs:291-299 — before extracting anything, compare `sea-orm-sync/src/entity/active_model_ex.rs` and `src/entity/active_model_ex.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 134 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 (9 lines × 2) sea-orm-sync/src/entity/compound.rs:149 — sea-orm-sync/src/entity/compound.rs:149-157 | sea-orm-sync/src/executor/paginator.rs:101-109 — 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 (9 lines × 2) sea-orm-sync/src/executor/cursor.rs:234 — sea-orm-sync/src/executor/cursor.rs:234-242 | src/executor/cursor.rs:234-242 — before extracting anything, compare `sea-orm-sync/src/executor/cursor.rs` and `src/executor/cursor.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 217 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 (9 lines × 2) sea-orm-sync/src/executor/select_ext.rs:24 — sea-orm-sync/src/executor/select_ext.rs:24-32 | src/executor/select_ext.rs:25-33 — 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.
  • + 6 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×30
  • Duplicated block (10 lines × 2) sea-orm-arrow/src/lib.rs:540 — sea-orm-arrow/src/lib.rs:540-549 | sea-orm-arrow/src/lib.rs:554-563 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) sea-orm-arrow/src/lib.rs:1429 — sea-orm-arrow/src/lib.rs:1429-1438 | sea-orm-arrow/src/lib.rs:1506-1515 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) sea-orm-macros/src/derives/entity_loader.rs:296 — sea-orm-macros/src/derives/entity_loader.rs:296-305 | sea-orm-macros/src/derives/entity_loader.rs:348-357 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) sea-orm-macros/src/derives/entity_loader.rs:292 — sea-orm-macros/src/derives/entity_loader.rs:292-301 | sea-orm-macros/src/derives/entity_loader.rs:403-412 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) sea-orm-macros/src/derives/entity_loader.rs:407 — sea-orm-macros/src/derives/entity_loader.rs:407-416 | sea-orm-macros/src/derives/entity_loader.rs:459-468 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) sea-orm-macros/src/derives/model_ex.rs:1006 — sea-orm-macros/src/derives/model_ex.rs:1006-1015 | sea-orm-macros/src/derives/model_ex.rs:1212-1221 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) sea-orm-sync/src/database/restricted_connection.rs:474 — sea-orm-sync/src/database/restricted_connection.rs:474-483 | src/database/restricted_connection.rs:515-524 — before extracting anything, compare `sea-orm-sync/src/database/restricted_connection.rs` and `src/database/restricted_connection.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 69 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 (10 lines × 2) sea-orm-sync/src/database/stream/metric.rs:63 — sea-orm-sync/src/database/stream/metric.rs:63-72 | src/database/stream/metric.rs:65-74 — before extracting anything, compare `sea-orm-sync/src/database/stream/metric.rs` and `src/database/stream/metric.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 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 (10 lines × 2) sea-orm-sync/src/driver/rusqlite.rs:349 — sea-orm-sync/src/driver/rusqlite.rs:349-358 | src/driver/rusqlite.rs:349-358 — before extracting anything, compare `sea-orm-sync/src/driver/rusqlite.rs` and `src/driver/rusqlite.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 358 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 (10 lines × 2) sea-orm-sync/src/entity/active_model.rs:774 — sea-orm-sync/src/entity/active_model.rs:774-783 | src/entity/active_model.rs:782-791 — before extracting anything, compare `sea-orm-sync/src/entity/active_model.rs` and `src/entity/active_model.rs` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 431 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 (10 lines × 2) sea-orm-sync/src/entity/active_model.rs:808 — sea-orm-sync/src/entity/active_model.rs:808-817 | src/entity/active_model.rs:816-825 — before extracting anything, compare `sea-orm-sync/src/entity/active_model.rs` and `src/entity/active_model.rs` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 431 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 (10 lines × 2) sea-orm-sync/src/entity/active_model_ex.rs:403 — sea-orm-sync/src/entity/active_model_ex.rs:403-412 | src/entity/active_model_ex.rs:403-412 — before extracting anything, compare `sea-orm-sync/src/entity/active_model_ex.rs` and `src/entity/active_model_ex.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 134 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 (10 lines × 2) sea-orm-sync/src/query/loader.rs:1446 — sea-orm-sync/src/query/loader.rs:1446-1455 | src/query/loader.rs:1534-1543 — before extracting anything, compare `sea-orm-sync/src/query/loader.rs` and `src/query/loader.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 254 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 (10 lines × 2) sea-orm-sync/src/rbac/context.rs:224 — sea-orm-sync/src/rbac/context.rs:224-233 | src/rbac/context.rs:235-244 — before extracting anything, compare `sea-orm-sync/src/rbac/context.rs` and `src/rbac/context.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 58 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 (10 lines × 2) sea-orm-sync/src/schema/builder.rs:56 — sea-orm-sync/src/schema/builder.rs:56-65 | src/schema/builder.rs:56-65 — before extracting anything, compare `sea-orm-sync/src/schema/builder.rs` and `src/schema/builder.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 428 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 (10 lines × 2) sea-orm-sync/src/schema/builder.rs:114 — sea-orm-sync/src/schema/builder.rs:114-123 | sea-orm-sync/src/schema/builder.rs:153-162 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) sea-orm-sync/src/schema/builder.rs:180 — sea-orm-sync/src/schema/builder.rs:180-189 | src/schema/builder.rs:184-193 — before extracting anything, compare `sea-orm-sync/src/schema/builder.rs` and `src/schema/builder.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 428 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 (10 lines × 2) sea-orm-sync/src/schema/entity.rs:193 — sea-orm-sync/src/schema/entity.rs:193-202 | src/schema/entity.rs:193-202 — before extracting anything, compare `sea-orm-sync/src/schema/entity.rs` and `src/schema/entity.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 153 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 (10 lines × 2) sea-orm-sync/src/driver/sqlx_common.rs:102 — sea-orm-sync/src/driver/sqlx_common.rs:102-111 | src/driver/sqlx_common.rs:104-113 — before extracting anything, compare `sea-orm-sync/src/driver/sqlx_common.rs` and `src/driver/sqlx_common.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 39 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 (10 lines × 2) src/database/restricted_connection.rs:475 — src/database/restricted_connection.rs:475-484 | src/database/transaction.rs:188-197 — 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 (10 lines × 2) src/schema/builder.rs:117 — src/schema/builder.rs:117-126 | src/schema/builder.rs:157-166 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) sea-orm-macros/src/derives/column.rs:141 — sea-orm-macros/src/derives/column.rs:141-150 | sea-orm-macros/src/derives/primary_key.rs:53-62 — 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 (10 lines × 2) sea-orm-sync/src/database/db_connection.rs:594 — sea-orm-sync/src/database/db_connection.rs:594-603 | src/database/db_connection.rs:640-649 — before extracting anything, compare `sea-orm-sync/src/database/db_connection.rs` and `src/database/db_connection.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 162 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 (10 lines × 2) sea-orm-sync/src/driver/rusqlite.rs:123 — sea-orm-sync/src/driver/rusqlite.rs:123-132 | src/driver/rusqlite.rs:123-132 — before extracting anything, compare `sea-orm-sync/src/driver/rusqlite.rs` and `src/driver/rusqlite.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 358 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 (10 lines × 2) sea-orm-sync/src/entity/active_model_ex.rs:438 — sea-orm-sync/src/entity/active_model_ex.rs:438-447 | src/entity/active_model_ex.rs:438-447 — before extracting anything, compare `sea-orm-sync/src/entity/active_model_ex.rs` and `src/entity/active_model_ex.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 134 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.
  • + 5 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×25
  • Duplicated block (5 lines × 2) sea-orm-macros/src/derives/column.rs:21 — sea-orm-macros/src/derives/column.rs:21-25 | sea-orm-macros/src/derives/primary_key.rs:25-29 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) sea-orm-sync/src/database/db_connection.rs:175 — sea-orm-sync/src/database/db_connection.rs:175-179 | src/database/db_connection.rs:182-186 — before extracting anything, compare `sea-orm-sync/src/database/db_connection.rs` and `src/database/db_connection.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 162 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 (5 lines × 2) sea-orm-sync/src/database/db_connection.rs:249 — sea-orm-sync/src/database/db_connection.rs:249-253 | src/database/db_connection.rs:262-266 — before extracting anything, compare `sea-orm-sync/src/database/db_connection.rs` and `src/database/db_connection.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 162 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 (5 lines × 2) sea-orm-sync/src/database/db_connection.rs:279 — sea-orm-sync/src/database/db_connection.rs:279-283 | src/database/db_connection.rs:298-302 — before extracting anything, compare `sea-orm-sync/src/database/db_connection.rs` and `src/database/db_connection.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 162 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 (5 lines × 2) sea-orm-sync/src/database/db_connection.rs:730 — sea-orm-sync/src/database/db_connection.rs:730-734 | src/database/db_connection.rs:779-783 — before extracting anything, compare `sea-orm-sync/src/database/db_connection.rs` and `src/database/db_connection.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 162 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 (5 lines × 2) sea-orm-sync/src/driver/rusqlite.rs:589 — sea-orm-sync/src/driver/rusqlite.rs:589-593 | src/driver/rusqlite.rs:589-593 — before extracting anything, compare `sea-orm-sync/src/driver/rusqlite.rs` and `src/driver/rusqlite.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 358 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 (5 lines × 2) sea-orm-sync/src/entity/active_model_ex.rs:200 — sea-orm-sync/src/entity/active_model_ex.rs:200-204 | src/entity/active_model_ex.rs:200-204 — before extracting anything, compare `sea-orm-sync/src/entity/active_model_ex.rs` and `src/entity/active_model_ex.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 134 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 (5 lines × 2) sea-orm-sync/src/entity/active_model_ex.rs:266 — sea-orm-sync/src/entity/active_model_ex.rs:266-270 | src/entity/active_model_ex.rs:266-270 — before extracting anything, compare `sea-orm-sync/src/entity/active_model_ex.rs` and `src/entity/active_model_ex.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 134 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 (5 lines × 2) sea-orm-sync/src/entity/column.rs:444 — sea-orm-sync/src/entity/column.rs:444-448 | src/entity/column.rs:444-448 — before extracting anything, compare `sea-orm-sync/src/entity/column.rs` and `src/entity/column.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 92 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 (5 lines × 2) sea-orm-sync/src/entity/column.rs:481 — sea-orm-sync/src/entity/column.rs:481-485 | src/entity/column.rs:481-485 — before extracting anything, compare `sea-orm-sync/src/entity/column.rs` and `src/entity/column.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 92 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 (5 lines × 2) sea-orm-sync/src/executor/update.rs:140 — sea-orm-sync/src/executor/update.rs:140-144 | src/executor/update.rs:145-149 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) sea-orm-sync/src/executor/update.rs:215 — sea-orm-sync/src/executor/update.rs:215-219 | src/executor/update.rs:222-226 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) sea-orm-sync/src/query/util.rs:42 — sea-orm-sync/src/query/util.rs:42-46 | src/query/util.rs:42-46 — before extracting anything, compare `sea-orm-sync/src/query/util.rs` and `src/query/util.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 179 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 (5 lines × 2) sea-orm-sync/src/query/util.rs:64 — sea-orm-sync/src/query/util.rs:64-68 | src/query/util.rs:64-68 — before extracting anything, compare `sea-orm-sync/src/query/util.rs` and `src/query/util.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 179 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 (5 lines × 2) sea-orm-sync/src/schema/entity.rs:115 — sea-orm-sync/src/schema/entity.rs:115-119 | src/schema/entity.rs:115-119 — before extracting anything, compare `sea-orm-sync/src/schema/entity.rs` and `src/schema/entity.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 153 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 (5 lines × 2) sea-orm-sync/src/database/restricted_connection.rs:535 — sea-orm-sync/src/database/restricted_connection.rs:535-539 | src/database/restricted_connection.rs:576-580 — before extracting anything, compare `sea-orm-sync/src/database/restricted_connection.rs` and `src/database/restricted_connection.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 69 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 (5 lines × 2) sea-orm-sync/src/database/restricted_connection.rs:541 — sea-orm-sync/src/database/restricted_connection.rs:541-545 | src/database/restricted_connection.rs:582-586 — before extracting anything, compare `sea-orm-sync/src/database/restricted_connection.rs` and `src/database/restricted_connection.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 69 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 (5 lines × 2) sea-orm-sync/src/driver/rusqlite.rs:457 — sea-orm-sync/src/driver/rusqlite.rs:457-461 | src/driver/rusqlite.rs:457-461 — before extracting anything, compare `sea-orm-sync/src/driver/rusqlite.rs` and `src/driver/rusqlite.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 358 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 (5 lines × 2) sea-orm-sync/src/query/loader.rs:1426 — sea-orm-sync/src/query/loader.rs:1426-1430 | src/query/loader.rs:1514-1518 — before extracting anything, compare `sea-orm-sync/src/query/loader.rs` and `src/query/loader.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 254 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 (5 lines × 2) sea-orm-sync/src/rbac/context.rs:149 — sea-orm-sync/src/rbac/context.rs:149-153 | src/rbac/context.rs:157-161 — before extracting anything, compare `sea-orm-sync/src/rbac/context.rs` and `src/rbac/context.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 58 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 (5 lines × 2) sea-orm-sync/src/schema/topology.rs:154 — sea-orm-sync/src/schema/topology.rs:154-158 | src/schema/topology.rs:154-158 — before extracting anything, compare `sea-orm-sync/src/schema/topology.rs` and `src/schema/topology.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 95 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 (5 lines × 2) sea-orm-arrow/src/lib.rs:430 — sea-orm-arrow/src/lib.rs:430-434 | sea-orm-arrow/src/lib.rs:438-442 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) sea-orm-arrow/src/lib.rs:595 — sea-orm-arrow/src/lib.rs:595-599 | sea-orm-arrow/src/lib.rs:601-605 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) sea-orm-sync/src/rbac/context.rs:264 — sea-orm-sync/src/rbac/context.rs:264-268 | src/rbac/context.rs:276-280 — before extracting anything, compare `sea-orm-sync/src/rbac/context.rs` and `src/rbac/context.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 58 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 (5 lines × 2) sea-orm-sync/src/rbac/context.rs:290 — sea-orm-sync/src/rbac/context.rs:290-294 | src/rbac/context.rs:303-307 — before extracting anything, compare `sea-orm-sync/src/rbac/context.rs` and `src/rbac/context.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 58 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.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×24
  • Duplicated block (12 lines × 2) sea-orm-macros/src/derives/case_style.rs:42 — sea-orm-macros/src/derives/case_style.rs:42-53 | sea-orm-macros/src/strum/helpers/case_style.rs:40-51 — 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 (12 lines × 2) sea-orm-sync/src/driver/rusqlite.rs:329 — sea-orm-sync/src/driver/rusqlite.rs:329-340 | src/driver/rusqlite.rs:329-340 — before extracting anything, compare `sea-orm-sync/src/driver/rusqlite.rs` and `src/driver/rusqlite.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 358 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 (12 lines × 2) sea-orm-sync/src/driver/sqlx_postgres.rs:350 — sea-orm-sync/src/driver/sqlx_postgres.rs:350-361 | src/driver/sqlx_postgres.rs:361-372 — before extracting anything, compare `sea-orm-sync/src/driver/sqlx_postgres.rs` and `src/driver/sqlx_postgres.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 139 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 (12 lines × 2) sea-orm-sync/src/driver/sqlx_sqlite.rs:494 — sea-orm-sync/src/driver/sqlx_sqlite.rs:494-505 | src/driver/sqlx_sqlite.rs:503-514 — before extracting anything, compare `sea-orm-sync/src/driver/sqlx_sqlite.rs` and `src/driver/sqlx_sqlite.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 101 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 (12 lines × 2) sea-orm-sync/src/entity/active_model.rs:707 — sea-orm-sync/src/entity/active_model.rs:707-718 | src/entity/active_model.rs:715-726 — before extracting anything, compare `sea-orm-sync/src/entity/active_model.rs` and `src/entity/active_model.rs` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 431 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 (12 lines × 2) sea-orm-sync/src/entity/active_model.rs:752 — sea-orm-sync/src/entity/active_model.rs:752-763 | src/entity/active_model.rs:760-771 — before extracting anything, compare `sea-orm-sync/src/entity/active_model.rs` and `src/entity/active_model.rs` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 431 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 (12 lines × 2) sea-orm-sync/src/entity/active_model.rs:870 — sea-orm-sync/src/entity/active_model.rs:870-881 | src/entity/active_model.rs:878-889 — before extracting anything, compare `sea-orm-sync/src/entity/active_model.rs` and `src/entity/active_model.rs` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 431 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 (12 lines × 2) sea-orm-sync/src/entity/base_entity.rs:322 — sea-orm-sync/src/entity/base_entity.rs:322-333 | src/entity/base_entity.rs:325-336 — before extracting anything, compare `sea-orm-sync/src/entity/base_entity.rs` and `src/entity/base_entity.rs` as WHOLE FILES: this scan already matched 4 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.
  • Duplicated block (12 lines × 2) sea-orm-sync/src/entity/base_entity.rs:1053 — sea-orm-sync/src/entity/base_entity.rs:1053-1064 | src/entity/base_entity.rs:1075-1086 — before extracting anything, compare `sea-orm-sync/src/entity/base_entity.rs` and `src/entity/base_entity.rs` as WHOLE FILES: this scan already matched 4 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.
  • Duplicated block (12 lines × 2) sea-orm-sync/src/executor/insert.rs:567 — sea-orm-sync/src/executor/insert.rs:567-578 | src/executor/insert.rs:581-592 — before extracting anything, compare `sea-orm-sync/src/executor/insert.rs` and `src/executor/insert.rs` as WHOLE FILES: this scan already matched 8 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 (12 lines × 2) sea-orm-sync/src/executor/paginator.rs:74 — sea-orm-sync/src/executor/paginator.rs:74-85 | src/executor/paginator.rs:76-87 — before extracting anything, compare `sea-orm-sync/src/executor/paginator.rs` and `src/executor/paginator.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 52 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 (12 lines × 2) sea-orm-sync/src/executor/select_ext.rs:48 — sea-orm-sync/src/executor/select_ext.rs:48-59 | src/executor/select_ext.rs:50-61 — 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 (12 lines × 2) sea-orm-sync/src/executor/update.rs:178 — sea-orm-sync/src/executor/update.rs:178-189 | src/executor/update.rs:184-195 — 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 (12 lines × 2) sea-orm-sync/src/query/combine.rs:69 — sea-orm-sync/src/query/combine.rs:69-80 | src/query/combine.rs:69-80 — before extracting anything, compare `sea-orm-sync/src/query/combine.rs` and `src/query/combine.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 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 (12 lines × 2) sea-orm-sync/src/rbac/engine/mod.rs:136 — sea-orm-sync/src/rbac/engine/mod.rs:136-147 | src/rbac/engine/mod.rs:136-147 — before extracting anything, compare `sea-orm-sync/src/rbac/engine/mod.rs` and `src/rbac/engine/mod.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 246 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 (12 lines × 2) sea-orm-sync/src/rbac/schema.rs:31 — sea-orm-sync/src/rbac/schema.rs:31-42 | src/rbac/schema.rs:31-42 — 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 (12 lines × 2) sea-orm-sync/src/driver/rusqlite.rs:433 — sea-orm-sync/src/driver/rusqlite.rs:433-444 | src/driver/rusqlite.rs:433-444 — before extracting anything, compare `sea-orm-sync/src/driver/rusqlite.rs` and `src/driver/rusqlite.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 358 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 (12 lines × 2) sea-orm-sync/src/driver/rusqlite.rs:630 — sea-orm-sync/src/driver/rusqlite.rs:630-641 | src/driver/rusqlite.rs:630-641 — before extracting anything, compare `sea-orm-sync/src/driver/rusqlite.rs` and `src/driver/rusqlite.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 358 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 (12 lines × 2) sea-orm-sync/src/dynamic/entity.rs:66 — sea-orm-sync/src/dynamic/entity.rs:66-77 | src/dynamic/entity.rs:66-77 — before extracting anything, compare `sea-orm-sync/src/dynamic/entity.rs` and `src/dynamic/entity.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 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 (12 lines × 2) sea-orm-sync/src/entity/active_model_ex.rs:346 — sea-orm-sync/src/entity/active_model_ex.rs:346-357 | src/entity/active_model_ex.rs:346-357 — before extracting anything, compare `sea-orm-sync/src/entity/active_model_ex.rs` and `src/entity/active_model_ex.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 134 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 (12 lines × 2) sea-orm-sync/src/executor/query.rs:1449 — sea-orm-sync/src/executor/query.rs:1449-1460 | src/executor/query.rs:1451-1462 — before extracting anything, compare `sea-orm-sync/src/executor/query.rs` and `src/executor/query.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 180 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 (12 lines × 2) sea-orm-sync/src/query/delete.rs:221 — sea-orm-sync/src/query/delete.rs:221-232 | src/query/delete.rs:221-232 — before extracting anything, compare `sea-orm-sync/src/query/delete.rs` and `src/query/delete.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 64 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 (12 lines × 2) src/driver/sqlx_mysql.rs:368 — src/driver/sqlx_mysql.rs:368-379 | src/driver/sqlx_postgres.rs:409-420 — before extracting anything, compare `src/driver/sqlx_mysql.rs` and `src/driver/sqlx_postgres.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 134 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 × 2) sea-orm-macros/src/derives/active_model_ex.rs:71 — sea-orm-macros/src/derives/active_model_ex.rs:71-82 | sea-orm-macros/src/derives/active_model_ex.rs:122-133 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D3 · God Classes · FileTooLong · ×18
  • FileTooLong: executor/query.rs sea-orm-sync/src/executor/query.rs — FileTooLong — 1168 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 668 over it, 2.34× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: executor/query.rs src/executor/query.rs — FileTooLong — 1168 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 668 over it, 2.34× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: query/loader.rs src/query/loader.rs — FileTooLong — 1154 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 654 over it, 2.31× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/lib.rs sea-orm-arrow/src/lib.rs — FileTooLong — 1129 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 44 free functions. The bar is 500 significant lines; this is 629 over it, 2.26× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: derives/model_ex.rs sea-orm-macros/src/derives/model_ex.rs — FileTooLong — 1089 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 589 over it, 2.18× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: query/loader.rs sea-orm-sync/src/query/loader.rs — FileTooLong — 1072 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 572 over it, 2.14× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: derives/active_model_ex.rs sea-orm-macros/src/derives/active_model_ex.rs — FileTooLong — 1010 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 510 over it, 2.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: entity/writer.rs sea-orm-codegen/src/entity/writer.rs — FileTooLong — 680 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 71% of them inside a single declaration: EntityWriter (2 blocks, 26-962). The bar is 500 significant lines; this is 180 over it, 1.36× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: derives/entity_loader.rs sea-orm-macros/src/derives/entity_loader.rs — FileTooLong — 663 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 60% of them inside a single declaration: EntityLoaderField (2 blocks, 24-655). The bar is 500 significant lines; this is 163 over it, 1.33× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: driver/sqlx_postgres.rs src/driver/sqlx_postgres.rs — FileTooLong — 659 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 159 over it, 1.32× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: driver/sqlx_postgres.rs sea-orm-sync/src/driver/sqlx_postgres.rs — FileTooLong — 647 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 147 over it, 1.29× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: database/transaction.rs src/database/transaction.rs — FileTooLong — 598 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 90% of them inside a single declaration: DatabaseTransaction (8 blocks, 33-782). The bar is 500 significant lines; this is 98 over it, 1.20× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: entity/active_model.rs src/entity/active_model.rs — FileTooLong — 594 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 76% of them inside a single declaration: ActiveModelTrait (31-1036). The bar is 500 significant lines; this is 94 over it, 1.19× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: database/db_connection.rs src/database/db_connection.rs — FileTooLong — 593 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 82% of them inside a single declaration: DatabaseConnection (11 blocks, 33-860). The bar is 500 significant lines; this is 93 over it, 1.19× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: entity/active_model.rs sea-orm-sync/src/entity/active_model.rs — FileTooLong — 583 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 77% of them inside a single declaration: ActiveModelTrait (30-1026). The bar is 500 significant lines; this is 83 over it, 1.17× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: derives/active_enum.rs sea-orm-macros/src/derives/active_enum.rs — FileTooLong — 552 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 86% of them inside a single declaration: ActiveEnum (2 blocks, 8-824). The bar is 500 significant lines; this is 52 over it, 1.10× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: database/db_connection.rs sea-orm-sync/src/database/db_connection.rs — FileTooLong — 551 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 81% of them inside a single declaration: DatabaseConnection (11 blocks, 33-811). The bar is 500 significant lines; this is 51 over it, 1.10× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: database/transaction.rs sea-orm-sync/src/database/transaction.rs — FileTooLong — 540 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 91% of them inside a single declaration: DatabaseTransaction (8 blocks, 33-730). The bar is 500 significant lines; this is 40 over it, 1.08× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
D17 · Explicit Debt · TodoComment · ×14
  • TodoComment examples/loco_example/tests/requests/notes.rs:8 — // TODO: see how to dedup / extract this to app-local test utils — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment examples/loco_seaography/src/workers/downloader.rs:25 — // TODO: Some actual work goes here... — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment examples/loco_starter/src/workers/downloader.rs:25 — // TODO: Some actual work goes here... — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment examples/react_admin/backend/src/workers/downloader.rs:25 — // TODO: Some actual work goes here... — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment sea-orm-macros/src/derives/active_model_ex.rs:1316 — // TODO: Batch save? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment sea-orm-macros/src/derives/active_enum.rs:759 — // TODO: Use DynIden constructor — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment sea-orm-sync/src/driver/rusqlite.rs:209 — // TODO handle disable_statement_logging — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment src/driver/rusqlite.rs:209 — // TODO handle disable_statement_logging — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment sea-orm-sync/src/query/loader.rs:10 — // TODO: Replace DynIden::inner with a better API that without clone — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment src/query/loader.rs:10 — // TODO: Replace DynIden::inner with a better API that without clone — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment sea-orm-sync/src/schema/builder.rs:406 — // TODO add enum variants — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment src/schema/builder.rs:410 — // TODO add enum variants — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment sea-orm-sync/tests/partial_model_nested/nested_alias.rs:50 — // TODO: init utils — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment tests/partial_model_nested/nested_alias.rs:52 — // TODO: init utils — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×14
  • Members sharing a duplicated core (4 members, 50+ identical tokens) sea-orm-macros/src/derives/active_model_ex.rs:1126 — sea-orm-macros/src/derives/active_model_ex.rs:1126-1180 | sea-orm-macros/src/derives/active_model_ex.rs:1182-1199 | sea-orm-macros/src/derives/active_model_ex.rs:1359-1396 | sea-orm-macros/src/derives/active_model_ex.rs:1398-1414 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) sea-orm-macros/src/derives/from_query_result.rs:122 — sea-orm-macros/src/derives/from_query_result.rs:122-209 | sea-orm-macros/src/derives/into_active_model.rs:54-124 | sea-orm-macros/src/derives/into_active_model.rs:218-270 | sea-orm-macros/src/derives/partial_model.rs:58-229 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) sea-orm-sync/src/database/mock.rs:232 — sea-orm-sync/src/database/mock.rs:232-251 | sea-orm-sync/src/database/proxy.rs:166-185 | src/database/mock.rs:232-251 | src/database/proxy.rs:167-186 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) sea-orm-sync/src/database/stream/query.rs:40 — sea-orm-sync/src/database/stream/query.rs:40-114 | sea-orm-sync/src/database/stream/transaction.rs:44-107 | src/database/stream/query.rs:42-116 | src/database/stream/transaction.rs:45-108 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) sea-orm-sync/src/driver/rusqlite.rs:328 — sea-orm-sync/src/driver/rusqlite.rs:328-344 | sea-orm-sync/src/driver/rusqlite.rs:501-516 | src/driver/rusqlite.rs:328-344 | src/driver/rusqlite.rs:501-516 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) sea-orm-sync/src/driver/rusqlite.rs:348 — sea-orm-sync/src/driver/rusqlite.rs:348-361 | sea-orm-sync/src/driver/rusqlite.rs:519-531 | src/driver/rusqlite.rs:348-361 | src/driver/rusqlite.rs:519-531 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) sea-orm-sync/src/driver/sqlx_mysql.rs:312 — sea-orm-sync/src/driver/sqlx_mysql.rs:312-333 | sea-orm-sync/src/driver/sqlx_postgres.rs:347-365 | src/driver/sqlx_mysql.rs:319-340 | src/driver/sqlx_postgres.rs:358-377 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) sea-orm-sync/src/entity/column.rs:437 — sea-orm-sync/src/entity/column.rs:437-448 | sea-orm-sync/src/entity/column.rs:474-485 | src/entity/column.rs:437-448 | src/entity/column.rs:474-485 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) sea-orm-sync/src/executor/cursor.rs:305 — sea-orm-sync/src/executor/cursor.rs:305-319 | sea-orm-sync/src/executor/cursor.rs:332-346 | src/executor/cursor.rs:305-319 | src/executor/cursor.rs:332-346 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) sea-orm-sync/src/executor/cursor.rs:430 — sea-orm-sync/src/executor/cursor.rs:430-446 | sea-orm-sync/src/executor/cursor.rs:485-514 | src/executor/cursor.rs:430-446 | src/executor/cursor.rs:485-514 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) sea-orm-sync/src/executor/delete.rs:151 — sea-orm-sync/src/executor/delete.rs:151-166 | sea-orm-sync/src/executor/delete.rs:175-190 | src/executor/delete.rs:151-168 | src/executor/delete.rs:177-194 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) sea-orm-sync/src/executor/insert.rs:498 — sea-orm-sync/src/executor/insert.rs:498-523 | sea-orm-sync/src/executor/insert.rs:566-585 | src/executor/insert.rs:509-537 | src/executor/insert.rs:580-600 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) sea-orm-sync/src/executor/select.rs:900 — sea-orm-sync/src/executor/select.rs:900-915 | sea-orm-sync/src/executor/select.rs:1185-1200 | src/executor/select.rs:913-928 | src/executor/select.rs:1207-1222 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) sea-orm-sync/src/rbac/engine/role_hierarchy_impl.rs:9 — sea-orm-sync/src/rbac/engine/role_hierarchy_impl.rs:9-29 | sea-orm-sync/src/rbac/engine/role_hierarchy_impl.rs:36-61 | src/rbac/engine/role_hierarchy_impl.rs:9-29 | src/rbac/engine/role_hierarchy_impl.rs:36-61 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×14
  • Duplicated block (15 lines × 2) sea-orm-sync/src/database/db_connection.rs:462 — sea-orm-sync/src/database/db_connection.rs:462-476 | sea-orm-sync/src/database/db_connection.rs:508-522 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) sea-orm-sync/src/database/db_connection.rs:755 — sea-orm-sync/src/database/db_connection.rs:755-769 | src/database/db_connection.rs:804-818 — before extracting anything, compare `sea-orm-sync/src/database/db_connection.rs` and `src/database/db_connection.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 162 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 (15 lines × 2) sea-orm-sync/src/driver/rusqlite.rs:594 — sea-orm-sync/src/driver/rusqlite.rs:594-608 | src/driver/rusqlite.rs:594-608 — before extracting anything, compare `sea-orm-sync/src/driver/rusqlite.rs` and `src/driver/rusqlite.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 358 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 (15 lines × 2) sea-orm-sync/src/driver/sqlx_mysql.rs:315 — sea-orm-sync/src/driver/sqlx_mysql.rs:315-329 | src/driver/sqlx_mysql.rs:322-336 — before extracting anything, compare `sea-orm-sync/src/driver/sqlx_mysql.rs` and `src/driver/sqlx_mysql.rs` as WHOLE FILES: this scan already matched 8 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. 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 (15 lines × 2) sea-orm-sync/src/entity/relation.rs:210 — sea-orm-sync/src/entity/relation.rs:210-224 | src/entity/relation.rs:210-224 — before extracting anything, compare `sea-orm-sync/src/entity/relation.rs` and `src/entity/relation.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 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 (15 lines × 2) sea-orm-sync/src/entity/relation.rs:468 — sea-orm-sync/src/entity/relation.rs:468-482 | src/entity/relation.rs:468-482 — before extracting anything, compare `sea-orm-sync/src/entity/relation.rs` and `src/entity/relation.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 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 (15 lines × 2) sea-orm-sync/src/executor/cursor.rs:432 — sea-orm-sync/src/executor/cursor.rs:432-446 | src/executor/cursor.rs:432-446 — before extracting anything, compare `sea-orm-sync/src/executor/cursor.rs` and `src/executor/cursor.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 217 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 (15 lines × 2) sea-orm-sync/src/executor/paginator.rs:331 — sea-orm-sync/src/executor/paginator.rs:331-345 | src/executor/paginator.rs:338-352 — before extracting anything, compare `sea-orm-sync/src/executor/paginator.rs` and `src/executor/paginator.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 52 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 (15 lines × 2) sea-orm-sync/src/rbac/engine/mod.rs:339 — sea-orm-sync/src/rbac/engine/mod.rs:339-353 | src/rbac/engine/mod.rs:339-353 — before extracting anything, compare `sea-orm-sync/src/rbac/engine/mod.rs` and `src/rbac/engine/mod.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 246 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 (15 lines × 2) sea-orm-sync/src/schema/builder.rs:396 — sea-orm-sync/src/schema/builder.rs:396-410 | src/schema/builder.rs:400-414 — before extracting anything, compare `sea-orm-sync/src/schema/builder.rs` and `src/schema/builder.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 428 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 (15 lines × 2) src/driver/sqlx_mysql.rs:96 — src/driver/sqlx_mysql.rs:96-110 | src/driver/sqlx_sqlite.rs:106-122 — before extracting anything, compare `src/driver/sqlx_mysql.rs` and `src/driver/sqlx_sqlite.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 104 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 (15 lines × 2) sea-orm-sync/src/value/with_chrono.rs:36 — sea-orm-sync/src/value/with_chrono.rs:36-50 | src/value/with_chrono.rs:36-50 — 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 (15 lines × 2) sea-orm-sync/src/executor/cursor.rs:51 — sea-orm-sync/src/executor/cursor.rs:51-65 | src/executor/cursor.rs:51-65 — before extracting anything, compare `sea-orm-sync/src/executor/cursor.rs` and `src/executor/cursor.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 217 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 (15 lines × 2) sea-orm-sync/src/tests_cfg/cake_filling.rs:35 — sea-orm-sync/src/tests_cfg/cake_filling.rs:35-49 | src/tests_cfg/cake_filling.rs:35-49 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×13
  • Duplicated block (13 lines × 2) sea-orm-arrow/src/lib.rs:958 — sea-orm-arrow/src/lib.rs:958-970 | sea-orm-arrow/src/lib.rs:1250-1262 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) sea-orm-sync/src/database/tracing_spans.rs:51 — sea-orm-sync/src/database/tracing_spans.rs:51-63 | src/database/tracing_spans.rs:51-63 — before extracting anything, compare `sea-orm-sync/src/database/tracing_spans.rs` and `src/database/tracing_spans.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 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 (13 lines × 2) sea-orm-sync/src/driver/rusqlite.rs:615 — sea-orm-sync/src/driver/rusqlite.rs:615-627 | src/driver/rusqlite.rs:615-627 — before extracting anything, compare `sea-orm-sync/src/driver/rusqlite.rs` and `src/driver/rusqlite.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 358 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 (13 lines × 2) sea-orm-sync/src/executor/cursor.rs:94 — sea-orm-sync/src/executor/cursor.rs:94-106 | src/executor/cursor.rs:94-106 — before extracting anything, compare `sea-orm-sync/src/executor/cursor.rs` and `src/executor/cursor.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 217 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 (13 lines × 2) sea-orm-sync/src/executor/query.rs:1542 — sea-orm-sync/src/executor/query.rs:1542-1554 | src/executor/query.rs:1544-1556 — before extracting anything, compare `sea-orm-sync/src/executor/query.rs` and `src/executor/query.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 180 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 (13 lines × 2) sea-orm-sync/src/schema/json.rs:64 — sea-orm-sync/src/schema/json.rs:64-76 | src/schema/json.rs:64-76 — before extracting anything, compare `sea-orm-sync/src/schema/json.rs` and `src/schema/json.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 81 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 (13 lines × 2) src/rbac/context.rs:91 — src/rbac/context.rs:91-103 | src/rbac/context.rs:143-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.
  • Duplicated block (13 lines × 2) sea-orm-sync/src/database/mock.rs:399 — sea-orm-sync/src/database/mock.rs:399-411 | src/database/mock.rs:399-411 — before extracting anything, compare `sea-orm-sync/src/database/mock.rs` and `src/database/mock.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 140 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 (13 lines × 2) sea-orm-sync/src/database/mock.rs:413 — sea-orm-sync/src/database/mock.rs:413-425 | src/database/mock.rs:413-425 — before extracting anything, compare `sea-orm-sync/src/database/mock.rs` and `src/database/mock.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 140 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 (13 lines × 2) sea-orm-sync/src/entity/active_model.rs:729 — sea-orm-sync/src/entity/active_model.rs:729-741 | src/entity/active_model.rs:737-749 — before extracting anything, compare `sea-orm-sync/src/entity/active_model.rs` and `src/entity/active_model.rs` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 431 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 (13 lines × 2) sea-orm-sync/src/entity/active_model_ex.rs:384 — sea-orm-sync/src/entity/active_model_ex.rs:384-396 | src/entity/active_model_ex.rs:384-396 — before extracting anything, compare `sea-orm-sync/src/entity/active_model_ex.rs` and `src/entity/active_model_ex.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 134 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 (13 lines × 2) sea-orm-sync/src/driver/mock.rs:267 — sea-orm-sync/src/driver/mock.rs:267-279 | sea-orm-sync/src/driver/proxy.rs:146-158 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (13 lines × 2) sea-orm-sync/src/tests_cfg/entity_linked.rs:46 — sea-orm-sync/src/tests_cfg/entity_linked.rs:46-58 | src/tests_cfg/entity_linked.rs:46-58 — before extracting anything, compare `sea-orm-sync/src/tests_cfg/entity_linked.rs` and `src/tests_cfg/entity_linked.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 33 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.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×12
  • Duplicated block (16 lines × 2) sea-orm-codegen/src/entity/writer/dense.rs:194 — sea-orm-codegen/src/entity/writer/dense.rs:194-209 | sea-orm-codegen/src/entity/writer/frontend.rs:87-102 — 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 (16 lines × 2) sea-orm-macros/src/derives/case_style.rs:60 — sea-orm-macros/src/derives/case_style.rs:60-75 | sea-orm-macros/src/strum/helpers/case_style.rs:58-73 — 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 (16 lines × 2) sea-orm-sync/src/database/db_connection.rs:642 — sea-orm-sync/src/database/db_connection.rs:642-657 | src/database/db_connection.rs:691-706 — before extracting anything, compare `sea-orm-sync/src/database/db_connection.rs` and `src/database/db_connection.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 162 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 (16 lines × 2) sea-orm-sync/src/database/db_connection.rs:665 — sea-orm-sync/src/database/db_connection.rs:665-680 | src/database/db_connection.rs:714-729 — before extracting anything, compare `sea-orm-sync/src/database/db_connection.rs` and `src/database/db_connection.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 162 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 (16 lines × 2) sea-orm-sync/src/driver/rusqlite.rs:138 — sea-orm-sync/src/driver/rusqlite.rs:138-153 | src/driver/rusqlite.rs:138-153 — before extracting anything, compare `sea-orm-sync/src/driver/rusqlite.rs` and `src/driver/rusqlite.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 358 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 (16 lines × 2) sea-orm-sync/src/entity/relation.rs:362 — sea-orm-sync/src/entity/relation.rs:362-377 | src/entity/relation.rs:362-377 — before extracting anything, compare `sea-orm-sync/src/entity/relation.rs` and `src/entity/relation.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 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 (16 lines × 2) sea-orm-sync/src/entity/relation.rs:380 — sea-orm-sync/src/entity/relation.rs:380-395 | src/entity/relation.rs:380-395 — before extracting anything, compare `sea-orm-sync/src/entity/relation.rs` and `src/entity/relation.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 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 (16 lines × 2) sea-orm-sync/src/executor/cursor.rs:180 — sea-orm-sync/src/executor/cursor.rs:180-195 | src/executor/cursor.rs:180-195 — before extracting anything, compare `sea-orm-sync/src/executor/cursor.rs` and `src/executor/cursor.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 217 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 (16 lines × 2) sea-orm-sync/src/executor/cursor.rs:453 — sea-orm-sync/src/executor/cursor.rs:453-468 | src/executor/cursor.rs:453-468 — before extracting anything, compare `sea-orm-sync/src/executor/cursor.rs` and `src/executor/cursor.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 217 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 (16 lines × 2) sea-orm-sync/src/schema/builder.rs:489 — sea-orm-sync/src/schema/builder.rs:489-504 | src/schema/builder.rs:495-510 — before extracting anything, compare `sea-orm-sync/src/schema/builder.rs` and `src/schema/builder.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 428 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 (16 lines × 2) sea-orm-sync/src/schema/entity.rs:126 — sea-orm-sync/src/schema/entity.rs:126-141 | src/schema/entity.rs:126-141 — before extracting anything, compare `sea-orm-sync/src/schema/entity.rs` and `src/schema/entity.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 153 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 (16 lines × 2) sea-orm-sync/src/query/insert.rs:467 — sea-orm-sync/src/query/insert.rs:467-482 | src/query/insert.rs:467-482 — before extracting anything, compare `sea-orm-sync/src/query/insert.rs` and `src/query/insert.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 162 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.
D3 · God Classes · FunctionTooLong · ×11
  • FunctionTooLong: sea_orm_macros::derives::entity_model::expand_derive_entity_model sea-orm-macros/src/derives/entity_model.rs:59 — FunctionTooLong — sea_orm_macros::derives::entity_model::expand_derive_entity_model runs 415 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 315 over it, 4.15× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: sea_orm_sync::driver::sqlx_postgres::from_sqlx_postgres_row_to_proxy_row sea-orm-sync/src/driver/sqlx_postgres.rs:411 — FunctionTooLong — sea_orm_sync::driver::sqlx_postgres::from_sqlx_postgres_row_to_proxy_row runs 380 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 280 over it, 3.80× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: sea_orm::driver::sqlx_postgres::from_sqlx_postgres_row_to_proxy_row src/driver/sqlx_postgres.rs:424 — FunctionTooLong — sea_orm::driver::sqlx_postgres::from_sqlx_postgres_row_to_proxy_row runs 380 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 280 over it, 3.80× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: sea_orm_cli::commands::generate::run_generate_command sea-orm-cli/src/commands/generate.rs:116 — FunctionTooLong — sea_orm_cli::commands::generate::run_generate_command runs 238 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 138 over it, 2.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: sea_orm_arrow::option_values_to_arrow_array sea-orm-arrow/src/lib.rs:977 — FunctionTooLong — sea_orm_arrow::option_values_to_arrow_array runs 226 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 126 over it, 2.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: sea_orm_arrow::values_to_arrow_array sea-orm-arrow/src/lib.rs:695 — FunctionTooLong — sea_orm_arrow::values_to_arrow_array runs 217 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 117 over it, 2.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: sea_orm_macros::derives::entity_loader::expand_entity_loader sea-orm-macros/src/derives/entity_loader.rs:715 — FunctionTooLong — sea_orm_macros::derives::entity_loader::expand_entity_loader runs 191 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 91 over it, 1.91× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: sea_orm_sync::driver::sqlx_mysql::from_sqlx_mysql_row_to_proxy_row sea-orm-sync/src/driver/sqlx_mysql.rs:375 — FunctionTooLong — sea_orm_sync::driver::sqlx_mysql::from_sqlx_mysql_row_to_proxy_row runs 121 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: sea_orm::driver::sqlx_mysql::from_sqlx_mysql_row_to_proxy_row src/driver/sqlx_mysql.rs:383 — FunctionTooLong — sea_orm::driver::sqlx_mysql::from_sqlx_mysql_row_to_proxy_row runs 121 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: sea_orm_arrow::arrow_array_to_value sea-orm-arrow/src/lib.rs:49 — FunctionTooLong — sea_orm_arrow::arrow_array_to_value runs 104 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: sea_orm_macros::derives::model_ex::expand_sea_orm_model sea-orm-macros/src/derives/model_ex.rs:21 — FunctionTooLong — sea_orm_macros::derives::model_ex::expand_sea_orm_model runs 101 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 1 over it, 1.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×11
  • Duplicated block (17 lines × 2) sea-orm-codegen/src/entity/base_entity.rs:135 — sea-orm-codegen/src/entity/base_entity.rs:135-151 | sea-orm-codegen/src/entity/base_entity.rs:193-209 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) sea-orm-sync/src/dynamic/entity.rs:48 — sea-orm-sync/src/dynamic/entity.rs:48-64 | src/dynamic/entity.rs:48-64 — before extracting anything, compare `sea-orm-sync/src/dynamic/entity.rs` and `src/dynamic/entity.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 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 (17 lines × 2) sea-orm-sync/src/entity/column.rs:634 — sea-orm-sync/src/entity/column.rs:634-650 | src/entity/column.rs:634-650 — before extracting anything, compare `sea-orm-sync/src/entity/column.rs` and `src/entity/column.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 92 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 (17 lines × 2) sea-orm-sync/src/executor/query.rs:196 — sea-orm-sync/src/executor/query.rs:196-212 | src/executor/query.rs:196-212 — before extracting anything, compare `sea-orm-sync/src/executor/query.rs` and `src/executor/query.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 180 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 (17 lines × 2) sea-orm-sync/src/executor/query.rs:213 — sea-orm-sync/src/executor/query.rs:213-229 | src/executor/query.rs:213-229 — before extracting anything, compare `sea-orm-sync/src/executor/query.rs` and `src/executor/query.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 180 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 (17 lines × 2) sea-orm-sync/src/executor/query.rs:285 — sea-orm-sync/src/executor/query.rs:285-301 | src/executor/query.rs:285-301 — before extracting anything, compare `sea-orm-sync/src/executor/query.rs` and `src/executor/query.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 180 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 (17 lines × 2) sea-orm-sync/src/query/loader.rs:1063 — sea-orm-sync/src/query/loader.rs:1063-1079 | src/query/loader.rs:1147-1163 — before extracting anything, compare `sea-orm-sync/src/query/loader.rs` and `src/query/loader.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 254 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 (17 lines × 2) sea-orm-sync/src/query/util.rs:96 — sea-orm-sync/src/query/util.rs:96-112 | src/query/util.rs:96-112 — before extracting anything, compare `sea-orm-sync/src/query/util.rs` and `src/query/util.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 179 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 (17 lines × 2) src/database/db_connection.rs:497 — src/database/db_connection.rs:497-513 | src/database/db_connection.rs:552-568 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) sea-orm-sync/src/entity/active_enum.rs:132 — sea-orm-sync/src/entity/active_enum.rs:132-148 | src/entity/active_enum.rs:132-148 — 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 (17 lines × 2) sea-orm-sync/src/query/insert.rs:534 — sea-orm-sync/src/query/insert.rs:534-550 | src/query/insert.rs:534-550 — before extracting anything, compare `sea-orm-sync/src/query/insert.rs` and `src/query/insert.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 162 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.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×10
  • Duplicated block (18 lines × 2) sea-orm-sync/src/database/statement.rs:78 — sea-orm-sync/src/database/statement.rs:78-95 | src/database/statement.rs:78-95 — 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 lines × 2) sea-orm-sync/src/driver/mock.rs:63 — sea-orm-sync/src/driver/mock.rs:63-80 | src/driver/mock.rs:64-81 — before extracting anything, compare `sea-orm-sync/src/driver/mock.rs` and `src/driver/mock.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 83 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 (18 lines × 2) sea-orm-sync/src/executor/insert.rs:462 — sea-orm-sync/src/executor/insert.rs:462-479 | src/executor/insert.rs:470-487 — before extracting anything, compare `sea-orm-sync/src/executor/insert.rs` and `src/executor/insert.rs` as WHOLE FILES: this scan already matched 8 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 (18 lines × 2) sea-orm-sync/src/executor/insert.rs:539 — sea-orm-sync/src/executor/insert.rs:539-556 | src/executor/insert.rs:553-570 — before extracting anything, compare `sea-orm-sync/src/executor/insert.rs` and `src/executor/insert.rs` as WHOLE FILES: this scan already matched 8 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 (18 lines × 2) sea-orm-sync/src/query/loader.rs:1217 — sea-orm-sync/src/query/loader.rs:1217-1234 | src/query/loader.rs:1305-1322 — before extracting anything, compare `sea-orm-sync/src/query/loader.rs` and `src/query/loader.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 254 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 (18 lines × 2) sea-orm-sync/src/query/loader.rs:1247 — sea-orm-sync/src/query/loader.rs:1247-1264 | src/query/loader.rs:1335-1352 — before extracting anything, compare `sea-orm-sync/src/query/loader.rs` and `src/query/loader.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 254 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 (18 lines × 2) sea-orm-sync/src/query/util.rs:69 — sea-orm-sync/src/query/util.rs:69-86 | src/query/util.rs:69-86 — before extracting anything, compare `sea-orm-sync/src/query/util.rs` and `src/query/util.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 179 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 (18 lines × 2) sea-orm-sync/src/schema/builder.rs:623 — sea-orm-sync/src/schema/builder.rs:623-640 | src/schema/builder.rs:632-649 — before extracting anything, compare `sea-orm-sync/src/schema/builder.rs` and `src/schema/builder.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 428 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 (18 lines × 2) sea-orm-sync/src/schema/json.rs:44 — sea-orm-sync/src/schema/json.rs:44-61 | src/schema/json.rs:44-61 — before extracting anything, compare `sea-orm-sync/src/schema/json.rs` and `src/schema/json.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 81 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 (18 lines × 2) sea-orm-sync/src/schema/json.rs:92 — sea-orm-sync/src/schema/json.rs:92-109 | src/schema/json.rs:92-109 — before extracting anything, compare `sea-orm-sync/src/schema/json.rs` and `src/schema/json.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 81 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.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×10
  • Duplicated block (14 lines × 2) sea-orm-sync/src/database/proxy.rs:146 — sea-orm-sync/src/database/proxy.rs:146-159 | src/database/proxy.rs:147-160 — before extracting anything, compare `sea-orm-sync/src/database/proxy.rs` and `src/database/proxy.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 54 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 (14 lines × 2) sea-orm-sync/src/driver/sqlx_postgres.rs:925 — sea-orm-sync/src/driver/sqlx_postgres.rs:925-938 | src/driver/sqlx_postgres.rs:938-951 — before extracting anything, compare `sea-orm-sync/src/driver/sqlx_postgres.rs` and `src/driver/sqlx_postgres.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 139 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 (14 lines × 2) sea-orm-sync/src/dynamic/execute.rs:57 — sea-orm-sync/src/dynamic/execute.rs:57-70 | src/dynamic/execute.rs:57-70 — 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 (14 lines × 2) sea-orm-sync/src/entity/active_model.rs:682 — sea-orm-sync/src/entity/active_model.rs:682-695 | src/entity/active_model.rs:690-703 — before extracting anything, compare `sea-orm-sync/src/entity/active_model.rs` and `src/entity/active_model.rs` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 431 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 (14 lines × 2) sea-orm-sync/src/entity/active_model.rs:969 — sea-orm-sync/src/entity/active_model.rs:969-982 | src/entity/active_model.rs:977-990 — before extracting anything, compare `sea-orm-sync/src/entity/active_model.rs` and `src/entity/active_model.rs` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 431 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 (14 lines × 2) sea-orm-sync/src/query/delete.rs:202 — sea-orm-sync/src/query/delete.rs:202-215 | src/query/delete.rs:202-215 — before extracting anything, compare `sea-orm-sync/src/query/delete.rs` and `src/query/delete.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 64 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 (14 lines × 2) sea-orm-sync/src/rbac/engine/mod.rs:150 — sea-orm-sync/src/rbac/engine/mod.rs:150-163 | src/rbac/engine/mod.rs:150-163 — before extracting anything, compare `sea-orm-sync/src/rbac/engine/mod.rs` and `src/rbac/engine/mod.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 246 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 (14 lines × 2) sea-orm-sync/src/rbac/engine/mod.rs:205 — sea-orm-sync/src/rbac/engine/mod.rs:205-218 | src/rbac/engine/mod.rs:205-218 — before extracting anything, compare `sea-orm-sync/src/rbac/engine/mod.rs` and `src/rbac/engine/mod.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 246 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 (14 lines × 2) src/driver/mock.rs:268 — src/driver/mock.rs:268-281 | src/driver/proxy.rs:146-159 — 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 (14 lines × 2) sea-orm-migration/src/manager.rs:150 — sea-orm-migration/src/manager.rs:150-163 | sea-orm-migration/src/manager.rs:181-194 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D2 · Cognitive Complexity · sea_orm_macros · ×9
  • sea_orm_macros::derives::entity_model::expand_derive_entity_model (cognitive 279) sea-orm-macros/src/derives/entity_model.rs:59 — sea_orm_macros::derives::entity_model::expand_derive_entity_model has cognitive complexity 279 (threshold 15). Drivers by points: if/else 100 (254 pts), loops 3 (14 pts), match/switch 2 (6 pts), boolean chains 5 (nesting depth added 169). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • sea_orm_macros::derives::arrow_schema::column_type_to_arrow_datatype (cognitive 66) sea-orm-macros/src/derives/arrow_schema.rs:174 — sea_orm_macros::derives::arrow_schema::column_type_to_arrow_datatype has cognitive complexity 66 (threshold 15). Drivers by points: if/else 43 (62 pts), boolean chains 4 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • sea_orm_macros::derives::typed_column::expand_typed_column (cognitive 49) sea-orm-macros/src/derives/typed_column.rs:10 — sea_orm_macros::derives::typed_column::expand_typed_column has cognitive complexity 49 (threshold 15). Drivers by points: if/else 18 (42 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • sea_orm_macros::derives::value_type_match::column_type_wrapper (cognitive 49) sea-orm-macros/src/derives/value_type_match.rs:23 — sea_orm_macros::derives::value_type_match::column_type_wrapper has cognitive complexity 49 (threshold 15). Drivers by points: if/else 32 (43 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • sea_orm_macros::derives::model_ex::expand_sea_orm_model (cognitive 48) sea-orm-macros/src/derives/model_ex.rs:21 — sea_orm_macros::derives::model_ex::expand_sea_orm_model has cognitive complexity 48 (threshold 15). Drivers by points: if/else 20 (32 pts), match/switch 2 (7 pts), loops 4 (6 pts), boolean chains 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • sea_orm_macros::derives::arrow_schema::expand_derive_arrow_schema (cognitive 46) sea-orm-macros/src/derives/arrow_schema.rs:6 — sea_orm_macros::derives::arrow_schema::expand_derive_arrow_schema has cognitive complexity 46 (threshold 15). Drivers by points: if/else 18 (37 pts), loops 2 (8 pts), boolean chains 1 (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • sea_orm_macros::derives::into_active_model::parse_field (cognitive 33) sea-orm-macros/src/derives/into_active_model.rs:218 — sea_orm_macros::derives::into_active_model::parse_field has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (28 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • sea_orm_macros::derives::model_ex::entity_loader_field (cognitive 19) sea-orm-macros/src/derives/model_ex.rs:477 — sea_orm_macros::derives::model_ex::entity_loader_field has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 3 (5 pts) (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • sea_orm_macros::derives::model_ex::expand_belongs_to_into (cognitive 17) sea-orm-macros/src/derives/model_ex.rs:816 — sea_orm_macros::derives::model_ex::expand_belongs_to_into has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D3 · God Classes · MethodTooLong · ×9
  • MethodTooLong: EntityTransformer.transform sea-orm-codegen/src/entity/transformer.rs:12 — MethodTooLong — transform runs 186 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 86 over it, 1.86× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: EntitySchemaInfo.sync sea-orm-sync/src/schema/builder.rs:390 — MethodTooLong — sync runs 152 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 52 over it, 1.52× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: EntitySchemaInfo.sync src/schema/builder.rs:394 — MethodTooLong — sync runs 152 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 52 over it, 1.52× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DeriveRelation.impl_relation_trait sea-orm-macros/src/derives/relation.rs:44 — MethodTooLong — impl_relation_trait runs 146 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 46 over it, 1.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ActiveEnum.new sea-orm-macros/src/derives/active_enum.rs:129 — MethodTooLong — new runs 129 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 29 over it, 1.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: RelationAttr.from_attr sea-orm-macros/src/derives/active_model_ex.rs:34 — MethodTooLong — from_attr runs 117 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DerivePartialModel.new sea-orm-macros/src/derives/partial_model.rs:58 — MethodTooLong — new runs 117 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SchemaBuilder.sync src/schema/builder.rs:90 — MethodTooLong — sync runs 117 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SchemaBuilder.sync sea-orm-sync/src/schema/builder.rs:90 — MethodTooLong — sync runs 115 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 15 over it, 1.15× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D3 · God Classes · ClassTooLong · ×8
  • ClassTooLong: DatabaseTransaction src/database/transaction.rs:33 — ClassTooLong — 537 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 12 methods, 8 blocks, lines 33-782. The bar is 400 significant lines; this is 137 over it, 1.34× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: DatabaseTransaction sea-orm-sync/src/database/transaction.rs:33 — ClassTooLong — 489 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 12 methods, 8 blocks, lines 33-730. The bar is 400 significant lines; this is 89 over it, 1.22× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: DatabaseConnection src/database/db_connection.rs:33 — ClassTooLong — 486 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 20 methods, 11 blocks, lines 33-860. The bar is 400 significant lines; this is 86 over it, 1.22× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: EntityWriter sea-orm-codegen/src/entity/writer.rs:26 — ClassTooLong — 485 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 41 methods, 2 blocks, lines 26-962. The bar is 400 significant lines; this is 85 over it, 1.21× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ActiveEnum sea-orm-macros/src/derives/active_enum.rs:8 — ClassTooLong — 473 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 12 methods, 2 blocks, lines 8-824. The bar is 400 significant lines; this is 73 over it, 1.18× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ActiveModelTrait src/entity/active_model.rs:31 — ClassTooLong — 451 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 39 methods. The bar is 400 significant lines; this is 51 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ActiveModelTrait sea-orm-sync/src/entity/active_model.rs:30 — ClassTooLong — 447 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 39 methods. The bar is 400 significant lines; this is 47 over it, 1.12× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: DatabaseConnection sea-orm-sync/src/database/db_connection.rs:33 — ClassTooLong — 447 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 20 methods, 11 blocks, lines 33-811. The bar is 400 significant lines; this is 47 over it, 1.12× 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.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×8
  • Duplicated block (20 lines × 2) sea-orm-macros/src/derives/model_ex.rs:681 — sea-orm-macros/src/derives/model_ex.rs:681-700 | sea-orm-macros/src/derives/model_ex.rs:1054-1073 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) sea-orm-sync/src/database/db_connection.rs:132 — sea-orm-sync/src/database/db_connection.rs:132-151 | src/database/db_connection.rs:132-151 — before extracting anything, compare `sea-orm-sync/src/database/db_connection.rs` and `src/database/db_connection.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 162 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) sea-orm-sync/src/database/db_connection.rs:700 — sea-orm-sync/src/database/db_connection.rs:700-719 | src/database/db_connection.rs:749-768 — before extracting anything, compare `sea-orm-sync/src/database/db_connection.rs` and `src/database/db_connection.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 162 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) sea-orm-sync/src/entity/active_model.rs:840 — sea-orm-sync/src/entity/active_model.rs:840-859 | src/entity/active_model.rs:848-867 — before extracting anything, compare `sea-orm-sync/src/entity/active_model.rs` and `src/entity/active_model.rs` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 431 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) sea-orm-sync/src/rbac/engine/mod.rs:71 — sea-orm-sync/src/rbac/engine/mod.rs:71-90 | src/rbac/engine/mod.rs:71-90 — before extracting anything, compare `sea-orm-sync/src/rbac/engine/mod.rs` and `src/rbac/engine/mod.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 246 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) sea-orm-sync/src/rbac/engine/snapshot.rs:19 — sea-orm-sync/src/rbac/engine/snapshot.rs:19-38 | src/rbac/engine/snapshot.rs:19-38 — before extracting anything, compare `sea-orm-sync/src/rbac/engine/snapshot.rs` and `src/rbac/engine/snapshot.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 54 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) sea-orm-sync/src/rbac/engine/role_hierarchy_impl.rs:10 — sea-orm-sync/src/rbac/engine/role_hierarchy_impl.rs:10-29 | src/rbac/engine/role_hierarchy_impl.rs:10-29 — before extracting anything, compare `sea-orm-sync/src/rbac/engine/role_hierarchy_impl.rs` and `src/rbac/engine/role_hierarchy_impl.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 59 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) sea-orm-sync/src/database/sea_schema_shim.rs:75 — sea-orm-sync/src/database/sea_schema_shim.rs:75-94 | src/database/sea_schema_shim.rs:84-103 — 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 · Duplicated block (7 lines × 3) · ×8
  • Duplicated block (7 lines × 3) sea-orm-arrow/src/lib.rs:543 — sea-orm-arrow/src/lib.rs:543-549 | sea-orm-arrow/src/lib.rs:557-563 | sea-orm-arrow/src/lib.rs:571-577 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7 lines × 3) sea-orm-macros/src/derives/entity_loader.rs:420 — sea-orm-macros/src/derives/entity_loader.rs:420-426 | sea-orm-macros/src/derives/entity_loader.rs:476-482 | sea-orm-macros/src/derives/entity_loader.rs:584-590 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7 lines × 3) sea-orm-macros/src/derives/from_query_result.rs:142 — sea-orm-macros/src/derives/from_query_result.rs:142-148 | sea-orm-macros/src/derives/into_active_model.rs:223-230 | sea-orm-macros/src/derives/partial_model.rs:123-130 — before extracting anything, compare `sea-orm-macros/src/derives/into_active_model.rs` and `sea-orm-macros/src/derives/partial_model.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 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 (7 lines × 3) sea-orm-sync/src/database/transaction.rs:582 — sea-orm-sync/src/database/transaction.rs:582-588 | sea-orm-sync/src/database/transaction.rs:593-599 | sea-orm-sync/src/database/transaction.rs:604-610 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7 lines × 3) sea-orm-sync/src/driver/sqlx_mysql.rs:263 — sea-orm-sync/src/driver/sqlx_mysql.rs:263-269 | sea-orm-sync/src/driver/sqlx_postgres.rs:298-304 | sea-orm-sync/src/driver/sqlx_sqlite.rs:285-291 — before extracting anything, compare `sea-orm-sync/src/driver/sqlx_mysql.rs` and `sea-orm-sync/src/driver/sqlx_postgres.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 135 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 (7 lines × 3) src/database/restricted_connection.rs:360 — src/database/restricted_connection.rs:360-366 | src/database/restricted_connection.rs:442-448 | src/database/transaction.rs:775-781 — 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 (7 lines × 3) src/driver/sqlx_mysql.rs:270 — src/driver/sqlx_mysql.rs:270-276 | src/driver/sqlx_postgres.rs:309-315 | src/driver/sqlx_sqlite.rs:292-298 — before extracting anything, compare `src/driver/sqlx_mysql.rs` and `src/driver/sqlx_postgres.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 134 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 (7 lines × 3) sea-orm-macros/src/derives/active_enum.rs:138 — sea-orm-macros/src/derives/active_enum.rs:138-144 | sea-orm-macros/src/derives/active_model.rs:42-48 | sea-orm-macros/src/derives/derive_iden.rs:112-118 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
D1 · Cyclomatic Complexity · sea_orm_macros · ×7
  • sea_orm_macros::derives::entity_model::expand_derive_entity_model (cyclomatic 87) sea-orm-macros/src/derives/entity_model.rs:59 — sea_orm_macros::derives::entity_model::expand_derive_entity_model has cyclomatic complexity 87 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • sea_orm_macros::derives::arrow_schema::column_type_to_arrow_datatype (cyclomatic 40) sea-orm-macros/src/derives/arrow_schema.rs:174 — sea_orm_macros::derives::arrow_schema::column_type_to_arrow_datatype has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • sea_orm_macros::derives::value_type_match::column_type_wrapper (cyclomatic 38) sea-orm-macros/src/derives/value_type_match.rs:23 — sea_orm_macros::derives::value_type_match::column_type_wrapper has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • sea_orm_macros::derives::arrow_schema::rust_type_to_arrow_datatype (cyclomatic 27) sea-orm-macros/src/derives/arrow_schema.rs:289 — sea_orm_macros::derives::arrow_schema::rust_type_to_arrow_datatype 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.
  • sea_orm_macros::derives::model_ex::expand_sea_orm_model (cyclomatic 25) sea-orm-macros/src/derives/model_ex.rs:21 — sea_orm_macros::derives::model_ex::expand_sea_orm_model has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • sea_orm_macros::derives::arrow_schema::expand_derive_arrow_schema (cyclomatic 21) sea-orm-macros/src/derives/arrow_schema.rs:6 — sea_orm_macros::derives::arrow_schema::expand_derive_arrow_schema has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • sea_orm_macros::derives::typed_column::expand_typed_column (cyclomatic 17) sea-orm-macros/src/derives/typed_column.rs:10 — sea_orm_macros::derives::typed_column::expand_typed_column has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×7
  • Duplicated block (19 lines × 2) sea-orm-sync/src/database/mock.rs:133 — sea-orm-sync/src/database/mock.rs:133-151 | src/database/mock.rs:133-151 — before extracting anything, compare `sea-orm-sync/src/database/mock.rs` and `src/database/mock.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 140 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 (19 lines × 2) sea-orm-sync/src/executor/consolidate.rs:299 — sea-orm-sync/src/executor/consolidate.rs:299-317 | src/executor/consolidate.rs:299-317 — before extracting anything, compare `sea-orm-sync/src/executor/consolidate.rs` and `src/executor/consolidate.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 244 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 (19 lines × 2) sea-orm-sync/src/query/util.rs:13 — sea-orm-sync/src/query/util.rs:13-31 | src/query/util.rs:13-31 — before extracting anything, compare `sea-orm-sync/src/query/util.rs` and `src/query/util.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 179 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 (19 lines × 2) sea-orm-sync/src/schema/builder.rs:160 — sea-orm-sync/src/schema/builder.rs:160-178 | src/schema/builder.rs:163-181 — before extracting anything, compare `sea-orm-sync/src/schema/builder.rs` and `src/schema/builder.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 428 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 (19 lines × 2) sea-orm-sync/src/schema/topology.rs:212 — sea-orm-sync/src/schema/topology.rs:212-230 | src/schema/topology.rs:212-230 — before extracting anything, compare `sea-orm-sync/src/schema/topology.rs` and `src/schema/topology.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 95 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 (19 lines × 2) sea-orm-sync/src/query/debug.rs:22 — sea-orm-sync/src/query/debug.rs:22-40 | src/query/debug.rs:22-40 — 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 (19 lines × 2) sea-orm-sync/src/value/with_time.rs:36 — sea-orm-sync/src/value/with_time.rs:36-54 | src/value/with_time.rs:36-54 — 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 · Duplicated block (6 lines × 4) · ×7
  • Duplicated block (6 lines × 4) sea-orm-sync/src/database/transaction.rs:225 — sea-orm-sync/src/database/transaction.rs:225-230 | sea-orm-sync/src/database/transaction.rs:279-284 | src/database/transaction.rs:247-252 | src/database/transaction.rs:304-309 — before extracting anything, compare `sea-orm-sync/src/database/transaction.rs` and `src/database/transaction.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 222 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 (6 lines × 4) sea-orm-sync/src/database/transaction.rs:526 — sea-orm-sync/src/database/transaction.rs:526-531 | sea-orm-sync/src/database/transaction.rs:587-592 | src/database/transaction.rs:559-564 | src/database/transaction.rs:621-626 — before extracting anything, compare `sea-orm-sync/src/database/transaction.rs` and `src/database/transaction.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 222 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 (6 lines × 4) sea-orm-sync/src/database/transaction.rs:536 — sea-orm-sync/src/database/transaction.rs:536-541 | sea-orm-sync/src/database/transaction.rs:598-603 | src/database/transaction.rs:569-574 | src/database/transaction.rs:633-638 — before extracting anything, compare `sea-orm-sync/src/database/transaction.rs` and `src/database/transaction.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 222 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 (6 lines × 4) sea-orm-sync/src/driver/rusqlite.rs:366 — sea-orm-sync/src/driver/rusqlite.rs:366-371 | sea-orm-sync/src/driver/rusqlite.rs:391-396 | src/driver/rusqlite.rs:366-371 | src/driver/rusqlite.rs:391-396 — before extracting anything, compare `sea-orm-sync/src/driver/rusqlite.rs` and `src/driver/rusqlite.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 358 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 (6 lines × 4) sea-orm-sync/src/entity/active_model_ex.rs:187 — sea-orm-sync/src/entity/active_model_ex.rs:187-192 | sea-orm-sync/src/entity/active_model_ex.rs:253-258 | src/entity/active_model_ex.rs:187-192 | src/entity/active_model_ex.rs:253-258 — before extracting anything, compare `sea-orm-sync/src/entity/active_model_ex.rs` and `src/entity/active_model_ex.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 134 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 (6 lines × 4) sea-orm-sync/src/executor/select.rs:643 — sea-orm-sync/src/executor/select.rs:643-648 | sea-orm-sync/src/executor/select.rs:779-784 | src/executor/select.rs:654-659 | src/executor/select.rs:790-795 — there are 4 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 4 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (6 lines × 4) sea-orm-sync/src/query/loader.rs:1437 — sea-orm-sync/src/query/loader.rs:1437-1442 | sea-orm-sync/src/query/util.rs:247-252 | src/query/loader.rs:1525-1530 | src/query/util.rs:247-252 — before extracting anything, compare `sea-orm-sync/src/query/loader.rs` and `src/query/loader.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 254 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.
D4 · Code Duplication · Duplicated block (35 lines × 2) · ×6
  • Duplicated block (35 lines × 2) sea-orm-sync/src/database/transaction.rs:326 — sea-orm-sync/src/database/transaction.rs:326-360 | src/database/transaction.rs:354-388 — before extracting anything, compare `sea-orm-sync/src/database/transaction.rs` and `src/database/transaction.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 222 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 (35 lines × 2) sea-orm-sync/src/driver/sqlx_postgres.rs:68 — sea-orm-sync/src/driver/sqlx_postgres.rs:68-102 | src/driver/sqlx_postgres.rs:68-102 — before extracting anything, compare `sea-orm-sync/src/driver/sqlx_postgres.rs` and `src/driver/sqlx_postgres.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 139 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 (35 lines × 2) sea-orm-sync/src/entity/active_model.rs:630 — sea-orm-sync/src/entity/active_model.rs:630-664 | src/entity/active_model.rs:638-672 — before extracting anything, compare `sea-orm-sync/src/entity/active_model.rs` and `src/entity/active_model.rs` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 431 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 (35 lines × 2) sea-orm-sync/src/executor/consolidate.rs:246 — sea-orm-sync/src/executor/consolidate.rs:246-280 | src/executor/consolidate.rs:246-280 — before extracting anything, compare `sea-orm-sync/src/executor/consolidate.rs` and `src/executor/consolidate.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 244 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 (35 lines × 2) sea-orm-sync/src/executor/cursor.rs:245 — sea-orm-sync/src/executor/cursor.rs:245-279 | src/executor/cursor.rs:245-279 — before extracting anything, compare `sea-orm-sync/src/executor/cursor.rs` and `src/executor/cursor.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 217 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 (35 lines × 2) sea-orm-sync/src/rbac/engine/mod.rs:169 — sea-orm-sync/src/rbac/engine/mod.rs:169-203 | src/rbac/engine/mod.rs:169-203 — before extracting anything, compare `sea-orm-sync/src/rbac/engine/mod.rs` and `src/rbac/engine/mod.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 246 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.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×6
  • Duplicated block (24 lines × 2) sea-orm-sync/src/database/proxy.rs:67 — sea-orm-sync/src/database/proxy.rs:67-90 | src/database/proxy.rs:68-91 — before extracting anything, compare `sea-orm-sync/src/database/proxy.rs` and `src/database/proxy.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 54 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 (24 lines × 2) sea-orm-sync/src/entity/identity.rs:117 — sea-orm-sync/src/entity/identity.rs:117-140 | src/entity/identity.rs:117-140 — before extracting anything, compare `sea-orm-sync/src/entity/identity.rs` and `src/entity/identity.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 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 (24 lines × 2) sea-orm-sync/src/entity/identity.rs:147 — sea-orm-sync/src/entity/identity.rs:147-170 | src/entity/identity.rs:147-170 — before extracting anything, compare `sea-orm-sync/src/entity/identity.rs` and `src/entity/identity.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 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 (24 lines × 2) sea-orm-sync/src/executor/consolidate.rs:161 — sea-orm-sync/src/executor/consolidate.rs:161-184 | src/executor/consolidate.rs:161-184 — before extracting anything, compare `sea-orm-sync/src/executor/consolidate.rs` and `src/executor/consolidate.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 244 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 (24 lines × 2) sea-orm-sync/src/executor/consolidate.rs:323 — sea-orm-sync/src/executor/consolidate.rs:323-346 | src/executor/consolidate.rs:323-346 — before extracting anything, compare `sea-orm-sync/src/executor/consolidate.rs` and `src/executor/consolidate.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 244 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 (24 lines × 2) sea-orm-sync/src/executor/consolidate.rs:378 — sea-orm-sync/src/executor/consolidate.rs:378-401 | src/executor/consolidate.rs:378-401 — before extracting anything, compare `sea-orm-sync/src/executor/consolidate.rs` and `src/executor/consolidate.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 244 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.
D15 · Churn × Complexity Hotspots · Hotspot · ×5
  • Hotspot: src/schema/builder.rs src/schema/builder.rs:394 — src/schema/builder.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in EntitySchemaInfo::sync at line 394. 2 of those changes were fix/bug commits, and the other 2 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-29..2026-09-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-29 16:54:53 +01:00' --until='2026-09-27 16:54:53 +01:00' --full-history --no-merges -- src/schema/builder.rs`: 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: sea-orm-macros/src/derives/active_model_ex.rs sea-orm-macros/src/derives/active_model_ex.rs:34 — sea-orm-macros/src/derives/active_model_ex.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in RelationAttr::from_attr at line 34. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-29..2026-09-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-29 16:54:53 +01:00' --until='2026-09-27 16:54:53 +01:00' --full-history --no-merges -- sea-orm-macros/src/derives/active_model_ex.rs`: 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: sea-orm-macros/src/derives/model_ex.rs sea-orm-macros/src/derives/model_ex.rs:21 — sea-orm-macros/src/derives/model_ex.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in sea_orm_macros::derives::model_ex::expand_sea_orm_model at line 21. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-29..2026-09-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-29 16:54:53 +01:00' --until='2026-09-27 16:54:53 +01:00' --full-history --no-merges -- sea-orm-macros/src/derives/model_ex.rs`: 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: sea-orm-sync/src/schema/builder.rs sea-orm-sync/src/schema/builder.rs:390 — sea-orm-sync/src/schema/builder.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in EntitySchemaInfo::sync at line 390. 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-29..2026-09-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-29 16:54:53 +01:00' --until='2026-09-27 16:54:53 +01:00' --full-history --no-merges -- sea-orm-sync/src/schema/builder.rs`: 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: sea-orm-cli/src/commands/generate.rs sea-orm-cli/src/commands/generate.rs:116 — sea-orm-cli/src/commands/generate.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in sea_orm_cli::commands::generate::run_generate_command at line 116. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-29..2026-09-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-29 16:54:53 +01:00' --until='2026-09-27 16:54:53 +01:00' --full-history --no-merges -- sea-orm-cli/src/commands/generate.rs`: 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.
D3 · God Classes · TooManyMethods · ×5
  • TooManyMethods: ConnectOptions sea-orm-sync/src/database/mod.rs:81 — TooManyMethods — 45 methods, declared across 2 files: database/mod.rs (43), driver/sqlx_common.rs (2). The bar is 30 methods; this is 15 over it, 1.50× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: ConnectOptions src/database/mod.rs:95 — TooManyMethods — 45 methods, declared across 2 files: database/mod.rs (43), driver/sqlx_common.rs (2). The bar is 30 methods; this is 15 over it, 1.50× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: EntityWriter sea-orm-codegen/src/entity/writer.rs:26 — TooManyMethods — 41 methods, declared across 6 files: entity/writer.rs (29), writer/compact.rs (3), writer/dense.rs (3), writer/frontend.rs (3), +2 more file(s). The bar is 30 methods; this is 11 over it, 1.37× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: Select sea-orm-sync/src/query/select.rs:15 — TooManyMethods — 39 methods, declared across 6 files: query/join.rs (13), executor/select.rs (11), query/select.rs (8), query/combine.rs (5), +2 more file(s). The bar is 30 methods; this is 9 over it, 1.30× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: Select src/query/select.rs:15 — TooManyMethods — 39 methods, declared across 6 files: query/join.rs (13), executor/select.rs (11), query/select.rs (8), query/combine.rs (5), +2 more file(s). The bar is 30 methods; this is 9 over it, 1.30× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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.
D31 · IaC & Container Security · Medium IaC · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×5
  • Duplicated block (8 lines × 3) sea-orm-macros/src/derives/entity_loader.rs:440 — sea-orm-macros/src/derives/entity_loader.rs:440-447 | sea-orm-macros/src/derives/entity_loader.rs:504-511 | sea-orm-macros/src/derives/entity_loader.rs:604-611 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 3) sea-orm-macros/src/derives/into_active_model.rs:65 — sea-orm-macros/src/derives/into_active_model.rs:65-77 | sea-orm-macros/src/derives/partial_model.rs:76-83 | sea-orm-macros/src/derives/partial_model.rs:121-129 — before extracting anything, compare `sea-orm-macros/src/derives/into_active_model.rs` and `sea-orm-macros/src/derives/partial_model.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 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 (8 lines × 3) sea-orm-sync/src/driver/sqlx_mysql.rs:158 — sea-orm-sync/src/driver/sqlx_mysql.rs:158-165 | sea-orm-sync/src/driver/sqlx_postgres.rs:193-200 | sea-orm-sync/src/driver/sqlx_sqlite.rs:177-184 — before extracting anything, compare `sea-orm-sync/src/driver/sqlx_mysql.rs` and `sea-orm-sync/src/driver/sqlx_postgres.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 135 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 (8 lines × 3) src/database/transaction.rs:615 — src/database/transaction.rs:615-622 | src/database/transaction.rs:627-634 | src/database/transaction.rs:639-646 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 3) sea-orm-macros/src/derives/model_ex.rs:825 — sea-orm-macros/src/derives/model_ex.rs:825-832 | sea-orm-macros/src/derives/model_ex.rs:996-1003 | sea-orm-macros/src/derives/model_ex.rs:1202-1209 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×5
  • Duplicated block (5 lines × 3) sea-orm-sync/src/driver/sqlx_mysql.rs:170 — sea-orm-sync/src/driver/sqlx_mysql.rs:170-174 | sea-orm-sync/src/driver/sqlx_postgres.rs:205-209 | sea-orm-sync/src/driver/sqlx_sqlite.rs:189-193 — before extracting anything, compare `sea-orm-sync/src/driver/sqlx_mysql.rs` and `sea-orm-sync/src/driver/sqlx_postgres.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 135 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 (5 lines × 3) sea-orm-sync/src/driver/sqlx_mysql.rs:188 — sea-orm-sync/src/driver/sqlx_mysql.rs:188-192 | sea-orm-sync/src/driver/sqlx_postgres.rs:223-227 | sea-orm-sync/src/driver/sqlx_sqlite.rs:207-211 — before extracting anything, compare `sea-orm-sync/src/driver/sqlx_mysql.rs` and `sea-orm-sync/src/driver/sqlx_postgres.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 135 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 (5 lines × 3) src/driver/sqlx_mysql.rs:162 — src/driver/sqlx_mysql.rs:162-166 | src/driver/sqlx_postgres.rs:201-205 | src/driver/sqlx_sqlite.rs:181-185 — before extracting anything, compare `src/driver/sqlx_mysql.rs` and `src/driver/sqlx_postgres.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 134 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 (5 lines × 3) src/driver/sqlx_mysql.rs:171 — src/driver/sqlx_mysql.rs:171-175 | src/driver/sqlx_postgres.rs:210-214 | src/driver/sqlx_sqlite.rs:190-194 — before extracting anything, compare `src/driver/sqlx_mysql.rs` and `src/driver/sqlx_postgres.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 134 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 (5 lines × 3) src/driver/sqlx_mysql.rs:189 — src/driver/sqlx_mysql.rs:189-193 | src/driver/sqlx_postgres.rs:228-232 | src/driver/sqlx_sqlite.rs:208-212 — before extracting anything, compare `src/driver/sqlx_mysql.rs` and `src/driver/sqlx_postgres.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 134 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.
D17 · Explicit Debt · FixmeComment · ×4
  • FixmeComment sea-orm-sync/tests/json_struct_tests.rs:172 — // FIXME how can we abstract this? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment sea-orm-sync/tests/json_struct_tests.rs:204 — // FIXME how can we abstract this? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment tests/json_struct_tests.rs:179 — // FIXME how can we abstract this? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment tests/json_struct_tests.rs:213 — // FIXME how can we abstract this? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D4 · Code Duplication · Duplicated block (40 lines × 2) · ×4
  • Duplicated block (40 lines × 2) sea-orm-sync/src/driver/sqlx_mysql.rs:68 — sea-orm-sync/src/driver/sqlx_mysql.rs:68-107 | src/driver/sqlx_mysql.rs:68-107 — before extracting anything, compare `sea-orm-sync/src/driver/sqlx_mysql.rs` and `src/driver/sqlx_mysql.rs` as WHOLE FILES: this scan already matched 8 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. 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 (40 lines × 2) sea-orm-sync/src/entity/active_model.rs:1252 — sea-orm-sync/src/entity/active_model.rs:1252-1291 | src/entity/active_model.rs:1264-1303 — before extracting anything, compare `sea-orm-sync/src/entity/active_model.rs` and `src/entity/active_model.rs` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 431 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 (40 lines × 2) sea-orm-sync/src/rbac/engine/mod.rs:92 — sea-orm-sync/src/rbac/engine/mod.rs:92-131 | src/rbac/engine/mod.rs:92-131 — before extracting anything, compare `sea-orm-sync/src/rbac/engine/mod.rs` and `src/rbac/engine/mod.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 246 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 (40 lines × 2) sea-orm-sync/src/rbac/engine/resource_request.rs:16 — sea-orm-sync/src/rbac/engine/resource_request.rs:16-55 | src/rbac/engine/resource_request.rs:16-55 — 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 · Duplicated block (32 lines × 2) · ×4
  • Duplicated block (32 lines × 2) sea-orm-sync/src/entity/active_model.rs:85 — sea-orm-sync/src/entity/active_model.rs:85-116 | src/entity/active_model.rs:86-117 — before extracting anything, compare `sea-orm-sync/src/entity/active_model.rs` and `src/entity/active_model.rs` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 431 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 (32 lines × 2) sea-orm-sync/src/entity/model.rs:86 — sea-orm-sync/src/entity/model.rs:86-117 | src/entity/model.rs:87-118 — 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 (32 lines × 2) sea-orm-sync/src/entity/with_arrow.rs:8 — sea-orm-sync/src/entity/with_arrow.rs:8-39 | src/entity/with_arrow.rs:8-39 — 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 (32 lines × 2) sea-orm-sync/src/query/traits.rs:25 — sea-orm-sync/src/query/traits.rs:25-56 | src/query/traits.rs:25-56 — 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 · Duplicated block (29 lines × 2) · ×4
  • Duplicated block (29 lines × 2) sea-orm-macros/src/derives/model_ex.rs:702 — sea-orm-macros/src/derives/model_ex.rs:702-730 | sea-orm-macros/src/derives/model_ex.rs:927-955 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (29 lines × 2) sea-orm-sync/src/executor/cursor.rs:486 — sea-orm-sync/src/executor/cursor.rs:486-514 | src/executor/cursor.rs:486-514 — before extracting anything, compare `sea-orm-sync/src/executor/cursor.rs` and `src/executor/cursor.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 217 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 (29 lines × 2) sea-orm-sync/src/rbac/engine/mod.rs:228 — sea-orm-sync/src/rbac/engine/mod.rs:228-256 | src/rbac/engine/mod.rs:228-256 — before extracting anything, compare `sea-orm-sync/src/rbac/engine/mod.rs` and `src/rbac/engine/mod.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 246 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 (29 lines × 2) sea-orm-sync/src/schema/entity.rs:208 — sea-orm-sync/src/schema/entity.rs:208-236 | src/schema/entity.rs:208-236 — before extracting anything, compare `sea-orm-sync/src/schema/entity.rs` and `src/schema/entity.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 153 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.
D4 · Code Duplication · Duplicated block (28 lines × 2) · ×4
  • Duplicated block (28 lines × 2) sea-orm-sync/src/database/restricted_connection.rs:490 — sea-orm-sync/src/database/restricted_connection.rs:490-517 | src/database/restricted_connection.rs:531-558 — before extracting anything, compare `sea-orm-sync/src/database/restricted_connection.rs` and `src/database/restricted_connection.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 69 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 (28 lines × 2) sea-orm-sync/src/entity/link.rs:39 — sea-orm-sync/src/entity/link.rs:39-66 | src/entity/link.rs:39-66 — 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 (28 lines × 2) sea-orm-sync/src/schema/builder.rs:215 — sea-orm-sync/src/schema/builder.rs:215-242 | src/schema/builder.rs:219-246 — before extracting anything, compare `sea-orm-sync/src/schema/builder.rs` and `src/schema/builder.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 428 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 (28 lines × 2) sea-orm-sync/src/driver/sqlite.rs:5 — sea-orm-sync/src/driver/sqlite.rs:5-32 | src/driver/sqlite.rs:5-32 — 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 · Duplicated block (25 lines × 2) · ×4
  • Duplicated block (25 lines × 2) sea-orm-sync/src/driver/sqlx_postgres.rs:107 — sea-orm-sync/src/driver/sqlx_postgres.rs:107-131 | src/driver/sqlx_postgres.rs:107-131 — before extracting anything, compare `sea-orm-sync/src/driver/sqlx_postgres.rs` and `src/driver/sqlx_postgres.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 139 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) sea-orm-sync/src/executor/consolidate.rs:427 — sea-orm-sync/src/executor/consolidate.rs:427-451 | src/executor/consolidate.rs:427-451 — before extracting anything, compare `sea-orm-sync/src/executor/consolidate.rs` and `src/executor/consolidate.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 244 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) sea-orm-sync/src/schema/topology.rs:100 — sea-orm-sync/src/schema/topology.rs:100-124 | src/schema/topology.rs:100-124 — before extracting anything, compare `sea-orm-sync/src/schema/topology.rs` and `src/schema/topology.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 95 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) sea-orm-sync/src/rbac/engine/role_hierarchy_impl.rs:37 — sea-orm-sync/src/rbac/engine/role_hierarchy_impl.rs:37-61 | src/rbac/engine/role_hierarchy_impl.rs:37-61 — before extracting anything, compare `sea-orm-sync/src/rbac/engine/role_hierarchy_impl.rs` and `src/rbac/engine/role_hierarchy_impl.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 59 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.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×4
  • Duplicated block (22 lines × 2) sea-orm-macros/src/derives/model_ex.rs:910 — sea-orm-macros/src/derives/model_ex.rs:910-931 | sea-orm-macros/src/derives/model_ex.rs:1058-1079 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (22 lines × 2) sea-orm-sync/src/database/mock.rs:155 — sea-orm-sync/src/database/mock.rs:155-176 | src/database/mock.rs:155-176 — before extracting anything, compare `sea-orm-sync/src/database/mock.rs` and `src/database/mock.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 140 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 × 2) sea-orm-sync/src/entity/active_model.rs:994 — sea-orm-sync/src/entity/active_model.rs:994-1015 | src/entity/active_model.rs:1003-1024 — before extracting anything, compare `sea-orm-sync/src/entity/active_model.rs` and `src/entity/active_model.rs` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 431 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 × 2) sea-orm-sync/src/query/delete.rs:108 — sea-orm-sync/src/query/delete.rs:108-129 | src/query/delete.rs:108-129 — before extracting anything, compare `sea-orm-sync/src/query/delete.rs` and `src/query/delete.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 64 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.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×4
  • Duplicated block (21 lines × 2) sea-orm-sync/src/database/mod.rs:208 — sea-orm-sync/src/database/mod.rs:208-228 | src/database/mod.rs:224-244 — before extracting anything, compare `sea-orm-sync/src/database/mod.rs` and `src/database/mod.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 79 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) sea-orm-sync/src/driver/rusqlite.rs:292 — sea-orm-sync/src/driver/rusqlite.rs:292-312 | src/driver/rusqlite.rs:292-312 — before extracting anything, compare `sea-orm-sync/src/driver/rusqlite.rs` and `src/driver/rusqlite.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 358 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) sea-orm-sync/src/entity/active_model.rs:463 — sea-orm-sync/src/entity/active_model.rs:463-483 | src/entity/active_model.rs:471-491 — before extracting anything, compare `sea-orm-sync/src/entity/active_model.rs` and `src/entity/active_model.rs` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 431 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) sea-orm-sync/src/schema/json.rs:18 — sea-orm-sync/src/schema/json.rs:18-38 | src/schema/json.rs:18-38 — before extracting anything, compare `sea-orm-sync/src/schema/json.rs` and `src/schema/json.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 81 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.
D4 · Code Duplication · Duplicated block (11 lines × 4) · ×4
  • Duplicated block (11 lines × 4) sea-orm-sync/src/driver/rusqlite.rs:376 — sea-orm-sync/src/driver/rusqlite.rs:376-386 | sea-orm-sync/src/driver/rusqlite.rs:548-558 | src/driver/rusqlite.rs:376-386 | src/driver/rusqlite.rs:548-558 — before extracting anything, compare `sea-orm-sync/src/driver/rusqlite.rs` and `src/driver/rusqlite.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 358 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 (11 lines × 4) sea-orm-sync/src/driver/rusqlite.rs:401 — sea-orm-sync/src/driver/rusqlite.rs:401-411 | sea-orm-sync/src/driver/rusqlite.rs:575-585 | src/driver/rusqlite.rs:401-411 | src/driver/rusqlite.rs:575-585 — before extracting anything, compare `sea-orm-sync/src/driver/rusqlite.rs` and `src/driver/rusqlite.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 358 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 (11 lines × 4) sea-orm-sync/src/driver/sqlx_mysql.rs:313 — sea-orm-sync/src/driver/sqlx_mysql.rs:313-323 | sea-orm-sync/src/driver/sqlx_postgres.rs:348-358 | src/driver/sqlx_mysql.rs:320-330 | src/driver/sqlx_postgres.rs:359-369 — before extracting anything, compare `sea-orm-sync/src/driver/sqlx_mysql.rs` and `sea-orm-sync/src/driver/sqlx_postgres.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 135 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 (11 lines × 4) sea-orm-sync/src/schema/builder.rs:104 — sea-orm-sync/src/schema/builder.rs:104-114 | sea-orm-sync/src/schema/builder.rs:142-152 | src/schema/builder.rs:106-116 | src/schema/builder.rs:145-155 — before extracting anything, compare `sea-orm-sync/src/schema/builder.rs` and `src/schema/builder.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 428 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.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×4
  • Duplicated block (11 lines × 3) sea-orm-sync/src/database/db_connection.rs:352 — sea-orm-sync/src/database/db_connection.rs:352-362 | sea-orm-sync/src/database/db_connection.rs:387-397 | sea-orm-sync/src/database/db_connection.rs:425-435 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (11 lines × 3) sea-orm-sync/src/driver/sqlx_mysql.rs:143 — sea-orm-sync/src/driver/sqlx_mysql.rs:143-153 | sea-orm-sync/src/driver/sqlx_postgres.rs:178-188 | sea-orm-sync/src/driver/sqlx_sqlite.rs:162-172 — before extracting anything, compare `sea-orm-sync/src/driver/sqlx_mysql.rs` and `sea-orm-sync/src/driver/sqlx_postgres.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 135 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 (11 lines × 3) src/database/db_connection.rs:382 — src/database/db_connection.rs:382-392 | src/database/db_connection.rs:417-427 | src/database/db_connection.rs:456-466 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (11 lines × 3) src/driver/sqlx_mysql.rs:144 — src/driver/sqlx_mysql.rs:144-154 | src/driver/sqlx_postgres.rs:183-193 | src/driver/sqlx_sqlite.rs:163-173 — before extracting anything, compare `src/driver/sqlx_mysql.rs` and `src/driver/sqlx_postgres.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 134 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.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×4
  • Duplicated block (5 lines × 4) sea-orm-sync/src/driver/rusqlite.rs:372 — sea-orm-sync/src/driver/rusqlite.rs:372-376 | sea-orm-sync/src/driver/rusqlite.rs:397-401 | src/driver/rusqlite.rs:372-376 | src/driver/rusqlite.rs:397-401 — before extracting anything, compare `sea-orm-sync/src/driver/rusqlite.rs` and `src/driver/rusqlite.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 358 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 (5 lines × 4) sea-orm-sync/src/driver/rusqlite.rs:539 — sea-orm-sync/src/driver/rusqlite.rs:539-543 | sea-orm-sync/src/driver/rusqlite.rs:566-570 | src/driver/rusqlite.rs:539-543 | src/driver/rusqlite.rs:566-570 — before extracting anything, compare `sea-orm-sync/src/driver/rusqlite.rs` and `src/driver/rusqlite.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 358 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 (5 lines × 4) sea-orm-sync/src/driver/rusqlite.rs:544 — sea-orm-sync/src/driver/rusqlite.rs:544-548 | sea-orm-sync/src/driver/rusqlite.rs:571-575 | src/driver/rusqlite.rs:544-548 | src/driver/rusqlite.rs:571-575 — before extracting anything, compare `sea-orm-sync/src/driver/rusqlite.rs` and `src/driver/rusqlite.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 358 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 (5 lines × 4) sea-orm-sync/src/entity/column.rs:438 — sea-orm-sync/src/entity/column.rs:438-442 | sea-orm-sync/src/entity/column.rs:475-479 | src/entity/column.rs:438-442 | src/entity/column.rs:475-479 — before extracting anything, compare `sea-orm-sync/src/entity/column.rs` and `src/entity/column.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 92 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.
D2 · Cognitive Complexity · sea_orm_sync · ×3
  • sea_orm_sync::entity::active_model::establish_links (cognitive 55) sea-orm-sync/src/entity/active_model.rs:1210 — sea_orm_sync::entity::active_model::establish_links has cognitive complexity 55 (threshold 15). Drivers by points: if/else 15 (28 pts), loops 9 (25 pts), boolean chains 2 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • sea_orm_sync::schema::entity::column_def_from_entity_column (cognitive 18) sea-orm-sync/src/schema/entity.rs:238 — sea_orm_sync::schema::entity::column_def_from_entity_column has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 3 (4 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • sea_orm_sync::executor::consolidate::consolidate_query_result_of_ordered_rows (cognitive 16) sea-orm-sync/src/executor/consolidate.rs:419 — sea_orm_sync::executor::consolidate::consolidate_query_result_of_ordered_rows has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 2 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sea_orm · ×3
  • sea_orm::entity::active_model::establish_links (cognitive 55) src/entity/active_model.rs:1221 — sea_orm::entity::active_model::establish_links has cognitive complexity 55 (threshold 15). Drivers by points: if/else 15 (28 pts), loops 9 (25 pts), boolean chains 2 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • sea_orm::schema::entity::column_def_from_entity_column (cognitive 18) src/schema/entity.rs:238 — sea_orm::schema::entity::column_def_from_entity_column has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 3 (4 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • sea_orm::executor::consolidate::consolidate_query_result_of_ordered_rows (cognitive 16) src/executor/consolidate.rs:419 — sea_orm::executor::consolidate::consolidate_query_result_of_ordered_rows has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 2 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sea_orm_codegen · ×3
  • sea_orm_codegen::merge::merge_derives (cognitive 28) sea-orm-codegen/src/merge/mod.rs:265 — sea_orm_codegen::merge::merge_derives has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 4 (9 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • sea_orm_codegen::merge::render_file_with_spacing (cognitive 27) sea-orm-codegen/src/merge/mod.rs:443 — sea_orm_codegen::merge::render_file_with_spacing has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 3, loops 1 (nesting depth added 8). Of this number, 22 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • sea_orm_codegen::merge::merge_item_attributes (cognitive 19) sea-orm-codegen/src/merge/mod.rs:223 — sea_orm_codegen::merge::merge_item_attributes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EntityWriter · ×3
  • EntityWriter::gen_dense_model_struct (cognitive 21) sea-orm-codegen/src/entity/writer/dense.rs:182 — EntityWriter::gen_dense_model_struct has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 3 (4 pts), match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • EntityWriter::gen_import_active_enum (cognitive 19) sea-orm-codegen/src/entity/writer.rs:615 — EntityWriter::gen_import_active_enum has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • EntityWriter::gen_compact_model_struct (cognitive 16) sea-orm-codegen/src/entity/writer/compact.rs:48 — EntityWriter::gen_compact_model_struct has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (36 lines × 2) · ×3
  • Duplicated block (36 lines × 2) sea-orm-sync/src/entity/base_entity.rs:337 — sea-orm-sync/src/entity/base_entity.rs:337-372 | src/entity/base_entity.rs:340-375 — before extracting anything, compare `sea-orm-sync/src/entity/base_entity.rs` and `src/entity/base_entity.rs` as WHOLE FILES: this scan already matched 4 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.
  • Duplicated block (36 lines × 2) sea-orm-sync/src/query/insert.rs:92 — sea-orm-sync/src/query/insert.rs:92-127 | src/query/insert.rs:92-127 — before extracting anything, compare `sea-orm-sync/src/query/insert.rs` and `src/query/insert.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 162 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 (36 lines × 2) sea-orm-sync/src/query/loader.rs:1178 — sea-orm-sync/src/query/loader.rs:1178-1213 | src/query/loader.rs:1266-1301 — before extracting anything, compare `sea-orm-sync/src/query/loader.rs` and `src/query/loader.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 254 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.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×3
  • Duplicated block (26 lines × 2) sea-orm-sync/src/entity/registry.rs:32 — sea-orm-sync/src/entity/registry.rs:32-57 | src/entity/registry.rs:32-57 — 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 (26 lines × 2) sea-orm-sync/src/database/sea_schema_rusqlite.rs:36 — sea-orm-sync/src/database/sea_schema_rusqlite.rs:36-61 | src/database/sea_schema_rusqlite.rs:36-61 — 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 (26 lines × 2) sea-orm-sync/src/value.rs:104 — sea-orm-sync/src/value.rs:104-129 | src/value.rs:104-129 — 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 · Duplicated block (23 lines × 2) · ×3
  • Duplicated block (23 lines × 2) sea-orm-sync/src/executor/query.rs:104 — sea-orm-sync/src/executor/query.rs:104-126 | src/executor/query.rs:104-126 — before extracting anything, compare `sea-orm-sync/src/executor/query.rs` and `src/executor/query.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 180 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 (23 lines × 2) sea-orm-sync/src/schema/builder.rs:191 — sea-orm-sync/src/schema/builder.rs:191-213 | src/schema/builder.rs:195-217 — before extracting anything, compare `sea-orm-sync/src/schema/builder.rs` and `src/schema/builder.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 428 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 (23 lines × 2) sea-orm-sync/src/tests_cfg/filling.rs:34 — sea-orm-sync/src/tests_cfg/filling.rs:34-56 | src/tests_cfg/filling.rs:34-56 — 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 · Duplicated block (11–12 lines × 2) · ×3
  • Duplicated block (11–12 lines × 2) sea-orm-sync/src/database/transaction.rs:95 — sea-orm-sync/src/database/transaction.rs:95-105 | src/database/transaction.rs:102-113 — before extracting anything, compare `sea-orm-sync/src/database/transaction.rs` and `src/database/transaction.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 222 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 (11–12 lines × 2) sea-orm-sync/src/executor/insert.rs:499 — sea-orm-sync/src/executor/insert.rs:499-509 | src/executor/insert.rs:510-521 — before extracting anything, compare `sea-orm-sync/src/executor/insert.rs` and `src/executor/insert.rs` as WHOLE FILES: this scan already matched 8 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 (11–12 lines × 2) sea-orm-sync/src/rbac/context.rs:103 — sea-orm-sync/src/rbac/context.rs:103-113 | src/rbac/context.rs:109-120 — before extracting anything, compare `sea-orm-sync/src/rbac/context.rs` and `src/rbac/context.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 58 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.
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×3
  • Duplicated block (10 lines × 4) sea-orm-sync/src/database/stream/query.rs:105 — sea-orm-sync/src/database/stream/query.rs:105-114 | sea-orm-sync/src/database/stream/transaction.rs:98-107 | src/database/stream/query.rs:107-116 | src/database/stream/transaction.rs:99-108 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times.
  • Duplicated block (10 lines × 4) sea-orm-sync/src/driver/rusqlite.rs:335 — sea-orm-sync/src/driver/rusqlite.rs:335-344 | sea-orm-sync/src/driver/rusqlite.rs:507-516 | src/driver/rusqlite.rs:335-344 | src/driver/rusqlite.rs:507-516 — before extracting anything, compare `sea-orm-sync/src/driver/rusqlite.rs` and `src/driver/rusqlite.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 358 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 (10 lines × 4) sea-orm-sync/src/executor/select.rs:906 — sea-orm-sync/src/executor/select.rs:906-915 | sea-orm-sync/src/executor/select.rs:1191-1200 | src/executor/select.rs:919-928 | src/executor/select.rs:1213-1222 — there are 4 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 4 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×3
  • Duplicated block (9 lines × 3) sea-orm-macros/src/derives/entity_loader.rs:429 — sea-orm-macros/src/derives/entity_loader.rs:429-437 | sea-orm-macros/src/derives/entity_loader.rs:489-497 | sea-orm-macros/src/derives/entity_loader.rs:593-601 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9 lines × 3) sea-orm-sync/src/driver/sqlx_mysql.rs:175 — sea-orm-sync/src/driver/sqlx_mysql.rs:175-183 | sea-orm-sync/src/driver/sqlx_postgres.rs:210-218 | sea-orm-sync/src/driver/sqlx_sqlite.rs:194-202 — before extracting anything, compare `sea-orm-sync/src/driver/sqlx_mysql.rs` and `sea-orm-sync/src/driver/sqlx_postgres.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 135 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 (9 lines × 3) src/driver/sqlx_mysql.rs:176 — src/driver/sqlx_mysql.rs:176-184 | src/driver/sqlx_postgres.rs:215-223 | src/driver/sqlx_sqlite.rs:195-203 — before extracting anything, compare `src/driver/sqlx_mysql.rs` and `src/driver/sqlx_postgres.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 134 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.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×3
  • Duplicated block (8 lines × 4) sea-orm-macros/src/derives/active_model_ex.rs:1133 — sea-orm-macros/src/derives/active_model_ex.rs:1133-1140 | sea-orm-macros/src/derives/active_model_ex.rs:1185-1192 | sea-orm-macros/src/derives/active_model_ex.rs:1369-1376 | sea-orm-macros/src/derives/active_model_ex.rs:1401-1408 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 4) sea-orm-macros/src/derives/entity_loader.rs:295 — sea-orm-macros/src/derives/entity_loader.rs:295-302 | sea-orm-macros/src/derives/entity_loader.rs:347-354 | sea-orm-macros/src/derives/entity_loader.rs:406-413 | sea-orm-macros/src/derives/entity_loader.rs:458-465 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 4) sea-orm-sync/src/executor/cursor.rs:431 — sea-orm-sync/src/executor/cursor.rs:431-438 | sea-orm-sync/src/executor/cursor.rs:492-499 | src/executor/cursor.rs:431-438 | src/executor/cursor.rs:492-499 — before extracting anything, compare `sea-orm-sync/src/executor/cursor.rs` and `src/executor/cursor.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 217 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.
D1 · Cyclomatic Complexity · sea_orm_arrow · ×2
  • sea_orm_arrow::values_to_arrow_array (cyclomatic 52) sea-orm-arrow/src/lib.rs:695 — sea_orm_arrow::values_to_arrow_array has cyclomatic complexity 52 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This shape REPEATS in the file: one other method here (sea_orm_arrow::option_values_to_arrow_array) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • sea_orm_arrow::option_values_to_arrow_array (cyclomatic 52) sea-orm-arrow/src/lib.rs:977 — sea_orm_arrow::option_values_to_arrow_array has cyclomatic complexity 52 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This shape REPEATS in the file: one other method here (sea_orm_arrow::values_to_arrow_array) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · Column · ×2
  • Column::get_def_inner::write_col_def (cyclomatic 49) sea-orm-codegen/src/entity/column.rs:134 — Column::get_def_inner::write_col_def has cyclomatic complexity 49 (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.
  • Column::get_rs_type::write_rs_type (cyclomatic 36) sea-orm-codegen/src/entity/column.rs:38 — Column::get_rs_type::write_rs_type has cyclomatic complexity 36 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · EntitySchemaInfo · ×2
  • EntitySchemaInfo::sync (cyclomatic 44) sea-orm-sync/src/schema/builder.rs:390 — EntitySchemaInfo::sync has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • EntitySchemaInfo::sync (cyclomatic 44) src/schema/builder.rs:394 — EntitySchemaInfo::sync has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sea_orm_cli · ×2
  • sea_orm_cli::commands::generate::run_generate_command (cyclomatic 21) sea-orm-cli/src/commands/generate.rs:116 — sea_orm_cli::commands::generate::run_generate_command has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • sea_orm_cli::commands::migrate::run_migrate_command (cyclomatic 16) sea-orm-cli/src/commands/migrate.rs:16 — sea_orm_cli::commands::migrate::run_migrate_command 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.
D1 · Cyclomatic Complexity · RbacEngine · ×2
  • RbacEngine::user_can (cyclomatic 21) sea-orm-sync/src/rbac/engine/mod.rs:274 — RbacEngine::user_can has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • RbacEngine::user_can (cyclomatic 21) src/rbac/engine/mod.rs:274 — RbacEngine::user_can has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EntityWriter · ×2
  • EntityWriter::gen_import_frontend::collect (cyclomatic 19) sea-orm-codegen/src/entity/writer/frontend.rs:126 — EntityWriter::gen_import_frontend::collect has cyclomatic complexity 19 (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.
  • EntityWriter::gen_dense_model_struct (cyclomatic 16) sea-orm-codegen/src/entity/writer/dense.rs:182 — EntityWriter::gen_dense_model_struct 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.
D1 · Cyclomatic Complexity · DbErr · ×2
  • DbErr::sql_err (cyclomatic 16) sea-orm-sync/src/error.rs:252 — DbErr::sql_err has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • DbErr::sql_err (cyclomatic 16) src/error.rs:252 — DbErr::sql_err has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D2 · Cognitive Complexity · EntitySchemaInfo · ×2
  • EntitySchemaInfo::sync (cognitive 131) sea-orm-sync/src/schema/builder.rs:390 — EntitySchemaInfo::sync has cognitive complexity 131 (threshold 15). Drivers by points: if/else 30 (96 pts), loops 11 (30 pts), boolean chains 5 (nesting depth added 85). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • EntitySchemaInfo::sync (cognitive 131) src/schema/builder.rs:394 — EntitySchemaInfo::sync has cognitive complexity 131 (threshold 15). Drivers by points: if/else 30 (96 pts), loops 11 (30 pts), boolean chains 5 (nesting depth added 85). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ActiveEnum · ×2
  • ActiveEnum::new (cognitive 55) sea-orm-macros/src/derives/active_enum.rs:129 — ActiveEnum::new has cognitive complexity 55 (threshold 15). Drivers by points: if/else 24 (45 pts), match/switch 2 (4 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ActiveEnum::impl_active_enum (cognitive 20) sea-orm-codegen/src/entity/active_enum.rs:15 — ActiveEnum::impl_active_enum has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · RbacEngine · ×2
  • RbacEngine::user_can (cognitive 51) sea-orm-sync/src/rbac/engine/mod.rs:274 — RbacEngine::user_can has cognitive complexity 51 (threshold 15). Drivers by points: if/else 13 (40 pts), loops 3 (7 pts), boolean chains 4 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • RbacEngine::user_can (cognitive 51) src/rbac/engine/mod.rs:274 — RbacEngine::user_can has cognitive complexity 51 (threshold 15). Drivers by points: if/else 13 (40 pts), loops 3 (7 pts), boolean chains 4 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sea_orm_arrow · ×2
  • sea_orm_arrow::values_to_arrow_array (cognitive 50) sea-orm-arrow/src/lib.rs:695 — sea_orm_arrow::values_to_arrow_array has cognitive complexity 50 (threshold 15). Drivers by points: match/switch 20 (36 pts), if/else 4 (12 pts), loops 1 (2 pts) (nesting depth added 25). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident. This shape REPEATS in the file: one other method here (sea_orm_arrow::option_values_to_arrow_array) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • sea_orm_arrow::option_values_to_arrow_array (cognitive 50) sea-orm-arrow/src/lib.rs:977 — sea_orm_arrow::option_values_to_arrow_array has cognitive complexity 50 (threshold 15). Drivers by points: match/switch 20 (36 pts), if/else 4 (12 pts), loops 1 (2 pts) (nesting depth added 25). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident. This shape REPEATS in the file: one other method here (sea_orm_arrow::values_to_arrow_array) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · SqlxPostgresConnector · ×2
  • SqlxPostgresConnector::connect (cognitive 23) sea-orm-sync/src/driver/sqlx_postgres.rs:67 — SqlxPostgresConnector::connect has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (21 pts), loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • SqlxPostgresConnector::connect (cognitive 23) src/driver/sqlx_postgres.rs:67 — SqlxPostgresConnector::connect has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (21 pts), loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · DbErr · ×2
  • DbErr::sql_err (cognitive 23) sea-orm-sync/src/error.rs:252 — DbErr::sql_err has cognitive complexity 23 (threshold 15). Drivers by points: match/switch 4 (12 pts), if/else 6 (10 pts), boolean chains 1 (nesting depth added 12). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • DbErr::sql_err (cognitive 23) src/error.rs:252 — DbErr::sql_err has cognitive complexity 23 (threshold 15). Drivers by points: match/switch 4 (12 pts), if/else 6 (10 pts), boolean chains 1 (nesting depth added 12). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · InsertMany · ×2
  • InsertMany::many (cognitive 18) sea-orm-sync/src/query/insert.rs:311 — InsertMany::many has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (4 pts), match/switch 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • InsertMany::many (cognitive 18) src/query/insert.rs:311 — InsertMany::many has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (4 pts), match/switch 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ActiveModelTrait · ×2
  • ActiveModelTrait::from_arrow (cognitive 17) sea-orm-sync/src/entity/active_model.rs:561 — ActiveModelTrait::from_arrow has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 1 (4 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ActiveModelTrait::from_arrow (cognitive 17) src/entity/active_model.rs:569 — ActiveModelTrait::from_arrow has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 1 (4 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SchemaBuilder · ×2
  • SchemaBuilder::sync (cognitive 16) sea-orm-sync/src/schema/builder.rs:90 — SchemaBuilder::sync has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (9 pts), match/switch 3 (5 pts), if/else 1 (2 pts) (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • SchemaBuilder::sync (cognitive 16) src/schema/builder.rs:90 — SchemaBuilder::sync has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (9 pts), match/switch 3 (5 pts), if/else 1 (2 pts) (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D4 · Code Duplication · Edited copy of a member (33 corresponding lines) · ×2
  • Edited copy of a member (33 corresponding lines) sea-orm-sync/src/rbac/engine/mod.rs:227 — sea-orm-sync/src/rbac/engine/mod.rs:227-259 | src/rbac/engine/mod.rs:227-259 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (33 corresponding lines) sea-orm-sync/src/entity/active_model.rs:992 — sea-orm-sync/src/entity/active_model.rs:992-1025 | src/entity/active_model.rs:1001-1035 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (6 members, 50+ identical tokens) sea-orm-sync/src/driver/sqlx_mysql.rs:67 — sea-orm-sync/src/driver/sqlx_mysql.rs:67-124 | sea-orm-sync/src/driver/sqlx_postgres.rs:67-159 | sea-orm-sync/src/driver/sqlx_sqlite.rs:68-143 | src/driver/sqlx_mysql.rs:67-125 | src/driver/sqlx_postgres.rs:67-164 | src/driver/sqlx_sqlite.rs:68-144 — 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) sea-orm-sync/src/entity/active_model.rs:679 — sea-orm-sync/src/entity/active_model.rs:679-695 | sea-orm-sync/src/entity/active_model.rs:771-783 | sea-orm-sync/src/entity/active_model.rs:805-817 | src/entity/active_model.rs:687-703 | src/entity/active_model.rs:779-791 | src/entity/active_model.rs:813-825 — 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.
D4 · Code Duplication · Duplicated block (73 lines × 2) · ×2
  • Duplicated block (73 lines × 2) sea-orm-sync/src/driver/rusqlite.rs:207 — sea-orm-sync/src/driver/rusqlite.rs:207-279 | src/driver/rusqlite.rs:207-279 — before extracting anything, compare `sea-orm-sync/src/driver/rusqlite.rs` and `src/driver/rusqlite.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 358 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 (73 lines × 2) sea-orm-sync/src/query/util.rs:161 — sea-orm-sync/src/query/util.rs:161-233 | src/query/util.rs:161-233 — before extracting anything, compare `sea-orm-sync/src/query/util.rs` and `src/query/util.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 179 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.
D4 · Code Duplication · Duplicated block (51 lines × 2) · ×2
  • Duplicated block (51 lines × 2) sea-orm-sync/src/driver/sqlx_sqlite.rs:69 — sea-orm-sync/src/driver/sqlx_sqlite.rs:69-119 | src/driver/sqlx_sqlite.rs:69-119 — before extracting anything, compare `sea-orm-sync/src/driver/sqlx_sqlite.rs` and `src/driver/sqlx_sqlite.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 101 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 lines × 2) sea-orm-sync/src/entity/active_model.rs:494 — sea-orm-sync/src/entity/active_model.rs:494-544 | src/entity/active_model.rs:502-552 — before extracting anything, compare `sea-orm-sync/src/entity/active_model.rs` and `src/entity/active_model.rs` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 431 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.
D4 · Code Duplication · Duplicated block (35–36 lines × 2) · ×2
  • Duplicated block (35–36 lines × 2) sea-orm-arrow/src/lib.rs:898 — sea-orm-arrow/src/lib.rs:898-932 | sea-orm-arrow/src/lib.rs:1189-1224 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (35–36 lines × 2) sea-orm-sync/src/query/loader.rs:1141 — sea-orm-sync/src/query/loader.rs:1141-1175 | src/query/loader.rs:1228-1263 — before extracting anything, compare `sea-orm-sync/src/query/loader.rs` and `src/query/loader.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 254 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.
D4 · Code Duplication · Duplicated block (34 lines × 2) · ×2
  • Duplicated block (34 lines × 2) sea-orm-sync/src/schema/builder.rs:448 — sea-orm-sync/src/schema/builder.rs:448-481 | src/schema/builder.rs:454-487 — before extracting anything, compare `sea-orm-sync/src/schema/builder.rs` and `src/schema/builder.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 428 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 (34 lines × 2) sea-orm-sync/src/schema/entity.rs:150 — sea-orm-sync/src/schema/entity.rs:150-183 | src/schema/entity.rs:150-183 — before extracting anything, compare `sea-orm-sync/src/schema/entity.rs` and `src/schema/entity.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 153 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.
D4 · Code Duplication · Duplicated block (33 lines × 2) · ×2
  • Duplicated block (33 lines × 2) sea-orm-sync/src/query/update.rs:89 — sea-orm-sync/src/query/update.rs:89-121 | src/query/update.rs:89-121 — before extracting anything, compare `sea-orm-sync/src/query/update.rs` and `src/query/update.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 50 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 (33 lines × 2) sea-orm-sync/src/schema/builder.rs:281 — sea-orm-sync/src/schema/builder.rs:281-313 | src/schema/builder.rs:285-317 — before extracting anything, compare `sea-orm-sync/src/schema/builder.rs` and `src/schema/builder.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 428 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.
D4 · Code Duplication · Duplicated block (31 lines × 2) · ×2
  • Duplicated block (31 lines × 2) sea-orm-sync/src/entity/link.rs:75 — sea-orm-sync/src/entity/link.rs:75-105 | src/entity/link.rs:75-105 — 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 (31 lines × 2) sea-orm-sync/src/executor/query.rs:1508 — sea-orm-sync/src/executor/query.rs:1508-1538 | src/executor/query.rs:1510-1540 — before extracting anything, compare `sea-orm-sync/src/executor/query.rs` and `src/executor/query.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 180 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.
D4 · Code Duplication · Duplicated block (30 lines × 2) · ×2
  • Duplicated block (30 lines × 2) sea-orm-sync/src/entity/column.rs:656 — sea-orm-sync/src/entity/column.rs:656-685 | src/entity/column.rs:656-685 — before extracting anything, compare `sea-orm-sync/src/entity/column.rs` and `src/entity/column.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 92 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 (30 lines × 2) sea-orm-sync/src/query/loader.rs:1330 — sea-orm-sync/src/query/loader.rs:1330-1359 | src/query/loader.rs:1418-1447 — before extracting anything, compare `sea-orm-sync/src/query/loader.rs` and `src/query/loader.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 254 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.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×2
  • Duplicated block (27 lines × 2) sea-orm-sync/src/driver/mock.rs:86 — sea-orm-sync/src/driver/mock.rs:86-112 | src/driver/mock.rs:87-113 — before extracting anything, compare `sea-orm-sync/src/driver/mock.rs` and `src/driver/mock.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 83 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 (27 lines × 2) sea-orm-sync/src/query/util.rs:125 — sea-orm-sync/src/query/util.rs:125-151 | src/query/util.rs:125-151 — before extracting anything, compare `sea-orm-sync/src/query/util.rs` and `src/query/util.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 179 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.
D4 · Code Duplication · Duplicated block (20–21 lines × 2) · ×2
  • Duplicated block (20–21 lines × 2) sea-orm-sync/src/rbac/context.rs:187 — sea-orm-sync/src/rbac/context.rs:187-206 | src/rbac/context.rs:197-217 — before extracting anything, compare `sea-orm-sync/src/rbac/context.rs` and `src/rbac/context.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 58 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–21 lines × 2) sea-orm-sync/src/schema/builder.rs:121 — sea-orm-sync/src/schema/builder.rs:121-140 | src/schema/builder.rs:123-143 — before extracting anything, compare `sea-orm-sync/src/schema/builder.rs` and `src/schema/builder.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 428 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.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×2
  • Duplicated block (14–15 lines × 2) sea-orm-macros/src/derives/active_model_ex.rs:1444 — sea-orm-macros/src/derives/active_model_ex.rs:1444-1458 | sea-orm-macros/src/derives/model_ex.rs:1242-1255 — 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 (14–15 lines × 2) sea-orm-sync/src/database/db_connection.rs:209 — sea-orm-sync/src/database/db_connection.rs:209-223 | src/database/db_connection.rs:218-231 — before extracting anything, compare `sea-orm-sync/src/database/db_connection.rs` and `src/database/db_connection.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 162 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.
D4 · Code Duplication · Duplicated block (14 lines × 4) · ×2
  • Duplicated block (14 lines × 4) sea-orm-sync/src/executor/cursor.rs:306 — sea-orm-sync/src/executor/cursor.rs:306-319 | sea-orm-sync/src/executor/cursor.rs:333-346 | src/executor/cursor.rs:306-319 | src/executor/cursor.rs:333-346 — before extracting anything, compare `sea-orm-sync/src/executor/cursor.rs` and `src/executor/cursor.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 217 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 (14 lines × 4) sea-orm-sync/src/rbac/engine/role_hierarchy_impl.rs:10 — sea-orm-sync/src/rbac/engine/role_hierarchy_impl.rs:10-23 | sea-orm-sync/src/rbac/engine/role_hierarchy_impl.rs:38-51 | src/rbac/engine/role_hierarchy_impl.rs:10-23 | src/rbac/engine/role_hierarchy_impl.rs:38-51 — before extracting anything, compare `sea-orm-sync/src/rbac/engine/role_hierarchy_impl.rs` and `src/rbac/engine/role_hierarchy_impl.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 59 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.
D4 · Code Duplication · Duplicated block (13 lines × 4) · ×2
  • Duplicated block (13 lines × 4) sea-orm-sync/src/driver/sqlx_mysql.rs:72 — sea-orm-sync/src/driver/sqlx_mysql.rs:72-84 | sea-orm-sync/src/driver/sqlx_postgres.rs:72-84 | src/driver/sqlx_mysql.rs:72-84 | src/driver/sqlx_postgres.rs:72-84 — before extracting anything, compare `sea-orm-sync/src/driver/sqlx_mysql.rs` and `sea-orm-sync/src/driver/sqlx_postgres.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 135 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 (13 lines × 4) sea-orm-sync/src/executor/consolidate.rs:256 — sea-orm-sync/src/executor/consolidate.rs:256-268 | sea-orm-sync/src/executor/consolidate.rs:385-397 | src/executor/consolidate.rs:256-268 | src/executor/consolidate.rs:385-397 — before extracting anything, compare `sea-orm-sync/src/executor/consolidate.rs` and `src/executor/consolidate.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 244 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.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×2
  • Duplicated block (12 lines × 3) sea-orm-sync/src/database/transaction.rs:392 — sea-orm-sync/src/database/transaction.rs:392-403 | sea-orm-sync/src/database/transaction.rs:508-519 | sea-orm-sync/src/database/transaction.rs:568-579 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (12 lines × 3) src/database/transaction.rs:422 — src/database/transaction.rs:422-433 | src/database/transaction.rs:541-552 | src/database/transaction.rs:601-612 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×2
  • Duplicated block (9 lines × 4) sea-orm-macros/src/derives/entity_loader.rs:343 — sea-orm-macros/src/derives/entity_loader.rs:343-351 | sea-orm-macros/src/derives/entity_loader.rs:454-462 | sea-orm-macros/src/derives/entity_loader.rs:518-526 | sea-orm-macros/src/derives/entity_loader.rs:544-552 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9 lines × 4) sea-orm-sync/src/driver/rusqlite.rs:353 — sea-orm-sync/src/driver/rusqlite.rs:353-361 | sea-orm-sync/src/driver/rusqlite.rs:523-531 | src/driver/rusqlite.rs:353-361 | src/driver/rusqlite.rs:523-531 — before extracting anything, compare `sea-orm-sync/src/driver/rusqlite.rs` and `src/driver/rusqlite.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 358 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.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×2
  • Duplicated block (7 lines × 4) sea-orm-sync/src/executor/delete.rs:152 — sea-orm-sync/src/executor/delete.rs:152-158 | sea-orm-sync/src/executor/delete.rs:176-182 | src/executor/delete.rs:152-158 | src/executor/delete.rs:178-184 — there are 4 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 4 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (7 lines × 4) sea-orm-sync/src/entity/active_model_ex.rs:178 — sea-orm-sync/src/entity/active_model_ex.rs:178-184 | sea-orm-sync/src/entity/active_model_ex.rs:244-250 | src/entity/active_model_ex.rs:178-184 | src/entity/active_model_ex.rs:244-250 — before extracting anything, compare `sea-orm-sync/src/entity/active_model_ex.rs` and `src/entity/active_model_ex.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 134 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.
D4 · Code Duplication · Duplicated block (6 lines × 6) · ×2
  • Duplicated block (6 lines × 6) sea-orm-sync/src/database/transaction.rs:224 — sea-orm-sync/src/database/transaction.rs:224-229 | sea-orm-sync/src/database/transaction.rs:278-283 | sea-orm-sync/src/database/transaction.rs:397-402 | sea-orm-sync/src/database/transaction.rs:454-459 | sea-orm-sync/src/database/transaction.rs:513-518 | sea-orm-sync/src/database/transaction.rs:573-578 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 6) src/database/transaction.rs:246 — src/database/transaction.rs:246-251 | src/database/transaction.rs:303-308 | src/database/transaction.rs:427-432 | src/database/transaction.rs:484-489 | src/database/transaction.rs:546-551 | src/database/transaction.rs:606-611 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×2
  • Duplicated block (6 lines × 3) sea-orm-sync/src/driver/sqlx_mysql.rs:193 — sea-orm-sync/src/driver/sqlx_mysql.rs:193-198 | sea-orm-sync/src/driver/sqlx_postgres.rs:228-233 | sea-orm-sync/src/driver/sqlx_sqlite.rs:212-217 — before extracting anything, compare `sea-orm-sync/src/driver/sqlx_mysql.rs` and `sea-orm-sync/src/driver/sqlx_postgres.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 135 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 (6 lines × 3) src/driver/sqlx_mysql.rs:194 — src/driver/sqlx_mysql.rs:194-199 | src/driver/sqlx_postgres.rs:233-238 | src/driver/sqlx_sqlite.rs:213-218 — before extracting anything, compare `src/driver/sqlx_mysql.rs` and `src/driver/sqlx_postgres.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 134 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.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×2
  • Duplicated block (10 lines × 3) sea-orm-sync/src/driver/sqlx_mysql.rs:203 — sea-orm-sync/src/driver/sqlx_mysql.rs:203-212 | sea-orm-sync/src/driver/sqlx_postgres.rs:238-247 | sea-orm-sync/src/driver/sqlx_sqlite.rs:222-231 — before extracting anything, compare `sea-orm-sync/src/driver/sqlx_mysql.rs` and `sea-orm-sync/src/driver/sqlx_postgres.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 135 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 (10 lines × 3) src/driver/sqlx_mysql.rs:204 — src/driver/sqlx_mysql.rs:204-213 | src/driver/sqlx_postgres.rs:243-252 | src/driver/sqlx_sqlite.rs:223-232 — before extracting anything, compare `src/driver/sqlx_mysql.rs` and `src/driver/sqlx_postgres.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 134 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.
D5 · Coupling · Off the main sequence · ×2
  • Off the main sequence: entity (issues/1599/entity) — entity (issues/1599/entity): abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: sea-orm-codegen — sea-orm-codegen: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
D1 · Cyclomatic Complexity · EntityTransformer · ×1
  • EntityTransformer::transform (cyclomatic 42) sea-orm-codegen/src/entity/transformer.rs:12 — EntityTransformer::transform has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DerivePartialModel · ×1
  • DerivePartialModel::new (cyclomatic 35) sea-orm-macros/src/derives/partial_model.rs:58 — DerivePartialModel::new has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ActiveEnum · ×1
  • ActiveEnum::new (cyclomatic 28) sea-orm-macros/src/derives/active_enum.rs:129 — ActiveEnum::new has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sea_orm_sync · ×1
  • sea_orm_sync::entity::active_model::establish_links (cyclomatic 25) sea-orm-sync/src/entity/active_model.rs:1210 — sea_orm_sync::entity::active_model::establish_links has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sea_orm · ×1
  • sea_orm::entity::active_model::establish_links (cyclomatic 25) src/entity/active_model.rs:1221 — sea_orm::entity::active_model::establish_links has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RelationAttr · ×1
  • RelationAttr::from_attr (cyclomatic 21) sea-orm-macros/src/derives/active_model_ex.rs:34 — RelationAttr::from_attr has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DeriveRelation · ×1
  • DeriveRelation::impl_relation_trait (cyclomatic 21) sea-orm-macros/src/derives/relation.rs:44 — DeriveRelation::impl_relation_trait has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · BelongsToAttr · ×1
  • BelongsToAttr::from_attr (cyclomatic 19) sea-orm-macros/src/derives/model_ex.rs:678 — BelongsToAttr::from_attr has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sea_orm_codegen · ×1
  • sea_orm_codegen::merge::render_file_with_spacing (cyclomatic 18) sea-orm-codegen/src/merge/mod.rs:443 — sea_orm_codegen::merge::render_file_with_spacing has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HasManyAttr · ×1
  • HasManyAttr::from_attr (cyclomatic 16) sea-orm-macros/src/derives/model_ex.rs:1048 — HasManyAttr::from_attr has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · EntityTransformer · ×1
  • EntityTransformer::transform (cognitive 116) sea-orm-codegen/src/entity/transformer.rs:12 — EntityTransformer::transform has cognitive complexity 116 (threshold 15). Drivers by points: if/else 26 (77 pts), loops 12 (31 pts), boolean chains 4, match/switch 2 (4 pts) (nesting depth added 72). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DerivePartialModel · ×1
  • DerivePartialModel::new (cognitive 78) sea-orm-macros/src/derives/partial_model.rs:58 — DerivePartialModel::new has cognitive complexity 78 (threshold 15). Drivers by points: if/else 22 (47 pts), loops 6 (17 pts), match/switch 4 (14 pts) (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sea_orm_cli · ×1
  • sea_orm_cli::commands::generate::run_generate_command (cognitive 49) sea-orm-cli/src/commands/generate.rs:116 — sea_orm_cli::commands::generate::run_generate_command has cognitive complexity 49 (threshold 15). Drivers by points: if/else 17 (31 pts), loops 3 (9 pts), match/switch 3 (7 pts), boolean chains 2 (nesting depth added 24). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · DeriveIntoActiveModel · ×1
  • DeriveIntoActiveModel::new (cognitive 42) sea-orm-macros/src/derives/into_active_model.rs:54 — DeriveIntoActiveModel::new has cognitive complexity 42 (threshold 15). Drivers by points: if/else 8 (30 pts), loops 4 (11 pts), match/switch 1 (nesting depth added 29). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · DeriveFromQueryResult · ×1
  • DeriveFromQueryResult::new (cognitive 40) sea-orm-macros/src/derives/from_query_result.rs:115 — DeriveFromQueryResult::new has cognitive complexity 40 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 4 (13 pts), match/switch 3 (11 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DenseRelationField · ×1
  • DenseRelationField::field_tokens (cognitive 27) sea-orm-codegen/src/entity/writer/dense.rs:43 — DenseRelationField::field_tokens has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (21 pts), match/switch 3 (5 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DeriveRelation · ×1
  • DeriveRelation::impl_relation_trait (cognitive 26) sea-orm-macros/src/derives/relation.rs:44 — DeriveRelation::impl_relation_trait has cognitive complexity 26 (threshold 15). Drivers by points: if/else 18 (19 pts), match/switch 4 (7 pts) (nesting depth added 4). Of this number, 25 points are the body's own statements and 1 belongs to one function item 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.
D2 · Cognitive Complexity · BelongsToAttr · ×1
  • BelongsToAttr::from_attr (cognitive 23) sea-orm-macros/src/derives/model_ex.rs:678 — BelongsToAttr::from_attr has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13, boolean chains 5, match/switch 4 (5 pts) (nesting depth added 1). 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.
D2 · Cognitive Complexity · CompoundType · ×1
  • CompoundType::from_type (cognitive 22) sea-orm-macros/src/derives/util.rs:141 — CompoundType::from_type has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (19 pts), match/switch 2 (3 pts) (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · RelationAttr · ×1
  • RelationAttr::from_attr (cognitive 19) sea-orm-macros/src/derives/active_model_ex.rs:34 — RelationAttr::from_attr has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · HasManyAttr · ×1
  • HasManyAttr::from_attr (cognitive 18) sea-orm-macros/src/derives/model_ex.rs:1048 — HasManyAttr::from_attr has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 3, match/switch 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Field · ×1
  • Field::from_field (cognitive 16) sea-orm-macros/src/derives/active_model_ex.rs:258 — Field::from_field has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D22 · Internal API Consistency · Redundant/Confusingly named operations · ×1
  • Redundant/Confusingly named operations: `arrow_array_to_value` and `arrow_array_to_value_alt` have identical signatures and likely perform the same core conversion, with `alt` being a fallback or variant. This creates ambiguity for users on which to use. — Merge into a single function or clearly document distinct use cases (e.g., one for strict typing, one for loose) and rename to reflect the difference (e.g., `arrow_array_to_value_strict` vs `arrow_array_to_value_loose`). (signatures: sea_orm_arrow.arrow_array_to_value(array: &dyn Array, col_type: ColumnType, row: usize): Result | sea_orm_arrow.arrow_array_to_value_alt(array: &dyn Array, col_type: ColumnType, row: usize): Result)
D22 · Internal API Consistency · Duplicate intent · ×1
  • Duplicate intent: `execute` and `exec_stmt` appear to be synonyms for executing a SQL statement. Having two methods with different names for the same action is confusing. — Remove `exec_stmt` and keep `execute`, or vice versa, depending on naming conventions used elsewhere in the codebase. (signatures: SchemaManager.execute(stmt: S): Result | SchemaManager.exec_stmt(stmt: S): Result)
D22 · Internal API Consistency · Type duplication · ×1
  • Type duplication: `MigratorTraitSelf` and `MigratorTrait` expose identical method signatures for querying migration status (`get_migration_with_status`, `get_pending_migrations`, `get_applied_migrations`). This suggests one trait is redundant or they are meant to be implemented together but are exposed as separate public types causing confusion. — Consolidate into a single `MigratorTrait` or clearly distinguish their responsibilities (e.g., one for internal use, one for public API) and hide the redundant one. (signatures: MigratorTraitSelf.get_migration_with_status(db: C): Result | MigratorTrait.get_migration_with_status(db: C): Result | MigratorTraitSelf.get_pending_migrations(db: C): Result | MigratorTrait.get_pending_migrations(db: C): Result | MigratorTraitSelf.get_applied_migrations(db: C): Result | MigratorTrait.get_applied_migrations(db: C): Result)
D22 · Internal API Consistency · Confusingly named operations · ×1
  • Confusingly named operations: `from_json` and `set_from_json` likely perform similar JSON deserialization into the model. The distinction is unclear from the signature alone. — Clarify the difference (e.g., `from_json` creates a new instance, `set_from_json` updates an existing one) and rename to reflect this (e.g., `new_from_json` vs `update_from_json`). (signatures: ActiveModelTrait.from_json(json: Value): Result | ActiveModelTrait.set_from_json(json: Value): Result)
D3 · God Classes · TooManyFunctions · ×1
  • TooManyFunctions: sea_orm_migration::schema sea-orm-migration/src/schema.rs:55 — TooManyFunctions — 125 free functions. The bar is 30 free functions; this is 95 over it, 4.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D35 · Change Coupling · Change coupling · ×1
  • Change coupling: query.rs ↔ transaction.rs src/database/stream/query.rs — `src/database/stream/query.rs` and `src/database/stream/transaction.rs` change together 60% of the time (9 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise 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 `76e7d998` Add error variant BackendNotSupported (#2626); `85fc3d04` feat: Add support for async proxy connection. (#2278); `80d35a9d` cargo fmt — run `git show` on any of them.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (4 members, 16 shared lines) · ×1
  • Near-duplicate member family (4 members, 16 shared lines) sea-orm-sync/src/executor/consolidate.rs:196 — sea-orm-sync/src/executor/consolidate.rs:196-280 | sea-orm-sync/src/executor/consolidate.rs:358-401 | src/executor/consolidate.rs:196-280 | src/executor/consolidate.rs:358-401 — These 4 members are variants of one another: a block of 16 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (3 members, 24 shared lines) · ×1
  • Near-duplicate member family (3 members, 24 shared lines) sea-orm-macros/src/derives/entity_loader.rs:402 — sea-orm-macros/src/derives/entity_loader.rs:402-447 | sea-orm-macros/src/derives/entity_loader.rs:453-511 | sea-orm-macros/src/derives/entity_loader.rs:570-611 — These 3 members are variants of one another: a block of 24 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
D4 · Code Duplication · Near-duplicate member pair (172 shared lines) · ×1
  • Near-duplicate member pair (172 shared lines) sea-orm-sync/src/schema/builder.rs:395 — sea-orm-sync/src/schema/builder.rs:395-614 | src/schema/builder.rs:399-623 — These two members are variants of one another: 172 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 · Near-duplicate member pair (131 shared lines) · ×1
  • Near-duplicate member pair (131 shared lines) sea-orm-sync/src/schema/builder.rs:93 — sea-orm-sync/src/schema/builder.rs:93-248 | src/schema/builder.rs:93-252 — These two members are variants of one another: 131 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 · Near-duplicate member pair (130 shared lines) · ×1
  • Near-duplicate member pair (130 shared lines) sea-orm-arrow/src/lib.rs:698 — sea-orm-arrow/src/lib.rs:698-970 | sea-orm-arrow/src/lib.rs:980-1262 — These two members are variants of one another: 130 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 · Near-duplicate member pair (89 shared lines) · ×1
  • Near-duplicate member pair (89 shared lines) sea-orm-sync/src/query/loader.rs:1139 — sea-orm-sync/src/query/loader.rs:1139-1234 | src/query/loader.rs:1226-1322 — These two members are variants of one another: 89 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 · Near-duplicate member pair (59 shared lines) · ×1
  • Near-duplicate member pair (59 shared lines) sea-orm-macros/src/derives/model_ex.rs:678 — sea-orm-macros/src/derives/model_ex.rs:678-813 | sea-orm-macros/src/derives/model_ex.rs:905-984 — These two members are variants of one another: 59 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 · Near-duplicate member pair (42 shared lines) · ×1
  • Near-duplicate member pair (42 shared lines) sea-orm-sync/src/schema/json.rs:63 — sea-orm-sync/src/schema/json.rs:63-109 | src/schema/json.rs:63-109 — These two members are variants of one another: 42 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 · Near-duplicate member pair (38 shared lines) · ×1
  • Near-duplicate member pair (38 shared lines) sea-orm-sync/src/executor/cursor.rs:120 — sea-orm-sync/src/executor/cursor.rs:120-195 | src/executor/cursor.rs:120-195 — These two members are variants of one another: 38 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 · Near-duplicate member pair (33 shared lines) · ×1
  • Near-duplicate member pair (33 shared lines) sea-orm-macros/src/derives/entity_loader.rs:291 — sea-orm-macros/src/derives/entity_loader.rs:291-336 | sea-orm-macros/src/derives/entity_loader.rs:342-400 — These two members are variants of one another: 33 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 · Near-duplicate member pair (28 shared lines) · ×1
  • Near-duplicate member pair (28 shared lines) sea-orm-sync/src/executor/cursor.rs:85 — sea-orm-sync/src/executor/cursor.rs:85-115 | src/executor/cursor.rs:85-115 — These two members are variants of one another: 28 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Edited copy of a member (528 corresponding lines) · ×1
  • Edited copy of a member (528 corresponding lines) sea-orm-sync/src/driver/sqlx_postgres.rs:411 — sea-orm-sync/src/driver/sqlx_postgres.rs:411-938 | src/driver/sqlx_postgres.rs:424-951 — These two members are one piece of code written twice and then edited apart: 528 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (169 corresponding lines) · ×1
  • Edited copy of a member (169 corresponding lines) sea-orm-sync/src/driver/sqlx_mysql.rs:375 — sea-orm-sync/src/driver/sqlx_mysql.rs:375-543 | src/driver/sqlx_mysql.rs:383-551 — These two members are one piece of code written twice and then edited apart: 169 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (85 corresponding lines) · ×1
  • Edited copy of a member (85 corresponding lines) sea-orm-sync/src/dynamic/model.rs:70 — sea-orm-sync/src/dynamic/model.rs:70-154 | src/dynamic/model.rs:70-154 — These two members are one piece of code written twice and then edited apart: 85 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (105 corresponding lines) · ×1
  • Edited copy of a member (105 corresponding lines) sea-orm-sync/src/driver/sqlx_sqlite.rs:401 — sea-orm-sync/src/driver/sqlx_sqlite.rs:401-505 | src/driver/sqlx_sqlite.rs:410-514 — These two members are one piece of code written twice and then edited apart: 105 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (48 corresponding lines) · ×1
  • Edited copy of a member (48 corresponding lines) sea-orm-sync/src/executor/query.rs:1491 — sea-orm-sync/src/executor/query.rs:1491-1538 | src/executor/query.rs:1493-1540 — These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (50 corresponding lines) · ×1
  • Edited copy of a member (50 corresponding lines) sea-orm-sync/src/schema/entity.rs:241 — sea-orm-sync/src/schema/entity.rs:241-290 | src/schema/entity.rs:241-290 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (49 corresponding lines) · ×1
  • Edited copy of a member (49 corresponding lines) sea-orm-sync/src/executor/consolidate.rs:298 — sea-orm-sync/src/executor/consolidate.rs:298-346 | src/executor/consolidate.rs:298-346 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (35 corresponding lines) · ×1
  • Edited copy of a member (35 corresponding lines) sea-orm-sync/src/query/combine.rs:46 — sea-orm-sync/src/query/combine.rs:46-80 | src/query/combine.rs:46-80 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×1
  • Edited copy of a member (19 corresponding lines) sea-orm-sync/src/query/loader.rs:1277 — sea-orm-sync/src/query/loader.rs:1277-1295 | src/query/loader.rs:1365-1383 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×1
  • Edited copy of a member (21 corresponding lines) sea-orm-sync/src/schema/builder.rs:620 — sea-orm-sync/src/schema/builder.rs:620-640 | src/schema/builder.rs:629-649 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×1
  • Edited copy of a member (13 corresponding lines) sea-orm-sync/src/rbac/context.rs:261 — sea-orm-sync/src/rbac/context.rs:261-278 | src/rbac/context.rs:273-291 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (12 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (12 members, 50+ identical tokens) sea-orm-sync/src/database/transaction.rs:216 — sea-orm-sync/src/database/transaction.rs:216-265 | sea-orm-sync/src/database/transaction.rs:270-319 | sea-orm-sync/src/database/transaction.rs:387-440 | sea-orm-sync/src/database/transaction.rs:444-499 | sea-orm-sync/src/database/transaction.rs:503-559 | sea-orm-sync/src/database/transaction.rs:563-622 | src/database/transaction.rs:238-290 | src/database/transaction.rs:295-347 | src/database/transaction.rs:417-470 | src/database/transaction.rs:474-532 | src/database/transaction.rs:536-592 | src/database/transaction.rs:596-658 — These 12 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 12 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 12 times.
D4 · Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (8 members, 50+ identical tokens) sea-orm-sync/src/driver/rusqlite.rs:365 — sea-orm-sync/src/driver/rusqlite.rs:365-386 | sea-orm-sync/src/driver/rusqlite.rs:390-411 | sea-orm-sync/src/driver/rusqlite.rs:538-558 | sea-orm-sync/src/driver/rusqlite.rs:565-585 | src/driver/rusqlite.rs:365-386 | src/driver/rusqlite.rs:390-411 | src/driver/rusqlite.rs:538-558 | src/driver/rusqlite.rs:565-585 — These 8 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 8 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 8 times.
D4 · Code Duplication · Duplicated block (96 lines × 2) · ×1
  • Duplicated block (96 lines × 2) sea-orm-sync/src/error.rs:253 — sea-orm-sync/src/error.rs:253-348 | src/error.rs:253-348 — 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 · Duplicated block (60 lines × 2) · ×1
  • Duplicated block (60 lines × 2) sea-orm-sync/src/query/insert.rs:323 — sea-orm-sync/src/query/insert.rs:323-382 | src/query/insert.rs:323-382 — before extracting anything, compare `sea-orm-sync/src/query/insert.rs` and `src/query/insert.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 162 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.
D4 · Code Duplication · Duplicated block (58 lines × 2) · ×1
  • Duplicated block (58 lines × 2) sea-orm-sync/src/rbac/engine/mod.rs:279 — sea-orm-sync/src/rbac/engine/mod.rs:279-336 | src/rbac/engine/mod.rs:279-336 — before extracting anything, compare `sea-orm-sync/src/rbac/engine/mod.rs` and `src/rbac/engine/mod.rs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 246 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.
D4 · Code Duplication · Duplicated block (50 lines × 2) · ×1
  • Duplicated block (50 lines × 2) sea-orm-sync/src/entity/active_model.rs:562 — sea-orm-sync/src/entity/active_model.rs:562-611 | src/entity/active_model.rs:570-619 — before extracting anything, compare `sea-orm-sync/src/entity/active_model.rs` and `src/entity/active_model.rs` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 431 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.
D4 · Code Duplication · Duplicated block (48–49 lines × 2) · ×1
  • Duplicated block (48–49 lines × 2) sea-orm-sync/src/schema/builder.rs:547 — sea-orm-sync/src/schema/builder.rs:547-594 | src/schema/builder.rs:554-602 — before extracting anything, compare `sea-orm-sync/src/schema/builder.rs` and `src/schema/builder.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 428 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.
D4 · Code Duplication · Duplicated block (44 lines × 2) · ×1
  • Duplicated block (44 lines × 2) sea-orm-sync/src/schema/entity.rs:247 — sea-orm-sync/src/schema/entity.rs:247-290 | src/schema/entity.rs:247-290 — before extracting anything, compare `sea-orm-sync/src/schema/entity.rs` and `src/schema/entity.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 153 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.
D4 · Code Duplication · Duplicated block (41 lines × 2) · ×1
  • Duplicated block (41 lines × 2) sea-orm-sync/src/database/mod.rs:246 — sea-orm-sync/src/database/mod.rs:246-286 | src/database/mod.rs:262-302 — before extracting anything, compare `sea-orm-sync/src/database/mod.rs` and `src/database/mod.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 79 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.
D4 · Code Duplication · Duplicated block (34–35 lines × 2) · ×1
  • Duplicated block (34–35 lines × 2) sea-orm-sync/src/schema/builder.rs:508 — sea-orm-sync/src/schema/builder.rs:508-541 | src/schema/builder.rs:514-548 — before extracting anything, compare `sea-orm-sync/src/schema/builder.rs` and `src/schema/builder.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 428 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.
D4 · Code Duplication · Duplicated block (25–26 lines × 2) · ×1
  • Duplicated block (25–26 lines × 2) sea-orm-sync/src/schema/builder.rs:412 — sea-orm-sync/src/schema/builder.rs:412-436 | src/schema/builder.rs:416-441 — before extracting anything, compare `sea-orm-sync/src/schema/builder.rs` and `src/schema/builder.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 428 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.
D4 · Code Duplication · Duplicated block (24–25 lines × 2) · ×1
  • Duplicated block (24–25 lines × 2) sea-orm-sync/src/entity/active_model.rs:1226 — sea-orm-sync/src/entity/active_model.rs:1226-1249 | src/entity/active_model.rs:1237-1261 — before extracting anything, compare `sea-orm-sync/src/entity/active_model.rs` and `src/entity/active_model.rs` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 431 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.
D4 · Code Duplication · Duplicated block (19 lines × 3) · ×1
  • Duplicated block (19 lines × 3) sea-orm-macros/src/derives/model_ex.rs:682 — sea-orm-macros/src/derives/model_ex.rs:682-700 | sea-orm-macros/src/derives/model_ex.rs:907-925 | sea-orm-macros/src/derives/model_ex.rs:1055-1073 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (3–17 lines × 4) · ×1
  • Duplicated block (3–17 lines × 4) sea-orm-sync/src/executor/consolidate.rs:197 — sea-orm-sync/src/executor/consolidate.rs:197-213 | sea-orm-sync/src/executor/consolidate.rs:361-363 | src/executor/consolidate.rs:197-213 | src/executor/consolidate.rs:361-363 — before extracting anything, compare `sea-orm-sync/src/executor/consolidate.rs` and `src/executor/consolidate.rs` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 244 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.
D4 · Code Duplication · Duplicated block (16 lines × 4) · ×1
  • Duplicated block (16 lines × 4) sea-orm-sync/src/database/mock.rs:233 — sea-orm-sync/src/database/mock.rs:233-248 | sea-orm-sync/src/database/proxy.rs:167-182 | src/database/mock.rs:233-248 | src/database/proxy.rs:168-183 — before extracting anything, compare `sea-orm-sync/src/database/mock.rs` and `src/database/mock.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 140 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.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×1
  • Duplicated block (15–16 lines × 2) sea-orm-sync/src/database/transaction.rs:477 — sea-orm-sync/src/database/transaction.rs:477-492 | src/database/transaction.rs:510-524 — before extracting anything, compare `sea-orm-sync/src/database/transaction.rs` and `src/database/transaction.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 222 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.
D4 · Code Duplication · Duplicated block (15 lines × 4) · ×1
  • Duplicated block (15 lines × 4) sea-orm-sync/src/query/loader.rs:1141 — sea-orm-sync/src/query/loader.rs:1141-1155 | sea-orm-sync/src/query/loader.rs:1197-1211 | src/query/loader.rs:1228-1242 | src/query/loader.rs:1285-1299 — before extracting anything, compare `sea-orm-sync/src/query/loader.rs` and `src/query/loader.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 254 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.
D4 · Code Duplication · Duplicated block (12–14 lines × 2) · ×1
  • Duplicated block (12–14 lines × 2) sea-orm-arrow/src/lib.rs:871 — sea-orm-arrow/src/lib.rs:871-882 | sea-orm-arrow/src/lib.rs:1158-1171 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×1
  • Duplicated block (13–14 lines × 2) sea-orm-arrow/src/lib.rs:884 — sea-orm-arrow/src/lib.rs:884-896 | sea-orm-arrow/src/lib.rs:1174-1187 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×1
  • Duplicated block (13 lines × 3) sea-orm-sync/src/driver/rusqlite.rs:725 — sea-orm-sync/src/driver/rusqlite.rs:725-737 | sea-orm-sync/src/driver/sqlx_sqlite.rs:346-358 | src/driver/rusqlite.rs:725-737 — before extracting anything, compare `sea-orm-sync/src/driver/rusqlite.rs` and `src/driver/rusqlite.rs` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 358 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.
D4 · Code Duplication · Duplicated block (12 lines × 6) · ×1
  • Duplicated block (12 lines × 6) sea-orm-sync/src/driver/sqlx_mysql.rs:73 — sea-orm-sync/src/driver/sqlx_mysql.rs:73-84 | sea-orm-sync/src/driver/sqlx_postgres.rs:73-84 | sea-orm-sync/src/driver/sqlx_sqlite.rs:78-89 | src/driver/sqlx_mysql.rs:73-84 | src/driver/sqlx_postgres.rs:73-84 | src/driver/sqlx_sqlite.rs:78-89 — before extracting anything, compare `sea-orm-sync/src/driver/sqlx_mysql.rs` and `sea-orm-sync/src/driver/sqlx_postgres.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 135 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.
D4 · Code Duplication · Duplicated block (10–11 lines × 3) · ×1
  • Duplicated block (10–11 lines × 3) sea-orm-macros/src/derives/active_model_ex.rs:1184 — sea-orm-macros/src/derives/active_model_ex.rs:1184-1194 | sea-orm-macros/src/derives/active_model_ex.rs:1368-1377 | sea-orm-macros/src/derives/active_model_ex.rs:1400-1409 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (9–11 lines × 2) · ×1
  • Duplicated block (9–11 lines × 2) sea-orm-sync/src/schema/builder.rs:94 — sea-orm-sync/src/schema/builder.rs:94-102 | src/schema/builder.rs:94-104 — before extracting anything, compare `sea-orm-sync/src/schema/builder.rs` and `src/schema/builder.rs` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 428 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.
D4 · Code Duplication · Duplicated block (10 lines × 6) · ×1
  • Duplicated block (10 lines × 6) sea-orm-sync/src/driver/sqlx_mysql.rs:378 — sea-orm-sync/src/driver/sqlx_mysql.rs:378-387 | sea-orm-sync/src/driver/sqlx_postgres.rs:414-423 | sea-orm-sync/src/driver/sqlx_sqlite.rs:404-413 | src/driver/sqlx_mysql.rs:386-395 | src/driver/sqlx_postgres.rs:427-436 | src/driver/sqlx_sqlite.rs:413-422 — before extracting anything, compare `sea-orm-sync/src/driver/sqlx_mysql.rs` and `sea-orm-sync/src/driver/sqlx_postgres.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 135 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.
D4 · Code Duplication · Duplicated block (9–10 lines × 4) · ×1
  • Duplicated block (9–10 lines × 4) sea-orm-sync/src/executor/insert.rs:501 — sea-orm-sync/src/executor/insert.rs:501-509 | sea-orm-sync/src/executor/insert.rs:568-577 | src/executor/insert.rs:512-520 | src/executor/insert.rs:582-591 — before extracting anything, compare `sea-orm-sync/src/executor/insert.rs` and `src/executor/insert.rs` as WHOLE FILES: this scan already matched 8 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.
D4 · Code Duplication · Duplicated block (9 lines × 6) · ×1
  • Duplicated block (9 lines × 6) sea-orm-sync/src/entity/active_model.rs:680 — sea-orm-sync/src/entity/active_model.rs:680-688 | sea-orm-sync/src/entity/active_model.rs:772-780 | sea-orm-sync/src/entity/active_model.rs:806-814 | src/entity/active_model.rs:688-696 | src/entity/active_model.rs:780-788 | src/entity/active_model.rs:814-822 — before extracting anything, compare `sea-orm-sync/src/entity/active_model.rs` and `src/entity/active_model.rs` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 431 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.
D4 · Code Duplication · Duplicated block (7–9 lines × 2) · ×1
  • Duplicated block (7–9 lines × 2) sea-orm-codegen/src/entity/writer/dense.rs:100 — sea-orm-codegen/src/entity/writer/dense.rs:100-106 | sea-orm-codegen/src/entity/writer/dense.rs:115-123 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (8 lines × 6) · ×1
  • Duplicated block (8 lines × 6) sea-orm-sync/src/database/transaction.rs:398 — sea-orm-sync/src/database/transaction.rs:398-405 | sea-orm-sync/src/database/transaction.rs:514-521 | sea-orm-sync/src/database/transaction.rs:574-581 | src/database/transaction.rs:428-435 | src/database/transaction.rs:547-554 | src/database/transaction.rs:607-614 — before extracting anything, compare `sea-orm-sync/src/database/transaction.rs` and `src/database/transaction.rs` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 222 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.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×1
  • Duplicated block (7–8 lines × 2) sea-orm-macros/src/derives/arrow_schema.rs:203 — sea-orm-macros/src/derives/arrow_schema.rs:203-209 | sea-orm-macros/src/derives/arrow_schema.rs:321-328 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (13 lines × 5) · ×1
  • Duplicated block (13 lines × 5) issues/1599/entity/src/cake.rs:30 — issues/1599/entity/src/cake.rs:30-42 | sea-orm-sync/src/tests_cfg/cake_compact.rs:35-47 | sea-orm-sync/src/tests_cfg/cake_seaography.rs:31-43 | src/tests_cfg/cake_compact.rs:35-47 | src/tests_cfg/cake_seaography.rs:31-43 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 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 5 times.
D4 · Code Duplication · Duplicated block (247 lines × 2) · ×1
  • Duplicated block (247 lines × 2) sea-orm-sync/src/entity/column/types.rs:95 — sea-orm-sync/src/entity/column/types.rs:95-341 | src/entity/column/types.rs:95-341 — 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 · Duplicated block (94 lines × 2) · ×1
  • Duplicated block (94 lines × 2) sea-orm-sync/src/entity/column_def.rs:40 — sea-orm-sync/src/entity/column_def.rs:40-133 | src/entity/column_def.rs:40-133 — 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 · Duplicated block (214 lines × 2) · ×1
  • Duplicated block (214 lines × 2) sea-orm-sync/src/entity/compound/belongs_to.rs:88 — sea-orm-sync/src/entity/compound/belongs_to.rs:88-301 | src/entity/compound/belongs_to.rs:88-301 — 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 · Duplicated block (275 lines × 2) · ×1
  • Duplicated block (275 lines × 2) sea-orm-sync/src/entity/compound/has_many.rs:20 — sea-orm-sync/src/entity/compound/has_many.rs:20-294 | src/entity/compound/has_many.rs:20-294 — 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 · Duplicated block (126 lines × 2) · ×1
  • Duplicated block (126 lines × 2) sea-orm-sync/src/entity/compound/has_one.rs:18 — sea-orm-sync/src/entity/compound/has_one.rs:18-143 | src/entity/compound/has_one.rs:18-143 — 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 · Duplicated block (7 lines × 6) · ×1
  • Duplicated block (7 lines × 6) sea-orm-sync/src/driver/sqlx_mysql.rs:300 — sea-orm-sync/src/driver/sqlx_mysql.rs:300-306 | sea-orm-sync/src/driver/sqlx_postgres.rs:335-341 | sea-orm-sync/src/driver/sqlx_sqlite.rs:322-328 | src/driver/sqlx_mysql.rs:307-313 | src/driver/sqlx_postgres.rs:346-352 | src/driver/sqlx_sqlite.rs:329-335 — before extracting anything, compare `sea-orm-sync/src/driver/sqlx_mysql.rs` and `sea-orm-sync/src/driver/sqlx_postgres.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 135 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.
D4 · Code Duplication · Duplicated block (7 lines × 5) · ×1
  • Duplicated block (7 lines × 5) src/database/db_connection.rs:681 — src/database/db_connection.rs:681-687 | src/database/executor.rs:237-243 | src/database/restricted_connection.rs:174-180 | src/database/restricted_connection.rs:263-269 | src/database/transaction.rs:227-233 — there are 5 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (68 lines × 2) · ×1
  • Duplicated block (68 lines × 2) sea-orm-sync/src/tests_cfg/cake_expanded.rs:8 — sea-orm-sync/src/tests_cfg/cake_expanded.rs:8-75 | src/tests_cfg/cake_expanded.rs:8-75 — 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 · Duplicated block (53 lines × 2) · ×1
  • Duplicated block (53 lines × 2) sea-orm-sync/src/tests_cfg/lunch_set_expanded.rs:9 — sea-orm-sync/src/tests_cfg/lunch_set_expanded.rs:9-61 | src/tests_cfg/lunch_set_expanded.rs:9-61 — 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.
Minor — 13 finding(s)
D16 · Bus Factor · Off-boarding risk · ×1
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 30 significant file(s) lose their only recent owner: sea-orm-arrow/src/lib.rs, src/executor/consolidate.rs, sea-orm-sync/src/executor/consolidate.rs, src/entity/base_entity.rs, src/rbac/engine/mod.rs, src/lib.rs, src/database/restricted_connection.rs, sea-orm-sync/src/schema/entity.rs (+22 more). Pair on, review, or document these before any departure.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 1 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (32 single-owned of 226 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 226 of the 446 production source files in this repository met that bar). They are anonymized user #2 (2 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion · Split sea-orm-sync · ×1
  • Split sea-orm-sync — The sea-orm-sync project is identical to the root and is also a massive catch-all that is spread over many namespaces. Suggested:
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 9 of 226 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 226 of the 446 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: src/entity/primary_key.rs, sea-orm-macros/src/strum/helpers/metadata.rs, sea-orm-macros/src/strum/enum_iter.rs, sea-orm-macros/src/derives/derive_iden.rs, sea-orm-macros/src/strum/helpers/type_props.rs, sea-orm-macros/src/strum/helpers/case_style.rs, sea-orm-macros/src/strum/helpers/variant_props.rs, sea-orm-macros/src/derives/active_enum_display.rs (and 1 more). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • 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.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 10/24 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `issues/1143`, `issues/1278`, `issues/1357`, `issues/1473`, `issues/249/app` and 9 more.

Appendix B — Reproduction & audit trail

Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-a67e283d123e473abe5be37991da4a8d/history.json --exit-code 0 --source .3artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-a67e283d123e473abe5be37991da4a8d/tree.json --exit-code 0 --source .3artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off .64artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update0artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .5artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—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.0—
D37 · Vulnerability-disclosure Policydisclosure—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.0—
D40 · Network Egress Confinementruntime-hardening—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.0—
D41 · Kernel & Syscall Confinementruntime-hardening—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.0—
D42 · Runtime Threat Enforcementruntime-hardening—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.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update0artifacts/raw/trivy-fs.json

Run 01a0eb67-024f-7cb9-9d7b-57f72c152648 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

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.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md