[libvirt] [PATCH 1/2] cfg.mk: override gnulib's undesirable_word_seq check

Peter Krempa pkrempa at redhat.com
Wed Jun 15 10:23:23 UTC 2016


On Tue, Jun 14, 2016 at 15:07:27 +0200, Ján Tomko wrote:
> The regex in gnulib checks if @xref is at the beginning
> of a sentence, amongst other things.
> 
> Since we do not use Texinfo and the regex takes almost twice
> as much as the rest of our checks, use a custom regex without
> the @xref chcecks.
> ---
> I do not know whether the gnulib regex can be optimized:
> 
> bad_xref_re_ ?= (?:[\w,:;] +|(?:see|also)\s+)\@xref\{
> bad_pxref_re_ ?= (?:[.!?]|(?:see|also))\s+\@pxref\{
> prohibit_undesirable_word_seq_RE_ ?=                    \
>   /(?:\bcan\s+not\b|$(bad_xref_re_)|$(bad_pxref_re_))/gims
> 
> Either way, we do not need to check for xref in libvirt.
> 
>  cfg.mk | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/cfg.mk b/cfg.mk
> index 2939458..e7db9a6 100644
> --- a/cfg.mk
> +++ b/cfg.mk
> @@ -1299,3 +1299,8 @@ exclude_file_name_regexp--sc_prohibit_dt_without_code = \
>  
>  exclude_file_name_regexp--sc_prohibit_always-defined_macros = \
>    ^tests/virtestmock.c$$
> +
> +# gnulib's CPU-hungry regex also checks if @xref starts a sequence
> +# Use a custom regex since we do not use Texinfo
> +prohibit_undesirable_word_seq_RE_ = \
> +  /(?:\bcan\s+not\b)/gims

Why don't we drop this very pointless check at all?




More information about the libvir-list mailing list