From: Joe Perches <joe@perches.com>
To: Petr Mladek <pmladek@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Andy Whitcroft <apw@canonical.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] checkpatch: Add --showfile to allow input via pipe to show filenames
Date: Thu, 04 Jun 2015 05:40:55 -0700 [thread overview]
Message-ID: <1433421655.4861.178.camel@perches.com> (raw)
In-Reply-To: <20150604121804.GP3135@pathway.suse.cz>
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@perches.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
prev parent reply other threads:[~2015-06-04 12:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-03 15:53 [PATCH 0/3] checkpatch: output style changes Joe Perches
2015-06-03 15:53 ` [PATCH 1/3] checkpatch: Improve output with multiple command-line files Joe Perches
2015-06-04 12:03 ` Petr Mladek
2015-06-04 12:14 ` Joe Perches
2015-06-04 12:29 ` Petr Mladek
2015-06-04 12:36 ` Joe Perches
2015-06-03 15:53 ` [PATCH 2/3] checkpatch: colorize output to terminal Joe Perches
2015-06-04 12:05 ` Petr Mladek
2015-06-03 15:53 ` [PATCH 3/3] checkpatch: Add --showfile to allow input via pipe to show filenames Joe Perches
2015-06-04 12:18 ` Petr Mladek
2015-06-04 12:40 ` Joe Perches [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1433421655.4861.178.camel@perches.com \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=apw@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pmladek@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox