-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace FindBugs with its successor SpotBugs.
The first release of SpotBugs is backwards compatible, so almost nothing changes, but you need to run "ant spotbugs" now. Furthermore, we need to add a dependency on jsr305 for the javax.annotations package, which was previously included in the findbugs-annotations package, but this was actually bad because Guava also has a dependency on jsr305, so we ended up with the annotations twice on the class path. In the future, we will probably need to migrate away from these annotations, as both SpotBugs and Guava consider: spotbugs/spotbugs#130 spotbugs/spotbugs#180 google/guava#2960
- Loading branch information
1 parent
3fad294
commit 6721aa6
Showing
8 changed files
with
79 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
.settings/FindBugs.exclude.xml → .settings/SpotBugs.exclude.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!-- vim: set tabstop=8 shiftwidth=4 expandtab filetype=ant : --> | ||
<project name="spotbugs" basedir="."> | ||
|
||
<!-- Targets for running SpotBugs. --> | ||
|
||
<!-- Keep this file synchronized between SoSy-Lab Common, CPAchecker, JavaSMT, and VerifierCloud. --> | ||
<property name="spotbugs.output" value="xml:withMessages"/> | ||
|
||
<path id="spotbugs.classpath"> | ||
<fileset dir="${ivy.lib.dir}/spotbugs" includes="*.jar"/> | ||
</path> | ||
|
||
<target name="run-spotbugs" depends="jar"> | ||
<delete file="SpotBugs.html"/> | ||
<taskdef resource="edu/umd/cs/findbugs/anttask/tasks.properties" classpathref="spotbugs.classpath"/> | ||
<spotbugs | ||
output="${spotbugs.output}" | ||
outputFile="SpotBugs.xml" | ||
excludeFilter=".settings/SpotBugs.exclude.xml" | ||
warningsProperty="spotbugs.warnings"> | ||
<auxClasspath refid="classpath" /> | ||
<sourcePath path="${source.dir}" /> | ||
<class location="${jar.file}" /> | ||
<classpath refid="spotbugs.classpath" /> | ||
</spotbugs> | ||
</target> | ||
|
||
<target name="spotbugs-report" if="spotbugs.warnings"> | ||
<echo>SpotBugs found warnings, generating report.</echo> | ||
<xslt in="SpotBugs.xml" out="SpotBugs.html"> | ||
<style><javaresource classpathref="spotbugs.classpath" name="fancy.xsl"/></style> | ||
</xslt> | ||
</target> | ||
|
||
<target name="spotbugs" depends="run-spotbugs, spotbugs-report" description="Run SpotBugs and generate report."/> | ||
|
||
<target name="run-spotbugs-diff" depends="jar"> | ||
<delete file="SpotBugs.diff.html"/> | ||
<taskdef resource="edu/umd/cs/findbugs/anttask/tasks.properties" classpathref="spotbugs.classpath"/> | ||
<spotbugs | ||
output="${spotbugs.output}" | ||
outputFile="SpotBugs.diff.xml" | ||
excludeFilter=".settings/SpotBugs.exclude.xml" | ||
warningsProperty="spotbugs.newwarnings" | ||
baselineBugs="SpotBugs.known.xml"> | ||
<auxClasspath refid="classpath" /> | ||
<sourcePath path="${source.dir}" /> | ||
<class location="${jar.file}" /> | ||
<classpath refid="spotbugs.classpath" /> | ||
</spotbugs> | ||
</target> | ||
|
||
<target name="spotbugs-diff-report" if="spotbugs.newwarnings"> | ||
<echo>SpotBugs found new warnings, generating report.</echo> | ||
<xslt in="SpotBugs.diff.xml" out="SpotBugs.diff.html"> | ||
<style><javaresource classpathref="spotbugs.classpath" name="fancy.xsl"/></style> | ||
</xslt> | ||
</target> | ||
|
||
<target name="spotbugs-diff" depends="run-spotbugs-diff, spotbugs-diff-report" description="Run SpotBugs and generate report with newly found warnings."/> | ||
|
||
<target name="spotbugs-full" depends="spotbugs, spotbugs-diff" description="Run SpotBugs and generate full report and report with newly found warnings."/> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters