Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Creates a git command 'lint-php' (if this script exists in your PATH and is executable) that syntax checks all modified/added files that end in ".php".
files=$(git status --porcelain | sed -e 's/^.* //' | grep -P '\.php$')
for f in $files; do
php -l $f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.