opencode-sonarqube 1.2.27 → 1.2.29

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 +14 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -20494,7 +20494,7 @@ After fixing, I will re-run the analysis to verify.`;
20494
20494
  }
20495
20495
  };
20496
20496
  const qualityGatePattern = /Quality Gate: \[(PASS|FAIL)\] (\w+)/;
20497
- const issueCountPattern = /Blockers: (\d+), Critical: (\d+), Major: (\d+)/;
20497
+ const issueCountPattern = /Blockers: (\d+), Critical: (\d+), Major: (\d+), Minor: (\d+), Info: (\d+)/;
20498
20498
  const parseAnalysisResult = (message) => {
20499
20499
  const resultMatch = qualityGatePattern.exec(message);
20500
20500
  const issueMatch = issueCountPattern.exec(message);
@@ -20506,7 +20506,9 @@ After fixing, I will re-run the analysis to verify.`;
20506
20506
  issues: {
20507
20507
  blocker: Number.parseInt(issueMatch[1], 10),
20508
20508
  critical: Number.parseInt(issueMatch[2], 10),
20509
- major: Number.parseInt(issueMatch[3], 10)
20509
+ major: Number.parseInt(issueMatch[3], 10),
20510
+ minor: Number.parseInt(issueMatch[4], 10),
20511
+ info: Number.parseInt(issueMatch[5], 10)
20510
20512
  },
20511
20513
  timestamp: new Date().toISOString()
20512
20514
  };
@@ -20660,7 +20662,12 @@ Fix these issues before ${operationType === "commit" ? "committing" : "pushing"}
20660
20662
  const isGitCommit = (cmd) => /git\s+commit\b/.test(cmd) && !/--amend/.test(cmd);
20661
20663
  const isGitPush = (cmd) => /git\s+push\b/.test(cmd);
20662
20664
  const processAnalysisResult = async (analysisResult, blockingSeverity, shouldBlock, fixBeforeCommit, autoFix) => {
20663
- const passedCheck = analysisResult.qualityGateStatus === "OK" || !checkBlockingIssues(analysisResult.issues, blockingSeverity);
20665
+ const issues = analysisResult.issues;
20666
+ safeLog(`[processAnalysisResult] issues=${JSON.stringify(issues)}, blockingSeverity=${blockingSeverity}`);
20667
+ const hasBlockingIssues = checkBlockingIssues(issues, blockingSeverity);
20668
+ safeLog(`[processAnalysisResult] hasBlockingIssues=${hasBlockingIssues}, qualityGate=${analysisResult.qualityGateStatus}`);
20669
+ const passedCheck = analysisResult.qualityGateStatus === "OK" || !hasBlockingIssues;
20670
+ safeLog(`[processAnalysisResult] passedCheck=${passedCheck}, shouldBlock=${shouldBlock}`);
20664
20671
  if (passedCheck) {
20665
20672
  await showToast("SonarQube: Quality check passed!", "success");
20666
20673
  return { block: false };
@@ -20718,6 +20725,10 @@ Fix these issues before ${operationType === "commit" ? "committing" : "pushing"}
20718
20725
  return issues.blocker > 0 || issues.critical > 0;
20719
20726
  case "MAJOR":
20720
20727
  return issues.blocker > 0 || issues.critical > 0 || issues.major > 0;
20728
+ case "MINOR":
20729
+ return issues.blocker > 0 || issues.critical > 0 || issues.major > 0 || issues.minor > 0;
20730
+ case "INFO":
20731
+ return issues.blocker > 0 || issues.critical > 0 || issues.major > 0 || issues.minor > 0 || issues.info > 0;
20721
20732
  default:
20722
20733
  return issues.blocker > 0 || issues.critical > 0;
20723
20734
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-sonarqube",
3
- "version": "1.2.27",
3
+ "version": "1.2.29",
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",