[PATCH] check-code: also ban strcat

Augie Fackler raf at durin42.com
Sat Mar 19 20:52:09 EDT 2016


# HG changeset patch
# User Augie Fackler <augie at google.com>
# Date 1458434942 14400
#      Sat Mar 19 20:49:02 2016 -0400
# Node ID 102b415fc624f1a5f9243e0dd7448233af332d5c
# Parent  d3990da5163799db2b26b27956cb366c5a070d28
check-code: also ban strcat

We're not using it now, so it's easy to ban.

diff --git a/contrib/check-code.py b/contrib/check-code.py
--- a/contrib/check-code.py
+++ b/contrib/check-code.py
@@ -360,6 +360,7 @@ cpats = [
     (r'[^\n]\Z', "no trailing newline"),
     (r'^\s*#import\b', "use only #include in standard C code"),
     (r'strcpy\(', "don't use strcpy, use strlcpy or memcpy"),
+    (r'strcat\(', "don't use strcat"),
   ],
   # warnings
   []


More information about the Mercurial-devel mailing list