Adds PMD testing for inappropriate use of implementations, where interfaces should be used. Example 'bad' code:
It will highlight many sources of bugs.
Patch available from:
http://github.com/egonw/cdk/tree/152-cdkPMDtests
No code library change; one review is enough.
Looks good. Applied and pushed.
But running
ant -f pmd.xml
does not seem to report any violations for the custom CDK rules. Does the PMD report have to be generated some other way?
That should work...
<antcall target="test-module"><param name="pmd.test" value="custom"><param name="module" value="qsarprotein"></antcall>
That's the call in pmd.xml, and the pmd.test param value is later used in:
<pmd shortfilenames="true" rulesetfiles="pmd/${pmd.test}.xml"></pmd>
And pmd/custom.xml is now referencing the pmd/cdkinterfaces.xml:
http://github.com/cdk/cdk/commit/406930b29289b520077c310debffb1f18e49132b#diff-1
I checked, and in some situations it was not run yet. Please see the attached patch.
Aah, works fine now. Applied and pushed.