Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some minor formatting changes #12

Merged
merged 1 commit into from
Jan 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions sigma/cli/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,34 +92,35 @@ def check(input, validation_config, file_pattern, fail_on_error, fail_on_issues)
click.echo(f"Found {rule_error_count} errors, { cond_error_count } condition errors and { issue_count } issues.")

if rule_error_count > 0:
click.echo("\nRule error summary:")
rule_error_table = PrettyTable(
field_names=("Count", "Rule Error"),
align="l",
)
rule_error_table.add_rows([
(error, count)
(count, error)
for error, count in sorted(rule_errors.items(), key=lambda item: item[1], reverse=True)
])
click.echo(rule_error_table.get_string())
else:
click.echo("No rule errors found.")

if cond_error_count > 0:
click.echo("Condition error summary:")
click.echo("\nCondition error summary:")
cond_error_table = PrettyTable(
field_names=("Count", "Condition Error"),
align="l",
)
cond_error_table.add_rows([
(error, count)
(count, error)
for error, count in sorted(cond_errors.items(), key=lambda item: item[1], reverse=True)
])
click.echo(cond_error_table.get_string())
else:
click.echo("No condition errors found.")

if issue_count > 0:
click.echo("Validation issue summary:")
click.echo("\nValidation issue summary:")
validation_issue_summary = PrettyTable(
field_names=("Count", "Issue", "Severity", "Description"),
align="l",
Expand Down