X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=src%2Fgenerator.ml;h=28e1cb62646ab7f92c2757e32a3048285b9818cc;hp=6792e07a9416e5c842281a5a06f797b6735430e3;hb=f968f6c36fda3bb66cd37cd56de250c29afa7698;hpb=b6722e6313e955ad0c1e4e4ec594c8e74cdd27af diff --git a/src/generator.ml b/src/generator.ml index 6792e07..28e1cb6 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -890,7 +890,7 @@ the string C<,> (comma)."); ["mount"; "/dev/sda1"; "/"]; ["write_file"; "/new"; "new file contents"; "0"]; ["cat"; "/new"]], "new file contents")], - "Create a file", + "create a file", "\ This call creates a file called C. The contents of the file is the string C (which can contain any 8 bit data), @@ -1154,6 +1154,16 @@ let check_functions () = List.iter (fun arg -> check_arg_ret_name (name_of_argt arg)) (snd style) ) all_functions; + (* Check short descriptions. *) + List.iter ( + fun (name, _, _, _, _, shortdesc, _) -> + if shortdesc.[0] <> Char.lowercase shortdesc.[0] then + failwithf "short description of %s should begin with lowercase." name; + let c = shortdesc.[String.length shortdesc-1] in + if c = '\n' || c = '.' then + failwithf "short description of %s should not end with . or \\n." name + ) all_functions; + (* Check long dscriptions. *) List.iter ( fun (name, _, _, _, _, _, longdesc) ->