Skip to content

Commit 9c8b40c

Browse files
authored
Merge pull request #513 from yalechen-cyw/bug/collie_issuepath
collie support rule filter
2 parents 752a03e + 786cd67 commit 9c8b40c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

client/tool/util/collie.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ def get_issue(self, output):
171171
if not output or not os.path.exists(output):
172172
return
173173

174+
rules = self.params.get("rules", list())
175+
174176
f = open(output, "r", encoding="utf-8")
175177
fieldnames = (
176178
"checker",
@@ -187,6 +189,8 @@ def get_issue(self, output):
187189
line = int(row["line"])
188190
column = int(row["column"])
189191
rule = row["checker"]
192+
if rule not in rules:
193+
continue
190194
msg = row["description"]
191195
yield {
192196
"rule": rule,

0 commit comments

Comments
 (0)