v0.5.3-pre.002

This commit is contained in:
2026-08-11 22:22:40 +02:00
parent 01d78b5845
commit 8448ad1079
134 changed files with 4518 additions and 3595 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# file: scripts/audit_rust_general_rules.py
# version: 10
# version: 11
"""Audit mechanically verifiable Rust rules shared by all Rust projects."""
@@ -77,6 +77,15 @@ def audit_file(root: pathlib.Path, path: pathlib.Path) -> list[Violation]:
violations.append(Violation("RUST003", relative, max(len(lines), 1), "file must end with exactly one newline"))
for index, line in enumerate(lines, 1):
stripped = line.strip()
if "pub(in " in stripped or "pub(super)" in stripped:
violations.append(
Violation(
"RUST027",
relative,
index,
"restricted public visibility is forbidden; use private or `pub(crate)` with crate-root re-export",
)
)
if stripped.startswith("pub mod "):
violations.append(
Violation(