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

Add EditorConfig file #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AlexWayfer
Copy link

More info here: https://editorconfig.org

Also fix issues with newlines and trailing whitespaces.

More info here: https://editorconfig.org

Also fix issues with newlines and trailing whitespaces.
@Forty-Bot
Copy link
Contributor

I think it is better to just add stuff like this to gitignore and let users configure their editor however they want.

@AlexWayfer
Copy link
Author

I think it is better to just add stuff like this to gitignore and let users configure their editor however they want.

No, this stuff exactly for VCS. For single style between all contributors. If somebody will write a code (or documentation or something else) with trailing spaces, then somebody else will have enabled setting for deleting trailing spaces, yet another will indent with tabs, and fourth will use spaces for indentation… it's a mess. And this file, tool, is intended for unifying. If you don't want it and mixing spaces with tabs and unrelated changes of trailing spaces and newlines are OK for you — OK. But I still recommend this.

@Forty-Bot
Copy link
Contributor

It's ok to have a standard style, but I'd rather enforce something like that with one of the many c++ formatters. Plus, no config can support every editor without plugins. It is better to let users add whatever config they need, imo.

@AlexWayfer
Copy link
Author

I'd rather enforce something like that with one of the many c++ formatters

OK, I agree with it. But it will not help with Markdown, JSON and other files.

Plus, no config can support every editor without plugins.

Sorry, what? This file is not preventing opening the project in some editor without its support. And it's not hard to setup an editor for automatic support of defined (in this file) rules. Or, if you have an editor without such possibility, of course you can just read this file as guidelines and make it manually. But it'd be an argument for PR reviews.

It is better to let users add whatever config they need, imo.

One more time: if one user adds their config with tabs indentation, and another user adds with spaces indentation — it's OK as freedom but it's bad as single-project-style. You can ignore this file, but for users with EditorConfig support and for reviewers it'd be easier to write correct (suitable) code.

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