SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Laputa

This is a mirror of http://laputa.sharpdevelop.net/, the core team's central news blog.

StyleCop Addin

This addin integrates Microsoft StyleCop into SharpDevelop. StyleCop only supports C#, and this addin has been tested against StyleCop 4.3, earlier versions won't work.

Features

  • Line highlighting of the warnings found
  • Change StyleCop settings on a per-project basis, copying from a master file you can also configure
  • Run as part of the normal build process or on-demand from the project menu

So how do you run StyleCop? Simply from the context menu of the current C# project:

This will result in an error (given that you haven't installed StyleCop yet):

Therefore please download the latest version of StyleCop and install it. Note that you must install the MSBuild integration:

Once installed, you have to tell SharpDevelop where to find it. This is done in the Tools / Options dialog:

Click on "Find StyleCop path" and go to the MSBuild directory:

Now SharpDevelop knows how to find StyleCop, all you have to do is re-run the StyleCop inspection of your project. In my sample project this results in quite a few warnings:

As you might not go d'accord with the default style checks, you can manipulate the StyleCop settings right from your current C# project:

Those rules are documented in StyleCop.

Read the complete post at http://laputa.sharpdevelop.net/StyleCopAddin.aspx

Published Aug 22 2008, 09:03 AM by Laputa
Filed under:
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.