使用pmd。
在项目上右键:

安装和使用见:
https://www.cnblogs.com/ishu/p/4521907.html
https://pmd.github.io/latest/pmd_userdocs_tools.html#eclipse
https://pmd.github.io/
http://www.uml.org.cn/codeNorms/201502115.asp
https://www.ibm.com/developerworks/cn/java/j-ap01117/ 分析几种工具
https://blog.csdn.net/ml5271169588/article/details/6975690 使用手册
pmd 使用
https://wenku.baidu.com/view/08f8caa6d4d8d15abf234e25.html




