From 52fd1ae73ec2edbfe65187b391e1f5343d3a77d3 Mon Sep 17 00:00:00 2001 From: James Shubin Date: Thu, 23 Nov 2017 08:20:44 -0500 Subject: [PATCH] test: Add check for common doc vs docs ambiguity --- test/test-commit-message.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/test-commit-message.sh b/test/test-commit-message.sh index 2ca606f4..fc401f18 100755 --- a/test/test-commit-message.sh +++ b/test/test-commit-message.sh @@ -71,6 +71,11 @@ test_commit_message_common_bugs() { echo 'FAIL: Commit message starts with `tests:`, did you mean `test:` ?' exit 1 fi + if git log --format=%s $1 | head -n 1 | grep -q "^doc:" + then + echo 'FAIL: Commit message starts with `doc:`, did you mean `docs:` ?' + exit 1 + fi } if [[ -n "$TRAVIS_PULL_REQUEST_SHA" ]]