@codacy/tools-detekt-1 0.20.0 → 0.22.0

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/README.md CHANGED
@@ -67,7 +67,7 @@ curl -L -o /tmp/codacy-detekt-test-tools/detekt-cli-1.23.8-all.jar \
67
67
  `InjectDispatcher` carry no tag and are matched by their bare rule name (detekt pattern IDs
68
68
  have no tool prefix).
69
69
 
70
- - detekt requires Java 8+ as a runtime. The adapter uses `ensureJre()` to download Adoptium Temurin JDK 17 if no system Java is found.
70
+ - detekt requires Java 8+ as a runtime. The adapter uses `ensureJre()` to download Adoptium Temurin JDK 21 if no system Java is found.
71
71
  - The detekt CLI JAR is an all-in-one fat JAR downloaded from GitHub releases to `ctx.toolInstallDir`.
72
72
  - Output format is Checkstyle 4.3 XML written to a temp file via `--report xml:<path>`.
73
73
  - `--base-path <repoRoot>` ensures file paths in the XML are relative to the repository root.
package/dist/index.js CHANGED
@@ -888,7 +888,8 @@ var patterns_default = [
888
888
  title: "Avoid Using GlobalScope for Coroutines",
889
889
  enabled: false,
890
890
  languages: ["Kotlin"],
891
- parameters: []
891
+ parameters: [],
892
+ tags: ["lib:kotlinx-coroutines"]
892
893
  },
893
894
  {
894
895
  id: "HasPlatformType",
@@ -969,7 +970,8 @@ var patterns_default = [
969
970
  title: "Avoid Hardcoding Dispatchers in Coroutines; Use Dependency Injection",
970
971
  enabled: false,
971
972
  languages: ["Kotlin"],
972
- parameters: []
973
+ parameters: [],
974
+ tags: ["lib:kotlinx-coroutines"]
973
975
  },
974
976
  {
975
977
  id: "InstanceOfCheckForException",
@@ -1753,7 +1755,7 @@ var patterns_default = [
1753
1755
  enabled: false,
1754
1756
  languages: ["Kotlin"],
1755
1757
  parameters: [],
1756
- tags: ["coroutines"]
1758
+ tags: ["lib:kotlinx-coroutines"]
1757
1759
  },
1758
1760
  {
1759
1761
  id: "RedundantVisibilityModifierRule",
@@ -1826,7 +1828,7 @@ var patterns_default = [
1826
1828
  enabled: false,
1827
1829
  languages: ["Kotlin"],
1828
1830
  parameters: [],
1829
- tags: ["coroutines"]
1831
+ tags: ["lib:kotlinx-coroutines"]
1830
1832
  },
1831
1833
  {
1832
1834
  id: "SpacingAroundAngleBrackets",
@@ -2016,7 +2018,7 @@ var patterns_default = [
2016
2018
  enabled: false,
2017
2019
  languages: ["Kotlin"],
2018
2020
  parameters: [],
2019
- tags: ["coroutines"]
2021
+ tags: ["lib:kotlinx-coroutines"]
2020
2022
  },
2021
2023
  {
2022
2024
  id: "SuspendFunWithCoroutineScopeReceiver",
@@ -2026,7 +2028,7 @@ var patterns_default = [
2026
2028
  enabled: false,
2027
2029
  languages: ["Kotlin"],
2028
2030
  parameters: [],
2029
- tags: ["coroutines"]
2031
+ tags: ["lib:kotlinx-coroutines"]
2030
2032
  },
2031
2033
  {
2032
2034
  id: "SuspendFunWithFlowReturnType",
@@ -2036,7 +2038,7 @@ var patterns_default = [
2036
2038
  enabled: false,
2037
2039
  languages: ["Kotlin"],
2038
2040
  parameters: [],
2039
- tags: ["coroutines"]
2041
+ tags: ["lib:kotlinx-coroutines"]
2040
2042
  },
2041
2043
  {
2042
2044
  id: "SwallowedException",
@@ -2719,7 +2721,7 @@ var patterns_default = [
2719
2721
  var pattern_mappings_default = {
2720
2722
  "kotlinx-coroutines": {
2721
2723
  prefixes: ["GlobalCoroutineUsage", "InjectDispatcher"],
2722
- tags: ["coroutines"]
2724
+ tags: ["lib:kotlinx-coroutines"]
2723
2725
  }
2724
2726
  };
2725
2727
 
@@ -2969,7 +2971,7 @@ var adapter = {
2969
2971
  {
2970
2972
  name: "Java",
2971
2973
  versionRange: JAVA_VERSION_RANGE,
2972
- preferredVersion: "17",
2974
+ preferredVersion: "21",
2973
2975
  checkCommand: "java -version"
2974
2976
  }
2975
2977
  ],
@@ -3043,6 +3045,18 @@ var adapter = {
3043
3045
  ctx.logger.info(`Downloading detekt-formatting plugin JAR...`);
3044
3046
  await (0, import_tooling.downloadJar)(FORMATTING_JAR_URL, ctx.toolInstallDir, FORMATTING_JAR_NAME, ctx.logger);
3045
3047
  ctx.logger.info(`Installed detekt-formatting plugin`);
3048
+ await (0, import_tooling.pruneSupersededArtifacts)(
3049
+ ctx.toolInstallDir,
3050
+ JAR_NAME,
3051
+ (name) => /^detekt-cli-.*-all\.jar$/.test(name),
3052
+ ctx.logger
3053
+ );
3054
+ await (0, import_tooling.pruneSupersededArtifacts)(
3055
+ ctx.toolInstallDir,
3056
+ FORMATTING_JAR_NAME,
3057
+ (name) => /^detekt-formatting-.*\.jar$/.test(name),
3058
+ ctx.logger
3059
+ );
3046
3060
  return { success: true, installedPath: jarPath, installedVersion: DETEKT_VERSION };
3047
3061
  } catch (err) {
3048
3062
  return {
package/dist/metadata.js CHANGED
@@ -28,7 +28,7 @@ module.exports = __toCommonJS(metadata_exports);
28
28
  var pattern_mappings_default = {
29
29
  "kotlinx-coroutines": {
30
30
  prefixes: ["GlobalCoroutineUsage", "InjectDispatcher"],
31
- tags: ["coroutines"]
31
+ tags: ["lib:kotlinx-coroutines"]
32
32
  }
33
33
  };
34
34
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codacy/tools-detekt-1",
3
- "version": "0.20.0",
3
+ "version": "0.22.0",
4
4
  "description": "detekt adapter — CLI-mode Kotlin static analyzer",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -9,7 +9,7 @@
9
9
  ],
10
10
  "dependencies": {
11
11
  "fast-xml-parser": "^5.5.6",
12
- "@codacy/tooling": "0.20.0"
12
+ "@codacy/tooling": "0.22.0"
13
13
  },
14
14
  "license": "MIT",
15
15
  "author": "Codacy <support@codacy.com> (https://www.codacy.com)",