<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Microsoft StyleCop</title><link>http://blogs.msdn.com/b/sourceanalysis/</link><description /><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>StyleCop 4.4</title><link>http://blogs.msdn.com/b/sourceanalysis/archive/2010/05/06/stylecop-4-4.aspx</link><pubDate>Thu, 06 May 2010 19:53:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10008725</guid><dc:creator>jasonall</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;StyleCop 4.4 Beta 1 is now available for download from &lt;a title="http://stylecop.codeplex.com/" href="http://stylecop.codeplex.com/"&gt;http://stylecop.codeplex.com/&lt;/a&gt;. This release provides full support for C# 4.0 syntax, and also provides integration into VS2010 and VS2008. We plan to leave this release in Beta for the next couple of months to flush out any remaining high severity bugs, finalize documentation, etc. The source code for this release is also available today at &lt;a href="http://stylecop.codeplex.com"&gt;http://stylecop.codeplex.com&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;StyleCop 4.4 comes with a number of improvements over 4.3.3, but also introduces a few breaking changes to the C# code object model. &lt;strong&gt;All existing custom rules will need to be rebuilt and redeployed for use with StyleCop 4.4!&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;In addition to a large number of bugfixes and other stability improvements, StyleCop 4.4 provides better support for rule suppressions. With StyleCop 4.3, only certain types of rules could be suppressed, while StyleCop 4.4 allows suppression of any rule type. In addition, 4.4 allows quick suppression of an entire class of rules. For example:&lt;/p&gt;  &lt;pre style="width: 533px; height: 110px" class="csharpcode"&gt;[SuppressMessage(&lt;span class="str"&gt;&amp;quot;Microsoft.StyleCop.CSharp.DocumentationRules&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;*&amp;quot;&lt;/span&gt;)]
&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; MyClass
{
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; MyMethod()
    {
    }
}&lt;/pre&gt;

&lt;p&gt;&lt;style type="text/css"&gt;


.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;Rather than specifying the name and ID of a&amp;#160; specific rule to suppress, this suppression attribute indicates that all rules in the DocumentationRules namespace should be suppressed. StyleCop will not report any documentation violations for this class or its members.&lt;/p&gt;

