PMD is very well known source code analyzer for Java, android and many more languages. Good news for us (Salesforce developers) is , that it supports now Apex. You might be thinking how can we make PMD as part of our daily life ?
There are multiple ways
- We can run static code analysis standalone
- It can be part of ANT build to generate error reports
- Jenkins can use it to generate nice report around code quality
- Eclipse can use it as a plugin to generate report
In this blog post, we will discuss option 1, that is running it as a standalone application to generate code quality report.
First Step is to download jar file of latest PMD distribution from here. Continue reading “Automated Code review for Apex in Salesforce – Static code analysis – Video”