Fix date conversion on the server-side #16841
Merged
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (v14/dev)
failed
Jul 30, 2024 in 44s
CodeScene PR Check
❌ Code Health Quality Gates: FAILED
Change in average Code Health of affected files: +0.15 (6.20 -> 6.35)
- Declining Code Health: 1 findings(s) 🚩
Details
🚩 Declining Code Health (highest to lowest):
- Complex Method ObjectExtensions.cs: TryConvertTo
Annotations
Check warning on line 239 in src/Umbraco.Core/Extensions/ObjectExtensions.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (v14/dev)
❌ Getting worse: Complex Method
TryConvertTo increases in cyclomatic complexity from 28 to 32, 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 notice on line 1 in src/Umbraco.Core/Extensions/ObjectExtensions.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (v14/dev)
ℹ Getting worse: Overall Code Complexity
The mean cyclomatic complexity increases from 7.24 to 7.43, threshold = 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (v14/dev)
ℹ Getting worse: Code Duplication
introduced similar code in: CanConvertDateTimeOffsetToDateTime,DiscardsOffsetWhenConvertingDateTimeOffsetToDateTime. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.
Loading