使用 Gradle FindBugs Plugin , 如何生成 HTML 格式的输出??
FindBugsExtension确实有一些配置要设置。
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")
}
但是没有output属性设置为findbugs anttask。
最佳答案
报告只能在 FindBugs
任务 上配置。例如:
tasks.withType(FindBugs) {
reports {
xml.enabled = false
html.enabled = true
}
}
其他代码质量插件(Checkstyle、PMD 等)也是如此。
关于html - 如何使用 Gradle FindBugs 插件生成 HTML 输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15406469/