docs: maintainers_include: keep the last entry at the end

The last maintainer's entry ("THE REST") is meant to be at the
end. Ensure that.

While here, use a case-insensitive sort to avoid placing "iSCSI"
near the end.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <b4f45565eff4ba6f01e84a6877813038a23ba83b.1778952682.git.mchehab+huawei@kernel.org>
This commit is contained in:
Mauro Carvalho Chehab 2026-05-16 19:33:34 +02:00 committed by Jonathan Corbet
parent 0b740ec538
commit ff8b091864

View File

@ -284,7 +284,12 @@ class MaintainersInclude(Include):
self.state.document['maintainers_included'] = True
for name, fields in sorted(maint_parser.maint_entries.items()):
# Keep the last entry ("THE REST") in the end
entries = list(maint_parser.maint_entries.keys())
entries = sorted(entries[:-1], key=str.casefold) + [entries[-1]]
for name in entries:
fields = maint_parser.maint_entries[name]
output += f" * - {name}\n"
tag = "-"
for field, lines in fields.items():