Anandhakrishnan
Anandhakrishnan

Reputation: 548

Using PMD default rules with properties

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 .

Upvotes: 0

Views: 1132

Answers (1)

Anandhakrishnan
Anandhakrishnan

Reputation: 548

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

is working fine.

Upvotes: 2

Related Questions