Mercurial > hg
diff contrib/check-commit @ 28013:e529b5f1b9e3
check-commit: check for double-addition of blank lines
Previously, we were only checking for a blank line being added next to
an existing one. Now we also check for two being added at the same time.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 05 Feb 2016 16:54:01 -0600 |
parents | 897b2fcf079f |
children | 08e0c4082903 |
line wrap: on
line diff
--- a/contrib/check-commit Fri Feb 05 16:52:02 2016 -0600 +++ b/contrib/check-commit Fri Feb 05 16:54:01 2016 -0600 @@ -34,7 +34,7 @@ "summary keyword should be most user-relevant one-word command or topic"), (afterheader + r".*\.\s*\n", "don't add trailing period on summary line"), (afterheader + r".{79,}", "summary line too long (limit is 78)"), - (r"\n\+\n \n", "adds double empty line"), + (r"\n\+\n( |\+)\n", "adds double empty line"), (r"\n \n\+\n", "adds double empty line"), (r"\n\+[ \t]+def [a-z]+_[a-z]", "adds a function with foo_bar naming"), ]