diff options
| author | George Xanthakis | 2020-11-07 00:00:37 +0200 |
|---|---|---|
| committer | George Xanthakis | 2020-11-07 21:35:41 +0200 |
| commit | 39e13bf530def088c1f87a224de48fdc1ac5e834 (patch) | |
| tree | f32d956c5c66ada5c2df630325256d8868013a08 /tools/scripts/checkDuplicateFilenames.py | |
| parent | fefa001bb629e675a2625e6f3b71fcf316a5a2d9 (diff) | |
| download | catch3-39e13bf530def088c1f87a224de48fdc1ac5e834.tar.gz | |
Adds duplication check for source files in CI
Diffstat (limited to 'tools/scripts/checkDuplicateFilenames.py')
| -rw-r--r-- | tools/scripts/checkDuplicateFilenames.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/scripts/checkDuplicateFilenames.py b/tools/scripts/checkDuplicateFilenames.py new file mode 100644 index 00000000..b46a2b4b --- /dev/null +++ b/tools/scripts/checkDuplicateFilenames.py @@ -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) |