mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	Error ids only walk into a given set of directories
This commit is contained in:
		
							parent
							
								
									debee799dc
								
							
						
					
					
						commit
						bf7ab8d277
					
				| @ -104,16 +104,14 @@ 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): |             for file_name in file_names: | ||||||
|             continue |                 _, ext = path.splitext(file_name) | ||||||
|         for file_name in file_names: |                 if ext in [".h", ".cpp"]: | ||||||
|             _, ext = path.splitext(file_name) |                     source_file_names.append(path.join(root, file_name)) | ||||||
|             if ext in [".h", ".cpp"]: |  | ||||||
|                 source_file_names.append(path.join(root, file_name)) |  | ||||||
| 
 | 
 | ||||||
|     return source_file_names |     return source_file_names | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user