Skip to content

Conversation

@vanch3d vanch3d self-assigned this Oct 2, 2025
@cla-bot cla-bot bot added the cla-signed label Oct 2, 2025
@vanch3d vanch3d marked this pull request as ready for review October 3, 2025 09:35
@github-actions
Copy link

github-actions bot commented Oct 3, 2025

Test Results

  460 files    460 suites   4m 3s ⏱️
3 850 tests 3 847 ✅ 3 💤 0 ❌
3 857 runs  3 854 ✅ 3 💤 0 ❌

Results for commit 9f8091d.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Oct 3, 2025

Coverage Report

Overall Project 65.04%

There is no coverage information present for the Files changed

@vanch3d vanch3d requested a review from Copilot October 3, 2025 13:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses SonarQube code quality issues by implementing various improvements including replacing deprecated methods with modern alternatives, removing redundant expressions, simplifying conditional checks, and improving import/export patterns.

  • Replaced deprecated replace() with replaceAll() and Array() constructor with new Array()
  • Added proper new keyword for Error constructors and simplified redundant logical expressions
  • Refactored import/export statements to use more concise patterns

Reviewed Changes

Copilot reviewed 36 out of 36 changed files in this pull request and generated no comments.

Show a summary per file
File Description
hivemq-edge-frontend/src/modules/Workspace/utils/topics-utils.ts Replaced replace() with replaceAll() for consistency
hivemq-edge-frontend/src/modules/Workspace/hooks/useEdgeFlowContext.ts Added new keyword to Error constructor
hivemq-edge-frontend/src/modules/Workspace/components/nodes/index.ts Simplified export statements using direct export syntax
hivemq-edge-frontend/src/modules/Pulse/components/assets/SourcesCell.spec.cy.tsx Updated Array constructor with new keyword
hivemq-edge-frontend/src/modules/Metrics/components/editor/MetricEditor.tsx Simplified conditional check using optional chaining
hivemq-edge-frontend/src/modules/Metrics/components/charts/SampleRenderer.tsx Replaced isNaN() with Number.isFinite() for better type checking
hivemq-edge-frontend/src/modules/EventLog/components/panel/EventDrawer.tsx Removed unused variables and unnecessary React Fragment
hivemq-edge-frontend/src/modules/DomainOntology/hooks/useGetChordMatrixData.ts Updated Array constructor with new keyword
hivemq-edge-frontend/src/modules/DomainOntology/components/parts/ChartWrapper.tsx Removed redundant logical AND expression
hivemq-edge-frontend/src/modules/Bridges/hooks/useBridgeConfig.ts Added new keyword to Error constructor
hivemq-edge-frontend/src/modules/Auth/hooks/useEdgeFlowContext.spec.ts Added test file for auth hook
hivemq-edge-frontend/src/modules/Auth/hooks/useAuth.ts Added new keyword to Error constructor
hivemq-edge-frontend/src/hooks/useGetEdgeTopics/useGetEdgeTopics.ts Replaced generic sort() with locale-aware comparison
hivemq-edge-frontend/src/hooks/useAccessibleDraggable/useAccessibleDraggable.ts Added new keyword to Error constructor
hivemq-edge-frontend/src/hooks/useAccessibleDraggable/index.ts Simplified export statements using direct export syntax
hivemq-edge-frontend/src/extensions/datahub/utils/policy.utils.ts Simplified conditional check using optional chaining
hivemq-edge-frontend/src/extensions/datahub/hooks/usePolicyGuards.ts Removed redundant logical AND expression
hivemq-edge-frontend/src/extensions/datahub/hooks/useGetFilteredFunctions.ts Simplified conditional check using optional chaining
hivemq-edge-frontend/src/extensions/datahub/hooks/useFilteredFunctionsFetcher.ts Simplified conditional check using optional chaining
hivemq-edge-frontend/src/extensions/datahub/hooks/useDataHubDraftStore.ts Simplified conditional check using optional chaining
hivemq-edge-frontend/src/extensions/datahub/designer/operation/OperationNode.utils.ts Simplified conditional checks using optional chaining
hivemq-edge-frontend/src/components/rjsf/utils/getChakra.ts Simplified conditional check using optional chaining
hivemq-edge-frontend/src/components/rjsf/Widgets/UpDownWidget.tsx Removed redundant logical AND expressions
hivemq-edge-frontend/src/components/rjsf/Templates/CompactBaseInputTemplate.tsx Removed redundant logical AND expressions
hivemq-edge-frontend/src/components/rjsf/Form/error-focus.utils.ts Simplified conditional check using optional chaining
hivemq-edge-frontend/src/components/rjsf/BaseInputTemplate.tsx Removed redundant logical AND expressions
hivemq-edge-frontend/src/components/rjsf/ArrayFieldItemTemplate.tsx Removed redundant logical OR expression
hivemq-edge-frontend/src/components/WarningMessage.tsx Simplified type annotation by removing unnecessary union with undefined
hivemq-edge-frontend/src/components/PaginatedTable/PaginatedTable.spec.cy.tsx Updated Array constructor with new keyword
hivemq-edge-frontend/src/components/Icons/index.ts Simplified export statements using direct export syntax
hivemq-edge-frontend/src/api/hooks/useGetMetrics/handlers/index.ts Updated Array constructor with new keyword
hivemq-edge-frontend/src/api/hooks/useEvents/handlers/index.ts Updated Array constructor with new keyword
hivemq-edge-frontend/src/test-utils/rjsf/rjsf.mocks.tsx Simplified type annotation by removing unnecessary union with undefined
hivemq-edge-frontend/src/test-utils/color.ts Replaced parseInt() with Number.parseInt()
hivemq-edge-frontend/cypress/utils/datahub.utils.ts Replaced generic sort() with locale-aware comparison
.github/workflows/check.yml Added debug output for openapi-changed workflow step

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@oli-hivemq oli-hivemq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🦣

@codepitbull codepitbull merged commit 82a16a2 into master Oct 13, 2025
17 of 21 checks passed
@codepitbull codepitbull deleted the fix/37027-code-quality branch October 13, 2025 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants