Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I disable CS1591 while keeping SA1600 for the same line of code

I'm using Visual Studio 2017 and moved from the StyleCop extension to the StyleCop Analysers NuGet. After a bit of trouble I've managed to get it working. But observed somehing odd:

If I leave the project build settings at the default (not generating XML documentation file) i get a SA0001 warning (an no warnings for missing xml documentation for closed files). If I select to output the XML documentation (on the Build tab) the SA0001 naturally disappears, and I get a lot of SA160x warnings (also for closed files). The "problem" is that I also see a CS1591 for each SA1600.

I can also set the VS option for Text Editor, C#, Advanced, Enable full solution analysis to see warnings for closed files, but I still get both CS1591 and SA1600 for the same line of code.

In my dream scenario I'd get the SA160x warnings for all files without seeing CS1591 and SA0001. Is that possible?

like image 613
Cato Lommerud Avatar asked Jan 18 '18 10:01

Cato Lommerud


1 Answers

CS1591 is a compiler warning. Just go into your projects settings and add it to the list of warnings to be ignored.

Project => Properties => Build => Errors and Warnings => Supress Warnings => enter 1591 in the textbox and save

like image 100
nvoigt Avatar answered Nov 01 '22 17:11

nvoigt