bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] maint: enforce one small aspect of formatting style: space-b


From: Eric Blake
Subject: Re: [PATCH] maint: enforce one small aspect of formatting style: space-before-"("
Date: Sat, 20 Mar 2010 06:12:33 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc12 Lightning/1.0b1 Thunderbird/3.0.3

On 03/20/2010 05:24 AM, Jim Meyering wrote:
> +_space_before_paren_exempt =? \\n\\$$
> +_space_before_paren_exempt = \
> +  (\\n\\$$|%s\(to %s|delimit-method|(date|group|character)\(s\))
> +# Ensure that there is a space before each open parenthesis in C code.
> +sc_space_before_open_paren:
> +     @if $(VC_LIST_EXCEPT) | grep -l '\.[ch]$$' > /dev/null; then    \
> +       if (cpp -fpreprocessed < /dev/null > /dev/null 2>&1); then    \
> +         fail=0;                                                     \
> +         for c in $$($(VC_LIST_EXCEPT) | grep '\.[ch]$$'); do        \
> +           cpp -fpreprocessed $$c 2>/dev/null                        \
> +             | grep -ni '[[:alnum:]]('                               \
> +             | grep -vE '$(_space_before_paren_exempt)'              \
> +             | grep . && { fail=1; echo "*** $$c"; };                \
> +         done;                                                       \
> +         test $$fail = 1 &&                                          \
> +           { echo '$(ME): the above files lack a space-before-open-paren' \
> +               1>&2; exit 1; } || :;                                 \
> +       else                                                          \
> +         echo '$(ME): skipping test $@: cppi not installed' 1>&2;    \

Too much copy-n-paste?  The error message should really be talking about
'cpp -fpreprocessed'.

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]