-
Notifications
You must be signed in to change notification settings - Fork 281
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
Look for per-project configuration file in parent directories #572
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.
Hello, thanks for this idea and implementation!
Although I'm favorable to the idea, this is a breaking change (behavior would start changing if top-level .yamllint
files would be taken into account). Is anyone following this repo opposed to this?
Can you also add a test_multiple_parent_config_file()
that checks that if multiple config files have conflicting rules options, the closest one takes precedence?
I addressed all of the above comments, so let me mark them as resolved. I just now noticed the CONTRIBUTING.md file, so I also fixed the linting problems per flake8 advice. I squashed the commits too, to keep the git history clean. As to whether this is a breaking change or not... I understand your sentiment. I just want to note that I found it very counterintuitive to get different behavior when I edit a file depending on which directory I start from. |
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.
Thanks for the updated version @chutzimir, it looks good. Please see my 2 comments.
Since no one seems to be opposed to this feature (which is a breaking change), I'm +1 to merge it.
Inspired be ESLint's search, it looks for configuration files in all parent directories up until it reaches the user's home or root. closes #571
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.
Great! Thanks for contributing to yamllint Georgi 👍
Inspired be ESLint's search, it looks for configuration files in all parent directories up until it reaches the user's home or root.
closes #571