-
Notifications
You must be signed in to change notification settings - Fork 120
chore: Add .editorconfig file and apply settings
#165
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
chore: Add .editorconfig file and apply settings
#165
Conversation
|
Thank you, most of the interpretations are fine. I might have some reservations about the end_of_line settings. P.S.: Ah, since ReplaceLineEndings is from .NET 6, I guess it can't be used in Source Generator |
Personally I want to continue using this configuration ( And files that are generated by Source Generator already has
I though Source Generator files should output source files using |
|
What happens to the code written using StringBuilder's WriteLine? |
|
I've removed Currently it seems unit test failed on following cases.
These issues need to be handled by #162. |
|
ok, thanks! |
What's changed in this PR**
.editorconfigfile to solution root.dotnet formatcommand.Background
I want to suppress diffs that occurred when applying source code formatter.
Details of
.editorconfigsettings1. 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
LFEnforce new line chars to
LF.Because C#
Raw String Literalscapture these chars.3. Set indent chars to
spacesand adjustindent_sizeCurrently 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_whitespacesettings