FAQ

  • Problem: The PMD check fails with 

    java.lang.RuntimeException: Couldn't find the class net.sourceforge.pmd.rules.XPathRule not found

    Solution: The used PMD XML config file was written for PMD version 4.x, while Code Review Assistant ships PMD 6.x. PMD 6.x introduced quite a few API incompatibilities to support multiple languages. See here for details:

    http://sourceforge.net/projects/pmd/files/pmd/5.0.0/

    The problem here is that the PMD config uses net.sourceforge.pmd.rules.XPathRule which was used with PMD 4, while in PMD 6.x the class is now called net.sourceforge.pmd.lang.rule.XPathRule.  Therefore, you have to replace all references in the PMD file accordingly. 

  • Problem: The Checkstyle check fails with

    Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: unable to read checkstyle-all.xml - unable to parse configuration stream - Property ${checkstyle.suppressions.file} has not been set

    Solution: checkstyle.xml is referencing a suppression file with the placeholder ${checkstyle.suppressions.file}. As we do not currently support to replace placeholders with environment variables in our plug-in, you have to replace the environment variable with the path to the suppression file. Or if you still need the property because you replace the placeholder to the suppression file in your CI build (e.g. with Ant or Maven), you could use a default value:

    <module name="SuppressionFilter">
        <property name="file" value="${checkstyle.suppressions.file}" default="path/to/suppressions.xml"/>
    </module>