Created
November 10, 2015 22:16
-
-
Save aelindeman/49db5e83794c72dfefef to your computer and use it in GitHub Desktop.
lint PHP files listed in git status
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
#/usr/bin/env sh | |
bin_php=`which php` | |
for i in `git status --porcelain | awk '{ print $NF }'`; do | |
if [[ "$i" == *.php ]]; then | |
$bin_php -l "$i"; | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment