Skip to content

Commit

Permalink
Merge pull request #513 from yalechen-cyw/bug/collie_issuepath
Browse files Browse the repository at this point in the history
collie support rule filter
  • Loading branch information
aaaa-j committed Aug 11, 2022
2 parents 752a03e + 786cd67 commit 9c8b40c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions client/tool/util/collie.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ def get_issue(self, output):
if not output or not os.path.exists(output):
return

rules = self.params.get("rules", list())

f = open(output, "r", encoding="utf-8")
fieldnames = (
"checker",
Expand All @@ -187,6 +189,8 @@ def get_issue(self, output):
line = int(row["line"])
column = int(row["column"])
rule = row["checker"]
if rule not in rules:
continue
msg = row["description"]
yield {
"rule": rule,
Expand Down

0 comments on commit 9c8b40c

Please sign in to comment.