[infer][checkers] simplify the logic to invoke the repeated call checker

Reviewed By: jberdine

Differential Revision: D4816797

fbshipit-source-id: 0d65292
master
Jeremy Dubreil 8 years ago committed by Facebook Github Bot
parent bf55514b85
commit 54547c9fd7

@ -621,11 +621,22 @@ and changed_files_index =
"Specify the file containing the list of source files from which reactive analysis should \ "Specify the file containing the list of source files from which reactive analysis should \
start. Source files should be specified relative to project root or be absolute" start. Source files should be specified relative to project root or be absolute"
and checkers, crashcontext, eradicate, quandary, threadsafety, bufferoverrun = and bufferoverrun, checkers, checkers_repeated_calls,
crashcontext, eradicate, quandary, threadsafety =
let checkers = let checkers =
CLOpt.mk_bool ~deprecated:["checkers"] ~long:"checkers" CLOpt.mk_bool ~deprecated:["checkers"] ~long:"checkers"
"Activate the checkers instead of the full analysis" "Activate the checkers instead of the full analysis"
in in
let bufferoverrun =
CLOpt.mk_bool_group ~long:"bufferoverrun"
"Activate the buffer overrun analysis"
[checkers] []
in
let checkers_repeated_calls =
CLOpt.mk_bool_group ~long:"checkers-repeated-calls"
"Check for repeated calls"
[checkers] []
in
let crashcontext = let crashcontext =
CLOpt.mk_bool_group ~deprecated:["crashcontext"] ~long:"crashcontext" CLOpt.mk_bool_group ~deprecated:["crashcontext"] ~long:"crashcontext"
"Activate the crashcontext checker for Java stack trace context reconstruction" "Activate the crashcontext checker for Java stack trace context reconstruction"
@ -646,16 +657,8 @@ and checkers, crashcontext, eradicate, quandary, threadsafety, bufferoverrun =
"Activate the thread safety analysis" "Activate the thread safety analysis"
[checkers] [] [checkers] []
in in
let bufferoverrun = (bufferoverrun, checkers, checkers_repeated_calls,
CLOpt.mk_bool_group ~long:"bufferoverrun" crashcontext, eradicate, quandary, threadsafety)
"Activate the buffer overrun analysis"
[checkers] []
in
(checkers, crashcontext, eradicate, quandary, threadsafety, bufferoverrun)
and checkers_repeated_calls =
CLOpt.mk_bool ~long:"checkers-repeated-calls"
"Check for repeated calls"
and clang_biniou_file = and clang_biniou_file =
CLOpt.mk_path_opt ~long:"clang-biniou-file" ~parse_mode:CLOpt.(Infer [Clang]) ~meta:"file" CLOpt.mk_path_opt ~long:"clang-biniou-file" ~parse_mode:CLOpt.(Infer [Clang]) ~meta:"file"
@ -1596,7 +1599,7 @@ and changed_files_index = !changed_files_index
and calls_csv = !calls_csv and calls_csv = !calls_csv
and dump_duplicate_symbols = !dump_duplicate_symbols and dump_duplicate_symbols = !dump_duplicate_symbols
and checkers = !checkers and checkers = !checkers
and checkers_repeated_calls = !checkers && !checkers_repeated_calls and checkers_repeated_calls = !checkers_repeated_calls
and clang_biniou_file = !clang_biniou_file and clang_biniou_file = !clang_biniou_file
and clang_include_to_override = !clang_include_to_override and clang_include_to_override = !clang_include_to_override
and classpath = !classpath and classpath = !classpath
@ -1745,7 +1748,8 @@ and analysis_blacklist_files_containing analyzer =
and analysis_suppress_errors analyzer = and analysis_suppress_errors analyzer =
List.Assoc.find_exn ~equal:equal_analyzer analysis_suppress_errors_options analyzer List.Assoc.find_exn ~equal:equal_analyzer analysis_suppress_errors_options analyzer
let checkers_enabled = not (eradicate || crashcontext || quandary || threadsafety) let checkers_enabled =
not (eradicate || crashcontext || quandary || threadsafety || checkers_repeated_calls)
let clang_frontend_do_capture, clang_frontend_do_lint = let clang_frontend_do_capture, clang_frontend_do_lint =
match !clang_frontend_action with match !clang_frontend_action with

Loading…
Cancel
Save