From: Andreas Sandberg Date: Fri, 1 Jul 2016 14:35:52 +0000 (+0100) Subject: style: Fix incorrect references style verifiers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=57e3f401006567f8cfd113133a6ba2518f7ee9c2;p=gem5.git style: Fix incorrect references style verifiers The style checker for spacing around control statements (ControlSpace) and the whitespace checker (Whitespace) didn't refer to some of their configuration variables correctly. This changeset fixes those issues. Reported-by: Jason Lowe-Power --HG-- extra : amend_source : 05d82d27d4c42aacd78b514d3ca35ca5744164bb --- diff --git a/util/style/verifiers.py b/util/style/verifiers.py index b798f5553..8a02db1a1 100644 --- a/util/style/verifiers.py +++ b/util/style/verifiers.py @@ -272,7 +272,8 @@ class Whitespace(LineVerifier): if c == ' ': newline += ' ' elif c == '\t': - newline += ' ' * (tabsize - len(newline) % tabsize) + newline += ' ' * (style.tabsize - \ + len(newline) % style.tabsize) else: newline += line[i:] break @@ -349,7 +350,7 @@ class ControlSpace(LineVerifier): return not (match and match.group(2) != " ") def fix_line(self, line, **kwargs): - new_line = _any_control.sub(r'\1 (', line) + new_line = ControlSpace._any_control.sub(r'\1 (', line) return new_line