lkml.org 
[lkml]   [2020]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4] checkpatch: improve email parsing
From
Date
On Sat, 2020-11-07 at 10:11 +0530, Dwaipayan Ray wrote:
> On Sat, Nov 7, 2020 at 3:34 AM Joe Perches <joe@perches.com> wrote:
> >
> > On Sat, 2020-11-07 at 03:15 +0530, Dwaipayan Ray wrote:
> > > checkpatch doesn't report warnings for many common mistakes
> > > in emails. Some of which are trailing commas and incorrect
> > > use of email comments.
> >
> > Assuming it all works, this looks good. I haven't tested it.
> >
> > How did you test the $fix bits?
> >
> Hi,
> I actually dumped about 17k unique emails from git log, put it in one of
> my previous patches, and ran checkpatch with --fix on it.
> I checked the diff and most of the cases looked pretty good to me.
> I could send the diff output if you like?

Please. Likely just to me as I imagine it's not interesting to most.

> > Trivial notes:
> >
> > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> > []
> > > + # stable@vger.kernel.org or stable@kernel.org shouldn't
> > > + # have an email name. In addition commments should strictly
> > > + # begin with a #
> > > + if ($email =~ /^.*stable\@(?:vger\.)?kernel\.org/) {
> >
> > Likely better to test with a case insensitive match so
> > STABLE@vger.kernel.org and such are still warned.
>
> Sure, I will do that.
> >
> >                                 if ($email =~ /\bstable\@(?:vger\.)?kernel\.org\b/i) {
> >
> > > + if ($sign_off =~ /cc:$/i && (($comment ne "" && $comment !~ /^#.+/) ||
> > > + ($email_name ne ""))) {
> >
> > > > $sign_off !~ /^cc:/i ?
>
> I actually had a doubt about that one. Only the stable address with
> Cc: should be checked right? Or something else?

yes.

> What about those stable addresses with tags other than Cc: ? Should
> a change be suggested?

Ideally yes, but there were very few of those in the git commit
history so it's probably not a big deal one way or another.


\
 
 \ /
  Last update: 2020-11-07 06:09    [W:0.051 / U:0.800 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site