mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-30 12:14:36 +00:00
Move syntax checking to a separate script
This commit is contained in:
Executable
+9
@@ -0,0 +1,9 @@
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
cd "${SCRIPT_DIR}"
|
||||
|
||||
# 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
|
||||
if [[ "${?}" -ne 0 ]]; then
|
||||
echo "Error: php syntax checks failed"
|
||||
((errors++))
|
||||
fi
|
||||
+1
-6
@@ -5,12 +5,7 @@ export PATH="${PWD}/vendor/bin:${PATH}"
|
||||
|
||||
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
|
||||
if [[ "${?}" -ne 0 ]]; then
|
||||
echo "Error: php syntax checks failed"
|
||||
((errors++))
|
||||
fi
|
||||
source "check_syntax.sh"
|
||||
|
||||
# Let test server know we should allow testing.
|
||||
export PHP_CURL_CLASS_TEST_MODE_ENABLED="yes"
|
||||
|
||||
Reference in New Issue
Block a user