Add .editorconfig to tell editors/IDEs basic whitespace rules. #1654
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
https://editorconfig.org/ is a common file that is understood
by virtually all editors and IDES that deal with code. With this
file, contributors to the code-base already have a good head-start
complying with the expected formatting rules.
Note, this also includes a trim_trailing_whitespace setting, that
will remove random whitespace at end of lines, which will reduce
merge conflicts on such lines. Some existing files have spurious
whitespace at the end of lines, so whenever they are edited first
under .editorconfig configuration they will be cleaned up.
Motivation and Context
In recent pull requests I noticed that I had to manually configure my editor to match the local customs. With a
.editorconfig
file, this wouldn've happened automatically. This is an issue all contributors face. Let's make it simple to them.