|
|
|
@ -17,12 +17,14 @@ type log_t =
|
|
|
|
|
?session: int ->
|
|
|
|
|
?ltr: Errlog.loc_trace ->
|
|
|
|
|
?linters_def_file:string ->
|
|
|
|
|
?doc_url:string ->
|
|
|
|
|
exn ->
|
|
|
|
|
unit
|
|
|
|
|
|
|
|
|
|
type log_issue_from_errlog = Errlog.t -> log_t
|
|
|
|
|
|
|
|
|
|
let log_issue_from_errlog err_kind err_log ?loc ?node_id ?session ?ltr ?linters_def_file exn =
|
|
|
|
|
let log_issue_from_errlog err_kind err_log ?loc ?node_id ?session ?ltr ?linters_def_file
|
|
|
|
|
?doc_url exn =
|
|
|
|
|
let loc = match loc with
|
|
|
|
|
| None -> State.get_loc ()
|
|
|
|
|
| Some loc -> loc in
|
|
|
|
@ -40,10 +42,11 @@ let log_issue_from_errlog err_kind err_log ?loc ?node_id ?session ?ltr ?linters_
|
|
|
|
|
| _ -> let err_name, _, _, _, _, _, _ = Exceptions.recognize_exception exn in
|
|
|
|
|
(Localise.to_issue_id err_name) in
|
|
|
|
|
if (Inferconfig.is_checker_enabled err_name) then
|
|
|
|
|
Errlog.log_issue err_kind err_log loc node_id session ltr ?linters_def_file exn
|
|
|
|
|
Errlog.log_issue err_kind err_log loc node_id session ltr ?linters_def_file ?doc_url exn
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let log_issue_from_summary err_kind summary ?loc ?node_id ?session ?ltr ?linters_def_file exn =
|
|
|
|
|
let log_issue_from_summary err_kind summary ?loc ?node_id ?session ?ltr ?linters_def_file
|
|
|
|
|
?doc_url exn =
|
|
|
|
|
let is_generated_method =
|
|
|
|
|
Typ.Procname.java_is_generated (Specs.get_proc_name summary) in
|
|
|
|
|
let should_suppress_lint =
|
|
|
|
@ -55,7 +58,8 @@ let log_issue_from_summary err_kind summary ?loc ?node_id ?session ?ltr ?linters
|
|
|
|
|
() (* Skip the reporting *)
|
|
|
|
|
else
|
|
|
|
|
let err_log = summary.Specs.attributes.ProcAttributes.err_log in
|
|
|
|
|
log_issue_from_errlog err_kind err_log ?loc ?node_id ?session ?ltr ?linters_def_file exn
|
|
|
|
|
log_issue_from_errlog err_kind err_log ?loc ?node_id ?session ?ltr ?linters_def_file
|
|
|
|
|
?doc_url exn
|
|
|
|
|
|
|
|
|
|
let log_issue_deprecated
|
|
|
|
|
?(store_summary=false)
|
|
|
|
@ -66,10 +70,12 @@ let log_issue_deprecated
|
|
|
|
|
?session
|
|
|
|
|
?ltr
|
|
|
|
|
?linters_def_file
|
|
|
|
|
?doc_url
|
|
|
|
|
exn =
|
|
|
|
|
match Specs.get_summary proc_name with
|
|
|
|
|
| Some summary ->
|
|
|
|
|
log_issue_from_summary err_kind summary ?loc ?node_id ?session ?ltr ?linters_def_file exn;
|
|
|
|
|
log_issue_from_summary err_kind summary ?loc ?node_id ?session ?ltr ?linters_def_file
|
|
|
|
|
?doc_url exn;
|
|
|
|
|
if store_summary then
|
|
|
|
|
(* TODO (#16348004): This is currently needed as ThreadSafety works as a cluster checker *)
|
|
|
|
|
Specs.store_summary summary
|
|
|
|
|