diff options
Diffstat (limited to 'pym/repoman')
-rw-r--r-- | pym/repoman/checks.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py index 9c076ead4..7e3d4b875 100644 --- a/pym/repoman/checks.py +++ b/pym/repoman/checks.py @@ -221,21 +221,13 @@ class EbuildAssignment(LineCheck): """Ensure ebuilds don't assign to readonly variables.""" repoman_check_name = 'variable.readonly' - readonly_assignment = re.compile(r'^\s*(export\s+)?(A|CATEGORY|P|PV|PN|PR|PVR|PF|D|WORKDIR|FILESDIR|FEATURES|USE)=') - line_continuation = re.compile(r'([^#]*\S)(\s+|\t)\\$') - ignore_line = re.compile(r'(^$)|(^(\t)*#)') - ignore_comment = False - - def __init__(self): - self.previous_line = None def check(self, num, line): match = self.readonly_assignment.match(line) e = None - if match and (not self.previous_line or not self.line_continuation.match(self.previous_line)): + if match is not None: e = errors.READONLY_ASSIGNMENT_ERROR - self.previous_line = line return e class Eapi3EbuildAssignment(EbuildAssignment): |