Overview of MSBuildCodeMetricsMSBuildCodeMetrics

MSBuildCodeMetrics provide a task in MSBuild called CodeMetrics. This task has an extensible behavior. You can create your own code metrics provider to supply different metrics, sharing the same task syntax and reportas

The reports provided in this release of MSBuildCodeMetrics are very simple but useful. You can create show a detailed report and a summary report.

Detailed Report

This report supply each and every measure. For example, if you're using CountFilesByExtension, this report show you each extension and how much files you have.

For cyclomatic complexity (Visual Studio), you'll have one line for each method.

This report will allways show the information ordered by value descending, in other words, the extensions with more ocurrences will appear first and the methods with greater cyclomatic complexity too.

Summary report

When handling big repositories (in the order of million LOC), it's very hard to handle detailed metrics.

The summary report, allows you to set up ranges to see how many measures you for each range.

Using the same example above, if you set ranges for 1000 and 500, this report will tell you how many extension group's has more than 1000 files, between 1000 and 500 and below 500.

The same logic is used for other measures. This can help you find how many methods has more than 30 in cyclomatic complexity