Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lord0gnome opened this issue Sep 9, 2024 · 0 comments
Open

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

lord0gnome opened this issue Sep 9, 2024 · 0 comments

Comments

@lord0gnome
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant