Hello @cpburnz, I've looked existing issues but couldn't find this one. It was initially reported in yamllint issues: adrienverge/yamllint#334 (yamllint uses pathspec).
Considering these files:
file.yaml
dir/
└── dir/file.sql
dir.yaml/
└── dir.yaml/file.sql ← problem here
pathspec.PathSpec.from_lines('gitwildmatch', ['*.yaml']) does match file.yaml, dir.yaml, but also dir.yaml/file.sql. The latter isn't what I would expect, because *.yaml feels like "files that end with .yaml", not "any file in any path that contains .yaml".
Is it the expected behavior? If yes, what is the correct pattern for "files that end with .yaml"?
Looking forward to your answer, and thanks for this very useful project 👍