@ -384,7 +384,7 @@ let inferconfig_home =
~ parse_mode : CLOpt . ( Infer all_sections ) ~ meta : " dir " " Path to the .inferconfig file "
~ parse_mode : CLOpt . ( Infer all_sections ) ~ meta : " dir " " Path to the .inferconfig file "
and project_root =
and project_root =
CLOpt . mk_path ~ deprecated : [ " project_root " ; " -project_root " ] ~ long : " project-root " ~ short : " pr "
CLOpt . mk_path ~ deprecated : [ " project_root " ; " -project_root " ; " pr " ] ~ long : " project-root " ~ short : 'C'
~ default : CLOpt . init_work_dir
~ default : CLOpt . init_work_dir
~ parse_mode : CLOpt . ( Infer [ Analysis ; Clang ; Driver ; Print ] )
~ parse_mode : CLOpt . ( Infer [ Analysis ; Clang ; Driver ; Print ] )
~ meta : " dir " " Specify the root directory of the project "
~ meta : " dir " " Specify the root directory of the project "
@ -513,7 +513,7 @@ and analyzer =
documentation of this option * )
documentation of this option * )
| Capture | Compile | Infer | Eradicate | Checkers | Tracing | Crashcontext | Linters
| Capture | Compile | Infer | Eradicate | Checkers | Tracing | Crashcontext | Linters
| Quandary | Threadsafety | Bufferoverrun -> () in
| Quandary | Threadsafety | Bufferoverrun -> () in
CLOpt . mk_symbol_opt ~ deprecated : [ " analyzer " ] ~ long : " analyzer " ~ short : " a "
CLOpt . mk_symbol_opt ~ deprecated : [ " analyzer " ] ~ long : " analyzer " ~ short : 'a'
~ parse_mode : CLOpt . ( Infer [ Driver ] )
~ parse_mode : CLOpt . ( Infer [ Driver ] )
" Specify which analyzer to run (only one at a time is supported): \n \
" Specify which analyzer to run (only one at a time is supported): \n \
- infer , eradicate , checkers , quandary , threadsafety , bufferoverrun : run the specified analysis \ n \
- infer , eradicate , checkers , quandary , threadsafety , bufferoverrun : run the specified analysis \ n \
@ -546,7 +546,7 @@ and array_level =
- 2 = assumes that all heap dereferences via array indexing and pointer \
- 2 = assumes that all heap dereferences via array indexing and pointer \
arithmetic are correct "
arithmetic are correct "
and ast_file =
and ast_file =
CLOpt . mk_path_opt ~ long: " ast-file " ~ short : " ast "
CLOpt . mk_path_opt ~ deprecated: [ " ast " ] ~ long : " ast-file "
~ meta : " file " " AST file for the translation "
~ meta : " file " " AST file for the translation "
and blacklist =
and blacklist =
@ -752,7 +752,7 @@ and (
" Show internal exceptions "
" Show internal exceptions "
and filtering =
and filtering =
CLOpt . mk_bool ~ long: " filtering " ~ short : " f " ~ default : true
CLOpt . mk_bool ~ deprecated_no: [ " nf " ] ~ long: " filtering " ~ short : 'f' ~ default : true
~ parse_mode : CLOpt . ( Infer [ Driver ] )
~ parse_mode : CLOpt . ( Infer [ Driver ] )
" Do not show the results from experimental checks (note: some of them may contain many false \
" Do not show the results from experimental checks (note: some of them may contain many false \
alarms ) "
alarms ) "
@ -788,7 +788,7 @@ and (
" Produce dotty files for specs in the results directory "
" Produce dotty files for specs in the results directory "
in
in
let debug =
let debug =
CLOpt . mk_bool_group ~ deprecated : [ " debug " ] ~ long : " debug " ~ short : " g "
CLOpt . mk_bool_group ~ deprecated : [ " debug " ] ~ long : " debug " ~ short : 'g'
~ parse_mode : CLOpt . ( Infer [ Driver ] )
~ parse_mode : CLOpt . ( Infer [ Driver ] )
" Debug mode (also sets --developer-mode, --no-filtering, --print-buckets, --print-types, \
" Debug mode (also sets --developer-mode, --no-filtering, --print-buckets, --print-types, \
- - reports - include - ml - loc , - - no - test , - - trace - error , - - write - dotty , - - write - html ) "
- - reports - include - ml - loc , - - no - test , - - trace - error , - - write - dotty , - - write - html ) "
@ -938,12 +938,12 @@ and from_json_report =
files generated by the analysis ) . "
files generated by the analysis ) . "
and frontend_debug =
and frontend_debug =
CLOpt . mk_bool ~ long: " frontend-debug " ~ short : " fd "
CLOpt . mk_bool ~ deprecated: [ " fd " ] ~ deprecated_no : [ " nfd " ] ~ long : " frontend-debug "
" Emit debug info to *.o.astlog and a script *.o.sh that replays the command used to run clang \
" Emit debug info to *.o.astlog and a script *.o.sh that replays the command used to run clang \
with the plugin attached , piped to the InferClang frontend command ( clang only ) "
with the plugin attached , piped to the InferClang frontend command ( clang only ) "
and frontend_stats =
and frontend_stats =
CLOpt . mk_bool ~ long: " frontend-stats " ~ short : " f s"
CLOpt . mk_bool ~ deprecated: [ " fs " ] ~ deprecated_no : [ " nfs " ] ~ long : " frontend-stat s"
" Output statistics about the capture phase to *.o.astlog (clang only) "
" Output statistics about the capture phase to *.o.astlog (clang only) "
and frontend_tests =
and frontend_tests =
@ -957,7 +957,7 @@ and generated_classes =
" Specify where to load the generated class files "
" Specify where to load the generated class files "
and headers =
and headers =
CLOpt . mk_bool ~ deprecated : [ " headers " ] ~ deprecated_no : [ " no_headers " ] ~ long : " headers " ~ short : " hd "
CLOpt . mk_bool ~ deprecated : [ " headers " ; " hd " ] ~ deprecated_no : [ " no_headers " ; " nhd " ] ~ long : " headers "
~ parse_mode : CLOpt . ( Infer [ Clang ] )
~ parse_mode : CLOpt . ( Infer [ Clang ] )
" Analyze code in header files "
" Analyze code in header files "
@ -999,7 +999,7 @@ and java_jar_compiler =
~ meta : " path " " Specifify the Java compiler jar used to generate the bytecode "
~ meta : " path " " Specifify the Java compiler jar used to generate the bytecode "
and jobs =
and jobs =
CLOpt . mk_int ~ deprecated : [ " -multicore " ] ~ long : " jobs " ~ short : " j " ~ default : ncpu
CLOpt . mk_int ~ deprecated : [ " -multicore " ] ~ long : " jobs " ~ short : 'j' ~ default : ncpu
~ parse_mode : CLOpt . ( Infer [ Driver ] )
~ parse_mode : CLOpt . ( Infer [ Driver ] )
~ meta : " int " " Run the specified number of analysis jobs simultaneously "
~ meta : " int " " Run the specified number of analysis jobs simultaneously "
@ -1025,7 +1025,7 @@ and linters_developer_mode =
default linters and also sets - - print - logs , - - debug and - - no - allowed - failures . "
default linters and also sets - - print - logs , - - debug and - - no - allowed - failures . "
and load_average =
and load_average =
CLOpt . mk_float_opt ~ long : " load-average " ~ short : " l "
CLOpt . mk_float_opt ~ long : " load-average " ~ short : 'l'
~ parse_mode : CLOpt . ( Infer [ Driver ] ) ~ meta : " float "
~ parse_mode : CLOpt . ( Infer [ Driver ] ) ~ meta : " float "
" Do not start new parallel jobs if the load average is greater than that specified (Buck and \
" Do not start new parallel jobs if the load average is greater than that specified (Buck and \
make only ) "
make only ) "
@ -1145,7 +1145,8 @@ and procs_xml =
- - results - dir ) "
- - results - dir ) "
and progress_bar =
and progress_bar =
CLOpt . mk_bool ~ deprecated_no : [ " no_progress_bar " ] ~ long : " progress-bar " ~ short : " pb " ~ default : true
CLOpt . mk_bool ~ deprecated : [ " pb " ] ~ deprecated_no : [ " no_progress_bar " ; " npb " ] ~ short : 'p'
~ long : " progress-bar " ~ default : true
~ parse_mode : CLOpt . ( Infer [ Driver ] )
~ parse_mode : CLOpt . ( Infer [ Driver ] )
" Show a progress bar "
" Show a progress bar "
@ -1160,12 +1161,12 @@ and quandary_sinks =
" Specify custom sinks for Quandary "
" Specify custom sinks for Quandary "
and quiet =
and quiet =
CLOpt . mk_bool ~ long : " quiet " ~ short : " q " ~ default : ( current_exe < > Print )
CLOpt . mk_bool ~ long : " quiet " ~ short : 'q' ~ default : ( current_exe < > Print )
~ parse_mode : CLOpt . ( Infer [ Print ] )
~ parse_mode : CLOpt . ( Infer [ Print ] )
" 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 " ~ short : " r "
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 =
@ -1213,7 +1214,7 @@ and rest =
)
)
and results_dir =
and results_dir =
CLOpt . mk_path ~ deprecated : [ " results_dir " ; " -out " ] ~ long : " results-dir " ~ short : " o "
CLOpt . mk_path ~ deprecated : [ " results_dir " ; " -out " ] ~ long : " results-dir " ~ short : 'o'
~ default : ( CLOpt . init_work_dir ^/ " infer-out " )
~ default : ( CLOpt . init_work_dir ^/ " infer-out " )
~ parse_mode : CLOpt . ( Infer [ Analysis ; Clang ; Driver ; Print ] )
~ parse_mode : CLOpt . ( Infer [ Analysis ; Clang ; Driver ; Print ] )
~ meta : " dir " " Write results and internal files in the specified directory "
~ meta : " dir " " Write results and internal files in the specified directory "
@ -1264,7 +1265,7 @@ and spec_abs_level =
and specs_library =
and specs_library =
let specs_library =
let specs_library =
CLOpt . mk_path_list ~ long: " specs-library " ~ short : " lib "
CLOpt . mk_path_list ~ deprecated: [ " lib " ] ~ long: " specs-library " ~ short : 'L'
~ meta : " dir|jar " " Search for .spec files in given directory or jar file " in
~ meta : " dir|jar " " Search for .spec files in given directory or jar file " in
let _ =
let _ =
(* Given a filename with a list of paths, convert it into a list of string iff they are
(* Given a filename with a list of paths, convert it into a list of string iff they are
@ -1290,7 +1291,7 @@ and specs_library =
specs_library
specs_library
and stacktrace =
and stacktrace =
CLOpt . mk_path_opt ~ long: " stacktrace " ~ short : " st " ~ parse_mode : CLOpt . ( Infer [ Crashcontext ] )
CLOpt . mk_path_opt ~ deprecated: [ " st " ] ~ long : " stacktrace " ~ parse_mode : CLOpt . ( Infer [ Crashcontext ] )
~ meta : " file " " File path containing a json-encoded Java crash stacktrace. Used to guide the \
~ meta : " file " " File path containing a json-encoded Java crash stacktrace. Used to guide the \
analysis ( only with ' - a crashcontext' ) . See \
analysis ( only with ' - a crashcontext' ) . See \
tests / codetoanalyze / java / crashcontext /* . json for examples of the expected format . "
tests / codetoanalyze / java / crashcontext /* . json for examples of the expected format . "
@ -1321,7 +1322,8 @@ and test_filtering =
" List all the files Infer can report on (should be called from the root of the project) "
" List all the files Infer can report on (should be called from the root of the project) "
and testing_mode =
and testing_mode =
CLOpt . mk_bool ~ deprecated : [ " testing_mode " ; " -testing_mode " ] ~ long : " testing-mode " ~ short : " tm "
CLOpt . mk_bool ~ deprecated : [ " testing_mode " ; " -testing_mode " ; " tm " ] ~ deprecated_no : [ " ntm " ]
~ long : " testing-mode "
" Mode for testing, where no headers are translated, and dot files are created (clang only) "
" Mode for testing, where no headers are translated, and dot files are created (clang only) "
and threadsafe_aliases =
and threadsafe_aliases =
@ -1413,7 +1415,7 @@ and xml_specs =
Infer . run_javac for a version that looks inside argfiles , and discussion in D4397716 . * )
Infer . run_javac for a version that looks inside argfiles , and discussion in D4397716 . * )
let javac_classes_out =
let javac_classes_out =
CLOpt . mk_string ~ parse_mode : CLOpt . Javac
CLOpt . mk_string ~ parse_mode : CLOpt . Javac
~ deprecated : [ " classes_out " ] ~ short: " d " ~ long : " " ~ default : CLOpt . init_work_dir
~ deprecated : [ " classes_out " ] ~ long: " " ~ short : 'd' ~ default : CLOpt . init_work_dir
~ f : ( fun classes_out ->
~ f : ( fun classes_out ->
if ! buck then (
if ! buck then (
let classes_out_infer = resolve classes_out ^/ buck_results_dir_name in
let classes_out_infer = resolve classes_out ^/ buck_results_dir_name in
@ -1426,7 +1428,7 @@ let javac_classes_out =
and java_classpath =
and java_classpath =
CLOpt . mk_string_opt ~ parse_mode : CLOpt . Javac
CLOpt . mk_string_opt ~ parse_mode : CLOpt . Javac
~ deprecated : [ " classpath " ] ~ short : " cp " ~ long : " "
~ deprecated : [ " classpath " ;" cp " ] ~ long : " "
~ f : ( fun classpath ->
~ f : ( fun classpath ->
if ! buck then (
if ! buck then (
let paths = String . split classpath ~ on : ':' in
let paths = String . split classpath ~ on : ':' in