From patchwork Thu Feb 5 22:28:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: check-commit: check capitalization in summary lines From: Eric Sumner X-Patchwork-Id: 7693 Message-Id: <5098f8d2127ad5bb7dbd.1423175314@waste.org> To: mercurial-devel@selenic.com Date: Thu, 05 Feb 2015 16:28:34 -0600 # HG changeset patch # User Eric Sumner # Date 1423174148 28800 # Thu Feb 05 14:09:08 2015 -0800 # Node ID 5098f8d2127ad5bb7dbd1534a707c850051a8589 # Parent 7f375d2de945e0e773541773db9c334f9e9f75c6 check-commit: check capitalization in summary lines At the moment, check-commit will complain about the topic being capitalized, but not the summary that comes after it. This diff corrects that deficiency. diff --git a/contrib/check-commit b/contrib/check-commit --- a/contrib/check-commit +++ b/contrib/check-commit @@ -25,6 +25,7 @@ (r"^# .*\n(?!merge with )[^#]\S+[^:] ", "summary line doesn't start with 'topic: '"), (r"^# .*\n[A-Z][a-z]\S+", "don't capitalize summary lines"), + (r"^# .*\n[^\n]*: *[A-Z][a-z]\S+", "don't capitalize summary lines"), (r"^# .*\n.*\.\s+$", "don't add trailing period on summary line"), (r"^# .*\n.{78,}", "summary line too long"), (r"^\+\n \n", "adds double empty line"),