Skip to content

Commit

Permalink
Add new integration tests for SonarLint
Browse files Browse the repository at this point in the history
  • Loading branch information
vdiez committed Nov 15, 2024
1 parent 9a3c3ad commit d6121e3
Show file tree
Hide file tree
Showing 8 changed files with 1,386 additions and 16 deletions.
1 change: 1 addition & 0 deletions its/plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<module>plugins</module>
<module>tests</module>
<module>sonarlint-tests</module>
<module>sonarlint-rpc-tests</module>
</modules>

</project>
169 changes: 169 additions & 0 deletions its/plugin/sonarlint-rpc-tests/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.sonarsource.javascript</groupId>
<artifactId>javascript-it-plugin</artifactId>
<version>10.17.0-SNAPSHOT</version>
</parent>

<artifactId>javascript-it-plugin-sonarlint-rpc-tests</artifactId>
<name>JavaScript :: IT :: Plugin :: SonarLint RPC Tests</name>

<properties>
<surefire.argLine>-server</surefire.argLine>
<sonarlint.plugin.api.version>10.8.0.79183</sonarlint.plugin.api.version>
</properties>

<!--
This module doesn't depend on sonar-plugin-api to avoid conflicts with packages embedded in sonarlint-core dependency
-->
<dependencies>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.sonarsource.analyzer-commons</groupId>
<artifactId>sonar-analyzer-commons</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.sonarsource.sonarlint.core</groupId>
<artifactId>sonarlint-core</artifactId>
<version>${sonarlint.plugin.api.version}</version>
</dependency>
<dependency>
<groupId>org.sonarsource.sonarlint.core</groupId>
<artifactId>sonarlint-rpc-protocol</artifactId>
<version>${sonarlint.plugin.api.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.sonarsource.sonarlint.core</groupId>
<artifactId>sonarlint-rpc-impl</artifactId>
<version>${sonarlint.plugin.api.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.sonarsource.sonarlint.core</groupId>
<artifactId>sonarlint-rpc-java-client</artifactId>
<version>${sonarlint.plugin.api.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.sonarsource.sonarlint.ls</groupId>
<artifactId>sonarlint-language-server</artifactId>
<version>3.13.0.75653</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<version>4.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>**/*Test.java</include>
</includes>
<forkNode implementation="org.apache.maven.plugin.surefire.extensions.SurefireForkNodeFactory"/>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>qa</id>
<activation>
<property>
<name>env.SONARSOURCE_QA</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-plugin</id>
<phase>generate-test-resources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>sonar-javascript-plugin</artifactId>
<type>sonar-plugin</type>
<overWrite>true</overWrite>
</artifactItem>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>sonar-javascript-plugin</artifactId>
<classifier>win-x64</classifier>
<type>sonar-plugin</type>
<overWrite>true</overWrite>
</artifactItem>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>sonar-javascript-plugin</artifactId>
<classifier>linux-x64</classifier>
<type>sonar-plugin</type>
<overWrite>true</overWrite>
</artifactItem>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>sonar-javascript-plugin</artifactId>
<classifier>multi</classifier>
<type>sonar-plugin</type>
<overWrite>true</overWrite>
</artifactItem>
</artifactItems>
<outputDirectory>../../../sonar-plugin/sonar-javascript-plugin/target</outputDirectory>
<overWriteReleases>true</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
Loading

0 comments on commit d6121e3

Please sign in to comment.