From 4ba3d27d6dac5d4c4a59b3632b4228cd3da57841 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Sat, 19 Jan 2008 10:46:59 +0000 Subject: [PATCH] Merged from trunk 9205:9206 | 9206 | Check for quoted ${A}. Thanks to maekke for this patch. | | zmedico | | svn path=/main/branches/prefix/; revision=9207 --- pym/repoman/checks.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py index b4f1b016e..2c8d25e2f 100644 --- a/pym/repoman/checks.py +++ b/pym/repoman/checks.py @@ -190,10 +190,21 @@ class Autotools(LineCheck): return ("Direct calls to '%s'" % m.group(2)) + \ " instead of using autotools.eclass on line: %d" +class EbuildQuotedA(LineCheck): + """Ensure ebuilds have no quoting around ${A}""" + + repoman_check_name = 'ebuild.minorsyn' + a_quoted = re.compile(r'.*\"\$(\{A\}|A)\"') + + def check(self, num, line): + match = self.a_quoted.match(line) + if match: + return "Quoted \"${A}\" on line: %d" + _constant_checks = tuple((c() for c in (Autotools, EbuildWhitespace, EbuildQuote, EbuildAssignment, EbuildUselessDodoc, - EbuildUselessCdS, EbuildNestedDie))) + EbuildUselessCdS, EbuildNestedDie, EbuildQuotedA))) def run_checks(contents, st_mtime): checks = list(_constant_checks) -- 2.26.2