Skip to content

Add additional unit and integration tests verifying the refactorings …

3a264f5
Select commit
Loading
Failed to load commit list.
Merged

Repositories: Quote table, column and alias names (closes #21451) #21577

Add additional unit and integration tests verifying the refactorings …
3a264f5
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Code Health Review (main) failed Feb 3, 2026 in 1m 6s

CodeScene PR Check

Quality Gate Failed

Code Health Improved (2 files improve in Code Health)

Gates Failed
Enforce advisory code health rules (1 file with Large Method)

Gates Passed
3 Quality Gates Passed

See analysis details in CodeScene

Reason for failure
Enforce advisory code health rules Violations Code Health Impact
UserRepositoryTest.cs 1 advisory rule 9.10 → 8.69 Suppress
View Improvements
File Code Health Impact Categories Improved
RedirectUrlRepository.cs 9.10 → 9.69 Code Duplication
UserRepository.cs 4.14 → 4.72 Brain Method, Complex Method, Complex Conditional, Bumpy Road Ahead, Deep, Nested Complexity, Primitive Obsession

Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.

Details

🚩 Declining Code Health (highest to lowest):

  • Large Method UserRepositoryTest.cs: Can_Get_Paged_Results_Filtered_By_User_State

✅ Improving Code Health:

  • Complex Conditional UserRepository.cs: GetPagedResultsByQuery
  • Complex Method UserRepository.cs: GetPagedResultsByQuery
  • Bumpy Road Ahead UserRepository.cs: GetPagedResultsByQuery
  • Deep, Nested Complexity UserRepository.cs: GetPagedResultsByQuery
  • Primitive Obsession UserRepository.cs
  • Code Duplication RedirectUrlRepositoryTests.cs
  • Code Duplication RedirectUrlRepository.cs
  • Brain Method UserRepository.cs: GetPagedResultsByQuery

Annotations

Check notice on line 1 in src/Umbraco.Infrastructure/Persistence/Repositories/Implement/RedirectUrlRepository.cs

See this annotation in the file changed.

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

✅ No longer an issue: Code Duplication

The module no longer contains too many functions with similar structure

Check notice on line 1154 in src/Umbraco.Infrastructure/Persistence/Repositories/Implement/UserRepository.cs

See this annotation in the file changed.

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

✅ No longer an issue: Brain Method

GetPagedResultsByQuery is no longer a brain method

Check notice on line 1154 in src/Umbraco.Infrastructure/Persistence/Repositories/Implement/UserRepository.cs

See this annotation in the file changed.

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

✅ No longer an issue: Complex Method

GetPagedResultsByQuery is no longer above the threshold for cyclomatic complexity. 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 1136 in src/Umbraco.Infrastructure/Persistence/Repositories/Implement/UserRepository.cs

See this annotation in the file changed.

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

✅ No longer an issue: Complex Conditional

GetPagedResultsByQuery no longer has a complex conditional. A complex conditional is an expression inside a branch (e.g. if, for, while) which consists of multiple, logical operators such as AND/OR. The more logical operators in an expression, the more severe the code smell.

Check notice on line 1154 in src/Umbraco.Infrastructure/Persistence/Repositories/Implement/UserRepository.cs

See this annotation in the file changed.

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

✅ No longer an issue: Bumpy Road Ahead

GetPagedResultsByQuery is no longer above the threshold for logical blocks with deeply nested code. 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 notice on line 1154 in src/Umbraco.Infrastructure/Persistence/Repositories/Implement/UserRepository.cs

See this annotation in the file changed.

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

✅ No longer an issue: Deep, Nested Complexity

GetPagedResultsByQuery is no longer above the threshold for nested complexity depth. This function contains deeply nested logic such as if statements and/or loops. The deeper the nesting, the lower the code health.

Check notice on line 1 in src/Umbraco.Infrastructure/Persistence/Repositories/Implement/UserRepository.cs

See this annotation in the file changed.

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

✅ Getting better: Primitive Obsession

The ratio of primitive types in function arguments decreases from 51.25% to 49.46%, threshold = 30.0%. The functions in this file have too many primitive types (e.g. int, double, float) in their function argument lists. Using many primitive types lead to the code smell Primitive Obsession. Avoid adding more primitive arguments.

Check notice on line 1 in tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/RedirectUrlRepositoryTests.cs

See this annotation in the file changed.

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

✅ Getting better: Code Duplication

reduced similar code in: CanSaveAndGet,CanSaveAndGetMostRecent,CanSaveAndGetMostRecentForCulture,CanSaveAndGetWithCulture. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.

Check warning on line 483 in tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/UserRepositoryTest.cs

See this annotation in the file changed.

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

❌ New issue: Large Method

Can_Get_Paged_Results_Filtered_By_User_State has 81 lines, 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.