Busted by the style cop

In an exercise of self code review I installed StyleCope. At first no rules were excluded and there were hundreds of violations. Most were about missing headers, but it was quite helpful to have all the code in a given project organized in a consistent industry standard style.

Significant deviations from out of the box rules

Two significant deviations from the out of the box rules are beginning field names with an underscore and prefixing local calls with this. Here I am following CoreFX coding guide.

Using directives inside or outside the namespace

A practice I never considered until StyleCode barked at me was placing the using directives inside the namespace. I complied with the style guideline, but here is a good discussion and why one might do this: Should 'using' directives be inside or outside the namespace.

My web site code base after cleaning up the code based on what StyleCop found.

Posted 20 May 2018