Php Blame Code Coverage (PhpBCC)

Build Status Coverage Status Latest Stable Version License

A tool that consumes a code coverage report and uses the version control history to report metrics on uncovered code by author.

What is this and how can I benefit?

What this is NOT?

Installation -

Global installation:

composer global require phpbcc/phpbcc

Local/project installation:

composer require-dev phpbcc/phpbcc

or manually add it to the require-dev section of your composer file.

{
    "require-dev"   : {
        "phpbcc/phpbcc": "*"
    }
}

Usage

> phpbcc --output-format=author reports/clover.xml

Sample Output

phpbcc version 1.0.0 by Chris Halbert

PHP BLAME CODE COVERAGE                                                UNCOVERED OBJECTS (#/total) %

Chris Halbert                                                                             (8/8) 100%
  FileNotFoundException.php:15, 16, 17, 18                                                 (4/8) 50%
  AbstractInput.php:39, 76, 78                                                           (3/8) 37.5%
  AuthorOutput.php:157                                                                   (1/8) 12.5%

Rollout

  1. Ask your manager/lead if it can be tested.
  2. Check your code coverage.
  3. Add it to your build process.
  4. Check code coverage after your ‘testing period.’
  5. If it works, keep, if not, trash. Regardless, let me know what you think.

Feature Requests/Bugs

Submit feature requests or bugs at PhpBCC Issues.

Some ideas on new features: SVN/CVS/Mercurial support, a report other than Clover, different output type.

Contributing

  1. Build off of the interfaces established
  2. Ensure code coverage!
  3. Make sure the build passes
  4. Submit to PhpBCC Pull Requests

Feedback

Let me know the successes or hardships you may experience.