Add dotty file contents to json report

Reviewed By: jberdine

Differential Revision: D2779944

fb-gh-sync-id: 617ffea
master
Andrzej Kotulski 9 years ago committed by facebook-github-bot-5
parent 3adbb56e9c
commit 0ea850b7a2

@ -182,6 +182,10 @@ let error_desc_to_plain_string error_desc =
let pp fmt () = F.fprintf fmt "%a" Localise.pp_error_desc error_desc in let pp fmt () = F.fprintf fmt "%a" Localise.pp_error_desc error_desc in
pp_to_string pp () pp_to_string pp ()
let error_desc_to_dotty_string error_desc =
let dotty_opt = Localise.error_desc_get_dotty error_desc in
match dotty_opt with Some s -> s | None -> ""
let error_desc_to_xml_string error_desc = let error_desc_to_xml_string error_desc =
let pp fmt () = F.fprintf fmt "%a" Localise.pp_error_desc error_desc in let pp fmt () = F.fprintf fmt "%a" Localise.pp_error_desc error_desc in
Escape.escape_xml (pp_to_string pp ()) Escape.escape_xml (pp_to_string pp ())
@ -480,6 +484,7 @@ module BugsJson = struct
key = node_key; key = node_key;
qualifier_tags = error_desc_to_qualifier_tags_records error_desc; qualifier_tags = error_desc_to_qualifier_tags_records error_desc;
hash = get_bug_hash kind bug_type procedure_id file node_key error_desc; hash = get_bug_hash kind bug_type procedure_id file node_key error_desc;
dotty = error_desc_to_dotty_string error_desc;
} in } in
if not !is_first_item then pp "," else is_first_item := false; if not !is_first_item then pp "," else is_first_item := false;
pp "%s@?" (string_of_jsonbug bug) in pp "%s@?" (string_of_jsonbug bug) in

@ -25,6 +25,7 @@ type jsonbug = {
key : int; key : int;
qualifier_tags : tag_value_record list; qualifier_tags : tag_value_record list;
hash : int; hash : int;
dotty : string;
} }
type json_trace = { type json_trace = {

Loading…
Cancel
Save