It is a command line tool to calculate Hits-of-Code metric in a source code repository (at the moment we support Git 2+ and Subversion 1.7+). You can read more about Hits-of-Code metric in this blog post: Hits-of-Code Instead of SLoC.
Install it first:
$ gem install hoc
Run it locally and read its output:
$ hoc --help
For Subversion statistics you must have diffstat installed.
If you have any questions about the tool, or something doesn't work as expected, please submit an issue here.
How to contribute?
Fork the repository, make changes, submit a pull request.
We promise to review your changes same day and apply to
master branch, if they look correct.
Please run Rake build before submitting a pull request (make sure you have bundler installed):
$ bundle install $ rake
Make sure you're using Ruby 2.0+.