Add new lines before members in object initializers #47
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.
Description of changes
Insert new lines between members in object initializers with Rider (or R#). The default .NET styling option doesn't work.
When using our .NET Coding standards, reformating in Rider these pieces of code:
… will automatically inline the object initializer to:
This would affect code that developers haven’t edited, resulting in unwanted changes that make code less readable and require reviewers to ask the PR author to revert the code to its original state.
This happens sometimes automatically as some IDEs are configured to reformat new changes automatically.
I've seen PRs of developers using our coding standards where they would complain about it (but still commit the inlined code anyway).
Breaking changes
There's no warning or errors involved here, it's mostly styling.