busfactor
, (*1)
busfactor generates a coverage report indicating how much each contributor worked on each file of a git repo.
It helps pinpoint part of the code that are poorly maintained/known by the teams working on it., (*2)
, (*3)
If someone gets hit by a bus, some files may become more difficult to maintain further., (*4)
It was inspired by a GoogleIO talk given by Brian Fitzpatrick, Ben Collins-Sussman,
The Myth of the Genius Programmer., (*5)
Installation
With composer
composer global require "dav-m85/busfactor=0.2.*"
Make sure your global composer folder is in your PATH., (*6)
By cloning the repo
git clone http://github.com/dav-m85/busfactor.git
cd busfactor
composer install
As a dependency in another composer project
Add the following to your composer.json, (*7)
{
"require-dev": {
"dav-m85/busfactor": "0.2.*"
}
}
Then in your project folder:, (*8)
composer install
Usage
Given you have a repository my/git/repository
, you can generate a report with following command
(output/parent/folder
has to be writeable):, (*9)
busfactor generate my/git/repository output/parent/folder
Then open output/parent/folder/index.html
with your browser., (*10)
If you don't specify an output folder, the report will automatically be generated to out/
folder relative to
busfactor file., (*11)
If you intend to serve generated files, specify an asset-url options like this:, (*12)
busfactor generate my/git/repository output/parent/folder --asset-url http://example.com/root/path
Contributing
You can contribute in various ways:, (*13)
Report bugs in the project issues section.
Please make sure you know how to report one, general understanding of
this document may help ;), (*14)
You want to fix a bug? Take an issue or fill one, assign yourself on it and when done, submit a Pull Request. I'll do
my best to read it in a timely fashion and approve it., (*15)
Note that this project is following Semantic Versioning 2.0.0., (*16)
You like this project? Fork it, star it, talk about it!, (*17)
Testing
Tests use PHPUnit.
Simply run the following command in busfactor project directory:, (*18)
vendor/bin/phpunit
Credits
Maintainer: dav-m85, (*19)
Contributors: Triiistan, you?, (*20)
License
busfactor is released under the MIT license.
A copy can be found inside the project here, or at http://opensource.org/licenses/mit-license.php, (*21)
- https://github.com/lafourchette/gitmirror (Repository class was borrowed from this project)