INNER CODE UNIT · Python
lint_file
ClickHouse/ai-sdk-cpp · scripts/lint.py:94
async def lint_file(
file: Path,
compile_commands: Path,
fix: bool,
extra_args: List[str],
semaphore: asyncio.Semaphore
) -> Tuple[Path, bool, str]:
"""Run clang-tidy on a single file."""
async with semaphore:
cmd = [
"clang-tidy",
f"-p={compile_commands.parent}",
*extra_args,
]
if fix:
cmd.extend(["--fix", "--fix-errors"])