From 363b103cc44ff16fbc3f1179f95fc800db042397 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Thu, 24 Mar 2016 11:11:34 +0000 Subject: [PATCH] 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 --- util/style.py | 1 + 1 file changed, 1 insertion(+) 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)) -- 2.30.2