Skip to content

Adds abstraction around boot time checks for database availability - #19848

Merged
nikolajlauridsen merged 2 commits into
mainfrom
v16/improvement/add-abstraction-for-database-check-on-boot
Aug 5, 2025
Merged

Adds abstraction around boot time checks for database availability#19848
nikolajlauridsen merged 2 commits into
mainfrom
v16/improvement/add-abstraction-for-database-check-on-boot

Addressed issues raised in code review.

1061544
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Aug 4, 2025 in 1m 10s

CodeScene PR Check

Quality Gate Failed

Gates Failed
Enforce advisory code health rules (1 file with Large Method)

Gates Passed
3 Quality Gates Passed

See analysis details in CodeScene

Reason for failure
Enforce advisory code health rules Violations Code Health Impact
UmbracoBuilder.CoreServices.cs 1 advisory rule 8.85 → 8.85 Suppress

Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.

Details

🚩 Declining Code Health (highest to lowest):

  • Large Method UmbracoBuilder.CoreServices.cs: AddCoreInitialServices

✅ Improving Code Health:

  • Overall Code Complexity RuntimeState.cs

Annotations

Check warning on line 95 in src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.CoreServices.cs

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ Getting worse: Large Method

AddCoreInitialServices increases from 119 to 120 lines of code, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.

Check notice on line 1 in src/Umbraco.Infrastructure/Runtime/RuntimeState.cs

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

✅ Getting better: Overall Code Complexity

The mean cyclomatic complexity decreases from 4.75 to 4.25, threshold = 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.