Add FindBugs to Travis CI (closes #262)

This patch copies the FindBugs configuration in pom.xml from the
reporting section to the build section so findbugs can be used as part
of the build process (by using the maven goal findbugs:check).

It then adds this goal to the Travis CI build so that FindBugs
becomes part of the CI, and new patches would be prevented from
introducing new FindBugs errors.
This commit is contained in:
Allon Mureinik 2017-04-01 12:49:24 +03:00 committed by pascalschumacher
parent 9f7d03f091
commit 9ceaaeb656
2 changed files with 10 additions and 1 deletions

View File

@ -22,7 +22,7 @@ jdk:
- oraclejdk8 - oraclejdk8
script: script:
- mvn test apache-rat:check clirr:check checkstyle:check javadoc:javadoc -B - mvn test apache-rat:check clirr:check checkstyle:check findbugs:check javadoc:javadoc -B
after_success: after_success:
- mvn clean cobertura:cobertura coveralls:report - mvn clean cobertura:cobertura coveralls:report

View File

@ -660,6 +660,15 @@
<enableRulesSummary>false</enableRulesSummary> <enableRulesSummary>false</enableRulesSummary>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<!-- Use version from parent pom as that is adjusted according to the Java version used to run Maven -->
<version>${commons.findbugs.version}</version>
<configuration>
<excludeFilterFile>${basedir}/findbugs-exclude-filter.xml</excludeFilterFile>
</configuration>
</plugin>
</plugins> </plugins>
</build> </build>