StyleCop 4.3 Is Released
The awaited StyleCop 4.3 update is now available. This update includes:
- Various bugfixes, including fixes for VS integration issues
- Rules documentation is included and integrated into VS "Show Error Help"
- New rules (more detail below)
- Branding change from Source Analysis to StyleCop
As promised, we will also be releasing SDK documentation for StyleCop explaining how to author custom rules and how to integrate the tool into custom build environments. The SDK documentation is currently under final review and we hope to release it very soon.
The new rules shipping with StyleCop 4.3 include:
· 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
The 4.3 release is available here: https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sourceanalysis&ReleaseId=1425