The #develop teamblog
#  Friday, August 22, 2008

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.

Categories: Chris
Friday, August 22, 2008 8:03:13 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0]

 



© Copyright 2014 SharpDevelop Core Team

Subscribe to this weblog's RSS feed with SharpReader, Radio Userland, NewsGator or any other aggregator listening on port 5335 by clicking this button.   RSS 2.0|Atom 1.0  Send mail to the author(s)

 

Copyright ©2000-2009 IC#Code. All rights reserved. Projects sponsored by AlphaSierraPapa.