Skip to content

Commit

Permalink
Bugfix for silencing issues on the same element from different sources
Browse files Browse the repository at this point in the history
  • Loading branch information
pieter-edelman-nictiz committed Jan 26, 2024
1 parent 41bb405 commit 438c1ab
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions analyze_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def selectResource(self, resource_id, file_path, file_type = None):
self.issues_for_resource = {}
self.element_ids = []
self.issues = []

if self.ignored_issues:
for resource_regex in self.ignored_issues:
matchResult = False
Expand All @@ -217,7 +217,11 @@ def selectResource(self, resource_id, file_path, file_type = None):
matchResult = resource_regex.match(file_path)

if matchResult:
self.issues_for_resource.update(self.ignored_issues[resource_regex])
for type_regex in self.ignored_issues[resource_regex]:
if type_regex in self.issues_for_resource:
self.issues_for_resource[type_regex] += self.ignored_issues[resource_regex][type_regex]
else:
self.issues_for_resource[type_regex] = self.ignored_issues[resource_regex][type_regex]
if (file_type == "xml"):
self.element_ids = XMLElementIdMapper().parse(file_name)
else:
Expand Down Expand Up @@ -254,7 +258,7 @@ def finishSelectedId(self):
for issue in issues_per_path:
if not issue["handled"] and issue["require_occurence"]:
self.issues.append(Issue("?", "?", "fatal", "An ignored issue was provided, but the issue didn't occur", self.resource_id))

return self.issues

def _checkIgnoredIssue(self, message, location):
Expand Down

0 comments on commit 438c1ab

Please sign in to comment.