Application URL: Add ApplicationUrlDetection setting to control application URL auto-detection#22307
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
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.
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.
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.