Skip to content

Add unit tests verifying the fix (as well as expanding the test cover…

7d17c43
Select commit
Loading
Failed to load commit list.
Merged

Redirects: Fix crash seen in Redirect URL Management dashboard when the redirect route does not contain '/' (closes #22308) #22309

Add unit tests verifying the fix (as well as expanding the test cover…
7d17c43
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Code Health Review (main) failed Apr 1, 2026 in 56s

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
NewDefaultUrlProviderTests.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 NewDefaultUrlProviderTests.cs

Annotations

Check warning on line 238 in tests/Umbraco.Tests.UnitTests/Umbraco.Core/Routing/NewDefaultUrlProviderTests.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 6 functions with similar structure: Can_Get_Absolute_Url_When_Domain_Differs_From_Current_Request,Can_Get_Relative_Url_When_Domain_Matches_Current_Request,Can_Get_Url_For_Route_With_Domain_Root_Id,Can_Get_Url_For_Route_With_Domain_Root_Id_And_Root_Path and 2 more functions. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.