mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-05 19:37:17 +00:00
Use xargs multi-process to improve lint scanning speed in tests
This commit is contained in:
parent
f332d3647c
commit
4a2b83ab47
@ -11,9 +11,12 @@ while getopts "p:" OPTION 2> /dev/null; do
|
||||
done
|
||||
|
||||
echo Running PHP lint scans...
|
||||
shopt -s globstar
|
||||
for file in src/pocketmine/**/*.php; do
|
||||
OUTPUT=`"$PHP_BINARY" -l "$file"`
|
||||
[ $? -ne 0 ] && echo -n "$OUTPUT" && exit 1
|
||||
done
|
||||
|
||||
OUTPUT=`find ./src/pocketmine -name "*.php" -print0 | xargs -0 -n1 -P4 php -l`
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $OUTPUT | grep -v "No syntax errors"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo Lint scan completed successfully.
|
Loading…
x
Reference in New Issue
Block a user