[cli] do not accept unknown arguments in OCaml

Summary:
Checked manually that Config.ml covers all the options declared in Python:
`cd ~/infer && git grep --color -nH -e 'add_argument'`

Reviewed By: jeremydubreil

Differential Revision: D4430402

fbshipit-source-id: e4c8614
master
Jules Villard 8 years ago committed by Facebook Github Bot
parent 988145dea0
commit 69f8140655

@ -46,8 +46,6 @@ def create_argparser(group_name=MODULE_NAME):
'{grp} module'.format(grp=MODULE_NAME), '{grp} module'.format(grp=MODULE_NAME),
description=MODULE_DESCRIPTION, description=MODULE_DESCRIPTION,
) )
group.add_argument('--print-harness', action='store_true',
help='Print generated harness code (Android only)')
group.add_argument('--use-flavors', action='store_true', group.add_argument('--use-flavors', action='store_true',
help='Run Infer analysis through the use of flavors. ' help='Run Infer analysis through the use of flavors. '
'Currently this is supported only for the cxx_* ' 'Currently this is supported only for the cxx_* '
@ -67,10 +65,6 @@ def create_argparser(group_name=MODULE_NAME):
group.add_argument('--blacklist-regex', group.add_argument('--blacklist-regex',
help='Specify the regex for files to skip during ' help='Specify the regex for files to skip during '
'the analysis (requires --use-flavors to work)') 'the analysis (requires --use-flavors to work)')
group.add_argument('--merge-deps-files', action='store_true',
help='Merge the infer-deps.txt files generated by Buck '
'during the analysis (requires --use-flavors to '
'work)')
group.add_argument('--Xbuck', action='append', default=[], group.add_argument('--Xbuck', action='append', default=[],
type=string_in_quotes, type=string_in_quotes,
help='Pass values as command-line arguments to ' help='Pass values as command-line arguments to '

@ -1006,7 +1006,7 @@ and quiet =
"Do not print specs on standard output" "Do not print specs on standard output"
and reactive = and reactive =
CLOpt.mk_bool ~deprecated:["reactive"] ~long:"reactive" CLOpt.mk_bool ~deprecated:["reactive"] ~long:"reactive" ~short:"r"
"Reactive mode: the analysis starts from the files captured since the `infer` command started" "Reactive mode: the analysis starts from the files captured since the `infer` command started"
and reactive_capture = and reactive_capture =
@ -1161,7 +1161,7 @@ and unsafe_malloc =
"Assume that malloc(3) never returns null." "Assume that malloc(3) never returns null."
and use_compilation_database = and use_compilation_database =
CLOpt.mk_symbol_opt ~long:"use-compilation-database" CLOpt.mk_symbol_opt ~long:"compilation-database" ~deprecated:["-use-compilation-database"]
"Buck integration using the compilation database, with or without dependencies." "Buck integration using the compilation database, with or without dependencies."
~symbols:[("deps", `Deps); ("no-deps", `NoDeps)] ~symbols:[("deps", `Deps); ("no-deps", `NoDeps)]
@ -1346,7 +1346,7 @@ let post_parsing_initialization () =
let parse_args_and_return_usage_exit = let parse_args_and_return_usage_exit =
let usage_exit = let usage_exit =
CLOpt.parse ~accept_unknown:true ~config_file:inferconfig_path current_exe exe_usage in CLOpt.parse ~config_file:inferconfig_path current_exe exe_usage in
post_parsing_initialization () ; post_parsing_initialization () ;
usage_exit usage_exit

Loading…
Cancel
Save