Skip to content

Commit

Permalink
Updated PMD to version 5.0.1
Browse files Browse the repository at this point in the history
Change-Id: Ibb369c1eefdf6e65ad5d32cc99495f82ad9c0908
  • Loading branch information
egonw committed Dec 13, 2012
1 parent 0d658df commit 44572c6
Show file tree
Hide file tree
Showing 17 changed files with 62 additions and 55 deletions.
Binary file removed develjar/asm-3.1.jar
Binary file not shown.
Binary file added develjar/asm-3.2.jar
Binary file not shown.
Binary file removed develjar/pmd-4.2.5.jar
Binary file not shown.
Binary file added develjar/pmd-5.0.1.jar
Binary file not shown.
7 changes: 5 additions & 2 deletions pmd.xml
Expand Up @@ -9,9 +9,9 @@
<path id="pmd.classpath">
<pathelement location="${build}"/>
<fileset dir="${lib}">
<include name="asm-3.1.jar"/>
<include name="asm-3.2.jar"/>
<include name="junit-4.4.jar"/>
<include name="pmd-4.2.5.jar"/>
<include name="pmd-5.0.1.jar"/>
<include name="jaxen-1.1.1.jar"/>
</fileset>
</path>
Expand Down Expand Up @@ -124,6 +124,9 @@
<includesfile name="${build}/${module}.javafiles"/>
</fileset>
</pmd>
<xslt basedir="${reports.tests}/pmd" destdir="${reports.tests}/pmd"
includes="${module}.xml"
extension=".html" style="pmd/wz-pmd-report.xslt"/>
</target>

