Skip to content

Commit

Permalink
Partial fixes according to bruntib's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Szelethus committed Mar 21, 2024
1 parent 3ba2130 commit 40b1c6d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,4 @@ def get_report_path_hash(report: Report) -> str:
if not report_path_hash:
LOG.error('Failed to generate report path hash: %s', report)

# This might be a little too verbose even for the verbose output.
# LOG.debug(report_path_hash)
return __str_to_hash(report_path_hash)
26 changes: 12 additions & 14 deletions web/client/codechecker_client/cmd/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,8 @@ def parse_analyzer_result_files(
analyzer_result_files, zip_iter(
functools.partial(get_reports, checker_labels=checker_labels),
analyzer_result_files))):
if idx % 10 == 0:
LOG.debug(f"Parsed {idx}/{len(analyzer_result_files)} files...")
LOG.debug(f"[{idx}/{len(analyzer_result_files)}] "
f"Parsed '{file_path}' ...")
analyzer_result_file_reports[file_path] = reports

return analyzer_result_file_reports
Expand Down Expand Up @@ -490,18 +490,16 @@ def assemble_zip(inputs,
file_paths.update(report.original_files)
file_report_positions[report.file.original_path].add(report.line)

if unique_reports:
for dirname, analyzer_reports in unique_reports.items():
for analyzer_name, reports in analyzer_reports.items():
if not analyzer_name:
analyzer_name = 'unknown'
_, tmpfile = tempfile.mkstemp(f'-{analyzer_name}.plist')

report_file.create(tmpfile, reports, checker_labels,
AnalyzerInfo(analyzer_name))
LOG.debug(f"Stored '{analyzer_name}' unique reports "
f"in {tmpfile}.")
files_to_compress[dirname].add(tmpfile)
for dirname, analyzer_reports in unique_reports.items():
for analyzer_name, reports in analyzer_reports.items():
if not analyzer_name:
analyzer_name = 'unknown'
_, tmpfile = tempfile.mkstemp(f'-{analyzer_name}.plist')

report_file.create(tmpfile, reports, checker_labels,
AnalyzerInfo(analyzer_name))
LOG.debug(f"Stored '{analyzer_name}' unique reports in {tmpfile}.")
files_to_compress[dirname].add(tmpfile)

if changed_files:
reports_helper.dump_changed_files(changed_files)
Expand Down

0 comments on commit 40b1c6d

Please sign in to comment.