A command-line tool written in C# that automatically generates checkpoints for the SourceMonitor software.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



SourceMonitor is an interesting code metrics analyzer for several different programming languages. It is developed by Jim Wanner, and its homepage can be found at the Campwood software website.

This repository contains a simple tool written in C# that automates the generation of SourceMonitor project checkpoints for each commit in a git repository.

For an example, see a screenshot of a SourceMonitor project generated using this tool from the juj/MathGeoLib repository.


To create a .smproj file containing the commits for your git repository, do the following:

  1. Build the command-line tool. I provide .sln and .csproj for Visual Studio 2010. Setting up a build for Mono should be easy'ish, since the whole tool is only ~150 lines in a single file.
  2. Add the executable to your path (or invoke using the full path on the command line).
  3. Open up command line, and browse to the git repository you want to process.
  4. Make sure you do not have any uncommitted modifications in the working tree, since the tool needs to check out each commit in turn!
  5. Run GitSourceMonitor "branchname" "outputfilename.smproj", where branchname tells the git branch to process, and outputfilename.smproj specifies the SourceMonitor project file to output.
  6. Done. After the tool finishes, you can open the .smproj file in SourceMonitor.

GitSourceMonitor can do incremental updates to the .smproj file, which means that after you make new commits to the repository, you can re-run the tool (step 5 with same input parameters) to incrementally add the new commits at the end of the project.


The source code in this repository is released to public domain. Feel free to take it for whatever purposes.

The SourceMonitor tool is copyright of Campwood Software. See the SourceMonitor website for its licensing information.