Summary: Just for fun, and because killing InferPrint.ml is just so satisfying. Reviewed By: ngorogiannis Differential Revision: D20362643 fbshipit-source-id: 039cfec61
@ -309,7 +309,7 @@ let issue_of_cost kind CostIssues.{complexity_increase_issue; unreachable_issue;
; procedure= cost_info.Jsonbug_t.procedure_id
; procedure_start_line= line
; file
; bug_trace= InferPrint.loc_trace_to_jsonbug_record trace severity
; bug_trace= JsonReports.loc_trace_to_jsonbug_record trace severity
; key= ""
; node_key= None
; hash= cost_info.Jsonbug_t.hash
@ -319,7 +319,7 @@ let issue_of_cost kind CostIssues.{complexity_increase_issue; unreachable_issue;
; linters_def_file= None
; doc_url= None
; traceview_id= None
; censored_reason= InferPrint.censored_reason issue_type source_file
; censored_reason= JsonReports.censored_reason issue_type source_file
; access= None
; extras= None }
else None
@ -321,7 +321,7 @@ let execute_analyze ~changed_files =
let report ?(suppress_console = false) () =
let issues_json = Config.(results_dir ^/ report_json) in
InferPrint.main ~issues_json ~costs_json:Config.(results_dir ^/ costs_report_json) ;
JsonReports.write_reports ~issues_json ~costs_json:Config.(results_dir ^/ costs_report_json) ;
if Config.(test_determinator && process_clang_ast) then
TestDeterminator.merge_test_determinator_results () ;
(* Post-process the report according to the user config. By default, calls report.py to create a
@ -60,7 +60,7 @@ let pp_custom_of_report fmt report fields =
F.fprintf fmt "%s%d" (comma_separator index) (issue.line - issue.procedure_start_line)
| QualifierContainsPotentialExceptionNote ->
F.pp_print_bool fmt
(String.is_substring issue.qualifier ~substring:InferPrint.potential_exception_message)
(String.is_substring issue.qualifier ~substring:JsonReports.potential_exception_message)
in
List.iteri ~f:pp_field fields ; F.fprintf fmt "@."
@ -333,7 +333,7 @@ let process_all_summaries_and_issues ~issues_outf ~costs_outf =
()
let main ~issues_json ~costs_json =
let write_reports ~issues_json ~costs_json =
let mk_outfile fname =
match Utils.create_outfile fname with
| None ->
@ -14,4 +14,4 @@ val loc_trace_to_jsonbug_record :
val censored_reason : IssueType.t -> SourceFile.t -> string option
val main : issues_json:string -> costs_json:string -> unit
val write_reports : issues_json:string -> costs_json:string -> unit