We\'re using StyleCop in our C# projects. In some cases we\'d like to avoid the rules though. I know you can add //
in the beginning of the
An old question I know but in looking for an answer I found that in stylecop 4.4 you can now put something like this - or one of these lines on a method:
[SuppressMessage("Microsoft.StyleCop.CSharp.DocumentationRules", "*", Justification = "Risky to change manually")]
[SuppressMessage("Microsoft.StyleCop.CSharp.SpacingRules", "*", Justification = "Risky to change manually")]
[SuppressMessage("Microsoft.StyleCop.CSharp.MaintainabilityRules", "*", Justification = "Risky to change manually")]
[SuppressMessage("Microsoft.StyleCop.CSharp.LayoutRules", "*", Justification = "Risky to change manually")]
[SuppressMessage("Microsoft.StyleCop.CSharp.NamingRules", "*", Justification = "Risky to change manually")]
[SuppressMessage("Microsoft.StyleCop.CSharp.ReadabilityRules", "*", Justification = "Risky to change manually")]
[SuppressMessage("Microsoft.StyleCop.CSharp.OrderingRules", "*", Justification = "Risky to change manually")]