Skip to contentSkip to conversation

scripts: check for commit msgs starting with 'It'

PATCH In review Bruce Richardson 2 participants 3 messages Jun 28, 2016 – Jun 29, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts: check for commit msgs starting with 'It'

---
 scripts/check-git-log.sh | 6 ++++++
 1 file changed, 6 insertions(+)
scripts/check-git-log.sh +6 -0
index 153f378..87b122f 100755
@@ -114,6 +114,12 @@ bad=$(echo "$headlines" | awk 'length>60 {print}' | sed 's,^,\t,')
 bad=$(echo "$bodylines" | 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 \
+	-e '^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: [^,]* <.*@.*>$' |
Signature · 1 line
2.5.5
#2 lore raw
Quoted 3 lines · Thomas Monjalon
Quoted 1 line

Applied with -i case option to catch also lowercase form.

Which suggests another good check to add, would be to check that the commmit message starts with a capital letter.

/Bruce