Skip to content
Snippets Groups Projects
Commit e529b5f1 authored by Matt Mackall's avatar Matt Mackall
Browse files

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.
parent 897b2fcf
No related branches found
No related tags found
No related merge requests found
......@@ -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"),
]
......
......@@ -87,6 +87,10 @@
> @@ -599,7 +599,7 @@
> if opts.get('all'):
>
>
> +
> + some = otherjunk
> +
> +
> + def blah_blah(x):
> + pass
......@@ -102,9 +106,5 @@
This has no topic and ends with a period.
7: don't add trailing period on summary line
This has no topic and ends with a period.
15: adds double empty line
+
16: adds a function with foo_bar naming
+ def blah_blah(x):
19: adds double empty line
+
......@@ -109,3 +109,7 @@
19: adds double empty line
+
20: adds a function with foo_bar naming
+ def blah_blah(x):
23: adds double empty line
+
[1]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment