summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2007-07-28 16:55:51 -0700
committerNathan Binkert <nate@binkert.org>2007-07-28 16:55:51 -0700
commit9aed27efb39d3a842adc9e4832afe7bfed4be9e7 (patch)
treef533784609cf0dc7342053a237cddf86c10fd5be
parentc27e23f2e8698b2eccf68eb13b87c3641caa4edb (diff)
downloadgem5-9aed27efb39d3a842adc9e4832afe7bfed4be9e7.tar.xz
style: fix stupid bugs
--HG-- extra : convert_revision : ef3dcc3a160eb19a6c4fcdcd411d392aa42e4efe
-rw-r--r--util/style.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/util/style.py b/util/style.py
index 77c08307b..897617779 100644
--- a/util/style.py
+++ b/util/style.py
@@ -85,7 +85,7 @@ def checkwhite_line(line):
return True
def checkwhite(filename):
- if not whitespace_file(filename)
+ if not whitespace_file(filename):
return
try:
@@ -115,7 +115,7 @@ def fixwhite_line(line, tabsize):
return line.rstrip() + '\n'
def fixwhite(filename, tabsize, fixonly=None):
- if not whitespace_file(filename)
+ if not whitespace_file(filename):
return
try:
@@ -390,9 +390,10 @@ if __name__ == '__main__':
fixwhite(filename, tabsize)
elif command == 'chkwhite':
for filename in args:
- line = checkwhite(filename)
- if line:
- print 'invalid whitespace at %s:%d' % (filename, line)
+ for line,num in checkwhite(filename):
+ print 'invalid whitespace: %s:%d' % (filename, num)
+ if verbose:
+ print '>>%s<<' % line[:-1]
elif command == 'chkformat':
stats = ValidationStats()
for filename in files: