Code Inspection problem with StyleCop

I'm using Visual Studio 2012 + Resharper 7.1.3 + StyleCop 4.7.
According to this article, we can use GlobalSuppression.cs to get rid of certain warnings.

But in fact, the SuppressMessageAttribute works on the head of class, but *not works* in the GlobalSuppression.cs (the public abstract class Model still underlined).


    [SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1630:DocumentationTextMustContainWhitespace", Justification = "Reviewed. Suppression is OK here.")]
    public abstract class Model


not work:

    SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1630:DocumentationTextMustContainWhitespace", 
        Justification = "Reviewed. Suppression is OK here.")]

On the other hand, I see Resharper provides a config dialog in Code Inspection > Inspection Serverity for global/solution personal/solution team-shared/computer:
So, what's the best practice if I want to suppress some SAxxxx warning in global wide of solution or project.
Is GlobalSuppression.cs still useful or has been ignored?
Comment actions Permalink


Not sure about StyleCop (since it's a 3rd party plugin for ReSharper), however ReSharper uses its own settings storage for Code Inspections, so the unwanted code inspections should be turned off in ReSharper settings dialog as you've shown it on the 2nd screenshot.


Comment actions Permalink

VS 15.8.7 with ReSharper 2018.2.3 - confirmed ReSharper still doesn't look in GlobalSupressions.cs.

It would be great if this could be added, we have common suppressions we need to set at the project level and not all of the team use R# so we want to keep attribute noise to a minimum.



Comment actions Permalink

VS 15.9.11 with ReSharper 2018.3.4 - Still not working with GlobalSupressions.cs

As the previous comment, my team in Mexico works with R#, but the team in India don't have it. Please add this functionallity as we want to keep the ReSharper configuration separated from code as other teams could delete them by error or QA.


Please sign in to leave a comment.