From 9b84d8b4f296b04f227f98a4e4e3c7c34faf4c82 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Tue, 14 Jan 2020 08:22:33 -0800 Subject: [PATCH] [buck] do not merge empty report.json files Reviewed By: martintrojer Differential Revision: D19371357 fbshipit-source-id: ace5e66b6 --- infer/lib/python/inferlib/capture/buck.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/infer/lib/python/inferlib/capture/buck.py b/infer/lib/python/inferlib/capture/buck.py index cbc9e1db7..84375c716 100644 --- a/infer/lib/python/inferlib/capture/buck.py +++ b/infer/lib/python/inferlib/capture/buck.py @@ -156,14 +156,6 @@ class BuckAnalyzer: dep_files = filter(os.path.exists, potential_dep_files) utils.merge_and_dedup_files_into_path(dep_files, merged_out_path) - @staticmethod - def _merge_infer_report_files(root_paths, merged_out_path): - potential_report_files = [os.path.join(p, config.JSON_REPORT_FILENAME) - for p in root_paths] - report_files = filter(os.path.exists, potential_report_files) - all_results = issues.merge_reports_from_paths(report_files) - utils.dump_json_to_path(all_results, merged_out_path) - @staticmethod def _find_deps_and_merge(merged_out_path): """This function is used to compute the infer-deps.txt file that @@ -250,21 +242,12 @@ class BuckAnalyzer: if result_paths is None: # huho, the Buck command to extract results paths failed return os.EX_SOFTWARE - merged_reports_path = os.path.join( - self.args.infer_out, config.JSON_REPORT_FILENAME) merged_deps_path = os.path.join( self.args.infer_out, config.INFER_BUCK_DEPS_FILENAME) - self._merge_infer_report_files(result_paths, merged_reports_path) if (not ret == os.EX_OK and self.keep_going): self._find_deps_and_merge(merged_deps_path) elif self.args.buck_merge_all_deps: self._find_depsfiles_and_merge(merged_deps_path) else: self._merge_infer_dep_files(result_paths, merged_deps_path) - infer_out = self.args.infer_out - json_report = os.path.join(infer_out, config.JSON_REPORT_FILENAME) - bugs_out = os.path.join(infer_out, config.BUGS_FILENAME) - issues.print_and_save_errors(infer_out, self.args.project_root, - json_report, bugs_out, self.args.pmd_xml, - console_out=not self.args.quiet) return os.EX_OK