V16/feature: get context resolves in undefined if not found #18611
CodeScene PR Check
Quality Gate Failed
Code Health Improved
(7 files improve in Code Health)
Gates Failed
Prevent hotspot decline
(1 hotspot with Complex Method)
Enforce critical code health rules
(3 files with Bumpy Road Ahead)
Enforce advisory code health rules
(27 files with Complex Method, Overall Code Complexity, Complex Conditional)
Gates Passed
1 Quality Gates Passed
See analysis details in CodeScene
Reason for failure
Prevent hotspot decline | Violations | Code Health Impact | |
---|---|---|---|
document-workspace.context.ts | 1 rule in this hotspot | 9.19 → 9.01 | Suppress |
Enforce critical code health rules | Violations | Code Health Impact | |
---|---|---|---|
temporary-file-manager.class.ts | 1 critical rule | 9.24 → 8.55 | Suppress |
block-list-entries.context.ts | 1 critical rule | 8.66 → 8.48 | Suppress |
block-grid-entries.context.ts | 1 critical rule | 6.82 → 6.69 | Suppress |
Enforce advisory code health rules | Violations | Code Health Impact | |
---|---|---|---|
external-login-modal.element.ts | 2 advisory rules | 9.69 → 8.90 | Suppress |
temporary-file-manager.class.ts | 1 advisory rule | 9.24 → 8.55 | Suppress |
block-list-entry.element.ts | 2 advisory rules | 9.38 → 8.81 | Suppress |
mfa-user.action.ts | 1 advisory rule | 10.00 → 9.69 | Suppress |
disable.action.ts | 1 advisory rule | 10.00 → 9.69 | Suppress |
enable.action.ts | 1 advisory rule | 10.00 → 9.69 | Suppress |
unlock.action.ts | 1 advisory rule | 10.00 → 9.69 | Suppress |
rename-server-file-repository-base.ts | 1 advisory rule | 10.00 → 9.69 | Suppress |
data-type-picker-flow-modal.element.ts | 1 advisory rule | 10.00 → 9.69 | Suppress |
anchor.tiptap-toolbar-api.ts | 1 advisory rule | 10.00 → 9.69 | Suppress |
document-unpublish-modal.element.ts | 1 advisory rule | 9.39 → 9.10 | Suppress |
block-manager.context.ts | 1 advisory rule | 9.07 → 8.80 | Suppress |
app-auth.controller.ts | 1 advisory rule | 9.64 → 9.37 | Suppress |
content-detail-workspace-base.ts | 1 advisory rule | 9.19 → 8.93 | Suppress |
entity-detail-workspace-base.ts | 1 advisory rule | 9.69 → 9.45 | Suppress |
publish.action.ts | 1 advisory rule | 9.25 → 9.04 | Suppress |
document-workspace.context.ts | 1 advisory rule | 9.19 → 9.01 | Suppress |
block-list-entries.context.ts | 1 advisory rule | 8.66 → 8.48 | Suppress |
unpublish.action.ts | 1 advisory rule | 9.45 → 9.29 | Suppress |
unpublish.bulk-action.ts | 1 advisory rule | 9.33 → 9.17 | Suppress |
block-grid-entries.context.ts | 1 advisory rule | 6.82 → 6.69 | Suppress |
publish.bulk-action.ts | 1 advisory rule | 8.65 → 8.52 | Suppress |
element.mixin.ts | 1 advisory rule | 9.69 → 9.58 | Suppress |
document-publishing.workspace-context.ts | 1 advisory rule | 7.96 → 7.87 | Suppress |
rollback-modal.element.ts | 1 advisory rule | 8.29 → 8.25 | Suppress |
block-grid-entry.context.ts | 1 advisory rule | 8.19 → 8.14 | Suppress |
class.mixin.ts | 1 advisory rule | 9.52 → 9.48 | Suppress |
View Improvements
File | Code Health Impact | Categories Improved |
---|---|---|
context-consumer.test.ts | no change | Code Duplication |
duplicate-to.action.ts | 9.53 → 9.55 | Complex Method |
move-to.action.ts | 9.53 → 9.55 | Complex Method |
duplicate-to.action.ts | no change | Complex Method |
embedded-media.tiptap-toolbar-api.ts | 9.69 → 10.00 | Complex Method |
link.tiptap-toolbar-api.ts | no change | Complex Method, Overall Code Complexity |
document-workspace-view-info.element.ts | 9.69 → 10.00 | Complex Method |
input-markdown.element.ts | 6.63 → 6.64 | Complex Method, Overall Code Complexity |
content-type-design-editor.element.ts | 8.26 → 8.28 | Complex Method, Overall Code Complexity |
duplicate-document.action.ts | 9.69 → 10.00 | Complex Method |
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
Details
🚩 Declining Code Health (highest to lowest):
- Complex Method publish.action.ts: UmbPublishDocumentEntityAction.execute
- Complex Method publish.bulk-action.ts: UmbDocumentPublishEntityBulkAction.execute
- Complex Method unpublish.action.ts: UmbUnpublishDocumentEntityAction.execute
- Complex Method unpublish.bulk-action.ts: UmbDocumentUnpublishEntityBulkAction.execute
- Complex Method document-publishing.workspace-context.ts: UmbDocumentPublishingWorkspaceContext.schedule
- Overall Code Complexity temporary-file-manager.class.ts
- Overall Code Complexity external-login-modal.element.ts
- Complex Method block-list-entries.context.ts: UmbBlockListEntriesContext.constructor
- Complex Method class.mixin.ts: UmbClassMixin
- Complex Method block-grid-entries.context.ts: UmbBlockGridEntriesContext.constructor
- Complex Method block-grid-entry.context.ts: UmbBlockGridEntryContext.copyToClipboard
- Complex Method element.mixin.ts: UmbElementMixin
- Complex Method document-publishing.workspace-context.ts: UmbDocumentPublishingWorkspaceContext.handleSaveAndPublish
- Complex Method app-auth.controller.ts: UmbAppAuthController.makeAuthorizationRequest
- Complex Method block-manager.context.ts: UmbBlockManagerContext._createBlockElementData
- Complex Method block-list-entry.element.ts: UmbBlockListEntryElement.copyToClipboard
- Complex Conditional block-list-entry.element.ts: UmbBlockListEntryElement.copyToClipboard
- Complex Method rename-server-file-repository-base.ts: UmbRenameServerFileRepositoryBase.rename
- Complex Method data-type-picker-flow-modal.element.ts: UmbDataTypePickerFlowModalElement.init
- Complex Method document-unpublish-modal.element.ts: UmbDocumentUnpublishModalElement.getReferences
- Complex Method anchor.tiptap-toolbar-api.ts: UmbTiptapToolbarAnchorExtensionApi.execute
- Complex Method mfa-user.action.ts: UmbMfaUserEntityAction.execute
- Complex Method disable.action.ts: UmbDisableUserEntityBulkAction.execute
- Complex Method enable.action.ts: UmbEnableUserEntityBulkAction.execute
- Complex Method unlock.action.ts: UmbUnlockUserEntityBulkAction.execute
- Complex Method rollback-modal.element.ts: UmbRollbackModalElement.onRollback
- Complex Method content-detail-workspace-base.ts: create
- Complex Method external-login-modal.element.ts: UmbCurrentUserExternalLoginModalElement.onProviderDisable
- Complex Method app-auth.controller.ts: UmbAppAuthController.showLoginModal
- Complex Method block-manager.context.ts: UmbBlockManagerContext.setInitialBlockExpose
- Complex Method entity-detail-workspace-base.ts: UmbEntityDetailWorkspaceContextBase._create
- Complex Method document-workspace.context.ts: UmbDocumentWorkspaceContext.handleSaveAndPreview 🔥
- Bumpy Road Ahead block-grid-entries.context.ts: UmbBlockGridEntriesContext.constructor
- Bumpy Road Ahead block-list-entries.context.ts: UmbBlockListEntriesContext.constructor
- Bumpy Road Ahead temporary-file-manager.class.ts: UmbTemporaryFileManager.validateItem
✅ Improving Code Health:
- Overall Code Complexity content-type-design-editor.element.ts
- Overall Code Complexity input-markdown.element.ts
- Overall Code Complexity link.tiptap-toolbar-api.ts
- Complex Method duplicate-to.action.ts: UmbMediaDuplicateEntityBulkAction.execute
- Complex Method move-to.action.ts: UmbMediaMoveEntityBulkAction.execute
- Code Duplication context-consumer.test.ts: 'disapproving discriminator does not fire callback'
- Complex Method duplicate-to.action.ts: UmbDuplicateToEntityAction.execute
- Complex Method link.tiptap-toolbar-api.ts: UmbTiptapToolbarLinkExtensionApi.execute
- Complex Method input-markdown.element.ts: UmbInputMarkdownElement.insertMedia
- Complex Method content-type-design-editor.element.ts: UmbContentTypeDesignEditorElement.openCompositionModal
- Complex Method duplicate-document.action.ts: UmbDuplicateDocumentEntityAction.execute
- Complex Method document-workspace-view-info.element.ts: UmbDocumentWorkspaceViewInfoElement.openTemplatePicker
- Complex Method embedded-media.tiptap-toolbar-api.ts: UmbTiptapToolbarEmbeddedMediaExtensionApi.execute
Annotations
Check warning on line 114 in src/Umbraco.Web.UI.Client/src/libs/class-api/class.mixin.ts
codescene-delta-analysis / CodeScene Cloud Delta Analysis (v16/dev)
❌ Getting worse: Complex Method
UmbClassMixin 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (v16/dev)
✅ Getting better: Code Duplication
reduced similar code in: 'disapproving discriminator does not fire callback'. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.
Check warning on line 93 in src/Umbraco.Web.UI.Client/src/libs/element-api/element.mixin.ts
codescene-delta-analysis / CodeScene Cloud Delta Analysis (v16/dev)
❌ Getting worse: Complex Method
UmbElementMixin increases in cyclomatic complexity from 9 to 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.
Check warning on line 68 in src/Umbraco.Web.UI.Client/src/apps/app/app-auth.controller.ts
codescene-delta-analysis / CodeScene Cloud Delta Analysis (v16/dev)
❌ Getting worse: Complex Method
UmbAppAuthController.makeAuthorizationRequest increases in cyclomatic complexity from 13 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 warning on line 127 in src/Umbraco.Web.UI.Client/src/apps/app/app-auth.controller.ts
codescene-delta-analysis / CodeScene Cloud Delta Analysis (v16/dev)
❌ New issue: Complex Method
UmbAppAuthController.showLoginModal 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 Cloud Delta Analysis (v16/dev)
✅ Getting better: Complex Method
UmbMediaDuplicateEntityBulkAction.execute decreases in cyclomatic complexity from 17 to 16, 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 Cloud Delta Analysis (v16/dev)
✅ Getting better: Complex Method
UmbMediaMoveEntityBulkAction.execute decreases in cyclomatic complexity from 17 to 16, 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 Cloud Delta Analysis (v16/dev)
✅ Getting better: Complex Method
UmbDuplicateToEntityAction.execute decreases in cyclomatic complexity from 11 to 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 Cloud Delta Analysis (v16/dev)
❌ New issue: Complex Method
UmbEntityDetailWorkspaceContextBase._create 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 Cloud Delta Analysis (v16/dev)
❌ Getting worse: Complex Method
UmbDocumentPublishEntityBulkAction.execute increases in cyclomatic complexity from 21 to 29, 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 Cloud Delta Analysis (v16/dev)
❌ Getting worse: Complex Method
UmbDocumentUnpublishEntityBulkAction.execute increases in cyclomatic complexity from 19 to 25, 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 Cloud Delta Analysis (v16/dev)
✅ No longer an issue: Complex Method
UmbTiptapToolbarEmbeddedMediaExtensionApi.execute is no longer above the threshold for cyclomatic complexity
codescene-delta-analysis / CodeScene Cloud Delta Analysis (v16/dev)
✅ Getting better: Complex Method
UmbTiptapToolbarLinkExtensionApi.execute decreases in cyclomatic complexity from 11 to 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 Cloud Delta Analysis (v16/dev)
✅ Getting better: Overall Code Complexity
The mean cyclomatic complexity decreases from 5.38 to 5.25, 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 (v16/dev)
❌ New issue: Complex Method
UmbCurrentUserExternalLoginModalElement.onProviderDisable 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 Cloud Delta Analysis (v16/dev)
❌ New issue: Overall Code Complexity
This module has a mean cyclomatic complexity of 4.57 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (v16/dev)
❌ New issue: Complex Method
UmbMfaUserEntityAction.execute 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 Cloud Delta Analysis (v16/dev)
❌ New issue: Complex Method
UmbDisableUserEntityBulkAction.execute 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 Cloud Delta Analysis (v16/dev)
❌ New issue: Complex Method
UmbEnableUserEntityBulkAction.execute 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 Cloud Delta Analysis (v16/dev)
❌ New issue: Complex Method
UmbUnlockUserEntityBulkAction.execute 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 Cloud Delta Analysis (v16/dev)
❌ Getting worse: Complex Method
UmbUnpublishDocumentEntityAction.execute increases in cyclomatic complexity from 20 to 26, 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 Cloud Delta Analysis (v16/dev)
❌ New issue: Complex Method
UmbDocumentUnpublishModalElement.getReferences 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 Cloud Delta Analysis (v16/dev)
❌ Getting worse: Complex Method
UmbDocumentPublishingWorkspaceContext.schedule increases in cyclomatic complexity from 21 to 23, 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 Cloud Delta Analysis (v16/dev)
❌ Getting worse: Complex Method
UmbDocumentPublishingWorkspaceContext.handleSaveAndPublish increases in cyclomatic complexity from 13 to 15, 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 Cloud Delta Analysis (v16/dev)
❌ Getting worse: Complex Method
UmbRollbackModalElement.onRollback increases in cyclomatic complexity from 9 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.