提交 9b71f79f 编写于 作者: B Bjorn Helgaas 提交者: Andrew Morton

checkpatch: add warning for non-lore mailing list URLs

The lkml.org, marc.info, spinics.net, etc archives are not quite as useful
as lore.kernel.org because they use different styles, add advertising, and
may disappear in the future.  The lore archives are more consistent and
more likely to stick around, so prefer https://lore.kernel.org URLs when
they exist.

[bhelgaas@google.com: only warn if we see "http" before the archive hostname]
  Link: https://lkml.kernel.org/r/20221114224315.GA939630@bhelgaas
Link: https://lkml.kernel.org/r/20221019202843.40810-1-helgaas@kernel.orgSigned-off-by: NBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: NPeter Collingbourne <pcc@google.com>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Dwaipayan Ray <dwaipayanray1@gmail.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Cc: Randy Dunlap <rdunlap@infradead.org> # build-tested
Cc: Joe Perches <joe@perches.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
上级 f1f1f256
......@@ -702,6 +702,17 @@ sub find_standard_signature {
return "";
}
our $obsolete_archives = qr{(?xi:
\Qfreedesktop.org/archives/dri-devel\E |
\Qlists.infradead.org\E |
\Qlkml.org\E |
\Qmail-archive.com\E |
\Qmailman.alsa-project.org/pipermail\E |
\Qmarc.info\E |
\Qozlabs.org/pipermail\E |
\Qspinics.net\E
)};
our @typeListMisordered = (
qr{char\s+(?:un)?signed},
qr{int\s+(?:(?:un)?signed\s+)?short\s},
......@@ -3324,6 +3335,12 @@ sub process {
$last_git_commit_id_linenr = $linenr if ($line =~ /\bcommit\s*$/i);
}
# Check for mailing list archives other than lore.kernel.org
if ($rawline =~ m{http.*\b$obsolete_archives}) {
WARN("PREFER_LORE_ARCHIVE",
"Use lore.kernel.org archive links when possible - see https://lore.kernel.org/lists.html\n" . $herecurr);
}
# Check for added, moved or deleted files
if (!$reported_maintainer_file && !$in_commit_log &&
($line =~ /^(?:new|deleted) file mode\s*\d+\s*$/ ||
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册