You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
yamllint 1.26.1 does not match files in a directory like I expect it to. I have created a PR in my demonstration repo to illustrate the problem, but I'll summarize here.
If I have a YAML file in group_vars/i_am_a_y-a-m-l_file which has no file extension. All files under group_vars/ are assumed to be YAML files, but without extensions. I try and instruct yamllint to treat them as such using a variety of different directives, but none of them result in yamllint checking the file.
file: .yamllint
---
extends: defaultignore: | .venv/ .git/yaml-files:
- '*.yaml'
- '*.yml'# This works
- '*.yamaml'# None of these work for matching non ".yml" ".yaml" files in group_vars/
- group_vars
- group_vars/
- /group_vars/
- ./group_vars/
- ./group_vars
- group_vars/*
- group_vars/**
- ./group_vars/*
- ./group_vars/**
file: group_vars/i_am_a_y-a-m-l_file
---
this_file_has_problems: TRUE
file: group_vars/bad.yamaml
# yamllint will lint this file, because of the extension match# it won't lint it without that, even though it's in a directory that should# match.has_problems: TRUE
Running yamllint, it correctly takes on my custom file extension .yamaml (🐬🐻❓), but it doesn't lint i_am_a_y-a-m-l_file
$ yamllint ../group_vars/bad.yamaml 4:1 warning missing document start "---" (document-start) 4:15 warning truthy value should be one of [false, true] (truthy)
The text was updated successfully, but these errors were encountered:
@adrienverge You are correct, it is a duplicate of #334. I tried with yamllint 1.23.0, and it works the way I expect it to. I'll close this so we only track it in one place.
yamllint 1.26.1 does not match files in a directory like I expect it to. I have created a PR in my demonstration repo to illustrate the problem, but I'll summarize here.
If I have a YAML file in
group_vars/i_am_a_y-a-m-l_file
which has no file extension. All files undergroup_vars/
are assumed to be YAML files, but without extensions. I try and instruct yamllint to treat them as such using a variety of different directives, but none of them result in yamllint checking the file.file:
.yamllint
file:
group_vars/i_am_a_y-a-m-l_file
file:
group_vars/bad.yamaml
Running yamllint, it correctly takes on my custom file extension
.yamaml
(🐬🐻❓), but it doesn't linti_am_a_y-a-m-l_file
The text was updated successfully, but these errors were encountered: