panda-rpki-oss/tools/check_format.py
yuyr 591bed90a8
Some checks failed
ci / rust (push) Has been cancelled
ci / docker (push) Has been cancelled
ci / audit (push) Has been cancelled
Harden first-release validation and dependency hygiene
2026-09-10 09:53:45 +08:00

10 lines
431 B
Python

"""Check every Rust source file, including include! fragments."""
import subprocess
from pathlib import Path
root = Path(__file__).resolve().parents[1]
files = sorted(p for folder in ("src", "tests") for p in (root / folder).rglob("*.rs"))
subprocess.run(["cargo", "fmt", "--all", "--check"], cwd=root, check=True)
subprocess.run(["rustfmt", "--check", "--edition", "2024", *map(str, files)],
cwd=root, check=True)