Repository navigation
Publishing: Validate segment values on scheduled publish, publish with descendants and create/update-and-publish (closes #24558) - #24559
CodeScene PR Check
Quality Gate Failed
Gates Failed
Enforce critical code health rules
(1 file with Bumpy Road Ahead)
Enforce advisory code health rules
(2 files with Complex Method, Primitive Obsession)
Gates Passed
2 Quality Gates Passed
See analysis details in CodeScene
Reason for failure
| Enforce critical code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| PropertyValidationService.cs | 1 critical rule | 7.00 → 6.64 | Suppress |
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| PropertyValidationService.cs | 1 advisory rule | 7.00 → 6.64 | Suppress |
| ContentPublishingServiceTests.Publish.cs | 1 advisory rule | no change | 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):
- Primitive Obsession ContentPublishingServiceTests.Publish.cs
- Complex Method PropertyValidationService.cs: HasInvalidSegmentValue
- Bumpy Road Ahead PropertyValidationService.cs: HasInvalidSegmentValue
- Complex Method PropertyValidationService.cs: IsPropertyDataValid
✅ Improving Code Health:
- String Heavy Function Arguments ContentPublishingServiceTests.Publish.cs
Annotations
Check warning on line 148 in src/Umbraco.Core/Services/PropertyValidationService.cs
codescene-delta-analysis / CodeScene Code Health Review (v19/dev)
❌ Getting worse: Complex Method
IsPropertyDataValid increases in cyclomatic complexity from 10 to 11, 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 248 in src/Umbraco.Core/Services/PropertyValidationService.cs
codescene-delta-analysis / CodeScene Code Health Review (v19/dev)
❌ New issue: Complex Method
HasInvalidSegmentValue has a cyclomatic complexity of 14, 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 248 in src/Umbraco.Core/Services/PropertyValidationService.cs
codescene-delta-analysis / CodeScene Code Health Review (v19/dev)
❌ New issue: Bumpy Road Ahead
HasInvalidSegmentValue has 2 blocks with nested conditional logic. Any nesting of 2 or deeper is considered.
Threshold is 2 blocks per function
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.
codescene-delta-analysis / CodeScene Code Health Review (v19/dev)
❌ New issue: Primitive Obsession
In this module, 61.1% of all function arguments are primitive types, 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 (v19/dev)
✅ No longer an issue: String Heavy Function Arguments
The ratio of strings in function arguments is no longer above the threshold