Menu

#142 Exclude rules in ruleset.xml

Long-term
closed
None
5
2012-10-07
2003-04-12
No

When you create a new ruleset.xml file you must list all
the rules you want to include.
Most of the time, I find the default ruleset very useful
and I rather want to specify the rules I want to exclude.
This way, I can benefit from added new rules in new
releases of PMD.

Tom Copeland proposed a syntax that would fit my
needs:

================
<?xml version="1.0"?>
<ruleset name="Favorites">
<description>Good stuff</description>

<rule ref="rulesets/braces.xml/">
<exclude name="WhileLoopsMustUseBracesRule"/>
</rule>
</ruleset>
================

Thanks,

Gael

Discussion

  • Tom Copeland

    Tom Copeland - 2003-04-12

    Logged In: YES
    user_id=5159

    Cool, thanks Gael.

    tom

     
  • Tom Copeland

    Tom Copeland - 2003-04-23

    Logged In: YES
    user_id=5159

    Working on this now.

     
  • Tom Copeland

    Tom Copeland - 2003-04-23

    Logged In: YES
    user_id=5159

    Hi Gael -

    OK, this is checked into CVS now.... you can download a jar
    file containing this feature here:

    http://infoether.com/~tom/pmd-1.05.jar

    Thanks for the suggestion,

    tom

     
  • Tom Copeland

    Tom Copeland - 2003-06-19

    Logged In: YES
    user_id=5159

    Should have marked it as pending...

     
  • Tom Copeland

    Tom Copeland - 2003-06-19

    Logged In: YES
    user_id=5159

    Fixed in 1.1.

     

Log in to post a comment.

MongoDB Logo MongoDB