mirror of
https://gh.wpcy.net/https://github.com/WordPress/WordPress-Coding-Standards.git
synced 2026-04-26 00:02:20 +08:00
14 lines
488 B
Bash
Executable file
14 lines
488 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 {} \;
|
|
|
|
PHPCS_DIR=$phpcs_root phpunit --bootstrap="./Test/phpcs3-bootstrap.php" --filter WordPress "$phpcs_root/tests/AllTests.php"
|