MCPcopy Create free account
hub / github.com/ClickHouse/ai-sdk-cpp / find_cpp_files

Function find_cpp_files

scripts/lint.py:75–89  ·  view source on GitHub ↗

Find all C++ source files in the project.

()

Source from the content-addressed store, hash-verified

73
74def find_cpp_files() -> List[Path]:
75 """Find all C++ source files in the project."""
76 project_dir = Path(__file__).parent.parent
77 extensions = {".cc", ".cpp", ".cxx"}
78 exclude_dirs = {"build", "vcpkg_installed", ".cache", ".git", "third_party"}
79
80 files = []
81 for ext in extensions:
82 for file in project_dir.rglob(f"*{ext}"):
83 # Skip files in excluded directories
84 # Only directory components are checked for the "build-" prefix so
85 # source files like "build-info.cpp" are not skipped.
86 if any(part in exclude_dirs for part in file.parts) or any(
87 part.startswith("build-") for part in file.parts[:-1]):
88 continue
89 files.append(file)
90
91 return sorted(files)
92

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected