editorconfig / editorconfig-core-js

EditorConfig Core library and command line utility written in JavaScript
http://editorconfig.org
MIT License
272 stars 48 forks source link

Slash in path breaks other paths in brace syntax #118

Open poconn opened 1 year ago

poconn commented 1 year ago

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 commented 1 year ago

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:

matchBase: false doesn't change anything here.

hildjj commented 1 year ago

noext: false also doesn't change this.