Mercurial > public > mercurial-scm > hg
comparison contrib/check-code.py @ 28594:d3990da51637
check-code: prevent use of strcpy
author | Augie Fackler <augie@google.com> |
---|---|
date | Sat, 19 Mar 2016 20:18:38 -0400 |
parents | 9e3ecb6f4995 |
children | adda6dee600e |
comparison
equal
deleted
inserted
replaced
28593:e60c492a0d9b | 28594:d3990da51637 |
---|---|
357 (r'^[^#]\w[+/*]\w', "missing whitespace in expression"), | 357 (r'^[^#]\w[+/*]\w', "missing whitespace in expression"), |
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 ], | 363 ], |
363 # warnings | 364 # warnings |
364 [] | 365 [] |
365 ] | 366 ] |
366 | 367 |