Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- FILES=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php`
- SFILES=${FILES:-$FILES}
- echo "Running PHP Lint"
- for FILE in $SFILES
- do
- php -l -d display_errors=0 $FILE
- if [ $? != 0 ]
- then
- echo "Fix the errors"
- exit 1
- fi
- done
- exit 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement