contrib/check-commit
changeset 29716 37b6f0ec6241
parent 29164 91f35b1a34cf
child 30061 8e805cf27caa
--- a/contrib/check-commit	Fri Aug 05 13:08:11 2016 -0400
+++ b/contrib/check-commit	Fri Aug 05 17:27:51 2016 -0400
@@ -41,7 +41,12 @@
     (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\+[ \t]+def [a-z]+_[a-z]", "adds a function with foo_bar naming"),
+    # Forbid "_" in function name.
+    #
+    # We skip the check for cffi related functions. They use names mapping the
+    # name of the C function. C function names may contain "_".
+    (r"\n\+[ \t]+def (?!cffi)[a-z]+_[a-z]",
+     "adds a function with foo_bar naming"),
 ]
 
 word = re.compile('\S')