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 support for setting nodeps through cli and .ansible-lint #4280

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

dmitrij-zavrazhin-1304
Copy link

As proposed in #4258, it seems that having an option to set nodeps using the command line interface and/or .ansible-lint file to be desireable, so here is a simple implementation of it.

Copy link

sonarcloud bot commented Jul 31, 2024

@@ -132,6 +132,11 @@ def initialize_options(arguments: list[str] | None = None) -> None | FileLock:
for k, v in new_options.__dict__.items():
setattr(options, k, v)

if options.nodeps is None or options.nodeps is False:
Copy link
Member

Choose a reason for hiding this comment

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

This is not how env vars are supposed to work. When defined, they should always override the config options.

Preference order should always be: cli > env > config.

@ssbarnea ssbarnea added the bug label Sep 19, 2024
@ssbarnea ssbarnea self-assigned this Sep 19, 2024
@ssbarnea ssbarnea added the incomplete Additional work or information is required label Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug incomplete Additional work or information is required
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants