[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH v2 29/35] docs/qapi-domain: warn when QAPI domain xrefs fail
From: |
John Snow |
Subject: |
[RFC PATCH v2 29/35] docs/qapi-domain: warn when QAPI domain xrefs fail to resolve |
Date: |
Thu, 12 Dec 2024 20:12:58 -0500 |
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 --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(
--
2.47.0
- [RFC PATCH v2 18/35] docs/qapi-domain: add qapi:enum directive, (continued)
- [RFC PATCH v2 18/35] docs/qapi-domain: add qapi:enum directive, John Snow, 2024/12/12
- [RFC PATCH v2 20/35] docs/qapi-domain: add qapi:event directive, John Snow, 2024/12/12
- [RFC PATCH v2 22/35] docs/qapi-domain: add qapi:union and qapi:branch directives, John Snow, 2024/12/12
- [RFC PATCH v2 23/35] docs/qapi-domain: add :deprecated: directive option, John Snow, 2024/12/12
- [RFC PATCH v2 24/35] docs/qapi-domain: add :unstable: directive option, John Snow, 2024/12/12
- [RFC PATCH v2 26/35] docs/qapi-domain: add warnings for malformed field lists, John Snow, 2024/12/12
- [RFC PATCH v2 27/35] docs/qapi-domain: add type cross-refs to field lists, John Snow, 2024/12/12
- [RFC PATCH v2 25/35] docs/qapi-domain: add :ifcond: directive option, John Snow, 2024/12/12
- [RFC PATCH v2 30/35] docs/qapi-domain: implement error context reporting fix, John Snow, 2024/12/12
- [RFC PATCH v2 28/35] docs/qapi-domain: add CSS styling, John Snow, 2024/12/12
- [RFC PATCH v2 29/35] docs/qapi-domain: warn when QAPI domain xrefs fail to resolve,
John Snow <=
- [RFC PATCH v2 31/35] docs/qapi-domain: collapsible branches, John Snow, 2024/12/12
- [RFC PATCH v2 32/35] WIP: 3.x - XREF, John Snow, 2024/12/12
- [RFC PATCH v2 35/35] WIP: 3.x css theming for missing xref, John Snow, 2024/12/12
- [RFC PATCH v2 34/35] WIP: 3.x ObjectDesc compat, John Snow, 2024/12/12
- [RFC PATCH v2 33/35] WIP: 3.x ParserFix, John Snow, 2024/12/12
- [RFC PATCH v2 21/35] docs/qapi-domain: add qapi:struct directive, John Snow, 2024/12/12