WordPress-Coding-Standards/bin/pre-commit
2013-10-23 12:07:04 -07:00

12 lines
360 B
Bash
Executable file

#!/bin/bash
set -e
cd "$(git rev-parse --show-toplevel)"
if [ ! -e ../../../CodeSniffer.php ]; then
echo "You must clone the WordPress standard inside of the phpcs CodeSniffer/Standards directory; could not find ../../../CodeSniffer.php" 1>&2
exit 1
fi
find . \( -name '*.php' \) -exec php -lf {} \;
phpunit --filter WordPress ../../../tests/AllTests.php