Skip to content

Commit 91c8608

Browse files
Diego RodriguezDiego Rodriguez
authored andcommitted
Update sonar api and sonar api impl (old from 3 LTS)
1 parent 826da0b commit 91c8608

File tree

3 files changed

+30
-16
lines changed

3 files changed

+30
-16
lines changed

pom.xml

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<groupId>fr.cnes.sonar.plugins</groupId>
77
<artifactId>sonar-icode-cnes-plugin</artifactId>
88
<packaging>sonar-plugin</packaging>
9-
<version>3.0.1</version>
9+
<version>3.1.0</version>
1010

1111
<name>Sonar i-Code CNES plugin</name>
1212

@@ -46,6 +46,12 @@
4646
<url>https://github.com/WaldoFR</url>
4747
<id>WaldoFR</id>
4848
</developer>
49+
<developer>
50+
<name>Diego Rodriguez</name>
51+
<organization>CNES</organization>
52+
<url>https://github.com/WaldoFR</url>
53+
<id>WaldoFR</id>
54+
</developer>
4955
</developers>
5056

5157
<properties>
@@ -55,9 +61,10 @@
5561
<jdk.max.version>11</jdk.max.version>
5662
<maven.compiler.source>1.8</maven.compiler.source>
5763
<maven.compiler.target>1.8</maven.compiler.target>
58-
<sonar.apiVersion>6.7.7</sonar.apiVersion>
64+
<sonar.apiVersion>9.8.0.203</sonar.apiVersion>
65+
<sonar.testingHarnessVersion>9.5.0.56709</sonar.testingHarnessVersion>
5966
<sonar.sslr-squid-bridge.version>2.6.1</sonar.sslr-squid-bridge.version>
60-
<sonar-packaging-maven-plugin.version>1.17</sonar-packaging-maven-plugin.version>
67+
<sonar-packaging-maven-plugin.version>1.21.0.505</sonar-packaging-maven-plugin.version>
6168
<commons-lang.version>3.7</commons-lang.version>
6269
<gson.version>2.8.2</gson.version>
6370
<slf4j.version>1.7.25</slf4j.version>
@@ -81,7 +88,7 @@
8188

8289
<dependencies>
8390
<dependency>
84-
<groupId>org.sonarsource.sonarqube</groupId>
91+
<groupId>org.sonarsource.api.plugin</groupId>
8592
<artifactId>sonar-plugin-api</artifactId>
8693
<version>${sonar.apiVersion}</version>
8794
<scope>provided</scope>
@@ -100,12 +107,18 @@
100107
<dependency>
101108
<groupId>org.sonarsource.sonarqube</groupId>
102109
<artifactId>sonar-testing-harness</artifactId>
103-
<version>${sonar.apiVersion}</version>
110+
<version>${sonar.testingHarnessVersion}</version>
104111
<scope>test</scope>
105112
</dependency>
113+
<dependency>
114+
<groupId>org.sonarsource.sonarqube</groupId>
115+
<artifactId>sonar-plugin-api-impl</artifactId>
116+
<version>9.9.1.69595</version>
117+
</dependency>
106118
<dependency>
107119
<groupId>junit</groupId>
108120
<artifactId>junit</artifactId>
121+
<version>4.11</version>
109122
<scope>test</scope>
110123
</dependency>
111124
<dependency>
@@ -134,7 +147,7 @@
134147
<plugin>
135148
<groupId>org.apache.maven.plugins</groupId>
136149
<artifactId>maven-compiler-plugin</artifactId>
137-
<version>3.5.1</version>
150+
<version>3.10.1</version>
138151
<configuration>
139152
<source>${jdk.min.version}</source>
140153
<target>${jdk.min.version}</target>
@@ -145,13 +158,13 @@
145158
<!-- UTF-8 bundles are not supported by Java, so they must be converted during build -->
146159
<groupId>org.codehaus.mojo</groupId>
147160
<artifactId>native2ascii-maven-plugin</artifactId>
148-
<version>1.0-beta-1</version>
161+
<version>2.0.1</version>
149162
<executions>
150-
<execution>
151-
<goals>
152-
<goal>native2ascii</goal>
153-
</goals>
154-
</execution>
163+
<execution>
164+
<goals>
165+
<goal>resources</goal>
166+
</goals>
167+
</execution>
155168
</executions>
156169
</plugin>
157170

src/test/java/fr/cnes/sonar/plugins/icode/ICodePluginTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,17 @@
2323
import org.sonar.api.SonarRuntime;
2424
import org.sonar.api.internal.SonarRuntimeImpl;
2525
import org.sonar.api.utils.Version;
26+
import org.sonar.api.SonarEdition;
2627

2728

2829
public class ICodePluginTest {
2930

30-
private static final Version VERSION_6_7 = Version.create(6, 7);
31+
private static final Version VERSION_8_9 = Version.create(8, 9);
3132

3233
@Test
3334
public void test_extensions_are_all_set() {
3435
ICodePlugin iCodePlugin = new ICodePlugin();
35-
SonarRuntime runtime = SonarRuntimeImpl.forSonarQube(VERSION_6_7, SonarQubeSide.SERVER);
36+
SonarRuntime runtime = SonarRuntimeImpl.forSonarQube(VERSION_8_9, SonarQubeSide.SERVER, SonarEdition.COMMUNITY);
3637
Plugin.Context context = new Plugin.Context(runtime);
3738
iCodePlugin.define(context);
3839
Assert.assertEquals(12, context.getExtensions().size());

src/test/java/fr/cnes/sonar/plugins/icode/check/ICodeSensorTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public void prepare() throws URISyntaxException {
6565
.setLanguage("icode")
6666
.setType(InputFile.Type.MAIN)
6767
.setLines(10)
68-
.setOriginalLineOffsets(new int[]{0,0,0,0,0,0,0,0,0,0})
68+
.setOriginalLineStartOffsets(new int[]{0,0,0,0,0,0,0,0,0,0})
6969
.setLastValidOffset(100)
7070
.build();
7171
fs.add(clanhb_f);
@@ -76,7 +76,7 @@ public void prepare() throws URISyntaxException {
7676
.setLanguage("icode")
7777
.setType(InputFile.Type.MAIN)
7878
.setLines(10)
79-
.setOriginalLineOffsets(new int[]{0,0,0,0,0,0,0,0,0,0})
79+
.setOriginalLineStartOffsets(new int[]{0,0,0,0,0,0,0,0,0,0})
8080
.setLastValidOffset(100)
8181
.build();
8282
fs.add(clanhb_f90);

0 commit comments

Comments
 (0)