Created
August 9, 2017 13:56
-
-
Save madeindjs/ad5139fef059460f1a60582f28477c50 to your computer and use it in GitHub Desktop.
Check git staged PHP files errors
This file contains 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 | |
files=`git diff --name-only | grep -E '.php$' ` | |
for file in $files; do | |
php -l $file > /dev/null | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment