原创  一段ANT使用checkStyle代码 收藏

<target name="checkstyle"  description="Generates a report of code convention violations." >
  <taskdef name="checkstyle" classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
        <classpath refid="lib"/>
  </taskdef>
  <delete dir="checkstyle/doc" quiet="true" />
  <mkdir dir="checkstyle/doc" />  
  <checkstyle config="checkstyle/sun_checks.xml"
         failureProperty="checkstyle.failure"
         failOnViolation="false">
     <formatter type="xml" tofile="checkstyle/error.xml"/>
     <fileset dir="${src}" includes="**/*.java"/>
  </checkstyle>
  
  <xslt taskname="checkstyle"
      in="checkstyle/error.xml"
      out="checkstyle/report.html"
      style="checkstyle/frames.xsl" />
  
  
 </target> 

发表于 @ 2006年11月15日 15:04:00 | 评论( loading... ) | 编辑| 举报| 收藏

旧一篇:一段ANT JAVADOC代码 | 新一篇:Lucene快速度的高亮

  • 发表评论
  • 评论内容:
  •  
Copyright © jdskyy
Powered by CSDN Blog