I am trying to suppress two occurences of the SA1649 error in StyleCop.
According to the documentation the suppression attribute looks like the attribute below
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649:FileHeaderFileNameDocumentationMustMatchTypeName", Justification = "Reviewed.")]
However, I cannot figure out what element I should apply the attribute to. If I put the attribute on the first element of the file (the IClassFactory Interface), I get the following error:
SA1649 : CSharp.Documentation : The file attribute in the file header's copyright tag must contain the name of the first type in the file and can be any of these: "IClassFactory" C:(...)COMHelper.cs
Can that error be suppressed? What element should it be applied to?
Use a namespace level suppression:
[module: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649:FileHeaderFileNameDocumentationMustMatchTypeName", Justification = "Reviewed.")]
namespace MyNamespace
{
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With