-
Bug
-
Resolution: Done
-
Normal
-
ACM 2.15.0
-
Quality / Stability / Reliability
-
False
-
-
False
-
-
-
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:
- Open PR.
- Merge PR.
- Sonarcloud postsubmit job fails.
Actual results:
Sonarcloud postsubmit job fails.
Expected results:
Sonarcloud postsubmit job should pass.