#417 Allow suppresssion of Errors Based on Reg Ex

open
nobody
None
5
2012-10-10
2006-02-23
John Bolger
No

Hi,

Is it possible to add functionality which would allow
you to supress erorrs based on a particular regualar
expression match?

The reason for that is because the position of lines
of code we wish to suppress errors for can change and
it would be better if we didnt have to make changes to
suppressions.xml every time we affect a file.

Instead, user should be able to define a regular
expression, which if matched, would allow you to
suppress errors for.

Regards,
John Bolger

Discussion

  • Oliver Burn

    Oliver Burn - 2006-02-23

    Logged In: YES
    user_id=218824

    Can you give an example because I do not understand what you
    are trying to describe.

     
  • John Bolger

    John Bolger - 2006-02-24

    Logged In: YES
    user_id=1275479

    Right,
    I am currently running the magic numbers check, but a
    certain method call requires that a number be passed in
    which basically identifies the calling method.

    Therefore i want to be able to exclude this method call but
    i find it cumbersome to have to update suppressions.xml
    every time i make a change to the class (and line numbers
    change)

    It would be good if i could just give a regular expression
    which i want to be matched in suppressions.xml.

    Therefore, the magic numbers error would be suppressed for
    this particular method.

    sort if like...

    <suppress checks="MagicNumber"
              files="*.java"
              expression="/getConnection([0-9]+[a-zA-Z]+/"/>
    

    Or whatever the correct reg exp syntax is!

    Regards,
    John

     

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

Sign up for the SourceForge newsletter:





No, thanks