in bot/code_review_bot/tasks/default.py [0:0]
def parse_issues(self, artifacts, revision):
"""
Parse issues from a log file content
"""
assert isinstance(artifacts, dict)
def default_check(issue):
# Use analyzer name when check is not provided
# This happens for analyzers who only have one rule
# This logic could become the standard once most analyzers
# use that format
check = issue.get("check")
if check:
return check
return issue.get("analyzer", self.name)
return [
DefaultIssue(
analyzer=self,
revision=revision,
path=issue["path"],
line=issue["line"],
column=issue["column"],
nb_lines=issue.get("nb_lines", 1),
level=Level(issue["level"]),
check=default_check(issue),
message=issue["message"],
)
for artifact in artifacts.values()
for _, path_issues in artifact.items()
for issue in path_issues
]