</project>
26 changes: 13 additions & 13 deletions pmd/cdkinterfaces.xml
Expand Up @@ -9,7 +9,7 @@
<rule name="MoleculeFieldType"
language="java"
message="Use the IMolecule interfaces instead of the Molecule implementation"
class="net.sourceforge.pmd.rules.XPathRule">
class="net.sourceforge.pmd.lang.rule.XPathRule">
<description>
Programming against the CDK interfaces allows users to pick their favorite
implementation (nonotify, datadebug).
Expand All @@ -36,7 +36,7 @@
<rule name="AtomFieldType"
language="java"
message="Use the IAtom interfaces instead of the Atom implementation"
class="net.sourceforge.pmd.rules.XPathRule">
class="net.sourceforge.pmd.lang.rule.XPathRule">
<description>
Programming against the CDK interfaces allows users to pick their favorite
implementation (nonotify, datadebug).
Expand All @@ -63,7 +63,7 @@
<rule name="BondFieldType"
language="java"
message="Use the IBond interfaces instead of the Bond implementation"
class="net.sourceforge.pmd.rules.XPathRule">
class="net.sourceforge.pmd.lang.rule.XPathRule">
<description>
Programming against the CDK interfaces allows users to pick their favorite
implementation (nonotify, datadebug).
Expand All @@ -90,7 +90,7 @@
<rule name="InstanceOfMolecule"
language="java"
message="Use instanceof against interfaces not implementations"
class="net.sourceforge.pmd.rules.XPathRule">
class="net.sourceforge.pmd.lang.rule.XPathRule">
<description>
Programming against the CDK interfaces allows users to pick their favorite
implementation (nonotify, datadebug).
Expand All @@ -117,7 +117,7 @@
<rule name="InstanceOfAtom"
language="java"
message="Use instanceof against interfaces not implementations"
class="net.sourceforge.pmd.rules.XPathRule">
class="net.sourceforge.pmd.lang.rule.XPathRule">
<description>
Programming against the CDK interfaces allows users to pick their favorite
implementation (nonotify, datadebug).
Expand All @@ -144,7 +144,7 @@
<rule name="InstanceOfPseudoAtom"
language="java"
message="Use instanceof against interfaces not implementations"
class="net.sourceforge.pmd.rules.XPathRule">
class="net.sourceforge.pmd.lang.rule.XPathRule">
<description>
Programming against the CDK interfaces allows users to pick their favorite
implementation (nonotify, datadebug).
Expand All @@ -171,7 +171,7 @@
<rule name="InstanceOfBond"
language="java"
message="Use instanceof against interfaces not implementations"
class="net.sourceforge.pmd.rules.XPathRule">
class="net.sourceforge.pmd.lang.rule.XPathRule">
<description>
Programming against the CDK interfaces allows users to pick their favorite
implementation (nonotify, datadebug).
Expand All @@ -198,7 +198,7 @@
<rule name="InstanceOfLonePair"
language="java"
message="Use instanceof against interfaces not implementations"
class="net.sourceforge.pmd.rules.XPathRule">
class="net.sourceforge.pmd.lang.rule.XPathRule">
<description>
Programming against the CDK interfaces allows users to pick their favorite
implementation (nonotify, datadebug).
Expand All @@ -225,7 +225,7 @@
<rule name="InstanceOfSingleElectron"
language="java"
message="Use instanceof against interfaces not implementations"
class="net.sourceforge.pmd.rules.XPathRule">
class="net.sourceforge.pmd.lang.rule.XPathRule">
<description>
Programming against the CDK interfaces allows users to pick their favorite
implementation (nonotify, datadebug).
Expand All @@ -252,7 +252,7 @@
<rule name="InstanceOfIsotope"
language="java"
message="Use instanceof against interfaces not implementations"
class="net.sourceforge.pmd.rules.XPathRule">
class="net.sourceforge.pmd.lang.rule.XPathRule">
<description>
Programming against the CDK interfaces allows users to pick their favorite
implementation (nonotify, datadebug).
Expand All @@ -279,7 +279,7 @@
<rule name="InstanceOfAtomType"
language="java"
message="Use instanceof against interfaces not implementations"
class="net.sourceforge.pmd.rules.XPathRule">
class="net.sourceforge.pmd.lang.rule.XPathRule">
<description>
Programming against the CDK interfaces allows users to pick their favorite
implementation (nonotify, datadebug).
Expand All @@ -306,7 +306,7 @@
<rule name="InstanceOfElement"
language="java"
message="Use instanceof against interfaces not implementations"
class="net.sourceforge.pmd.rules.XPathRule">
class="net.sourceforge.pmd.lang.rule.XPathRule">
<description>
Programming against the CDK interfaces allows users to pick their favorite
implementation (nonotify, datadebug).
Expand All @@ -333,7 +333,7 @@
<rule name="InstanceOfAtomContainer"
language="java"
message="Use instanceof against interfaces not implementations"
class="net.sourceforge.pmd.rules.XPathRule">
class="net.sourceforge.pmd.lang.rule.XPathRule">
<description>
Programming against the CDK interfaces allows users to pick their favorite
implementation (nonotify, datadebug).
Expand Down
14 changes: 7 additions & 7 deletions pmd/custom-data.xml
Expand Up @@ -11,14 +11,14 @@

<!-- The rule sets that come with PMD -->

<rule ref="rulesets/basic.xml"/>
<rule ref="rulesets/java/basic.xml"/>
<rule ref="pmd/customNaming.xml"/>
<rule ref="rulesets/unusedcode.xml"/>
<rule ref="rulesets/imports.xml"/>
<rule ref="rulesets/strings.xml"/>
<rule ref="rulesets/codesize.xml"/>
<rule ref="rulesets/strictexception.xml"/>
<rule ref="rulesets/clone.xml"/>
<rule ref="rulesets/java/unusedcode.xml"/>
<rule ref="rulesets/java/imports.xml"/>
<rule ref="rulesets/java/strings.xml"/>
<rule ref="rulesets/java/codesize.xml"/>
<rule ref="rulesets/java/strictexception.xml"/>
<rule ref="rulesets/java/clone.xml"/>

<!-- Rules specific for CDK -->

Expand Down
12 changes: 6 additions & 6 deletions pmd/custom-qm.xml
Expand Up @@ -11,16 +11,16 @@

