Skip to content

Commit

Permalink
Printing output based on severity
Browse files Browse the repository at this point in the history
  • Loading branch information
TheChymera committed Sep 8, 2022
1 parent 9576526 commit bf0e17e
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions dandi/cli/cmd_validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,18 @@ def validate_bids(
)

for i in validator_result:
click.secho(
i.message,
bold=True,
fg="red",
)
if i.severity == Severity.ERROR:
click.secho(
i.message,
bold=True,
fg="red",
)
if i.severity == Severity.WARNING:
click.secho(
i.message,
bold=True,
fg="orange",
)

validation_errors = [e for e in validator_result if e.severity == Severity.ERROR]

Expand Down

0 comments on commit bf0e17e

Please sign in to comment.