VS2010 / Code Analysis: Turn off a rule for a project without custom ruleset....

Posted by TomTom on Stack Overflow See other posts from Stack Overflow or by TomTom
Published on 2010-04-19T08:13:45Z Indexed on 2010/04/19 8:23 UTC
Read the original article Hit count: 521

...any change?

The scenario is this:

  • For our company we develop a standard how code should look.
  • This will be the MS full rule set as it looks now.
  • For some specific projects we may want to turn off specific rules. Simply because for a specific project this is a "known exception". Example? CA1026 - while perfectly ok in most cases, there are 1-2 specific libraries we dont want to change those.
  • We also want to avoid having a custom rule set. OTOH putting in a suppress attribute on every occurance gets pretty convoluted pretty fast.

Any way to turn off a code analysis warning for a complete assembly without a custom rule set? We rather have that in a specific file (GlobalSuppressions.cs) than in a rule set for maintenance reasons, and to be more explicit ;)

© Stack Overflow or respective owner

Related posts about visual-studio-2010

Related posts about code-analysis