diff --git a/Hooks/syntax.sh b/Hooks/syntax.sh index 8274562..82c6de2 100644 --- a/Hooks/syntax.sh +++ b/Hooks/syntax.sh @@ -71,7 +71,13 @@ isValidBashScript() { } hasInvalidBasicSyntax() { + # Check whitespace end of line in code + echo "$(grep -P ' $' )" + echo $(grep -P ' $' "$1") + if [[ -n $(grep -P ' $' "$1") ]]; then + return 1 + fi # Check for tabs if [[ -n $(grep -P '\t' "$1") ]]; then