[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH 5/6] generator: Check 'added' field is set for each API.



---
 generator/checks.ml | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/generator/checks.ml b/generator/checks.ml
index 10910fb..e02dcab 100644
--- a/generator/checks.ml
+++ b/generator/checks.ml
@@ -60,6 +60,15 @@ let () =
 *)
   ) (all_functions @ fish_commands);
 
+  (* Check added field was set to something. *)
+  List.iter (
+    function
+    | { name = name; visibility = VPublic|VPublicNoFish|VDebug;
+        added = (-1, _, _) } ->
+       failwithf "function %s has no 'added' (version when added) field" name
+    | _ -> ()
+  ) all_functions;
+
   (* Check function parameter/return names. *)
   List.iter (
     fun { name = name; style = style } ->
-- 
2.3.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]