google / yamlfmt

An extensible command line tool or library to format yaml files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Exclude patterns not working as expected

pereorga opened this issue · comments

I have the following .yamlfmt file in my project:

include:
  - .
  - .yamlfmt
exclude:
  - node_modules

The idea is to include all *.yml / *.yaml files in the project, including hidden files, but excluding some directories such as dependency directories (node_modules in this case). But for some reason this is isn't working, node_modules is still checked if . is included.

I may be missing something. What would be an alternative approach? I don't want to maintain a list of files and directories to include.

Hi @pereorga thanks for opening an issue.

I would have expected that config to work. I can spend some time debugging tonight to try and find the issue.

Found the issue, it should be fixed in the next release of yamlfmt. Not sure yet when I will be able to get that out but I will try within the next couple of weeks.

commented

Thanks @braydonk