diff --git a/specs/clang/template/.githooks/pre-commit b/specs/clang/template/.githooks/pre-commit index 42e68d2..8a0f50e 100755 --- a/specs/clang/template/.githooks/pre-commit +++ b/specs/clang/template/.githooks/pre-commit @@ -10,7 +10,7 @@ STAGED=$( TARGETS=() while IFS= read -r FILENAME do - if [[ "$FILENAME" =~ .*\.c ]] || [[ "$FILENAME" == .*\.h ]]; then + if [[ "$FILENAME" =~ .*\.c$ ]] || [[ "$FILENAME" == .*\.h$ ]]; then TARGETS+=("${FILENAME}") fi done <<< "$STAGED" diff --git a/specs/mix/template/.githooks/pre-commit b/specs/mix/template/.githooks/pre-commit index ecf4761..d0f4664 100755 --- a/specs/mix/template/.githooks/pre-commit +++ b/specs/mix/template/.githooks/pre-commit @@ -10,7 +10,7 @@ STAGED=$( TARGETS=() while IFS= read -r FILENAME do - if [[ "$FILENAME" =~ .*\.exs? ]]; then + if [[ "$FILENAME" =~ .*\.exs?$ ]]; then TARGETS+=("${FILENAME}") fi done <<< "$STAGED" diff --git a/specs/nodejs/template/.githooks/pre-commit b/specs/nodejs/template/.githooks/pre-commit index 0684155..749f5d3 100755 --- a/specs/nodejs/template/.githooks/pre-commit +++ b/specs/nodejs/template/.githooks/pre-commit @@ -10,7 +10,7 @@ STAGED=$( TARGETS=() while IFS= read -r FILENAME do - if [[ "$FILENAME" =~ .*\.jsx? ]] || [[ "$FILENAME" == .*\.tsx? ]]; then + if [[ "$FILENAME" =~ .*\.jsx?$ ]] || [[ "$FILENAME" == .*\.tsx?$ ]]; then TARGETS+=("${FILENAME}") fi done <<< "$STAGED" diff --git a/specs/phoenix/template/.githooks/pre-commit b/specs/phoenix/template/.githooks/pre-commit index be79b38..78c222f 100755 --- a/specs/phoenix/template/.githooks/pre-commit +++ b/specs/phoenix/template/.githooks/pre-commit @@ -11,9 +11,9 @@ MIX_TARGETS=() WEB_TARGETS=() while IFS= read -r FILENAME do - if [[ "$FILENAME" =~ .*exs? ]]; then + if [[ "$FILENAME" =~ .*exs?$ ]]; then MIX_TARGETS+=("${FILENAME}") - elif [[ "$FILENAME" =~ .*jsx? ]] || [[ "$FILENAME" =~ .*tsx? ]]; then + elif [[ "$FILENAME" =~ .*jsx?$ ]] || [[ "$FILENAME" =~ .*tsx?$ ]]; then WEB_TARGETS+=("${FILENAME}") fi done <<< "$STAGED" diff --git a/specs/poetry/template/.githooks/pre-commit b/specs/poetry/template/.githooks/pre-commit index a6b2371..eecd520 100644 --- a/specs/poetry/template/.githooks/pre-commit +++ b/specs/poetry/template/.githooks/pre-commit @@ -10,7 +10,7 @@ STAGED=$( TARGETS=() while IFS= read -r FILENAME do - if [[ "$FILENAME" =~ .*\.py ]]; then + if [[ "$FILENAME" =~ .*\.py$ ]]; then TARGETS+=("${FILENAME}") fi done <<< "$STAGED"