&lt;p&gt;Please provide feedback on this release by filing issues at the StyleCop CodePlex site. Thanks!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10008725" width="1" height="1"&gt;</description></item><item><title>StyleCop is going Open Source!</title><link>http://blogs.msdn.com/b/sourceanalysis/archive/2010/04/24/stylecop-is-going-open-source.aspx</link><pubDate>Sat, 24 Apr 2010 01:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10001823</guid><dc:creator>jasonall</dc:creator><slash:comments>0</slash:comments><description>&lt;P&gt;I am very excited to announce that Microsoft has decided to take StyleCop Open Source under the MS-PL license. Specifically, this means that we will create a new project on CodePlex.com containing the full code base for StyleCop, and all future development on StyleCop will be done from that CodePlex site. Microsoft will continue to manage the StyleCop project, and Microsoft will be responsible for creating and releasing official signed builds. However, we will also take code submissions from the community, and you will have access to all of the source!&lt;/P&gt;
&lt;P&gt;Since StyleCop was released publicly, there has been an overwhelmingly positive response from the C# development community. StyleCop has been adopted by many developers and dev teams worldwide. Many tools related to StyleCop have sprung up and StyleCop has been integrated into a number of different C# development environments. This has been excellent to see.&lt;/P&gt;
&lt;P&gt;At the same time, many of you have complained about the slow pace of bugfixes and updates, about limitations in the license, and about some big things like a lack of support for VB.Net. Now you have the opportunity to solve these issues by writing the code, and making the tool better for everyone.&lt;/P&gt;
&lt;P&gt;In a few weeks we will be taking the StyleCop CodePlex site live, and shortly after that we will be releasing StyleCop 4.4, which provides full support for C# 4.0, as well as a large number of bugfixes and other improvements. Stay tuned!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10001823" width="1" height="1"&gt;</description></item><item><title>You’re welcome rickpastoor, you’re welcome</title><link>http://blogs.msdn.com/b/sourceanalysis/archive/2010/04/01/you-re-welcome-rickpastoor-you-re-welcome.aspx</link><pubDate>Thu, 01 Apr 2010 15:17:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9988924</guid><dc:creator>jasonall</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;a title="http://twitpic.com/1cdur7" href="http://twitpic.com/1cdur7"&gt;http://twitpic.com/1cdur7&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9988924" width="1" height="1"&gt;</description></item><item><title>StyleCop for Visual Studio 2010</title><link>http://blogs.msdn.com/b/sourceanalysis/archive/2010/01/04/stylecop-for-visual-studio-2010.aspx</link><pubDate>Mon, 04 Jan 2010 15:38:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9943412</guid><dc:creator>jasonall</dc:creator><slash:comments>0</slash:comments><description>&lt;P&gt;We have just released a new StyleCop BETA which is identical to the previous release except that it adds the ability to integrate into the Visual Studio 2010 shell. After installing this release, you should see the familiar StyleCop menus showing up in both VS 2010 and VS 2008.&lt;/P&gt;
&lt;P&gt;We plan to leave this release in BETA for a couple of weeks. If you decide to try it out, will you please let us know whether it’s working as expected for you?&lt;/P&gt;
&lt;P&gt;You can pick up the Beta here: &lt;A title=https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sourceanalysis&amp;amp;ReleaseId=3754 href="https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sourceanalysis&amp;amp;ReleaseId=3754" mce_href="https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sourceanalysis&amp;amp;ReleaseId=3754"&gt;&lt;STRIKE&gt;https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sourceanalysis&amp;amp;ReleaseId=3754&lt;/STRIKE&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;[Update]&lt;/STRONG&gt; The Beta has been upgraded to a full release, and can be downloaded from: &lt;A title=http://code.msdn.microsoft.com/sourceanalysis/Release/ProjectReleases.aspx?ReleaseId=1425 href="http://code.msdn.microsoft.com/sourceanalysis/Release/ProjectReleases.aspx?ReleaseId=1425"&gt;&lt;FONT color=#0065e2&gt;http://code.msdn.microsoft.com/sourceanalysis/Release/ProjectReleases.aspx?ReleaseId=1425&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9943412" width="1" height="1"&gt;</description></item><item><title>Property Headers</title><link>http://blogs.msdn.com/b/sourceanalysis/archive/2009/08/11/property-headers.aspx</link><pubDate>Tue, 11 Aug 2009 02:55:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9863638</guid><dc:creator>jasonall</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;By default StyleCop comes with two rules which govern the summary documentation for properties, depending upon the types of accessors contained with the property. For example:&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;/// &amp;lt;summary&amp;gt;     &lt;br /&gt;/// Gets or sets the name of the customer.      &lt;br /&gt;/// &amp;lt;/summary&amp;gt;      &lt;br /&gt;public string Name      &lt;br /&gt;{      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; get;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; set;      &lt;br /&gt;} &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;In this example, StyleCop will require that the summary text starts with “Gets or sets” since the property has visible get and set accessors. In some cases, the set accessor has more limited access than the get accessor. For example:&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Courier New"&gt;/// &amp;lt;summary&amp;gt;     &lt;br /&gt;/// Gets the name of the customer.      &lt;br /&gt;/// &amp;lt;/summary&amp;gt;      &lt;br /&gt;public string Name      &lt;br /&gt;{      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; get;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; private set;      &lt;br /&gt;} &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;In this case, StyleCop requires the summary documentation to omit the “or sets” wording since public consumers of the property can only see the get accessor. &lt;/p&gt;  &lt;p&gt;Unfortunately, it can sometimes be non-obvious whether the set accessor within a property is actually less accessible than the get accessor. For example, consider the case where a public property is contained within an internal class, and the set accessor has the &lt;em&gt;internal &lt;/em&gt;keyword. In effect, both the get and set accessors have the same access level, because the entire class is internal. In this case, the summary documentation should refer to both the get and set accessors, since they have the same access level and can both be viewed by the same set of callers.&lt;/p&gt;  &lt;p&gt;This can be a little confusing. In StyleCop 4.3.2, this behavior of this rule has changed slightly to avoid some confusion about when the “or sets” wording should be included. StyleCop now applies a series of rules to determine when the set accessor should be referenced in the property’s summary documentation. In general, these rules require the set accessor to be referenced whenever it is visible to the same set of callers as the get accessor, or whenever it is visible to external classes or inheriting classes. &lt;/p&gt;  &lt;p&gt;The specific rules for determining whether to include the set accessor in the property’s summary documentation are:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;1. The set accessor has the same access level as the get accessor. For example:&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font size="2" face="Courier New"&gt;/// &amp;lt;summary&amp;gt;       &lt;br /&gt;/// Gets or sets the name of the customer.        &lt;br /&gt;/// &amp;lt;/summary&amp;gt;        &lt;br /&gt;protected string Name        &lt;br /&gt;{        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; get;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; set;        &lt;br /&gt;} &lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;2. The property is only internally accessible within the assembly, and the set accessor also has the internal keyword. For example:&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font size="2" face="Courier New"&gt;internal class Class1       &lt;br /&gt;{        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;summary&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; /// Gets or sets the name of the customer.         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;/summary&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; protected string Name        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; get;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; internal set;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }        &lt;br /&gt;} &lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font size="2" face="Courier New"&gt;internal class Class2       &lt;br /&gt;{        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; public class Class3        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;summary&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// Gets or sets the name of the customer.         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;/summary&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public string Name        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; get;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; internal set;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }        &lt;br /&gt;} &lt;/font&gt;&lt;/p&gt;    &lt;p&gt;3. The property is private or is contained beneath a private class, and the set accessor has any access modifier other than private. In the example below, the access modifier declared on the set accessor has no meaning, since the set accessor is contained within a private class and thus cannot be seen by other classes outside of Class1. This effectively gives the set accessor the same access level as the get accessor.&lt;/p&gt;    &lt;p&gt;&lt;font size="2" face="Courier New"&gt;public class Class1       &lt;br /&gt;{        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; private class Class2        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public class Class3        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;summary&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// Gets or sets the name of the customer.         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;/summary&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public string Name        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; get;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; internal set;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }        &lt;br /&gt;} &lt;/font&gt;&lt;/p&gt;    &lt;p&gt;4. Whenever the set accessor has protected or protected internal access, it should be referenced in the documentation. A protected or protected internal set accessor can always be seen by an inheriting class, thus it should be included within the documentation. In the example below, the property is internal because it is contained within an internal class. However, the set accessor is protected, meaning that it can be seen by an inheriting class. The constructor of Class3 sets the value of the Name property. Thus, the property header should still refer to the set accessor.&lt;/p&gt;    &lt;p&gt;&lt;font size="2" face="Courier New"&gt;internal class Class1       &lt;br /&gt;{        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; public class Class2        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;summary&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// Gets or sets the name of the customer.         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;/summary&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public string Name        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; get;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; protected set;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; } &lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font size="2" face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160; private class Class3 : Class2       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public Class3(string name)         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; this.Name = name;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }        &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9863638" width="1" height="1"&gt;</description></item><item><title>Rule Suppressions</title><link>http://blogs.msdn.com/b/sourceanalysis/archive/2009/08/10/rule-suppressions.aspx</link><pubDate>Mon, 10 Aug 2009 22:06:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9863459</guid><dc:creator>jasonall</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Starting with StyleCop 4.3.2, it is possible to suppress the reporting of rule violations by adding suppression attributes within the source code. The syntax for these suppressions is similar to that for Visual Studio Code Analysis, or FxCop. For more information about Code Analysis suppressions, see the following article: &lt;a href="http://msdn.microsoft.com/en-us/library/ms244717.aspx"&gt;In Source Suppressions Overview&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;StyleCop rule suppressions are registered in code using the &lt;b&gt;SuppressMessage&lt;/b&gt; attribute. The &lt;b&gt;SuppressMessage &lt;/b&gt;attribute is a conditional attribute, which is included in the IL metadata of your managed code assembly only if the CODE_ANALYSIS compilation symbol is defined at compile time.&lt;/p&gt;  &lt;p&gt;We recommend that you use in-source suppressions on debug or check-in builds, in order to eliminate the possibility of mistakenly shipping the in-source suppression metadata and compromising execution or performance because of the metadata bloat. Since StyleCop analyzes the source code directly, there is no need for these attributes to be compiled into the assembly.&lt;/p&gt;  &lt;p&gt;The &lt;b&gt;SuppressMessage&lt;/b&gt; attribute has the following format:&lt;/p&gt;  &lt;p&gt;&lt;i&gt;[SuppressMessage(&lt;/i&gt;&lt;i&gt;&amp;quot;Rule Category&amp;quot;&lt;/i&gt;&lt;i&gt;, &lt;/i&gt;&lt;i&gt;&amp;quot;Rule Id&amp;quot;&lt;/i&gt;&lt;i&gt;, &lt;/i&gt;&lt;i&gt;&amp;quot;Justification&amp;quot;&lt;/i&gt;&lt;i&gt;)]&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;Where:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;b&gt;Rule Category - &lt;/b&gt;The StyleCop rule namespace in which the rule is defined. For example, &lt;i&gt;Microsoft.StyleCop.CSharp.DocumentationRules&lt;/i&gt; &lt;/li&gt;    &lt;li&gt;&lt;b&gt;Rule Id - &lt;/b&gt;The identifier for the rule, using the format &lt;i&gt;shortname:longname&lt;/i&gt;. For example, &lt;i&gt;SA1600:ElementsMustBeDocumented&lt;/i&gt; &lt;/li&gt;    &lt;li&gt;&lt;b&gt;Justification&lt;/b&gt; - The text that is used to document the reason for suppressing the message. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The &lt;b&gt;SuppressMessage&lt;i&gt; &lt;/i&gt;&lt;/b&gt;attribute also takes the following optional parameters. These parameters are completely ignored by StyleCop and do not need to be filled in for StyleCop suppressions.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;b&gt;Message Id&lt;/b&gt; &lt;/li&gt;    &lt;li&gt;&lt;b&gt;Scope&lt;/b&gt; &lt;/li&gt;    &lt;li&gt;&lt;b&gt;Target&lt;/b&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;b&gt;SuppressMessage Usage &lt;/b&gt;&lt;/p&gt;  &lt;p&gt;StyleCop violations are suppressed at the level to which an instance of the &lt;b&gt;SuppressMessage&lt;/b&gt; attribute is applied. The purpose of this is to tightly couple the suppression information to the code where the violation occurs. &lt;/p&gt;  &lt;p&gt;For example, a StyleCop &lt;b&gt;SuppressMessage&lt;/b&gt; attribute placed on a class will suppress the rule for all contents of the class. The same attribute placed on a method will only suppress the rule within the method.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Global Suppressions&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;StyleCop does not support the notion of global suppressions or file-level suppressions. Suppressions must be placed on a code element.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Examples:&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;The following code suppresses the ElementsMustBeDocumented rule for the given class and all its contents:&lt;/p&gt; &lt;font size="2" face="Courier New"&gt;   &lt;p&gt;[SuppressMessage(&amp;quot;Microsoft.StyleCop.CSharp.DocumentationRules&amp;quot;, &amp;quot;SA1600:ElementsMustBeDocumented&amp;quot;)]     &lt;br /&gt;public class MyUndocumentedClass      &lt;br /&gt;{      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; public void MyUndocumentedMethod      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }      &lt;br /&gt;}      &lt;br /&gt;&lt;/p&gt; &lt;/font&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9863459" width="1" height="1"&gt;</description></item><item><title>StyleCop update 4.3.2.1 is released</title><link>http://blogs.msdn.com/b/sourceanalysis/archive/2009/08/10/stylecop-update-4-3-2-1-is-released.aspx</link><pubDate>Mon, 10 Aug 2009 20:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9863412</guid><dc:creator>jasonall</dc:creator><slash:comments>0</slash:comments><description>&lt;P&gt;I am pleased to announce that we’re released another build of StyleCop which includes multiple bugfixes as well as one significant new feature, the ability to insert in-code rule suppressions using the same attribute syntax as FxCop Code Analysis. For more information about rule suppressions, see this blog post: &lt;A href="http://blogs.msdn.com/sourceanalysis/archive/2009/08/10/rule-suppressions.aspx"&gt;http://blogs.msdn.com/sourceanalysis/archive/2009/08/10/rule-suppressions.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;This release also fixes an issue accidently introduced into the last update which caused a bit of annoyance. It’s once again possible to “stack” your using statements such as:&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face="Courier New"&gt;using (Graphics g = this.CreateGraphics()) &lt;BR&gt;using (Form f = new Form()) &lt;BR&gt;using (Class c = new Class()) &lt;BR&gt;{ &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Do stuff &lt;BR&gt;} &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Bugfixes:&lt;/B&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;89: Incorrect requirement to use string.Empty within const variable and field declarations&lt;B&gt;&lt;/B&gt;&lt;/LI&gt;
&lt;LI&gt;125, 217: Support for foreign characters&lt;B&gt;&lt;/B&gt;&lt;/LI&gt;
&lt;LI&gt;138, 139: Sorting issues with using directives&lt;B&gt;&lt;/B&gt;&lt;/LI&gt;
&lt;LI&gt;161: StyleCop incorrectly calculates accessibility of property set accessors and requires incorrect summary text.&lt;B&gt;&lt;/B&gt;&lt;/LI&gt;
&lt;LI&gt;171, 175, 192: Parsing error with complex generic types&lt;B&gt;&lt;/B&gt;&lt;/LI&gt;
&lt;LI&gt;173: Parsing error with fixed size array fields&lt;B&gt;&lt;/B&gt;&lt;/LI&gt;
&lt;LI&gt;184: StyleCop hangs indefinitely analyzing file&lt;B&gt;&lt;/B&gt;&lt;/LI&gt;
&lt;LI&gt;189: Incorrect requirement to use built-in type aliases within using directives&lt;B&gt;&lt;/B&gt;&lt;/LI&gt;
&lt;LI&gt;190: Allow using directives to be “stacked”. Only require curly brackets for the last stacked using directive.&lt;B&gt;&lt;/B&gt;&lt;/LI&gt;
&lt;LI&gt;218: Spacing issue&lt;B&gt;&lt;/B&gt;&lt;/LI&gt;
&lt;LI&gt;Fix for threading issue&lt;B&gt;&lt;/B&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Please upgrade to the new version at your earliest convenience:&lt;/P&gt;
&lt;P&gt;Install link: &lt;A href="https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sourceanalysis&amp;amp;ReleaseId=1425" mce_href="https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sourceanalysis&amp;amp;ReleaseId=1425"&gt;https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sourceanalysis&amp;amp;ReleaseId=1425&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Discussions: &lt;A href="http://code.msdn.microsoft.com/sourceanalysis/Thread/List.aspx" mce_href="http://code.msdn.microsoft.com/sourceanalysis/Thread/List.aspx"&gt;http://code.msdn.microsoft.com/sourceanalysis/Thread/List.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Bugs: &lt;A href="http://code.msdn.microsoft.com/sourceanalysis/WorkItem/List.aspx" mce_href="http://code.msdn.microsoft.com/sourceanalysis/WorkItem/List.aspx"&gt;http://code.msdn.microsoft.com/sourceanalysis/WorkItem/List.aspx&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9863412" width="1" height="1"&gt;</description></item><item><title>StyleCop update 4.3.1.3 is released</title><link>http://blogs.msdn.com/b/sourceanalysis/archive/2009/03/12/stylecop-update-4-3-1-3-is-released.aspx</link><pubDate>Thu, 12 Mar 2009 03:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9471162</guid><dc:creator>jasonall</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;We have just released an update to StyleCop 4.3 which contains a number of bugfixes as 
well as a small number of new features. In particular:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Ability to use &amp;lt;include&amp;gt; tags within Xml header documentation to pull 
docs from external files.&lt;/li&gt;&lt;li&gt;Get accessor in property required to appear before set accessor&lt;/li&gt;&lt;li&gt;.generated.cs files ignored by default&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Bugfixes:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;18: Partial methods not handled correctly 
&lt;/li&gt;&lt;li&gt;31: Documentation rules should understand &amp;lt;include&amp;gt; element 
&lt;/li&gt;&lt;li&gt;56: Require get accessor before set accessor 
&lt;/li&gt;&lt;li&gt;63: When documenting a generic class, only allows &amp;lt;see 
cref="MyClass"/&amp;gt; and not &amp;lt;see cref="MyClass`1"/&amp;gt;. 
&lt;/li&gt;&lt;li&gt;70: Analysis of files in websites crashes Visual studio 2005 and 2008 
&lt;/li&gt;&lt;li&gt;74: SA1623 and SA1624 warnings appears in wrong situations 
&lt;/li&gt;&lt;li&gt;82: 'using' statement does not require curly brackets 
&lt;/li&gt;&lt;li&gt;88: Class without explicit access modifier marked as "public" instead of 
"internal" 
&lt;/li&gt;&lt;li&gt;90: False warning: SA1119: The line contains unnecessary parenthesis 
&lt;/li&gt;&lt;li&gt;93: Ignore .generated.cs files 
&lt;/li&gt;&lt;li&gt;94: Style Cop Crashes With A Blank Definition File 
&lt;/li&gt;&lt;li&gt;95: SA1101 isn't raised in method calls when the return value of the method 
is used. 
&lt;/li&gt;&lt;li&gt;98: VS crashed for webservices. 
&lt;/li&gt;&lt;li&gt;121: False syntax error with a nullable generic type reference. 
&lt;/li&gt;&lt;li&gt;124: LINQ operator "let" cause SA0101 when used with "&lt;a href="http://code.msdn.microsoft.com/sourceanalysis/Wiki/View.aspx?title=condition"&gt;condition&lt;/a&gt; 
? &lt;a href="http://code.msdn.microsoft.com/sourceanalysis/Wiki/View.aspx?title=true"&gt;true&lt;/a&gt; 
: &lt;a href="http://code.msdn.microsoft.com/sourceanalysis/Wiki/View.aspx?title=false"&gt;false&lt;/a&gt;" 
syntax 
&lt;/li&gt;&lt;li&gt;151: False syntax error with a defaulted array. &lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Please upgrade to the new version, especially if you are hit by the crash in 
web projects.&lt;/p&gt;
&lt;p&gt;Install link: &lt;a href="https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sourceanalysis&amp;amp;ReleaseId=1425" title="https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sourceanalysis&amp;amp;ReleaseId=1425"&gt;https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sourceanalysis&amp;amp;ReleaseId=1425&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Discussions: &lt;a href="http://code.msdn.microsoft.com/sourceanalysis/Thread/List.aspx" title="http://code.msdn.microsoft.com/sourceanalysis/Thread/List.aspx"&gt;http://code.msdn.microsoft.com/sourceanalysis/Thread/List.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Bugs: &lt;a href="http://code.msdn.microsoft.com/sourceanalysis/WorkItem/List.aspx" title="http://code.msdn.microsoft.com/sourceanalysis/WorkItem/List.aspx"&gt;http://code.msdn.microsoft.com/sourceanalysis/WorkItem/List.aspx&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9471162" width="1" height="1"&gt;</description></item><item><title>Introducing StyleCop on Legacy Projects</title><link>http://blogs.msdn.com/b/sourceanalysis/archive/2008/11/11/introducing-stylecop-on-legacy-projects.aspx</link><pubDate>Tue, 11 Nov 2008 15:49:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9060140</guid><dc:creator>jasonall</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;A number of people have asked for tips on rolling out StyleCop on a large, pre-existing codebase. This can prove challenging, since the tool will typically generate thousands of violations the first time it is run on existing code. For a large solution, this can make adoption of the tool a bit daunting.&lt;/p&gt;  &lt;p&gt;On the other hand, it is relatively easy to comply with StyleCop when writing new code, especially for developers who are already familiar with the tool.&lt;/p&gt;  &lt;p&gt;In this article I’ll describe a technique for doing a slow, staged rollout of StyleCop over your existing codebase. This technique has been used successfully by multiple teams within Microsoft, allowing them to adopt the tool in a controlled manner without generating a lot of noise up front. The general idea is to &lt;em&gt;enable&lt;/em&gt; the tool for all of your solutions, but &lt;em&gt;disable &lt;/em&gt;the tool from analyzing all pre-existing C# files. This provides the following advantages:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;One day one, StyleCop will not generate any violations against your code, and will have zero measurable impact on your team.&lt;/li&gt;    &lt;li&gt;Each time a new C# file is added to any project in your solutions, StyleCop will begin analyzing the code in that file. This will ensure that code in new files will be compliant from the start. &lt;/li&gt;    &lt;li&gt;Over time, pre-existing files can be slowly cleaned up and introduced to StyleCop one by one. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;This technique will allow your developers to slowly get used to the tool over time, without having to be confronted with thousands of StyleCop violations on day one.&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;The following steps explain how to introduce StyleCop over time, as described above. At this time, this technique is only possible when running StyleCop through MSBuild integration, meaning that StyleCop runs automatically whenever a build is performed.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;1.&lt;/strong&gt; The first step is to enable StyleCop MSBuild integration for each of your existing projects, as described &lt;a title="Build Integration" href="http://blogs.msdn.com/sourceanalysis/pages/source-analysis-msbuild-integration.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;2.&lt;/strong&gt; After StyleCop MSBuild integration has been set up, perform a build and verify that you can see StyleCop violations in the build output.&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;3.&lt;/strong&gt; The next step is to exclude all pre-existing C# files from StyleCop. To do this, each csproj&lt;em&gt; &lt;/em&gt;file must be edited to add an &lt;em&gt;ExcludeFromStyleCop &lt;/em&gt;property for each C# file. Within the csproj files, edit each &lt;em&gt;Compile&lt;/em&gt; tag as shown in the example below:&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;&amp;lt;Compile Include=&amp;quot;File.cs&amp;quot;/&amp;gt;&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;Change this to:&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;&amp;lt;Compile Include=&amp;quot;File.cs&amp;quot;&amp;gt;       &lt;br /&gt;&amp;#160; &amp;lt;ExcludeFromStyleCop&amp;gt;true&amp;lt;/ExcludeFromStyleCop&amp;gt;        &lt;br /&gt;&amp;lt;/Compile&amp;gt;&lt;/em&gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;To make this easy, we have provided a sample tool which can do this for you. To use the tool, download the source code &lt;a title="https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sourceanalysis&amp;amp;ReleaseId=1425" href="https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sourceanalysis&amp;amp;ReleaseId=1425" target="_blank"&gt;here&lt;/a&gt;, and build it in VS. This will produce an EXE called &lt;em&gt;ExcludeStyleCop.exe&lt;/em&gt;. &lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Disclaimers: Keep in mind that this tool is provided as sample source code only, and will edit your project files! It is recommended that you make a copy of your source code before proceeding. This tool is only provided as a sample, and should be used at your own risk!&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;Running the tool with no command-line arguments will cause the tool to recursively find each C# project under the current directory, and add an exclusion tag for every C# file in every project. It is also possible to pass the path to a single csproj file on the command line, in which case the tool will only add exclusion tags for the files in that project.&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;4. &lt;/strong&gt;Finally, perform a clean build and verify that there are no StyleCop violations in the build output. All C# files should be excluded now!&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Whenever a new C# file is introduced to any of these projects, StyleCop will automatically begin to enforce the style of the code in that file each time the project is compiled. As more and more new files are introduced over time, developers will gain familiarity with the StyleCop rules.&lt;/p&gt;  &lt;p&gt;As time allows, developers can clean up pre-existing files by removing the &lt;em&gt;ExcludeFromStyleCop &lt;/em&gt;tag for a file, compiling, and cleaning up the StyleCop violations in that file.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9060140" width="1" height="1"&gt;</description></item><item><title>StyleCop 4.3 SDK</title><link>http://blogs.msdn.com/b/sourceanalysis/archive/2008/08/29/stylecop-4-3-sdk.aspx</link><pubDate>Fri, 29 Aug 2008 10:42:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8904620</guid><dc:creator>jasonall</dc:creator><slash:comments>4</slash:comments><description>&lt;P&gt;The SDK documentation for StyleCop 4.3 is now available for download, here: &lt;A href="https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sourceanalysis&amp;amp;ReleaseId=1425" mce_href="https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sourceanalysis&amp;amp;ReleaseId=1425"&gt;https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sourceanalysis&amp;amp;ReleaseId=1425&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;This documentation explains how to create and install custom StyleCop rules, how to integrate custom settings into the StyleCop settings dialog, and how to create a wrapper for hosting StyleCop in a custom build environment.&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8904620" width="1" height="1"&gt;</description></item></channel></rss>