aboutsummaryrefslogtreecommitdiff
path: root/bin/args.ml
diff options
context:
space:
mode:
Diffstat (limited to 'bin/args.ml')
-rw-r--r--bin/args.ml12
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 :=