Re: [PATCH 2/2] checkpatch: warn when Reported-by: is not followed by Link:

From: Thorsten Leemhuis
Date: Thu Dec 08 2022 - 16:11:39 EST


Joe, many thx for your time and your valuable feedback. I agree with
most of it and will look into addressing it tomorrow, but there is one
area where I have a different option:

On 08.12.22 21:21, Joe Perches wrote:
> On Thu, 2022-12-08 at 20:32 +0100, Kai Wasserbäch wrote:
>> +
>> + # check if Reported-by: is followed by a Link:
>> + if ($sign_off =~ /^reported-by:$/i) {
>> + if (!defined $lines[$linenr]) {
>> + WARN("BAD_REPORTED_BY_LINK",
>> + "Reported-by: should be immediately followed by Link: to the report\n" . "$here\n" . $rawline);
>> + } elsif ($rawlines[$linenr] !~ /^\s*link:\s*(.*)/i) {
>> + WARN("BAD_REPORTED_BY_LINK",
>> + "Reported-by: should be immediately followed by Link: to the report\n" . "$here\n" . $rawline . "\n" .$rawlines[$linenr]);
>> + } elsif ($lines[$linenr] !~ /https?:\/\//i) {
>> + WARN("BAD_REPORTED_BY_LINK",
>> + "Link: following Reported-by: should contain an URL\n" . "$here\n" . $rawline . "\n" .$rawlines[$linenr]);
>
> [...]
>
> Also the actual link line should likely be from lore
>
> So maybe:
> } elsif ($lines[$linenr] !~ m{https?://lore.kernel.org/.+}i) {
> WARN("BAD_REPORTED_BY_LINK",
> "Link: following Reported-by: should use a lore.kernel.org URL\n" . $herecurr . $rawlines[$linenr]);

I'm pretty sure that's not want we want, as from regression tracking I
known that we have other links that should continue to work here. Links
to bugzilla.kernel.org immediately come to my mind, for example. Then
there are some subsystems that use issue trackers on github or in gitlab
instances (DRM for example), which must work here, too; and we
occasionally even have links to bugs in bugzilla instances from RH or
SUSE there, as sometimes valuable details for code archeologists can be
found there.

Ciao, Thorsten