Skip to content
This repository has been archived by the owner on Jul 8, 2019. It is now read-only.

Commit

Permalink
Fix Issue 110 (#111)
Browse files Browse the repository at this point in the history
* Fix issue #110, analyse the plugin itself on SonarQube by moving to JaCoCo and performing a SonarQube analysis pass as part of the CI build
  • Loading branch information
Pablissimo authored Feb 11, 2017
1 parent 9458765 commit 21d9b04
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ addons:
paths:
- $(ls ./target/*.jar | tr "\n" ":")
target_paths: builds/$TRAVIS_BRANCH/$TRAVIS_BUILD_NUMBER

after_success:
- mvn cobertura:cobertura coveralls:report
- mvn clean test jacoco:report coveralls:report
- test $TRAVIS_PULL_REQUEST = "false" && mvn sonar:sonar -Dsonar.language=java -Dsonar.host.url=$SONAR_URL -Dsonar.login=$SONAR_TOKEN
62 changes: 48 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<packaging>sonar-plugin</packaging>
<version>1.0.0</version>

<name>TypeScript</name>
<name>SonarTsPlugin</name>
<description>Analyse TypeScript projects</description>
<inceptionYear>2013</inceptionYear>
<url>https://github.com/pablissimo/SonarTsPlugin</url>
Expand Down Expand Up @@ -46,6 +46,9 @@
<sonar.buildVersion>5.6</sonar.buildVersion>
<jdk.min.version>1.8</jdk.min.version>
<sslr.version>1.21</sslr.version>

<sonar.junit.reportsPath>target/surefire-reports</sonar.junit.reportsPath>
<sonar.jacoco.reportPaths>target/jacoco.exec</sonar.jacoco.reportPaths>
</properties>

<dependencies>
Expand All @@ -55,7 +58,7 @@
<version>${sonar.buildVersion}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
Expand Down Expand Up @@ -171,18 +174,49 @@
<version>3.0.1</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.7</version>
<configuration>
<formats>
<format>xml</format>
<format>html</format>
</formats>
<maxmem>256m</maxmem>
<!-- aggregated reports for multi-module projects -->
<aggregate>true</aggregate>
</configuration>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.9</version>
<configuration>
<reportSets>
<reportSet>
<reports>
<!-- select non-aggregate reports -->
<report>report</report>
</reports>
</reportSet>
</reportSets>
</configuration>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>default-report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>default-check</id>
<goals>
<goal>check</goal>
</goals>
<configuration>
<rules></rules>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.2</version>
</plugin>
</plugins>
</build>
Expand Down

0 comments on commit 21d9b04

Please sign in to comment.