summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-01-18 22:58:21 +0000
committerZac Medico <zmedico@gentoo.org>2008-01-18 22:58:21 +0000
commite46e777438bc16ee1e141b43aab50d05a6e42a23 (patch)
tree50c06c0f0bba1bfebd787eac8573d7727740e204
parent00940897396f5d84270220a51c43f407d11a1089 (diff)
downloadportage-e46e777438bc16ee1e141b43aab50d05a6e42a23.tar.gz
portage-e46e777438bc16ee1e141b43aab50d05a6e42a23.tar.bz2
portage-e46e777438bc16ee1e141b43aab50d05a6e42a23.zip
Check for quoted ${A}. Thanks to maekke for this patch.
svn path=/main/trunk/; revision=9206
-rw-r--r--pym/repoman/checks.py13
1 files changed, 12 insertions, 1 deletions
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)