BenchmarkDotNet
BenchmarkDotNet copied to clipboard
chore: Add .editorfile setting file
This PR add .editorconfig setting file at solution root level.
Background
Currently BenchmakDotNet source code don't enforce linter and following files are mixed.
- Files that using UTF-8 (with BOM) and UTF-8 (without BOM)
- Files that using
CRLFandLF - Files that ends with LF and without LF
- Other minor code format difference that can be fixed by
dotnet format
What's changed this PR
Add .editorconfig file that enforce following settings.
- Use UTF-8 (without BOM)
- Use
LF - Indent settings
- Enable
suggestionfor file scoped namespace. - Insert
LFat end of file. (This setting cause error on CI. it's not included in this PR)
Task after this PR is merged
This PR cause a lot of file changes by dotnet format command and it's hard to review.
So diffs are not included in this PR.
Please run following steps by BenchmarkDotNet maintainer side.
- Apply
dotnet formatcommand to enforce.editorconfigsettings with following command.dotnet format BenchmarkDotNet.sln -v diagnostic dotnet format build/BenchmarkDotNet.Build -v diagnostic - Review changes and commit code changes
- Edit
.editorconfigand setinsert_final_newline = true. then execute 1-2 steps. - Push changes.
Note:
dotnet formatcommand don't support F# project. so these files are skipped (Warnings are raised when runningdotnet format)BenchmarkDotNet.Xamarin.slnis excluded because it seems not maintained.