From 0856f1ad607492a973e49e2f8239c0f1bc06f9b7 Mon Sep 17 00:00:00 2001 From: Josselin Date: Thu, 18 Apr 2019 11:30:26 +0100 Subject: [PATCH] Use crytic_compile.is_supported to test compatibility --- slither/__main__.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/slither/__main__.py b/slither/__main__.py index e6c24c616..c985add80 100644 --- a/slither/__main__.py +++ b/slither/__main__.py @@ -23,6 +23,7 @@ from slither.utils.colors import red, yellow, set_colorization_enabled from slither.utils.command_line import (output_detectors, output_results_to_markdown, output_detectors_json, output_printers, output_to_markdown, output_wiki) +from crytic_compile import is_supported logging.basicConfig() logger = logging.getLogger("Slither") @@ -504,10 +505,7 @@ def main_impl(all_detector_classes, all_printer_classes): globbed_filenames = glob.glob(filename, recursive=True) - if os.path.isfile(filename) or\ - os.path.isfile(os.path.join(filename, 'truffle.js')) or\ - os.path.isfile(os.path.join(filename, 'truffle-config.js')) or\ - os.path.isfile(os.path.join(filename, 'embark.json')): + if os.path.isfile(filename) or is_supported(filename): (results, number_contracts) = process(filename, args, detector_classes, printer_classes) elif os.path.isdir(filename) or len(globbed_filenames) > 0: