vscode-yaml
vscode-yaml copied to clipboard
Nested glob patterns match paths above them that they shouldn't
Describe the bug
I am trying to match files that have the same names, using folder depth to determine which schema to use.
Expected Behavior
I should be able to use glob patterns to determine the depth of a file, ex : foo/*/*/*/*.bar
and match only files at that folder depth
Current Behavior
It matches the depth I want, but also the one directly above it.
Steps to Reproduce
-
go in settings.json of workspace and configure these settings: { "yaml.schemas":{ "./.lsp/thing1.properties.schema.json": "rootDir/*/filewithsamename.yaml", "./.lsp/thing2.properties.schema.json": "rootDir/*/*/filewithsamename.yaml", "./.lsp/thing3.properties.schema.json": "rootDir/*/*/*/filewithsamename.yaml", "./.lsp/thing4.properties.schema.json": "rootDir/*/*/*/*/filewithsamename.yaml", "./.lsp/thing5.properties.schema.json": "rootDir/*/*/*/*/*/filewithsamename.yaml"} }
-
Look at some example file matches, they will match the correct file to the correct schema, but also the one above it.
Environment
- VS Code Version: 1.90.0
- OS : Fedora Linux 38
- Extension version : 1.15.0