Prevent duppliate results at the abstract_detector level

pull/184/head
Josselin 6 years ago
parent 007ed2a9cc
commit 6031907607
  1. 6
      slither/detectors/abstract_detector.py

@ -102,8 +102,10 @@ class AbstractDetector(metaclass=abc.ABCMeta):
return
def detect(self):
results = self._detect()
results = [r for r in results if self.slither.valid_result(r)]
all_results = self._detect()
results = []
# only keep valid result, and remove dupplicate
[results.append(r) for r in all_results if self.slither.valid_result(r) and r not in results]
if results:
if self.logger:
info = '\n'

Loading…
Cancel
Save