Skip to content

Migrate intergration tests to new implementation

cc86fb8
Select commit
Loading
Failed to load commit list.
Merged

V15: Fix Url Preview #18072

Migrate intergration tests to new implementation
cc86fb8
Select commit
Loading
Failed to load commit list.
This check has been archived and is scheduled for deletion. Learn more about checks retention
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (v15/dev) failed Jan 22, 2025 in 50s

CodeScene PR Check

Code Health Quality Gates: FAILED

Change in average Code Health of affected files: +0.35 (7.30 -> 7.65)

  • Declining Code Health: 3 findings(s) 🚩
  • Improving Code Health: 2 findings(s) ✅

View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Large Method UmbracoBuilder.cs: AddCoreServices
  • Complex Method DocumentUrlService.cs: ListUrlsAsync
  • Constructor Over-Injection PublishedUrlInfoProvider.cs: PublishedUrlInfoProvider

✅ Improving Code Health:

  • Primitive Obsession DocumentUrlServiceTest_hidetoplevel_false.cs
  • String Heavy Function Arguments DocumentUrlServiceTest_hidetoplevel_false.cs

Annotations

Check warning on line 241 in src/Umbraco.Core/DependencyInjection/UmbracoBuilder.cs

See this annotation in the file changed.

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

❌ Getting worse: Large Method

AddCoreServices increases from 201 to 202 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 39 in src/Umbraco.Core/Routing/PublishedUrlInfoProvider.cs

See this annotation in the file changed.

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

❌ New issue: Constructor Over-Injection

PublishedUrlInfoProvider has 8 arguments, threshold = 5. This constructor has too many arguments, indicating an object with low cohesion or missing function argument abstraction. Avoid adding more arguments.

Check warning on line 528 in src/Umbraco.Core/Services/DocumentUrlService.cs

See this annotation in the file changed.

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

❌ Getting worse: Complex Method

ListUrlsAsync already has high cyclomatic complexity, and now it increases in Lines of Code from 112 to 113. 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 notice on line 1 in tests/Umbraco.Tests.Integration/Umbraco.Core/Services/DocumentUrlServiceTest_hidetoplevel_false.cs

See this annotation in the file changed.

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

✅ No longer an issue: Primitive Obsession

The ratio of primivite types in function arguments is no longer above the threshold

Check notice on line 1 in tests/Umbraco.Tests.Integration/Umbraco.Core/Services/DocumentUrlServiceTest_hidetoplevel_false.cs

See this annotation in the file changed.

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

✅ No longer an issue: String Heavy Function Arguments

The ratio of strings in function arguments is no longer above the threshold