Code Metrics as Check-in Policy

This is the first in a series of posts around questions I am getting asked related to code metrics. One question that is coming up is: Can a check-in policy be defined based on code metrics in TFS? Well, code metrics itself does not have a check-in policy but fortunately the Maintainability Index, Class Coupling,…

10

FxCop 1.36 Beta Released!

I’m pleased to announce that we’ve released a beta of the next version of FxCop. This release has a number of changes since FxCop 1.35, including, but not limited to, the following: 200+ bug fixes that reduce noise, missing analysis and rule crashes Support for analyzing anonymous methods and lambda expressions New option for skipping…

22

New for Visual Studio 2008 – The ‘Analyze’ menu

While Ian Huff has already talked about the new ‘Developer’ menu that has been added to Visual Studio 2008, I thought I would briefly mention some of the changes to it that were made between Beta 2 and RTM. For those that have yet to see this menu, similar to the existing Test menu, we’ve…

6

New for Visual Studio 2008 – Support for anonymous methods and lambda expressions

One of my favorite new features for Code Analysis in Visual Studio 2008 is our support for analyzing anonymous methods and lambda expressions. While anonymous methods have been around in C# since Visual Studio 2005, lambda expressions are new for both C# and Visual Basic in Visual Studio 2008. For those that are already familiar…

13

New for Visual Studio 2008 – Code Analysis Policy improvements

One not very well known feature that lights up when connected to a Team Foundation Server, is the ability to enforce that Code Analysis be run before every check-in. Called a Code Analysis Policy, this feature allows your team to find and fix Code Analysis warnings earlier in the product cycle rather than later, where…

11

New for Visual Studio 2008 – Custom Dictionaries

Once you turn on the new spelling rules that we’ve added to Visual Studio 2008, you will want to start to customize the words that it fires on; this is where the new custom dictionary support comes in. A custom dictionary in its basic form, similar to the concept in Microsoft Word, allows you to silence the…

11

New for Visual Studio 2008 – Spelling rules

Surprisingly, one the biggest requests for Code Analysis in Visual Studio 2005 was to include the spelling rules that shipped with the FxCop standalone. We had Microsoft consultants tell us that they actually had trouble moving some customers from FxCop to Code Analysis because they were not included. Apparently teams care about spelling. 🙂 Well,…

13

What rules do Microsoft have turned on internally?

I’ve recently received a few requests asking about the Code Analysis rules we run internally against Microsoft’s own code. While it might come as a surprise, we do not actually run every single rule against our own binaries. There are many reasons for this: Applicability. Not every rule is applicable to every project, for example, the…

22

$(CodeAnalysisTreatWarningsAsErrors) MSBuild property

For Visual Studio 2008, we have added a new MSBuild property that allows you to easily treat all Code Analysis warnings as build errors. This can be useful for example, if you want to force that any firing of a Code Analysis rule to break the build during a nightly Team Build without needing to individually set this for every…

2

Come chat with the Code Analysis team (and Team System) team – tomorrow

Join members of the Visual Studio Team System product group to discuss features available in Visual Studio Team Foundation Server, Architecture Edition, Development Edition, Database Edition, and Test Edition. In addition, discuss what’s new in Visual Studio 2008 Beta 2. We will be holding two sessions: Join the chat on Wednesday, August 1st , 2007 from 10:00am -…

1