LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* checkpatch: add filename before the summary line
@ 2008-01-13 22:34 Paolo Ciarrocchi
  2008-01-14 17:30 ` Andy Whitcroft
  0 siblings, 1 reply; 3+ messages in thread
From: Paolo Ciarrocchi @ 2008-01-13 22:34 UTC (permalink / raw)
  To: Linux Kernel, apw

With the patch applied the output of checkpatch.pl is as follow:
./arch/arm/mach-footbridge/ebsa285-pci.c 
total: 1 errors, 0 warnings, 48 lines checked

Adding the file name allowed me to collects stats running:
	find . -name *.c |xargs ./scripts/checkpatch.pl --file |grep -B 1 total
but I though it might me useful for other purposes to add the file name
after the list of errors and warnings and before the summary,
when the list is long I find handy to print out the filename as a reminder.
   
Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 579f50f..079c73c 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1580,6 +1580,7 @@ sub process {
 
 	print report_dump();
 	if ($summary) {
+		print "$filename \n";
 		print "total: $cnt_error errors, $cnt_warn warnings, " .
 			(($check)? "$cnt_chk checks, " : "") .
 			"$cnt_lines lines checked\n";

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

* Re: checkpatch: add filename before the summary line
  2008-01-13 22:34 checkpatch: add filename before the summary line Paolo Ciarrocchi
@ 2008-01-14 17:30 ` Andy Whitcroft
  2008-01-14 22:13   ` Paolo Ciarrocchi
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Whitcroft @ 2008-01-14 17:30 UTC (permalink / raw)
  To: Paolo Ciarrocchi; +Cc: Linux Kernel

On Sun, Jan 13, 2008 at 11:34:05PM +0100, Paolo Ciarrocchi wrote:
> With the patch applied the output of checkpatch.pl is as follow:
> ./arch/arm/mach-footbridge/ebsa285-pci.c 
> total: 1 errors, 0 warnings, 48 lines checked
> 
> Adding the file name allowed me to collects stats running:
> 	find . -name *.c |xargs ./scripts/checkpatch.pl --file |grep -B 1 total
> but I though it might me useful for other purposes to add the file name
> after the list of errors and warnings and before the summary,
> when the list is long I find handy to print out the filename as a reminder.

Hmmm, that being unconfitional would probabally break a raft of other
users.  Also would it be more useful to put it on the front of the
summary line?  So that if you have a bunch of files to check then you
get something more like:

foo: total: 1 errors, ...
bar: total: 0 errors, ...

-apw

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

* Re: checkpatch: add filename before the summary line
  2008-01-14 17:30 ` Andy Whitcroft
@ 2008-01-14 22:13   ` Paolo Ciarrocchi
  0 siblings, 0 replies; 3+ messages in thread
From: Paolo Ciarrocchi @ 2008-01-14 22:13 UTC (permalink / raw)
  To: Andy Whitcroft; +Cc: Linux Kernel

On Jan 14, 2008 6:30 PM, Andy Whitcroft <apw@shadowen.org> wrote:
> On Sun, Jan 13, 2008 at 11:34:05PM +0100, Paolo Ciarrocchi wrote:
> > With the patch applied the output of checkpatch.pl is as follow:
> > ./arch/arm/mach-footbridge/ebsa285-pci.c
> > total: 1 errors, 0 warnings, 48 lines checked
> >
> > Adding the file name allowed me to collects stats running:
> >       find . -name *.c |xargs ./scripts/checkpatch.pl --file |grep -B 1 total
> > but I though it might me useful for other purposes to add the file name
> > after the list of errors and warnings and before the summary,
> > when the list is long I find handy to print out the filename as a reminder.
>
> Hmmm, that being unconfitional would probabally break a raft of other
> users.  Also would it be more useful to put it on the front of the
> summary line?  So that if you have a bunch of files to check then you
> get something more like:
>
> foo: total: 1 errors, ...
> bar: total: 0 errors, ...

I have a patch that adds an option (default to false) and with that I have
the following output:

./arch/sparc/kernel/apc.c --> total: 18 errors, 3 warnings, 186 lines checked
./arch/sparc/kernel/apc.c --> total: 18 errors, 3 warnings, 186 lines checked

Will send to the list in a few minutes.

Ciao,
-- 
Paolo
http://paolo.ciarrocchi.googlepages.com/

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

end of thread, other threads:[~2008-01-14 22:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-13 22:34 checkpatch: add filename before the summary line Paolo Ciarrocchi
2008-01-14 17:30 ` Andy Whitcroft
2008-01-14 22:13   ` Paolo Ciarrocchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).