[PATCH] check-commit: allow underbars in cffi_-prefix function names
Augie Fackler
raf at durin42.com
Fri Aug 5 21:28:20 UTC 2016
# HG changeset patch
# User Augie Fackler <augie at google.com>
# Date 1470432471 14400
# Fri Aug 05 17:27:51 2016 -0400
# Node ID 91bc284fa60d068f88b988b149a05c0d14aee0b5
# Parent 834b8ac4a7587562dccb527b28606ecf5532e883
check-commit: allow underbars in cffi_-prefix function names
It seems reasonable to give cffi functions slightly more verbose names
in some circumstances, given the way they interface with C.
diff --git a/contrib/check-commit b/contrib/check-commit
--- a/contrib/check-commit
+++ b/contrib/check-commit
@@ -41,7 +41,8 @@ errors = [
(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"),
+ (r"\n\+[ \t]+def (?!cffi)[a-z]+_[a-z]",
+ "adds a function with foo_bar naming"),
]
word = re.compile('\S')
More information about the Mercurial-devel
mailing list