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>
This commit is contained in:
Andreas Sandberg 2016-03-24 11:11:34 +00:00
parent 8d8e926b04
commit 363b103cc4

View file

@ -236,6 +236,7 @@ class Verifier(object):
for num,line in enumerate(f): for num,line in enumerate(f):
if num not in regions: if num not in regions:
continue continue
line = line.rstrip('\n')
if not self.check_line(line): if not self.check_line(line):
self.write("invalid %s in %s:%d\n" % \ self.write("invalid %s in %s:%d\n" % \
(self.test_name, filename, num + 1)) (self.test_name, filename, num + 1))