Update script according to recommendations from
https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/doc/usage.rst#using-php-cs-fixer-on-ci
This commit is contained in:
parent
733743acca
commit
aa8725eb58
|
@ -2,10 +2,10 @@
|
||||||
#
|
#
|
||||||
# Checks the PHP CS syntax
|
# Checks the PHP CS syntax
|
||||||
#
|
#
|
||||||
if ! echo "${CHANGED_FILES}" | grep -qE "^(\\.php_cs(\\.dist)?|composer\\.lock)$"; then
|
if ! echo "${CHANGED_FILES}" | grep -qE "^(\\.php-cs-fixer(\\.dist)?\\.php|composer\\.lock)$"; then
|
||||||
EXTRA_ARGS=$(printf -- '--path-mode=intersection\n--\n%s' "${CHANGED_FILES}");
|
EXTRA_ARGS=$(printf -- '--path-mode=intersection\n--\n%s' "${CHANGED_FILES}");
|
||||||
else
|
else
|
||||||
EXTRA_ARGS='';
|
EXTRA_ARGS='';
|
||||||
fi
|
fi
|
||||||
|
|
||||||
./vendor/bin/php-cs-fixer check -v --diff --using-cache=no ${EXTRA_ARGS}
|
./vendor/bin/php-cs-fixer fix -v --diff --dry-run --stop-on-violation --using-cache=no ${EXTRA_ARGS}
|
||||||
|
|
Loading…
Reference in a new issue