From b7253992d40e03b26c0793083b374720f6cb7833 Mon Sep 17 00:00:00 2001 From: Anthony Romano Date: Wed, 22 Jun 2016 13:08:30 -0700 Subject: [PATCH] test: check commit titles --- test | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test b/test index 19caa1b8d..92c7b2e8a 100755 --- a/test +++ b/test @@ -146,6 +146,25 @@ function fmt_tests { echo -e "license header checking failed:\n${licRes}" exit 255 fi + + echo "Checking commit titles..." + git log master..HEAD --oneline | while read l; do + pfx=`echo "$l" | cut -f2 -d' '` + if [ "$pfx" == "Merge" ]; then + # ignore "Merge pull" commits + continue + fi + if [ "$pfx" == "Revert" ]; then + # ignore revert commits + continue + fi + if ! [[ "$pfx" =~ :$ ]]; then + echo "$pfx"... + echo "Expected commit title format ': '" + echo "Got: $l" + exit 255 + fi + done } function dep_tests {