mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
docs: maintainers_include: don't ignore invalid profile entries
Currently, there is a "P" entry for Rust pin-init that is neither a valid ReST file inside Documentation nor an URL. A proper fix is to either convert/move the file or point to a URL. Yet, the parser should be able to pick what's there and show on its output. Add a logic to produce a warning when this happens. Message-ID: <63228e005fcf3dc4583cee06905341e8bce84181.1777987027.git.mchehab+huawei@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <98915f35442fa12c6d59611083aea3adbf8c6aff.1778309595.git.mchehab+huawei@kernel.org>
This commit is contained in:
parent
11bb115dd5
commit
247cb381a5
|
|
@ -240,6 +240,8 @@ class MaintainersParser:
|
|||
if match:
|
||||
entry = match.group(1).strip()
|
||||
self.profile_entries[self.subsystem_name] = entry
|
||||
else:
|
||||
self.profile_entries[self.subsystem_name] = f"``{details}``"
|
||||
|
||||
details = self.linkify(details)
|
||||
|
||||
|
|
@ -328,12 +330,15 @@ class MaintainersProfile(Include):
|
|||
#
|
||||
output = ""
|
||||
for profile, entry in sorted(maint_parser.profile_entries.items()):
|
||||
profile = profile.title()
|
||||
name = profile.title()
|
||||
|
||||
if entry.startswith("http"):
|
||||
output += f"- `{profile} <{entry}>`_\n"
|
||||
output += f"- `{name} <{entry}>`_\n"
|
||||
elif entry.startswith("`"):
|
||||
output += f"- {name}: {entry}\n"
|
||||
self.warning(f"{profile}: Invalid 'P' tag: {entry}\n")
|
||||
else:
|
||||
output += f"- :doc:`{profile} <{entry}>`\n"
|
||||
output += f"- :doc:`{name} <{entry}>`\n"
|
||||
|
||||
#
|
||||
# Create a hidden TOC table with all profiles. That allows adding
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user