From 1128450d0b52c09e78d64df5737b8a034b3e230c Mon Sep 17 00:00:00 2001 From: Chimrod <> Date: Sun, 5 Nov 2023 11:23:08 +0100 Subject: Fixup in the --help message --- bin/args.ml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'bin/args.ml') diff --git a/bin/args.ml b/bin/args.ml index a98981c..54751c8 100644 --- a/bin/args.ml +++ b/bin/args.ml @@ -40,9 +40,7 @@ let enable_module modules identifier = let (module C : Qsp_syntax.S.Analyzer) = Qsp_syntax.Check.get_module t in if String.equal C.identifier identifier then C.active := true) -let speclist modules printer = - ignore modules; - +let speclist printer = let common_arguments = [ ( "--version", @@ -64,7 +62,7 @@ let speclist modules printer = Arg.Set reset_line, "\tEach line is refered from the begining of the file and not the \ location" ); - ("-", Arg.String anon_fun, "\tDisable this test"); + ("-", Arg.Unit (fun () -> ()), "\tDisable this test"); ("+", Arg.Unit (fun () -> ()), "\tEnable this test"); ] and windows_arguments = @@ -80,13 +78,17 @@ let parse : list_tests:(Format.formatter -> unit) -> string list * t = fun ~modules ~list_tests -> - let speclist = speclist modules list_tests in + let speclist = speclist list_tests in let speclist = let r = ref speclist in for i = 1 to pred (Array.length Sys.argv) do let s = Sys.argv.(i) in if s.[0] = '-' + && String.length s > 1 + && s.[1] != '-' + && (not (String.equal s "--help")) + && (not (String.equal s "-help")) && not (List.exists !r ~f:(fun (s', _, _) -> String.equal s s')) then r := -- cgit v1.2.3