chore: Add .editorconfig
file and apply settings
#165
Merged
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.
What's changed in this PR**
.editorconfig
file to solution root.dotnet format
command.Background
I want to suppress diffs that occurred when applying source code formatter.
Details of
.editorconfig
settings1. Set source file encoding to UTF-8(without BOM)
Currently both UTF-8(with BOM) /(without BOM files are exists.
So enforce UTF-8 (without BOM) for source file encodings.
Note
I've read following post before.
If it's preferred to use utf-8 (with BOM) I'll modify settings.
https://x.com/neuecc/status/1876077902258897040
This repository's files doesn't expecting non-ASCII chars (Except for markdown files)
So I thought there is no problems using
utf-8
.2.Explicitly set NewLine chars to
LF
Enforce new line chars to
LF
.Because C#
Raw String Literals
capture these chars.3. Set indent chars to
spaces
and adjustindent_size
Currently csproj/props files using
tab
.As far as I've confirmed on other Cysharp's repository.
It seems no strict requirements to use
tab
. So I've changed settings to enforcespaces
.4. Enable
insert_final_newline
/trim_trailing_whitespace
settings