Skip to content

Instantly share code, notes, and snippets.

@tony4d
Created April 28, 2011 08:52
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tony4d/946031 to your computer and use it in GitHub Desktop.
Save tony4d/946031 to your computer and use it in GitHub Desktop.
PHP lint all files added or modified locally
for i in `git status -s | sed -e 's/^.* //'`; do php -l $i; done
@dotancohen
Copy link

dotancohen commented Jan 24, 2017

Very nice, thank you! The code as is will try to lint files removed as well, so I've forked and added a check. Have a look:
https://gist.github.com/dotancohen/701bec7285ffcb9f3c592df6146913f2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment