编码标准
代码重复
代码覆盖率
依赖项分析
复杂度监控
缺陷分析
CheckStyle:用于编码(语法)标准 http://checkstyle.sourceforge.net/
PMD 的 CPD:帮助发现代码重复(语义) http://pmd.sourceforge.net/
cobertura:测量代码覆盖率 http://cobertura.sourceforge.net/
JDepend:JDepend一个开放源代码的可以用来评价Java程序质量的优秀工具,它遍历Java class的文件目录,以Java包(package)为单位,为
每一个包/类自动生成 包的依赖程度,提供依赖项分析.http://www.clarkware.com/software/JDepend.html
-------------------------------------------------------------------------------------
javancss: 是一个开源的度量工具,提供圈复杂度的方法级的值。http://www.kclee.de/clemens/java/javancss/
Metric: 有效地查出复杂度http://metrics.sourceforge.net/
-------------------------------------------------------------------------------------
findbugs:FindBugs 是一个静态分析工具,它检查类或者 JAR 文件,将字节码与一组缺陷模式进行对比以发现可能的问
题.http://findbugs.sourceforge.net/
functiontest(Selenium):功能性测试 http://openqa.org/ http://www.eclipse.org/downloads/
loadtest(jmeter):性能与压力测试 http://jakarta.apache.org/jmeter/
-------------------------------------------------------------------------------------
Eclipse 插件的 URL
CheckStyle 编码标准分析 http://eclipse-cs.sourceforge.net/update/
Coverlipse 测试代码覆盖率 http://coverlipse.sf.net/update
CPD http://pmd.sourceforge.net/eclipse/
JDepend 包依赖项分析 http://andrei.gmxhome.de/eclipse/
Metrics 复杂度监控 http://metrics.sourceforge.net/update
Checkstyle 会将检查的结果输出到netbeans的标准窗口中,下面解释了一些常见的输出结果,以供参考。
序号 输出内容意义
1 Type is missing a javadoc commentClass 缺少类型说明
2“{” should be on the previous line “{” 应该位于前一行
3Methos is missing a javadoc comment方法前面缺少javadoc注释
4Expected @throws tag for “Exception”在注释中希望有@throws的说明
5“.” Is preceeded with whitespace “.” 前面不能有空格
6“.” Is followed by whitespace“.” 后面不能有空格
7“=” is not preceeded with whitespace“=” 前面缺少空格
8“=” is not followed with whitespace“=” 后面缺少空格
9“}” should be on the same line“}” 应该与下条语句位于同一行
10Unused @param tag for “unused”没有参数“unused”,不需注释
11Variable “CA” missing javadoc变量“CA”缺少javadoc注释
12Line longer than 80characters行长度超过80
13Line contains a tab character行含有”tab” 字符
14Redundant “Public” modifier冗余的“public” modifier
15Final modifier out of order with the JSL suggestionFinal modifier的顺序错误
16Avoid using the “.*” form of importImport格式避免使用“.*”
17Redundant import from the same package从同一个包中Import内容
18Unused import-java.util.listImport进来的java.util.list没有被使用
19Duplicate import to line 13重复Import同一个内容
20Import from illegal package从非法包中 Import内容
21“while” construct must use “{}”“while” 语句缺少“{}”
22Variable “sTest1” must be private and have accessor method变量“sTest1”应该是private的,并且有调用它的方法
23Variable “ABC” must match pattern “^[a-z][a-zA-Z0-9]*$”变量“ABC”不符合命名规则“^[a-z][a-zA-Z0-9]*$”
24“(” is followed by whitespace“(” 后面不能有空格 25“)” is proceeded by whitespace“)” 前面不能有空格