Skip to content

Instantly share code, notes, and snippets.

@jasonbouffard
Created November 14, 2013 20:52
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 jasonbouffard/7474108 to your computer and use it in GitHub Desktop.
Save jasonbouffard/7474108 to your computer and use it in GitHub Desktop.
PHP Lint Recursive for Jenkins
#!/bin/sh
EXITCODE=0;
for file in `find . -path ./vendor -prune -o -name "*.php"`
do
RESULTS=`php -l $file`
if [ "$RESULTS" != "No syntax errors detected in $file" ]
then
EXITCODE=1;
echo $RESULTS
fi
done
exit $EXITCODE;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment