Skip to content

Commit

Permalink
Fix var name
Browse files Browse the repository at this point in the history
  • Loading branch information
juliocc committed May 5, 2023
1 parent 176209c commit 87281f2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/validate_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,22 +68,22 @@ def main(dirs: list[str], verbose: bool) -> int:
schema = json.load(f)
validator = jsonschema.validators.Draft202012Validator(schema)

results = {}
failed_files = {}
for instance in instances:
result = _validate(instance, validator)
if result.state == State.OK:
print(f'[✓] {instance}')
else:
print(f'[✗] {instance}')
results[instance] = result.errors
failed_files[instance] = result.errors

if verbose:
for file_path, errors in results.items():
for file_path, errors in failed_files.items():
print(f"\n====== {file_path!s} ======")
for path, message in errors.items():
print(f"{path}: {message}")

return 0 if not errors else 1
return 0 if not failed_files else 1


if __name__ == '__main__':
Expand Down

0 comments on commit 87281f2

Please sign in to comment.