Fix #129: Add PSR-2 coding style checks to continuous integration tests

This commit is contained in:
Zach Borboa
2017-05-02 18:51:52 -07:00
parent eeaf3f9534
commit 6bed5fb0bf
+17 -1
View File
@@ -8,7 +8,7 @@ fi
# Run tests.
phpunit --version
phpunit --configuration tests/phpunit.xml
phpunit --configuration "tests/phpunit.xml"
if [[ "${?}" -ne 0 ]]; then
((errors++))
fi
@@ -112,4 +112,20 @@ if [[ ! -z "${elses}" ]]; then
((errors++))
fi
# Add composer bin directory to the path environment variable.
export PATH="$PWD/vendor/bin:$PATH"
# Detect coding standard violations.
phpcs --version
phpcs \
--extensions="php" \
--ignore="*/vendor/*" \
--standard="tests/ruleset.xml" \
-p \
-s \
.
if [[ "${?}" -ne 0 ]]; then
((errors++))
fi
exit "${errors}"