[Linux-kernel-mentees] [PATCH RFC] checkpatch: extend same_email_address check to load mailmap entries

Joe Perches joe at perches.com
Wed Sep 23 15:08:56 UTC 2020


On Wed, 2020-09-23 at 16:41 +0530, Dwaipayan Ray wrote:
> > .mailmap entries are used when a person no longer has
> > access to a particular email and a mapping is created to
> > allow these old/invalid email addresses to be converted
> > to a current/valid email address.
> > 
> > The idea here is that a person may have a .gitconfig or
> > equivalent that still uses an old/invalid email address
> > but uses a Signed-off-by: for a current/valid one, so
> > a warning _should_ be emitted for this case.
> > 
> > At least for checkpatch, mismatches in email addresses
> > should not be papered over by assuming equivalence between
> > multiple email addresses.
> > 
> > So this should be a separate test and not used in a function
> > named
> > "same_email_address".  These are specifically _not_
> > the same email
> > addresses.
> > 
> > 
> 
> Hi,
> Thanks for the clarification.
> 
> So instead of eliminating the warning completely will it be a
> better alternative to display a more descriptive warning
> on the lines of:
> 
>   "WARNING: NO_AUTHOR_SIGN_OFF:
>    invalid/obsolete email address used in signoff by
>    author $author"
> 
> Or is it better to ignore the mailmap extension in checkpatch
> and just display warnings for either mismatch in name/
> mismatch in email.
> 
> Like, you had mentioned one in:
> https://lore.kernel.org/linux-kernel-mentees/
> 7958ded756c895ca614ba900aae7b830a992475e.camel at perches.com/
> 
> In that case, same name, but different mail address was
> reported as a different warning.
> 
> So, I believe two cases can be handled better:
> 1) Same name, different email
> 2) Same email, different name
> 
> For case 2, it might also be possible to ignore the warning
> completely.

Maybe both.

I suggest seeing if extensions to email addresses like:

	<local_part+extension at domain.tld>
could be compared to:
	<local_part at domain.tld>

and comment blocks like:

	"First Last" (via mailing list) <local_part at domain.tld>
could be compared to:
	"First Last" <local_part at domain.tlc> (MAINTAINER)

Still, I think all of these should emit warnings or
--strict checks messages.

The idea is to notify that some oddity has occurred
rather than silently accept it.




More information about the Linux-kernel-mentees mailing list