https://github.com/yegor256/hoc
Hits-of-Code Command Line Calculator, for Git and Subversion
https://github.com/yegor256/hoc
command-line-tool git hits-of-code metrics ruby subversion
Last synced: 8 months ago
JSON representation
Hits-of-Code Command Line Calculator, for Git and Subversion
- Host: GitHub
- URL: https://github.com/yegor256/hoc
- Owner: yegor256
- License: mit
- Created: 2014-11-11T06:48:08.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2024-05-22T12:43:08.000Z (over 1 year ago)
- Last Synced: 2024-05-22T13:55:21.356Z (over 1 year ago)
- Topics: command-line-tool, git, hits-of-code, metrics, ruby, subversion
- Language: Ruby
- Homepage: https://www.yegor256.com/2014/11/14/hits-of-code.html
- Size: 180 KB
- Stars: 61
- Watchers: 11
- Forks: 12
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[](https://www.elegantobjects.org)
[](http://www.rultor.com/p/yegor256/hoc)
[](https://www.jetbrains.com/ruby/)
[](https://github.com/yegor256/hoc/actions/workflows/rake.yml)
[](http://badge.fury.io/rb/hoc)
[](https://codeclimate.com/github/yegor256/hoc/maintainability)
[](https://codecov.io/github/yegor256/hoc?branch=master)
[](https://hitsofcode.com/view/github/yegor256/hoc)
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](http://www.yegor256.com/2014/11/14/hits-of-code.html).
You can also use [hitsofcode.com](https://hitsofcode.com) by
[Valentin Brandl](https://www.vbrandl.net/), if you want to have a badge
in your repo.
Install it first:
```bash
$ gem install hoc
```
Run it locally and read its output:
```bash
$ hoc --help
```
For Subversion statistics you must have
[diffstat](http://sourceforge.net/projects/mingw/files/MSYS/Extension/diffstat/)
installed.
## How to contribute
Read [these guidelines](https://www.yegor256.com/2014/04/15/github-guidelines.html).
Make sure your build is green before you contribute
your pull request. You will need to have [Ruby](https://www.ruby-lang.org/en/) 2.3+ and
[Bundler](https://bundler.io/) installed. Then:
```
$ bundle update
$ bundle exec rake
```
If it's clean and you don't see any error messages, submit your pull request.