I want findbugs to fail the build only if there are high priority bugs, but want all bug instances (high, medium, low) to be listed in the xml report generated by fingBugs. There is reportLevel attribute in findBugs plugin, but if I set it to “high” and ignoreFailure to false it does fail the build on high priority bug but it does not report the medium and low priority bugs in xml report at all.
I want the build to fail only on high priority bugs but should report all bugs in report xml.
findbugs {
reportLevel = high
ignoreFailures = true
}
Is there a way to achieve this ?
I don't think it is possible at the moment. You can open a feature request here : https://github.com/spotbugs/spotbugs-gradle-plugin/issues
However, you can do this using the Jenkins plugin. Keep the reportLevel
to Medium in your gradle configuration but, set the failure level on Jenkins to High.