POC: Feat/make indexing more resiliant #16546
CodeScene PR Check
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 4 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
Details
🚩 Declining Code Health (highest to lowest):
- Complex Method ExamineIndexRebuilder.cs: RebuildIndexes
- Missing Arguments Abstractions ContentIndexPopulator.cs
- Excess Number of Function Arguments IndexRebuildStatusManager.cs: UpdatePopulatorStatus
- Constructor Over-Injection ExamineManagementController.cs: ExamineManagementController
✅ Improving Code Health:
- Overall Code Complexity ExamineIndexRebuilder.cs
Annotations
Check warning on line 1 in src/Umbraco.Infrastructure/Examine/ContentIndexPopulator.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (v13/dev)
❌ New issue: Missing Arguments Abstractions
The average number of function arguments in this module is 4.13 across 8 functions. The average arguments threshold is 4.00. The functions in this file have too many arguments, indicating a lack of encapsulation or too many responsibilities in the same functions. Avoid adding more.
Check notice on line 99 in src/Umbraco.Infrastructure/Examine/ContentIndexPopulator.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (v13/dev)
ℹ New issue: Constructor Over-Injection
ContentIndexPopulator has 8 arguments, threshold = 5. This constructor has too many arguments, indicating an object with low cohesion or missing function argument abstraction. Avoid adding more arguments.
Check warning on line 246 in src/Umbraco.Infrastructure/Examine/ExamineIndexRebuilder.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (v13/dev)
❌ Getting worse: Complex Method
RebuildIndexes increases in cyclomatic complexity from 12 to 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 notice on line 1 in src/Umbraco.Infrastructure/Examine/ExamineIndexRebuilder.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (v13/dev)
✅ Getting better: Overall Code Complexity
The mean cyclomatic complexity decreases from 4.71 to 4.50, 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.
Check notice on line 52 in src/Umbraco.Infrastructure/Examine/ExamineIndexRebuilder.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (v13/dev)
ℹ New issue: Constructor Over-Injection
ExamineIndexRebuilder has 7 arguments, threshold = 5. This constructor has too many arguments, indicating an object with low cohesion or missing function argument abstraction. Avoid adding more arguments.
Check warning on line 91 in src/Umbraco.Infrastructure/Examine/IndexRebuildStatusManager.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (v13/dev)
❌ New issue: Excess Number of Function Arguments
UpdatePopulatorStatus has 5 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
Check warning on line 52 in src/Umbraco.Web.BackOffice/Controllers/ExamineManagementController.cs
codescene-delta-analysis / CodeScene Cloud Delta Analysis (v13/dev)
❌ New issue: Constructor Over-Injection
ExamineManagementController has 6 arguments, threshold = 5. This constructor has too many arguments, indicating an object with low cohesion or missing function argument abstraction. Avoid adding more arguments.