Formatting
publish / publish (push) Successful in 14m33s

This commit is contained in:
khodowany
2026-09-14 23:56:16 -05:00
parent 3816eb96c9
commit 59b96ddf95
16 changed files with 127 additions and 232 deletions
+6 -2
View File
@@ -16,6 +16,7 @@ COMMANDS = (
"package",
"lsp",
"clangd",
"format",
)
COMMON_DIR = pathlib.Path("build") / "build_common"
TOOLS_DIR = pathlib.Path("build") / "build_tools"
@@ -60,6 +61,9 @@ def runtime_ready(root):
and (root / TOOLS_DIR / "clangd.py").is_file()
and (root / RUNTIME_DIR / "modulus" / "cli.py").is_file()
and (root / RUNTIME_DIR / "modulus" / "export.py").is_file()
and (root / TOOLS_DIR / "format.py").is_file()
and (root / RUNTIME_DIR / "modulus" / "formatting.py").is_file()
and (root / RUNTIME_DIR / "modulus" / "format_layout.py").is_file()
)
def optional_credentials():
@@ -340,9 +344,9 @@ def ensure_runtime(root):
def delegate(command, argv):
root = repo_root()
if command == "clangd":
if command in {"clangd", "format"}:
if not runtime_ready(root):
print("Modulus clangd tooling is missing; run ./modulus.py configure first", file=sys.stderr)
print(f"Modulus {command} tooling is missing; run ./modulus.py configure first", file=sys.stderr)
return 1
else:
ensure_runtime(root)