Announcing the release of Microsoft Source Analysis for C#
We
are very excited to announce the release of a new developer tool from
Microsoft, Source Analysis for C#. This tool is known internally within
Microsoft as StyleCop, and has been used for many years now to help
teams enforce a common set of best practices for layout, readability,
maintainability, and documentation of C# source code.
Source Analysis is similar in many ways to Microsoft Code Analysis
(specifically FxCop), but there are some important distinctions. FxCop
performs its analysis on compiled binaries, while Source Analysis
analyzes the source code directly. For this reason, Code
Analysis focuses more on the design of the code, while Source Analysis
focuses on layout, readability and documentation. Most of that
information is stripped away during the compilation process, and thus
cannot be analyzed by FxCop.
The ultimate goal of Source Analysis is to allow you to produce
elegant, consistent code that your team members and others who view
your code will find highly readable. In order to accomplish this,
Source Analysis does not allow its rules to be very configurable.
Source Analysis takes a one-size-fits-all approach to code
style, layout, and readability rules. It is highly likely that you will
not agree with all of the rules and may even find some of the
rules annoying at first! However, the majority of teams using this tool
within Microsoft have found that after a short adjustment period, they
came to appreciate the rules enforced by Source Analysis, and even
began to find it difficult to read code not written in this style.
Source Analysis comes with a set of default rules analyzers covering
approximately 200 best practice rules. These rules are full compatible
with the default layout settings in Visual Studio 2005 and Visual
Studio 2008.
Website