<?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报告的更多相关文章

  1. jmeter+ant生成xml报告

    1.jdk安装 2.jmter安装 3.ant安装 下载apache-ant-1.10.6-bin.zip,直接解压就可使用,和jmeter类似 ant环境变量配置 新建系统变量:ANT_HOME,变 ...

  2. 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中即可: 复制前生成:

  3. window 下 jmeter+ant 自动生成html报告并发送邮件

    一.安装ant 1.ant 下载地址:https://ant.apache.org/bindownload.cgi 2.下载完成解压到指定目录下 3.配置ant 环境变量 新建系统变量 -ANT_HO ...

  4. 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 ...

  5. jmeter+ant+jenkins+mac报告优化

    一.在上篇博客中生成的报告有两个问题: 1.date not defined 2.Min Time和Max Time显示成了NaN 二.Jmeter+Ant报告生成原理: 在解决问题之前,让我们先弄清 ...

  6. jmeter5.0生成html报告 快速入门

    JMeter性能测试5.0时代之-多维度的图形化HTML报告 快速入门 1.确认基本配置 在jmeter.properties或者user.properties确认如下配置项: jmeter.save ...

  7. 如何生成Junit报告

    前言: 对Eclipse的工程写单元测试: 1. 一个工程有多个测试类,将测试类放到一个测试包下. 2. 每一个测试类写好,都单独执行run as ->JUnit Test测一下.    3. ...

  8. ant jmeter 优化报告

    一:主要内容 报告展示,该报告利用的jmeter.results.shanhe.me.xsl里面加入了自己写的部分代码,优化了展示效果 下载安装ant 修改jmeter.properties 下载jm ...

  9. jmeter+ant+jenkins+mac报告优化(一):解决Min Time和Max Time显示NaN

    一.在上篇博客中生成的报告有两个问题: 1.date not defined 2.Min Time和Max Time显示成了NaN 二.Jmeter+Ant报告生成原理: 1.在Jmeter的extr ...

随机推荐

  1. eclipse如何设置多个字符的智能提示

    clipse代码里面的代码提示功能默认是关闭的,只有输入“.”的时候才会提示功能,用vs的用户可能不太习惯这种,vs是输入任何字母都会提示,下面说一下如何修改eclipse配置,开启代码自动提示功能打 ...

  2. hdfs深入:03、hdfs的架构以及副本机制和block块存储

    HDFS分布式文件系统设计目标 1.            硬件错误  由于集群很多时候由数量众多的廉价机组成,使得硬件错误成为常态 2.            数据流访问  所有应用以流的方式访问数 ...

  3. live555简介

    live555 编辑   目录 1live555简介 2Live555 Streaming Media整体框架 3openRTSP客户端流程     1live555简介编辑 Live555 是一个为 ...

  4. 「 HDU P4734 」 F(x)

    # 题目大意 对于一个数 $x$,它的每一位数字分别是 $A_{n}A_{n-1}A_{n-2}\cdots A_{2}A_{1}$,定义其权重 $f(x)=\sum_{i=1}^{n}\left(A ...

  5. CentOS7-Git安装以及使用

    2018-09-14 Git安装 在bash终端中输入命令sudo yum install git回车. (出乎意料的顺利) 在随后出现的交互式对话中输入y即可. 随后,当任务执行完后,在bash中键 ...

  6. js 技巧 (九)按键JS

    1. 禁止复制(copy),禁用鼠标右键! <SCRIPT> //加入页面保护 function rf() {return false; } document.oncontextmenu ...

  7. java 常用集合类型--以及其特性

    1:集合:   (1) Collection(单列集合)        List(有序,可重复)            ArrayList                底层数据结构是数组,查询快,增 ...

  8. ruby on rails 常见配置错误解决

    error:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError) 先删除 Ruby下的D:\Ruby22- ...

  9. 查看FPM在你的机子上的平均内存占用情况

    ps --no-headers -o "rss,cmd" -C php-fpm | awk '{ sum+=$1 } END { printf ("%d%s\n" ...

  10. django-3 admin开启后台配置并展示表内容

    设置了superuser 之后,可以在run server 后, 通过浏览器访问后台,进行界面配置. 1. python manage.py creatersuperuser 此命令在manage.p ...