From patchwork Sun Mar 20 00:52:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: check-code: also ban strcat From: Augie Fackler X-Patchwork-Id: 13972 Message-Id: <102b415fc624f1a5f924.1458435129@augie-macbookair2.roam.corp.google.com> To: mercurial-devel@mercurial-scm.org Date: Sat, 19 Mar 2016 20:52:09 -0400 # HG changeset patch # User Augie Fackler # 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 []