opencode-sonarqube 1.2.32 → 1.2.34
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 +57 -53
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -20876,49 +20876,46 @@ 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
|
|
20879
|
+
\uD83D\uDEAB COMMIT BLOCKED - SonarQube Quality Gate Failed
|
|
20880
20880
|
================================================================================
|
|
20881
20881
|
|
|
20882
|
-
|
|
20883
|
-
|
|
20884
|
-
|
|
20885
|
-
|
|
20882
|
+
STOP! Your commit was blocked. DO NOT:
|
|
20883
|
+
❌ Delete opencode.json
|
|
20884
|
+
❌ Remove plugins
|
|
20885
|
+
❌ Retry without fixing issues
|
|
20886
20886
|
|
|
20887
|
-
|
|
20888
|
-
|
|
20889
|
-
|
|
20887
|
+
================================================================================
|
|
20888
|
+
\uD83D\uDCCB YOU HAVE A SONARQUBE TOOL - USE IT!
|
|
20889
|
+
================================================================================
|
|
20890
|
+
|
|
20891
|
+
You have access to the 'sonarqube' MCP tool (same as mcp_sonarqube).
|
|
20892
|
+
Call it NOW to see exactly what issues are blocking you:
|
|
20890
20893
|
|
|
20891
|
-
|
|
20894
|
+
sonarqube({ action: 'issues' }) ← CALL THIS TOOL NOW!
|
|
20892
20895
|
|
|
20893
|
-
|
|
20894
|
-
|
|
20895
|
-
|
|
20896
|
+
This tool will show you:
|
|
20897
|
+
- Every issue found in the code
|
|
20898
|
+
- The file and line number
|
|
20899
|
+
- The severity (BLOCKER/CRITICAL/MAJOR/MINOR/INFO)
|
|
20900
|
+
- Description of what's wrong
|
|
20901
|
+
- How to fix it
|
|
20896
20902
|
|
|
20897
|
-
|
|
20898
|
-
|
|
20899
|
-
|
|
20900
|
-
- The file and line number
|
|
20901
|
-
- A description of the problem
|
|
20902
|
-
- Often a suggestion for how to fix it
|
|
20903
|
+
Other useful tool calls:
|
|
20904
|
+
sonarqube({ action: 'status' }) ← See why quality gate failed
|
|
20905
|
+
sonarqube({ action: 'analyze' }) ← Re-run analysis after fixes
|
|
20903
20906
|
|
|
20904
|
-
|
|
20905
|
-
|
|
20906
|
-
|
|
20907
|
-
- SQL injection vulnerabilities
|
|
20908
|
-
- Unused variables
|
|
20909
|
-
- Code duplication
|
|
20910
|
-
- Missing null checks
|
|
20907
|
+
================================================================================
|
|
20908
|
+
⚡ WHAT TO DO NOW:
|
|
20909
|
+
================================================================================
|
|
20911
20910
|
|
|
20912
|
-
|
|
20913
|
-
|
|
20911
|
+
1. CALL THE TOOL: sonarqube({ action: 'issues' })
|
|
20912
|
+
2. READ the issues it returns
|
|
20913
|
+
3. FIX the code problems
|
|
20914
|
+
4. THEN try to commit again
|
|
20914
20915
|
|
|
20915
|
-
|
|
20916
|
-
|
|
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
|
|
20916
|
+
The quality gate may fail due to issues in existing code, not just your changes.
|
|
20917
|
+
Use sonarqube({ action: 'status' }) to see what conditions failed.
|
|
20920
20918
|
|
|
20921
|
-
IMPORTANT: Do NOT retry the commit without fixing the issues first!
|
|
20922
20919
|
================================================================================
|
|
20923
20920
|
" && exit 1`;
|
|
20924
20921
|
args.command = aiMessage;
|
|
@@ -20932,36 +20929,43 @@ IMPORTANT: Do NOT retry the commit without fixing the issues first!
|
|
|
20932
20929
|
if (result.block && args) {
|
|
20933
20930
|
const aiMessage = `echo "
|
|
20934
20931
|
================================================================================
|
|
20935
|
-
\uD83D\uDEAB PUSH BLOCKED
|
|
20932
|
+
\uD83D\uDEAB PUSH BLOCKED - SonarQube Quality Gate Failed
|
|
20936
20933
|
================================================================================
|
|
20937
20934
|
|
|
20938
|
-
|
|
20939
|
-
|
|
20940
|
-
|
|
20941
|
-
|
|
20935
|
+
STOP! Your push was blocked. DO NOT:
|
|
20936
|
+
❌ Delete opencode.json
|
|
20937
|
+
❌ Remove plugins
|
|
20938
|
+
❌ Retry without fixing issues
|
|
20942
20939
|
|
|
20943
|
-
|
|
20944
|
-
|
|
20945
|
-
|
|
20940
|
+
================================================================================
|
|
20941
|
+
\uD83D\uDCCB YOU HAVE A SONARQUBE TOOL - USE IT!
|
|
20942
|
+
================================================================================
|
|
20946
20943
|
|
|
20947
|
-
|
|
20944
|
+
You have access to the 'sonarqube' MCP tool (same as mcp_sonarqube).
|
|
20945
|
+
Call it NOW to see exactly what issues are blocking you:
|
|
20948
20946
|
|
|
20949
|
-
|
|
20950
|
-
sonarqube({ action: 'issues' })
|
|
20947
|
+
sonarqube({ action: 'issues' }) ← CALL THIS TOOL NOW!
|
|
20951
20948
|
|
|
20952
|
-
|
|
20949
|
+
This tool will show you:
|
|
20950
|
+
- Every issue found in the code
|
|
20951
|
+
- The file and line number
|
|
20952
|
+
- The severity (BLOCKER/CRITICAL/MAJOR/MINOR/INFO)
|
|
20953
|
+
- Description of what's wrong
|
|
20953
20954
|
|
|
20954
|
-
|
|
20955
|
-
|
|
20955
|
+
Other useful tool calls:
|
|
20956
|
+
sonarqube({ action: 'status' }) ← See why quality gate failed
|
|
20957
|
+
sonarqube({ action: 'analyze' }) ← Re-run analysis after fixes
|
|
20956
20958
|
|
|
20957
|
-
|
|
20959
|
+
================================================================================
|
|
20960
|
+
⚡ WHAT TO DO NOW:
|
|
20961
|
+
================================================================================
|
|
20958
20962
|
|
|
20959
|
-
|
|
20960
|
-
|
|
20961
|
-
|
|
20962
|
-
|
|
20963
|
+
1. CALL THE TOOL: sonarqube({ action: 'issues' })
|
|
20964
|
+
2. READ the issues it returns
|
|
20965
|
+
3. FIX the code problems
|
|
20966
|
+
4. Commit your fixes
|
|
20967
|
+
5. THEN try to push again
|
|
20963
20968
|
|
|
20964
|
-
IMPORTANT: Do NOT retry the push without fixing the issues first!
|
|
20965
20969
|
================================================================================
|
|
20966
20970
|
" && exit 1`;
|
|
20967
20971
|
args.command = aiMessage;
|