Skip to content

Application URL: Add ApplicationUrlDetection setting to control application URL auto-detection#22307

Merged
kjac merged 7 commits into
mainfrom
v17/improvement/harden-app-url-detection
Apr 1, 2026
Merged

Application URL: Add ApplicationUrlDetection setting to control application URL auto-detection#22307
kjac merged 7 commits into
mainfrom
v17/improvement/harden-app-url-detection

Clean up ambiguous log message

85e14b9
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Code Health Review (main) failed Apr 1, 2026 in 46s

CodeScene PR Check

Quality Gate Failed

Gates Failed
Enforce advisory code health rules (4 files with Code Duplication, Complex Method, Large Method, Excess Number of Function Arguments)

Gates Passed
3 Quality Gates Passed

See analysis details in CodeScene

Reason for failure
Enforce advisory code health rules Violations Code Health Impact
ApplicationUrlConfigurationNotificationHandlerTests.cs 2 advisory rules 9.10 Suppress
AspNetCoreHostingEnvironmentTests.cs 1 advisory rule 10.00 → 9.39 Suppress
HttpsCheck.cs 1 advisory rule 9.69 → 9.60 Suppress
UserOrCurrentUserControllerBase.cs 1 advisory rule 9.27 → 9.25 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):

  • Large Method UserOrCurrentUserControllerBase.cs: UserOperationStatusResult
  • Code Duplication ApplicationUrlConfigurationNotificationHandlerTests.cs
  • Code Duplication AspNetCoreHostingEnvironmentTests.cs
  • Complex Method HttpsCheck.cs: CheckForValidCertificate
  • Excess Number of Function Arguments ApplicationUrlConfigurationNotificationHandlerTests.cs: Log

Annotations

Check warning on line 262 in tests/Umbraco.Tests.UnitTests/Umbraco.Web.Website/AspNetCoreHostingEnvironmentTests.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 3 functions with similar structure: EnsureApplicationMainUrl_EveryRequest_ExplicitConfigTakesPrecedence,EnsureApplicationMainUrl_NoneMode_ExplicitConfigStillWorks,EnsureApplicationMainUrl_WithExplicitConfig_IgnoresHostHeader. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.

Check warning on line 97 in src/Umbraco.Core/HealthChecks/Checks/Security/HttpsCheck.cs

See this annotation in the file changed.

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

❌ Getting worse: Complex Method

CheckForValidCertificate increases in cyclomatic complexity from 9 to 10, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check warning on line 146 in src/Umbraco.Cms.Api.Management/Controllers/User/UserOrCurrentUserControllerBase.cs

See this annotation in the file changed.

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

❌ Getting worse: Large Method

UserOperationStatusResult increases from 133 to 137 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 warning on line 44 in tests/Umbraco.Tests.UnitTests/Umbraco.Web.Website/ApplicationUrlConfigurationNotificationHandlerTests.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: Handle_NoneMode_NoExplicitUrl_LogsWarning,Handle_WithExplicitUrl_DoesNotLogWarning. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.

Check warning on line 102 in tests/Umbraco.Tests.UnitTests/Umbraco.Web.Website/ApplicationUrlConfigurationNotificationHandlerTests.cs

See this annotation in the file changed.

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

❌ New issue: Excess Number of Function Arguments

Log has 5 arguments, max arguments = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.