Closed ibrambe closed 8 years ago
Can you give me some additional information about the issue? I did following steps:
Actions
mkdir tmp
cd tmp
git init
composer require --dev phpro/grumphp
echo "vendor" > .gitignore
echo "<?php var_dump('ok');" > test.php
# Copy the lines to grumphp.yml file
vim grumphp.yml
git add -A && git commit -m"Test"
Result:
You have blacklisted keywords in your commit:
test.php:1:<?php var_dump('ok');
So this tasks seems to work to me. Can you tell me how to reproduce your error?
This seems to work indeed:
<?php var_dump('ok');
but in my testfile, there were some new lines between the opening tag and the var_dump function and that seems to be the problem:
<?php
var_dump('ok')
It seems like there is something wrong with the internal git command that is being used:
# Sometimes this works, sometimes it doesn't:
git grep --cached -n '-e var_dump(' test.php
# This seems to always work:
git grep --cached -n -e 'var_dump(' test.php
I will try to get this one fixed later this week. Thanks for reporting!
@ibrambe A fix is underway in PR #126
@veewee Thanks!
When I commit a file "test.php" with one of the defined keywords, nothing seems to happen. I expect to see a warning cause there's still a var_dump in my code.
Config: