microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.38k stars 28.62k forks source link

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

Closed lord0gnome closed 2 weeks ago

lord0gnome commented 3 weeks ago

Does this issue occur when all extensions are disabled?: Unsure but likely YES

Steps to Reproduce:

  1. Get redhat.vscode-yaml version: 1.15.0 https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml
  2. 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"} }

When I go in my files, the json schemas are matching for each file no problem. BUT there are extra matches Thing5 schema matches for thing4 file depth, thing4 schema matches for thing3 file depth, thing3 schema matches for thing2 file depth, thing2 schema matches for thing1 file depth

No matter how I configure my pattern (even when using [a-zA-Z]) and etc...

I cannot have clean matches based solely on folder depth

vs-code-engineering[bot] commented 3 weeks ago

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.92.2. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

vs-code-engineering[bot] commented 2 weeks ago

This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in VS Code or the marketplace for VS Code. See also our issue reporting guidelines. If you don't know which extension is causing the problem, you can run Help: Start extension bisect from the command palette (F1) to help identify the problem extension.

Happy Coding!

lord0gnome commented 2 weeks ago

Hi @alexr00. Can you explain how this is caused by an extension ? Does it not use the vscode implementation for globs? I will try to replicate it within vscode to make sure.