Repository navigation
Merge-up: Merge v17/dev into main - #24156
CodeScene PR Check
Quality Gate Failed
Gates Failed
Enforce critical code health rules
(1 file with Deep, Nested Complexity)
Enforce advisory code health rules
(2 files with Complex Method, Complex Conditional, Code Duplication)
Gates Passed
2 Quality Gates Passed
See analysis details in CodeScene
Reason for failure
| Enforce critical code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| ContentTypeServiceBase{TRepository,TItem}.cs | 1 critical rule | 7.22 → 6.58 | Suppress |
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| ContentTypeServiceBase{TRepository,TItem}.cs | 2 advisory rules | 7.22 → 6.58 | Suppress |
| UriProviderTests.cs | 1 advisory rule | 10.00 → 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):
- Complex Method ContentTypeServiceBase{TRepository,TItem}.cs: ComposeContentTypeChanges
- Complex Conditional ContentTypeServiceBase{TRepository,TItem}.cs: ComposeContentTypeChanges
- Deep, Nested Complexity ContentTypeServiceBase{TRepository,TItem}.cs: ComposeContentTypeChanges
- Code Duplication UriProviderTests.cs
✅ Improving Code Health:
- Low Cohesion ContentTypeEditingServiceTests.Update.cs
- Large Assertion Blocks ContentTypeEditingServiceTests.Update.cs
- Primitive Obsession ContentTypeServiceBase{TRepository,TItem}.cs
- Primitive Obsession ContentTypeEditingServiceTests.Update.cs
Annotations
Check warning on line 553 in src/Umbraco.Core/Services/ContentTypeServiceBase{TRepository,TItem}.cs
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ Getting worse: Complex Method
ComposeContentTypeChanges increases in cyclomatic complexity from 35 to 39, 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 553 in src/Umbraco.Core/Services/ContentTypeServiceBase{TRepository,TItem}.cs
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ Getting worse: Complex Conditional
ComposeContentTypeChanges increases from 1 complex conditionals with 2 branches to 2 complex conditionals
with 4 branches, threshold = 2
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 warning on line 553 in src/Umbraco.Core/Services/ContentTypeServiceBase{TRepository,TItem}.cs
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Deep, Nested Complexity
ComposeContentTypeChanges has a nested complexity depth of 4, threshold = 4
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.Core/Services/ContentTypeServiceBase{TRepository,TItem}.cs
codescene-delta-analysis / CodeScene Code Health Review (main)
✅ Getting better: Primitive Obsession
The ratio of primitive types in function arguments decreases from 59.09% to 58.93%, 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.
codescene-delta-analysis / CodeScene Code Health Review (main)
✅ Getting better: Low Cohesion
The number of different responsibilities decreases from 18 to 17, threshold = 3
Cohesion is calculated using the LCOM4 metric. Low cohesion means that the module/class has multiple
unrelated responsibilities, doing too many things and breaking the Single Responsibility Principle.
codescene-delta-analysis / CodeScene Code Health Review (main)
✅ Getting better: Primitive Obsession
The ratio of primitive types in function arguments decreases from 88.46% to 83.33%, 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.
codescene-delta-analysis / CodeScene Code Health Review (main)
✅ Getting better: Large Assertion Blocks
The number of large assertion blocks decreases from 25 to 24, threshold = 4
This test file has several blocks of large, consecutive assert statements. Avoid adding more.
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Code Duplication
The module contains 5 functions with similar structure: CanCreateForgotPasswordUri_WithoutApplicationMainUrl_FailsWithApplicationUrlNotConfigured,ForgotPasswordUri_WithApplicationMainUrl_ReturnsAbsoluteUri,ForgotPasswordUri_WithoutApplicationMainUrl_FailsWithApplicationUrlNotConfigured,InviteUri_WithApplicationMainUrl_ReturnsAbsoluteUri
and 1 more functions
Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.