opencode-sonarqube 0.1.11 → 0.1.12
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 +19 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -20159,19 +20159,35 @@ function shouldIgnoreFile2(filePath) {
|
|
|
20159
20159
|
return IGNORED_FILE_PATTERNS2.some((pattern) => pattern.test(filePath));
|
|
20160
20160
|
}
|
|
20161
20161
|
var SonarQubePlugin = async ({ client, directory, worktree }) => {
|
|
20162
|
-
debugLog.info("=== PLUGIN START ===", { directory, worktree });
|
|
20162
|
+
debugLog.info("=== PLUGIN START ===", { directory, worktree, cwd: process.cwd() });
|
|
20163
|
+
const resolveValidDirectory = () => {
|
|
20164
|
+
if (worktree && worktree !== "/" && worktree.length > 1) {
|
|
20165
|
+
return worktree;
|
|
20166
|
+
}
|
|
20167
|
+
if (directory && directory !== "/" && directory.length > 1) {
|
|
20168
|
+
return directory;
|
|
20169
|
+
}
|
|
20170
|
+
const cwd = process.cwd();
|
|
20171
|
+
if (cwd && cwd !== "/" && cwd.length > 1) {
|
|
20172
|
+
return cwd;
|
|
20173
|
+
}
|
|
20174
|
+
const homeDir = process.env["HOME"] || "/Users";
|
|
20175
|
+
return homeDir;
|
|
20176
|
+
};
|
|
20177
|
+
const effectiveDirectory = resolveValidDirectory();
|
|
20178
|
+
debugLog.info("Resolved directory", { original: directory, effective: effectiveDirectory });
|
|
20163
20179
|
await client.app.log({
|
|
20164
20180
|
body: {
|
|
20165
20181
|
service: "opencode-sonarqube",
|
|
20166
20182
|
level: "info",
|
|
20167
20183
|
message: "SonarQube plugin initialized",
|
|
20168
|
-
extra: { directory, worktree }
|
|
20184
|
+
extra: { directory, worktree, effectiveDirectory }
|
|
20169
20185
|
}
|
|
20170
20186
|
});
|
|
20171
20187
|
let pluginConfig;
|
|
20172
20188
|
let lastAnalysisResult;
|
|
20173
20189
|
const getConfig = () => pluginConfig;
|
|
20174
|
-
const getDirectory = () =>
|
|
20190
|
+
const getDirectory = () => effectiveDirectory;
|
|
20175
20191
|
const loadPluginConfig = async () => {
|
|
20176
20192
|
debugLog.info("loadPluginConfig called", { hasExistingConfig: !!pluginConfig });
|
|
20177
20193
|
if (pluginConfig) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-sonarqube",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
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",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"homepage": "https://github.com/mguttmann/opencode-sonarqube#readme",
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@opencode-ai/plugin": "^1.1.34",
|
|
41
|
-
"opencode-sonarqube": "0.1.
|
|
41
|
+
"opencode-sonarqube": "0.1.11",
|
|
42
42
|
"zod": "^3.24.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|