Running the PMD tests from the command line
When you are writing patches for the CDK, you can run the PMD tests via an Ant file, for example via the command line:
$ ant -f pmd.xmlHowever, when working on a single file, you will likely appreciated running the tests against a single module. This can be done with (for the data module):
$ ant -f pmd.xml -Dpmd.test=custom -Dmodule=data test-moduleThe custom.xml defines the tests we normally run.
The pmd.xml does not create HTML pages, like Nightly does. Instead, an XML file is currently created. The xpath utility can be used to filter out the information we are interested in. For example, if we want to reports just about DefaultChemObjectBuilder, we issue:
$ xpath -e "//violation[@class='DefaultChemObjectBuilder']" \\
reports/pmd/data.xml
No comments:
Post a Comment