Using the Code Metrics tool

Peli has created an amazing number of tools to assist with the job of tracking down and stomping on defects.  One of the ones that I use the most are his Reflector add-ins:

    http://projectdistributor.net/Projects/Project.aspx?projectId=42

In that bundle of goodies there's an add-in called Code Metrics.  When you run the Code Metrics tool over an assembly you get a great deal of informational data about the code.

Currently I've integrated this data into our code review process.  Basically, when code is submitted for review, you can run the Code Metrics tool over that section of code and save the output as an Xml file to disk.  Once you have that, you can open the file in Excel using the XML Source task pane to work with the data.  Then, you drag the nodes that you are interested in out onto the worksheet and use filters to query your data.  I save this Excel spreadsheet into the root folder for that review so that the reviewers can use it as a guide for areas to hone in on in the review.

No Comments