daison / clover-to-html
Convert Clover XML into HTML.
Installs: 680
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 0
Type:project
Requires
- php: ^7.1.3
- laravel-zero/framework: 5.8.*
- symfony/service-contracts: ^1.1
- symfony/translation-contracts: ^1.1
Requires (Dev)
- mockery/mockery: ^1.0
- phpunit/phpunit: ^7.5
This package is auto-updated.
Last update: 2024-11-05 16:05:07 UTC
README
Clover XML to HTML
Parses a clover xml and maps the coverage based on the relative path on your local and will calculate and creates a static website that shows the coverage.
Installation
composer create-project daison/clover-to-html:dev-master clover-to-html --no-interaction
cd clover-to-html
Executing Command
./clover-coverage-to-html process --xml-path=tests/coverage.xml --store-path=reports/coverage --config-path=config.example.php
Example Config
clover_to_html.php
return [ 'title' => 'My Project Code Coverage', 'ignores' => [ 'exact' => [ '});', ']);', ');', '}', '{', ']', '[', ') {', 'return [', '];', 'try {', ], 'regex' => [ 'catch( |)\((.*)\)', '\}( |)else( |)\{', ], ], 'badges' => [ 'Repositories' => 'Repositories/', // single 'Controllers' => ['Controllers/Api', 'Controllers/Http'], // grouping // or regex sample 'User' => '(.*)User(.*)', 'Payment => ['/Payment', 'Payment(Controller|Repository)'], ], ];
You could ignore a code based on the regex
or an exact
value of that line.
The computation will be different compared to the original clover computations, where we only combined the (green + red is equal to 100%). This is to simplify the wrong output given by phpdbg
or xdebug
drivers as example when using php.