Print warnings when running InferPrint on a .specs file

Reviewed By: jeremydubreil

Differential Revision: D2669916

fb-gh-sync-id: d1fc732
master
Sam Blackshear 9 years ago committed by facebook-github-bot-7
parent 14c616e34f
commit 848bf24f66

@ -85,10 +85,18 @@ let size filter (err_log: t) =
if filter ekind in_footprint then count := !count + (ErrDataSet.cardinal eds)) err_log;
!count
(** Print an error log *)
let pp fmt (errlog : t) =
let f (ekind, infp, ename, desc, severity) locs =
if ekind == Exceptions.Kerror then F.fprintf fmt "%a@ " Localise.pp ename in
(** Print errors from error log *)
let pp_errors fmt (errlog : t) =
let f (ekind, _, ename, _, _) locs =
if ekind == Exceptions.Kerror then
F.fprintf fmt "%a@ " Localise.pp ename in
ErrLogHash.iter f errlog
(** Print warnings from error log *)
let pp_warnings fmt (errlog : t) =
let f (ekind, _, ename, desc, _) locs =
if ekind == Exceptions.Kwarning then
F.fprintf fmt "%a %a@ " Localise.pp ename Localise.pp_error_desc desc in
ErrLogHash.iter f errlog
(** Print an error log in html format *)

@ -34,8 +34,11 @@ type iter_fun =
(** Apply f to nodes and error names *)
val iter : iter_fun -> t -> unit
(** Print an error log *)
val pp : Format.formatter -> t -> unit
(** Print errors from error log *)
val pp_errors : Format.formatter -> t -> unit
(** Print warnings from error log *)
val pp_warnings : Format.formatter -> t -> unit
(** Print an error log in html format *)
val pp_html : DB.Results_dir.path -> Format.formatter -> t -> unit

@ -345,7 +345,8 @@ let pp_timeout fmt = function
let pp_stats err_log whole_seconds fmt stats =
F.fprintf fmt "TIME:%a TIMEOUT:%a SYMOPS:%d CALLS:%d,%d@\n" (pp_time whole_seconds) stats.stats_time pp_timeout stats.stats_timeout stats.symops stats.stats_calls.Cg.in_calls stats.stats_calls.Cg.out_calls;
F.fprintf fmt "ERRORS: @[<h>%a@]" Errlog.pp err_log
F.fprintf fmt "ERRORS: @[<h>%a@]@." Errlog.pp_errors err_log;
F.fprintf fmt "WARNINGS: @[<h>%a@]" Errlog.pp_warnings err_log
(** Print the spec *)
let pp_spec pe num_opt fmt spec =

Loading…
Cancel
Save