INNER CODE UNIT · Python
find_compile_commands
ClickHouse/ai-sdk-cpp · scripts/lint.py:29
def find_compile_commands() -> Optional[Path]:
"""Find compile_commands.json in build directory or project root."""
project_dir = Path(__file__).parent.parent
build_dir = project_dir / "build"
# Check build directory first
build_commands = build_dir / "compile_commands.json"
if build_commands.exists():
return build_commands
# Check project root
root_commands = project_dir / "compile_commands.json"
if root_commands.exists():
return root_commands
return None