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.
Files changed (2) hide show
  1. package/dist/index.js +44 -54
  2. 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
- WHAT IS SONARQUBE?
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
- WHY WAS THIS BLOCKED?
20888
- Your commit was blocked because the SonarQube quality gate FAILED. This means
20889
- there are code quality issues that need to be fixed before you can commit.
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
- HOW TO FIX THIS:
20891
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
20892
20892
 
20893
- Step 1: See what issues were found
20894
- Use the sonarqube tool to view the issues:
20895
- sonarqube({ action: 'issues' })
20893
+ TO FIX THIS, follow these steps:
20896
20894
 
20897
- Step 2: Understand the issues
20898
- Each issue shows:
20899
- - Severity (BLOCKER, CRITICAL, MAJOR, MINOR, INFO)
20900
- - The file and line number
20901
- - A description of the problem
20902
- - Often a suggestion for how to fix it
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
- Step 3: Fix the issues in your code
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
- Step 4: Try committing again
20913
- After fixing the issues, try your commit again.
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
- WHAT IS SONARQUBE?
20939
- SonarQube is a code quality tool that analyzes your code for bugs, vulnerabilities,
20940
- security issues, and code smells. This project has pre-push blocking enabled,
20941
- which means pushes are blocked if the code quality is not good enough.
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
- WHY WAS THIS BLOCKED?
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
- HOW TO FIX THIS:
20937
+ TO FIX THIS, follow these steps:
20948
20938
 
20949
- Step 1: See what issues were found
20950
- sonarqube({ action: 'issues' })
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
- Step 2: Fix the issues in your code
20944
+ 3️⃣ Commit your fixes
20953
20945
 
20954
- Step 3: Commit your fixes
20955
- git add . && git commit -m 'fix: resolve code quality issues'
20946
+ 4️⃣ FINALLY: Try pushing again AFTER fixing the issues
20956
20947
 
20957
- Step 4: Try pushing again
20948
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
20958
20949
 
20959
- USEFUL SONARQUBE COMMANDS:
20960
- - sonarqube({ action: 'issues' }) - See all issues
20961
- - sonarqube({ action: 'analyze' }) - Re-run analysis
20962
- - sonarqube({ action: 'status' }) - Check quality gate status
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-sonarqube",
3
- "version": "1.2.32",
3
+ "version": "1.2.33",
4
4
  "description": "OpenCode Plugin for SonarQube integration - Enterprise-level code quality from the start",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",