PMD
PMD 是源码检测工具。它能发现常见编程缺陷,如未使用的变量,空catch块,不必要的对象创建等等。PMD支持Java,JavaScript,Salesforce.com Apex, PLSQL, Apache Velocity, XML, XSL. 另外,它包括了CPD(copy-paste-detector复制粘贴代码检测器),CPD能发现Java, C, C++, C#, Groovy, PHP, Ruby, Fortran, JavaScript, PLSQL, Apache Velocity, Scala, Objective C, Matlab, Python, Go, Swift and Salesforce.com Apex.的重复的代码。
Ecplise安装PMD插件
help -> install new software
https://dl.bintray.com/pmd/pmd-eclipse-plugin/updates/