summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas.sandberg@arm.com>2016-03-24 11:11:34 +0000
committerAndreas Sandberg <andreas.sandberg@arm.com>2016-03-24 11:11:34 +0000
commit363b103cc44ff16fbc3f1179f95fc800db042397 (patch)
tree8e93caa4090f0342fb03e5f69c97af210bc81248
parent8d8e926b04702e891553198bed99ef55f018d160 (diff)
downloadgem5-363b103cc44ff16fbc3f1179f95fc800db042397.tar.xz
style: Strip newline when checking lines
The style checker incorrectly includes newlines when checking lines of code, which effectively decreases the column limit by 1. This changeset strips the newline character from before calling line checkers. Change-Id: I0a8c7707ece57d782d11cc86db4b8064db291ce0 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
-rw-r--r--util/style.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/util/style.py b/util/style.py
index 7ee58dfa6..36d5ae0a1 100644
--- a/util/style.py
+++ b/util/style.py
@@ -236,6 +236,7 @@ class Verifier(object):
for num,line in enumerate(f):
if num not in regions:
continue
+ line = line.rstrip('\n')
if not self.check_line(line):
self.write("invalid %s in %s:%d\n" % \
(self.test_name, filename, num + 1))