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

ansible-lint needs option to treat warnings as errors #236

Closed
ssbarnea opened this issue Jan 23, 2017 · 5 comments
Closed

ansible-lint needs option to treat warnings as errors #236

ssbarnea opened this issue Jan 23, 2017 · 5 comments

Comments

@ssbarnea
Copy link
Member

We discovered that ansible-lint has no option for treating warnings as errors which is a real issue on CI environments as warnings are often ignored and lower quality code goes in.

Few examples of warnings:

  • WARNING: Couldn't open <...> - No such file or directory
  • [WARNING]: While constructing a mapping from ... duplicate dict key (size). Using last defined value only.
@DanyC97
Copy link

DanyC97 commented Feb 27, 2017

for that i guess you can use ansible-reivew ?

@willthames
Copy link
Contributor

Some of those are ansible warnings and they are just printed out - I have no control over them.

Having said that, ansible-review is able to detect duplicate keys (as it's able to perform analysis on inventory files and many other ansible file types)

@ssbarnea
Copy link
Member Author

ssbarnea commented Nov 1, 2017

@willthames Is something that ansible-lint does more or better than ansible-review?

Oops, missed that there is willthames/ansible-review#31 already open regarding this.

@l0b0
Copy link

l0b0 commented Jul 5, 2022

This seems to be an issue still.

@peterhalasz
Copy link

It was not clear from the thread but this has been already implemented. You can use the --strict flag.
See: Code and PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants