diff options
| author | Emilio Jesus Gallego Arias | 2018-03-31 03:19:08 +0200 |
|---|---|---|
| committer | Emilio Jesus Gallego Arias | 2018-03-31 03:19:08 +0200 |
| commit | 2d2d16430822f1768ce4f3c62ef0750b94e4747f (patch) | |
| tree | 9cf61153314d41a266a4b063e8d2e7091ee2aa37 /dev/tools | |
| parent | dc6a9c8d29e7d33949844adc0804f39e1fb22ba2 (diff) | |
| parent | aa1565a20f6c42ba28a9346ee25404d893946c5d (diff) | |
Merge PR #6950: pre-commit, linter: verify user overlay extensions (must be sh)
Diffstat (limited to 'dev/tools')
| -rwxr-xr-x | dev/tools/check-overlays.sh | 11 | ||||
| -rwxr-xr-x | dev/tools/pre-commit | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/dev/tools/check-overlays.sh b/dev/tools/check-overlays.sh new file mode 100755 index 0000000000..f7e05b51cd --- /dev/null +++ b/dev/tools/check-overlays.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +for f in dev/ci/user-overlays/* +do + if ! ([[ $f = dev/ci/user-overlays/README.md ]] || [[ $f == *.sh ]]) + then + >&2 echo "Bad overlay '$f'." + >&2 echo "User overlays need to have extension .sh to be picked up!" + exit 1 + fi +done diff --git a/dev/tools/pre-commit b/dev/tools/pre-commit index c9cdee84ab..a514b8866a 100755 --- a/dev/tools/pre-commit +++ b/dev/tools/pre-commit @@ -5,6 +5,8 @@ set -e +dev/tools/check-overlays.sh + if ! git diff --cached --name-only -z | xargs -0 dev/tools/check-eof-newline.sh || ! git diff-index --check --cached HEAD >/dev/null 2>&1 ; then |
