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

Positioning Code Metrics to Management

Another question that is coming up is: How can (or should) code metrics be presented to management ? My view is that in all cases the metrics are something that can help make decisions around focus and prioritization. Management should be made aware of the metrics and what they mean to allow them to decide…

6

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

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

Code Metrics Customization

A number of people have asked: Is there a way to customize the existing code metrics or add additional ones? The simple answer at this time is No.  There are no extension points or customizations available at this time for code metrics.  This feature was added late in the cycle for VS 2008 and we…

10

New for Visual Studio 2008 – Code Metrics

While we’ve already briefly spoken about Code Metrics when we announced it, I thought I would discuss it in a little more depth, in particular the metrics it provides. As mentioned previously, Code Metrics is a new tool window that helps users find and act upon complex and unmaintainable areas within an application. The following…

39

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

Code Analysis (Team System) Chat Roundup

We had two great chats last Friday. Thank-you to all that attended, I had a lot of fun. The following is a list of Code Analysis questions that were asked: Code Metrics   DavidKean_MS (Moderator):Q: JeffBe: I’m very interested in the code metrics, are these integrated into build reports though? We’d like to be able…

2

Correct usage of the CompilerGeneratedAttribute and the GeneratedCodeAttribute

Both Code Analysis, FxCop and Code Metrics make extensive use of CompilerGeneratedAttribute and GeneratedCodeAttribute to distinguish between user-written code and tool and compiler generated code. The following describes this behavior: Code Analysis in Visual Studio 2005 and FxCop 1.35 – Compiler Generated. Does not raise warnings against compiler generated code. Uses an algorithm (mainly based on the…

8

Announcing Visual Studio Code Metrics!

Announcing the new Code Metrics feature for Visual Studio ‘Orcas’! Available in Visual Studio Team Developer and Team Suite, this new feature allows users to generate code metrics for projects and solutions and displays the results in the Code Metrics Results tool window: As you can see above, this feature currently calculates five different metrics; Maintainability…

57