Application URL: Add ApplicationUrlDetection setting to control application URL auto-detection - #22307
CodeScene PR Check
Quality Gate Failed
Gates Failed
Enforce critical code health rules
(1 file with Bumpy Road Ahead)
Enforce advisory code health rules
(5 files with Complex Method, Code Duplication, Large Method)
Gates Passed
2 Quality Gates Passed
See analysis details in CodeScene
Reason for failure
| Enforce critical code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| AspNetCoreHostingEnvironment.cs | 1 critical rule | 9.69 → 9.24 | Suppress |
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| AspNetCoreHostingEnvironmentTests.cs | 1 advisory rule | 10.00 → 9.39 | Suppress |
| UmbracoRequestMiddleware.cs | 1 advisory rule | 9.69 → 9.23 | Suppress |
| AspNetCoreHostingEnvironment.cs | 1 advisory rule | 9.69 → 9.24 | 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 AspNetCoreHostingEnvironmentTests.cs
- Complex Method UmbracoRequestMiddleware.cs: InvokeAsync
- Complex Method HttpsCheck.cs: CheckForValidCertificate
- Complex Method AspNetCoreHostingEnvironment.cs: EnsureApplicationMainUrl
- Bumpy Road Ahead AspNetCoreHostingEnvironment.cs: EnsureApplicationMainUrl
Annotations
Check warning on line 222 in src/Umbraco.Web.Common/AspNetCore/AspNetCoreHostingEnvironment.cs
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Complex Method
EnsureApplicationMainUrl has a cyclomatic complexity of 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 222 in src/Umbraco.Web.Common/AspNetCore/AspNetCoreHostingEnvironment.cs
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Bumpy Road Ahead
EnsureApplicationMainUrl has 2 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is 2 blocks per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.
Check warning on line 121 in src/Umbraco.Web.Common/Middleware/UmbracoRequestMiddleware.cs
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Complex Method
InvokeAsync has a cyclomatic complexity of 12, 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.
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
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.
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.