[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3] maint.mk: expand the prohibit_doubled_word regex
From: |
Ján Tomko |
Subject: |
Re: [PATCH v3] maint.mk: expand the prohibit_doubled_word regex |
Date: |
Wed, 3 Aug 2016 10:10:59 +0200 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Tue, Aug 02, 2016 at 08:28:36AM -0700, Jim Meyering wrote:
On Tue, Aug 2, 2016 at 6:41 AM, Ján Tomko <address@hidden> wrote:
- /\b(then?|[iao]n|i[fst]|but|f?or|at|and|[dt]o)\s+\1\b/gims
+ /\b(?:$(subst $(space),|,$(prohibit_doubled_word_expanded_)))\b/gims
Thank you. I am preparing to push that, but with an important change:
a quick test showed that it matched way too many lines because
"$(space)" is not defined. Replacing with $(_sp) fixed it:
Oops, that's what I get for testing through libvirt.
Thank you for your patience.
Jan
diff --git a/top/maint.mk b/top/maint.mk
index 7dfc157..868e10f 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -968,7 +968,7 @@ prohibit_doubled_words_ = \
prohibit_doubled_word_expanded_ = \
$(join $(prohibit_doubled_words_),$(addprefix
\s+,$(prohibit_doubled_words_)))
prohibit_doubled_word_RE_ ?= \
- /\b(?:$(subst $(space),|,$(prohibit_doubled_word_expanded_)))\b/gims
+ /\b(?:$(subst $(_sp),|,$(prohibit_doubled_word_expanded_)))\b/gims
prohibit_doubled_word_ = \
-e 'while ($(prohibit_doubled_word_RE_))' \
$(perl_filename_lineno_text_)
signature.asc
Description: Digital signature