Java代码质量度量工具大阅兵
以下大部分工具使用样例请访问https://github.com/jiangxincode/ApkToolBoxGUI
FindBugs
FindBugs, a program which uses static analysis to look for bugs in Java code. It is free software, distributed under the terms of the Lesser GNU Public License. The name FindBugs™ and the FindBugs logo are trademarked by The University of Maryland. FindBugs has been downloaded more than a million times.
- FindBugs:http://findbugs.sourceforge.net/
- spotbugs(FindBugs继承者): https://spotbugs.github.io/
- FindBugs Bug Descriptions:http://findbugs.sourceforge.net/bugDescriptions.html
- FindBugs详解: http://www.cnblogs.com/jiangxinnju/p/6582404.html
- FindBugs Maven Plugin(for Maven 1.x): http://maven-plugins.sourceforge.net/maven-findbugs-plugin/
- FindBugs Maven Plugin(for Maven 2.0+): https://gleclaire.github.io/findbugs-maven-plugin/
- Jenkins+findbugs对java代码进行静态代码分析: https://blog.csdn.net/fighterandknight/article/details/51424257
CheckStyle
Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. It automates the process of checking Java code to spare humans of this boring (but important) task. This makes it ideal for projects that want to enforce a coding standard.
- CheckStyle:http://checkstyle.sourceforge.net/
- Eclipse Checkstyle Plug-in: https://sourceforge.net/projects/eclipse-cs/
- Checkclipse: https://sourceforge.net/projects/checkclipse/
- CheckStyle-IDEA: http://plugins.jetbrains.com/plugin/1065-checkstyle-idea
- maven-checkstyle-plugin: http://maven.apache.org/plugins/maven-checkstyle-plugin/
PMD
PMD is a source code analyzer. It finds common programming flaws like unused variables, empty catch blocks, unnecessary object creation, and so forth. It supports Java, JavaScript, Salesforce.com Apex and Visualforce, PLSQL, Apache Velocity, XML, XSL.
Additionally it includes CPD, the copy-paste-detector. CPD finds duplicated code in Java, C, C++, C#, Groovy, PHP, Ruby, Fortran, JavaScript, PLSQL, Apache Velocity, Scala, Objective C, Matlab, Python, Go, Swift and Salesforce.com Apex and Visualforce.
- PMD(various plugin addresses included):https://pmd.github.io/
- PMD Rules: https://pmd.github.io/pmd-5.3.6/pmd-java/rules/index.html
- maven-pmd-plugin: http://maven.apache.org/plugins/maven-pmd-plugin/
p3c
Alibaba Java Coding Guidelines pmd implements and IDE plugin
JDeodorant
JDeodorant is an Eclipse plug-in that detects design problems in Java software, known as code smells, and recommends appropriate refactorings to resolve them.
- JDeodorant: https://github.com/tsantalis/JDeodorant
Jdepend
JDepend traverses Java class file directories and generates design quality metrics for each Java package. JDepend allows you to automatically measure the quality of a design in terms of its extensibility, reusability, and maintainability to manage package dependencies effectively.
- Jdepend:http://www.clarkware.com/software/JDepend.html
- JDepend4Eclipse:http://marketplace.eclipse.org/content/jdepend4eclipse
- JDepend Maven Plugin: http://www.mojohaus.org/jdepend-maven-plugin/index.html
Metrics
- Eclipse Metrics plugin: https://sourceforge.net/projects/metrics/
- Eclipse Metrics plugin continued: https://sourceforge.net/projects/metrics2/
- Metrics 3 - Eclipse Metrics Plugin Continued 'Again': https://github.com/qxo/eclipse-metrics-plugin
Emma
a free Java code coverage tool
Emma:http://emma.sourceforge.net/ https://github.com/jiangxincode/Emma
eclemma(Emma Eclipse Plugin, 开始基于Emma后来基于JaCoCo):http://www.eclemma.org/
maven-emma-plugin(for Maven 1.x): http://emma.sourceforge.net/maven-emma-plugin/
emma-maven-plugin(for Maven 2.0+): https://github.com/jiangxincode/emma-maven-plugin
Getting “Skipping JaCoCo execution due to missing execution data file” upon executing JaCoCo? https://stackoverflow.com/questions/18107375/getting-skipping-jacoco-execution-due-to-missing-execution-data-file-upon-exec
Cobertura
Cobertura is a free Java code coverage reporting tool.
- Cobertura: https://github.com/cobertura/cobertura
- eCobertura(Cobertura Eclipse Plugin):http://ecobertura.johoop.de/
- cobertura-maven-plugin: http://www.mojohaus.org/cobertura-maven-plugin/
- 学习Maven之Cobertura Maven Plugin: https://www.cnblogs.com/qyf404/archive/2015/12/12/5040593.html
Coverlipse
Coverlipse is an Eclipse plugin that visualizes the code coverage of JUnit Tests. It is unique for it integrates seamlessly in Eclipse. The coverage results are given directly after a JUnit run. This makes it the perfect tool for developers to recognize their tests fullfil their task.
- Coverlipse: http://coverlipse.sourceforge.net/
JavaNCSS
JavaNCSS - A Source Measurement Suite for Java
- JavaNCSS: http://www.kclee.de/clemens/java/javancss/
- javancss-maven-plugin: http://www.mojohaus.org/javancss-maven-plugin/usage.html
Simian
Simian (Similarity Analyser) identifies duplication in Java, C#, C, C++, COBOL, Ruby, JSP, ASP, HTML, XML, Visual Basic, Groovy source code and even plain text files. In fact, simian can be used on any human readable files such as ini files, deployment descriptors, you name it.
- Simian:http://www.harukizaemon.com/simian/
- maven-simian-plugin(for Maven 1.x): http://maven.apache.org/archives/maven-1.x/plugins/simian/
- simian-maven-plugin(for Maven 2.0+): https://github.com/jiangxincode/simian-maven-plugin
注:If you like simian-maven-plugin, you can vote for my answer on http://stackoverflow.com/questions/1077700/how-do-you-use-the-maven-simian-plugin-in-maven2
SourceMonitor
SourceMonitor lets you see inside your software source code to find out how much code you have and to identify the relative complexity of your modules. For example, you can use SourceMonitor to identify the code that is most likely to contain defects and thus warrants formal review.
- SourceMonitor: http://www.campwoodsw.com/
- 代码度量工具——SourceMonitor的学习和使用:http://www.cnblogs.com/bangerlee/archive/2011/09/18/2178172.html
iPlasma
iPlasma is an integrated environment for quality analysis of object-oriented software systems that includes support for all the necessary phases of analysis: from model extraction (including scalable parsing for C++ and Java) up to high-level metrics-based analysis, or detection of code duplication. iPlasma has three major advantages: extensibility of supported analysis, integration with further analysis tools and scalability, as it was used in the past to analyse large-scale projects in the size of millions of code lines (e.g. Eclipse and Mozilla).
inFusion
Whether you own, are responsible for, or are acquiring software projects in C/C++ or Java, inFusion puts you in full control of architecture and design quality. inFusion makes quality assurance of multi-million LOC systems not merely practical, but effective, successfully handling both object oriented and procedural style code.
- http://www.intooitus.com/products/infusion(deprecated)
- InFusion错误类型分析:http://www.cnblogs.com/Leo_wl/p/3493231.html
- 软件设计度量工具inFusion(一):inFusion的基本概念: http://blog.csdn.net/aitangyong/article/details/50206419
- 软件设计度量工具inFusion(二):看懂inFusion度量结果: http://blog.csdn.net/aitangyong/article/details/50250967
coverity
Coverity® static application security testing (SAST) helps you build software that’s more secure, higher-quality, and compliant with standards.
- http://www.coverity.com/
- COVERITY CI: https://scan.coverity.com/
cloc
cloc counts blank lines, comment lines, and physical lines of source code in many programming languages.
额外阅读
- 浅淡静态代码分析工具:http://www.cnblogs.com/hyddd/archive/2008/12/16/1356310.html
- 七款代码味道识别工具【简介】:http://blog.csdn.net/lovelion/article/details/18467149
欢迎和大家交流技术相关问题:
- 邮箱: jiangxinnju@163.com
- 博客园: http://www.cnblogs.com/jiangxinnju
- GitHub: https://github.com/jiangxincode
- 知乎: https://www.zhihu.com/people/jiangxinnju
Java代码质量度量工具大阅兵的更多相关文章
- C++代码质量度量工具大阅兵
姊妹篇:Java代码质量度量工具大阅兵: https://www.cnblogs.com/jiangxinnju/p/10010177.html cppcheck cppcheck: https:// ...
- 提高Java代码质量的Eclipse插件之Checkstyle的使用详解
提高Java代码质量的Eclipse插件之Checkstyle的使用详解 CheckStyle是SourceForge下的一个项目,提供了一个帮助JAVA开发人员遵守某些编码规范的工具.它能够自动化代 ...
- JSLint JavaScript代码质量审查工具汉化中文版隆重发布
JSLint是一款JavaScript代码质量审查工具,它可以指出代码中错误.不规范的地方,非常之严格,甚至多写一个空格都会发出警告. JSLint的审查规则,根据众多前辈多年编程经验而写,字字珠玑, ...
- 拔高你的Java代码质量吧:推荐使用枚举定义常量(转)
提高你的Java代码质量吧:推荐使用枚举定义常量 一.分析 常量的声明是每一个项目中不可或缺的,在Java1.5之前,我们只有两种方式的声明:类常量和接口常量.不过,在1.5版之后有了改进,即新增了一 ...
- 提高Java代码质量的Eclipse插件之Checkstyle的使用具体解释
CheckStyle是SourceForge下的一个项目,提供了一个帮助JAVA开发者遵守某些编码规范的工具.它可以自己主动化代码规范检查过程.从而使得开发者从这项重要可是枯燥的任务中解脱出来. Ch ...
- 四种java代码静态检查工具
[转载]常用 Java 静态代码分析工具的分析与比较 转载自 开源中国社区 http://www.oschina.net/question/129540_23043 1月16日厦门 OSC ...
- Java代码质量监控工具Sonar安装
1. 代码质量七宗罪 Sonar是一个代码质量管理系统.它的帮助文档开篇明义,提出了代码质量的七宗罪.总结的比較到位.最好还是一看: 1. Bug和隐藏Bug(Bugs and Pot ...
- Lombok简化Java代码的好工具
lombok 的官方网址:http://projectlombok.org/ 关于lombok 的介绍,有几篇帖子,写得都很好 比如 http://www.blogjava.net/fancydeep ...
- 提高你的Java代码质量吧:如果有必要,使用变长数组吧
一.分析 Java中的数组是定长的,一旦经过初始化声明就不可改变长度,这在实际使用中非常不方便. 二.场景 比如要对班级学生的信息进行统计,因为我们不知道一个班级会有多少学生(随时都有可能会有学生 ...
随机推荐
- SQL已存在则更新不存在则插入
不废话,下代码. replace into T_Life_UMessage(message_id,account,isread,isdelete)values(?,?,1,1) 意思是若不存在则插入要 ...
- vue之计算属性和侦听器
一.计算属性 模板内的表达式非常便利,但是设计它们的初衷是用于简单运算的.在模板中放入太多的逻辑会让模板过重且难以维护.例如: <div> {{ message.split('').rev ...
- JavaEE Servlet 学习笔记
一.Servlet概述 1.什么是Servlet Servlet是一个运行在服务器端的Java小程序,通过HTTP协议用于接收来自客户端请求,并发出响应. 2.Servlet中的方法 public v ...
- zabbix监控日志文件
环境: 操作系统:centos 6.8 ,zabbix软件版本:zabbix 3.0.1 前提条件:zabbix客户端已经配置了主动模式,如何配置主动模式,请参考此文 监控日志keys 首先要了解k ...
- POJ--1936 All in All(水题,暴力即可)
All in All Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 30543 Accepted: 12723 Descript ...
- Apple Pay的实现
首先是搜到的大神写的全套知识点:http://www.jianshu.com/p/8d7b86f1d142 http://www.cnblogs.com/dashunzi/archive/2016/0 ...
- pip freeze
总结: 1.输出安装的包信息,并在另一个环境快速安装 Generate output suitable for a requirements file. $ pip freeze docutils== ...
- apparmor 引起自定义mysql 日志问题
今天手贱,看到mysql 的日志在/var/log/mysql下面.总是觉得别扭,于是就想改变日志的位置, 本人开发环境 vagrant + ubuntu12.04 ,在/etc/mysql/mys ...
- 基于bind搭建DNS主从
使用bind的主从复制功能可以实现的功能:提供冗余,避免单点故障:均衡负载查询需求,从而提高系统可用性. 一.安装 #bind-chroot 负责DNS安全作用,将bind进程严格限制在特定的目录中 ...
- 2018/04/04 PHP 中的 数组排序问题
简单说一下为什么要总结一下PHP中关于数组排序的问题. 在很多时候我们对于数组要进行排序,但是 PHP 中对于排序已经有了很多封装. 但是某些函数是修改原数组,一部分是返回修改后数组,与其一个个试,不 ...