https://github.com/daison12006013/clover-coverage-to-html
Clover XML into HTML Coverage + Badge Tagging
https://github.com/daison12006013/clover-coverage-to-html
clover coverage html php xml
Last synced: 6 days ago
JSON representation
Clover XML into HTML Coverage + Badge Tagging
- Host: GitHub
- URL: https://github.com/daison12006013/clover-coverage-to-html
- Owner: daison12006013
- License: mit
- Created: 2019-07-15T00:05:17.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-01-05T07:07:05.000Z (over 4 years ago)
- Last Synced: 2025-02-20T04:04:17.357Z (3 months ago)
- Topics: clover, coverage, html, php, xml
- Language: PHP
- Homepage:
- Size: 755 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
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**
```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.