"""
line_num = 1
for line in lines:
- length = len(line.rstrip())
+ length = len(line.rstrip('\n'))
if length > max_length:
print '%s:%d:Line exceeds %d chars (%d)' % (filename, line_num,
max_length, length)
trailing_whitespace_re = re.compile(r'\s+$')
line_num = 1
for line in lines:
- if trailing_whitespace_re.match(line.rstrip()):
+ if trailing_whitespace_re.match(line.rstrip('\n')):
print '%s:%d:Trailing whitespace' % (filename, line_num)
line_num += 1