{
  "version": "https://jsonfeed.org/version/1.1",
  "title": "chem-bla-ics",
  "description": "Chemblaics (pronounced chem-bla-ics) is the science that uses open science and computers to solve problems in chemistry, biochemistry and related fields.",
  "home_page_url": "https://chem-bla-ics.linkedchemistry.info/",
  "feed_url": "https://chem-bla-ics.linkedchemistry.info/2010/03/26/cleaner-cdk-code-3-run-pmd-tests.json",
  "icon": "https://chem-bla-ics.linkedchemistry.info/assets/images/chem-bla-ics_logo.png",
  "language": "en",
  "authors": [
    {
      "name": "Egon Willighagen",
      "url": "https://orcid.org/0000-0001-7542-0286",
      "_orcid": "0000-0001-7542-0286"
    }
  ],
  "items": [

    {
      "id": "https://doi.org/10.59350/0jvd2-er861",
      "url": "https://chem-bla-ics.linkedchemistry.info/2010/03/26/cleaner-cdk-code-3-run-pmd-tests.html",
      "title": "Cleaner CDK Code #3: run the PMD tests",
      "content_html": "<p><a href=\"http://pmd.sourceforge.net/\">PMD</a> is a tool to run some tests against your source code. The check for code style,\ncommon problems, and places where code could be improved. The <a href=\"http://cdk.sf.net/\">CDK</a> has been using it for years\nnow, such as <a href=\"http://pele.farmbio.uu.se/nightly/pmdsummary.html\">here for CDK 1.3.x</a>.</p>\n\n<h2 id=\"running-the-pmd-tests-from-the-command-line\">Running the PMD tests from the command line</h2>\n<p>When you are writing patches for the CDK, you can run the PMD tests via an Ant file, for example via the command line:</p>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>$ ant -f pmd.xml\n</code></pre></div></div>\n\n<p>However, 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):</p>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>$ ant -f pmd.xml -Dpmd.test=custom -Dmodule=data test-module\n</code></pre></div></div>\n\n<p>The <a href=\"http://cdk.git.sourceforge.net/git/gitweb.cgi?p=cdk/cdk;a=tree;f=pmd;h=80f6f928bf7b24acdb3c2a909550832b15365ef5;hb=HEAD\">custom.xml</a>\ndefines the tests we normally run.</p>\n\n<p>The pmd.xml does not create HTML pages, like Nightly does. Instead, an XML file is currently created. The\n<a href=\"http://manpages.ubuntu.com/manpages/lucid/en/man1/xpath.1p.html\">xpath</a> utility can be used to filter out the\ninformation we are interested in. For example, if we want to reports just about DefaultChemObjectBuilder, we issue:</p>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>$ xpath -e \"//violation[@class='DefaultChemObjectBuilder']\" \\\\\n    reports/pmd/data.xml\n</code></pre></div></div>",
      "summary": "PMD is a tool to run some tests against your source code. The check for code style, common problems, and places where code could be improved. The CDK has been using it for years now, such as here for CDK 1.3.x.",
      
      "date_published": "2010-03-26T00:00:00+00:00",
      "date_modified": "2010-03-26T00:00:00+00:00",
      "tags": ["cdk","pmd"],
      
      
      
      
      
      
        "authors": [ { "name": "Egon Willighagen", "url": "https://orcid.org/0000-0001-7542-0286" } ]
      
    }

  ]
}
