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

feature: add ability to have in one config file multiple configs for different paths #670

Open
marcindabrowski opened this issue May 11, 2024 · 1 comment

Comments

@marcindabrowski
Copy link

It would be great to give ability to define different configuration for different paths in one config file, ie:

---

extends: default

yaml-files:
  - '*.yaml'
  - '*.yml'
  - '.yamllint'

rules:
  # default rules for all files in directory

---

yaml-files:
  - 'folder1/*.yaml'

rules:
  # rules that overrides some config flags for all yamls in folder1

I'm aware that I can run yamllint with different configs for different sets of files, but this approach could simplify the usage.

Why I want this change?
Because the problem with on key in GitHub Workflows. I would like to have ability to change one config rule for given path.

@adrienverge
Copy link
Owner

Hello, and thanks for the clear proposal 👍

I'm not sure the need is worth creating a feature to parse different YAML documents from a single config file, and handle their potential conflicts.

Why I want this change?
Because the problem with on key in GitHub Workflows. I would like to have ability to change one config rule for given path.

Have you considered one of these 4 solutions to allow on key in GitHub workflows?

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

2 participants