diff options
| author | Jenkins <jenkins@review.openstack.org> | 2015-01-26 13:10:02 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2015-01-26 13:10:02 +0000 |
| commit | e91aafc75a656f108f97d6adb69fe132923b9119 (patch) | |
| tree | ef762c773e7a542e81dd614c8e983bc463f597e4 /tools | |
| parent | fedcb1516af29a6c384ab8ded03acabb569971f7 (diff) | |
| parent | dc3687b18b186273f1a15526a0f9c86406644fc4 (diff) | |
| download | kolla-e91aafc75a656f108f97d6adb69fe132923b9119.tar.gz kolla-e91aafc75a656f108f97d6adb69fe132923b9119.zip | |
Merge "Various fixes to pre-commit hook"
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/pre-commit-hook | 19 | ||||
| -rwxr-xr-x | tools/validate-json.sh | 3 |
2 files changed, 6 insertions, 16 deletions
diff --git a/tools/pre-commit-hook b/tools/pre-commit-hook index 475e05912..a136b97b4 100755 --- a/tools/pre-commit-hook +++ b/tools/pre-commit-hook @@ -5,7 +5,7 @@ RES=0 cd $TOPLEVEL -if [ "$1" == "--install" ]; then +if [ "$1" = "--install" ]; then ln -sf ../../tools/pre-commit-hook .git/hooks/pre-commit exit fi @@ -26,26 +26,19 @@ find . -type f echo "=== bashate checks ===" -find . -type f -print0 | - xargs -0 --no-run-if-empty egrep -lZ '^#!/bin/(ba)?sh' | - xargs -0 bashate || RES=1 +files=$(egrep -rlI '^#!/(bin/|usr/bin/env )(ba)?sh' .) +[ "$files" ] && (bashate $files || RES=1) echo "=== yaml checks ===" -find . -name '*.yaml' -print0 | - xargs -0 --no-run-if-empty ${TOPLEVEL}/tools/validate-yaml.py \ - || RES = 1 +${TOPLEVEL}/tools/validate-all-yaml.sh || RES=1 echo "=== json checks ===" -find . -name '*.json' -print0 | - xargs -0 --no-run-if-empty ${TOPLEVEL}/tools/validate-json.py \ - || RES=1 +${TOPLEVEL}/tools/validate-all-json.sh || RES=1 echo "=== maintainer checks ===" -find . -name Dockerfile -print0 | - xargs -0 --no-run-if-empty ${TOPLEVEL}/tools/validate-maintainer \ - || RES=1 +${TOPLEVEL}/tools/validate-all-maintainer.sh || RES=1 exit $RES diff --git a/tools/validate-json.sh b/tools/validate-json.sh deleted file mode 100755 index 296ef781c..000000000 --- a/tools/validate-json.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -true |
