代码检测工具(一)FindBugs、PMD和CheckStyle概况、安装
来源:互联网 发布:java quartz 编辑:程序博客网 时间:2024/06/01 07:29
一、FindBugs、PMD和CheckStyle对比
工具
目的
检查项
FindBugs
检查.class
基于Bug Patterns概念,查找javabytecode(.class文件)中的潜在bug
主要检查bytecode中的bug patterns,如NullPoint空指针检查、没有合理关闭资源、字符串相同判断错(==,而不是equals)等
PMD
检查源文件
检查Java源文件中的潜在问题
主要包括:
空try/catch/finally/switch语句块
未使用的局部变量、参数和private方法
空if/while语句
过于复杂的表达式,如不必要的if语句等
复杂类
CheckStyle
检查源文件
主要关注格式
检查Java源文件是否与代码规范相符
主要包括:
Javadoc注释
命名规范
多余没用的Imports
Size度量,如过长的方法
缺少必要的空格Whitespace
重复代码
二、安装FindBugs-IDEA(android studio, Intelliji idea)Preferences->Plugins->Browse repositories
输入FindBugs-IDEA,搜索安装
Preferences->Other Settings->FindBugs-IDEA,可以配置需要生成报表的等级、过滤器
参考findbugs安装PMD,Checkstyle-idea
二、安装PMDPlugin (Intelliji idea)
如果是android studio 可安装QAPlug-PMD
三、安装Checkstyle-IDEA 最新版需要JDK8,考虑单元测试JDK6使用,可安装QAPplug-Checkstyle
相关资料链接:
http://blog.csdn.net/ml5271169588/article/details/6975701
- 代码检测工具(一)FindBugs、PMD和CheckStyle概况、安装
- 代码质量检测工具FindBugs、PMD和CheckStyle对比
- java进阶(四)------java编程规范---代码质量检测工具FindBugs、PMD和CheckStyle的安装
- java进阶(三)------java编程规范---代码质量检测工具FindBugs、PMD和CheckStyle对比
- myeclipse2014 java代码检测工具安装(Find Bugs/PMD/Checkstyle)
- myeclipse 安装checkstyle, findbugs 和pmd
- FindBugs、PMD和CheckStyle对比
- FindBugs、PMD和CheckStyle对比
- FindBugs、PMD和CheckStyle对比
- FindBugs、PMD和CheckStyle对比
- FindBugs PMD 和CheckStyle对比
- Checkstyle, FindBugs, PMD, VisualVM四种代码检测工具的比较与相关心得
- 代码走查工具FindBugs, PMD,CheckStyle
- eclipse安装checkstyle、PMD、FindBugs、VisualVM
- MyEclipse2014 安装 checkstyle、PMD、findbugs 最简便
- eclipse安装checkstyle、PMD、FindBugs、VisualVM
- checkstyle pmd findbugs工具比较(转)
- Checkstyle, PMD, Findbugs对比
- MVC
- 放肆地使用UIBezierPath和CAShapeLayer画各种图形
- hihoCoder week 85 Numeric Keypad 【DFS】
- 1019. General Palindromic Number (20)
- String类型
- 代码检测工具(一)FindBugs、PMD和CheckStyle概况、安装
- PHP数值的保留2位小数和四舍五入
- 用JAVA写的插入排序
- 代码检测工具(二)findbugs学习
- am335x嵌入式开发-GPIO操作
- spring mvc 的两种配置方式继承controller和xml配置delegate
- 开发环境配置(一) Flash Builder4.6 破解方法的实践
- 深入理解Linux内核 Memory Addressing Chapter-2
- 【Hibernate】映射关系总结