Justify rule violation suppressions

TypeName JustifyRuleViolationSuppressions
CheckId BC1001
Category Usage
Breaking NonBreaking

Cause

An FxCop rule violation has been excluded using SuppressMessageAttribute, but no value has been provided for the Justification property.

Rule description

When suppressing an FxCop rule violation, a meaningful explanation for the exclusion should be provided.

How to fix violations

Add an explanation for the suppression to the Justification property of the SuppressMessageAttribute instance used to create the violation exclusion.

When to exclude warnings

Do not exclude a warning from this rule.

Example

The following example shows a rule exclusion that uses the Justification property to explain the suppression.
Visual Basic
<SuppressMessage("Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods", Justification := "The argument value may be null or any possible non-null value.")>
C#
[SuppressMessage("Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods", Justification = "The argument value may be null or any possible non-null value.")]