<!-- The rule sets that come with PMD -->

<rule ref="rulesets/basic.xml"/>
<rule ref="rulesets/java/basic.xml"/>
<rule ref="pmd/customNaming.xml"/>
<rule ref="rulesets/unusedcode.xml"/>
<rule ref="rulesets/imports.xml"/>
<rule ref="rulesets/strings.xml"/>
<rule ref="rulesets/codesize.xml">
<rule ref="rulesets/java/unusedcode.xml"/>
<rule ref="rulesets/java/imports.xml"/>
<rule ref="rulesets/java/strings.xml"/>
<rule ref="rulesets/java/codesize.xml">
<exclude name="TooManyMethods"/>
<exclude name="ExcessivePublicCount"/>
</rule>
<rule ref="rulesets/strictexception.xml"/>
<rule ref="rulesets/java/strictexception.xml"/>
<rule ref="pmd/migrating-qm.xml"/>

<!-- Rules specific for CDK -->
Expand Down
8 changes: 4 additions & 4 deletions pmd/custom-test.xml
Expand Up @@ -11,10 +11,10 @@

<!-- The rule sets that come with PMD -->

<rule ref="rulesets/basic.xml"/>
<rule ref="rulesets/unusedcode.xml"/>
<rule ref="rulesets/imports.xml"/>
<rule ref="rulesets/migrating_to_junit4.xml"/>
<rule ref="rulesets/java/basic.xml"/>
<rule ref="rulesets/java/unusedcode.xml"/>
<rule ref="rulesets/java/imports.xml"/>
<rule ref="rulesets/java/migrating_to_junit4.xml"/>

<!-- Rules specific for CDK -->

Expand Down
12 changes: 6 additions & 6 deletions pmd/custom.xml
Expand Up @@ -11,16 +11,16 @@

<!-- The rule sets that come with PMD -->

<rule ref="rulesets/basic.xml"/>
<rule ref="rulesets/java/basic.xml"/>
<rule ref="pmd/customNaming.xml"/>
<rule ref="rulesets/unusedcode.xml"/>
<rule ref="rulesets/imports.xml"/>
<rule ref="rulesets/strings.xml"/>
<rule ref="rulesets/codesize.xml">
<rule ref="rulesets/java/unusedcode.xml"/>
<rule ref="rulesets/java/imports.xml"/>
<rule ref="rulesets/java/strings.xml"/>
<rule ref="rulesets/java/codesize.xml">
<exclude name="TooManyMethods"/>
<exclude name="ExcessivePublicCount"/>
</rule>
<rule ref="rulesets/strictexception.xml"/>
<rule ref="rulesets/java/strictexception.xml"/>
<rule ref="pmd/migrating.xml"/>

<!-- Rules specific for CDK -->
Expand Down
11 changes: 7 additions & 4 deletions pmd/customCDK.xml
Expand Up @@ -7,7 +7,8 @@

<rule name="CDK_MissingLoggerStatementInCatch"
message="Catched Exceptions must report to CDK's LoggingTool"
class="net.sourceforge.pmd.rules.XPathRule">
class="net.sourceforge.pmd.lang.rule.XPathRule"
language="java">
<description>
Detects missing LoggingTool.debug(Exception) calls in the catch blocks
of try statements. The LoggingTool instance is assumed to be named logger.
Expand All @@ -26,7 +27,8 @@

<rule name="TestClassAnnotationForMethod"
message="Methods should be annotated with TestMethod, not TestClass."
class="net.sourceforge.pmd.rules.XPathRule">
class="net.sourceforge.pmd.lang.rule.XPathRule"
language="java">
<description>
Detects methods annotated with @TestClass, where @TestMethod is supposed
to be used.
Expand All @@ -45,7 +47,8 @@

