Icons: extends icon data + improved search - #22436
CodeScene PR Check
Quality Gate Failed
Gates Failed
Enforce critical code health rules
(1 file with Bumpy Road Ahead)
Enforce advisory code health rules
(4 files with Complex Method, Complex Conditional, Overall Code Complexity)
Gates Passed
2 Quality Gates Passed
See analysis details in CodeScene
Reason for failure
| Enforce critical code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| index.js | 1 critical rule | 9.30 → 9.06 | Suppress |
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| icon-search.controller.ts | 3 advisory rules | 8.70 | Suppress |
| levenshtein.function.ts | 1 advisory rule | 9.69 | Suppress |
| index.js | 1 advisory rule | 9.30 → 9.06 | Suppress |
| icon-picker-modal.element.ts | 1 advisory rule | 9.69 → 9.47 | 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 index.js: collectDictionaryIcons
- Overall Code Complexity icon-search.controller.ts
- Complex Conditional icon-search.controller.ts: UmbIconSearchController.scoreIcon
- Complex Method levenshtein.function.ts: levenshteinDistance
- Complex Method icon-picker-modal.element.ts: UmbIconPickerModalElement.filterIcons
- Complex Method icon-search.controller.ts: UmbIconSearchController.search
- Complex Method icon-search.controller.ts: UmbIconSearchController.scoreIcon
- Bumpy Road Ahead index.js: mergeUnique
Annotations
Check warning on line 196 in src/Umbraco.Web.UI.Client/devops/icons/index.js
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ Getting worse: Complex Method
collectDictionaryIcons already has high cyclomatic complexity, and now it increases in Lines of Code from 99 to 118. 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 45 in src/Umbraco.Web.UI.Client/devops/icons/index.js
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Bumpy Road Ahead
mergeUnique 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 (main)
❌ New issue: Complex Method
UmbIconPickerModalElement.filterIcons has a cyclomatic complexity of 10, 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.
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Complex Method
levenshteinDistance has a cyclomatic complexity of 9, 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.
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Complex Method
UmbIconSearchController.search 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.
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Complex Method
UmbIconSearchController.scoreIcon has a cyclomatic complexity of 13, 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.
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Complex Conditional
UmbIconSearchController.scoreIcon has 1 complex conditionals with 2 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.
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Overall Code Complexity
This module has a mean cyclomatic complexity of 5.14 across 7 functions. The mean complexity threshold is 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.