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

Slash in path breaks other paths in brace syntax #118

Open
poconn opened this issue May 16, 2023 · 2 comments
Open

Slash in path breaks other paths in brace syntax #118

poconn opened this issue May 16, 2023 · 2 comments

Comments

@poconn
Copy link

poconn commented May 16, 2023

In a [{pattern1,pattern2,...}] section, a slash in one pattern seems to cause the others to only match files in the project root directory instead of including subdirectories:

Matches all **/*.ext:

[{*.ext,foo}]

Only matches /*.ext:

[{*.ext,foo/bar}]

Version:

$ editorconfig --version
EditorConfig Node.js Core Version 1.0.2

Thanks!

@hildjj
Copy link
Collaborator

hildjj commented Jun 23, 2023

Confirmed. I think this may be an issue in minimatch. If this is still important to you, would you mind filing an issue over there? Some specifics of the test I just ran:

  • minimatch v9.0.1
  • minimatch('/tmp/boo/bar.ext', '/tmp/{*.ext,foo/bar}', { matchBase: true, dot: true, noext: true }) => false

matchBase: false doesn't change anything here.

@hildjj
Copy link
Collaborator

hildjj commented Jun 23, 2023

noext: false also doesn't change this.

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

2 participants