From 4ac9fb8fd83ea3d60bd0812d1357f2031a76b907 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Tue, 22 Jan 2019 09:10:29 -0800 Subject: [PATCH] [html] stop printing number of (biabduction) specs Summary: Printing "N specs" next to function definitions in the HTML debug is misleading because there are more checkers than just biabduction. Reviewed By: mbouaziz Differential Revision: D13572456 fbshipit-source-id: 209b874df --- infer/src/backend/printer.ml | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/infer/src/backend/printer.ml b/infer/src/backend/printer.ml index 8072fe129..96d920325 100644 --- a/infer/src/backend/printer.ml +++ b/infer/src/backend/printer.ml @@ -310,20 +310,12 @@ let write_html_file linereader filename procs = match Procdesc.Node.get_kind n with | Procdesc.Node.Start_node -> let proc_name = Procdesc.Node.get_proc_name n in - let num_specs = - match Summary.get proc_name with - | None -> - 0 - | Some summary -> - List.length (Tabulation.get_specs_from_payload summary) - in - let label = - F.sprintf "%s: %d specs" - (Escape.escape_xml (Typ.Procname.to_string proc_name)) - num_specs - in - F.pp_print_char fmt ' ' ; - Io_infer.Html.pp_proc_link [fname_encoding] proc_name fmt label + let proc_name_escaped = Escape.escape_xml (Typ.Procname.to_string proc_name) in + if Summary.get proc_name |> Option.is_some then ( + F.pp_print_char fmt ' ' ; + let label = F.asprintf "summary for %s" proc_name_escaped in + Io_infer.Html.pp_proc_link [fname_encoding] proc_name fmt label ) + else F.fprintf fmt "no summary for %s" proc_name_escaped | _ -> () ) nodes_at_linenum