All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] checkpatch: Make the output better readable
@ 2015-06-01 14:25 Petr Mladek
  2015-06-01 15:50 ` Joe Perches
  2015-06-01 18:02 ` Joe Perches
  0 siblings, 2 replies; 11+ messages in thread
From: Petr Mladek @ 2015-06-01 14:25 UTC (permalink / raw)
  To: Joe Perches, Andy Whitcroft; +Cc: linux-kernel, Petr Mladek

I always have troubles to parse checkpatch.pl output when I check
the whole patchset. It is hard to say which messages belongs to
what patch.

This patch does few small changes to make the output look better
for me:

    + delimit each patch from each other with dashes and empty line
    + remove empty line after the summary
    + print message about false positives only once

Output without this patch:
==========================

total: 0 errors, 0 warnings, 133 lines checked

0015-ring_buffer-Use-iterant-kthreads-API-in-the-ring-buf.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 73 lines checked

0016-ring_buffer-Allow-to-cleanly-freeze-the-ring-buffer-.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 25 lines checked

0017-ring_buffer-Allow-to-exit-the-ring-buffer-benchmark-.patch has no obvious style problems and is ready for submission.
ERROR: Missing Signed-off-by: line(s)

total: 1 errors, 0 warnings, 70 lines checked

0018-kthread-Add-support-for-iteruptible-sleep-with-timeo.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
ERROR: Missing Signed-off-by: line(s)

total: 1 errors, 0 warnings, 34 lines checked

0019-kthread-Allow-to-remove-pause-between-threads-in-ite.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
ERROR: Missing Signed-off-by: line(s)

total: 1 errors, 0 warnings, 12 lines checked

0020-ring_buffer-Use-the-new-API-for-timeouted-sleep-in-t.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
ERROR: Missing Signed-off-by: line(s)

total: 1 errors, 0 warnings, 37 lines checked

0021-jffs2-debug-messages.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
ERROR: Missing Signed-off-by: line(s)

total: 1 errors, 0 warnings, 28 lines checked

0022-test-messages-in-ring_buffer_benchmnark.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
ERROR: Missing Signed-off-by: line(s)

total: 1 errors, 0 warnings, 7 lines checked

0023-debug-messages-in-lockd.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Output with this patch:
=======================

total: 0 errors, 0 warnings, 133 lines checked
0015-ring_buffer-Use-iterant-kthreads-API-in-the-ring-buf.patch has no obvious style problems and is ready for submission.
--------------------------------------------------------------------------------

total: 0 errors, 0 warnings, 73 lines checked
0016-ring_buffer-Allow-to-cleanly-freeze-the-ring-buffer-.patch has no obvious style problems and is ready for submission.
--------------------------------------------------------------------------------

total: 0 errors, 0 warnings, 25 lines checked
0017-ring_buffer-Allow-to-exit-the-ring-buffer-benchmark-.patch has no obvious style problems and is ready for submission.
--------------------------------------------------------------------------------

ERROR: Missing Signed-off-by: line(s)

total: 1 errors, 0 warnings, 70 lines checked
0018-kthread-Add-support-for-iteruptible-sleep-with-timeo.patch has style problems, please review.
--------------------------------------------------------------------------------

ERROR: Missing Signed-off-by: line(s)

total: 1 errors, 0 warnings, 34 lines checked
0019-kthread-Allow-to-remove-pause-between-threads-in-ite.patch has style problems, please review.
--------------------------------------------------------------------------------

ERROR: Missing Signed-off-by: line(s)

total: 1 errors, 0 warnings, 12 lines checked
0020-ring_buffer-Use-the-new-API-for-timeouted-sleep-in-t.patch has style problems, please review.
--------------------------------------------------------------------------------

ERROR: Missing Signed-off-by: line(s)

total: 1 errors, 0 warnings, 37 lines checked
0021-jffs2-debug-messages.patch has style problems, please review.
--------------------------------------------------------------------------------

ERROR: Missing Signed-off-by: line(s)

total: 1 errors, 0 warnings, 28 lines checked
0022-test-messages-in-ring_buffer_benchmnark.patch has style problems, please review.
--------------------------------------------------------------------------------

ERROR: Missing Signed-off-by: line(s)

total: 1 errors, 0 warnings, 7 lines checked
0023-debug-messages-in-lockd.patch has style problems, please review.

If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Signed-off-by: Petr Mladek <pmladek@suse.cz>
---
 scripts/checkpatch.pl | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index c8032a01d7cf..7022138b14cb 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -720,8 +720,14 @@ my @fixed_deleted = ();
 my $fixlinenr = -1;
 
 my $vname;
+my $filenum = 0;
 for my $filename (@ARGV) {
 	my $FILE;
+
+	if ($filenum++ && $quiet == 0) {
+		print "--------------------------------------------------------------------------------\n";
+		print "\n";
+	}
 	if ($file) {
 		open($FILE, '-|', "diff -u /dev/null $filename") ||
 			die "$P: $filename: diff failed - $!\n";
@@ -755,6 +761,14 @@ for my $filename (@ARGV) {
 	build_types();
 }
 
+if ($exit && $quiet == 0) {
+	print << "EOM";
+
+If any of the errors are false positives, please report
+them to the maintainer, see CHECKPATCH in MAINTAINERS.
+EOM
+}
+
 exit($exit);
 
 sub top_of_kernel_tree {
@@ -5578,7 +5592,6 @@ sub process {
 		print "total: $cnt_error errors, $cnt_warn warnings, " .
 			(($check)? "$cnt_chk checks, " : "") .
 			"$cnt_lines lines checked\n";
-		print "\n" if ($quiet == 0);
 	}
 
 	if ($quiet == 0) {
@@ -5643,12 +5656,7 @@ EOM
 		print "$vname has no obvious style problems and is ready for submission.\n"
 	}
 	if ($clean == 0 && $quiet == 0) {
-		print << "EOM";
-$vname has style problems, please review.
-
-If any of these errors are false positives, please report
-them to the maintainer, see CHECKPATCH in MAINTAINERS.
-EOM
+		print "$vname has style problems, please review.\n"
 	}
 
 	return $clean;
-- 
1.8.5.6


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-06-02 20:51 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-01 14:25 [PATCH] checkpatch: Make the output better readable Petr Mladek
2015-06-01 15:50 ` Joe Perches
2015-06-02  9:13   ` Petr Mladek
2015-06-02  9:52     ` Joe Perches
2015-06-02 10:44       ` Petr Mladek
2015-06-02 20:49         ` Joe Perches
2015-06-01 18:02 ` Joe Perches
     [not found]   ` <CA+r1ZhjhF-n4Q2kfiV6mx1aUqbZNycNTJBkTgLTq9KivsawvdA@mail.gmail.com>
2015-06-01 18:22     ` Joe Perches
2015-06-02  9:26   ` Petr Mladek
2015-06-02  9:54     ` Joe Perches
2015-06-02 10:53     ` Rasmus Villemoes

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.