Uploaded image for project: 'Red Hat Advanced Cluster Management'
  1. Red Hat Advanced Cluster Management
  2. ACM-25232

Installer: MCH operator postsubmit SonarCloud job fails due to code quality grade 'C'

XMLWordPrintable

    • Installer Sprint 2025-70
    • None

      Description of problem:

      The postsubmit SonarCloud job for the MCH operator repository is currently failing due to a code quality grade of 'C'. The failure is triggered by a ShellCheck warning about identical expressions used on both sides of the || operator:

       

      Correct one of the identical expressions on both sides of operator '||'.
      Identical expressions should not be used on both sides of a binary operator [shelldre:S1764](https://sonarcloud.io/organizations/open-cluster-management/rules?open=shelldre%3AS1764&rule_key=shelldre%3AS1764)
      if [[ $FILE == *".ts" || $FILE == *".tsx" ]]; then
      

      Impact

      The Sonar grade drops to 'C', causing the postsubmit job to fail.This blocks successful postsubmit validation, which requires a minimum grade of 'A'.

      Suggested Fix

      Refactor the condition to avoid repeating similar expressions and comply with the rule shelldre:S1764.

      Version-Release number of selected component (if applicable):

      ACM 2.15.0

      How reproducible:

      After merging a PR to release-2.15.

      Steps to Reproduce:

      1. Open PR.
      2. Merge PR.
      3. Sonarcloud postsubmit job fails.

      Actual results:

      Sonarcloud postsubmit job fails.

      Expected results:

      Sonarcloud postsubmit job should pass.

      Additional info:

              dbennett@redhat.com Disaiah Bennett
              dbennett@redhat.com Disaiah Bennett
              Matthew Smigielski Matthew Smigielski
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: