Fun with Code Analysis Rule Sets

Two weeks ago, I introduced you to Visual Studio 2010 September ’08 CTP (Community Technology Preview). This CTP is available as a Virtual PC (VPC) image which can be downloaded at http://go.microsoft.com/fwlink/?LinkId=129231. The goal of the Community Technology Preview is to obtain feedback from our customers on the new scenarios we have enabled.  If you…

5

FAQ: How do I prevent FxCop 1.36 from firing warnings against generated code?

I’ve upgraded from FxCop 1.35 to 1.36 and now FxCop has started to fire warnings against typed DataSets and other generated code. How do I turn this off? The reason this is occurring is because we changed the way that FxCop analyzed generated code. Whereas previously in 1.35, FxCop would only ignore particular generated code…

6

Tutorial on writing your own Code Analysis rule

Jason Kresowaty has posted a great tutorial on writing Code Analysis/FxCop rules. He also spends time on explaining parts of the Introspection API, including the different nodes and their relationship to each other. It’s a great read, even if you’ve written some Code Analysis rules before. Definitely recommended.

4

What do you want to see in the second edition of Framework Design Guidelines?

Krzysztof and Brad have announced they are working on the second edition of the awesome Framework Design Guidelines and are looking for feedback on what they should put in it. For those that don’t know, a lot of our Code Analysis rules are based on the writings in this great book, so expect to see…

9

FAQ: Which Code Analysis rules shipped in which version?

In response to a lot of recent requests, we’ve put together a complete list of rules that shipped in the different versions of Visual Studio Code Analysis and FxCop. Attached is an Excel worksheet providing this information for Visual Studio 2005, Visual Studio 2008, FxCop 1.35 and FxCop 1.36 Beta. One of things you’ll notice…

11

Reporting Code Analysis Defect Counts

Code analysis defect counts are available in the cube that is part of the TFS Data Warehouse. This post shows you how to hook up Excel to show code analysis counts in a pivot table. First off you need to connect Excel up to the data warehouse that has the data. Under the Data tab…

10

Come chat with the Code Analysis team tomorrow

Join members of the Visual Studio Team System product group to discuss features available in Team Foundation Server, Team Suite, Architecture Edition, Development Edition, Database Edition, and Test Edition. In addition, discuss what’s new for these editions for Visual Studio 2008. We will be holding two sessions: Join the chat on Wednesday, December 5th, 2007…

1

Try the Code Analysis Rule Sets Feature in the November "Rosario" November 2007 CTP

We have a great new feature that we are previewing in Microsoft® Visual Studio® Team System code name “Rosario” November 2007 CTP.  This feature allows you to select pre-defined sets of rules to configure code analysis as well as define your own.  To access this feature right click on a project and choose "Properties" then…

2

Maintainability Index Range and Meaning

Another question: The maintainability index has been re-set to lie between 0 and 100.  How and why was this done? The metric originally was calculated as follows: Maintainability Index = 171 – 5.2 * ln(Halstead Volume) – 0.23 * (Cyclomatic Complexity) – 16.2 * ln(Lines of Code) This meant that it ranged from 171 to…

17