Closed danitome24 closed 6 years ago
I'm testing and:
bin/phpunit --coverage-text|grep Classes|cut -d " " -f 4|cut -d "%" -f 1
100.00
bin/phpunit --coverage-text|grep Classes|cut -d " " -f 5|cut -d "%" -f 1
(208/208)
I can't understand witch your problem.
Perfect!! I'll send you a PR
Maybe the problem is when you have not a coverage?
Nop, I have coverage working but the value is not cutted well
Merged! Thanks
Hi,
I'm using this package on my project and I have a problem when I run pre-commit hook with phpunit and coverage guard enabled. First of all let me tell you which versions am I using:
Then my php-git-hooks config looks like this:
As you can see, I have phpunit enabled and also guard coverage. Otherwise, the guard coverage is not working for me. It generates the file .guard_clause with a 0 inside and in the hook it always display a 0% and this is wrong 😢 . Debugging through the code I've found the cli for this:
$command = 'php '.$tool.' --coverage-text|grep Classes|cut -d " " -f *4*|cut -d "%" -f 1';
(file: StrictCoverageProcessor, line: 32). Testing this line on my cli outputs nothing, but If I change this line into this:$command = 'php '.$tool.' --coverage-text|grep Classes|cut -d " " -f *5*|cut -d "%" -f 1';
it works! (Look the first cut -f).I'm the only who is dealing with this?
Thanks!!!