Skip to content

Conversation

jfeenstra
Copy link

In order to add the FindSecurityBugs plugin to our build, we needed to have access to FindBugs's plugin mechanism. This pull requests gives this access. Here's a usage example:

findbugsSettings
findbugsReportPath := Some(crossTarget.value / "findbugs" / "report.html")
findbugsReportType := Some(ReportType.PlainHtml)
findbugsPluginList += s"${Path.userHome.absolutePath}/.ivy2/cache/com.h3xstream.findsecbugs/findsecbugs-plugin/jars/findsecbugs-plugin-1.4.5.jar"
findbugsIncludeFilters := Some(<FindBugsFilter>
  <Match>
    <Bug category="SECURITY"/>
  </Match>
</FindBugsFilter>)
compile <<= (compile in Compile).dependsOn(FindBugs.findbugs)

@wurstbrot
Copy link

wurstbrot commented Jul 5, 2016

I have a recommendation:
In CommandLine, add a check that the file exists, e.g.:

for(path <-findbugsPluginList) {
    if(!java.nio.file.Files.exists(java.nio.file.Paths.get(path))) {
            streams.log.error("Error: Could not find plugin" + path);
    }
}

@ideadapt
Copy link

ideadapt commented Dec 6, 2017

Does anyone know the status here? I would be really cool to have a way to configure findbugs plugins!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants