Fix the EbuildQuote check to ignore "echo" and the elog functions since
authorZac Medico <zmedico@gentoo.org>
Sun, 27 Apr 2008 21:25:20 +0000 (21:25 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 27 Apr 2008 21:25:20 +0000 (21:25 -0000)
people might not want quotes in those cases.

svn path=/main/trunk/; revision=10006

pym/repoman/checks.py

index bc1c2911547fa38ebcd62175f4fae259301463e1..8f9fd1abca329c5090293a270b04dbb8929abc21 100644 (file)
@@ -76,7 +76,10 @@ class EbuildQuote(LineCheck):
        """Ensure ebuilds have valid quoting around things like D,FILESDIR, etc..."""
 
        repoman_check_name = 'ebuild.minorsyn'
-       ignore_line = re.compile(r'(^$)|(^\s*#.*)|(^\s*\w+=.*)|(^\s*(local|export)\s+)')
+       _ignored_commands = ["echo", "local", "export"]
+       _ignored_commands += ["eerror", "einfo", "elog", "eqawarn", "ewarn"]
+       ignore_line = re.compile(r'(^$)|(^\s*#.*)|(^\s*\w+=.*)' + \
+               r'|(^\s*(' + "|".join(_ignored_commands) + r')\s+)')
        var_names = ["D", "DISTDIR", "FILESDIR", "S", "T", "ROOT", "WORKDIR"]
 
        # variables for games.eclass