mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
Merge commit '6490a49c702d0a3a9f62ffb915ffa22272f17b08'
# Conflicts: # resources/vanilla # tests/travis.sh
This commit is contained in:
commit
305b4007d2
@ -1,35 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
PHP_BINARY="php"
|
||||
DIR=""
|
||||
FIND="find"
|
||||
|
||||
while getopts "p:d:f:" OPTION 2> /dev/null; do
|
||||
case ${OPTION} in
|
||||
p)
|
||||
PHP_BINARY="$OPTARG"
|
||||
;;
|
||||
d)
|
||||
DIR="$OPTARG"
|
||||
;;
|
||||
f)
|
||||
FIND="$OPTARG"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$DIR" == "" ]; then
|
||||
echo No directory specified
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo Running PHP lint scans on \"$DIR\"...
|
||||
|
||||
OUTPUT=`$FIND "$DIR" -name "*.php" -print0 | xargs -0 -n1 -P4 "$PHP_BINARY" -l`
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $OUTPUT | grep -v "No syntax errors"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo Lint scan completed successfully.
|
@ -14,13 +14,6 @@ while getopts "p:t:" OPTION 2> /dev/null; do
|
||||
esac
|
||||
done
|
||||
|
||||
./tests/lint.sh -p "$PHP_BINARY" -d ./src
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo Lint scan failed!
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[ ! -f phpstan.phar ] && echo "Downloading PHPStan..." && curl -sSLO https://github.com/phpstan/phpstan/releases/download/0.12.3/phpstan.phar
|
||||
"$PHP_BINARY" phpstan.phar analyze --no-progress --memory-limit=2G || exit 1
|
||||
echo "PHPStan scan succeeded"
|
||||
|
Loading…
x
Reference in New Issue
Block a user