mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-11-04 05:59:32 +01:00 
			
		
		
		
	Adds duplication check for source files in CI
This commit is contained in:
		
							
								
								
									
										14
									
								
								tools/scripts/checkDuplicateFilenames.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								tools/scripts/checkDuplicateFilenames.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,14 @@
 | 
			
		||||
#!/usr/bin/env python3
 | 
			
		||||
 | 
			
		||||
import os
 | 
			
		||||
import sys
 | 
			
		||||
 | 
			
		||||
files_set = set()
 | 
			
		||||
 | 
			
		||||
for root, dir, files in os.walk("src/catch2"):
 | 
			
		||||
    for file in files:
 | 
			
		||||
        if file not in files_set:
 | 
			
		||||
            files_set.add(file)
 | 
			
		||||
        else:
 | 
			
		||||
            print("File %s is duplicate" % file)
 | 
			
		||||
            sys.exit(1)
 | 
			
		||||
		Reference in New Issue
	
	Block a user