|
|
@ -102,7 +102,6 @@ class Slither(Context): |
|
|
|
""" list(core.declarations.Import): Import directives""" |
|
|
|
""" list(core.declarations.Import): Import directives""" |
|
|
|
return self._import_directives |
|
|
|
return self._import_directives |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# endregion |
|
|
|
# endregion |
|
|
|
################################################################################### |
|
|
|
################################################################################### |
|
|
|
################################################################################### |
|
|
|
################################################################################### |
|
|
@ -222,10 +221,18 @@ class Slither(Context): |
|
|
|
source_mapping_elements = [elem['source_mapping']['filename_absolute'] |
|
|
|
source_mapping_elements = [elem['source_mapping']['filename_absolute'] |
|
|
|
for elem in r['elements'] if 'source_mapping' in elem] |
|
|
|
for elem in r['elements'] if 'source_mapping' in elem] |
|
|
|
source_mapping_elements = map(lambda x: os.path.normpath(x) if x else x, source_mapping_elements) |
|
|
|
source_mapping_elements = map(lambda x: os.path.normpath(x) if x else x, source_mapping_elements) |
|
|
|
matching = all( |
|
|
|
matching = False |
|
|
|
any(bool(re.search(self.relative_path_format(path), src_mapping)) for path in self._paths_to_filter) |
|
|
|
|
|
|
|
for src_mapping in source_mapping_elements |
|
|
|
for path in self._paths_to_filter: |
|
|
|
) |
|
|
|
try: |
|
|
|
|
|
|
|
if any(bool(re.search(self.relative_path_format(path), src_mapping)) |
|
|
|
|
|
|
|
for src_mapping in source_mapping_elements): |
|
|
|
|
|
|
|
matching = True |
|
|
|
|
|
|
|
break |
|
|
|
|
|
|
|
except re.error: |
|
|
|
|
|
|
|
logger.error(f'Incorrect regular expression for --filter-paths {path}.' |
|
|
|
|
|
|
|
'\nSlither supports the Python re format' |
|
|
|
|
|
|
|
': https://docs.python.org/3/library/re.html') |
|
|
|
|
|
|
|
|
|
|
|
if r['elements'] and matching: |
|
|
|
if r['elements'] and matching: |
|
|
|
return False |
|
|
|
return False |
|
|
@ -277,6 +284,7 @@ class Slither(Context): |
|
|
|
@property |
|
|
|
@property |
|
|
|
def crytic_compile(self): |
|
|
|
def crytic_compile(self): |
|
|
|
return self._crytic_compile |
|
|
|
return self._crytic_compile |
|
|
|
|
|
|
|
|
|
|
|
# endregion |
|
|
|
# endregion |
|
|
|
################################################################################### |
|
|
|
################################################################################### |
|
|
|
################################################################################### |
|
|
|
################################################################################### |
|
|
|