Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate HTML output using Gradle FindBugs Plugin

Using the Gradle FindBugs Plugin, how can I generate the output in HTML format??

The FindBugsExtension do have some config to set.

findbugs {     toolVersion = "2.0.1"     sourceSets = [sourceSets.main]     ignoreFailures = true     reportsDir = file("$project.buildDir/findbugsReports")     effort = "max"     reportLevel = "high"     visitors = ["FindSqlInjection", "SwitchFallthrough"]     omitVisitors = ["FindNonShortCircuit"]     includeFilter = file("$rootProject.projectDir/config/findbugs/includeFilter.xml")     excludeFilter = file("$rootProject.projectDir/config/findbugs/excludeFilter.xml") } 

But there is no output Properties to set as the findbugs anttask.

like image 234
Lai Avatar asked Mar 14 '13 10:03

Lai


1 Answers

Reports can only be configured on the FindBugs tasks. For example:

tasks.withType(FindBugs) {     reports {         xml.enabled = false         html.enabled = true     } } 

The same holds for the other code quality plugins (Checkstyle, PMD, etc.).

like image 109
Peter Niederwieser Avatar answered Oct 08 '22 11:10

Peter Niederwieser