Last active
November 20, 2017 16:43
-
-
Save arest/9c01738aed02b2a57f03d67ad554cd3e to your computer and use it in GitHub Desktop.
Git pre push hook - Check PSR2 compliance
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| printf "Checking PSR2 before pushing\n" | |
| vendor/bin/phpcs --standard=PSR2 src/AppBundle/ tests/ | |
| OUT=$? | |
| if [ $OUT -eq 0 ];then | |
| printf "OK! Pushing...\n" | |
| exit 0 | |
| else | |
| printf "Errors found! Not pushing...\n" | |
| exit 1 | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment