A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.
check_repo --release: report licence-unknown rows as licence-unknown (#1546)
Eyal Golan332b98bf8aeb
diff --git a/scripts/oss/check_repo.py b/scripts/oss/check_repo.pyindex a5d4a3779..f2d642ce4 100755--- a/scripts/oss/check_repo.py+++ b/scripts/oss/check_repo.py@@ -165,8 +165,10 @@ def check_assets(root: Path, files: list[str], release: bool) -> list[Finding]:found.append(Finding("assets", r["_file"], 0, f"unknown-licence {r['licence']}"))if r["status"] not in P.STATUSES:found.append(Finding("assets", r["_file"], 0, f"bad-status {r['status']}"))- elif release and (r["status"] == "owner-verify" or r["licence"] == "unknown"):+ elif release and r["status"] == "owner-verify":found.append(Finding("assets", r["_file"], 0, f"owner-verify {r['glob']}"))+ elif release and r["licence"] == "unknown":+ found.append(Finding("assets", r["_file"], 0, f"licence-unknown {r['glob']}"))if not r.get("allow_empty") and not any(fnmatch.fnmatch(f, r["glob"]) for f in files):found.append(Finding("assets", r["_file"], 0, f"stale-rule {r['glob']}"))binary = git_binary_files(root)diff --git a/scripts/oss/tests/test_assets.py b/scripts/oss/tests/test_assets.pyindex d1088b603..70a647fc2 100644--- a/scripts/oss/tests/test_assets.py+++ b/scripts/oss/tests/test_assets.py@@ -95,6 +95,9 @@ def test_release_mode_refuses_unknown_licence(make_repo, capsys):root = make_repo({"ASSETS.yaml": rules, "img/a.png": b"\x89PNG"})assert run(root) == 0assert run(root, "--release") == 1+ out = capsys.readouterr().out+ assert "assets: ASSETS.yaml: licence-unknown img/*.png" in out+ assert "owner-verify img/*.png" not in outdef test_portraits_file_is_read_too(make_repo, capsys):