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

Function check_file_format

scripts/format.py:44–51  ·  view source on GitHub ↗

Check if a file is properly formatted.

(file: Path)

Source from the content-addressed store, hash-verified

42
43
44def check_file_format(file: Path) -> bool:
45 """Check if a file is properly formatted."""
46 result = subprocess.run(
47 ["clang-format", "--dry-run", "--Werror", str(file)],
48 stdout=subprocess.PIPE,
49 stderr=subprocess.DEVNULL
50 )
51 return result.returncode == 0
52
53
54def format_file(file: Path) -> None:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected