Skip to content

Commit

Permalink
Add Findbugs plugin for slf4j loggers (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
griechel authored and uschi2000 committed Oct 17, 2016
1 parent 6a59ca3 commit 135d410
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ class BaselineFindBugs extends AbstractBaselinePlugin {
private static final String DEFAULT_FINDBUGS_VERSION = '3.0.1'
private static final String DEFAULT_EFFORT = 'max'
private static final String ANTIPATTERNS_ARTIFACT = 'com.palantir.antipatterns:antipatterns:1.0-beta.4'
// See https://github.com/KengoTODA/findbugs-slf4j/issues/48 for why this is not a transitive dependency
private static final String SLF4J_FINDBUGS_PLUGIN = 'jp.skypencil.findbugs.slf4j:bug-pattern:1.2.4@jar'
private static final String[] OMITTED_VISITORS = ["StaticLoggerDetector"]

void apply(Project project) {
this.project = project
Expand Down Expand Up @@ -65,10 +68,12 @@ class BaselineFindBugs extends AbstractBaselinePlugin {
toolVersion = DEFAULT_FINDBUGS_VERSION
excludeFilter = excludeFilterFile
effort = DEFAULT_EFFORT
omitVisitors = OMITTED_VISITORS
}

project.dependencies {
findbugsPlugins ANTIPATTERNS_ARTIFACT
findbugsPlugins SLF4J_FINDBUGS_PLUGIN
}
}

Expand Down

0 comments on commit 135d410

Please sign in to comment.