On my team, some of us use Rider, others use VisualStudio 2022. When they run code cleanup, VS2022 adds a space between delegate and () as seen here:
var cat = this.ExecuteAFunction("Function Name Here", delegate () {});
On code cleanup in Rider, my code removes the space as seen here:
var cat = this.ExecuteAFunction("Function Name Here", delegate() {});
I have tried setting the ‘Before Other Parentheses -> Method call parentheses’ in Editor > Code Style > C#, but that adds it to all methods, not just delegate. I’ve tried the other options under there, searched in the documentation about how these are set up and everything, and I cannot for the life of me figure out why Rider is doing this, but VisualStudio isn’t. Before it’s pointed out, no I cannot change delegate () {}
to an arrow function per company coding standards.
Is there a setting I’m missing, an .editorconfig thing I should add, or something else that could fix this?