Skip to content

Commit

Permalink
Not all dots are stripped
Browse files Browse the repository at this point in the history
  • Loading branch information
Szelethus committed Nov 2, 2023
1 parent 869a8ad commit d93d6bc
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion analyzer/codechecker_analyzer/analyzers/gcc/result_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from codechecker_report_converter.report.parser.base import AnalyzerInfo
from codechecker_report_converter.analyzers.gcc.analyzer_result import \
AnalyzerResult
from codechecker_report_converter.report import report_file
from codechecker_report_converter.report import Report, report_file
from codechecker_report_converter.report.hash import get_report_hash, HashType

from codechecker_common.logger import get_logger
Expand All @@ -42,6 +42,14 @@ def codechecker_name_to_actual_name_disabled(codechecker_name: str):
return codechecker_name.replace("gcc", "-Wno-analyzer")


def prune_unnecessary_events(report: Report):
for event in report.bug_path_events:
if event.message == "...to here":
report.bug_path_events.remove(event)
else:
event.message = event.message.strip(".")


class GccResultHandler(ResultHandler):
"""
Create analyzer result file for Gcc output.
Expand Down Expand Up @@ -73,6 +81,7 @@ def postprocess_result(self, skip_handlers: Optional[SkipListHandlers]):

reports = [r for r in reports if not r.skip(skip_handlers)]
for report in reports:
prune_unnecessary_events(report)
report.checker_name = \
actual_name_to_codechecker_name(report.checker_name)

Expand Down

0 comments on commit d93d6bc

Please sign in to comment.