diff options
-rw-r--r-- | Makefile | 8 | ||||
-rw-r--r-- | check/git-template-hooks.sh | 3 | ||||
-rw-r--r-- | lint/git-template-hooks.sh | 5 |
3 files changed, 16 insertions, 0 deletions
@@ -65,6 +65,7 @@ check-bash \ check-bin \ check-games \ + check-git-template-hooks \ check-ksh \ check-login-shell \ check-man \ @@ -76,6 +77,7 @@ lint-bash \ lint-bin \ lint-games \ + lint-git-template-hooks \ lint-ksh \ lint-sh \ lint-urxvt \ @@ -666,6 +668,9 @@ check-bin: $(BINS) check-games: $(GAMES) sh check/games.sh +check-git-template-hooks: $(GIT_TEMPLATE_HOOKS) + sh check/git-template-hooks.sh + check-man: sh check/man.sh @@ -705,6 +710,9 @@ lint-bin: check-bin lint-games: check-games sh lint/games.sh +lint-git-template-hooks: check-git-template-hooks + sh lint/git-template-hooks.sh + lint-ksh: check-ksh sh lint/ksh.sh diff --git a/check/git-template-hooks.sh b/check/git-template-hooks.sh new file mode 100644 index 00000000..42d3a69f --- /dev/null +++ b/check/git-template-hooks.sh @@ -0,0 +1,3 @@ +for sh in git/template/hooks/*.sh ; do + sh -n "${sh%.sh}" || exit +done diff --git a/lint/git-template-hooks.sh b/lint/git-template-hooks.sh new file mode 100644 index 00000000..74f20fc6 --- /dev/null +++ b/lint/git-template-hooks.sh @@ -0,0 +1,5 @@ +set -- +for bin in git/template/hooks/*.sh ; do + set -- "$@" "${bin%.sh}" +done +shellcheck -e SC1090 -- "$@" || exit |