<?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. jQuery 点击查看 收起

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  2. CSS3 loading 和 文字颜色渐变

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  3. anchor_target_layer层其他部分解读

    inds_inside = np.where( (all_anchors[:, 0] >= -self._allowed_border) & (all_anchors[:, 1] > ...

  4. MRC转ARC

    转载请注明出处:http://blog.csdn.net/cywn_d/article/details/18222671 1.删除所有retain,release和autorelease. 2.把原来 ...

  5. Go:二分查找

    package main import "fmt" func BinarySearch(arr *[5]int, leftIndex int, rightIndex int, fi ...

  6. ubuntu 安装 navicat

    下载navicat解压到opt目录 创建桌面快捷方式sudo vim /usr/share/applications/navicat.desktop [Desktop Entry] Encoding= ...

  7. Python之布尔

    Python之布尔(bool) 在计算机中的所用判断,都是用布尔的True和False来判断的. 条件成立:True ( 1 ) 条件不成立:False ( 0 ) 以下情况是False: [ ]:空 ...

  8. random,json,pickle,hashlib,shutil,hmac,shelve 模块

    一,复习 ''' 项目开发规范 ATM -- bin: 可执行文件 # run.py import os import sys BASE_DIR = os.path.dirname(os.path.d ...

  9. Java线上应用故障排查

    线上故障主要2种: CPU利用率很高, 内存占用率很大 一.CPU利用率很高 1. top查询那个进程CPU使用率高 2. 显示进程列表 ps -mp pid -o THREAD,tid,time 找 ...

  10. Shrio Demo

    package com.atguigu.shiro.helloworld; import org.apache.shiro.SecurityUtils; import org.apache.shiro ...