Skip to content

Commit

Permalink
Prioritize ignore comment over exclude dependencies (#1120)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xalpharush authored Mar 18, 2022
1 parent bab44b7 commit 4a6ba78
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions slither/core/slither_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,14 +239,14 @@ def valid_result(self, r: Dict) -> bool:

if r["elements"] and matching:
return False
if r["elements"] and self._exclude_dependencies:
return not all(element["source_mapping"]["is_dependency"] for element in r["elements"])
if self._show_ignored_findings:
return True
if r["id"] in self._previous_results_ids:
return False
if self.has_ignore_comment(r):
return False
if r["id"] in self._previous_results_ids:
return False
if r["elements"] and self._exclude_dependencies:
return not all(element["source_mapping"]["is_dependency"] for element in r["elements"])
# Conserve previous result filtering. This is conserved for compatibility, but is meant to be removed
return not r["description"] in [pr["description"] for pr in self._previous_results]

Expand Down

0 comments on commit 4a6ba78

Please sign in to comment.