PMD is very well known source code analyzer for Java, android and many more languages. It supports now Apex. You might be thinking how can we make PMD as part of our daily life ?
There are many ways
- We can run static code analysis standalone
- It can be part of ANT build to generate error reports
- Eclipse/IntelliJ IDEA IDE can use it as a plugin to show the bugs/violations while you are working on it.