]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
docs: maintainers_include: keep the last entry at the end
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sat, 16 May 2026 17:33:34 +0000 (19:33 +0200)
committerJonathan Corbet <corbet@lwn.net>
Mon, 25 May 2026 20:24:09 +0000 (14:24 -0600)
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>

Documentation/sphinx/maintainers_include.py

index b8b7282ebe381d3ff07600b6975d87be8a93c756..dc9f9e188ffa87762bd3b309ae900e769ca4113c 100755 (executable)
@@ -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():