Closed prafullazee closed 1 year ago
When running the grumphp pre commit hook (./vendor/bin/grumphp:git:pre-commit), it fails to check for phpcs problems in php Laravel project. View the outcome above, The error isn't being validated by phpcs.
OS : Windows Editor: VScode
@rajuguptahipi phpcs only runs on the changed files. If no files are left after applying the ignore patterns, it will not run at all during that pre-commit. Can you make sure that is not the case here?
Since the list of files can be rather long, we pass the files through a temporary file. Maybe that is where it goes wrong? See
@veewee in my case, files are newly created and added to stage, still having the issue and if you have noticed phpcs, phpmd, phpmnd etc are not running and all others are running.
Well hard to tell from my side what is going wrong exactly on your setup with the information given. There are some things you can do to debug:
Closing this one because of inactivity If the issue still persists - feel free to reopen and provide some additional context.
1.15.0
phpcs: standard: ["PSR12", "PSR2", "PSR1", "PEAR"] ignore_patterns: [./tests/, ./resources/, ./database/, ./bootstrap/, ./storage/*] whitelist_patterns:
Steps to reproduce:
vendor/bin/grumphp git:pre-commit
Run GrumPHP:
./vendor/bin/grumphp run
Running task 1/15: file_size... ✔ Running task 2/15: composer... Running task 3/15: git_branch_name... ✔ Running task 4/15: phpversion... ✔ Running task 5/15: phpcs... Running task 6/15: phpcpd... ✔ Running task 7/15: phpstan... ✔ Running task 8/15: phplint... ✔ Running task 9/15: phpcsfixer2... ✔ Running task 10/15: phpspec... ✔ Running task 11/15: phpparser... ✔ Running task 12/15: phpmd... Running task 13/15: phpmnd... Running task 14/15: jsonlint... Running task 15/15: stylelint...