diff options
author | Chimrod <> | 2023-11-05 11:23:08 +0100 |
---|---|---|
committer | Chimrod <> | 2023-11-05 11:23:08 +0100 |
commit | 1128450d0b52c09e78d64df5737b8a034b3e230c (patch) | |
tree | 9961b47c91e0530dcd6829833da1cc05b42b8ac2 /bin/args.ml | |
parent | 6ada3862d96f82e44b3b19dd84d08cbb8c6a6006 (diff) |
Fixup in the --help message
Diffstat (limited to 'bin/args.ml')
-rw-r--r-- | bin/args.ml | 12 |
1 files changed, 7 insertions, 5 deletions
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" ); - ("-<test>", Arg.String anon_fun, "\tDisable this test"); + ("-<test>", Arg.Unit (fun () -> ()), "\tDisable this test"); ("+<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 := |