From 25a764fcb07c93448b2736fb79edecdb579ff1bf Mon Sep 17 00:00:00 2001 From: Zach Borboa Date: Fri, 2 Sep 2016 00:41:36 -0700 Subject: [PATCH] Include syntax check in fails to exit on --- tests/script.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/script.sh b/tests/script.sh index 507cbce..f661b12 100755 --- a/tests/script.sh +++ b/tests/script.sh @@ -1,7 +1,10 @@ +errors=0 + # Check syntax in php files. Use `xargs' over `find -exec' as xargs exits with a value of 1 when any command errors. find . -type "f" -iname "*.php" ! -path "*/vendor/*" | xargs -L "1" php -l - -errors=0 +if [[ "${?}" -ne 0 ]]; then + ((errors++)) +fi # Run tests. phpunit --configuration tests/phpunit.xml