pier-infor / undercover
Undercover
1.0.3
2021-01-05 21:51 UTC
Requires
- php: >=7.3.10
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.17
- phan/phan: 4.x
- phploc/phploc: ^5.0
- phpmd/phpmd: @stable
- phpunit/phpunit: ^8.0
- squizlabs/php_codesniffer: *
- theseer/phpdox: ^0.12.0
This package is auto-updated.
Last update: 2024-11-06 06:09:44 UTC
README
Undercover is a php coverage checker. It runs against phpunit clover file format.
Setup
composer require pier-infor/undercover
Phpunit Setup
in phpunit.xml file add a log tag entry in logging element as sample below.
<logging> <!--...--> <log type="coverage-clover" target="build/logs/clover.xml"/> <!--...--> </logging>
Integration
<?php exit((new PierInfor\Undercover\Checker)->run());
Composer Integration
in composer.json file add a script entry as sample below.
"undercover": [ "undercover -f build/logs/clover.xml -l85 -m86 -s84 -c78 -b" ]
Arguments
- -f , --file
- clover file path.
- -l , --lines
- threshold for covered lines.
- -m , --methods
- threshold for covered methods.
- -s , --statements
- threshold for covered statements.
- -c , --classes
- threshold for covered classes.
- -b , --blocking
- flag to set exit code to 1 when error happened.
(threshold as percent value)
Tests
tested with php from v7.3 up to v8.0.