summaryrefslogtreecommitdiff
path: root/lint/summary.py
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2025-06-16 15:13:22 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2025-06-17 13:51:48 +0200
commit1fa9984b7f65638515c0be743abe15bb0b8170e8 (patch)
treede548e2622c4c4fb3759e6aa1c0290cf38210f1b /lint/summary.py
parent9b8989da51d55ac3b4664ffcfd07abbb305ee8a9 (diff)
downloadjustbuild-1fa9984b7f65638515c0be743abe15bb0b8170e8.tar.gz
lint scripts: Add typing and basic documentation
Diffstat (limited to 'lint/summary.py')
-rwxr-xr-xlint/summary.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/lint/summary.py b/lint/summary.py
index ca7445db..49126c61 100755
--- a/lint/summary.py
+++ b/lint/summary.py
@@ -17,7 +17,9 @@ import json
import os
import sys
-FAILED = {}
+from typing import Any, Dict
+
+FAILED: Dict[str, Any] = {}
for lint in sorted(os.listdir()):
if os.path.isdir(lint):
@@ -34,7 +36,12 @@ for lint in sorted(os.listdir()):
record["log"] = log
FAILED[lint] = record
-with open(os.path.join(os.environ.get("OUT"), "failures.json"), "w") as f:
+OUT = os.environ.get("OUT")
+if OUT is None:
+ print("Failed to get OUT")
+ sys.exit(1)
+
+with open(os.path.join(OUT, "failures.json"), "w") as f:
json.dump(FAILED, f)
failures = list(FAILED.keys())