Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add static code analysis service provided by SonarCloud.io #38

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 26 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
language: java
sudo: false
jdk:
- oraclejdk8
before_script: cd apiconnector
script: mvn clean verify
deploy:
provider: pages
skip_cleanup: true
github_token: $AUTH
on:
branch: master
local_dir: apiconnector/target/apidocs
name: Minion
after_success: mvn jacoco:report coveralls:report
language: java

sudo: false

jdk:
- oraclejdk8

before_script: cd apiconnector

addons:
sonarcloud:
organization: "openml"

script: mvn clean verify -P sonar "-Dsonar.login=$SONAR_LOGIN_TOKEN"

deploy:
provider: pages
skip_cleanup: true
github_token: $AUTH
on:
branch: master
local_dir: apiconnector/target/apidocs

name: Minion

after_success: mvn jacoco:report coveralls:report
4 changes: 4 additions & 0 deletions apiconnector/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/target/
.classpath
.project
/.settings
64 changes: 64 additions & 0 deletions apiconnector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,27 @@
<skipTests>true</skipTests>
</properties>
</profile>

<profile>
<id>sonar</id>
<properties>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonar.organization>openml</sonar.organization>
<sonar.projectKey>openml-java</sonar.projectKey>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<dependencies>
Expand Down Expand Up @@ -156,6 +177,49 @@
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.5.0.1254</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>sonar</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.2</version>
<configuration>
<append>true</append>
</configuration>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>prepare-agent-integration</id>
<goals>
<goal>prepare-agent-integration</goal>
</goals>
</execution>
<execution>
<id>jacoco-site</id>
<phase>verify</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand Down
Loading