Removed JDBCReportListener stuff; all that info is still in CVS of course - rev 1.13

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@1343 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Tom Copeland
2003-01-16 19:14:26 +00:00
parent 86a2499242
commit 8fc93f5e89

View File

@ -10,7 +10,7 @@
<body>
<section name="PMD">
<subsection name="Description">
<p>Runs a set of static code analysis rules on Java source code files and generates a list of problems found.</p>
<p>Runs a set of static code analysis rules on some Java source code files and generates a list of problems found.</p>
</subsection>
<subsection name="Parameters">
<table border="1" cellpadding="2" cellspacing="0">
@ -20,17 +20,27 @@
<td align="center" valign="top"><b>Required</b></td>
</tr>
<tr>
<td valign="top">formatter</td>
<td valign="top">Specifies formats and files to which the report is written. Can be of type 'xml' or 'html'. See example below.</td>
<td valign="top">reportfile</td>
<td valign="top">The file to which the report is written.</td>
<td valign="top" align="center">Yes</td>
</tr>
<tr>
<td valign="top">verbose</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">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, you can put them on the classpath and plug them in here.</td>
<td valign="top" align="center">Yes</td>
</tr>
<tr>
<td valign="top">format</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 or not to fail the build if PMD finds any problems</td>
@ -41,68 +51,15 @@
<td valign="top">Whether or not to print any problems found to the Ant log/console</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">shortFilenames</td>
<td valign="top">Places truncated filenames in the report. This can reduce your report file size by 15%-20%.</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">verbose</td>
<td valign="top">Verbose output - names of files processed, rule counts, etc.</td>
<td valign="top" align="center">No</td>
</tr>
</table>
</subsection>
<subsection name="Database">
<p>
PMD can record its information into a JDBC datasource using a <![CDATA[<database />]]> tag. This
tag has several attributes:
<table>
<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>
<tr>
<td>driver</td>
<td>Class name of the JDBC driver to use to connect to the database.</td>
<td><i>Optional.</i> If your default system is set up to install the JDBC driver,
or if something else will install it, don't do it. Otherwise, provide the
value.</td>
</tr>
<tr>
<td>url</td>
<td>JDBC URL to connect to the database with.</td>
<td>Required</td>
</tr>
<tr>
<td>user</td>
<td>User to connect to the database as.</td>
<td>Required</td>
</tr>
<tr>
<td>password</td>
<td>Password to use for logging into the database.</td>
<td>Required</td>
</tr>
<tr>
<td>projectid</td>
<td>This is an integer which will get put into the PMD_RUNS table. Ideally this should
be used to connect this run to other data in the system.</td>
<td><i>Optional.</i> If this value is ommitted, the default value will be 0.</td>
</tr>
</table>
</p>
</subsection>
<subsection name="Examples">
<source>
<![CDATA[
<target name="pmd">
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" />
<pmd rulesetfiles="rulesets/unusedcode.xml">
<formatter type="html" toFile="c:\jdk-report.html"/>
<pmd reportFile="C:\foo.xml" rulesetfiles="rulesets/unusedcode.xml" format="xml">
<fileset dir="C:\j2sdk1.4.0\src\">
<include name="**/*.java"/>
</fileset>
@ -111,20 +68,7 @@ tag has several attributes:
<target name="pmd">
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" />
<pmd verbose="true" rulesetfiles="rulesets/basic.xml,rulesets/design.xml" failonerror="no">
<formatter type="xml" toFile="c:\jdk-report.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 verbose="true" rulesetfiles="rulesets/basic.xml,rulesets/design.xml" failonerror="no">
<database driver="com.mysql.jdbc.Driver" url="jdbc:mysql:///pmd" user="david"
password="" projectid="10" />
<formatter type="xml" toFile="c:\jdk-report.xml"/>
<pmd reportFile="C:\foo.xml" verbose="false" rulesetfiles="rulesets/basic.xml,rulesets/design.xml" format="xml" failonerror="no">
<fileset dir="C:\j2sdk1.4.0\src\">
<include name="**/*.java"/>
</fileset>