mirror of
https://gh.wpcy.net/https://github.com/WordPress/WordPress-Coding-Standards.git
synced 2026-05-06 07:02:23 +08:00
14 lines
424 B
Bash
Executable file
14 lines
424 B
Bash
Executable file
#!/bin/bash
|
|
set -e
|
|
cd "$(git rev-parse --show-toplevel)"
|
|
|
|
phpcs_root="$(dirname $(dirname $(which phpcs)))"
|
|
|
|
if [ -z "$phpcs_root" ] || [ ! -d "$phpcs_root" ] || [ ! -e "$phpcs_root/tests/AllTests.php" ]; then
|
|
echo "Unable to locate phpcs on path to locate the root of the PHP_CodeSniffer project" 1>&2
|
|
exit 1
|
|
fi
|
|
|
|
find . \( -name '*.php' \) -exec php -lf {} \;
|
|
|
|
phpunit --filter WordPress "$phpcs_root/tests/AllTests.php"
|