Removed unnecessary '.html' suffix to HTML renderer when the linkPrefix attribute is used.
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@3624 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
pmd
@ -1,4 +1,4 @@
|
||||
<project name="pmd" default="compile" basedir="../">
|
||||
<project name="pmd" default="pmd" basedir="../">
|
||||
|
||||
<property name="dir.lib" value="lib\"/>
|
||||
<property name="dir.src" value="src\"/>
|
||||
@ -72,10 +72,10 @@
|
||||
<target name="pmd" description="Runs PMD">
|
||||
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask"/>
|
||||
<pmd rulesetfiles="unusedcode" shortFilenames="true">
|
||||
<formatter type="text" toFile="rpt.txt"/>
|
||||
<fileset dir="/usr/local/java/src/java/lang/ref/">
|
||||
<include name="**/*.java"/>
|
||||
</fileset>
|
||||
<formatter type="html" toFile="rpt.html" linkPrefix="http://pmd.sf.net/xref/"/>
|
||||
<fileset dir="/home/tom/pmd/pmd/src/">
|
||||
<include name="**/renderers/*.java"/>
|
||||
</fileset>
|
||||
</pmd>
|
||||
</target>
|
||||
|
||||
|
@ -5,6 +5,7 @@ Fixed bug 1227001 - AvoidCallingFinalize no longer flags calls to finalize() wit
|
||||
Fixed a bug in RuleSetFactory that missed some override cases; thx to Wouter Zelle for the report and a fix.
|
||||
Improved UseCorrectExceptionLogging; thx to Wouter Zelle for the new XPath.
|
||||
The Ant task now accepts the short names of rulesets (e.g., unusedcode for rulesets/unusedcode.xml).
|
||||
Removed unnecessary '.html' suffix to HTML renderer when the linkPrefix attribute is used.
|
||||
Moved AvoidCallingFinalize from the design ruleset to the finalize ruleset.
|
||||
Deleted redundant ExplicitCallToFinalize rule.
|
||||
|
||||
|
@ -68,7 +68,7 @@ public class HTMLRenderer implements Renderer {
|
||||
if (linkPrefix == null) {
|
||||
return filename;
|
||||
}
|
||||
String newFileName = filename.substring(0, filename.indexOf(".java")) + ".html";
|
||||
return "<a href=\"" + linkPrefix + newFileName + "#" + line + "\">" + newFileName + "</a>";
|
||||
String newFileName = filename.substring(0, filename.indexOf(".java"));
|
||||
return "<a href=\"" + linkPrefix + newFileName + ".html#" + line + "\">" + newFileName + "</a>";
|
||||
}
|
||||
}
|
||||
|
@ -87,7 +87,7 @@
|
||||
|
||||
<target name="pmd">
|
||||
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask"/>
|
||||
<pmd rulesetfiles="rulesets/imports.xml">
|
||||
<pmd rulesetfiles="imports">
|
||||
<formatter type="html" toFile="pmd_report.html"/>
|
||||
<fileset dir="C:\j2sdk1.4.1_01\src\java\lang\">
|
||||
<include name="**/*.java"/>
|
||||
@ -104,7 +104,7 @@
|
||||
|
||||
<target name="pmd">
|
||||
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask"/>
|
||||
<pmd rulesetfiles="rulesets/imports.xml,rulesets/unusedcode.xml">
|
||||
<pmd rulesetfiles="imports.xml,unusedcode">
|
||||
<formatter type="xml" toFile="c:\pmd_report.xml"/>
|
||||
<fileset dir="C:\j2sdk1.4.1_01\src\java\lang\">
|
||||
<include name="**/*.java"/>
|
||||
@ -194,7 +194,7 @@ Total time: 2 seconds
|
||||
<![CDATA[
|
||||
<target name="pmd">
|
||||
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask"/>
|
||||
<pmd rulesetfiles="rulesets/imports.xml" shortFilenames="true">
|
||||
<pmd rulesetfiles="basic" shortFilenames="true">
|
||||
<formatter type="html" toFile="pmd_report.html" linkPrefix="http://pmd.sourceforge.net/xref/"/>
|
||||
<fileset dir="/usr/local/j2sdk1.4.1_01/src/">
|
||||
<include name="java/lang/*.java"/>
|
||||
@ -204,7 +204,6 @@ Total time: 2 seconds
|
||||
]]>
|
||||
</source>
|
||||
|
||||
|
||||
<p>Using the ruleset nested element</p>
|
||||
<source>
|
||||
<![CDATA[
|
||||
@ -212,8 +211,7 @@ Total time: 2 seconds
|
||||
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask"/>
|
||||
<pmd shortFilenames="true">
|
||||
<ruleset>rulesets/favorites.xml</ruleset>
|
||||
<ruleset>rulesets/basic.xml</ruleset>
|
||||
|
||||
<ruleset>basic</ruleset>
|
||||
<formatter type="html" toFile="pmd_report.html" linkPrefix="http://pmd.sourceforge.net/xref/"/>
|
||||
<fileset dir="/usr/local/j2sdk1.4.1_01/src/">
|
||||
<include name="java/lang/*.java"/>
|
||||
|
Reference in New Issue
Block a user