lkml.org 
[lkml]   [2015]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] checkpatch: Make the output better readable
On Tue 2015-06-02 02:52:03, Joe Perches wrote:
> On Tue, 2015-06-02 at 11:13 +0200, Petr Mladek wrote:
> > On Mon 2015-06-01 08:50:24, Joe Perches wrote:
> > > On Mon, 2015-06-01 at 16:25 +0200, Petr Mladek wrote:
> > > > 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
> > >
> > > I've no objection about this, but don't much care either.
> > >
> > > > + print message about false positives only once
> > >
> > > This bit seems sensible, thanks.
> > >
> > > > diff --git 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";
> > >
> > > Perhaps more perlish would be print '-' x 81 . '\n\n';
> > > Dunno why you chose 81 though, it seems an unusual number.
> >
> > Are you sure, please? I have just counted it again and I see 80
> > dashes. Is it possible that you counted the initial quotation
> > mark '"'?
>
> My mistake, I neglected to account for the cr in echo|wc
>
> > Well, I do not mind about the number of dashes. Feel free to update
> > it in case you merge it.
>
> I don't actually merge stuff, I can forward it to
> Andrew Morton though,

T.hat would be nice. Thanks in advance.

> but perhaps it'd be better to
> check $#ARGV > 1 and emit something like
> "$filename is being processed\n"
> so that there is a delimiter before and after each file

I personally do not like this idea much. It would create another
long line and kind of hide the warnings and errors. IMHO, the dashes
are better and enough. But I am not UI guy.

But feel free to improve it as you like.

> Another option for you is to add --emacs on the command line.
> That prefixes patch filename & location before each message.

Thanks for the hint. I was not aware of it. Well, it still looks
messy without my patch.

Best Regards,
Petr


\
 
 \ /
  Last update: 2015-06-02 13:21    [W:0.106 / U:0.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site