]> xenbits.xensource.com Git - libvirt.git/commitdiff
cfg.mk: Simplify backslash alignment check
authorAndrea Bolognani <abologna@redhat.com>
Mon, 4 Dec 2017 10:12:06 +0000 (11:12 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Fri, 15 Dec 2017 12:38:39 +0000 (13:38 +0100)
The use of [[:blank:]] was intended to cover tabs as well, but
it couldn't possibly work in its current form, so the regex was
tweaked in d09429abe826.

With the original reason for using [[:blank:]] now gone, we can
replace its usage with plain spaces. A comment about the purpose
of the check is added as well.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
cfg.mk

diff --git a/cfg.mk b/cfg.mk
index ea10ca19f5129f0f6558e8bc8ace0e97e452e52e..5cdeb7c650805bbf822d322922ee6238fb8d169e 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -1037,8 +1037,10 @@ sc_prohibit_http_urls:
        halt='Links must use https:// protocol' \
          $(_sc_search_regexp)
 
+# Alignment is usually achieved through spaces (at least two of them)
+# or tabs (at least one of them) right before the trailing backslash
 sc_prohibit_backslash_alignment:
-       @prohibit='([[:blank:]][[:blank:]]|     )\\$$' \
+       @prohibit='(  | )\\$$' \
        in_vc_files='*\.([chx]|am|mk)$$' \
        halt='Do not attempt to right-align backslashes' \
          $(_sc_search_regexp)