ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: Checkstyle task ?
Date Fri, 30 Aug 2002 14:27:26 GMT
Here's mine, which doesn't require you to have the chechstyle jar in the
$ANT_HOME/lib. One you run it though, you might be worried by the number of
warnings you'll get ;-) --DD


  <!-- ====================================================
       Builds a web page of all the coding errors.
    -->
  <target name="checkstyle">

    <property name="checkstyle.base"
              value="${basedir}/build/tools/checkstyle/checkstyle" />

    <taskdef resource="checkstyletask.properties"
             classpath="${checkstyle.base}-all-2.3.jar" />

    <delete file="${checkstyle.base}-results.xml" quiet="true" />
    <delete file="${checkstyle.base}-results.html" quiet="true" />

    <checkstyle basedir="${basedir}/src"
                properties="${checkstyle.base}.properties"
                cacheFile="${checkstyle.base}-results.db"
                failOnViolation="false">
      <fileset dir="src">
        <include name="**/*.java" />
        <exclude name="**/test/*Test.java" />
      </fileset>

      <!-- Choice of 'plain' text or 'xml' formatter -->
      <formatter type="xml"
                 tofile="${checkstyle.base}-results.xml" />
    </checkstyle>

    <style in="${checkstyle.base}-results.xml"
           out="${checkstyle.base}-results.html"
           style="${checkstyle.base}-noframes.xsl" />

  </target><!-- checkstyle -->

-----Original Message-----
From: Struts [mailto:scjp_ocp@hotmail.com] 
Sent: Friday, August 30, 2002 9:21 AM
To: Ant Users List
Subject: Re: Checkstyle task ?

Can you post the checkstyle to me?

Thanks 

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message