From: Nicolas Cavallari Date: Wed, 7 Mar 2018 09:48:12 +0000 (+0100) Subject: check-package: Flag usage of '\t \\$'. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=42be6b6153ba0fdbd2152944e86f7cb180b55012;p=buildroot.git check-package: Flag usage of '\t \\$'. check-package would flag tabs before a backslash ('\t\\'), two spaces before a backslash (' \\') but would not flag a tab before space before backslash ('\t \\'), allowing someone to bypass the check. Signed-off-by: Nicolas Cavallari Reviewed-by: Ricardo Martincoski Signed-off-by: Thomas Petazzoni --- diff --git a/utils/checkpackagelib/lib_mk.py b/utils/checkpackagelib/lib_mk.py index 2df2e1a884..cfd4d05117 100644 --- a/utils/checkpackagelib/lib_mk.py +++ b/utils/checkpackagelib/lib_mk.py @@ -123,7 +123,7 @@ class RemoveDefaultPackageSourceVariable(_CheckFunction): class SpaceBeforeBackslash(_CheckFunction): - TAB_OR_MULTIPLE_SPACES_BEFORE_BACKSLASH = re.compile(r"^.*( |\t)\\$") + TAB_OR_MULTIPLE_SPACES_BEFORE_BACKSLASH = re.compile(r"^.*( |\t ?)\\$") def check_line(self, lineno, text): if self.TAB_OR_MULTIPLE_SPACES_BEFORE_BACKSLASH.match(text.rstrip()):