Support for OhCount summaries and charts
|Reported by:||Olaf Meeuwissen <olaf@…>||Owned by:|
I wanted to see line code counts for all of a project's source. In addition, I wanted to see per language counts. Ohloh's ohcount can do that but there was no Bitten ohcount recipe command yet so I put one together. The result is in ohcount.diff.
Be warned that this is my first real attempt at Python programming, my first time using SQL, I have no idea how this charting stuff works and that I know no Ruby whatsoever. Feel free to rip up the patch.
To use this, you need to add to your recipe (preferably immediately after the checkout) something like:
<src:ohcount paths="bitten" verbose="True" />
This puts the summary produced by running ohcount on all the files in the bitten directory in the Log. Using the default verbose="False", will suppress the summary in the Log. The default value for paths will start at the top-level of the checkout. A Line Count tab on each build page will present a tabular summary of the code counts.
There are two charts. One shows a grand total and the total number of source, comment and whitespace lines over time. The other shows per language grand totals.