changeset ddfc7795d8f8 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=ddfc7795d8f8
description:
        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 <[email protected]>

diffstat:

 util/style.py |  1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diffs (11 lines):

diff -r 032bc62120eb -r ddfc7795d8f8 util/style.py
--- a/util/style.py     Mon Mar 21 15:54:58 2016 +0000
+++ b/util/style.py     Thu Mar 24 11:11:34 2016 +0000
@@ -236,6 +236,7 @@
         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))
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to