nowarn syntax for repoman to ignore
authorHeather <Heather@cynede.net>
Mon, 11 Feb 2013 07:41:04 +0000 (11:41 +0400)
committerZac Medico <zmedico@gentoo.org>
Mon, 11 Feb 2013 09:49:46 +0000 (01:49 -0800)
pym/repoman/checks.py

index 9dd3b959d6f078b30f26212e56b02a3ab30ed5a7..3b2b124ba61e5e58d819baf0d33c3a39104394c4 100644 (file)
@@ -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()