[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1433421655.4861.178.camel@perches.com>
Date: Thu, 04 Jun 2015 05:40:55 -0700
From: Joe Perches <joe@...ches.com>
To: Petr Mladek <pmladek@...e.cz>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Andy Whitcroft <apw@...onical.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] checkpatch: Add --showfile to allow input via pipe
to show filenames
On Thu, 2015-06-04 at 14:18 +0200, Petr Mladek wrote:
> On Wed 2015-06-03 08:53:40, Joe Perches wrote:
> > Using "git diff | ./scripts/checkpatch -" does not have an
> > easy mechanism to see the files and lines actually modified.
> >
> > Add --showfile to see the file and line specified in the diff.
> >
> > When --showfile is used without --terse, the second line of each
> > message output is redundant, so it is removed.
>
> > Signed-off-by: Joe Perches <joe@...ches.com>
>
> I like idea but there is a problem, see below.
[]
> > @@ -5606,7 +5618,7 @@ sub process {
> > ERROR("NOT_UNIFIED_DIFF",
> > "Does not appear to be a unified-diff format patch\n");
> > }
> > - if ($is_patch && $chk_signoff && $signoff == 0) {
> > + if ($is_patch && $filename ne '-' && $chk_signoff && $signoff == 0) {
>
> You might use also "cat $patch | ./scripts/checkpatch -" and in this
> case you would want to print the warning.
Yeah, but I'm not straining for likely unusual use-cases.
> It still prints invalid filename:linenum when you call:
> ./scripts/checkpatch 0001-my-commit.patch
I don't see this.
It prints the file/line of the patch without -terse
just as before.
> A better solution would be to omit the filename:linenum information
> for this patch-specific messages or print the patchname instead of
> the filename.
Anyway, I think the patch appropriate to apply
for now and I'll ponder and listen to suggestions
for improvement later.
cheers, Joe
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists