repoman: variable.usedwithhelpers ignore quoted
authorZac Medico <zmedico@gentoo.org>
Mon, 28 Feb 2011 20:37:22 +0000 (12:37 -0800)
committerZac Medico <zmedico@gentoo.org>
Mon, 28 Feb 2011 20:37:22 +0000 (12:37 -0800)
pym/repoman/checks.py

index 566984a51707730320456514e6b798b70be70417..200b542bb8ab3d39341a4fa4fc861fbd08e3cd0c 100644 (file)
@@ -333,7 +333,9 @@ class NoOffsetWithHelpers(LineCheck):
        helpers """
 
        repoman_check_name = 'variable.usedwithhelpers'
-       re = re.compile(r'^[^#]*\b(dodir|dohard|exeinto|insinto|into)\s+"?\$\{?(D|ROOT|ED|EROOT|EPREFIX)\b.*')
+       # Ignore matches in quoted strings like this:
+       # elog "installed into ${ROOT}usr/share/php5/apc/."
+       re = re.compile(r'^[^#"\']*\b(dodir|dohard|exeinto|insinto|into)\s+"?\$\{?(D|ROOT|ED|EROOT|EPREFIX)\b.*')
        error = errors.NO_OFFSET_WITH_HELPERS
 
 class ImplicitRuntimeDeps(LineCheck):