|
|
@ -11,29 +11,28 @@ module L = Logging
|
|
|
|
type log_t =
|
|
|
|
type log_t =
|
|
|
|
?ltr:Errlog.loc_trace
|
|
|
|
?ltr:Errlog.loc_trace
|
|
|
|
-> ?linters_def_file:string
|
|
|
|
-> ?linters_def_file:string
|
|
|
|
-> ?doc_url:string
|
|
|
|
|
|
|
|
-> ?access:string
|
|
|
|
-> ?access:string
|
|
|
|
-> ?extras:Jsonbug_t.extra
|
|
|
|
-> ?extras:Jsonbug_t.extra
|
|
|
|
-> exn
|
|
|
|
-> exn
|
|
|
|
-> unit
|
|
|
|
-> unit
|
|
|
|
|
|
|
|
|
|
|
|
let log_issue_from_errlog procname ~clang_method_kind severity err_log ~loc ~node ~session ~ltr
|
|
|
|
let log_issue_from_errlog procname ~clang_method_kind severity err_log ~loc ~node ~session ~ltr
|
|
|
|
~linters_def_file ~doc_url ~access ~extras exn =
|
|
|
|
~linters_def_file ~access ~extras exn =
|
|
|
|
let issue_type = (Exceptions.recognize_exception exn).name in
|
|
|
|
let issue_type = (Exceptions.recognize_exception exn).name in
|
|
|
|
if (not Config.filtering) (* no-filtering takes priority *) || issue_type.IssueType.enabled then
|
|
|
|
if (not Config.filtering) (* no-filtering takes priority *) || issue_type.IssueType.enabled then
|
|
|
|
|
|
|
|
let doc_url = issue_type.doc_url in
|
|
|
|
Errlog.log_issue procname ~clang_method_kind severity err_log ~loc ~node ~session ~ltr
|
|
|
|
Errlog.log_issue procname ~clang_method_kind severity err_log ~loc ~node ~session ~ltr
|
|
|
|
~linters_def_file ~doc_url ~access ~extras exn
|
|
|
|
~linters_def_file ~doc_url ~access ~extras exn
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let log_frontend_issue procname severity errlog ~loc ~node_key ~ltr ~linters_def_file ~doc_url exn
|
|
|
|
let log_frontend_issue procname severity errlog ~loc ~node_key ~ltr ~linters_def_file exn =
|
|
|
|
=
|
|
|
|
|
|
|
|
let node = Errlog.FrontendNode {node_key} in
|
|
|
|
let node = Errlog.FrontendNode {node_key} in
|
|
|
|
log_issue_from_errlog procname ~clang_method_kind:None severity errlog ~loc ~node ~session:0 ~ltr
|
|
|
|
log_issue_from_errlog procname ~clang_method_kind:None severity errlog ~loc ~node ~session:0 ~ltr
|
|
|
|
~linters_def_file ~doc_url ~access:None ~extras:None exn
|
|
|
|
~linters_def_file ~access:None ~extras:None exn
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let log_issue_from_summary severity summary ~node ~session ~loc ~ltr ?linters_def_file ?doc_url
|
|
|
|
let log_issue_from_summary severity summary ~node ~session ~loc ~ltr ?linters_def_file ?access
|
|
|
|
?access ?extras exn =
|
|
|
|
?extras exn =
|
|
|
|
let attrs = Summary.get_attributes summary in
|
|
|
|
let attrs = Summary.get_attributes summary in
|
|
|
|
let procname = attrs.proc_name in
|
|
|
|
let procname = attrs.proc_name in
|
|
|
|
let is_java_generated_method =
|
|
|
|
let is_java_generated_method =
|
|
|
@ -53,7 +52,7 @@ let log_issue_from_summary severity summary ~node ~session ~loc ~ltr ?linters_de
|
|
|
|
let err_log = Summary.get_err_log summary in
|
|
|
|
let err_log = Summary.get_err_log summary in
|
|
|
|
let clang_method_kind = Some attrs.clang_method_kind in
|
|
|
|
let clang_method_kind = Some attrs.clang_method_kind in
|
|
|
|
log_issue_from_errlog procname ~clang_method_kind severity err_log ~loc ~node ~session ~ltr
|
|
|
|
log_issue_from_errlog procname ~clang_method_kind severity err_log ~loc ~node ~session ~ltr
|
|
|
|
~linters_def_file ~doc_url ~access ~extras exn
|
|
|
|
~linters_def_file ~access ~extras exn
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let log_issue_deprecated_using_state severity proc_name ?node ?loc ?ltr exn =
|
|
|
|
let log_issue_deprecated_using_state severity proc_name ?node ?loc ?ltr exn =
|
|
|
@ -74,10 +73,10 @@ let log_issue_deprecated_using_state severity proc_name ?node ?loc ?ltr exn =
|
|
|
|
Typ.Procname.pp proc_name Typ.Procname.pp proc_name
|
|
|
|
Typ.Procname.pp proc_name Typ.Procname.pp proc_name
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let log_issue_from_summary_simplified severity summary ~loc ?(ltr = []) ?linters_def_file ?doc_url
|
|
|
|
let log_issue_from_summary_simplified severity summary ~loc ?(ltr = []) ?linters_def_file ?access
|
|
|
|
?access ?extras exn =
|
|
|
|
?extras exn =
|
|
|
|
log_issue_from_summary severity summary ~node:Errlog.UnknownNode ~session:0 ~loc ~ltr
|
|
|
|
log_issue_from_summary severity summary ~node:Errlog.UnknownNode ~session:0 ~loc ~ltr
|
|
|
|
?linters_def_file ?doc_url ?access ?extras exn
|
|
|
|
?linters_def_file ?access ?extras exn
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let log_error = log_issue_from_summary_simplified Exceptions.Error
|
|
|
|
let log_error = log_issue_from_summary_simplified Exceptions.Error
|
|
|
@ -89,7 +88,7 @@ let log_issue_external procname severity ~loc ~ltr ?access issue_type error_mess
|
|
|
|
let errlog = IssueLog.get_errlog procname in
|
|
|
|
let errlog = IssueLog.get_errlog procname in
|
|
|
|
let node = Errlog.UnknownNode in
|
|
|
|
let node = Errlog.UnknownNode in
|
|
|
|
log_issue_from_errlog procname ~clang_method_kind:None severity errlog ~loc ~node ~session:0 ~ltr
|
|
|
|
log_issue_from_errlog procname ~clang_method_kind:None severity errlog ~loc ~node ~session:0 ~ltr
|
|
|
|
~linters_def_file:None ~doc_url:None ~access ~extras:None exn
|
|
|
|
~linters_def_file:None ~access ~extras:None exn
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let log_error_using_state summary exn =
|
|
|
|
let log_error_using_state summary exn =
|
|
|
@ -98,7 +97,7 @@ let log_error_using_state summary exn =
|
|
|
|
let loc = State.get_loc () in
|
|
|
|
let loc = State.get_loc () in
|
|
|
|
let ltr = State.get_loc_trace () in
|
|
|
|
let ltr = State.get_loc_trace () in
|
|
|
|
log_issue_from_summary Exceptions.Error summary ~node ~session ~loc ~ltr ?linters_def_file:None
|
|
|
|
log_issue_from_summary Exceptions.Error summary ~node ~session ~loc ~ltr ?linters_def_file:None
|
|
|
|
?doc_url:None ?access:None exn
|
|
|
|
?access:None exn
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let is_suppressed ?(field_name = None) tenv proc_desc kind =
|
|
|
|
let is_suppressed ?(field_name = None) tenv proc_desc kind =
|
|
|
|