Skip to content

Commit

Permalink
chore: getting diagnostics to show for flags
Browse files Browse the repository at this point in the history
  • Loading branch information
Chezka109 committed Oct 31, 2024
1 parent e5464d4 commit f94b4cc
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions gatorgrade/output/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,19 +356,35 @@ def run_checks(
filtered_results = results
if check_include:
filtered_results = [r for r in results if check_include in r.description]
for result in filtered_results:
if not result.passed:
result.print(show_diagnostic=True)
if result.run_command != "":
rich.print(
f"[blue] → Run this command: [green]{result.run_command}\n"
)
if check_exclude:
filtered_results = [
r for r in filtered_results if check_exclude not in r.description
]
for result in filtered_results:
if not result.passed:
result.print(show_diagnostic=True)
if result.run_command != "":
rich.print(
f"[blue] → Run this command: [green]{result.run_command}\n"
)

# Print results based on show_failures and status
if show_failures:
# Print only failures
for result in filtered_results:
if not result.passed:
result.print(show_diagnostic=True)
if result.run_command:
print(f" → Run this command: {result.run_command}\n")
if result.run_command != "":
rich.print(
f"[blue] → Run this command: [green]{result.run_command}\n"
)
else:
# Print all results
for result in filtered_results:
Expand Down

0 comments on commit f94b4cc

Please sign in to comment.