]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
qapi: Call QAPIDoc.check() always
authorMarkus Armbruster <armbru@redhat.com>
Fri, 16 Feb 2024 14:58:36 +0000 (15:58 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 26 Feb 2024 09:43:56 +0000 (10:43 +0100)
We currently call QAPIDoc.check() only for definition documentation.
Calling it for free-form documentation as well is simpler.  No change,
because it doesn't actually do anything there.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20240216145841.2099240-13-armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
scripts/qapi/schema.py

index 6a836950a9abc17f194f7fd0595eca0f9632b1cb..8ba5665bc68bf7a6f8f9bd92a5e1d9d82de84b43 100644 (file)
@@ -95,10 +95,6 @@ class QAPISchemaEntity:
             for f in self.features:
                 doc.connect_feature(f)
 
-    def check_doc(self):
-        if self.doc:
-            self.doc.check()
-
     def _set_module(self, schema, info):
         assert self._checked
         fname = info.fname if info else QAPISchemaModule.BUILTIN_MODULE_NAME
@@ -1223,9 +1219,10 @@ class QAPISchema:
         for ent in self._entity_list:
             ent.check(self)
             ent.connect_doc()
-            ent.check_doc()
         for ent in self._entity_list:
             ent.set_module(self)
+        for doc in self.docs:
+            doc.check()
 
     def visit(self, visitor):
         visitor.visit_begin(self)