Mercurial > public > mercurial-scm > hg
comparison contrib/check-code.py @ 28595:adda6dee600e
check-code: also ban strcat
We're not using it now, so it's easy to ban.
author | Augie Fackler <augie@google.com> |
---|---|
date | Sat, 19 Mar 2016 20:49:02 -0400 |
parents | d3990da51637 |
children | 35ad5bcdeb7e |
comparison
equal
deleted
inserted
replaced
28594:d3990da51637 | 28595:adda6dee600e |
---|---|
358 (r'\w\s=\s\s+\w', "gratuitous whitespace after ="), | 358 (r'\w\s=\s\s+\w', "gratuitous whitespace after ="), |
359 (r'^#\s+\w', "use #foo, not # foo"), | 359 (r'^#\s+\w', "use #foo, not # foo"), |
360 (r'[^\n]\Z', "no trailing newline"), | 360 (r'[^\n]\Z', "no trailing newline"), |
361 (r'^\s*#import\b', "use only #include in standard C code"), | 361 (r'^\s*#import\b', "use only #include in standard C code"), |
362 (r'strcpy\(', "don't use strcpy, use strlcpy or memcpy"), | 362 (r'strcpy\(', "don't use strcpy, use strlcpy or memcpy"), |
363 (r'strcat\(', "don't use strcat"), | |
363 ], | 364 ], |
364 # warnings | 365 # warnings |
365 [] | 366 [] |
366 ] | 367 ] |
367 | 368 |