opencode-sonarqube 1.2.32 → 1.2.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +44 -54
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -20876,49 +20876,37 @@ Git operation completed with changes. Consider running:
|
|
|
20876
20876
|
if (result.block && args) {
|
|
20877
20877
|
const aiMessage = `echo "
|
|
20878
20878
|
================================================================================
|
|
20879
|
-
\uD83D\uDEAB COMMIT BLOCKED BY SONARQUBE
|
|
20879
|
+
\uD83D\uDEAB COMMIT BLOCKED BY SONARQUBE - CODE QUALITY ISSUES DETECTED
|
|
20880
20880
|
================================================================================
|
|
20881
20881
|
|
|
20882
|
-
|
|
20883
|
-
SonarQube is a code quality tool that analyzes your code for bugs, vulnerabilities,
|
|
20884
|
-
security issues, and code smells. This project has pre-commit blocking enabled,
|
|
20885
|
-
which means commits are blocked if the code quality is not good enough.
|
|
20882
|
+
Your commit was BLOCKED because the code quality check failed.
|
|
20886
20883
|
|
|
20887
|
-
|
|
20888
|
-
|
|
20889
|
-
|
|
20884
|
+
⚠️ DO NOT try to bypass this by:
|
|
20885
|
+
- Deleting opencode.json
|
|
20886
|
+
- Removing the sonarqube plugin
|
|
20887
|
+
- Retrying the same commit repeatedly
|
|
20888
|
+
|
|
20889
|
+
This blocking is INTENTIONAL to maintain code quality!
|
|
20890
20890
|
|
|
20891
|
-
|
|
20891
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
20892
20892
|
|
|
20893
|
-
|
|
20894
|
-
Use the sonarqube tool to view the issues:
|
|
20895
|
-
sonarqube({ action: 'issues' })
|
|
20893
|
+
TO FIX THIS, follow these steps:
|
|
20896
20894
|
|
|
20897
|
-
|
|
20898
|
-
|
|
20899
|
-
|
|
20900
|
-
|
|
20901
|
-
|
|
20902
|
-
|
|
20895
|
+
1️⃣ FIRST: Check what issues exist
|
|
20896
|
+
Run: sonarqube({ action: 'issues' })
|
|
20897
|
+
|
|
20898
|
+
2️⃣ THEN: Fix the reported issues in your code
|
|
20899
|
+
Common issues: hardcoded secrets, SQL injection, unused variables, etc.
|
|
20900
|
+
|
|
20901
|
+
3️⃣ FINALLY: Try committing again AFTER fixing the issues
|
|
20903
20902
|
|
|
20904
|
-
|
|
20905
|
-
Edit the files to resolve the issues. Common issues include:
|
|
20906
|
-
- Hardcoded passwords or API keys
|
|
20907
|
-
- SQL injection vulnerabilities
|
|
20908
|
-
- Unused variables
|
|
20909
|
-
- Code duplication
|
|
20910
|
-
- Missing null checks
|
|
20903
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
20911
20904
|
|
|
20912
|
-
|
|
20913
|
-
|
|
20905
|
+
AVAILABLE COMMANDS:
|
|
20906
|
+
sonarqube({ action: 'issues' }) → See all code quality issues
|
|
20907
|
+
sonarqube({ action: 'status' }) → Check quality gate status
|
|
20908
|
+
sonarqube({ action: 'analyze' }) → Re-run full analysis
|
|
20914
20909
|
|
|
20915
|
-
USEFUL SONARQUBE COMMANDS:
|
|
20916
|
-
- sonarqube({ action: 'issues' }) - See all issues
|
|
20917
|
-
- sonarqube({ action: 'issues', severity: 'critical' }) - See critical+ issues only
|
|
20918
|
-
- sonarqube({ action: 'analyze' }) - Re-run analysis
|
|
20919
|
-
- sonarqube({ action: 'status' }) - Check quality gate status
|
|
20920
|
-
|
|
20921
|
-
IMPORTANT: Do NOT retry the commit without fixing the issues first!
|
|
20922
20910
|
================================================================================
|
|
20923
20911
|
" && exit 1`;
|
|
20924
20912
|
args.command = aiMessage;
|
|
@@ -20932,36 +20920,38 @@ IMPORTANT: Do NOT retry the commit without fixing the issues first!
|
|
|
20932
20920
|
if (result.block && args) {
|
|
20933
20921
|
const aiMessage = `echo "
|
|
20934
20922
|
================================================================================
|
|
20935
|
-
\uD83D\uDEAB PUSH BLOCKED BY SONARQUBE
|
|
20923
|
+
\uD83D\uDEAB PUSH BLOCKED BY SONARQUBE - CODE QUALITY ISSUES DETECTED
|
|
20936
20924
|
================================================================================
|
|
20937
20925
|
|
|
20938
|
-
|
|
20939
|
-
|
|
20940
|
-
|
|
20941
|
-
|
|
20926
|
+
Your push was BLOCKED because the code quality check failed.
|
|
20927
|
+
|
|
20928
|
+
⚠️ DO NOT try to bypass this by:
|
|
20929
|
+
- Deleting opencode.json
|
|
20930
|
+
- Removing the sonarqube plugin
|
|
20931
|
+
- Retrying the same push repeatedly
|
|
20932
|
+
|
|
20933
|
+
This blocking is INTENTIONAL to maintain code quality!
|
|
20942
20934
|
|
|
20943
|
-
|
|
20944
|
-
Your push was blocked because the SonarQube quality gate FAILED. This means
|
|
20945
|
-
there are code quality issues that need to be fixed before you can push.
|
|
20935
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
20946
20936
|
|
|
20947
|
-
|
|
20937
|
+
TO FIX THIS, follow these steps:
|
|
20948
20938
|
|
|
20949
|
-
|
|
20950
|
-
|
|
20939
|
+
1️⃣ FIRST: Check what issues exist
|
|
20940
|
+
Run: sonarqube({ action: 'issues' })
|
|
20941
|
+
|
|
20942
|
+
2️⃣ THEN: Fix the reported issues in your code
|
|
20951
20943
|
|
|
20952
|
-
|
|
20944
|
+
3️⃣ Commit your fixes
|
|
20953
20945
|
|
|
20954
|
-
|
|
20955
|
-
git add . && git commit -m 'fix: resolve code quality issues'
|
|
20946
|
+
4️⃣ FINALLY: Try pushing again AFTER fixing the issues
|
|
20956
20947
|
|
|
20957
|
-
|
|
20948
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
20958
20949
|
|
|
20959
|
-
|
|
20960
|
-
|
|
20961
|
-
|
|
20962
|
-
|
|
20950
|
+
AVAILABLE COMMANDS:
|
|
20951
|
+
sonarqube({ action: 'issues' }) → See all code quality issues
|
|
20952
|
+
sonarqube({ action: 'status' }) → Check quality gate status
|
|
20953
|
+
sonarqube({ action: 'analyze' }) → Re-run full analysis
|
|
20963
20954
|
|
|
20964
|
-
IMPORTANT: Do NOT retry the push without fixing the issues first!
|
|
20965
20955
|
================================================================================
|
|
20966
20956
|
" && exit 1`;
|
|
20967
20957
|
args.command = aiMessage;
|