I have already consulted the configuration documentation, but couldn't find anything.
I want to disable both of the following rules:
SA1633: The file header is missing or not located at the top of the file.
SA1652: Enable XML documentation output.
My stylecop.json
looks like this:
{
"$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
"settings": {
"orderingRules": {
"usingDirectivesPlacement": "outsideNamespace"
}
}
}
Any ideas?
Enabling and disabling rules is done via a ruleset file, not the configuration .json
file. For details regarding use of ruleset files, see https://msdn.microsoft.com/en-us/library/dd264996.aspx.
Alternative way is to specify suppression attributes in GlobalSuppressions.cs, like this:
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1633:File must have header", Justification = "<Pending>")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1652:Enable XML documentation output", Justification = "<Pending>")]
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