diff options
author | Nigel Babu <nigelb@redhat.com> | 2018-03-27 19:38:44 +0530 |
---|---|---|
committer | Nigel Babu <nigelb@redhat.com> | 2018-04-16 14:34:05 +0530 |
commit | fc86b804a1aa4b7d7f28c64e42bf1a4f9c12502d (patch) | |
tree | 5cfda8cbcb351c74e78e3debfd0380b2afe4dd89 /build-gluster-org/scripts/glusto-lint.sh | |
parent | 52f67924df1c74c4e3e678c459df23b9b8e9a020 (diff) |
Add concurrency, commit message and module checks
Change-Id: I65a1006f734314cc1933af0985500a7af21c0f98
Diffstat (limited to 'build-gluster-org/scripts/glusto-lint.sh')
-rw-r--r-- | build-gluster-org/scripts/glusto-lint.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/build-gluster-org/scripts/glusto-lint.sh b/build-gluster-org/scripts/glusto-lint.sh index db9f933..298c5a7 100644 --- a/build-gluster-org/scripts/glusto-lint.sh +++ b/build-gluster-org/scripts/glusto-lint.sh @@ -4,3 +4,19 @@ source /opt/rh/python27/enable virtualenv --system-site-packages env env/bin/pip install tox env/bin/tox + +# Commit message standard +if ! git show --pretty=format:%B | head -n 2 | tail -n 1 | egrep '^$' >/dev/null 2>&1 ; then + echo "Bad commit message format! Please add an empty line after the subject line. Do not break subject line with new-lines." + exit 1 +fi + +# verify that every folder has an __init__.py file +set +e +FOLDERLIST=$(find tests/functional -type d -print0 | xargs -0 -I {} ls {}/__init__.py) +RET=$? +set -e +if [ $RET -ne 0 ]; then + echo "One of the folders in this change does not have an __init__.py file" + exit 1 +fi |