From: Matthieu Baerts <matthieu.baerts@tessares.net>
To: "Thorsten Leemhuis" <linux@leemhuis.info>,
"Jonathan Corbet" <corbet@lwn.net>,
"Andy Whitcroft" <apw@canonical.com>,
"Joe Perches" <joe@perches.com>,
"Dwaipayan Ray" <dwaipayanray1@gmail.com>,
"Lukas Bulwahn" <lukas.bulwahn@gmail.com>,
"Kai Wasserbäch" <kai@dev.carbon-project.org>,
"Andrew Morton" <akpm@linux-foundation.org>,
"David Airlie" <airlied@gmail.com>,
"Daniel Vetter" <daniel@ffwll.ch>,
"Konstantin Ryabitsev" <konstantin@linuxfoundation.org>,
"Bagas Sanjaya" <bagasdotme@gmail.com>,
"Linus Torvalds" <torvalds@linux-foundation.org>
Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org, mptcp@lists.linux.dev
Subject: Re: [PATCH v3 4/4] checkpatch: check for misuse of the link tags
Date: Fri, 31 Mar 2023 11:44:46 +0200 [thread overview]
Message-ID: <ac473b8f-e7c1-edf9-9d9c-f1fd726e1e17@tessares.net> (raw)
In-Reply-To: <c2d5cc07-ec95-eb64-0cef-42f8378ea054@leemhuis.info>
Hi Thorsten,
On 31/03/2023 10:57, Thorsten Leemhuis wrote:
> 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) {
If I'm not mistaken, we had the following checks:
- after Reported-by, there is a link tag (Link:|Closes:)
- (link tags can take more than 75 chars)
- tags followed by "http(s)://" are restricted to link ones
Then not: link tags (Link:|Closes:) are followed by "http(s):".
But maybe I missed something, the checkpatch.pl script is quite big, I
would not be surprised :-)
Cheers,
Matt
--
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
next prev parent reply other threads:[~2023-03-31 9:45 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-30 18:13 [PATCH v3 0/4] docs & checkpatch: allow Closes tags with links Matthieu Baerts
2023-03-30 18:13 ` [PATCH v3 1/4] docs: process: " Matthieu Baerts
2023-03-30 18:13 ` [PATCH v3 2/4] checkpatch: use a list of "link" tags Matthieu Baerts
2023-03-30 18:13 ` [PATCH v3 3/4] checkpatch: allow Closes tags with links Matthieu Baerts
2023-03-30 22:43 ` Joe Perches
2023-03-31 9:43 ` Matthieu Baerts
2023-03-30 18:13 ` [PATCH v3 4/4] checkpatch: check for misuse of the link tags Matthieu Baerts
2023-03-31 8:57 ` Thorsten Leemhuis
2023-03-31 9:44 ` Matthieu Baerts [this message]
2023-03-31 10:09 ` Thorsten Leemhuis
2023-03-31 10:16 ` Matthieu Baerts
2023-03-31 9:39 ` [PATCH v3 0/4] docs & checkpatch: allow Closes tags with links Thorsten Leemhuis
2023-03-31 10:08 ` Conor Dooley
2023-03-31 10:34 ` Thorsten Leemhuis
2023-03-31 10:13 ` Matthieu Baerts
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=ac473b8f-e7c1-edf9-9d9c-f1fd726e1e17@tessares.net \
--to=matthieu.baerts@tessares.net \
--cc=airlied@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=apw@canonical.com \
--cc=bagasdotme@gmail.com \
--cc=corbet@lwn.net \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=dwaipayanray1@gmail.com \
--cc=joe@perches.com \
--cc=kai@dev.carbon-project.org \
--cc=konstantin@linuxfoundation.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@leemhuis.info \
--cc=lukas.bulwahn@gmail.com \
--cc=mptcp@lists.linux.dev \
--cc=torvalds@linux-foundation.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
all inboxes | Powered by JetHome®