Patchwork [5,of,6] check-code: drop now unused check-code-ignore

login
register
mail settings
Submitter Simon Heimberg
Date Jan. 7, 2014, 9:31 p.m.
Message ID <82f553e09d5345de5481.1389130281@lapsi.heimberg.home>
Download mbox | patch
Permalink /patch/3274/
State Superseded
Commit 2dad90bdf29d4f6fd331bd5cb01f45b422cc863f
Headers show

Comments

Simon Heimberg - Jan. 7, 2014, 9:31 p.m.
# HG changeset patch
# User Simon Heimberg <simohe@besonet.ch>
# Date 1389130191 -3600
#      Tue Jan 07 22:29:51 2014 +0100
# Node ID 82f553e09d5345de54812c257bdc2a819d8027e3
# Parent  6aa029ecd4c902e348a32ab576a7ce9dfbaea449
check-code: drop now unused check-code-ignore

Using check-code-ignore to skip the failures on a line has several
disadvantages:
 * It skips all check-code failures on a line, not only the one it was created
   for.
 * It does not give any hint for which rule it was added, making it difficult to
   see when it is not needed anymore.
So drop this pragma in favor of better alternatives promoted before.

Patch

diff -r 6aa029ecd4c9 -r 82f553e09d53 contrib/check-code.py
--- a/contrib/check-code.py	Tue Jan 07 22:29:44 2014 +0100
+++ b/contrib/check-code.py	Tue Jan 07 22:29:51 2014 +0100
@@ -495,12 +495,7 @@ 
                     n += 1
                 l = prelines[n]
 
-                if "check-code" "-ignore" in l:
-                    if debug:
-                        print "Skipping %s for %s:%s (check-code" "-ignore)" % (
-                            name, f, n)
-                    continue
-                elif ignore and re.search(ignore, l, re.MULTILINE):
+                if ignore and re.search(ignore, l, re.MULTILINE):
                     continue
                 bd = ""
                 if blame: