From: Sébastien Han Date: Mon, 13 Aug 2018 16:36:09 +0000 (+0200) Subject: ceph-ansible-pr-syntax-check: do not check for removed lines X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1099%2Fhead;p=ceph-build.git ceph-ansible-pr-syntax-check: do not check for removed lines The git show was returning - and + lines, we only want to check for lines that were added not removed. Signed-off-by: Sébastien Han --- diff --git a/ceph-ansible-pr-syntax-check/build/build b/ceph-ansible-pr-syntax-check/build/build index f561e58b..48a9b0c5 100644 --- a/ceph-ansible-pr-syntax-check/build/build +++ b/ceph-ansible-pr-syntax-check/build/build @@ -59,7 +59,7 @@ function test_sign_off { function test_capital_letter { for commit in $(git log --no-merges --pretty=format:"%h" origin/"${ghprbTargetBranch}"..HEAD); do - if git show "$commit" | grep -E "\\- name:" | grep '[[:upper:]]'; then + if git show "$commit" | grep -E '^[<>+].*- name:' | grep '[[:upper:]]'; then echo "'- name:' statement must not contain any capital letters!" echo "Remove any capital letters from task's name." return 1