forked from phoedos/pmd
further report tweaking
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@54 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
@echo off
|
||||
set CLASSPATH=../build/
|
||||
java net.sourceforge.pmd.PMD %1% %2%
|
||||
set FILE=%1%
|
||||
set FORMAT=%2%
|
||||
java net.sourceforge.pmd.PMD %FILE% %FORMAT%
|
||||
|
@@ -42,8 +42,8 @@ public class PMD {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
if (args.length == 0) {
|
||||
throw new RuntimeException("Pass a filename in");
|
||||
if (args.length != 2) {
|
||||
throw new RuntimeException("Please pass in both a filename and a format");
|
||||
}
|
||||
File input = new File(args[0]);
|
||||
if (!input.exists()) {
|
||||
|
@@ -10,9 +10,9 @@
|
||||
<section name="Running PMD via command line">
|
||||
<ul>
|
||||
<li>Build PMD by going to the etc directory and typing 'ant clean'</li>
|
||||
<li>Type run 'filename', i.e.:</li>
|
||||
<li>Type run <filename> <report format>, i.e.:</li>
|
||||
<pre>
|
||||
C:\data\pmd\pmd\etc>run c:\data\pmd\pmd\test-data\Unused1.java
|
||||
C:\data\pmd\pmd\etc>run c:\data\pmd\pmd\test-data\Unused1.java xml
|
||||
<pmd>
|
||||
<file>
|
||||
<name>c:\data\pmd\pmd\test-data\Unused1.java</name><ruleviolation><line>5</line>
|
||||
|
Reference in New Issue
Block a user