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

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

What’s In The New Version Of FxCop [Michael Fanning]

As mentioned in previous blog and bulletin board posts, we’re in the final weeks of testing a new update to FxCop. This is a very significant update and I thought I’d post some information on what to expect in the release.   No more locks on assemblies or pdbs   FxCop uses a new, thread-safe,…

36

FAQ: Why does FxCop warn against catch(Exception)? – Part 2 [Nick Guerrera]

This is the second installment in a three-part series on why FxCop warns against catch(Exception):FAQ: Why does FxCop warn against catch(Exception)? – Part 1FAQ: Why does FxCop warn against catch(Exception)? – Part 2FAQ: Why does FxCop warn against catch(Exception)? – Part 3 On Wednesday, I explained why catch (Exception) is a bad idea, and many of you replied with interesting…

28

FAQ: Why does FxCop warn against catch(Exception)? – Part 1 [Nick Guerrera]

This is the first installment in a three-part series on why FxCop warns against catch(Exception):FAQ: Why does FxCop warn against catch(Exception)? – Part 1FAQ: Why does FxCop warn against catch(Exception)? – Part 2FAQ: Why does FxCop warn against catch(Exception)? – Part 3 This question comes up a lot, and I think there’s a lot of confusion and controversy about the rule….

26

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

FAQ: Why does FxCop warn against catch(Exception)? – Part 3 [Nick Guerrera]

This is the third installment in a three-part series on why FxCop warns against catch(Exception):FAQ: Why does FxCop warn against catch(Exception)? – Part 1FAQ: Why does FxCop warn against catch(Exception)? – Part 2FAQ: Why does FxCop warn against catch(Exception)? – Part 3 I said from the beginning that this issue is controversial, and some of your feedback certainly confirms that….

22

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

FAQ: How do I integrate custom rules with Visual Studio? [David Kean]

Update: To have rules target both Visual Studio and FxCop, see the following entry: FAQ: Can I create custom rules that target both Visual Studio and FxCop?   Although not officially supported or documented, the Managed Code Analysis (FxCop) feature available with Visual Studio Team System comes with a rich API for writing custom rules.   There…

17

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