Skip to content

Commit 26a4c41

Browse files
committed
updates for 25.1 and 25.2 compatibility
1 parent bd96aa4 commit 26a4c41

7 files changed

Lines changed: 38 additions & 17 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### Changed
1313

14+
- compatibility updates for SonarQube 25.1.0 and 25.2.0 compatibility
15+
1416
### Deleted
1517

1618
## [2.1.0] - 2025-01-07

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
ARG MAVEN_BUILDER=3-openjdk-17-slim
2-
ARG SONARQUBE_VERSION=24.12.0.100206-community
2+
3+
#ARG SONARQUBE_VERSION=24.12.0.100206-community
4+
#ARG SONARQUBE_VERSION=25.1.0.102122-community
5+
ARG SONARQUBE_VERSION=25.2.0.102705-community
36

47
FROM maven:${MAVEN_BUILDER} AS builder
58

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ Ready to use binaries are available [from GitHub](https://github.com/green-code-
5757
🧩 Compatibility
5858
-----------------
5959

60-
| Plugin version | SonarQube version | Java version |
61-
|----------------|----------------------|------------------------------------------------------------------------------------------------|
62-
| 1.6.+ | 9.4.+ LTS to 10.6.0 | 11 / 17 |
63-
| 1.7.+ | 9.9.+ LTS to 10.6.0 | [17](https://docs.sonarsource.com/sonarqube/9.9/requirements/prerequisites-and-overview/#java) |
64-
| 2.0.+ | 9.9.+ LTS to 24.12.0 | [17](https://docs.sonarsource.com/sonarqube/9.9/requirements/prerequisites-and-overview/#java) |
60+
| Plugin version | SonarQube version | Java version |
61+
|----------------|---------------------|------------------------------------------------------------------------------------------------|
62+
| 1.6.+ | 9.4.+ LTS to 10.6.0 | 11 / 17 |
63+
| 1.7.+ | 9.9.+ LTS to 10.6.0 | [17](https://docs.sonarsource.com/sonarqube/9.9/requirements/prerequisites-and-overview/#java) |
64+
| 2.0.+ | 9.9.+ LTS to 25.2.0 | [17](https://docs.sonarsource.com/sonarqube/9.9/requirements/prerequisites-and-overview/#java) |
6565

6666
> Compatibility table of versions lower than 1.4.+ are available from the
6767
> main [creedengo repository](https://github.com/green-code-initiative/creedengo-rules-specifications#-plugins-version-compatibility).

pom.xml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,21 @@
8080
<test-it.sonarqube.keepRunning>false</test-it.sonarqube.keepRunning>
8181

8282
<!-- Version of `sonarqube` used by integration tests (you can override this value to perform matrix compatibility tests) -->
83-
<test-it.sonarqube.version>${sonarqube.version}</test-it.sonarqube.version>
83+
<!-- <test-it.sonarqube.version>${sonarqube.version}</test-it.sonarqube.version>-->
84+
85+
<!-- <test-it.sonarqube.version>9.9.8.100196</test-it.sonarqube.version>-->
86+
<!-- <test-it.sonarqube.version>10.1.0.73245</test-it.sonarqube.version>-->
87+
<!-- <test-it.sonarqube.version>10.1.0.73491</test-it.sonarqube.version>-->
88+
<!-- avant : OK -->
89+
90+
<!-- <test-it.sonarqube.version>10.2.0.77647</test-it.sonarqube.version>-->
91+
<!-- <test-it.sonarqube.version>10.7.0.96327</test-it.sonarqube.version>-->
92+
<!-- <test-it.sonarqube.version>24.12.0.100206</test-it.sonarqube.version>-->
93+
<!-- avant : OK metric "directories" -->
94+
95+
<!-- <test-it.sonarqube.version>25.1.0.102122</test-it.sonarqube.version>-->
96+
<test-it.sonarqube.version>25.2.0.102705</test-it.sonarqube.version>
97+
<!-- avant : OK autres metrics -->
8498

8599
<!-- Version of `sonar-java-plugin` used by integration tests (you can override this value to perform matrix compatibility tests) -->
86100
<test-it.sonarjava.version>${sonarjava.version}</test-it.sonarjava.version>

src/it/java/org/greencodeinitiative/creedengo/java/integration/tests/BuildProjectEngine.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -269,22 +269,22 @@ protected static Map<String, Measures.Measure> getMeasures(String componentKey)
269269
"blocker_violations",
270270
"branch_coverage",
271271
"bugs",
272-
"class_complexity",
272+
// "class_complexity", // suppr en 25.1
273273
"classes",
274274
"code_smells",
275275
"cognitive_complexity",
276276
"comment_lines",
277277
"comment_lines_data",
278278
"comment_lines_density",
279279
"complexity",
280-
"complexity_in_classes",
281-
"complexity_in_functions",
280+
// "complexity_in_classes", // suppr en 25.1
281+
// "complexity_in_functions", // suppr en 25.1
282282
"conditions_to_cover",
283283
"confirmed_issues",
284284
"coverage",
285285
"critical_violations",
286286
"development_cost",
287-
"directories",
287+
// "directories", // suppr en 10.2
288288
"duplicated_blocks",
289289
"duplicated_files",
290290
"duplicated_lines",
@@ -293,11 +293,11 @@ protected static Map<String, Measures.Measure> getMeasures(String componentKey)
293293
"effort_to_reach_maintainability_rating_a",
294294
"executable_lines_data",
295295
"false_positive_issues",
296-
"file_complexity",
297-
"file_complexity_distribution",
296+
// "file_complexity", // suppr en 25.1
297+
// "file_complexity_distribution", // suppr en 25.1
298298
"files",
299-
"function_complexity",
300-
"function_complexity_distribution",
299+
// "function_complexity", // suppr en 25.1
300+
// "function_complexity_distribution", // suppr en 25.1
301301
"functions",
302302
"generated_lines",
303303
"generated_ncloc",

src/it/java/org/greencodeinitiative/creedengo/java/integration/tests/GCIRulesIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ void testGCI3() {
4040
.hasSize(2)
4141
.extracting("rule", "message", "line", "textRange.startLine", "textRange.endLine",
4242
"textRange.startOffset", "textRange.endOffset", "severity", "type", "debt", "effort")
43-
.containsExactly(
43+
.containsExactlyInAnyOrder(
4444
Tuple.tuple("creedengo-java:GCI3", "Avoid getting the size of the collection in the loop",
4545
13, 13, 13, 28, 45, MINOR, CODE_SMELL, "5min", "5min"),
4646
Tuple.tuple("creedengo-java:GCI69", "Do not call a function when declaring a for-type loop",
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/usr/bin/env sh
22

33
# "sonar.login" kept only for SONARQUBE < 10
4-
mvn org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar -Dsonar.host.url=http://localhost:$1 -Dsonar.login=$2 -Dsonar.token=$2
4+
5+
# mvn org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar -Dsonar.host.url=http://localhost:$1 -Dsonar.login=$2 -Dsonar.token=$2
6+
mvn org.sonarsource.scanner.maven:sonar-maven-plugin:4.0.0.4121:sonar -Dsonar.host.url=http://localhost:$1 -Dsonar.login=$2 -Dsonar.token=$2

0 commit comments

Comments
 (0)