opencode-sonarqube 1.2.33 → 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 +58 -44
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -20876,36 +20876,45 @@ 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
|
-
Your commit was
|
|
20882
|
+
STOP! Your commit was blocked. DO NOT:
|
|
20883
|
+
❌ Delete opencode.json
|
|
20884
|
+
❌ Remove plugins
|
|
20885
|
+
❌ Retry without fixing issues
|
|
20883
20886
|
|
|
20884
|
-
|
|
20885
|
-
|
|
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
|
-
|
|
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
|
|
20894
20902
|
|
|
20895
|
-
|
|
20896
|
-
|
|
20897
|
-
|
|
20898
|
-
|
|
20899
|
-
|
|
20900
|
-
|
|
20901
|
-
|
|
20903
|
+
Other useful tool calls:
|
|
20904
|
+
sonarqube({ action: 'status' }) ← See why quality gate failed
|
|
20905
|
+
sonarqube({ action: 'analyze' }) ← Re-run analysis after fixes
|
|
20906
|
+
|
|
20907
|
+
================================================================================
|
|
20908
|
+
⚡ WHAT TO DO NOW:
|
|
20909
|
+
================================================================================
|
|
20902
20910
|
|
|
20903
|
-
|
|
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
|
|
20904
20915
|
|
|
20905
|
-
|
|
20906
|
-
|
|
20907
|
-
sonarqube({ action: 'status' }) → Check quality gate status
|
|
20908
|
-
sonarqube({ action: 'analyze' }) → Re-run full analysis
|
|
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.
|
|
20909
20918
|
|
|
20910
20919
|
================================================================================
|
|
20911
20920
|
" && exit 1`;
|
|
@@ -20920,37 +20929,42 @@ AVAILABLE COMMANDS:
|
|
|
20920
20929
|
if (result.block && args) {
|
|
20921
20930
|
const aiMessage = `echo "
|
|
20922
20931
|
================================================================================
|
|
20923
|
-
\uD83D\uDEAB PUSH BLOCKED
|
|
20932
|
+
\uD83D\uDEAB PUSH BLOCKED - SonarQube Quality Gate Failed
|
|
20924
20933
|
================================================================================
|
|
20925
20934
|
|
|
20926
|
-
Your push was
|
|
20935
|
+
STOP! Your push was blocked. DO NOT:
|
|
20936
|
+
❌ Delete opencode.json
|
|
20937
|
+
❌ Remove plugins
|
|
20938
|
+
❌ Retry without fixing issues
|
|
20927
20939
|
|
|
20928
|
-
|
|
20929
|
-
|
|
20930
|
-
|
|
20931
|
-
- Retrying the same push repeatedly
|
|
20932
|
-
|
|
20933
|
-
This blocking is INTENTIONAL to maintain code quality!
|
|
20934
|
-
|
|
20935
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
20940
|
+
================================================================================
|
|
20941
|
+
\uD83D\uDCCB YOU HAVE A SONARQUBE TOOL - USE IT!
|
|
20942
|
+
================================================================================
|
|
20936
20943
|
|
|
20937
|
-
|
|
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:
|
|
20938
20946
|
|
|
20939
|
-
|
|
20940
|
-
Run: sonarqube({ action: 'issues' })
|
|
20941
|
-
|
|
20942
|
-
2️⃣ THEN: Fix the reported issues in your code
|
|
20947
|
+
sonarqube({ action: 'issues' }) ← CALL THIS TOOL NOW!
|
|
20943
20948
|
|
|
20944
|
-
|
|
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
|
|
20945
20954
|
|
|
20946
|
-
|
|
20955
|
+
Other useful tool calls:
|
|
20956
|
+
sonarqube({ action: 'status' }) ← See why quality gate failed
|
|
20957
|
+
sonarqube({ action: 'analyze' }) ← Re-run analysis after fixes
|
|
20947
20958
|
|
|
20948
|
-
|
|
20959
|
+
================================================================================
|
|
20960
|
+
⚡ WHAT TO DO NOW:
|
|
20961
|
+
================================================================================
|
|
20949
20962
|
|
|
20950
|
-
|
|
20951
|
-
|
|
20952
|
-
|
|
20953
|
-
|
|
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
|
|
20954
20968
|
|
|
20955
20969
|
================================================================================
|
|
20956
20970
|
" && exit 1`;
|