* [PATCH] scripts/checkpatch.pl: check for non-permalinks to Zulip
@ 2024-08-25 22:18 Siddharth Menon
2024-08-25 22:23 ` Joe Perches
2024-08-26 20:03 ` Miguel Ojeda
0 siblings, 2 replies; 5+ messages in thread
From: Siddharth Menon @ 2024-08-25 22:18 UTC (permalink / raw)
To: rust-for-linux
Cc: linux-kernel, linux-kernel-mentees, apw, joe, ojeda,
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 a message
links (which are permalinks).
If a non-permanent zulip link is referenced emit a warning and
directs to the zulip documentation.
permanent links are of the format:
https://.../#narrow/stream/x/topic/x/near/<numerical_id>
Reported-by: ojeda@kernel.org
Closes: https://github.com/Rust-for-Linux/linux/issues/110
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 39032224d504..a4fb4e724f75 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},
@@ -3415,6 +3419,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://chat.zulip.org/api/construct-narrow#narrows-that-use-ids\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.2
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] scripts/checkpatch.pl: check for non-permalinks to Zulip
2024-08-25 22:18 [PATCH] scripts/checkpatch.pl: check for non-permalinks to Zulip Siddharth Menon
@ 2024-08-25 22:23 ` Joe Perches
2024-08-25 22:39 ` BiscuitBobby
2024-08-26 19:57 ` Miguel Ojeda
2024-08-26 20:03 ` Miguel Ojeda
1 sibling, 2 replies; 5+ messages in thread
From: Joe Perches @ 2024-08-25 22:23 UTC (permalink / raw)
To: Siddharth Menon
Cc: rust-for-linux, linux-kernel, linux-kernel-mentees, apw, ojeda
On 2024-08-25 15:18, Siddharth Menon wrote:
> Zulip links to https://rust-for-linux.zulipchat.com can break in
> case of renaming the topic or channel if they are not a message
> links (which are permalinks).
Why should these links be used in the kernel at all?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] scripts/checkpatch.pl: check for non-permalinks to Zulip
2024-08-25 22:23 ` Joe Perches
@ 2024-08-25 22:39 ` BiscuitBobby
2024-08-26 19:57 ` Miguel Ojeda
1 sibling, 0 replies; 5+ messages in thread
From: BiscuitBobby @ 2024-08-25 22:39 UTC (permalink / raw)
To: Joe Perches
Cc: rust-for-linux, linux-kernel, linux-kernel-mentees, apw, ojeda
On Sun, 2024-08-25 at 15:23 -0700, Joe Perches wrote:
> On 2024-08-25 15:18, Siddharth Menon wrote:
> > Zulip links to https://rust-for-linux.zulipchat.com can break in
> > case of renaming the topic or channel if they are not a message
> > links (which are permalinks).
>
> Why should these links be used in the kernel at all?
To my understanding, most of the discussion around the
development of the Rust subsystem takes place here, and is
frequently referenced in the mailing list.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] scripts/checkpatch.pl: check for non-permalinks to Zulip
2024-08-25 22:23 ` Joe Perches
2024-08-25 22:39 ` BiscuitBobby
@ 2024-08-26 19:57 ` Miguel Ojeda
1 sibling, 0 replies; 5+ messages in thread
From: Miguel Ojeda @ 2024-08-26 19:57 UTC (permalink / raw)
To: Joe Perches
Cc: Siddharth Menon, rust-for-linux, linux-kernel,
linux-kernel-mentees, apw, ojeda
On Mon, Aug 26, 2024 at 12:33 AM Joe Perches <joe@perches.com> wrote:
>
> Why should these links be used in the kernel at all?
They should probably not be used in files, but we put them in commit
messages from time to time, e.g. for `Closes:` or `Link:` tags.
Cheers,
Miguel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] scripts/checkpatch.pl: check for non-permalinks to Zulip
2024-08-25 22:18 [PATCH] scripts/checkpatch.pl: check for non-permalinks to Zulip Siddharth Menon
2024-08-25 22:23 ` Joe Perches
@ 2024-08-26 20:03 ` Miguel Ojeda
1 sibling, 0 replies; 5+ messages in thread
From: Miguel Ojeda @ 2024-08-26 20:03 UTC (permalink / raw)
To: Siddharth Menon
Cc: rust-for-linux, linux-kernel, linux-kernel-mentees, apw, joe,
ojeda
On Mon, Aug 26, 2024 at 12:18 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 a message
> links (which are permalinks).
a message -> message
> If a non-permanent zulip link is referenced emit a warning and
> directs to the zulip documentation.
emit -> , then emit
directs -> direct the user
zulip -> Zulip
> permanent links are of the format:
> https://.../#narrow/stream/x/topic/x/near/<numerical_id>
permanent -> Permanent
> Reported-by: ojeda@kernel.org
> Closes: https://github.com/Rust-for-Linux/linux/issues/110
Sorry, I copy-pasted a template we use for "good first issues" and I
should have not mentioned these two tags, because it is not a bug.
They should be `Suggested-by` and `Link` instead. Also, please use the
standard format "Full Name <email>".
In addition, the link should be to #1104, not #110, i.e.
https://github.com/Rust-for-Linux/linux/issues/1104
> + "Use permanent Zulip links when possible - see https://chat.zulip.org/api/construct-narrow#narrows-that-use-ids\n" . $herecurr);
Hmm... That link seems a bit too technical.
Perhaps it would be easiest to give an example here (like in the
commit message) if there are no better docs about this.
Thanks!
Cheers,
Miguel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-08-26 20:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-25 22:18 [PATCH] scripts/checkpatch.pl: check for non-permalinks to Zulip Siddharth Menon
2024-08-25 22:23 ` Joe Perches
2024-08-25 22:39 ` BiscuitBobby
2024-08-26 19:57 ` Miguel Ojeda
2024-08-26 20:03 ` Miguel Ojeda
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).