* [PATCH v2 RESEND] scripts/checkpatch.pl: check for non-permalinks to Zulip
@ 2024-12-22 9:46 Siddharth Menon
2024-12-22 13:53 ` Miguel Ojeda
0 siblings, 1 reply; 3+ messages in thread
From: Siddharth Menon @ 2024-12-22 9:46 UTC (permalink / raw)
To: rust-for-linux, apw, joe; +Cc: linux-kernel, ojeda, shuah, Siddharth Menon
Zulip links to https://rust-for-linux.zulipchat.com can break in
case of renaming the topic or channel if they are not message
links (which are permanent links).
If a non-permanent Zulip link is referenced then emit a warning
and direct the user to the Zulip documentation.
Permanent links are of the format:
https://.../#narrow/stream/x/topic/x/near/<numerical_id>
Suggested-by: Miguel Ojeda <ojeda@kernel.org>
Link: https://github.com/Rust-for-Linux/linux/issues/1104
Signed-off-by: Siddharth Menon <simeddon@gmail.com>
---
scripts/checkpatch.pl | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 9eed3683ad76..9b15484b5a95 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -735,6 +735,10 @@ our $obsolete_archives = qr{(?xi:
\Qspinics.net\E
)};
+our $zulip_forums = qr{(?xi:
+ \Qrust-for-linux.zulipchat.com\E
+)};
+
our @typeListMisordered = (
qr{char\s+(?:un)?signed},
qr{int\s+(?:(?:un)?signed\s+)?short\s},
@@ -3410,6 +3414,12 @@ sub process {
"Use lore.kernel.org archive links when possible - see https://lore.kernel.org/lists.html\n" . $herecurr);
}
+# Check for permanent Zulip URL
+ if ($rawline =~ m{http.*\b$zulip_forums(?!(?:/#narrow/stream/.+/topic/.+/(?:near|with)/\d+)?($|\s+.*))}) {
+ WARN("PREFER_PERMANENT_URL",
+ "Use permanent Zulip links when possible - see https://zulip.com/help/link-to-a-message-or-conversation\n" . $herecurr);
+ }
+
# Check for added, moved or deleted files
if (!$reported_maintainer_file && !$in_commit_log &&
($line =~ /^(?:new|deleted) file mode\s*\d+\s*$/ ||
--
2.39.5
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v2 RESEND] scripts/checkpatch.pl: check for non-permalinks to Zulip
2024-12-22 9:46 [PATCH v2 RESEND] scripts/checkpatch.pl: check for non-permalinks to Zulip Siddharth Menon
@ 2024-12-22 13:53 ` Miguel Ojeda
2024-12-22 14:16 ` Siddharth
0 siblings, 1 reply; 3+ messages in thread
From: Miguel Ojeda @ 2024-12-22 13:53 UTC (permalink / raw)
To: Siddharth Menon; +Cc: rust-for-linux, apw, joe, linux-kernel, ojeda, shuah
On Sun, Dec 22, 2024 at 10:48 AM Siddharth Menon <simeddon@gmail.com> wrote:
>
> Zulip links to https://rust-for-linux.zulipchat.com can break in
> case of renaming the topic or channel if they are not message
> links (which are permanent links).
This is a resend of v2, but there was a v3 previously -- I would
suggest clarifying which one is meant to be picked, so that this is
easier to pick for maintainers.
Thanks!
Cheers,
Miguel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2 RESEND] scripts/checkpatch.pl: check for non-permalinks to Zulip
2024-12-22 13:53 ` Miguel Ojeda
@ 2024-12-22 14:16 ` Siddharth
0 siblings, 0 replies; 3+ messages in thread
From: Siddharth @ 2024-12-22 14:16 UTC (permalink / raw)
To: Miguel Ojeda; +Cc: rust-for-linux, apw, joe, linux-kernel, ojeda, shuah
On Sun, 22 Dec 2024 at 19:23, Miguel Ojeda
<miguel.ojeda.sandonis@gmail.com> wrote:
>
> This is a resend of v2, but there was a v3 previously -- I would
> suggest clarifying which one is meant to be picked, so that this is
> easier to pick for maintainers.
I seem to have resent the wrong patch, I'm really sorry about that.
I shall resend the correct patch soon.
Sincerely,
Siddharth Menon
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-12-22 14:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-22 9:46 [PATCH v2 RESEND] scripts/checkpatch.pl: check for non-permalinks to Zulip Siddharth Menon
2024-12-22 13:53 ` Miguel Ojeda
2024-12-22 14:16 ` Siddharth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox