Coffee, smoke and techilicious burps at 3.47 AM

Some half baked ideas by Nilotpal about Tao, Zen and the art of converting coffee into code...

StyleCop and Good Code

So you are serious about your code quality huh... well StyleCop is a fantastic tool to ensure that. The best part is, it integrates with Studio 2008. It is simple.

  1. Go to This Location, click on downloads and download the latest version of StyleCop. As of now it is the version 4.3
  2. Install StyleCop. It asks you information about integration. Let it integrate with Studio for the moment.
  3. Fire up Visual Studio
  4. Click on Tools and say Run StyleCop and look at the 1001 warnings that StyleCop gives.

Now when you use StyleCop, most of the warnings are not what you really want to work upon. Like Documentation, for instance, imagewho cares whether there is a blank space line above a comment or not...? So you can go to Solutions Explorer and click on Style Cop Settings. This will bring up the "Microsoft StyleimageCop Project Settings" Dialogue box which will allow you to customize your rules set. Allow you to enable / disable rules as per your own special requirements / whims / fancies / moods... :)

It is a fun little tool and I could have written more about it but then I decided that I won't spoil the fun. You guys go ahead and explore.

Published Thursday, January 15, 2009 7:59 PM by nilomo

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
(optional)
(required) 

  
Enter Code Here: Required
Submit

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker