Fix new hooks

This commit is contained in:
Dennis Eichhorn 2018-08-11 12:07:16 +02:00
parent 58e229e911
commit 267b006602
2 changed files with 2 additions and 5 deletions

View File

@ -64,8 +64,6 @@ git diff --cached --name-only | while read FILE; do
fi
if [[ "$FILE" =~ ^.+(sh|js|php|json|css)$ ]]; then
echo 0
echo $FILE
echo 1
GEN_SYNTAX=$(hasInvalidBasicSyntax "$FILE")
echo 2

View File

@ -71,10 +71,9 @@ isValidBashScript() {
}
hasInvalidBasicSyntax() {
echo 1
echo $1
# Check whitespace end of line in code
echo "$(grep -P ' $' )"
echo $(grep -P ' $' "$1")
if [[ -n $(grep -P ' $' "$1") ]]; then
return 1
fi