comparison contrib/check-commit @ 27199:8f5735b4aca5

check-commit: remove confusion between summary line and other headers The pull url header can easily grow over 80 chars. The check-commit script was confusing this with a too long summary line. We update the regular expression to not match other header.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 06 Nov 2015 17:27:42 -0500
parents 4b0fc75f9403
children e0465035def9
comparison
equal deleted inserted replaced
27198:7df042d0784f 27199:8f5735b4aca5
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[^\n]*: *[A-Z][a-z]\S+", "don't capitalize summary lines"),
29 (r"^# .*\n.*\.\s+$", "don't add trailing period on summary line"), 29 (r"^# .*\n.*\.\s+$", "don't add trailing period on summary line"),
30 (r"^# .*\n.{78,}", "summary line too long (limit is 78)"), 30 (r"^# .*\n[^#].{77,}", "summary line too long (limit is 78)"),
31 (r"^\+\n \n", "adds double empty line"), 31 (r"^\+\n \n", "adds double empty line"),
32 (r"^ \n\+\n", "adds double empty line"), 32 (r"^ \n\+\n", "adds double empty line"),
33 (r"^\+[ \t]+def [a-z]+_[a-z]", "adds a function with foo_bar naming"), 33 (r"^\+[ \t]+def [a-z]+_[a-z]", "adds a function with foo_bar naming"),
34 ] 34 ]
35 35