-
-
Save renoirtech/c4d0e905ae950aaab5d701d7740c8653 to your computer and use it in GitHub Desktop.
Only push if pint validation find no errors
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
#!/bin/bash | |
# Check if Laravel Pint is installed. | |
which ./vendor/bin/pint &> /dev/null | |
if [[ "$?" == 1 ]]; then | |
echo -e "\e[31mPlease install Pint (composer require laravel/pint --dev)\e[0m" | |
exit 1 | |
fi | |
# Run Pint to inspect your code for style errors without actually changing the files | |
./vendor/bin/pint --test --config ./pint.json | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment