When I write following code in Rider:
new List<Guid> { Guid.NewGuid() }
and I type ;
at the end, Rider automatically formats this into new List<Guid> {Guid.NewGuid()};
Note that spaces were removed before and after both braces.
Compiler doesn't like it and reports [SA1012] Opening brace should be followed by a space.
and [SA1013] Closing brace should be preceded by a space.
How can I turn off such behavior in Rider?
I don't know which version of Rider you're using but in 2022.2.3 I had to enable the following property under File | Settings | Editor | Code Style | C#:
I hope it helps you as well!