[infer][checkers] filter out the experimental issues instead of using a whitelist

Summary: The issues that are not reported by default are all experimental issues from the biabduction analysis. In that case, it is easier to use a blacklist of errors to filter out so that the issues found by the checkers based on the AI framework can be reported by default without having to add them to the whitelist.

Reviewed By: jvillard

Differential Revision: D5051327

fbshipit-source-id: 2a93b11
master
Jeremy Dubreil 8 years ago committed by Facebook Github Bot
parent 06dfadecb7
commit 3b9aa9ad15

@ -306,25 +306,24 @@ let should_report (issue_kind: Exceptions.err_kind) issue_type error_desc eclass
}; };
issue_bucket_is_high issue_bucket_is_high
} else { } else {
let issue_type_is_reportable = { let blacklisted_by_default =
let reportable_issue_types = Localise.[
Localise.[ analysis_stops,
Localise.from_string Config.default_failure_name, divide_by_zero,
context_leak, return_value_ignored,
double_lock, array_out_of_bounds_l1,
empty_vector_access, array_out_of_bounds_l2,
memory_leak, array_out_of_bounds_l3,
quandary_taint_error, null_test_after_dereference,
resource_leak, class_cast_exception,
retain_cycle, uninitialized_value,
static_initialization_order_fiasco, stack_variable_address_escape,
tainted_value_reaching_sensitive_function, dangling_pointer_dereference,
thread_safety_violation, unary_minus_applied_to_unsigned_expression,
unsafe_guarded_by_access condition_always_true,
]; condition_always_false
List.mem equal::Localise.equal reportable_issue_types issue_type ];
}; not (List.mem equal::Localise.equal blacklisted_by_default issue_type)
issue_type_is_reportable
} }
} }
} }

@ -608,17 +608,9 @@ and checkers_repeated_calls =
CLOpt.mk_bool ~long:"checkers-repeated-calls" ~in_help:CLOpt.[Analyze, manual_generic] CLOpt.mk_bool ~long:"checkers-repeated-calls" ~in_help:CLOpt.[Analyze, manual_generic]
"check for repeated calls" "check for repeated calls"
and checkers, eradicate = and checkers =
let checkers = CLOpt.mk_bool ~long:"checkers" ~in_help:CLOpt.[Analyze, manual_generic]
CLOpt.mk_bool ~deprecated:["checkers"] ~long:"checkers" "the checkers instead of the full analysis"
"Activate the checkers instead of the full analysis"
in
let eradicate =
CLOpt.mk_bool_group ~deprecated:["eradicate"] ~long:"eradicate"
"Activate the eradicate checker for Java annotations"
[checkers] []
in
(checkers, eradicate)
and clang_biniou_file = and clang_biniou_file =
CLOpt.mk_path_opt ~long:"clang-biniou-file" CLOpt.mk_path_opt ~long:"clang-biniou-file"
@ -854,6 +846,10 @@ and enable_checks =
CLOpt.mk_string_list ~deprecated:["enable_checks"] ~long:"enable-checks" ~meta:"error name" CLOpt.mk_string_list ~deprecated:["enable_checks"] ~long:"enable-checks" ~meta:"error name"
"Show reports coming from this type of errors" "Show reports coming from this type of errors"
and eradicate =
CLOpt.mk_bool ~long:"eradicate" ~in_help:CLOpt.[Analyze, manual_generic]
"the eradicate checker for Java annotations"
and eradicate_condition_redundant = and eradicate_condition_redundant =
CLOpt.mk_bool ~long:"eradicate-condition-redundant" CLOpt.mk_bool ~long:"eradicate-condition-redundant"
"Condition redundant warnings" "Condition redundant warnings"

Loading…
Cancel
Save