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 | |
# | |
# PHP Syntax linter, checks syntax before commit actually happens | |
# Save this file in your git project as .git/hooks/pre-commit and make sure it's executable | |
# PHP lint command, modify if necessary | |
LINT='/usr/bin/php -l' | |
files=$(git diff --cached --name-only --diff-filter=ACM | grep "\.php$") | |
if [ "$files" = "" ]; then |