Mercurial > hg
comparison contrib/check-commit @ 24049:ba272156113f
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.
author | Eric Sumner <ericsumner@fb.com> |
---|---|
date | Thu, 05 Feb 2015 14:09:08 -0800 |
parents | 15d0390a27fe |
children | 868cec6409c4 |
comparison
equal
deleted
inserted
replaced
24048:13d88b7eb3a0 | 24049:ba272156113f |
---|---|
23 (r"[(]bug", "use (issueDDDD) instead of bug"), | 23 (r"[(]bug", "use (issueDDDD) instead of bug"), |
24 (r"^# User [^@\n]+$", "username is not an email address"), | 24 (r"^# User [^@\n]+$", "username is not an email address"), |
25 (r"^# .*\n(?!merge with )[^#]\S+[^:] ", | 25 (r"^# .*\n(?!merge with )[^#]\S+[^:] ", |
26 "summary line doesn't start with 'topic: '"), | 26 "summary line doesn't start with 'topic: '"), |
27 (r"^# .*\n[A-Z][a-z]\S+", "don't capitalize summary lines"), | 27 (r"^# .*\n[A-Z][a-z]\S+", "don't capitalize summary lines"), |
28 (r"^# .*\n[^\n]*: *[A-Z][a-z]\S+", "don't capitalize summary lines"), | |
28 (r"^# .*\n.*\.\s+$", "don't add trailing period on summary line"), | 29 (r"^# .*\n.*\.\s+$", "don't add trailing period on summary line"), |
29 (r"^# .*\n.{78,}", "summary line too long"), | 30 (r"^# .*\n.{78,}", "summary line too long"), |
30 (r"^\+\n \n", "adds double empty line"), | 31 (r"^\+\n \n", "adds double empty line"), |
31 (r"\+\s+def [a-z]+_[a-z]", "adds a function with foo_bar naming"), | 32 (r"\+\s+def [a-z]+_[a-z]", "adds a function with foo_bar naming"), |
32 ] | 33 ] |