Skip to content

Commit 3ba2130

Browse files
committed
Tidy up the patch
1 parent 3572281 commit 3ba2130

File tree

2 files changed

+8
-3
lines changed
  • tools/report-converter/codechecker_report_converter/report
  • web/client/codechecker_client/cmd

2 files changed

+8
-3
lines changed

tools/report-converter/codechecker_report_converter/report/hash.py

+1
Original file line numberDiff line numberDiff line change
@@ -205,5 +205,6 @@ def get_report_path_hash(report: Report) -> str:
205205
if not report_path_hash:
206206
LOG.error('Failed to generate report path hash: %s', report)
207207

208+
# This might be a little too verbose even for the verbose output.
208209
# LOG.debug(report_path_hash)
209210
return __str_to_hash(report_path_hash)

web/client/codechecker_client/cmd/store.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
from codechecker_web.shared import webserver_context, host_check
5252
from codechecker_web.shared.env import get_default_workspace
5353

54-
# from codechecker_server import MetadataInfoParser
5554
try:
5655
from codechecker_client.blame_info import assemble_blame_info
5756
except ImportError:
@@ -425,6 +424,10 @@ def assemble_zip(inputs,
425424
"""Collect and compress report and source files, together with files
426425
contanining analysis related information into a zip file which
427426
will be sent to the server.
427+
428+
For each report directory, we create a uniqued zipped directory. Each
429+
report directory to store could have been made with different
430+
configurations, so we can't merge them all into a single zip.
428431
"""
429432
files_to_compress: Dict[str, set] = defaultdict(set)
430433
analyzer_result_file_paths = []
@@ -473,7 +476,9 @@ def assemble_zip(inputs,
473476
if report.changed_files:
474477
changed_files.update(report.changed_files)
475478
continue
476-
# Need to calculate unique reoirt count to determine report limit
479+
# Unique all bug reports per report directory; also, count how many
480+
# reports we want to store at once to check for the report store
481+
# limit.
477482
report_path_hash = get_report_path_hash(report)
478483
if report_path_hash not in unique_report_hashes:
479484
unique_report_hashes.add(report_path_hash)
@@ -485,7 +490,6 @@ def assemble_zip(inputs,
485490
file_paths.update(report.original_files)
486491
file_report_positions[report.file.original_path].add(report.line)
487492

488-
# TODO: Doesn't support storing multiple report dirs.
489493
if unique_reports:
490494
for dirname, analyzer_reports in unique_reports.items():
491495
for analyzer_name, reports in analyzer_reports.items():

0 commit comments

Comments
 (0)