Local Suppression:
[SuppressMessage("Microsoft.StyleCop.CSharp.DocumentationRules",
"SA1600:ElementsMustBeDocumented", Justification = "Reviewed.
Suppression is OK here.")]
for local suppression you must use namespace
using System.Diagnostics.CodeAnalysis;
OR
you can also use
[System.Diagnostics.CodeAnalysis.SuppressMessage
("Microsoft.StyleCop.CSharp.DocumentationRules", "SA1600:ElementsMustBeDocumented")]
Example:
using System.Diagnostics.CodeAnalysis;
[SuppressMessage("Microsoft.StyleCop.CSharp.DocumentationRules", "SA1600:ElementsMustBeDocumented", Justification = "Reviewed. Suppression is OK here.")]
protected void Button1_Click(object sender, EventArgs e)
{
}
[SuppressMessage("Microsoft.StyleCop.CSharp.DocumentationRules", "SA1600:ElementsMustBeDocumented",
Justification = "Reviewed. Suppression is OK here.")]
protected void Button2_Click(object sender, EventArgs e)
{
}
Global Suppression:
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage
("Microsoft.StyleCop.CSharp.DocumentationRules",
"SA1600:ElementsMustBeDocumented", Justification = "Reviewed.
Suppression is OK here.")]
Example:
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage
("Microsoft.StyleCop.CSharp.DocumentationRules",
"SA1600:ElementsMustBeDocumented",
Justification = "Reviewed. Suppression is OK here.")]
protected void Button1_Click(object sender, EventArgs e)
{
}
protected void Button2_Click(object sender, EventArgs e)
{
}
Comments
Post a Comment