Patchwork check-commit: check capitalization in summary lines

login
register
mail settings
Submitter Eric Sumner
Date Feb. 5, 2015, 10:28 p.m.
Message ID <5098f8d2127ad5bb7dbd.1423175314@waste.org>
Download mbox | patch
Permalink /patch/7693/
State Accepted
Commit ba272156113ff341b79cd4aec892849c88894c51
Headers show

Comments

Eric Sumner - Feb. 5, 2015, 10:28 p.m.
# HG changeset patch
# User Eric Sumner <ericsumner@fb.com>
# 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.
Matt Mackall - Feb. 5, 2015, 10:53 p.m.
On Thu, 2015-02-05 at 16:28 -0600, Eric Sumner wrote:
> # HG changeset patch
> # User Eric Sumner <ericsumner@fb.com>
> # Date 1423174148 28800
> #      Thu Feb 05 14:09:08 2015 -0800
> # Node ID 5098f8d2127ad5bb7dbd1534a707c850051a8589
> # Parent  7f375d2de945e0e773541773db9c334f9e9f75c6
> check-commit: check capitalization in summary lines

Queued for default, thanks.

Patch

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"),