mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #8904 from ethereum/error-id-ignore-folders
[error_id] Only walk into a given set of directories
This commit is contained in:
commit
170291f738
@ -104,12 +104,10 @@ def find_source_files(top_dir):
|
|||||||
"""Builds the list of .h and .cpp files in top_dir directory"""
|
"""Builds the list of .h and .cpp files in top_dir directory"""
|
||||||
|
|
||||||
source_file_names = []
|
source_file_names = []
|
||||||
black_set = { ".circleci", ".git", ".github", "build", "cmake", "CMakeFiles", "deps", "docs" }
|
dirs = ['libevmasm', 'liblangutil', 'libsolc', 'libsolidity', 'libsolutil', 'libyul', 'solc']
|
||||||
|
|
||||||
for root, _, file_names in os.walk(top_dir, onerror=lambda e: exit(f"Walk error: {e}")):
|
for dir in dirs:
|
||||||
path_elements = set(root.split(os.sep))
|
for root, _, file_names in os.walk(os.path.join(top_dir, dir), onerror=lambda e: exit(f"Walk error: {e}")):
|
||||||
if not black_set.isdisjoint(path_elements):
|
|
||||||
continue
|
|
||||||
for file_name in file_names:
|
for file_name in file_names:
|
||||||
_, ext = path.splitext(file_name)
|
_, ext = path.splitext(file_name)
|
||||||
if ext in [".h", ".cpp"]:
|
if ext in [".h", ".cpp"]:
|
||||||
|
Loading…
Reference in New Issue
Block a user