From 0372073a6336f42de6140c5cd472629d265bffeb Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Sat, 16 Aug 2014 18:40:56 -0700 Subject: [PATCH] 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 --- doc8/main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc8/main.py b/doc8/main.py index afc344b..03be25b 100644 --- a/doc8/main.py +++ b/doc8/main.py @@ -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))