We have a folder within our project that we would like to exclude from one PMD rule. For example, we want the rule FieldNamingConventions, but we just don't want it to run on a specific directory.
We've tried to something similar to the below to ignore all classes that contain Model:
<rule ref="category/apex/codestyle.xml/FieldNamingConventions">
<properties>
<property name="violationSuppressXPath" value="//ClassOrInterfaceDeclaration['.*Model']"/>
</properties>
</rule>
However PMD throws exceptions when it gets to that rule.
How can we go about getting this rule excluded just from this directory or files without having to suppress the rule in each single class?