Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
ignoring false positives
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Vlad  
View profile  
 More options Nov 2, 3:18 pm
From: Vlad <vladimir.giszp...@gmail.com>
Date: Mon, 2 Nov 2009 12:18:02 -0800 (PST)
Local: Mon, Nov 2 2009 3:18 pm
Subject: ignoring false positives
Hi,

If I would like a rule to execute, but I know that it incorrectly
makes a finding for a given method.
Is there a way for me to decorate the method with some attribute
(example follows)?

[IgnoreGendarmeRule(EnsureLocalDisposableRule] // foo is Disposed
elsewhere in method Bar ()
void DoStuff ()
{
    IDisposable foo = new Foo ();
    DoSomeStuff (foo);

}

Thanks,

Vlad


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sebastien Pouliot  
View profile  
 More options Nov 2, 7:20 pm
From: Sebastien Pouliot <sebastien.poul...@gmail.com>
Date: Mon, 02 Nov 2009 19:20:07 -0500
Local: Mon, Nov 2 2009 7:20 pm
Subject: Re: [gendarme] ignoring false positives

On Mon, 2009-11-02 at 12:18 -0800, Vlad wrote:
> Hi,

> If I would like a rule to execute, but I know that it incorrectly
> makes a finding for a given method.
> Is there a way for me to decorate the method with some attribute
> (example follows)?

> [IgnoreGendarmeRule(EnsureLocalDisposableRule] // foo is Disposed
> elsewhere in method Bar ()
> void DoStuff ()
> {
>     IDisposable foo = new Foo ();
>     DoSomeStuff (foo);
> }

At some point we'll support the [SuppressMessage] attribute that MS use
to ignore defects with FxCop. About 50% of the code is already there.

In the mean time the solution (which, personally, I much prefer to using
attributes) is to use an ignore file, see example in [1], docs in [2].

For 2.8 I plan to write a tool to convert defects into ignore entries.
That will make it easier for people who want to create a baseline on
existing software.

Sebastien

[1]
http://anonsvn.mono-project.com/viewvc/trunk/mono-tools/gendarme/self...
[2]
http://anonsvn.mono-project.com/viewvc/trunk/mono-tools/gendarme/man/...


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google