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 ~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 let log_issue_deprecated_using_state severity proc_name ?node ?loc ?ltr exn =
?access ?extras:_ exn =
match Summary.get proc_name with match Summary.get proc_name with
| Some summary -> | Some summary ->
let node = 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 session = State.get_session () in
let loc = match loc with None -> State.get_loc () | Some loc -> loc 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 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 log_issue_from_summary severity summary ~node ~session ~loc ~ltr exn
?access exn
| None -> | None ->
L.(die InternalError) L.(die InternalError)
"Trying to report error on procedure %a, but cannot because no summary exists for this \ "Trying to report error on procedure %a, but cannot because no summary exists for this \

@ -19,7 +19,13 @@ type log_t =
-> unit -> unit
val log_issue_deprecated_using_state : 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). (** Report an issue in the given procedure using biabduction state (DO NOT USE ELSEWHERE).
DEPRECATED as it can create race conditions between checkers. DEPRECATED as it can create race conditions between checkers.
Use log_error/warning instead *) Use log_error/warning instead *)

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

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

Loading…
Cancel
Save