Skip to content

Instantly share code, notes, and snippets.

@vamdt
Last active August 29, 2015 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vamdt/56a45ae588deed42d949 to your computer and use it in GitHub Desktop.
Save vamdt/56a45ae588deed42d949 to your computer and use it in GitHub Desktop.
php lint run in ci(jenkins)
#!/usr/bin/env bash
# APP_ROOT/deploy/ci_php_lint.sh
cd $(dirname $0)
cd ..
exit_code=0
for i in $(git ls-files --ignored --exclude='**/*.php')
do
php -l $i
ex=$?
if [[ 0 != $ex ]]; then
exit_code=$ex
fi
done
# if exit_code not 0, then exit with error
exit $exit_code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment