Skip to content

Commit e854248

Browse files
committed
Review fixes
1 parent 3c79d74 commit e854248

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

lib/mli_parser.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ let make_block code_block file_contents =
153153
(* Given the locations of the code blocks within [file_contents], then slice it up into
154154
[Text] and [Block] parts by using the starts and ends of those blocks as
155155
boundaries. *)
156-
let parse_generic code_blocks file_contents =
156+
let extract_blocks code_blocks file_contents =
157157
let cursor, tokens =
158158
List.fold_left
159159
(fun (cursor, code_blocks) (code_block : Code_block.t) ->
@@ -184,7 +184,7 @@ let parse_generic code_blocks file_contents =
184184
let parse_mli file_contents =
185185
try
186186
let code_blocks = docstring_code_blocks file_contents in
187-
Ok (parse_generic code_blocks file_contents)
187+
Ok (extract_blocks code_blocks file_contents)
188188
with exn -> Error [ `Msg (Printexc.to_string exn) ]
189189
190190
let parse_mld ?(filename = "_none_") file_contents =
@@ -194,4 +194,4 @@ let parse_mld ?(filename = "_none_") file_contents =
194194
let code_blocks =
195195
extract_code_block_info [] ~location ~docstring:file_contents |> List.rev
196196
in
197-
Ok (parse_generic code_blocks file_contents)
197+
Ok (extract_blocks code_blocks file_contents)

test/bin/gen_rule_helpers/gen_rule_helpers.ml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ let test_file ~dir_name files =
5656
let is_test_file f = List.mem f cwd_test_files in
5757
match List.filter is_test_file files with
5858
| [ test_file ] -> test_file
59-
| _ ->
60-
Format.eprintf "No test file for %s\n" dir_name;
59+
| found_files ->
60+
Format.eprintf "Invalid number of test file for %s (found %a)\n" dir_name
61+
pp_string_list found_files;
6162
Format.eprintf "There should be exactly one of [%a]\n" pp_string_list
6263
cwd_test_files;
6364
exit 1

0 commit comments

Comments
 (0)