Reporting cleanup 15: simplify log_issue_deprecated_using_state

Reviewed By: jeremydubreil

Differential Revision: D9633590

fbshipit-source-id: cacf74cc8
master
Mehdi Bouaziz 6 years ago committed by Facebook Github Bot
parent b8426be310
commit 98f29bceb4

@ -56,8 +56,7 @@ let log_issue_from_summary severity summary ~node ~session ~loc ~ltr ?linters_de
~linters_def_file ~doc_url ~access ~extras exn
let log_issue_deprecated_using_state severity proc_name ?node ?loc ?ltr ?linters_def_file ?doc_url
?access ?extras:_ exn =
let log_issue_deprecated_using_state severity proc_name ?node ?loc ?ltr exn =
match Summary.get proc_name with
| Some summary ->
let node =
@ -67,8 +66,7 @@ let log_issue_deprecated_using_state severity proc_name ?node ?loc ?ltr ?linters
let session = State.get_session () in
let loc = match loc with None -> State.get_loc () | Some loc -> loc in
let ltr = match ltr with None -> State.get_loc_trace () | Some ltr -> ltr in
log_issue_from_summary severity summary ~node ~session ~loc ~ltr ?linters_def_file ?doc_url
?access exn
log_issue_from_summary severity summary ~node ~session ~loc ~ltr exn
| None ->
L.(die InternalError)
"Trying to report error on procedure %a, but cannot because no summary exists for this \

@ -19,7 +19,13 @@ type log_t =
-> unit
val log_issue_deprecated_using_state :
Exceptions.severity -> Typ.Procname.t -> ?node:Procdesc.Node.t -> ?loc:Location.t -> log_t
Exceptions.severity
-> Typ.Procname.t
-> ?node:Procdesc.Node.t
-> ?loc:Location.t
-> ?ltr:Errlog.loc_trace
-> exn
-> unit
(** Report an issue in the given procedure using biabduction state (DO NOT USE ELSEWHERE).
DEPRECATED as it can create race conditions between checkers.
Use log_error/warning instead *)

@ -259,10 +259,6 @@ type log_issue =
-> ?node:Procdesc.Node.t
-> ?loc:Location.t
-> ?ltr:Errlog.loc_trace
-> ?linters_def_file:string
-> ?doc_url:string
-> ?access:string
-> ?extras:Jsonbug_t.extra
-> exn
-> unit

@ -76,10 +76,6 @@ type log_issue =
-> ?node:Procdesc.Node.t
-> ?loc:Location.t
-> ?ltr:Errlog.loc_trace
-> ?linters_def_file:string
-> ?doc_url:string
-> ?access:string
-> ?extras:Jsonbug_t.extra
-> exn
-> unit

Loading…
Cancel
Save