Is it possible for the FindBugs plugin for eclipse to report as errors instead of warnings?
I am working on a very large legacy code base. We are looking to introduce FindBugs into the development practice.
I intend to have FindBugs run whenever the code is built by eclipse.
I would like to be able to make the findbugs warnings appear as errors in the code much in this way you can change the severity level in eclipse
Is it possible for eclipse to report the warnings it produces as errors?
The accepted answer is out of date now. I don't know the release it changed in, but the Reporter Configuration tab of the FindBugs Eclipse plugin preferences dialog now allows you to configure each severity of bug (Scariest, Scary, Troubling, and Of Concern) as Info, Warning, or Error. Bugs marked as Error will cause the build to fail.
No, it isn't possible to have the FindBugs Eclipse plugin mark potential bugs as errors in the code.
I did some checking and the FindBugs Maven plugin doesn't provide an option to do this either (so no luck there too).
I would suggest logging an RFE (request for enhancement) to the FindBugs Eclipse plugin developers. Their bug tracking database is available here.
I do not think so. Errors in Eclipse are reported by Eclipse's JDT compiler, whereas the FindBugs plugin simply reports warnings by plugging into the Eclipse system. I am not sure if the compiler can know of FindBugs' presence and get its list of warnings to report as errors.
However, if you trying to get the build to fail because of FindBugs warnings, you can try their ANT task, and cause the build to fail if there are any warnings.