<rule name="TestMethodAnnotationForClass"
message="Classes should be annotated with TestClass, not TestMethod."
class="net.sourceforge.pmd.rules.XPathRule">
class="net.sourceforge.pmd.lang.rule.XPathRule"
language="java">
<description>
Detects classes annotated with @TestMethod, where @TestClass is supposed
to be used.
Expand All @@ -66,7 +69,7 @@
rule name="CDK_MoreThanOneLoggingToolInstantiated"
message="More than one LoggingTool is instantiated"
class="net.sourceforge.pmd.rules.XPathRule">
class="net.sourceforge.pmd.lang.rule.XPathRule">
<description>
Detects instantiation of more than one LoggingTool.
</description>
Expand Down
2 changes: 1 addition & 1 deletion pmd/customJunit.xml
Expand Up @@ -5,7 +5,7 @@
This ruleset checks the CDK sources for bad code.
</description>

<rule ref="rulesets/junit.xml">
<rule ref="rulesets/java/junit.xml">
<exclude name="JUnitAssertionsShouldIncludeMessage"/>
</rule>

Expand Down
5 changes: 3 additions & 2 deletions pmd/customNaming.xml
Expand Up @@ -5,14 +5,15 @@
This ruleset checks the CDK sources for bad code.
</description>

<rule ref="rulesets/naming.xml">
<rule ref="rulesets/java/naming.xml">
<exclude name="LongVariable"/>
<exclude name="BooleanGetMethodName"/>
</rule>

<rule name="CDK_LongVariable"
message="Avoid excessively long variable names like {0}"
class="net.sourceforge.pmd.rules.XPathRule">
class="net.sourceforge.pmd.lang.rule.XPathRule"
language="java">
<description>
Detects when a field, formal or local variable is declared with a long name.
This rule customized the default LongVariable rule by allowing names of a
Expand Down
2 changes: 1 addition & 1 deletion pmd/customOptimization.xml
Expand Up @@ -5,7 +5,7 @@
This ruleset checks the CDK sources for bad code.
</description>

<rule ref="rulesets/junit.xml">
<rule ref="rulesets/java/junit.xml">
<exclude name="MethodArgumentCouldBeFinal"/>
</rule>

Expand Down
8 changes: 4 additions & 4 deletions pmd/migrating-qm.xml
Expand Up @@ -7,11 +7,11 @@

<!-- The rule sets that come with PMD -->

<rule ref="rulesets/migrating_to_13.xml">
<rule ref="rulesets/java/migrating_to_13.xml">
<exclude name="ReplaceVectorWithList"/>
</rule>
<rule ref="rulesets/migrating_to_14.xml"/>
<rule ref="rulesets/migrating_to_15.xml"/>
<rule ref="rulesets/migrating_to_junit4.xml"/>
<rule ref="rulesets/java/migrating_to_14.xml"/>
<rule ref="rulesets/java/migrating_to_15.xml"/>
<rule ref="rulesets/java/migrating_to_junit4.xml"/>

</ruleset>
8 changes: 4 additions & 4 deletions pmd/migrating.xml
Expand Up @@ -7,9 +7,9 @@

<!-- The rule sets that come with PMD -->

<rule ref="rulesets/migrating_to_13.xml"/>
<rule ref="rulesets/migrating_to_14.xml"/>
<rule ref="rulesets/migrating_to_15.xml"/>
<rule ref="rulesets/migrating_to_junit4.xml"/>
<rule ref="rulesets/java/migrating_to_13.xml"/>
<rule ref="rulesets/java/migrating_to_14.xml"/>
<rule ref="rulesets/java/migrating_to_15.xml"/>
<rule ref="rulesets/java/migrating_to_junit4.xml"/>

</ruleset>
2 changes: 1 addition & 1 deletion pmd/unused.xml
Expand Up @@ -11,6 +11,6 @@

<!-- The rule sets that come with PMD -->

<rule ref="rulesets/unusedcode.xml"/>
<rule ref="rulesets/java/unusedcode.xml"/>

</ruleset>

0 comments on commit 44572c6

Please sign in to comment.