Add ${DIRPHPCS}
This commit is contained in:
parent
dc5557e4f7
commit
f6b41a92db
@ -48,7 +48,7 @@ then
|
|||||||
#~/vendor/bin/phpcs --version
|
#~/vendor/bin/phpcs --version
|
||||||
#phpcs --standard=PSR2 --encoding=utf-8 -n -p $FILES
|
#phpcs --standard=PSR2 --encoding=utf-8 -n -p $FILES
|
||||||
# Check Dolibarr standard
|
# Check Dolibarr standard
|
||||||
phpcs -s -p -d memory_limit=-1 --parallel=2 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true $FILES
|
${DIRPHPCS}phpcs -s -p -d memory_limit=-1 --parallel=2 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true $FILES
|
||||||
# Check your own standard
|
# Check your own standard
|
||||||
#${DIRPHPCS}phpcs -s -p -d memory_limit=-1 --parallel=2 --extensions=php --colors --tab-width=4 --standard=htdocs/custom/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true $FILES
|
#${DIRPHPCS}phpcs -s -p -d memory_limit=-1 --parallel=2 --extensions=php --colors --tab-width=4 --standard=htdocs/custom/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true $FILES
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ then
|
|||||||
# Fix standard errors
|
# Fix standard errors
|
||||||
if [ "x$AUTOFIX" != "x0" ]
|
if [ "x$AUTOFIX" != "x0" ]
|
||||||
then
|
then
|
||||||
phpcbf -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true $FILES
|
${DIRPHPCS}phpcbf -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true $FILES
|
||||||
#${DIRPHPCS}phpcbf -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=htdocs/custom/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true $FILES
|
#${DIRPHPCS}phpcbf -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=htdocs/custom/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true $FILES
|
||||||
echo "Found some errors in syntax rules. An automatice fix has been applied. Check it before commit." 1>&2;
|
echo "Found some errors in syntax rules. An automatice fix has been applied. Check it before commit." 1>&2;
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user