<?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>Seen any Microsoft produced code that doesn't pass Code Analysis/FxCop? [David Kean]</title><link>http://blogs.msdn.com/fxcop/archive/2006/04/11/WeWantYourFeedback.aspx</link><description>As some of you may already know, the majority of the Developer Division is currently planning features to be included in the next version of Visual Studio (Orcas). As part of this planning phase, the Managed Code Analysis (FxCop) team is beginning to</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>The Managed Code Analysis (FxCop) team wants your feedback!</title><link>http://blogs.msdn.com/fxcop/archive/2006/04/11/WeWantYourFeedback.aspx#574684</link><pubDate>Wed, 12 Apr 2006 08:12:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:574684</guid><dc:creator>Managed from down under</dc:creator><description /></item><item><title>re: The Managed Code Analysis (FxCop) team wants your feedback! [David Kean]</title><link>http://blogs.msdn.com/fxcop/archive/2006/04/11/WeWantYourFeedback.aspx#574717</link><pubDate>Wed, 12 Apr 2006 09:53:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:574717</guid><dc:creator>Aaron</dc:creator><description>FxCop doesn't pass fxcop :P</description></item><item><title>re: The Managed Code Analysis (FxCop) team wants your feedback! [David Kean]</title><link>http://blogs.msdn.com/fxcop/archive/2006/04/11/WeWantYourFeedback.aspx#574855</link><pubDate>Wed, 12 Apr 2006 15:19:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:574855</guid><dc:creator>John Bledsoe</dc:creator><description>This case may be the kind of thing that you're looking for, and it relates to FxCop, so it seems like a fit. &lt;br&gt;&lt;br&gt;I have a class that has a DbDataAdapter as a public property. Per the MSDN Property Naming Guidelines, I gave the property the same name as its underlying type, DbDataAdapter. However, when I run FxCop against my class library, it gives me a SortAcronymsShouldBeUppercase warning, saying that I should call the property DBDataAdapter (uppercase &amp;quot;B&amp;quot;). Of course I won't do that, since that would make my property definition: &lt;br&gt;&lt;br&gt;public DbDataAdapter DBDataAdapter { . . . } &lt;br&gt;&lt;br&gt;The information in the message even states: &lt;br&gt;&lt;br&gt;&amp;quot;For example, 'DbConnection', is common but incorrect; use DBConnection.&amp;quot; &lt;br&gt;&lt;br&gt;Common? I'll say! It's baked right into the framework! In any case, I ignored the message and wasn't really concerned, but since you're asking, here you go! &lt;br&gt;</description></item><item><title>What public Microsoft code doesn't cut it with FxCop?</title><link>http://blogs.msdn.com/fxcop/archive/2006/04/11/WeWantYourFeedback.aspx#574856</link><pubDate>Wed, 12 Apr 2006 15:21:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:574856</guid><dc:creator>notgartner.com: Mitch Denny's Blog</dc:creator><description /></item><item><title>re: The Managed Code Analysis (FxCop) team wants your feedback! [David Kean]</title><link>http://blogs.msdn.com/fxcop/archive/2006/04/11/WeWantYourFeedback.aspx#574903</link><pubDate>Wed, 12 Apr 2006 16:48:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:574903</guid><dc:creator>David M. Kean</dc:creator><description>Aaron: As part of our checkin tests we actually have to be clean on FxCop. The only assembly as it stands in 1.35 that doesn't pass is Microsoft.Cci.dll, which is owned by another team, however, this will be clean in future versions. &lt;BR&gt;&lt;BR&gt;John: This is by design. The System.Data team got it wrong. However, for consistancy, you may choose to suppress it.</description></item><item><title>Any suggestions for the new FxCop are welcome</title><link>http://blogs.msdn.com/fxcop/archive/2006/04/11/WeWantYourFeedback.aspx#574958</link><pubDate>Wed, 12 Apr 2006 17:26:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:574958</guid><dc:creator>Jan Schreuder on .Net</dc:creator><description>The Managed Code Analysis (FxCop) team are&amp;amp;amp;nbsp;working with other teams around Microsoft to ensure that...</description></item><item><title>re: Seen any Microsoft produced code that doesn't pass Code Analysis/FxCop? [David Kean]</title><link>http://blogs.msdn.com/fxcop/archive/2006/04/11/WeWantYourFeedback.aspx#576291</link><pubDate>Fri, 14 Apr 2006 10:33:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:576291</guid><dc:creator>Obiwan Jacobi</dc:creator><description>I like FxCop to recognize the construct of having an internal Guard/Check class to validate incoming method parameters. If I have code like:&lt;br&gt;&lt;br&gt;public void Method(string name)&lt;br&gt;{&lt;br&gt; &amp;nbsp;Guard.ThrowIfArgumentNull(name, &amp;quot;name&amp;quot;);&lt;br&gt;&lt;br&gt; &amp;nbsp;// use the name parameter here&lt;br&gt;}&lt;br&gt;&lt;br&gt;the current FxCop (vs2005) says I need to check the parameter of the public method (which is great).&lt;br&gt;&lt;br&gt;I would like to be able to tell FxCop how I've taken care of parameter checking in my app; maybe have a FxCop code Attribute (similar to the SuppressMessageAttribute) that marks my class (Guard) or method (ThrowIfArgumentNull) as an implementation of one of the rules.&lt;br&gt;&lt;br&gt;That would be great ;-)&lt;br&gt;&lt;br&gt;Thanx,&lt;br&gt;Marc Jacobi</description></item><item><title>re: Seen any Microsoft produced code that doesn't pass Code Analysis/FxCop? [David Kean]</title><link>http://blogs.msdn.com/fxcop/archive/2006/04/11/WeWantYourFeedback.aspx#576357</link><pubDate>Fri, 14 Apr 2006 15:12:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:576357</guid><dc:creator>Mads Kristensen</dc:creator><description>A rule in FxCop says that static methods on a Generic class should be avoided with no exceptions due to the way that method gets called. That's just wrong. &lt;br&gt;&lt;br&gt;I have a Generic base class like this:&lt;br&gt;public abstract class Foo&amp;lt;T&amp;gt;&lt;br&gt;&lt;br&gt;With a static method like this:&lt;br&gt;public static T Load(T instance, Guid id)&lt;br&gt;&lt;br&gt;FxCop gives me an error on the static method because when you call it, you have to declare the T-type. That is not the case. Here's how it is called:&lt;br&gt;&lt;br&gt;FooBar f = FooBar.Load(instance, id)&lt;br&gt;&lt;br&gt;The rule simply isn't true in this scenario and should be changed.</description></item><item><title>re: Seen any Microsoft produced code that doesn't pass Code Analysis/FxCop? [David Kean]</title><link>http://blogs.msdn.com/fxcop/archive/2006/04/11/WeWantYourFeedback.aspx#577684</link><pubDate>Mon, 17 Apr 2006 21:29:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:577684</guid><dc:creator>asdfasdf</dc:creator><description>when you run xsd on the xml schema for reporting services at &lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/fxcop/archive/2006/04/11/WeWantYourFeedback.aspx"&gt;http://blogs.msdn.com/fxcop/archive/2006/04/11/WeWantYourFeedback.aspx&lt;/a&gt; the output is not clean</description></item><item><title>FxCop Example Code fails?</title><link>http://blogs.msdn.com/fxcop/archive/2006/04/11/WeWantYourFeedback.aspx#589458</link><pubDate>Thu, 04 May 2006 00:41:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:589458</guid><dc:creator>Sri</dc:creator><description>FxCop 1.32&lt;br&gt;FxCop Build 50628.0&lt;br&gt;&lt;br&gt;&lt;br&gt;Example code from&lt;br&gt;Override methods on comparable types&lt;br&gt;&lt;br&gt;public static bool operator == (RatingInformation r1, RatingInformation r2)&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return r1.Equals(r2);&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;} &amp;nbsp;&lt;br&gt;&lt;br&gt;Will throw&lt;br&gt;ValidateArgumentsOfPublicMethods&lt;br&gt;&lt;br&gt;</description></item><item><title>re: Seen any Microsoft produced code that doesn't pass Code Analysis/FxCop? [David Kean]</title><link>http://blogs.msdn.com/fxcop/archive/2006/04/11/WeWantYourFeedback.aspx#596846</link><pubDate>Sat, 13 May 2006 13:47:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:596846</guid><dc:creator>seanf</dc:creator><description>The following wizard generated code has many CA warnings:&lt;br&gt;&lt;br&gt;1) Create a new Visual Studio AddIn. &lt;br&gt;&lt;br&gt;2) Create a new WCF service reference.&lt;br&gt;&lt;br&gt;Using VS 2005 with WinFX Feb CTP.&lt;br&gt;</description></item><item><title>re: Seen any Microsoft produced code that doesn't pass Code Analysis/FxCop? [David Kean]</title><link>http://blogs.msdn.com/fxcop/archive/2006/04/11/WeWantYourFeedback.aspx#604812</link><pubDate>Tue, 23 May 2006 18:20:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:604812</guid><dc:creator>Jonathan Allen</dc:creator><description>The vb code snippit for a new exception class inherits from ApplicationException instead of Exception.&lt;br&gt;&lt;br&gt;</description></item><item><title>re: Seen any Microsoft produced code that doesn't pass Code Analysis/FxCop? [David Kean]</title><link>http://blogs.msdn.com/fxcop/archive/2006/04/11/WeWantYourFeedback.aspx#604982</link><pubDate>Tue, 23 May 2006 20:46:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:604982</guid><dc:creator>Sri</dc:creator><description>VS2003&lt;br&gt;&lt;br&gt;Create a new web app.&lt;br&gt;&lt;br&gt;Default Global.asax.cs generated doesn't pass code analysis.&lt;br&gt;&lt;br&gt;</description></item><item><title>re: Seen any Microsoft produced code that doesn't pass Code Analysis/FxCop? [David Kean]</title><link>http://blogs.msdn.com/fxcop/archive/2006/04/11/WeWantYourFeedback.aspx#613051</link><pubDate>Thu, 01 Jun 2006 18:55:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:613051</guid><dc:creator>Amit Weisman</dc:creator><description>Hi , &lt;br&gt;I was reading this article &amp;quot;Exception Management Architecture Guide” (&lt;a rel="nofollow" target="_new" href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/exceptdotnet.asp"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/exceptdotnet.asp&lt;/a&gt;) and stumbled across two issues : &lt;br&gt;1. The example code violates this rule (&lt;a rel="nofollow" target="_new" href="http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=1.35&amp;amp;url=/Design/ValidateArgumentsOfPublicMethods.html"&gt;http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=1.35&amp;amp;url=/Design/ValidateArgumentsOfPublicMethods.html&lt;/a&gt;) , page 9 , the parameter “info” is not checked. &lt;br&gt;2. There is a clash between this rule (&lt;a rel="nofollow" target="_new" href="http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=1.35&amp;amp;url=/Design/TypesShouldNotExtendCertainBaseTypes.html"&gt;http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=1.35&amp;amp;url=/Design/TypesShouldNotExtendCertainBaseTypes.html&lt;/a&gt;) and the purpose of the applicationexception class as described in this article. If I understood correctly this class supposed to be the base class for all the specific application exceptions, so the violating the rule is a “must”. &lt;br&gt;&lt;br&gt;Thanks &lt;br&gt;I’m using fxcop and enjoying it. &lt;br&gt;Amit &lt;br&gt;</description></item><item><title>re: Seen any Microsoft produced code that doesn't pass Code Analysis/FxCop? [David Kean]</title><link>http://blogs.msdn.com/fxcop/archive/2006/04/11/WeWantYourFeedback.aspx#619073</link><pubDate>Tue, 06 Jun 2006 17:34:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:619073</guid><dc:creator>GBtG</dc:creator><description>This came up in our development recently. &amp;nbsp;In VB.NET (under VS.NET 2003), follow these steps:&lt;br&gt;&lt;br&gt;1) Create a class that inherits from a Framework class (e.g. System.Web.UI.Control).&lt;br&gt;2) Add some read-write properties. &amp;nbsp;Notice that the &amp;quot;Value&amp;quot; parameter of the &amp;quot;Set&amp;quot; portion of the property starts with an upper-case &amp;quot;V&amp;quot;. &amp;nbsp;Violation of CA1709, although FxCop doesn't seem to care...&lt;br&gt;3) Now override an existing read-write property on the base class (e.g. Control.Visible). &amp;nbsp;Again notice the incorrect casing of the &amp;quot;Set&amp;quot; portion of the property.&lt;br&gt;4) FxCop reports a violation of CA1725 for &amp;quot;renaming&amp;quot; the &amp;quot;value&amp;quot; parameter of the base-class property.&lt;br&gt;</description></item><item><title>re: Seen any Microsoft produced code that doesn't pass Code Analysis/FxCop? [David Kean]</title><link>http://blogs.msdn.com/fxcop/archive/2006/04/11/WeWantYourFeedback.aspx#619090</link><pubDate>Tue, 06 Jun 2006 17:56:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:619090</guid><dc:creator>David M. Kean</dc:creator><description>GBtG: The first issue is by-design, we ignore the casing of property parameters because no one actually sees the parameter.&lt;br&gt;&lt;br&gt;The second issue has been resolved in the latest build of FxCop.&lt;br&gt;&lt;br&gt;Thanks for the great feedback!&lt;br&gt;&lt;br&gt;Regards&lt;br&gt;&lt;br&gt;David</description></item></channel></rss>