From c9d0550d4cb48799159fff06698dcc973e5cd64e Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 25 Aug 2018 19:23:34 +0200 Subject: [PATCH] Allow to ommit form action/method --- Hooks/delegator.sh | 4 ++-- Hooks/syntax.sh | 2 +- Hooks/travis.sh | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Hooks/delegator.sh b/Hooks/delegator.sh index a687064..a50de2e 100644 --- a/Hooks/delegator.sh +++ b/Hooks/delegator.sh @@ -102,8 +102,8 @@ git diff --cached --name-only | while read FILE; do fi if [[ $TPL_SYNTAX = 4 ]]; then - echo -e "\e[1;31m\tFound missing form element action, method or id.\e[0m" >&2 - grep -P '(\)' "$FILE" >&2 + echo -e "\e[1;31m\tFound missing form element name or id.\e[0m" >&2 + grep -P '(\)' "$FILE" >&2 exit 1 fi diff --git a/Hooks/syntax.sh b/Hooks/syntax.sh index 12b3f73..f2f4a2d 100644 --- a/Hooks/syntax.sh +++ b/Hooks/syntax.sh @@ -39,7 +39,7 @@ hasInvalidHtmlTemplateContent() { fi # Form must have a id, action and method *error* - if [[ -n $(grep -P '(\)' "$1") ]]; then + if [[ -n $(grep -P '(\)' "$1") ]]; then return 4 fi diff --git a/Hooks/travis.sh b/Hooks/travis.sh index 4371070..7c4a609 100644 --- a/Hooks/travis.sh +++ b/Hooks/travis.sh @@ -104,8 +104,8 @@ git diff --name-only $TRAVIS_COMMIT_RANGE | while read FILE; do fi if [[ $TPL_SYNTAX = 4 ]]; then - echo -e "\e[1;31m\tFound missing form element action, method or id.\e[0m" >&2 - grep -P '(\)' "$FILE" >&2 + echo -e "\e[1;31m\tFound missing form element name or id.\e[0m" >&2 + grep -P '(\)' "$FILE" >&2 exit 1 fi