mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-28 03:00:55 +00:00
87fc9b3796
* Run ci static analysis checks using scripts * Clean up * Move phpunit run to dedicated script * Use run.sh and remove ci.sh * Rename test scripts to be prefixed with "run_" * Move static analysis runs to test script * Clean up
17 lines
471 B
Bash
Executable File
17 lines
471 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
cd "${SCRIPT_DIR}"
|
|
|
|
# Run commands from the project root directory.
|
|
pushd ..
|
|
|
|
# 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+=("php syntax checks failed")
|
|
fi
|
|
|
|
popd
|