diff --git a/cpp/scripts/include_checker.py b/cpp/scripts/include_checker.py index ffd6c55c4b..6c1ad089e5 100644 --- a/cpp/scripts/include_checker.py +++ b/cpp/scripts/include_checker.py @@ -44,7 +44,7 @@ def list_all_source_file(file_regex, srcdirs): for srcdir in srcdirs: for root, dirs, files in os.walk(srcdir): for f in files: - if not re.search(file_regex, f) and re.search(file_regex, f): + if not re.search(exclusion_regex, root) and re.search(file_regex, f): src = os.path.join(root, f) all_files.append(src) return all_files