Google
 

Monday, June 04, 2007

How to use SuppressMessageAttribute in .Net

Suppresses reporting of a specific static analysis tool rule violation, allowing multiple suppressions on a single code artifact.


In Source Suppression Overview

After reviewing the code, you might determine that the code is correct as is. Or, it might be the case that some violations are of low priority and will not get fixed in the current development cycle. Regardless of the reason, it is often useful to indicate that the warning is non-applicable in order to let the team members know that the code was reviewed and it was determined that the warning be suppressed. In Source Suppression (ISS) is useful because it allows a developer to place the decoration that suppresses the warning close to the warning itself.

No comments: