summaryrefslogtreecommitdiff
path: root/util/style
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas.sandberg@arm.com>2016-07-01 15:35:52 +0100
committerAndreas Sandberg <andreas.sandberg@arm.com>2016-07-01 15:35:52 +0100
commit57e3f401006567f8cfd113133a6ba2518f7ee9c2 (patch)
treef36eb321614012a7251b04d3b66470040ece4ed8 /util/style
parent50e9d0df51247f4aeafe63cdab2a0f53a09cc8e4 (diff)
downloadgem5-57e3f401006567f8cfd113133a6ba2518f7ee9c2.tar.xz
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 <power.jg@gmail.com> --HG-- extra : amend_source : 05d82d27d4c42aacd78b514d3ca35ca5744164bb
Diffstat (limited to 'util/style')
-rw-r--r--util/style/verifiers.py5
1 files changed, 3 insertions, 2 deletions
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