summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--utils/checkpackagelib/lib_mk.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/utils/checkpackagelib/lib_mk.py b/utils/checkpackagelib/lib_mk.py
index 86e9aa2d97..0e430a2f12 100644
--- a/utils/checkpackagelib/lib_mk.py
+++ b/utils/checkpackagelib/lib_mk.py
@@ -251,3 +251,13 @@ class UselessFlag(_CheckFunction):
"({}#_infrastructure_for_autotools_based_packages)"
.format(self.filename, lineno, self.url_to_manual),
text]
+
+
+class VariableWithBraces(_CheckFunction):
+ VARIABLE_WITH_BRACES = re.compile(r"^[^#].*[^$]\${\w+}")
+
+ def check_line(self, lineno, text):
+ if self.VARIABLE_WITH_BRACES.match(text.rstrip()):
+ return ["{}:{}: use $() to delimit variables, not ${{}}"
+ .format(self.filename, lineno),
+ text]
OpenPOWER on IntegriCloud