Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is new .NET code from Microsoft not Microsoft StyleCop compliant?

I just downloaded the ASP.NET MVC beta and the templates are not StyleCop compliant.

Why is new .NET code coming from Microsoft not StyleCop compliant?

like image 268
Peter Avatar asked Oct 18 '08 08:10

Peter


2 Answers

Microsoft isn't monolithic. Different groups in it will have different opinions on how important the StyleCop warnings are. A lot of people would prefer to release sooner than fiddle about changing things that don't make all that much difference.

Also, StyleCop isn't right all the time. Sometimes the best thing to do with a warning is to ignore it.

like image 185
Khoth Avatar answered Oct 03 '22 06:10

Khoth


StyleCop checks conformance to the Microsoft Framework Design Guidelines.

The guidelines are enforced only on the code that makes up the .NET Framework proper, and even in the framework proper, occasional lapses exist. Elsewhere, the guidelines are recommendations only.

The framework design guidelines are available as a printed book, and make very interesting reading for the annotations from the contributors on why and how they agree or disagree, and how best to apply and interpret the rules. I should point out several important facts:

  • Not even the people who wrote the guidelines agree on all of them.
  • You probably aren't writing a framework for release into the wild.
  • The guidelines are a work in progress, and StyleCop lags behind them.
like image 36
Peter Wone Avatar answered Oct 03 '22 04:10

Peter Wone