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:
@ -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.lib" value="lib\"/>
|
||||||
<property name="dir.src" value="src\"/>
|
<property name="dir.src" value="src\"/>
|
||||||
@ -72,10 +72,10 @@
|
|||||||
<target name="pmd" description="Runs PMD">
|
<target name="pmd" description="Runs PMD">
|
||||||
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask"/>
|
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask"/>
|
||||||
<pmd rulesetfiles="unusedcode" shortFilenames="true">
|
<pmd rulesetfiles="unusedcode" shortFilenames="true">
|
||||||
<formatter type="text" toFile="rpt.txt"/>
|
<formatter type="html" toFile="rpt.html" linkPrefix="http://pmd.sf.net/xref/"/>
|
||||||
<fileset dir="/usr/local/java/src/java/lang/ref/">
|
<fileset dir="/home/tom/pmd/pmd/src/">
|
||||||
<include name="**/*.java"/>
|
<include name="**/renderers/*.java"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
</pmd>
|
</pmd>
|
||||||
</target>
|
</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.
|
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.
|
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).
|
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.
|
Moved AvoidCallingFinalize from the design ruleset to the finalize ruleset.
|
||||||
Deleted redundant ExplicitCallToFinalize rule.
|
Deleted redundant ExplicitCallToFinalize rule.
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ public class HTMLRenderer implements Renderer {
|
|||||||
if (linkPrefix == null) {
|
if (linkPrefix == null) {
|
||||||
return filename;
|
return filename;
|
||||||
}
|
}
|
||||||
String newFileName = filename.substring(0, filename.indexOf(".java")) + ".html";
|
String newFileName = filename.substring(0, filename.indexOf(".java"));
|
||||||
return "<a href=\"" + linkPrefix + newFileName + "#" + line + "\">" + newFileName + "</a>";
|
return "<a href=\"" + linkPrefix + newFileName + ".html#" + line + "\">" + newFileName + "</a>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,7 @@
|
|||||||
|
|
||||||
<target name="pmd">
|
<target name="pmd">
|
||||||
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask"/>
|
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask"/>
|
||||||
<pmd rulesetfiles="rulesets/imports.xml">
|
<pmd rulesetfiles="imports">
|
||||||
<formatter type="html" toFile="pmd_report.html"/>
|
<formatter type="html" toFile="pmd_report.html"/>
|
||||||
<fileset dir="C:\j2sdk1.4.1_01\src\java\lang\">
|
<fileset dir="C:\j2sdk1.4.1_01\src\java\lang\">
|
||||||
<include name="**/*.java"/>
|
<include name="**/*.java"/>
|
||||||
@ -104,7 +104,7 @@
|
|||||||
|
|
||||||
<target name="pmd">
|
<target name="pmd">
|
||||||
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask"/>
|
<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"/>
|
<formatter type="xml" toFile="c:\pmd_report.xml"/>
|
||||||
<fileset dir="C:\j2sdk1.4.1_01\src\java\lang\">
|
<fileset dir="C:\j2sdk1.4.1_01\src\java\lang\">
|
||||||
<include name="**/*.java"/>
|
<include name="**/*.java"/>
|
||||||
@ -194,7 +194,7 @@ Total time: 2 seconds
|
|||||||
<![CDATA[
|
<![CDATA[
|
||||||
<target name="pmd">
|
<target name="pmd">
|
||||||
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask"/>
|
<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/"/>
|
<formatter type="html" toFile="pmd_report.html" linkPrefix="http://pmd.sourceforge.net/xref/"/>
|
||||||
<fileset dir="/usr/local/j2sdk1.4.1_01/src/">
|
<fileset dir="/usr/local/j2sdk1.4.1_01/src/">
|
||||||
<include name="java/lang/*.java"/>
|
<include name="java/lang/*.java"/>
|
||||||
@ -204,7 +204,6 @@ Total time: 2 seconds
|
|||||||
]]>
|
]]>
|
||||||
</source>
|
</source>
|
||||||
|
|
||||||
|
|
||||||
<p>Using the ruleset nested element</p>
|
<p>Using the ruleset nested element</p>
|
||||||
<source>
|
<source>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
@ -212,8 +211,7 @@ Total time: 2 seconds
|
|||||||
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask"/>
|
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask"/>
|
||||||
<pmd shortFilenames="true">
|
<pmd shortFilenames="true">
|
||||||
<ruleset>rulesets/favorites.xml</ruleset>
|
<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/"/>
|
<formatter type="html" toFile="pmd_report.html" linkPrefix="http://pmd.sourceforge.net/xref/"/>
|
||||||
<fileset dir="/usr/local/j2sdk1.4.1_01/src/">
|
<fileset dir="/usr/local/j2sdk1.4.1_01/src/">
|
||||||
<include name="java/lang/*.java"/>
|
<include name="java/lang/*.java"/>
|
||||||
|
Reference in New Issue
Block a user