-
Notifications
You must be signed in to change notification settings - Fork 664
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 ability to load .config/ansible-lint.yml #1822
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've never seen other projects using a leading dot when the config is in a subdirectory. In that case, it's usually only the directory itself that is dotted.
I'd go for .config/ansible-lint
, then. Alternatively, there could be support for specifying a different path via pyproject.toml
instead of hardcoding one string — because it's not a widely accepted standard and some projects may already have some other directory for config adopted.
Also, I would expect tests for this kind of patch.
I am not going to go for the configure the config file location rabbit hole. I considered a different name without the dot but that would add extra complexity and I prefer to KISS. Telling people that just move existing config filename without asking them to rename them is easier. Also, changing the filename would require changes in other places like json schemas that detect the configuration of ansible-lint. But I will add tests, that is indeed a genuine comment. Anything else should be considered as something for the future, like having a proper yml file extension would not be a bad idea, just outside the scope. |
I think this is not needed. Ansible Lint already consults too many locations when it searches for the config file. It is bad enough that the configuration loader can retrieve configuration from a file that has nothing to do with the current project. As for configuring the config file path: we already allow this ( |
All of my comments are genuine. I don't post things I don't mean just because I'm bored. Although, feel free to ask for more reviews to see if somebody else feels file your approach is justified. |
ad03e96
to
b3529d8
Compare
b3529d8
to
8a8a698
Compare
Original comments no longer apply to current proposed change.
This will allow users to declutter their project root directory by allowing users to put configuration in
.config/ansible-lint.yml
instead of.ansible-lint
file.It matches a feature already implemented by molecule and supported by https://dot-config.github.io -- the goal being to reduce cluttering of root project directories.
This does not change the ability to load the file from its current location.