You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scripts/checkpatch.pl: check for non-permalinks to Zulip
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 <[email protected]>
Link: Rust-for-Linux#1104
Signed-off-by: Siddharth Menon <[email protected]>
Copy file name to clipboardExpand all lines: scripts/checkpatch.pl
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -735,6 +735,10 @@ sub find_standard_signature {
735
735
\Qspinics.net\E
736
736
)};
737
737
738
+
our$zulip_forums = qr{(?xi:
739
+
\Qrust-for-linux.zulipchat.com\E
740
+
)};
741
+
738
742
our@typeListMisordered = (
739
743
qr{char\s+(?:un)?signed},
740
744
qr{int\s+(?:(?:un)?signed\s+)?short\s},
@@ -3415,6 +3419,12 @@ sub process {
3415
3419
"Use lore.kernel.org archive links when possible - see https://lore.kernel.org/lists.html\n" . $herecurr);
3416
3420
}
3417
3421
3422
+
# Check for permanent Zulip URL
3423
+
if ($rawline =~ m{http.*\b$zulip_forums(?!(?:/#narrow/stream/.+/topic/.+/(?:near|with)/\d+)?($|\s+.*))}) {
3424
+
WARN("PREFER_PERMANENT_URL",
3425
+
"Use permanent Zulip links when possible - see https://zulip.com/help/link-to-a-message-or-conversation#get-a-link-to-a-specific-message\n" . $herecurr);
3426
+
}
3427
+
3418
3428
# Check for added, moved or deleted files
3419
3429
if (!$reported_maintainer_file && !$in_commit_log &&
0 commit comments