Skip to content

Commit

Permalink
Exclude defect when the status is "Not a defect" or "Justified"
Browse files Browse the repository at this point in the history
  • Loading branch information
JokeWaumans committed Jul 25, 2024
1 parent 2831527 commit 2369e6f
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions src/mlx/warnings/polyspace_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,13 +258,17 @@ def check(self, content):
content (dict): The row of the TSV file
'''
if content[self.column_name].lower() == self.check_value:
tab_sep_string = "\t".join(content.values())
if not self._is_excluded(tab_sep_string):
self.count = self.count + 1
self.counted_warnings.append('family: {} -> {}: {}'.format(
self.family_value,
self.column_name,
self.check_value
))
if self.cq_enabled and content["color"].lower() != "green":
self.add_code_quality_finding(content)
if content["status"].lower() in ["not a defect", "justified"]:
self.print_when_verbose("Excluded row {!r} because the status is 'Not a defect' or 'Justified'"
.format(content))
else:
tab_sep_string = "\t".join(content.values())
if not self._is_excluded(tab_sep_string):
self.count = self.count + 1
self.counted_warnings.append('family: {} -> {}: {}'.format(
self.family_value,
self.column_name,
self.check_value
))
if self.cq_enabled and content["color"].lower() != "green":
self.add_code_quality_finding(content)

0 comments on commit 2369e6f

Please sign in to comment.