Skip to content

Refine EditorConfig glob spec #295

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

Merged
merged 1 commit into from
Apr 21, 2025
Merged

Conversation

lumynou5
Copy link
Contributor

The glob spec of EditorConfig works in a non-intuitive way that is different from glob of POSIX-compatible shells. The pattern matching is done in the directory the target file is in instead of the EditorConfig file in, like the '.gitignore' file. Therefore, simply 'foo' matches 'foo' in the root directory and each sub-directory, and '/foo' has to be used to match the file in the root directory only.

See: editorconfig/editorconfig#283 (comment)
Change-Id: Iea6d25f2ba551db0420ed1fa968f0b355046cabf

The glob spec of EditorConfig works in a non-intuitive way that is
different from glob of POSIX-compatible shells. The pattern matching is
done in the directory the target file is in instead of the EditorConfig
file in, like the '.gitignore' file. Therefore, simply 'foo' matches
'foo' in the root directory and each sub-directory, and '/foo' has to be
used to match the file in the root directory only.

See: editorconfig/editorconfig#283 (comment)
Change-Id: Iea6d25f2ba551db0420ed1fa968f0b355046cabf
@jserv jserv merged commit 564b805 into sysprog21:master Apr 21, 2025
1 of 2 checks passed
@jserv
Copy link
Contributor

jserv commented Apr 21, 2025

Thank @lumynou5 for contributing!

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

Successfully merging this pull request may close these issues.

2 participants