lkml.org 
[lkml]   [2015]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] checkpatch: Emit "NOTE: <types>" message only once after multiple files
From
Date
Make this message similar to the "false positives" message
and emit it only once when scanning multiple files instead
of after each file scanned.

Signed-off-by: Joe Perches <joe@perches.com>
---
scripts/checkpatch.pl | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 69c4716..cb896a5 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -203,7 +203,7 @@ sub hash_save_array_words {
sub hash_show_words {
my ($hashRef, $prefix) = @_;

- if ($quiet == 0 && keys %$hashRef) {
+ if (keys %$hashRef) {
print "\nNOTE: $prefix message types:";
foreach my $word (sort keys %$hashRef) {
print " $word";
@@ -770,6 +770,9 @@ for my $filename (@ARGV) {
}

if (!$quiet) {
+ hash_show_words(\%use_type, "Used");
+ hash_show_words(\%ignore_type, "Ignored");
+
if ($^V lt 5.10.0) {
print << "EOM"

@@ -5644,9 +5647,6 @@ EOM
}
}

- hash_show_words(\%use_type, "Used");
- hash_show_words(\%ignore_type, "Ignored");
-
if ($clean == 0 && $fix &&
("@rawlines" ne "@fixed" ||
$#fixed_inserted >= 0 || $#fixed_deleted >= 0)) {



\
 
 \ /
  Last update: 2015-06-17 19:41    [W:0.023 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site