0

How to use the dafault rules with properties in PMD.

Now I'm using the default rules as

<rule ref="rulesets/basic.xml/UselessOperationOnImmutable"/>

this works fine but the rules like "NPathComplexity" in Codesize use properties so that we can configure the default rules too . how to configure this . someone please help .

Anandhakrishnan
  • 548
  • 2
  • 7
  • 21

1 Answers1

2
<rule ref="rulesets/codesize.xml/CyclomaticComplexity">
  <properties>
     <property name="reportLevel" value="5"/>
  </properties>
</rule> 

is working fine.

Anandhakrishnan
  • 548
  • 2
  • 7
  • 21