Remove dead print_key

Reviewed By: jeremydubreil

Differential Revision: D9317263

fbshipit-source-id: fde8ca545
master
Mehdi Bouaziz 6 years ago committed by Facebook Github Bot
parent 35848a5284
commit 6d134762b6

@ -285,7 +285,7 @@ let log_issue procname ?clang_method_kind severity err_log loc (node_id, node_ke
let print_now () =
L.(debug Analysis Medium)
"@\n%a@\n@?"
(Exceptions.pp_err ~node_key loc severity error.name error.description error.ocaml_pos)
(Exceptions.pp_err loc severity error.name error.description error.ocaml_pos)
() ;
if not (Exceptions.equal_severity severity Exceptions.Error) then (
let warn_str =

@ -620,16 +620,11 @@ let err_class_string = function
"Linters"
(** whether to print the bug key together with the error message *)
let print_key = false
(** pretty print an error *)
let pp_err ~node_key loc severity ex_name desc ocaml_pos_opt fmt () =
let pp_err loc severity ex_name desc ocaml_pos_opt fmt () =
let kind = severity_string (if equal_severity severity Info then Warning else severity) in
let pp_key fmt k = if print_key then F.fprintf fmt " key: %s " (Caml.Digest.to_hex k) else () in
F.fprintf fmt "%a:%d: %s: %a %a%a%a@\n" SourceFile.pp loc.Location.file loc.Location.line kind
IssueType.pp ex_name Localise.pp_error_desc desc pp_key node_key L.pp_ocaml_pos_opt
ocaml_pos_opt
F.fprintf fmt "%a:%d: %s: %a %a%a@\n" SourceFile.pp loc.Location.file loc.Location.line kind
IssueType.pp ex_name Localise.pp_error_desc desc L.pp_ocaml_pos_opt ocaml_pos_opt
(** Return true if the exception is not serious and should be handled in timeout mode *)

@ -157,8 +157,8 @@ val print_exception_html : string -> exn -> unit
(** print a description of the exception to the html output *)
val pp_err :
node_key:Caml.Digest.t -> Location.t -> severity -> IssueType.t -> Localise.error_desc
-> Logging.ocaml_pos option -> Format.formatter -> unit -> unit
Location.t -> severity -> IssueType.t -> Localise.error_desc -> Logging.ocaml_pos option
-> Format.formatter -> unit -> unit
(** pretty print an error *)
type t =

@ -382,9 +382,7 @@ module IssuesTxt = struct
if
key.in_footprint && error_filter source_file key.err_name
&& (not Config.filtering || String.is_empty (censored_reason key.err_name source_file))
then
Exceptions.pp_err ~node_key:err_data.node_id_key.node_key err_data.loc key.severity
key.err_name key.err_desc None fmt ()
then Exceptions.pp_err err_data.loc key.severity key.err_name key.err_desc None fmt ()
(** Write bug report in text format *)

Loading…
Cancel
Save