0.1.0-pre.004
This commit is contained in:
33
scripts/audit_rust_workspace_rules.py
Executable file
33
scripts/audit_rust_workspace_rules.py
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env python3
|
||||
# file: scripts/audit_rust_workspace_rules.py
|
||||
# version: 2
|
||||
|
||||
"""Run both the general Rust and khadhroony-specific workspace audits."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import pathlib
|
||||
import subprocess
|
||||
|
||||
|
||||
def main() -> int:
|
||||
"""Run both independent audit scripts."""
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--root", default=".")
|
||||
parser.add_argument("--report-only", action="store_true")
|
||||
arguments = parser.parse_args()
|
||||
script_dir = pathlib.Path(__file__).resolve().parent
|
||||
commands = [
|
||||
["python3", str(script_dir / "audit_rust_general_rules.py"), "--root", arguments.root],
|
||||
["python3", str(script_dir / "audit_khadhroony_workspace_rules.py"), "--root", arguments.root],
|
||||
]
|
||||
if arguments.report_only:
|
||||
for command in commands:
|
||||
command.append("--report-only")
|
||||
return max(subprocess.run(command, check=False).returncode for command in commands)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in New Issue
Block a user