Showing posts with label Crap4Net. Show all posts
Showing posts with label Crap4Net. Show all posts

Tuesday, 8 February 2011

Exporting Code Metrics VS 2010

At last Microsoft released a Power-Tool to enable generating Visual Studio 2010 code metrics analysis using a command line.

the tool can be downloaded from here:

Visual Studio Code Metrics PowerTool 10.0

The output is stored into an XML file which is than can be processed to generate a nice visible report.

Next steps would be to create an xsl that can be used by various build servers (like cc.net).

and integrate this into the crap4Net tool so it can process that format.

This is going to be be useful.

Sunday, 18 October 2009

More Information about C.R.A.P

More details about the usage of C.R.A.P and what C.R.A.P is all about can be found in the following links:

  1. Metrics of Moment
  2. Clean Code and Battle Scarred Architecture
  3. Alberto Savoia talks shop about C.R.A.P.

Crap4Net

Measuring code quality is a tricky business at best. More then a few attempts has been made over the years however still a single solution has yet to emerge. The C.R.A.P metric has been born a few years ago and tries to combine code complexity along with Code coverage to indicate (to some extent) the quality of a given piece of code. There’s much more to say about the C.R.A.P metric which ill leave for the experts . I will say however that more information can be gathered in the Crap4J website.

Over the last weeks I have been working on creating the Crap$Net project. The Idea is to bring the C.R.a.P metric into the world of .NET development by supporting the various tools used in this world.

I am happy to say I managed to wrap this effort into an open source project which was published today over at CodePlex, you can view the project home page here.

For now the tool is able to take the resulting xml reports generated for Code coverage and for Cyclomatic Complexity and generate a single XMl containing the C.R.A.P data. nothing too fancy but for starter this should do. the tool currently supports Coverage data generated by PartCover or by MsTest internal coverage tool . Cyclomatic Complexity data is generated by using the Code Metric add-in of Reflector. What was important to me is the ability to take this tool and plug it into a continuous build cycle and less the visibility of the data.

Future plans span two mains directions, the first is to include support of other coverage tools (if you have any preferences please leave me a comment) and if needed other formats of Cyclomatic Complexity reports. the second is to add some more fancy reporting which will include a basic html summary and maybe even some more stats on the underlying code.

So if you ever wondered how Crappy is your code, done wonder just download and get an answer.

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Walgreens Printable Coupons