Integrate PHPCS

Include only own code, test for binary

refs #4070
This commit is contained in:
Marius Hein 2013-06-04 11:25:08 +02:00
parent ed24a90c1a
commit 321aa9b4e3
1 changed files with 12 additions and 1 deletions

View File

@ -4,10 +4,21 @@ set -o nounset
SCRIPTNAME=$(readlink -f $0)
DIR=$(dirname $SCRIPTNAME)
PHPCS=$(which phpcs)
if [[ ! -x $PHPCS ]]; then
echo "PHPCS not found!"
exit 1
fi
# Make sure that the destination directory for logs and reports exists
mkdir -p $DIR/../../build/log
phpcs -p --standard=PSR2 --extensions=php --encoding=utf-8 --report-checkstyle=$DIR/../../build/log/phpcs_results.xml --ignore=vendor "$@" $DIR/../..
phpcs -p --standard=PSR2 --extensions=php --encoding=utf-8 \
--report-checkstyle=$DIR/../../build/log/phpcs_results.xml \
"$@" \
$DIR/../../application \
$DIR/../../library/Icinga \
$DIR/../../bin
exit 0