#316 Be able to specify check property in suppresion filter

release_4.2
closed
Check (274)
5
2012-10-10
2004-09-05
No

Suppose you have these two checks:

<module name="GenericIllegalRegexp">
<property name="format" value="System\.out\.print"/>
<property name="message" value="Do no use System.out"/>
</module>

<module name="GenericIllegalRegexp">
<property name="format" value=".printStackTrace"/>
<property name="message" value="Do no use printStackTrace"/>
</module>

I have a file where I want to allow printStackTrace but
not System.out.print. With the current suppression filter,
I can only suppress both by suppressing
GenericIllegalRegexp.

We need another property in the suppresion filter.
Something maybe like

<suppress checks="GenericIllegalRegexp" files="com.something.*.java" property="format=.printStackTrace"/>

or

<suppress checks="GenericIllegalRegexp" files="com.something.*.java" format=".printStackTrace"/>

Discussion

  • Alexander Jesse

    Alexander Jesse - 2005-02-25

    Logged In: YES
    user_id=571847

    That would be a usefull feature.

    Maybe a "name" or "id" attribute could be added to the
    config-file for those checks (the multipurpose-checks like
    regexp) that one wants to differentiate in the
    suppresion-file. The suppression file would be easier to
    maintain.

    When the "name/id" is not specified, then suppression would
    work as it does right now. With the "name/id" specified
    suppression could use the "advanced" capabilities.

     
  • Oliver Burn

    Oliver Burn - 2006-05-23

    Logged In: YES
    user_id=218824

    This feature has been implemented and will be part of the
    4.2 release.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks