diff --git a/infer/src/IR/Errlog.ml b/infer/src/IR/Errlog.ml index 83741487c..839c18f68 100644 --- a/infer/src/IR/Errlog.ml +++ b/infer/src/IR/Errlog.ml @@ -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 = diff --git a/infer/src/IR/Exceptions.ml b/infer/src/IR/Exceptions.ml index 555061021..4e6fc56e2 100644 --- a/infer/src/IR/Exceptions.ml +++ b/infer/src/IR/Exceptions.ml @@ -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 *) diff --git a/infer/src/IR/Exceptions.mli b/infer/src/IR/Exceptions.mli index c334b1efd..f441baf8d 100644 --- a/infer/src/IR/Exceptions.mli +++ b/infer/src/IR/Exceptions.mli @@ -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 = diff --git a/infer/src/backend/InferPrint.ml b/infer/src/backend/InferPrint.ml index 01642f8de..b9933a8d8 100644 --- a/infer/src/backend/InferPrint.ml +++ b/infer/src/backend/InferPrint.ml @@ -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 *)