Skip to content

Health Check: Add check for untrusted database constraints on SQL Server - #22592

Merged
AndyButland merged 2 commits into
mainfrom
v17/feature/healthcheck-for-un-trusted-constraints
Apr 26, 2026
Merged

Health Check: Add check for untrusted database constraints on SQL Server#22592
AndyButland merged 2 commits into
mainfrom
v17/feature/healthcheck-for-un-trusted-constraints

Re-use the SQL and DTO between the migration and healthcheck.

30da306
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Code Health Review (main) failed Apr 24, 2026 in 35s

CodeScene PR Check

Quality Gate Failed

Gates Failed
Enforce advisory code health rules (1 file with Code Duplication)

Gates Passed
3 Quality Gates Passed

See analysis details in CodeScene

Reason for failure
Enforce advisory code health rules Violations Code Health Impact
UntrustedDatabaseConstraintsCheckTests.cs 1 advisory rule 9.39 Suppress

Quality Gate Profile: Clean Code Collective
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

Details

🚩 Declining Code Health (highest to lowest):

  • Code Duplication UntrustedDatabaseConstraintsCheckTests.cs

Annotations

Check warning on line 32 in tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/HealthChecks/UntrustedDatabaseConstraintsCheckTests.cs

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (main)

❌ New issue: Code Duplication

The module contains 2 functions with similar structure: FreshDatabase_ReportsSuccessOnSqlServer,SqliteDatabase_ReportsInfoShortCircuit. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.