lkml.org 
[lkml]   [2023]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 4/4] checkpatch: check for misuse of the link tags
On 30.03.23 20:13, Matthieu Baerts wrote:
> "Link:" and "Closes:" tags have to be used with public URLs.
>
> It is difficult to make sure the link is public but at least we can
> verify the tag is followed by 'http(s):'.
>
> With that, we avoid such a tag that is not allowed [1]:
>
> Closes: <number>
>
> Link: https://lore.kernel.org/linux-doc/CAHk-=wh0v1EeDV3v8TzK81nDC40=XuTdY2MCr0xy3m3FiBV3+Q@mail.gmail.com/ [1]
> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
> [...]
> +# Check for misuse of the link tags
> + if ($in_commit_log &&
> + $line =~ /^\s*(\w+:)\s*(\S+)/) {
> + my $tag = $1;
> + my $value = $2;
> + if ($tag =~ /^$link_tags_search$/ && $value !~ /^https?:/) {
> + WARN("COMMIT_LOG_WRONG_LINK",
> + "'$tag' should be followed by a public http(s) link\n" . $herecurr);
> + }
> + }
> +

I must be missing something here, but it looks to me like this is
checked twice now. See this line in patch2 (which is changed there, but
the check itself remains):

> } elsif ($rawlines[$linenr] !~ m{^link:\s*https?://}i) {

Ciao, Thorsten

\
 
 \ /
  Last update: 2023-03-31 10:58    [W:0.087 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site