O'Reilly logo

Instant StyleCop Code Analysis How-to by Franck LEVEQUE

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Customizing file headers (Simple)

In this recipe, we will see how to customize file headers to avoid StyleCop violations, and how we can use Visual Studio templates and snippets to make our life easier while developing.

Getting ready

For this recipe, you will need to have:

  • StyleCop 4.7 installed
  • Visual Studio 2008 or higher

How to do it...

Note

StyleCop doesn't use a lot of rules for headers. Basically, it requires the following things: the file name, a copyright, a company name, and a summary.

Let's try to make a LGPL header compliant with StyleCop. As there's no advice on how to integrate the Version 3.0, we will stick with the header proposed in Version 2.1 and which can be viewed at http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.

  1. The only requirements ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required