repoman: variable.usedwithhelpers ignore comments
authorZac Medico <zmedico@gentoo.org>
Sun, 13 Feb 2011 07:50:08 +0000 (23:50 -0800)
committerZac Medico <zmedico@gentoo.org>
Sun, 13 Feb 2011 07:50:08 +0000 (23:50 -0800)
This will fix bug #354685.

pym/repoman/checks.py

index 7e5a8a18acef964f4b7971781ebc824647d078a8..8f61c07c4546e2e22f143fea17c9e933db32ba43 100644 (file)
@@ -333,7 +333,7 @@ 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)\}?.*')
+       re = re.compile(r'^[^#]*\b(dodir|dohard|exeinto|insinto|into)\s+"?\$\{?(D|ROOT|ED|EROOT|EPREFIX)\}?.*')
        error = errors.NO_OFFSET_WITH_HELPERS
 
 class ImplicitRuntimeDeps(LineCheck):