Skip to content

fix(apps): resolve CodeQL static analysis warnings across codebase#1557

Merged
ArtieReus merged 20 commits intomainfrom
artie-fix-more-codeql-findings
Mar 24, 2026
Merged

fix(apps): resolve CodeQL static analysis warnings across codebase#1557
ArtieReus merged 20 commits intomainfrom
artie-fix-more-codeql-findings

Conversation

@ArtieReus
Copy link
Copy Markdown
Collaborator

@ArtieReus ArtieReus commented Mar 20, 2026

Summary

Resolves all CodeQL static analysis warnings to improve code quality, reliability, and maintainability. These fixes address potential bugs, redundant code, and anti-patterns detected by automated code scanning.

Changes by Category

Malformed HTML Attributes (3 fixes)

  • Toast.test.tsx, Message.test.tsx, ComboBox.test.tsx: Fixed malformed id attributes containing spaces
    • Changed "My shiny little Message""my-shiny-little-message"
    • Changed "My Id""my-id"
    • HTML IDs must not contain whitespace per W3C standards

Comparison Between Inconvertible Types (2 fixes)

  • Highlighter.tsx: Fixed boolean comparison error
    • Changed (!mutation.type === "childList")(mutation.type !== "childList")
    • Original condition always evaluated to false due to comparing boolean to string
  • createFiltersSlice.tsx: Added explicit array type check
    • Added Array.isArray() check to properly validate object types

Useless Conditional (2 fixes)

  • filterViolations.ts: Removed redundant boolean AND operation
    • Changed found = found && ...found = ... (found was always true)
  • AlertStatus.tsx: Fixed redundant null check
    • Changed {alert && ...}{alert?.status?.state && ...} after early return
    • Prevents rendering empty span elements

Expression Has No Effect (2 fixes)

  • ClusterEdit.tsx: Removed useless property access clusterInEdit?.spec
    • Line was evaluating property but not using the result
  • createSilencesSlice.tsx: Fixed zustand set() call syntax
    • Changed comma operator (set(...), false) → proper function call set(..., false)

Duplicate Property (1 fix)

  • teams/lib/store.ts: Removed duplicate namespace property
    • Property was declared twice in object literal (copy-paste error)

Missing Variable Declaration (1 fix)

  • helpers.ts: Added missing let declaration for errMsg variable
    • Variable was becoming a global without declaration, causing potential bugs

Useless Assignment to Local Variable (1 fix)

  • OptionInput.tsx: Removed unused object variable in JSON validation
    • Function only validates JSON syntax, doesn't need parsed result

Related Issues

  • Code quality findings from CodeQL

Testing Instructions

  1. pnpm i
  2. pnpm run test

Checklist

  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have made corresponding changes to the documentation (if applicable).
  • My changes generate no new warnings or errors.
  • I have created a changeset for my changes.

PR Manifesto

Review the PR Manifesto for best practises.

@ArtieReus ArtieReus requested review from a team and franzheidl as code owners March 20, 2026 11:37
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 20, 2026

🦋 Changeset detected

Latest commit: ccee003

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@cloudoperators/juno-ui-components Patch
@cloudoperators/juno-app-greenhouse Patch
@cloudoperators/juno-app-supernova Patch
@cloudoperators/juno-app-doop Patch
@cloudoperators/juno-app-carbon Patch
@cloudoperators/juno-app-example Patch
@cloudoperators/juno-app-heureka Patch
@cloudoperators/juno-app-template Patch
@cloudoperators/juno-messages-provider Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ArtieReus ArtieReus self-assigned this Mar 20, 2026
Comment thread packages/url-state-provider/src/v2/encode.spec.ts Fixed
Comment thread apps/supernova/src/lib/createFiltersSlice.tsx Fixed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 20, 2026

PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-03-24 14:16 UTC

TilmanHaupt
TilmanHaupt previously approved these changes Mar 20, 2026
hodanoori
hodanoori previously approved these changes Mar 24, 2026
Comment thread apps/supernova/src/lib/createFiltersSlice.tsx Outdated
@ArtieReus ArtieReus dismissed stale reviews from hodanoori and TilmanHaupt via ab21fa5 March 24, 2026 13:33
@ArtieReus ArtieReus merged commit b7becbc into main Mar 24, 2026
18 checks passed
@ArtieReus ArtieReus deleted the artie-fix-more-codeql-findings branch March 24, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants