Make the EbuildQuote.missing_quotes regex accept single
authorZac Medico <zmedico@gentoo.org>
Sat, 10 Nov 2007 17:31:08 +0000 (17:31 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 10 Nov 2007 17:31:08 +0000 (17:31 -0000)
quotes where it accepts double quotes in order to
eliminate some false positives. Thanks to Krzysiek
Pawlik <nelchael@gentoo.org> for reporting.

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

pym/repoman/checks.py

index 63a09750120a8d35c42c66a96fcf3af8d672c94f..916003e7eb318749005e60dad4dedb494ceb7cb1 100644 (file)
@@ -78,8 +78,8 @@ class EbuildQuote(LineCheck):
        var_names = r'(D|S|T|ROOT|FILESDIR|WORKDIR)'
        var_reference = re.compile(r'\$(\{'+var_names+'\}|' + \
                var_names + '\W)')
-       missing_quotes = re.compile(r'(\s|^)[^"\s]*\$\{?' + var_names + \
-               r'\}?[^"\s]*(\s|$)')
+       missing_quotes = re.compile(r'(\s|^)[^"\'\s]*\$\{?' + var_names + \
+               r'\}?[^"\'\s]*(\s|$)')
        cond_begin =  re.compile(r'(^|\s+)\[\[($|\\$|\s+)')
        cond_end =  re.compile(r'(^|\s+)\]\]($|\\$|\s+)')