diff --git a/Hooks/delegator.sh b/Hooks/delegator.sh index 81f9515..de26336 100644 --- a/Hooks/delegator.sh +++ b/Hooks/delegator.sh @@ -5,8 +5,6 @@ . ${rootpath}/Build/Hooks/filename.sh . ${rootpath}/Build/Hooks/tests.sh -set -e - git diff --cached --name-only | while read FILE; do if [[ ! -f "$FILE" ]]; then continue @@ -64,10 +62,7 @@ git diff --cached --name-only | while read FILE; do fi if [[ "$FILE" =~ ^.+(sh|js|php|json|css)$ ]]; then - echo 1 GEN_SYNTAX=$(hasInvalidBasicSyntax "$FILE") - echo 2 - if [[ $GEN_SYNTAX = 1 ]]; then echo -e "\e[1;31m\tFound whitespace at end of line in $FILE.\e[0m" >&2 @@ -124,6 +119,4 @@ git diff --cached --name-only | while read FILE; do grep -P '(\|\|\|\)[0-9a-zA-Z\.\?]+' "$FILE" >&2 fi fi -done - -exit 0 \ No newline at end of file +done \ No newline at end of file diff --git a/Hooks/syntax.sh b/Hooks/syntax.sh index a66a92b..12df4d6 100644 --- a/Hooks/syntax.sh +++ b/Hooks/syntax.sh @@ -71,7 +71,7 @@ isValidBashScript() { } hasInvalidBasicSyntax() { - echo 1 + echo 3 echo $1 # Check whitespace end of line in code if [[ -n $(grep -P ' $' "$1") ]]; then