How to generate HTML output using Gradle FindBugs Plugin

HtmlGradleFindbugs

Html Problem Overview


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.

Html Solutions


Solution 1 - Html

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.).

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionLaiView Question on Stackoverflow
Solution 1 - HtmlPeter NiederwieserView Answer on Stackoverflow