From 9c24780f0d5efd09fc238a5ad4a36a13fee0a792 Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Tue, 28 Jun 2016 12:27:12 +0100 Subject: [PATCH] scripts: check first word of commit messages Avoid messages starting with "It" without describing what it is talking about. Signed-off-by: Bruce Richardson Signed-off-by: Thomas Monjalon --- scripts/check-git-log.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/check-git-log.sh b/scripts/check-git-log.sh index 4253d14b9c..9a0d0683ff 100755 --- a/scripts/check-git-log.sh +++ b/scripts/check-git-log.sh @@ -114,6 +114,12 @@ bad=$(echo "$headlines" | awk 'length>60 {print}' | sed 's,^,\t,') bad=$(echo "$bodylines" | grep -v '^Fixes:' | awk 'length>75 {print}' | sed 's,^,\t,') [ -z "$bad" ] || printf "Line too long:\n$bad\n" +# check starting commit message with "It" +bad=$(echo "$bodylines" | head -n1 | grep -E --color=always \ + -ie '^It ' \ + | sed 's,^,\t,') +[ -z "$bad" ] || printf "Wrong beginning of commit message:\n$bad\n" + # check tags spelling bad=$(echo "$tags" | grep -v '^\(Reported\|Suggested\|Signed-off\|Acked\|Reviewed\|Tested\)-by: [^,]* <.*@.*>$' | -- 2.20.1