Files
piratepoet/mailpoet/tasks/lint-staged-php.sh
Rostislav Wolny 8646238251 Remove ./do qa:mininal-plugin-standard from git hooks
This check has been removed in https://github.com/mailpoet/mailpoet/pull/5801
The functionality is now covered by code sniffer
[MAILPOET-6150]
2024-09-05 12:55:23 +02:00

30 lines
621 B
Bash
Executable File

#!/bin/sh
set -e
source $PWD/.env
if [ "$MP_GIT_HOOKS_ENABLE" != "true" ]; then
echo "MP_GIT_HOOKS_ENABLE is not set to 'true'. Skipping lint-staged-php."
exit 0
fi
if [ "$MP_GIT_HOOKS_PHPLINT" = "true" ]; then
phplint $@
else
echo "MP_GIT_HOOKS_PHPLINT not set to 'true', skipping phplint"
fi
if [ "$MP_GIT_HOOKS_CODE_SNIFFER" = "true" ]; then
./do qa:code-sniffer $@
else
echo "MP_GIT_HOOKS_CODE_SNIFFER not set to 'true', skipping code sniffer"
fi
if [ "$MP_GIT_HOOKS_PHPSTAN" = "true" ]; then
bash -c './do qa:phpstan' $@
else
echo "MP_GIT_HOOKS_PHPSTAN not set to 'true', skipping PHPStan"
fi