diff --git a/slither/core/slither_core.py b/slither/core/slither_core.py index 98a2c24292..78ff30ca5d 100644 --- a/slither/core/slither_core.py +++ b/slither/core/slither_core.py @@ -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]