checkstyle+ant生成checkstyle报告
<?xml version="1.0" encoding="UTF-8" ?>
<project name="tibim" default="xml2html"
xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant" basedir=".">
<description>
checkstyle tibim project!
</description>
<property name="extrlib"
location="D:\jenkins\svn\web\TiBIM\webapps\web\WEB-INF\lib" />
<property name="checkstyleFile" value="./checkstyle" />
<property name="project.src" location="./src" />
<target name="clean" description="clean up">
<delete dir="${checkstyleFile}" />
</target>
<path id="compile.classpath">
<fileset dir="${extrlib}">
<include name="**/*.jar" />
</fileset>
</path>
<target name="init" depends="clean">
<!-- Create the classes directory structure used by compile -->
<mkdir dir="${checkstyleFile}" />
</target>
<target name="checkstyle" depends="init"
description="Generates a report of code convention violations.">
<taskdef
resource="com/puppycrawl/tools/checkstyle/ant/checkstyle-ant-task.properties"
classpath="${extrlib}/checkstyle-8.0-all.jar" />
<checkstyle config="${extrlib}/code_rules.xml"
failureProperty="checkstyle.failure" failOnViolation="false">
<formatter type="xml" tofile="${checkstyleFile}/checkstyle_report.xml" />
<fileset dir="${project.src}" includes="**/*.java" />
</checkstyle>
</target>
<target name="xml2html" depends="checkstyle">
<xslt in="${checkstyleFile}/checkstyle_report.xml" out="${checkstyleFile}/checkstyle.html"
style="${extrlib}/checkstyle-frames.xsl">
<param name="output.dir" expression="${checkstyleFile}" />
</xslt>
</target>
</project>
其中checkstyle-8.0-all.jar是checkstyle依赖的jar包,可以在https://sourceforge.net/projects/checkstyle/files/checkstyle/处下载使用
code_rules.xml是公司内部的checkstyle规范文档,可以在http://checkstyle.sourceforge.net/处下载sun公司或者google的代码规范
checkstyle-frames.xsl是生成checkstyle测试报告的样式表,可以在github上,https://github.com/checkstyle/contribution下面xsl文件下找到
欢迎转载,转载请注明出处:http://www.cnblogs.com/hustar0102/p/5885115.html
checkstyle+ant生成checkstyle报告的更多相关文章
- jmeter+ant生成xml报告
1.jdk安装 2.jmter安装 3.ant安装 下载apache-ant-1.10.6-bin.zip,直接解压就可使用,和jmeter类似 ant环境变量配置 新建系统变量:ANT_HOME,变 ...
- Jmeter+Ant生成结果报告时,MinTime、MaxTime显示NaN的问题
将apache-jmeter-2.13\lib中的serializer-2.7.2.jar.xalan-2.7.2.jar复制到apache-ant-1.9.6\lib中即可: 复制前生成:
- window 下 jmeter+ant 自动生成html报告并发送邮件
一.安装ant 1.ant 下载地址:https://ant.apache.org/bindownload.cgi 2.下载完成解压到指定目录下 3.配置ant 环境变量 新建系统变量 -ANT_HO ...
- jmeter+ant+jenkins+mac 报告优化(三) 使用命令行执行jmeter方式生成多维度的图形化HTML报告
1.在构建中填写如下命令: 2.start.sh文件的内容 cd /Applications/apache-jmeter-3.0/bin/ CURTIME=`date +%Y%m%d%H%M` ./j ...
- jmeter+ant+jenkins+mac报告优化
一.在上篇博客中生成的报告有两个问题: 1.date not defined 2.Min Time和Max Time显示成了NaN 二.Jmeter+Ant报告生成原理: 在解决问题之前,让我们先弄清 ...
- jmeter5.0生成html报告 快速入门
JMeter性能测试5.0时代之-多维度的图形化HTML报告 快速入门 1.确认基本配置 在jmeter.properties或者user.properties确认如下配置项: jmeter.save ...
- 如何生成Junit报告
前言: 对Eclipse的工程写单元测试: 1. 一个工程有多个测试类,将测试类放到一个测试包下. 2. 每一个测试类写好,都单独执行run as ->JUnit Test测一下. 3. ...
- ant jmeter 优化报告
一:主要内容 报告展示,该报告利用的jmeter.results.shanhe.me.xsl里面加入了自己写的部分代码,优化了展示效果 下载安装ant 修改jmeter.properties 下载jm ...
- jmeter+ant+jenkins+mac报告优化(一):解决Min Time和Max Time显示NaN
一.在上篇博客中生成的报告有两个问题: 1.date not defined 2.Min Time和Max Time显示成了NaN 二.Jmeter+Ant报告生成原理: 1.在Jmeter的extr ...
随机推荐
- linux远程开机
它需要wakeonlan这个软件, 从何处得到它? 它的官方站是:http://sourceforge.net/projects/wake-on-lan/ 如果使用rpm包可以 ...
- Bzoj4899 记忆的轮廓
B. 记忆的轮廓 题目描述 通往贤者之塔的路上,有许多的危机.我们可以把这个地形看做是一颗树,根节点编号为1,目标节点编号为n,其中1-n的简单路径上,编号依次递增,在[1,n]中,一共有n个节点.我 ...
- 零基础入门学习Python(19)--函数:我的地盘听我的
知识点 函数与过程 在许多编程语言中,函数(function)是有返回值的,过程(procedure)是简单.特殊并且没有返回值的.而在Python中,严格来说只有函数没有过程. 例如: >&g ...
- linux nslookup-查询域名DNS信息的工具
博主推荐:更多网络测试相关命令关注 网络测试 收藏linux命令大全 nslookup命令是常用域名查询工具,就是查DNS信息用的命令. nslookup4有两种工作模式,即“交互模式”和“非交互模 ...
- leds-gpio driver
我们还是先看看platform device是如何define的 platform device 是如何定义的 example1 在板级驱动中定义, 通过platform_add_devices()函 ...
- [学习资料] Tiny210(S5PV210) u-boot移植
Tiny210(S5PV210) u-boot移植http://www.microoh.com/bbs/forum.php?mod=viewthread&tid=254&fromuid ...
- Python Pandas库的学习(二)
今天我们继续讲下Python中一款数据分析很好的库.Pandas的学习 接着上回讲到的,如果有人听不懂,麻烦去翻阅一下我前面讲到的Pandas学习(一) 如果我们在数据中,想去3,4,5这几行数据,那 ...
- CentOS7 Failed to start LSB: Bring up/down解决方法(真正有效的方法)
刚刚装好的虚拟机突然不能上网了,报错很诡异,具体报错如下: /etc/init.d/network restart Restarting network (via systemctl): Job f ...
- FIRST集合、FOLLOW集合、SELECT集合以及预测分析表地构造
FIRST集合.FOLLOW集合.SELECT集合以及预测分析表地构造 FIRST集合的简单理解就是推导出的字符串的开头终结符的集合. FOLLOW集合简单的理解就对于非终结符后面接的第一个终结符. ...
- PowerDesigner物理模型用法总结
1. 生成sql脚本 Database→Generate Database 选择要输出的文件路径,即文件存储路径,并根据需要修改文件名,单击确定后便会生成sql脚本. 在Options选项卡里,可以 ...