Test adding PHPCS check to the pre-push hook#18
Conversation
|
@james-hill-matomo @AltamashShaikh I mentioned that I used the |
Makes sense 👍 |
|
@AltamashShaikh @james-hill-matomo Please check the latest changes and let me know if everything looks good. |
|
pre-commit hook is great if it runs quickly. |
james-hill-matomo
left a comment
There was a problem hiding this comment.
@snake14 this doesn't run on my PC as I don't have PHP locally, just via ddev.
I can work on this later to work on my setup.
@james-hill-matomo I wonder if it's as simple and using |
@snake14 Also have to change the paths. This manual test worked for me:
You can see the pre-push checks for PHP, although they're pretty straight forwards. |
|
@AltamashShaikh @james-hill-matomo I'm pretty sure that I've got it working for both local PHP and DDEV now. I also updated to stop if PHPCBF finds anything to correct. I thought about auto-adding, but figured that it would be better to have the dev review and add manually. |
AltamashShaikh
left a comment
There was a problem hiding this comment.
Still works fine for me 👍
|
@james-hill-matomo Please review/test again and let me know if there are any issues. |
james-hill-matomo
left a comment
There was a problem hiding this comment.
Works for me now, thank you!

Description
Testing out adding the PHPCS check to the pre-push check. To test a failure, I simply made a copy of the
pre-pushfile, named itpre-commit, and moved a curly brace in another file to the same line as the method signature.