[PATCH 3 of 3 V4] test_code: in C code, prevent space before closing parenthese

Augie Fackler raf at durin42.com
Tue Mar 24 15:53:29 CDT 2015


On Tue, Mar 24, 2015 at 01:48:55PM -0700, Laurent Charignon wrote:
> # HG changeset patch
> # User Laurent Charignon <lcharignon at fb.com>
> # Date 1427226773 25200
> #      Tue Mar 24 12:52:53 2015 -0700
> # Node ID f10b6515428db9de1f1dbfa1fa747d815d9b95cc
> # Parent  b425123efec6b39be5b426e67766b4bbd5361369
> test_code: in C code, prevent space before closing parenthese

I've queued this one with a fixed summary (check-code rather than
test_code). Thanks!

>
> diff --git a/contrib/check-code.py b/contrib/check-code.py
> --- a/contrib/check-code.py
> +++ b/contrib/check-code.py
> @@ -334,6 +334,7 @@
>      (r'(while|if|do|for)\(', "use space after while/if/do/for"),
>      (r'return\(', "return is not a function"),
>      (r' ;', "no space before ;"),
> +    (r'[^;] \)', "no space before )"),
>      (r'[)][{]', "space between ) and {"),
>      (r'\w+\* \w+', "use int *foo, not int* foo"),
>      (r'\W\([^\)]+\) \w+', "use (int)foo, not (int) foo"),
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list