syntax-check: Simplify VC_LIST_ALWAYS_EXCLUDE_REGEX

Most of the pattern is no longer relevant, because the files it
was intended to match have been dropped from the repository.

Specifically:

               files        commit        date
  ------------------  ------------  ----------
               *.gif  6cb131e5cb  2022-01-19
               *.fig  9ad637c965  2020-07-10
  docs/news*.html.in  f45735786a  2020-06-02
        docs/*.patch  6be034a8c0  2018-08-23

We can also avoid having a fallback value for the pattern: that
made sense when the implementation was coming from gnulib, as
they wouldn't be able to know in advance if the user would need
to provide their own exclude patterns, but that scenario is no
longer relevant to us.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Andrea Bolognani 2022-05-23 14:41:08 +02:00
parent 39d1c78967
commit ab305ad5ca

View File

@ -40,10 +40,6 @@ _equal = $(and $(findstring $(1),$(2)),$(findstring $(2),$(1)))
VC_LIST = cd $(top_srcdir); git ls-tree -r 'HEAD:' | \
sed -n "s|^100[^ ]*.||p"
# You can override this variable in syntax-check.mk to set your own regexp
# matching files to ignore.
VC_LIST_ALWAYS_EXCLUDE_REGEX ?= ^$$
# This is to preprocess robustly the output of $(VC_LIST), so that even
# when $(top_srcdir) is a pathological name like "....", the leading sed command
# removes only the intended prefix.
@ -110,7 +106,7 @@ syntax-check: $(local-check)
# Files that should never cause syntax check failures.
VC_LIST_ALWAYS_EXCLUDE_REGEX = \
(^(docs/(news(-[0-9]*)?\.html\.in|.*\.patch))|\.(po|fig|gif|ico|png))$$
\.(po|ico|png)$$
# Avoid uses of write(2). Either switch to streams (fwrite), or use
# the safewrite wrapper.