0.1.0-0-pre.4-fix.1
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
# file: scripts/audit_project_workspace_rules.py
|
||||
# version: 3
|
||||
# version: 4
|
||||
|
||||
"""Audit mechanically verifiable games.sasedev workspace boundaries."""
|
||||
|
||||
@@ -63,6 +63,22 @@ def main() -> int:
|
||||
for test_dir in sorted((root / "crates").rglob("src/**/tests")):
|
||||
if test_dir.is_dir():
|
||||
errors.append(f"RUST-TEST-003: integration tests directory forbidden under src/: {test_dir.relative_to(root).as_posix()}")
|
||||
history_root = root / "history"
|
||||
if history_root.exists():
|
||||
for history_path in sorted(history_root.rglob("*.md")):
|
||||
relative_history = history_path.relative_to(history_root)
|
||||
if relative_history.as_posix() == "README.md":
|
||||
continue
|
||||
if len(relative_history.parts) != 2:
|
||||
errors.append(f"DOC-010: history file must use history/<X.Y.Z>/<label>.md: {history_path.relative_to(root).as_posix()}")
|
||||
continue
|
||||
base_version, filename = relative_history.parts
|
||||
if re.fullmatch(r"(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)", base_version) is None:
|
||||
errors.append(f"DOC-010: invalid history base version directory: {history_path.relative_to(root).as_posix()}")
|
||||
label = filename[:-3]
|
||||
candidate = f"{base_version}-{label}"
|
||||
if SEMVER.fullmatch(candidate) is None:
|
||||
errors.append(f"DOC-010: invalid history milestone filename: {history_path.relative_to(root).as_posix()}")
|
||||
forbidden_assets = [path for path in (root / "crates").rglob("assets") if path.is_dir()]
|
||||
for path in forbidden_assets:
|
||||
errors.append(f"GAME-ASSET-001: assets directory forbidden inside crates: {path.relative_to(root).as_posix()}")
|
||||
|
||||
Reference in New Issue
Block a user