From b0964df557bedd88db1a223491fba615c995484f Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Fri, 7 Jun 2024 15:48:47 +0200 Subject: [PATCH] utils/checkpackagelib: really check variable name Currently, when a package defines an unprefixed variable, but its value contains a properly prefixed expansion (or even just the name of a variable), there is not error reported (e.g. with the recently fixed composer issue): BASE_SITE = https://getcomposer.org/download/$(COMPOSER_VERSION)/composer.phar The reason is that he check is done on the whole line, rather than on the variable that is being set. We fix that by really looking at the variable we found, instead of looking in the whole line. Signed-off-by: Yann E. MORIN Cc: Ricardo Martincoski Signed-off-by: Arnout Vandecappelle --- utils/checkpackagelib/lib_mk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/checkpackagelib/lib_mk.py b/utils/checkpackagelib/lib_mk.py index 1e6bd708a5..d21e409b4c 100644 --- a/utils/checkpackagelib/lib_mk.py +++ b/utils/checkpackagelib/lib_mk.py @@ -316,7 +316,7 @@ class TypoInPackageVariable(_CheckFunction): if self.ALLOWED.match(variable): return - if self.REGEX.search(text) is None: + if self.REGEX.search(variable) is None: return ["{}:{}: possible typo: {} -> *{}*" .format(self.filename, lineno, variable, self.package), text]