Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running code metrics in builds for TFS 2012

How do I get metrics to run with my builds in TFS 2012?

I have not seen any solutions for Code Metrics inside of TFS 2012. Microsoft's Metrics tool appears to only work with TFS 2010. The main things I am looking for are the very things that Microsoft's tool used to return.

like image 324
Jonathan Nixon Avatar asked Nov 13 '22 17:11

Jonathan Nixon


1 Answers

Code Metrics for both Visual Studio 2005, 2008, 2010 and 2012 are pretty much the same. You can access them from the 'Analysis" menu in Visual Studio and they give you a view on your code to help you identify specific thing you might want to fix.

This has never been available as part of an automated build and really makes no sense there as they are interpretive and not descriptive. Just because you have a high Cyclomatic complexity does not mean your code is bad.

More info: http://msdn.microsoft.com/en-us/library/bb385911.aspx

It may be useful for you to explain what you are trying to achieve so that I can better point you to a solution.

  • What value are you trying to achieve?

There does seem to be a CodeMetric build activity as part of the Community TFS Build Extensions but I am not sure if it does what you want.

like image 137
MrHinsh - Martin Hinshelwood Avatar answered Dec 23 '22 08:12

MrHinsh - Martin Hinshelwood