Home

SourceMonitor

[Click to print this article]

Copper Mountain in summer

From a post by Dan Miser, I came across SourceMonitor, a rather remarkable tool for developers. It calculates various metrics for source code in various languages, the most important languages for me being C#, Delphi and Java. The breadth of metrics is pretty good too, here the important one for me being cyclomatic complexity. It slices and dices, it's fast, and most impressively of all, it's free.

It gathers some nifty metrics for each source file and displays them in a nice table (with the usual sortable, resizeable columns).

SourceMonitor summary table

Let's see, for each source file it tells you:

You can then select a particular source file in the table and display another window that shows more detailed metrics.

SourceMonitor detail table

This new window shows the same metrics as the table did for the selected source file, but also shows you some more:

Coupled with all this information, you can also rescan your source code as you maintain and refactor it and then you can show trends on how you're doing within the project along the various axes. Double sweet.

I'm definitely going to be using this tool in the future. Well recommended.