|
|
@ -294,7 +294,7 @@ def collect_results(args, start_time, targets):
|
|
|
|
with open(os.path.join(args.infer_out, ANALYSIS_SUMMARY_OUTPUT), 'w') as f:
|
|
|
|
with open(os.path.join(args.infer_out, ANALYSIS_SUMMARY_OUTPUT), 'w') as f:
|
|
|
|
f.write(buck_stats)
|
|
|
|
f.write(buck_stats)
|
|
|
|
|
|
|
|
|
|
|
|
all_json_rows = []
|
|
|
|
all_json_rows = set()
|
|
|
|
stats = init_stats(args, start_time)
|
|
|
|
stats = init_stats(args, start_time)
|
|
|
|
|
|
|
|
|
|
|
|
accumulation_whitelist = list(map(re.compile, [
|
|
|
|
accumulation_whitelist = list(map(re.compile, [
|
|
|
@ -328,7 +328,9 @@ def collect_results(args, start_time, targets):
|
|
|
|
old_value = stats[type_k].get(key, 0)
|
|
|
|
old_value = stats[type_k].get(key, 0)
|
|
|
|
stats[type_k][key] = old_value + value
|
|
|
|
stats[type_k][key] = old_value + value
|
|
|
|
|
|
|
|
|
|
|
|
all_json_rows += load_json_report(jar)
|
|
|
|
json_rows = load_json_report(jar)
|
|
|
|
|
|
|
|
for row in json_rows:
|
|
|
|
|
|
|
|
all_json_rows.add(json.dumps(row))
|
|
|
|
|
|
|
|
|
|
|
|
# Override normals
|
|
|
|
# Override normals
|
|
|
|
stats['normal'].update(target_stats.get('normal', {}))
|
|
|
|
stats['normal'].update(target_stats.get('normal', {}))
|
|
|
@ -338,7 +340,6 @@ def collect_results(args, start_time, targets):
|
|
|
|
logging.warn('Bad zip file %s', path)
|
|
|
|
logging.warn('Bad zip file %s', path)
|
|
|
|
|
|
|
|
|
|
|
|
json_report = os.path.join(args.infer_out, config.JSON_REPORT_FILENAME)
|
|
|
|
json_report = os.path.join(args.infer_out, config.JSON_REPORT_FILENAME)
|
|
|
|
utils.dump_json_to_path(all_json_rows, json_report)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Convert all float values to integer values
|
|
|
|
# Convert all float values to integer values
|
|
|
|
for key, value in stats.get('float', {}).items():
|
|
|
|
for key, value in stats.get('float', {}).items():
|
|
|
@ -347,7 +348,15 @@ def collect_results(args, start_time, targets):
|
|
|
|
# Delete the float entries before exporting the results
|
|
|
|
# Delete the float entries before exporting the results
|
|
|
|
del(stats['float'])
|
|
|
|
del(stats['float'])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
with open(json_report, 'w') as report:
|
|
|
|
|
|
|
|
json_string = '['
|
|
|
|
|
|
|
|
json_string += ','.join(all_json_rows)
|
|
|
|
|
|
|
|
json_string += ']'
|
|
|
|
|
|
|
|
report.write(json_string)
|
|
|
|
|
|
|
|
report.flush()
|
|
|
|
|
|
|
|
|
|
|
|
print('\n')
|
|
|
|
print('\n')
|
|
|
|
|
|
|
|
json_report = os.path.join(args.infer_out, config.JSON_REPORT_FILENAME)
|
|
|
|
bugs_out = os.path.join(args.infer_out, config.BUGS_FILENAME)
|
|
|
|
bugs_out = os.path.join(args.infer_out, config.BUGS_FILENAME)
|
|
|
|
issues.print_and_save_errors(args.infer_out, args.project_root,
|
|
|
|
issues.print_and_save_errors(args.infer_out, args.project_root,
|
|
|
|
json_report, bugs_out, args.pmd_xml)
|
|
|
|
json_report, bugs_out, args.pmd_xml)
|
|
|
|