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

Request new mode: fix based on .editorconfig #15

Open
cxw42 opened this issue May 14, 2019 · 1 comment
Open

Request new mode: fix based on .editorconfig #15

cxw42 opened this issue May 14, 2019 · 1 comment

Comments

@cxw42
Copy link

cxw42 commented May 14, 2019

I use wtf a great deal, and have also started using .editorconfig files in the last year or so. A .editorconfig file specifies whitespace type, indent size, and other editor settings for the files in a repo.

Would you be willing to add (or accept a PR for, if I can find the time :D ) a mode that reads the .editorconfig file in order to find the settings to apply? For me, that would mean I would no longer have to specify the specific trailing/eof/eol/tab-space command-line options, and would always get consistent results.

Python code to load the .editorconfig files is already available. Thanks for considering this request!

@dlenski
Copy link
Owner

dlenski commented May 21, 2019

Would you be willing to add (or accept a PR for, if I can find the time :D ) a mode that reads the .editorconfig file in order to find the settings to apply? For me, that would mean I would no longer have to specify the specific trailing/eof/eol/tab-space command-line options, and would always get consistent results.

Yes, this sounds useful!

Python code to load the .editorconfig files is already available. Thanks for considering this request!

My only hesitation here is that I prefer not to add external dependencies to wtf, because I end up installing it on a lot of annnnnnnnncient uncooperative systems where nothing but stock Python 2.6/2.7 is available (:frowning_face:).

On the other hand, it's obviously unreasonable to say that you should reinvent the wheel entirely here. Probably the right balance would be to try importing editorconfig and fail/warn cleanly if it's not available, and if its services were requested.

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