Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added PMD rules to check for code cleanups for Java 1.5 (and 1.3 and …
…1.4 too, actually). git-svn-id: https://cdk.svn.sourceforge.net/svnroot/cdk/trunk/cdk@9774 eb4e18e3-b210-0410-a6ab-dec725e4b171
- Loading branch information
egonw
committed
Jan 1, 2008
1 parent
e012435
commit 7869d4d
Showing
3 changed files
with
111 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
<?xml version="1.0"?> | ||
<project name="CDK" default="pmd" basedir="."> | ||
|
||
<property name="lib" value="develjar" /> | ||
<property name="build" value="build" /> | ||
<property name="src" value="src" /> | ||
<property name="reports.tests" value="reports" /> | ||
|
||
<path id="pmd.classpath"> | ||
<pathelement location="${build}"/> | ||
<fileset dir="${lib}"> | ||
<include name="asm-3.1.jar"/> | ||
<include name="junit-4.4.jar"/> | ||
<include name="pmd-4.1.jar"/> | ||
<include name="jaxen-1.1.1.jar"/> | ||
</fileset> | ||
</path> | ||
|
||
<target name="compileRenderer" id="compileRenderer"> | ||
<javac srcdir="pmd" destdir="${build}" | ||
includes="net/sourceforge/pmd/renderers/SummaryVBHTMLRenderer.java"> | ||
<classpath refid="pmd.classpath" /> | ||
</javac> | ||
</target> | ||
|
||
<taskdef name="pmd" id="pmd" classname="net.sourceforge.pmd.ant.PMDTask" classpathref="pmd.classpath"/> | ||
|
||
<target name="pmd" id="pmd"> | ||
<!-- the data classes modules --> | ||
<antcall target="test-module"><param name="module" value="data"/></antcall> | ||
<antcall target="test-module"><param name="module" value="datadebug"/></antcall> | ||
<antcall target="test-module"><param name="module" value="nonotify"/></antcall> | ||
<!-- the other modules --> | ||
<antcall target="test-module"><param name="module" value="interfaces"/></antcall> | ||
<antcall target="test-module"><param name="module" value="core"/></antcall> | ||
<antcall target="test-module"><param name="module" value="standard"/></antcall> | ||
<antcall target="test-module"><param name="module" value="atomtype"/></antcall> | ||
<antcall target="test-module"><param name="module" value="io"/></antcall> | ||
<antcall target="test-module"><param name="module" value="extra"/></antcall> | ||
<antcall target="test-module"><param name="module" value="render"/></antcall> | ||
<antcall target="test-module"><param name="module" value="reaction"/></antcall> | ||
<antcall target="test-module"><param name="module" value="libio-cml"/></antcall> | ||
<antcall target="test-module"><param name="module" value="libio-biojava"/></antcall> | ||
<antcall target="test-module"><param name="module" value="builder3d"/></antcall> | ||
<antcall target="test-module"><param name="module" value="smiles"/></antcall> | ||
<antcall target="test-module"><param name="module" value="smarts"/></antcall> | ||
<antcall target="test-module"><param name="module" value="pcore"/></antcall> | ||
<antcall target="test-module"><param name="module" value="forcefield"/></antcall> | ||
<antcall target="test-module"><param name="module" value="qsar"/></antcall> | ||
<antcall target="test-module"><param name="module" value="qsaratomic"/></antcall> | ||
<antcall target="test-module"><param name="module" value="qsarbond"/></antcall> | ||
<antcall target="test-module"><param name="module" value="qsarmolecular"/></antcall> | ||
<antcall target="test-module"><param name="module" value="qsarprotein"/></antcall> | ||
<antcall target="test-module"><param name="module" value="experimental"/></antcall> | ||
<antcall target="test-module"><param name="module" value="svg"/></antcall> | ||
<antcall target="test-module"><param name="module" value="structgen"/></antcall> | ||
<antcall target="test-module"><param name="module" value="valencycheck"/></antcall> | ||
<antcall target="test-module"><param name="module" value="charges"/></antcall> | ||
<!-- the test modules --> | ||
<antcall target="test-module"><param name="module" value="test-core"/></antcall> | ||
<antcall target="test-module"><param name="module" value="test-data"/></antcall> | ||
<antcall target="test-module"><param name="module" value="test-datadebug"/></antcall> | ||
<antcall target="test-module"><param name="module" value="test-nonotify"/></antcall> | ||
<antcall target="test-module"><param name="module" value="test-atomtype"/></antcall> | ||
<antcall target="test-module"><param name="module" value="test-extra"/></antcall> | ||
<antcall target="test-module"><param name="module" value="test-experimental"/></antcall> | ||
<antcall target="test-module"><param name="module" value="test-forcefield"/></antcall> | ||
<antcall target="test-module"><param name="module" value="test-io"/></antcall> | ||
<antcall target="test-module"><param name="module" value="test-reaction"/></antcall> | ||
<antcall target="test-module"><param name="module" value="test-smiles"/></antcall> | ||
<antcall target="test-module"><param name="module" value="test-standard"/></antcall> | ||
<antcall target="test-module"><param name="module" value="test-valencycheck"/></antcall> | ||
<antcall target="test-module"><param name="module" value="test-charges"/></antcall> | ||
<antcall target="test-module"><param name="module" value="test-pcore"/></antcall> | ||
<antcall target="test-module"><param name="module" value="test-qsar"/></antcall> | ||
<antcall target="test-module"><param name="module" value="test-qsaratomic"/></antcall> | ||
<antcall target="test-module"><param name="module" value="test-qsarbond"/></antcall> | ||
<antcall target="test-module"><param name="module" value="test-qsarmolecular"/></antcall> | ||
<antcall target="test-module"><param name="module" value="test-qsarprotein"/></antcall> | ||
</target> | ||
|
||
<target id="test-module" name="test-module" | ||
description="Checks for migrating code updates in the given CDK module."> | ||
|
||
<echo message="Checking for migrating code updates in CDK's ${module} module." /> | ||
|
||
<mkdir dir="${reports.tests}/pmd-migrating"/> | ||
<pmd shortFilenames="true" rulesetfiles="pmd/migrating.xml"> | ||
<formatter type="xml" toFile="${reports.tests}/pmd-migrating/${module}.xml"/> | ||
<fileset dir="${src}"> | ||
<includesfile name="${build}/${module}.javafiles"/> | ||
</fileset> | ||
</pmd> | ||
</target> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="custom"> | ||
|
||
<description> | ||
This ruleset checks for migration clean up in the CDK sources. | ||
</description> | ||
|
||
<!-- 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"/> | ||
|
||
</ruleset> |