Added new CLI options

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@2118 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Tom Copeland
2003-07-28 19:26:27 +00:00
parent 3c804f75bd
commit 9de78f8eae
3 changed files with 13 additions and 8 deletions

View File

@ -34,11 +34,11 @@
<p>Download the latest binary distribution - i.e., pmd-bin-x.xx.zip</p>
<p>Unzip it into any directory:
<source>
[tom@hal tmp]$ unzip -q pmd-bin-1.1.zip
[tom@hal tmp]$ unzip -q pmd-bin-1.2.zip
[tom@hal tmp]$ ls -l
total 4640
drwxrwxr-x 5 tom tom 4096 Apr 17 16:38 pmd-1.1
-rw-rw-r-- 1 tom tom 4733312 Jun 9 15:44 pmd-bin-1.1.zip
drwxrwxr-x 5 tom tom 4096 Apr 17 16:38 pmd-1.2
-rw-rw-r-- 1 tom tom 4733312 Jun 9 15:44 pmd-bin-1.2.zip
[tom@hal tmp]$
</source>
</p>

View File

@ -156,7 +156,7 @@ works OK. Here's how to set it up:</p>
<li>Description: PMD doth help one clean the code</li>
<li>Program: javaw</li>
<li>For the next two parameters you'll need to plug in the location of your PMD installation, the rulesets you want to use, and your working directory</li>
<li>Parameters: -cp %CLASSPATH%;c:\pmd\lib\pmd-1.1.jar;c:\pmd\lib\jaxen-core-1.0-fcs.jar;c:\pmd\lib\saxpath-1.0-fcs.jar net.sourceforge.pmd.PMD $FilePath$ ideaj rulesets/unusedcode.xml,rulesets/imports.xml $Sourcepath$ $FileClass$.method $FileName$ </li>
<li>Parameters: -cp %CLASSPATH%;c:\pmd\lib\pmd-1.2.jar;c:\pmd\lib\jaxen-core-1.0-fcs.jar;c:\pmd\lib\saxpath-1.0-fcs.jar net.sourceforge.pmd.PMD $FilePath$ ideaj rulesets/unusedcode.xml,rulesets/imports.xml $Sourcepath$ $FileClass$.method $FileName$ </li>
<li>Working directory: c:\</li>
</ul>
</ul>

View File

@ -12,7 +12,7 @@
<li>Type run [filename] [report format] [ruleset file], i.e:</li>
<br></br>
<source>
C:\tmp\pmd-1.1\pmd\etc&gt;run c:\data\pmd\pmd\test-data\Unused1.java xml rulesets/unusedcode.xml
C:\tmp\pmd-1.2\pmd\etc&gt;run c:\data\pmd\pmd\test-data\Unused1.java xml rulesets/unusedcode.xml
&lt;?xml version="1.0"?&gt;&lt;pmd&gt;
&lt;file name="c:\data\pmd\pmd\test-data\Unused1.java"&gt;
&lt;violation line="5" rule="UnusedLocalVariable"&gt;
@ -20,11 +20,11 @@ Avoid unused local variables such as 'fr'
&lt;/violation&gt;
&lt;/file&gt;&lt;/pmd&gt;
C:\tmp\pmd-1.1\pmd\etc&gt;
C:\tmp\pmd-1.2\pmd\etc&gt;
</source>
<li>If you are using JDK 1.3 or you just want to run PMD without the batch file, you can do a:</li>
<source>
C:\data\pmd\pmd>java -cp lib\pmd-1.1.jar;lib\xercesImpl-2.0.2.jar;
C:\data\pmd\pmd>java -cp lib\pmd-1.2.jar;lib\xercesImpl-2.0.2.jar;
lib\xmlParserAPIs-2.0.2.jar;lib\jaxen-core-1.0-fcs.jar;lib\saxpath-1.0-fcs.jar
net.sourceforge.pmd.PMD
c:\j2sdk1.4.1_01\src\java\lang xml
@ -32,7 +32,12 @@ C:\data\pmd\pmd>java -cp lib\pmd-1.1.jar;lib\xercesImpl-2.0.2.jar;
</source>
<br></br>
<li>Notice that in this case the output is in XML, so you can redirect it to a file and XSLT it or whatever</li>
</ul>
<li>The command line interface also accepts the following optional arguments:</li>
<ul>
<li><code>-debug</code> - prints a stacktrace if an error is encountered</li>
<li><code>-shortnames</code> - puts shortened names in the report. This only works if the filename argument is a single directory</li>
</ul>
</ul>
</section>
</body>
</document>