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

Add severity to standard output. Fixes #93 #111

Merged
merged 4 commits into from
Nov 21, 2019

Conversation

mew1033
Copy link
Contributor

@mew1033 mew1033 commented Nov 14, 2019

I added this as an argument that defaults to off so that the output stays consistent for people. If you want it, the flag is --add-severity.

@roaldnefs roaldnefs self-requested a review November 20, 2019 09:34
Copy link
Member

@roaldnefs roaldnefs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mew1033 for your pull request!

The salt-lint package is heavily based upon ansible-lint and I therefore would prefer a approach similar to ansible-lint.

The flag itself is defined as --parseable-severity in ansible-lint (https://github.com/ansible/ansible-lint/blob/master/lib/ansiblelint/__main__.py#L68), because the used formatter in your pull request isn't the parseable formatter I would prefer the flag --severity over --add-severity.

In addition to changing the flag, I would like to see a separate formatter e.g. SeverityFormatter as this doesn't required the add_severity parameter to be passed to the default Formatter in saltlint/formatters/__init__.py.

An example of the ParseableSeverityFormatter in ansible-lint can be found here: https://github.com/ansible/ansible-lint/blob/ea4cd39bbcc508a96c17d9e97f12278961023487/lib/ansiblelint/formatters/__init__.py#L59. The same file also includes a ParseableFormatter.

@roaldnefs roaldnefs added Priority: Low Type: Enhancement New feature or request labels Nov 20, 2019
@roaldnefs roaldnefs changed the base branch from master to develop November 20, 2019 09:36
@mew1033
Copy link
Contributor Author

mew1033 commented Nov 20, 2019

@roaldnefs I've made changes based on your comments. Thanks!

@roaldnefs roaldnefs merged commit 4a78467 into warpnet:develop Nov 21, 2019
@roaldnefs roaldnefs mentioned this pull request Nov 21, 2019
@mew1033 mew1033 deleted the add-severity branch November 25, 2020 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants