vscode-yaml icon indicating copy to clipboard operation
vscode-yaml copied to clipboard

Nested glob patterns match paths above them that they shouldn't

Open lord0gnome opened this issue 5 months ago • 0 comments

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

  1. 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"} }

  2. 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

lord0gnome avatar Sep 09 '24 09:09 lord0gnome