[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 5/5] maint: more syntax-checks
From: |
Stefano Lattarini |
Subject: |
Re: [PATCH 5/5] maint: more syntax-checks |
Date: |
Fri, 21 Dec 2012 17:53:26 +0100 |
Two minor outsider nits ...
On 12/21/2012 05:11 PM, Akim Demaille wrote:
>
> diff --git a/cfg.mk b/cfg.mk
> index 35f2595..3036ee8 100644
> --- a/cfg.mk
> +++ b/cfg.mk
>
> @@ -67,10 +72,94 @@ sc_at_parser_check:
> halt='use AT_PARSER_CHECK for and only for generated parsers' \
> $(_sc_search_regexp)
>
> +# Indent only with spaces.
> +# Taken from Coreutils.
> +sc_prohibit_tab_based_indentation:
> + @prohibit='^ * ' \
> + halt='TAB in indentation; use only spaces' \
> + $(_sc_search_regexp)
> +
> +# 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.
> +# 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.
Regards,
Stefano
- [PATCH 0/5] {master} more syntax-checks, Akim Demaille, 2012/12/21
- [PATCH 4/5] debug: no longer generate tabs, Akim Demaille, 2012/12/21
- [PATCH 5/5] maint: more syntax-checks, Akim Demaille, 2012/12/21
- Re: [PATCH 5/5] maint: more syntax-checks,
Stefano Lattarini <=
- [PATCH 1/5] tests: be robust to set -e., Akim Demaille, 2012/12/21
- [PATCH 3/5] style changes: run cppi, Akim Demaille, 2012/12/21
- [PATCH 2/5] style changes: untabify, Akim Demaille, 2012/12/21