opencode-sonarqube 1.2.24 → 1.2.25
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 +4 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -19465,6 +19465,7 @@ function createHooks(getConfig, getDirectory) {
|
|
|
19465
19465
|
|
|
19466
19466
|
// src/tools/sonarqube.ts
|
|
19467
19467
|
init_zod();
|
|
19468
|
+
import { mkdir } from "node:fs/promises";
|
|
19468
19469
|
var logger7 = new Logger("sonarqube-tool");
|
|
19469
19470
|
var SonarQubeToolArgsSchema = exports_external2.object({
|
|
19470
19471
|
action: exports_external2.enum(["analyze", "issues", "newissues", "status", "init", "setup", "validate", "hotspots", "duplications", "rule", "history", "profile", "branches", "metrics", "worstfiles"]).describe("Action to perform: analyze (run scanner), issues (all issues), newissues (only new code issues), status (quality gate), init/setup (initialize), validate (enterprise check), hotspots (security review), duplications (code duplicates), rule (explain rule), history (past analyses), profile (quality profile), branches (branch status), metrics (detailed metrics), worstfiles (files with most issues)"),
|
|
@@ -19572,9 +19573,11 @@ async function handleSetup(config2, directory, force = false) {
|
|
|
19572
19573
|
|
|
19573
19574
|
${result.message}`;
|
|
19574
19575
|
}
|
|
19575
|
-
const
|
|
19576
|
+
const sonarqubeDir = `${directory}/.sonarqube`;
|
|
19577
|
+
const configPath = `${sonarqubeDir}/config.json`;
|
|
19576
19578
|
const configExists = await Bun.file(configPath).exists();
|
|
19577
19579
|
if (!configExists) {
|
|
19580
|
+
await mkdir(sonarqubeDir, { recursive: true });
|
|
19578
19581
|
const defaultConfig = {
|
|
19579
19582
|
level: config2.level || "enterprise",
|
|
19580
19583
|
autoAnalyze: true,
|