def report_errors(self): """Report statistics about the computation and create a CSV file containing the list or errors found during the analysis""" csv_report = os.path.join(self.args.infer_out, utils.CSV_REPORT_FILENAME) bugs_out = os.path.join(self.args.infer_out, utils.BUGS_FILENAME) procs_report = os.path.join(self.args.infer_out, "procs.csv") infer_print_cmd = [utils.get_cmd_in_bin_dir("InferPrint")] infer_print_options = [ "-q", "-results_dir", self.args.infer_out, "-bugs", csv_report, "-procs", procs_report, "-analyzer", self.args.analyzer, ] exit_status = subprocess.check_call(infer_print_cmd + infer_print_options) if exit_status != os.EX_OK: logging.error("Error with InferPrint with the command: " + infer_print_cmd) else: clean_csv(self.args, csv_report) self.update_stats(csv_report) utils.create_json_report(self.args.infer_out) print("\n") if not self.args.buck: print_errors(csv_report, bugs_out) return exit_status
def report_errors(self): """Report statistics about the computation and create a CSV file containing the list or errors found during the analysis""" csv_report = os.path.join(self.args.infer_out, utils.CSV_REPORT_FILENAME) bugs_out = os.path.join(self.args.infer_out, utils.BUGS_FILENAME) procs_report = os.path.join(self.args.infer_out, 'procs.csv') infer_print_cmd = [utils.get_cmd_in_bin_dir('InferPrint')] infer_print_options = [ '-q', '-results_dir', self.args.infer_out, '-bugs', csv_report, '-procs', procs_report, '-analyzer', self.args.analyzer ] if self.javac.annotations_out is not None: infer_print_options += [ '-local_config', self.javac.annotations_out ] exit_status = subprocess.check_call(infer_print_cmd + infer_print_options) if exit_status != os.EX_OK: logging.error('Error with InferPrint with the command: ' + infer_print_cmd) else: clean_csv(self.args, csv_report) self.update_stats_with_warnings(csv_report) utils.create_json_report(self.args.infer_out) print('\n') if not self.args.buck: print_errors(csv_report, bugs_out) return exit_status
def report_errors(self): """Report statistics about the computation and create a CSV file containing the list or errors found during the analysis""" csv_report = os.path.join(self.args.infer_out, utils.CSV_REPORT_FILENAME) bugs_out = os.path.join(self.args.infer_out, utils.BUGS_FILENAME) procs_report = os.path.join(self.args.infer_out, 'procs.csv') infer_print_cmd = [utils.get_cmd_in_bin_dir('InferPrint')] infer_print_options = [ '-q', '-results_dir', self.args.infer_out, '-bugs', csv_report, '-procs', procs_report, '-analyzer', self.args.analyzer ] if self.javac.annotations_out is not None: infer_print_options += [ '-local_config', self.javac.annotations_out] exit_status = subprocess.check_call( infer_print_cmd + infer_print_options ) if exit_status != os.EX_OK: logging.error('Error with InferPrint with the command: ' + infer_print_cmd) else: clean_csv(self.args, csv_report) self.update_stats_with_warnings(csv_report) utils.create_json_report(self.args.infer_out) print('\n') if not self.args.buck: print_errors(csv_report, bugs_out) return exit_status