From de51993645f9656dfa8a74f6bf9cc85ed56ee8fa Mon Sep 17 00:00:00 2001 From: Heather Date: Mon, 11 Feb 2013 11:41:04 +0400 Subject: [PATCH] nowarn syntax for repoman to ignore --- pym/repoman/checks.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py index 9dd3b959d..3b2b124ba 100644 --- a/pym/repoman/checks.py +++ b/pym/repoman/checks.py @@ -883,17 +883,18 @@ def run_checks(contents, pkg): multiline = line continue - # Finally we have a full line to parse. - is_comment = _ignore_comment_re.match(line) is not None - for lc in checks: - if is_comment and lc.ignore_comment: - continue - if lc.check_eapi(pkg.eapi): - ignore = lc.ignore_line - if not ignore or not ignore.match(line): - e = lc.check(num, line) - if e: - yield lc.repoman_check_name, e % (num + 1) + if not line.endswith("#nowarn\n"): + # Finally we have a full line to parse. + is_comment = _ignore_comment_re.match(line) is not None + for lc in checks: + if is_comment and lc.ignore_comment: + continue + if lc.check_eapi(pkg.eapi): + ignore = lc.ignore_line + if not ignore or not ignore.match(line): + e = lc.check(num, line) + if e: + yield lc.repoman_check_name, e % (num + 1) for lc in checks: i = lc.end() -- 2.26.2