From: Joe Perches <joe@perches.com>
To: Dwaipayan Ray <dwaipayanray1@gmail.com>
Cc: linux-kernel-mentees@lists.linuxfoundation.org,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [Linux-kernel-mentees] [PATCH v5] checkpatch: add new exception to repeated word check
Date: Sat, 17 Oct 2020 23:20:25 -0700 [thread overview]
Message-ID: <eda7a64b4af42ba1fb66a5b3704780cf3f761951.camel@perches.com> (raw)
In-Reply-To: <CABJPP5DuQ_Y0LLS5BzNXUWyxjzp9ts5kgEH-3+7Pn7PPjq0Ljg@mail.gmail.com>
On Sat, 2020-10-17 at 22:19 +0530, Dwaipayan Ray wrote:
> On Sat, Oct 17, 2020 at 10:03 PM Joe Perches <joe@perches.com> wrote:
> > On Sat, 2020-10-17 at 21:57 +0530, Dwaipayan Ray wrote:
> > > Recently, commit 4f6ad8aa1eac ("checkpatch: move repeated word test")
> > > moved the repeated word test to check for more file types. But after
> > > this, if checkpatch.pl is run on MAINTAINERS, it generates several
> > > new warnings of the type:
> >
> > NAK.
> >
> > Slow down and test before you send more patch versions.
> >
> > > + next if (index(" \t.,;?!", $end_char) == -1);
> >
> > what does this do?
>
> Um, it checks if end_char is not present in " \t.,;?!".
> If end_char doesn't belong to this list, then the check shall
> skip. That is the test will skip for "word word:", but will produce
> a warning for "word word." or "word word?", etc.
>
> Shouldn't this itself be the case or am I perhaps going wrong
> somewhere?
No, you were right, I was being a numbskull.
btw: I think this should set
my $end_char = ' ';
not ''
so that if the last word on a line is a
repeat the test still works.
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
next prev parent reply other threads:[~2020-10-18 8:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-17 16:27 [Linux-kernel-mentees] [PATCH v5] checkpatch: add new exception to repeated word check Dwaipayan Ray
2020-10-17 16:33 ` Joe Perches
2020-10-17 16:49 ` Dwaipayan Ray
2020-10-18 6:20 ` Joe Perches [this message]
2020-10-18 6:40 ` Dwaipayan Ray
2020-10-18 7:11 ` Joe Perches
2020-10-18 16:50 ` Dwaipayan Ray
2020-10-18 18:04 ` Joe Perches
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=eda7a64b4af42ba1fb66a5b3704780cf3f761951.camel@perches.com \
--to=joe@perches.com \
--cc=dwaipayanray1@gmail.com \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).