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
RFP: standardize in-repo custom rules locations #755
Comments
Dunno about repo-local it might be a good idea. Inviting @cans, he may be interested in discussing this too.
The reason Ansible itself doesn't do this is security considerations. So I'd say no relying on XDG env vars. |
Following for sure, because this would simplify my repository layout much better than a bunch of |
@ericsysmin I raised this because I seen other tool authors doing the same move, mainly people complained about getting too many config files inside the root of the repository. |
Make ansible-lint to find custom rules in rules/custom/*/ automatically by default. Found custom rules will have higher priority than the default rules. This is an alternative way to accomplish the issue ansible#755.
Make ansible-lint to find custom rules in rules/custom/*/ automatically by default. Found custom rules will have higher priority than the default rules. This is an alternative way to accomplish the issue ansible#755.
Closing as not being a priority but a pull request will be welcomed. |
Summary
In order to make it easier for people to write custom rules inside their repositories, I would like to propose including a new folder in the default search path of the linter:
{REPO}/.config/ansiblelint/rules
. For backwards compatibility we would keep the existing default, the new path being added after it.This is following the XDG config use-pattern and we can even use HOME when a repository is not detected. It avoids cluttering the repo root folder and is easy to expand in the future.
Issue Type
Additional Information
For example I already implemented a similar feature in molecule which loads configuration from
{REPO|HOME}/.config/molecule/config.yml
. That pattern make it easy for users to understand that a repo-config takes precedence over a user-config.Reference: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
The text was updated successfully, but these errors were encountered: