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

Allow overriding yaml-files with globs #546

Closed
mowies opened this issue Mar 6, 2023 · 1 comment
Closed

Allow overriding yaml-files with globs #546

mowies opened this issue Mar 6, 2023 · 1 comment

Comments

@mowies
Copy link

mowies commented Mar 6, 2023

I would like to have my included files listed in the .yamllint config file directly instead of specifying them in the command.

I have a block in my .yamllint config file that looks like this:

yaml-files:
  - ".github/**/*.yml"
  - ".github/**/*.yaml"
  - "docs/**/*.yml"
  - "docs/**/*.yaml"
  - ".yamllint"

But my YAML files in the .github and the docs folder are not picked up at all. Not by --list-files and also not by the general lint command.

Is it a possibility to add this functionality?

@adrienverge
Copy link
Owner

Hello,

I confirm the problem:

mkdir -p .github/dir/subdir
echo 'foo: bar' > .github/file.yaml
echo 'foo: bar' > .github/dir/subdir/file.yaml
yamllint --list-files .
# ↑ works (prints both files)
yamllint -d '{yaml-files: [".github/**/*.yaml"]}' --list-files .
# ↑ doesn't work (doesn't print anything)
yamllint --version
# 1.29.0

But this is a duplicate of #334 and #390 isn't it? I propose to continue the discussion in #334.

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