-
Notifications
You must be signed in to change notification settings - Fork 430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
grumphp does not detect issues after changes #41
Comments
Hello @orasik, GrumPHP does not cache anything. It runs the task commands directly from the list of changed files in GIT. Are you running the command directly on your filesystem or in a virtualbox with a shared folder or something? |
Thanks @veewee for your fast response!
|
Hi @orasik, I am also working on Mac. Here are the commands I ran to test: mkdir tmp
cd tmp
git init
composer require phpro/grumphp
# Copy your grumphp file to the clipboard
pbpaste > grumphp.yml
composer require squizlabs/php_codesniffer --dev
composer require --dev leaphub/phpcs-symfony2-standard
# Copy the PHP file to your clipboard
pbpaste > MyTestClass.php
echo "vendor" > .gitignore
git add -A
git commit -m"Test" At this point I get following errors:
Now I run vi MyTestClass.php
# Add docblock the line above class: /** docblock */
# Remove the die(); line
# Save the file (esc :wq)
git commit -am"Test" Now I see these errors:
This seems normal to me. Thanks! |
I have ran that, now from different machine but again mac. I noticed the following:
but if I do php vendor/bin/grumphp git:pre-commit will show the cached message as I mentioned above, so I guess this command is not considering option
Thanks! |
Hello @orasik, I found the problem: The blacklist command uses the cached git changes: So the blacklist command will only run on the changes that are actually being committed. It doesn't seem like a problem te me, since the pre-commit command is designed to run at git commit. The This also works here.
In my include path I have:
But this would be exactly the same if you symlink the file to for example |
Since these tasks work as expected, I will close this issue. |
Hello,
I have installed grumphp as a new project and started playing with one file. The structure is as follows:
my grumphp.yml
I have added phpcs to composer as per your README page.
When I run grumphp command line for first time, it works very well and detect any issues related to symfony2 coding standards or blacklist keywords:
However if I make any change to MyTestClass.php file, it will not detect it after running the command again. Interestingly when I left the code for some time (around 1 hour) and ran it again it worked fine again! Also when I run phpcs directly from command line I am able to see if there is any issues with code so I suspect that there is caching or something that affects running tasks.
do you use any caching with grumphp?
my php code:
The text was updated successfully, but these errors were encountered: