]> Git Repo - linux.git/commitdiff
scripts/checkpatch.pl: reset rpt_cleaners warnings
authorMike Frysinger <[email protected]>
Tue, 22 Mar 2011 23:34:43 +0000 (16:34 -0700)
committerLinus Torvalds <[email protected]>
Wed, 23 Mar 2011 00:44:15 +0000 (17:44 -0700)
If you run checkpatch against multiple patches, and one of them has a
whitespace issue which can be helped via a script (rpt_cleaners), you will
see the same NOTE over and over for all subsequent patches.  It makes it
seem like those patches also have whitespace problems when in reality,
there's only one or two bad apples.

So reset rpt_cleaners back to 0 after we've issued the note so that it
only shows up near the patch with the actual problems.

Signed-off-by: Mike Frysinger <[email protected]>
Cc: Andy Whitcroft <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
scripts/checkpatch.pl

index dfd9b310a1cc39f238ec84cac442b1507d2729d6..19abef2b4dd522a0cfa0f199a37078e055391fc1 100755 (executable)
@@ -2944,6 +2944,7 @@ sub process {
                if ($rpt_cleaners) {
                        print "NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch or\n";
                        print "      scripts/cleanfile\n\n";
+                       $rpt_cleaners = 0;
                }
        }
 
This page took 0.057287 seconds and 4 git commands to generate.