Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable all stylecop warnings for a specific C# class

I am working in an application and developing few classes for demo purpose. I know that these classes will be removed in future.

Is it possible to ignore all the stylecop warnings for those classes as I dont want to spent the time on those warnings?

I searched but found that I can only ignore via settings in stylecop( this will effect other classes too) or to some specific rule ( I just want to ignore all warnings).

like image 990
D J Avatar asked Feb 08 '13 09:02

D J


Video Answer


1 Answers

You can trick StyleCop into not processing a file at all by adding this header at the top:

//------------------------------------------------------------------------------
// <auto-generated>
// Well, not really. This is just a trick to get StyleCop off my back.
// </auto-generated>
//------------------------------------------------------------------------------
like image 111
Jon Avatar answered Oct 21 '22 11:10

Jon