ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Catalin Rotaru" <cat...@zappmobile.ro>
Subject Line Counter task
Date Sat, 31 Aug 2002 11:41:27 GMT
    Hi,

    I wrote a simple Ant task that generates statistics (number of files and
number of lines) on the source files of the project. If there's any interest
in this, I'd be glad to submit the code.

    Best regards,
    Cata

    Sample output:

[lc] Files of type "java": 2 => 337 lines.
[lc] Files of type "properties": 1 => 10 lines.
[lc] --------------------------------------------
[lc] TOTAL files: 3 => 347 lines.

    Sample usage:

<!-- ==================== Declare Target
================================== -->

  <target name="declare" depends="compile"
   description="Declare the additional Ant task(s).">
    <taskdef name="lc"
     classname="com.rotaru.anttask.LineCounter"
     classpath="build"/>
  </target>

<!-- ==================== LC Target ================================== -->

  <target name="lc" depends="declare"
   description="Count the number of lines in the current project.">
    <lc>
      <fileset dir="src">
        <exclude name="**/.*.swp"/>
      </fileset>
    </lc>
  </target>



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


Mime
View raw message