Repository navigation
Content Types: Allow editing compositions on document types that are inherited from (closes #23103) - #23433
CodeScene PR Check
Quality Gate Failed
Gates Failed
Enforce critical code health rules
(1 file with Low Cohesion)
Enforce advisory code health rules
(1 file with Complex Method)
Gates Passed
2 Quality Gates Passed
See analysis details in CodeScene
Reason for failure
| Enforce critical code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| ContentTypeEditingServiceTests.Update.cs | 1 critical rule | 4.90 → 4.64 | Suppress |
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| ContentTypeServiceBase{TRepository,TItem}.cs | 1 advisory rule | 6.72 → 6.70 | 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):
- Low Cohesion ContentTypeEditingServiceTests.Update.cs
- Complex Method ContentTypeServiceBase{TRepository,TItem}.cs: ComposeContentTypeChanges
✅ Improving Code Health:
- Code Duplication ContentTypeEditingServiceTests.Update.cs: Cannot_Add_Compositions_For_Content_Type_With_Children
- Code Duplication ContentTypeServiceExtensionsTests.cs: GetAvailableCompositeContentTypes_No_Results_If_Already_A_Composition_By_Parent
Annotations
codescene-delta-analysis / CodeScene Code Health Review (v17/dev)
❌ Getting worse: Low Cohesion
The number of different responsibilities increases from 14 to 15, 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 (v17/dev)
✅ Getting better: Code Duplication
reduced similar code in: Cannot_Add_Compositions_For_Content_Type_With_Children
Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.
codescene-delta-analysis / CodeScene Code Health Review (v17/dev)
✅ Getting better: Code Duplication
reduced similar code in: GetAvailableCompositeContentTypes_No_Results_If_Already_A_Composition_By_Parent
Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.
Check warning on line 442 in src/Umbraco.Core/Services/ContentTypeServiceBase{TRepository,TItem}.cs
codescene-delta-analysis / CodeScene Code Health Review (v17/dev)
❌ Getting worse: Complex Method
ComposeContentTypeChanges increases in cyclomatic complexity from 26 to 27, 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.