bison-patches
[Top][All Lists]
Advanced

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

Re: [PATCH 5/5] maint: more syntax-checks


From: Akim Demaille
Subject: Re: [PATCH 5/5] maint: more syntax-checks
Date: Fri, 21 Dec 2012 18:13:16 +0100

Hi Stefano,

Le 21 déc. 2012 à 17:53, Stefano Lattarini <address@hidden> a écrit :

>> +# Prohibit the use of `...` in tests/.  Use $(...) instead.
>> +# Taken from Coreutils.
>> +sc_prohibit_test_backticks:
>> +    @prohibit='`' in_vc_files='^tests/'                             \
>> +    halt='use $$(...), not `...` in tests/'                         \
>> +      $(_sc_search_regexp)
>> +
>> 
> Are you actually ensuring the testsuite is using a POSIX shell?  If
> yes, well done (and yay! for you).  If not, I fear you'd have to
> actually stick to `...` and avoid $(...), for the sake of brain-dead
> shells like the /bin/sh of Solaris.  Or at least skip the tests,
> vocally and loudly telling the user to get and use a POSIX shell.

We're using Autotest, and I expect it does this for us.  Well,
at least there is code about that in it.

But this test does not work.  At least not in my case:
in_vc_files is not taking the VPATH builds into account.
This is something that will have to be addressed from
maint.mk, for the time being, I'll disable this part,
as, fixed, it fires on many false positive.

Thanks!

>> +# Enforce recommended preprocessor indentation style.
>> +# Taken from Coreutils.
>> +sc_preprocessor_indentation:
>> +    @if cppi --version >/dev/null 2>&1; then                        \
>> +      $(VC_LIST_EXCEPT) | grep '\.[ch]$$' | xargs cppi -a -c        \
>> +        || { echo '$(ME): incorrect preprocessor indentation' 1>&2; \
>> +            exit 1; };                                              \
>> +    else                                                            \
>> +      echo '$(ME): skipping test $@: cppi not installed' 1>&2;      \
>> +    fi
>> +
>> +###########################################################
>> +# Taken from the Coreitil
>> 
> Typo here.

Thanks.  I pushed the following.

commit bd04adb4c8d81f30d2cb80cdb6ea04bd4c08da6d
Author: Akim Demaille <address@hidden>
Date:   Fri Dec 21 18:11:34 2012 +0100

    maint: disable sc_prohibit_test_backticks
    
    * cfg.mk: here.
    And fix typos.
    Reported by Stefano Lattarini.

diff --git a/cfg.mk b/cfg.mk
index 3036ee8..ea9806f 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -81,10 +81,11 @@ sc_prohibit_tab_based_indentation:
 
 # Prohibit the use of `...` in tests/.  Use $(...) instead.
 # Taken from Coreutils.
-sc_prohibit_test_backticks:
-       @prohibit='`' in_vc_files='^tests/'                             \
-       halt='use $$(...), not `...` in tests/'                         \
-         $(_sc_search_regexp)
+# Not ready for Bison yet.
+#sc_prohibit_test_backticks:
+#      @prohibit='`' in_vc_files='^tests/'             \
+#      halt='use $$(...), not `...` in tests/'         \
+#        $(_sc_search_regexp)
 
 # Enforce recommended preprocessor indentation style.
 # Taken from Coreutils.
@@ -98,7 +99,7 @@ sc_preprocessor_indentation:
        fi
 
 ###########################################################
-# Taken from the Coreitil
+# Taken from Coreutils.
 _p0 = \([^"'/]\|"\([^\"]\|[\].\)*"\|'\([^\']\|[\].\)*'
 _pre = $(_p0)\|[/][^"'/*]\|[/]"\([^\"]\|[\].\)*"\|[/]'\([^\']\|[\].\)*'\)*
 _pre_anchored = ^\($(_pre)\)




reply via email to

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