|
IntellijFindBugsPlugins
A summary of FindBugs plugins for IntelliJ IDEA
ReviewsHere's a quick run-down before we get to the individual reviews. There are three ways to run FindBugs within IntelliJ IDEA, via three separate plugins.
These plugins can all be downloaded through IntelliJ's built-in plugin manager. QAPlug-FindBugsQAPlug provides code analysis for CheckStyle, FindBugs, and PMD. Running FindBugs is easy and straightforward. To start, you click the main Analyze menu and select Analyze Code. You are presented with a standard IntelliJ dialog asking about the scope of the analysis. You can choose to analyze the whole project, specific files or folders, or one of IntelliJ's pre-defined scopes.
During analysis, a helpful progress bar shows you what's happening. Unfortunately the analysis cannot be run in the background, and clicking the Cancel button doesn't do anything.
The results window looks and acts like other IntelliJ result tabs (search, code inspection, etc). It allows you to optionally categorize bugs by severity (warning vs. error) and by package.
The detectors are configurable by clicking the configuration button on the results:
Note - one possible point of confusion is that the project must be built for this plugin to show any results. And any changes will not be reflected until building. This may confuse IntelliJ users since the built-in code analysis always operates on the source code. Pro:
Con:
FindBugs pluginThe plugin called simply "FindBugs" provides a quick & dirty way to run FindBugs. To run it, you simply click the toolbar icon:
And configure the analysis:
The plugin then runs everything in the background using IntelliJ's background tasks feature. You can click the task in the status bar to see a progress bar for "copying resources":
Followed by the real FindBugs analysis progress bar, which doesn't move. And despite the little red X button to the right, FindBugs execution cannot be cancelled!
The results are shown in an IntelliJ compilation results window, which leaves you with some inappropriate terminology and toolbar buttons such as "Exclude from compilation":
Pro:
Con:
FindBugs-IDEAFindBugs-IDEA is surely the most mature and robust FindBugs plugin for IntelliJ. It lacks the ease of use of QAPlug but provides much more in the way of configuration options and view customization. First you click the Tools menu:
And you see a somewhat cluttered dialog for configuring the analysis. It includes a tab for the detectors (with a description of each one):
(I had to click "Restore Defaults" for the detectors to show up - bug!) as well as a tab for filtering the results:
The analysis shows a somewhat helpful progress window and can run in the background and it can be cancelled!
When the analysis is complete, the results are shown in an toolwindow very much like IntelliJ's built-in results windows:
Here you can group by any combination of category, severity, priority, rank, and Java package. The results window has a button to "export to XML/HTML", but it didn't work for me. First the Browse button didn't work, then when I typed the folder name by hand, I got this error message:
Yes, my desktop is writable. Using forward or back slashes didn't seem to help. Pro:
Con:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Hello Keith
First of all as a co-author of QAPlug, thank you for your comparison.
It's great to see a lot of advantages in "Pro" section for QAPlug. On the other hand, we will improve things described in "Con" in next releases.
Have you got any other suggestions? How this plugin should look like in your imagination?
Best regards Krystian Lider
This review is a bit dated. I find the current version of QAPlug FindBugs? much nicer than "FindPlugs?-IDEA". What's missing from QAPlug FindBugs? for me is the ability to use standard FindBugs? "File Filters". Without them I cannot easily use the same settings in IntelliJ and on a build system that uses the FindBugs? command-line tool and "File Filters".
I have no affiliation with QAPlug or FindBugs?.