From 7a30f3bf774e99fc86cf5a9bccbffd433a4f3b95 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Han?= Date: Mon, 13 Aug 2018 18:36:09 +0200 Subject: [PATCH] ceph-ansible-pr-syntax-check: do not check for removed lines MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- ceph-ansible-pr-syntax-check/build/build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.47.3