Skip to content

Commit

Permalink
Add get_issues_by_rule_uid implementation to Result
Browse files Browse the repository at this point in the history
Signed-off-by: patrickpa <patrick@ivex.ai>
  • Loading branch information
patrickpa committed Jun 13, 2024
1 parent ade40c7 commit 96d1a03
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions qc_baselib/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,3 +468,14 @@ def get_domain_specific_info(
domain_specific_list.append(info_dict)

return domain_specific_list

def get_issues_by_rule_id(self, rule_uid: str) -> List[result.IssueType]:
rule_issues: List[result.IssueType] = []

for bundle in self._report_results.checker_bundles:
for checker in bundle.checkers:
for issue in checker.issues:
if issue.rule_uid == rule_uid:
rule_issues.append(issue)

return rule_issues

0 comments on commit 96d1a03

Please sign in to comment.