diff mbox series

[RFC,v2,29/35] docs/qapi-domain: warn when QAPI domain xrefs fail to resolve

Message ID 20241213011307.2942030-30-jsnow@redhat.com (mailing list archive)
State New
Headers show
Series Add qapi-domain Sphinx extension | expand

Commit Message

John Snow Dec. 13, 2024, 1:12 a.m. UTC
Ignore the built-in JSON doc types, but warn about anything else. This
is primarily here to assert that the cross-referencing system is
complete and accurate, and that any cross-references the transmogrifier
generates are correctly marked as visible and rendered/indexed by the
qapi-domain.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 docs/sphinx/qapi-domain.py | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff mbox series

Patch

diff --git a/docs/sphinx/qapi-domain.py b/docs/sphinx/qapi-domain.py
index 907ba6d27d3..8dbf0ee5e70 100644
--- a/docs/sphinx/qapi-domain.py
+++ b/docs/sphinx/qapi-domain.py
@@ -1060,6 +1060,16 @@  def resolve_xref(
         multiple_matches = len(matches) > 1
 
         if not matches:
+            if target not in (
+                "string",
+                "number",
+                "int",
+                "boolean",
+                "null",
+                "value",
+                "q_empty",
+            ):
+                print(f"!QXREF: {type=} {target=}")
             return None
         elif multiple_matches:
             logger.warning(