skip to the main content area of this page
Patterns and Practices

 

Download StyleCop 4.3 - Microsoft Source Code Style and Consistency Tool


If you are interested in StyleCop 4.3, you are also probably interested in the recent release of FxCop 1.36 as well:

StyleCop helps you maintain a particular style and consistency in how you format and write the source code in your .NET Assemblies, Frameworks, and Reusable Libraries.

StyleCop 4.3 has the following new rules:

  • Enforce sort order for using directives. This aligns with the Organize Usings functionality in VS 2008
  • Require standard summary text for constructors and destructors
  • Require parenthesis in arithmetic and comparison expressions for added clarity
  • Require String.Empty rather than “”
  • Require explanation message text in debug asserts
  • Require justification text in Code Analysis suppressions
  • Enforce use of built-in type aliases for int, string, float, etc.
  • Require a blank line between elements
  • Disallow blank lines at the top or bottom of documentation headers
  • Disallow regions within method bodies (enabled by default)
  • Disallow the use of regions anywhere within the code (disabled by default)
  • Disallow empty static constructors
  • Disallow empty unsafe, lock, checked, and unchecked statements
  • Disallow unnecessary or empty try\catch\finally

You can download Microsoft StyleCop here.

Krzysztof Cwalina and Brad Abrams have a new book coming out in November 2008 that you can pre-order now: Framework Design Guidelines: Conventions, Idioms, and Patterns for Reuseable .NET Libraries (2nd Edition). The first edition was awesome IMHO!

 

Related Posts:

 


Tags: Frameworks, StyleCop


Topics



 

Popular Tags



Recent Links