summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/generator.ml12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/generator.ml b/src/generator.ml
index 6792e07a..28e1cb62 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<path>. The contents of the
file is the string C<content> (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) ->