Fix partially ignored checks

When a check has only a subset of its
codes requested to be ignored we need
to make sure when we run that check that
we still skip the codes that were requested
to be ignored (and let the ones that were
not requested passthrough).

Change-Id: I05f419a8d99fa0cd9cea50e264e2a4c4a64376bd
This commit is contained in:
Joshua Harlow 2014-08-16 18:40:56 -07:00
parent 0499ba81bd
commit 0372073a63
1 changed files with 4 additions and 0 deletions

View File

@ -232,6 +232,8 @@ def main():
continue
if isinstance(c, checks.ContentCheck):
for line_num, code, message in c.report_iter(f):
if code in ignoreables:
continue
if args.get('verbose'):
print(' - %s:%s: %s %s'
% (f.filename, line_num, code, message))
@ -242,6 +244,8 @@ def main():
elif isinstance(c, checks.LineCheck):
for line_num, line in enumerate(f.lines_iter(), 1):
for code, message in c.report_iter(line):
if code in ignoreables:
continue
if args.get('verbose'):
print(' - %s:%s: %s %s'
% (f.filename, line_num, code, message))