Mercurial > public > mercurial-scm > hg
comparison contrib/check-code.py @ 19731:436a3f728375
check-code: make casting style check more precise
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 17 Sep 2013 18:13:54 -0500 |
parents | 3193b23eec61 |
children | 1abd45e2553a |
comparison
equal
deleted
inserted
replaced
19730:d184bae667e4 | 19731:436a3f728375 |
---|---|
286 (r'.{81}', "line too long"), | 286 (r'.{81}', "line too long"), |
287 (r'(while|if|do|for)\(', "use space after while/if/do/for"), | 287 (r'(while|if|do|for)\(', "use space after while/if/do/for"), |
288 (r'return\(', "return is not a function"), | 288 (r'return\(', "return is not a function"), |
289 (r' ;', "no space before ;"), | 289 (r' ;', "no space before ;"), |
290 (r'\w+\* \w+', "use int *foo, not int* foo"), | 290 (r'\w+\* \w+', "use int *foo, not int* foo"), |
291 (r'\([^\)]+\) \w+', "use (int)foo, not (int) foo"), | 291 (r'\W\([^\)]+\) \w+', "use (int)foo, not (int) foo"), |
292 (r'\w+ (\+\+|--)', "use foo++, not foo ++"), | 292 (r'\w+ (\+\+|--)', "use foo++, not foo ++"), |
293 (r'\w,\w', "missing whitespace after ,"), | 293 (r'\w,\w', "missing whitespace after ,"), |
294 (r'^[^#]\w[+/*]\w', "missing whitespace in expression"), | 294 (r'^[^#]\w[+/*]\w', "missing whitespace in expression"), |
295 (r'^#\s+\w', "use #foo, not # foo"), | 295 (r'^#\s+\w', "use #foo, not # foo"), |
296 (r'[^\n]\Z', "no trailing newline"), | 296 (r'[^\n]\Z', "no trailing newline"), |