- A short video showing PMD, Checkstyle and Findbugs running from IntelliJ
- Why you would want to use them
- And hints and tips on getting the plugins working on Mac
Recently I’ve been working with PMD and Findbugs in my IDE.
I stumbled across the QAPlug, IntelliJ plugin which makes it easy to bundle in the FindBugs, CheckStyle and PMD plugins.
These each check for different issues and suggestions but basically statically analyse either the source or compiled byte code to provide a list of suggestions.
QAPlug wraps it all up in an right click menu item to Analyze the source code and shows all the items in a handy list for you to work through.
Just make sure you double click on the lowest branch in the tree to jump right to the code position where the tool identified the issue or suggestion.
This is like having a coach sitting by you when you are writing code. And some of the suggestions the tools make you won’t understand, so you have to search and learn what they mean - forcing you to learn that little bit more about your chosen language.
And don’t take all the suggestions at face value. You choose which suggestions to act on, and you can configure the tools to warn you about some things and not others.
Over time, you might choose to add the command line and build versions of the tools into your CI process rather than just your personal coding approach.
When I restarted my ide - disaster. The project wouldn’t load because the plugin couldn’t start
“cannot load project com.intellij.ide.plugins.pluginmanager$startupabortedexception…"
So I searched and this was the most relevant result for me
With the suggested solution being:
cp /Applications/IntelliJ\ IDEA\ 14.app/Contents/bin/idea.properties
JVMVersion=1.6+(I have JDKs 1.6, 1.7 and 1.8 installed on my machine).
restart IntelliJ IDEA