Make the EbuildUselessCdS check for both quoted and unquoted ${S}
authorZac Medico <zmedico@gentoo.org>
Thu, 1 Nov 2007 17:49:49 +0000 (17:49 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 1 Nov 2007 17:49:49 +0000 (17:49 -0000)
so the user doesn't have to fix quoting before this check will
recognize the violation.

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

pym/repoman/checks.py

index eea7ba40fcae66b474ed62003b16d38e410ded0d..d6fcc13184fbb1cd707225986d4927c80948898b 100644 (file)
@@ -248,7 +248,7 @@ class EbuildUselessCdS(ContentCheck):
        """Check for redundant cd ${S} statements"""
        repoman_check_name = 'ebuild.minorsyn'
        method_re = re.compile(r'^\s*src_(compile|install|test)\s*\(\)')
-       cds_re = re.compile(r'^\s*cd\s+"\$(\{S\}|S)"\s')
+       cds_re = re.compile(r'^\s*cd\s+("\$(\{S\}|S)"|\$(\{S\}|S))\s')
 
        def __init__(self, contents):
                ContentCheck.__init__(self, contents)