39 "summary keyword should be most user-relevant one-word command or topic"), |
39 "summary keyword should be most user-relevant one-word command or topic"), |
40 (afterheader + r".*\.\s*\n", "don't add trailing period on summary line"), |
40 (afterheader + r".*\.\s*\n", "don't add trailing period on summary line"), |
41 (afterheader + r".{79,}", "summary line too long (limit is 78)"), |
41 (afterheader + r".{79,}", "summary line too long (limit is 78)"), |
42 (r"\n\+\n( |\+)\n", "adds double empty line"), |
42 (r"\n\+\n( |\+)\n", "adds double empty line"), |
43 (r"\n \n\+\n", "adds double empty line"), |
43 (r"\n \n\+\n", "adds double empty line"), |
44 (r"\n\+[ \t]+def [a-z]+_[a-z]", "adds a function with foo_bar naming"), |
44 # Forbid "_" in function name. |
|
45 # |
|
46 # We skip the check for cffi related functions. They use names mapping the |
|
47 # name of the C function. C function names may contain "_". |
|
48 (r"\n\+[ \t]+def (?!cffi)[a-z]+_[a-z]", |
|
49 "adds a function with foo_bar naming"), |
45 ] |
50 ] |
46 |
51 |
47 word = re.compile('\S') |
52 word = re.compile('\S') |
48 def nonempty(first, second): |
53 def nonempty(first, second): |
49 if word.search(first): |
54 if word.search(first): |