Skip to content

test: add problematic code to trigger Quality Gate failure

cc33921
Select commit
Loading
Failed to load commit list.
Merged

test: verify branch protection with SonarQube #2

test: add problematic code to trigger Quality Gate failure
cc33921
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Dec 1, 2025 in 29s

Quality Gate failed

Failed conditions
2 Security Hotspots
0.0% Coverage on New Code (required ≥ 80%)
B Maintainability Rating on New Code (required ≥ A)
E Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Annotations

Check warning on line 16 in src/utils/testBadCode.js

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Function 'complexFunction' has too many parameters (10). Maximum allowed is 7.

See more on https://sonarcloud.io/project/issues?id=Lforlinux_diffctl&issues=AZrbkWxXix4m0SbCNvtK&open=AZrbkWxXix4m0SbCNvtK&pullRequest=2

Check warning on line 44 in src/utils/testBadCode.js

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Handle this exception or don't catch it at all.

See more on https://sonarcloud.io/project/issues?id=Lforlinux_diffctl&issues=AZrbkWxXix4m0SbCNvtL&open=AZrbkWxXix4m0SbCNvtL&pullRequest=2

Check failure on line 48 in src/utils/testBadCode.js

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Correct this loop's end condition to not be invariant.

See more on https://sonarcloud.io/project/issues?id=Lforlinux_diffctl&issues=AZrbkWxXix4m0SbCNvtM&open=AZrbkWxXix4m0SbCNvtM&pullRequest=2