Menu

#1466 [core] Support sharing properties across mutliple rules

New Tickets
duplicate
nobody
None
PMD
3-Major
Feature-Request
5.4.1
2023-01-13
2016-03-03
No

At the moment I need to specify duplciate violationSuppressXPath properties for multiple rules.

Ideally I would like to declare the properties once in a rule set then reference the properties from each rule where I would like to apply them (like path references in ant build.xml).

Otherwise another option would be to support properties being appled for all rules within a xml set.
e.g.

<rule ref="rulesets/java/codesize.xml">
    <properties>
      <property name="violationSuppressXPath" 
                value="//MethodDeclarator[@Image='equals'] | //MethodDeclarator[@Image='hashCode']"/>
    </properties>
  </rule>

instead of having to declare the properties for every rule within codesize.xml

Discussion

  • Andreas Dangel

    Andreas Dangel - 2017-01-08
    • summary: Support sharing properties across mutliple rules --> [core] Support sharing properties across mutliple rules
     
  • Andreas Dangel

    Andreas Dangel - 2023-01-13
    • status: open --> duplicate
     
  • Andreas Dangel

    Andreas Dangel - 2023-01-13
     

Log in to post a comment.

MongoDB Logo MongoDB