forked from phoedos/pmd
updated in preparation for release
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@196 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
<property name="lib" value="lib\"/>
|
||||
<property name="src" value="src\"/>
|
||||
<property name="build" value="build\"/>
|
||||
<property name="rulesets" value="rulesets\"/>
|
||||
<property name="test-data" value="test-data\"/>
|
||||
<property name="regress" value="regress\"/>
|
||||
<property name="reports" value="reports\"/>
|
||||
@ -24,12 +25,17 @@
|
||||
|
||||
<target name="jar">
|
||||
<mkdir dir="${lib}"/>
|
||||
<jar jarfile="${lib}\pmd.jar" basedir="${build}"/>
|
||||
<copy todir="${build}rulesets">
|
||||
<fileset dir="${rulesets}">
|
||||
<include name="*.xml"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
<jar jarfile="${lib}\pmd-0.3.jar" basedir="${build}" excludes="test/**/*.class"/>
|
||||
</target>
|
||||
|
||||
<target name="pmd">
|
||||
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask"/>
|
||||
<pmd reportFile="c:\pmd.html" verbose="true" rulesetfiles="rulesets/ticbuild.xml,rulesets/unusedcode.xml,rulesets/design.xml,rulesets/cougaar.xml" format="html">
|
||||
<pmd reportFile="c:\pmd.html" rulesetfiles="rulesets/ticbuild.xml,rulesets/unusedcode.xml,rulesets/design.xml,rulesets/cougaar.xml" format="html">
|
||||
<fileset dir="c:\data\pmd\pmd\src">
|
||||
<!--<fileset dir="c:\j2sdk1.4.0\src">-->
|
||||
<include name="**/*.java"/>
|
||||
|
@ -1,8 +1,10 @@
|
||||
July 03 2002 - 0.3:
|
||||
Added new rules: UseSingletonRule, ShortVariableRule, LongVariableRule, ShortMethodNameRule
|
||||
Removed the 'text' report format.
|
||||
Moved rules into RuleSets which are defined in XML files in the ruleset directory.
|
||||
Added a 'failonerror' attribute to the Ant task.
|
||||
Moved rules into RuleSets which are defined in XML files in the ruleset directory
|
||||
Ant task:
|
||||
-Added a 'failonerror' attribute
|
||||
-Changed 'rulesettype' to 'rulesetfiles'
|
||||
-Removed 'text' report format; only 'html' and 'xml' are available now
|
||||
|
||||
June 27 2002 - 0.2:
|
||||
Added new rules: IfElseStmtsMustUseBracesRule, EmptyWhileStmtRule
|
||||
|
@ -1,8 +1,5 @@
|
||||
update the xdocs:
|
||||
-added new ruleset to Ant task - design
|
||||
-modified Ant task - removed 'text' format report
|
||||
-modified Ant task - changed 'rulesettype' to 'rulesetfiles'
|
||||
-modified Ant task - added 'failonerror' attribute
|
||||
-modified Ant task (see changelog for details)
|
||||
-run.bat/sh third param is a rule set file
|
||||
update run.bat to point to pmd-0.3.jar
|
||||
update the changelog
|
||||
@ -11,9 +8,8 @@ ant dist
|
||||
ant test
|
||||
Do all the tests run? OK, then:
|
||||
ant dist
|
||||
rename jar to pmd-0.3.jar
|
||||
cvs add -kb pmd-0.3.jar
|
||||
cvs rm pmd-0.1.jar
|
||||
cvs rm pmd-0.2.jar
|
||||
cvs ci -m "adding new jar, removing old one"
|
||||
cd c:\data\pmd
|
||||
cvs rtag -D tomorrow "pmd_release_0_3" pmd
|
||||
|
@ -1,5 +1,5 @@
|
||||
@echo off
|
||||
set CLASSPATH=../lib/pmd-0.2.jar
|
||||
set CLASSPATH=../lib/pmd-0.3.jar
|
||||
set FILE=%1%
|
||||
set FORMAT=%2%
|
||||
set RULESETFILE=%3%
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
<document>
|
||||
<properties>
|
||||
<author email="dpeugh@users.sourceforge.net">David Dixon-Peugh</author>
|
||||
<author email="tom@infoether.com">Tom Copeland</author>
|
||||
<title>Ant Task</title>
|
||||
</properties>
|
||||
@ -15,7 +16,6 @@
|
||||
<table border="1" cellpadding="2" cellspacing="0">
|
||||
<tr>
|
||||
<td valign="top"><b>Attribute</b></td>
|
||||
|
||||
<td valign="top"><b>Description</b></td>
|
||||
<td align="center" valign="top"><b>Required</b></td>
|
||||
</tr>
|
||||
@ -27,19 +27,25 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">verbose</td>
|
||||
<td valign="top">Verbose output - just the name of each file processed.</td>
|
||||
<td valign="top" align="center">Yes</td>
|
||||
<td valign="top">Verbose output - names of files processed, rule counts, etc.</td>
|
||||
<td valign="top" align="center">No</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">rulesettype</td>
|
||||
<td valign="top">The set of rules to use (all, general, cougaar)</td>
|
||||
<td valign="top">rulesetfiles</td>
|
||||
<td valign="top">A comma delimited list of ruleset files ('rulesets/basic.xml,rulesets/design.xml'). If you write
|
||||
your own ruleset files, they must be on the classpath.</td>
|
||||
<td valign="top" align="center">Yes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">format</td>
|
||||
<td valign="top">The report format (xml, text, html)</td>
|
||||
<td valign="top">The report format (xml, html)</td>
|
||||
<td valign="top" align="center">Yes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">failonerror</td>
|
||||
<td valign="top">Whether on not to fail the build if PMD finds any problems</td>
|
||||
<td valign="top" align="center">No</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</subsection>
|
||||
@ -48,7 +54,16 @@
|
||||
<![CDATA[
|
||||
<target name="pmd">
|
||||
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" />
|
||||
<pmd reportFile="C:\foo.xml" verbose="false" rulesettype="general" format="xml">
|
||||
<pmd reportFile="C:\foo.xml" rulesetfiles="rulesets/unusedcode.xml" format="xml">
|
||||
<fileset dir="C:\j2sdk1.4.0\src\">
|
||||
<include name="**/*.java"/>
|
||||
</fileset>
|
||||
</pmd>
|
||||
</target>
|
||||
|
||||
<target name="pmd">
|
||||
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" />
|
||||
<pmd reportFile="C:\foo.xml" verbose="false" rulesetfiles="rulesets/design.xml" format="xml" failonerror="no">
|
||||
<fileset dir="C:\j2sdk1.4.0\src\">
|
||||
<include name="**/*.java"/>
|
||||
</fileset>
|
||||
|
@ -9,9 +9,9 @@
|
||||
<body>
|
||||
<section name="Running PMD via command line">
|
||||
<ul>
|
||||
<li>Type run <filename> <report format>, <rule set>i.e.:</li>
|
||||
<li>Type run <filename> <report format>, <rule set file>i.e.:</li>
|
||||
<pre>
|
||||
C:\data\pmd\pmd\etc>run c:\data\pmd\pmd\test-data\Unused1.java xml general
|
||||
C:\data\pmd\pmd\etc>run c:\data\pmd\pmd\test-data\Unused1.java xml rulesets/unusedcode.xml
|
||||
<pmd>
|
||||
<file>
|
||||
<name>c:\data\pmd\pmd\test-data\Unused1.java</name><ruleviolation><line>5</line>
|
||||
@ -24,8 +24,8 @@
|
||||
</section>
|
||||
<section name="Running PMD via Ant">
|
||||
<ul>
|
||||
<li>Add a new Ant target to your build file - <a href="ant-task.html">here's an example</a>.</li>
|
||||
<li>Make sure the pmd-0.2.jar file is on your classpath.</li>
|
||||
<li>Add a new Ant target to your build file - <a href="ant-task.html">here's</a> some examples.</li>
|
||||
<li>Make sure the pmd-0.3.jar file is on your classpath.</li>
|
||||
<li>Run Ant like you normally do.</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
Reference in New Issue
Block a user