From: Joe Perches <joe@perches.com>
To: Dwaipayan Ray <dwaipayanray1@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
Lukas Bulwahn <lukas.bulwahn@gmail.com>
Subject: Re: [PATCH] checkpatch: Fix check for embedded filename
Date: Sat, 05 Jun 2021 11:52:30 -0700 [thread overview]
Message-ID: <c1eec80f7a48a9eb7696fc2801dfd974bd8f0281.camel@perches.com> (raw)
In-Reply-To: <CABJPP5AOcCWydstxqKN9tjFN9nigk1OQeJY3DFnd+rFP_2+qaQ@mail.gmail.com>
On Sun, 2021-06-06 at 00:14 +0530, Dwaipayan Ray wrote:
> On Sun, Jun 6, 2021 at 12:03 AM Joe Perches <joe@perches.com> wrote:
> > On Sat, 2021-06-05 at 23:03 +0530, Dwaipayan Ray wrote:
> > > On Sat, Jun 5, 2021 at 10:51 PM Joe Perches <joe@perches.com> wrote:
> > > > On Sat, 2021-06-05 at 21:42 +0530, Dwaipayan Ray wrote:
> > > > > When checkpatch is run on file contents piped through stdin,
> > > > > it may generate false EMBEDDED_FILENAME warnings if the
> > > > > --file flag is used.
> > > >
> > > > I think this is a "don't do that" scenario and this change
> > > > is not necessary.
> > > >
> > >
> > > Okay then. I will drop this.
> > > Sorry for the noise.
> >
> > I think you want something like this:
> > ---
> > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> > @@ -331,6 +331,7 @@ help(0) if ($help);
> >
> > die "$P: --git cannot be used with --file or --fix\n" if ($git && ($file || $fix));
> > die "$P: --verbose cannot be used with --terse\n" if ($verbose && $terse);
> > +die "$P: -f/--file requires at least one filename\n" if ($file && $#ARGV < 0);
> >
> > if ($color =~ /^[01]$/) {
> > $color = !$color;
> >
>
> Yes, that's nice.
> Most of the checks don't work with piped input when --file
> is specified. So disabling it will avoid any confusion.
>
> I can send in a patch if it's okay with you.
Fine by me. You noticed, your patch...
prev parent reply other threads:[~2021-06-05 18:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-05 16:12 Dwaipayan Ray
2021-06-05 17:21 ` Joe Perches
2021-06-05 17:33 ` Dwaipayan Ray
2021-06-05 18:33 ` Joe Perches
2021-06-05 18:44 ` Dwaipayan Ray
2021-06-05 18:52 ` 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=c1eec80f7a48a9eb7696fc2801dfd974bd8f0281.camel@perches.com \
--to=joe@perches.com \
--cc=dwaipayanray1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas.bulwahn@gmail.com \
/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
all inboxes | Powered by JetHome®