Check for quoted ${A}. Thanks to maekke for this patch. (trunk r9206)
authorZac Medico <zmedico@gentoo.org>
Thu, 31 Jan 2008 06:18:40 +0000 (06:18 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 31 Jan 2008 06:18:40 +0000 (06:18 -0000)
svn path=/main/branches/2.1.2/; revision=9240

bin/repoman

index fdd57f32cac6199a34d1e6170a9ac34c45d7ecb8..674aa61fd11d52ce546aa5c63e7ba033186940fc 100755 (executable)
@@ -1029,9 +1029,20 @@ 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,
        EbuildQuote, EbuildUselessDodoc, EbuildUselessCdS,
-       EbuildNestedDie)))
+       EbuildNestedDie, EbuildQuotedA)))
 
 def run_checks(contents):
        for num, line in enumerate(contents):