opencode-sonarqube 1.2.36 → 1.2.37
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 +36 -34
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -16826,19 +16826,50 @@ async function generatePropertiesContent(options, config2, directory) {
|
|
|
16826
16826
|
if (options.projectName) {
|
|
16827
16827
|
lines.push(`sonar.projectName=${options.projectName}`);
|
|
16828
16828
|
}
|
|
16829
|
-
const inclusions = getInclusionPatterns(detection.languages);
|
|
16830
16829
|
const exclusions = options.exclusions ?? config2?.exclusions ?? getDefaultExclusions(detection);
|
|
16831
16830
|
const sourceConfig = [
|
|
16832
16831
|
"",
|
|
16833
16832
|
"# Source Configuration",
|
|
16834
|
-
`sonar.sources=${options.sources ?? config2?.sources ?? "
|
|
16833
|
+
`sonar.sources=${options.sources ?? config2?.sources ?? "."}`
|
|
16835
16834
|
];
|
|
16836
16835
|
if (options.tests ?? config2?.tests) {
|
|
16837
16836
|
sourceConfig.push(`sonar.tests=${options.tests ?? config2?.tests}`);
|
|
16838
16837
|
}
|
|
16839
|
-
|
|
16840
|
-
|
|
16841
|
-
|
|
16838
|
+
const allInclusions = [
|
|
16839
|
+
"**/*.ts",
|
|
16840
|
+
"**/*.tsx",
|
|
16841
|
+
"**/*.js",
|
|
16842
|
+
"**/*.jsx",
|
|
16843
|
+
"**/*.mjs",
|
|
16844
|
+
"**/*.cjs",
|
|
16845
|
+
"**/*.py",
|
|
16846
|
+
"**/*.java",
|
|
16847
|
+
"**/*.go",
|
|
16848
|
+
"**/*.rs",
|
|
16849
|
+
"**/*.php",
|
|
16850
|
+
"**/*.rb",
|
|
16851
|
+
"**/*.cs",
|
|
16852
|
+
"**/*.vb",
|
|
16853
|
+
"**/*.cpp",
|
|
16854
|
+
"**/*.c",
|
|
16855
|
+
"**/*.h",
|
|
16856
|
+
"**/*.hpp",
|
|
16857
|
+
"**/*.swift",
|
|
16858
|
+
"**/*.kt",
|
|
16859
|
+
"**/*.scala",
|
|
16860
|
+
"**/*.groovy",
|
|
16861
|
+
"**/*.html",
|
|
16862
|
+
"**/*.css",
|
|
16863
|
+
"**/*.scss",
|
|
16864
|
+
"**/*.less",
|
|
16865
|
+
"**/*.vue",
|
|
16866
|
+
"**/*.svelte",
|
|
16867
|
+
"**/*.xml",
|
|
16868
|
+
"**/*.json",
|
|
16869
|
+
"**/*.yaml",
|
|
16870
|
+
"**/*.yml"
|
|
16871
|
+
].join(",");
|
|
16872
|
+
sourceConfig.push(`sonar.inclusions=${allInclusions}`);
|
|
16842
16873
|
sourceConfig.push(`sonar.exclusions=${exclusions}`, `sonar.test.inclusions=${getTestPatterns(detection.languages)}`, "", "# Language-Specific Configuration");
|
|
16843
16874
|
lines.push(...sourceConfig);
|
|
16844
16875
|
if (detection.languages.includes("typescript") || detection.languages.includes("javascript")) {
|
|
@@ -16871,35 +16902,6 @@ async function generatePropertiesContent(options, config2, directory) {
|
|
|
16871
16902
|
return lines.join(`
|
|
16872
16903
|
`);
|
|
16873
16904
|
}
|
|
16874
|
-
function getInclusionPatterns(languages) {
|
|
16875
|
-
const patterns = [];
|
|
16876
|
-
if (languages.includes("typescript")) {
|
|
16877
|
-
patterns.push("**/*.ts", "**/*.tsx");
|
|
16878
|
-
}
|
|
16879
|
-
if (languages.includes("javascript")) {
|
|
16880
|
-
patterns.push("**/*.js", "**/*.jsx", "**/*.mjs", "**/*.cjs");
|
|
16881
|
-
}
|
|
16882
|
-
if (languages.includes("python")) {
|
|
16883
|
-
patterns.push("**/*.py");
|
|
16884
|
-
}
|
|
16885
|
-
if (languages.includes("java")) {
|
|
16886
|
-
patterns.push("**/*.java");
|
|
16887
|
-
}
|
|
16888
|
-
if (languages.includes("go")) {
|
|
16889
|
-
patterns.push("**/*.go");
|
|
16890
|
-
}
|
|
16891
|
-
if (languages.includes("rust")) {
|
|
16892
|
-
patterns.push("**/*.rs");
|
|
16893
|
-
}
|
|
16894
|
-
if (languages.includes("php")) {
|
|
16895
|
-
patterns.push("**/*.php");
|
|
16896
|
-
}
|
|
16897
|
-
if (languages.includes("ruby")) {
|
|
16898
|
-
patterns.push("**/*.rb");
|
|
16899
|
-
}
|
|
16900
|
-
patterns.push("**/*.html", "**/*.css", "**/*.scss", "**/*.less");
|
|
16901
|
-
return patterns.join(",");
|
|
16902
|
-
}
|
|
16903
16905
|
function getDefaultExclusions(_detection) {
|
|
16904
16906
|
const patterns = [
|
|
16905
16907
|
"**/node_modules/**",
|