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

Richard W.M. Jones rjones at redhat.com
Tue May 26 10:38:42 UTC 2015


---
 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




More information about the Libguestfs mailing list