diff --git a/infer/src/backend/Differential.ml b/infer/src/backend/Differential.ml index ab3d6a4e0..e35d3aad3 100644 --- a/infer/src/backend/Differential.ml +++ b/infer/src/backend/Differential.ml @@ -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 diff --git a/infer/src/integration/Driver.ml b/infer/src/integration/Driver.ml index 04a2a0ec6..3c702a08f 100644 --- a/infer/src/integration/Driver.ml +++ b/infer/src/integration/Driver.ml @@ -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 diff --git a/infer/src/integration/IssuesTest.ml b/infer/src/integration/IssuesTest.ml index 7aafa981b..dfc20e2bc 100644 --- a/infer/src/integration/IssuesTest.ml +++ b/infer/src/integration/IssuesTest.ml @@ -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 "@." in diff --git a/infer/src/backend/InferPrint.ml b/infer/src/integration/JsonReports.ml similarity index 99% rename from infer/src/backend/InferPrint.ml rename to infer/src/integration/JsonReports.ml index 81a6d0dad..1dd9eca7b 100644 --- a/infer/src/backend/InferPrint.ml +++ b/infer/src/integration/JsonReports.ml @@ -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 -> diff --git a/infer/src/backend/InferPrint.mli b/infer/src/integration/JsonReports.mli similarity index 86% rename from infer/src/backend/InferPrint.mli rename to infer/src/integration/JsonReports.mli index aa2207d95..b714f20fd 100644 --- a/infer/src/backend/InferPrint.mli +++ b/infer/src/integration/JsonReports.mli @@ -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