From 4fb393be2c847d77b371a246e22704855a42201a Mon Sep 17 00:00:00 2001 From: Allon Mureinik Date: Sat, 11 Mar 2017 11:14:16 +0200 Subject: [PATCH] Add checkstyle to Travis CI (closes #254) Currently, checkstyle is only run as part of the reporting phase, and it's up to the developer to check the report manually. This patch adds the checkstyle configuration to the build plugins so it can be used to check the code (as opposed to just generate a report of the failures) and adds it to Travis CI's configuration so every new patch will be automatically checked against it. --- .travis.yml | 2 +- pom.xml | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4e3fd5356..44a34a88c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,7 +22,7 @@ jdk: - oraclejdk8 script: - - mvn test javadoc:javadoc -B + - mvn test checkstyle:check javadoc:javadoc -B after_success: - mvn clean apache-rat:check cobertura:cobertura coveralls:report diff --git a/pom.xml b/pom.xml index c4049c999..fc751811f 100644 --- a/pom.xml +++ b/pom.xml @@ -576,6 +576,7 @@ 2.8 + 2.17 @@ -646,6 +647,14 @@ + + maven-checkstyle-plugin + ${checkstyle.plugin.version} + + ${basedir}/checkstyle.xml + false + + @@ -654,7 +663,7 @@ maven-checkstyle-plugin - 2.17 + ${checkstyle.plugin.version} ${basedir}/checkstyle.xml false