Skip to content

Instantly share code, notes, and snippets.

@aelindeman
Created November 10, 2015 22:16
Show Gist options
  • Save aelindeman/49db5e83794c72dfefef to your computer and use it in GitHub Desktop.
Save aelindeman/49db5e83794c72dfefef to your computer and use it in GitHub Desktop.
lint PHP files listed in git status
#/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