0

I'm running the latest version of PMD. In the [documentation][1] I find the following properties which I put in my rules.xml exactly as they are described (I want to change the regex later on):

<rule ref="category/apex/codestyle.xml/ClassNamingConventions">
    <properties>
        <property name="testClassPattern" value="[A-Z][a-zA-Z0-9_]*" />
        <property name="abstractClassPattern" value="[A-Z][a-zA-Z0-9_]*" />
        <property name="classPattern" value="[A-Z][a-zA-Z0-9_]*" />
        <property name="interfacePattern" value="[A-Z][a-zA-Z0-9_]*" />
        <property name="enumPattern" value="[A-Z][a-zA-Z0-9_]*" />
    </properties>
</rule>

When running pmd on the code, I receive the following error:

C:\Program Files\pmd\build.xml:32: java.lang.IllegalArgumentException: Cannot set non-existant property 'testClassPattern' on Rule ClassNamingConventions

Other rules like AvoidDeeplyNestedIfStmts work, a property like the problemDepth I can change to another number. I mainly seem to have issues with ClassNamingConventions. Is there something I'm doing wrong?

New contributor
Glenn is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

Glenn is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.