Harden first-release validation and dependency hygiene
This commit is contained in:
9
tools/check_format.py
Normal file
9
tools/check_format.py
Normal file
@@ -0,0 +1,9 @@
|
||||
"""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)
|
||||
Reference in New Issue
Block a user