Created
June 14, 2019 12:56
-
-
Save BerezhniyDmitro/3e45f593a6733c5f4943686b7b16e957 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
STAGED_FILES_CMD=`git show --pretty="" --name-only $CI_COMMIT_SHA --diff-filter=ACMR | grep \\\\.php` | |
if [ -z "$STAGED_FILES_CMD" ]; then | |
echo -e '\e[32m Файлов нет, пропускаю.\e[0m'; | |
exit 0; | |
else | |
php ./vendor/bin/phpcs --error-severity=1 --warning-severity=8 --colors $STAGED_FILES_CMD | |
php ./vendor/bin/phpcs --error-severity=1 --warning-severity=8 --colors --report=summary $STAGED_FILES_CMD | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment