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

Failure to apply EditorConfig settings in dirs with funny names #345

Open
monnier opened this issue Jun 20, 2024 · 1 comment
Open

Failure to apply EditorConfig settings in dirs with funny names #345

monnier opened this issue Jun 20, 2024 · 1 comment

Comments

@monnier
Copy link

monnier commented Jun 20, 2024

If I have a ~/[hello]/.editorconfig file with a pattern for /*.c, its settings aren't applied because the code ends up matching
~/[hello]/myfile.c against the pattern ~/[hello]/*.c. We could fix the problem by quoting the special chars like [ but it's kind of silly to do that (and it's more work for fnmatchp and won't hit as often in its cache) when we can instead match
myfile.c against *.c.

I pushed a patch which does the latter to the scratch/editorconfig (in nongnu.git).
To consult that branch you can do:

git remote add -ft scratch/editorconfig nongnu git://git.sv.gnu.org/emacs/nongnu.git
git log nongnu/scratch/editorconfig

The new code passes all the tests for me. The branch includes a few other changes I think we should include, but do let me know if there's some objection to any of those changes, of course.

@monnier
Copy link
Author

monnier commented Jul 2, 2024

Ping?

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