Created
November 14, 2013 20:52
-
-
Save jasonbouffard/7474108 to your computer and use it in GitHub Desktop.
PHP Lint Recursive for Jenkins
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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