Skip to content

Commit 4a2391d

Browse files
committed
Printed metadata check warning count
Signed-off-by: Jaehyun Kim <[email protected]>
1 parent 6a13378 commit 4a2391d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

flow/util/checkMetadata.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ def try_number(string):
7171
}
7272

7373
ERRORS = 0
74+
WARNS = 0
7475

7576
for field, rule in rules.items():
7677
compare = rule["compare"]
@@ -103,12 +104,15 @@ def try_number(string):
103104
if rule.get("level") == "warning":
104105
PRE = "[WARN]"
105106
CHECK = "pass"
107+
WARNS += 1
106108
else:
107109
PRE = "[ERROR]"
108110
CHECK = "fail"
109111
ERRORS += 1
110112
print(PRE, field, CHECK, "test:", build_value, compare, rule_value)
111113

114+
print(f"Number of metadata check warnings: {WARNS}")
115+
112116
if ERRORS == 0:
113117
print(f"All metadata rules passed ({len(rules)} rules)")
114118
else:

0 commit comments

Comments
 (0)