Skip to content

Commit

Permalink
update findbugs gradle task
Browse files Browse the repository at this point in the history
  • Loading branch information
cedric committed Feb 25, 2016
1 parent fe23893 commit ec126b7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Type at the root of the PDDL4J distribution:
> ./gradlew build
if you want to build the project with findbug:
> ./gradlew build -Pfindbug
> ./gradlew build -Pfindbugs
The jar "pddl4j-VERSION.jar" is available in the build/libs directory.

Expand Down
7 changes: 4 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,17 @@ clean.doLast() {
cleanGenerated.execute()
}

findbugsMain.onlyIf() { project.hasProperty('findbugs') }
findbugsTest.onlyIf() { project.hasProperty('findbugs') }

findbugsMain.doLast() {
println("Find bug process completed without finding an issue")
}

findbugsMain.onlyIf() { project.hasProperty('findbug') }
findbugsTest.onlyIf() { project.hasProperty('findbug') }

findbugs {
effort= "max"
reportLevel = "low"
excludeFilter = file("$rootProject.projectDir/config/findbugs/excludeFilter.xml")
}

javadoc.doFirst() {
Expand Down
11 changes: 11 additions & 0 deletions config/findbugs/excludeFilter.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>

<FindBugsFilter>
<Match>
<Class name="~fr.uga.pddl4j.parser.lexer\.[^.]+"/>
</Match>
<Match>
<Class name="fr.uga.pddl4j.util.MemoryAgent" />
<Method name="isSharedFlyweight" />
</Match>
</FindBugsFilter>

0 comments on commit ec126b7

Please sign in to comment.