Here's the same code with comments for each issue:
// CSharpier should have kept the original formatting here.
List<string> items = [// My item
"Hello",];
// An additional empty line was added below.
items.AddRange(
[
"More really long words",
"which span multiple lines",
"are added here",
"and something bad",
"happens"
]
);
class MyClass
{
private readonly List<string> _items;
public MyClass()
{
// Two spaces were added after the = sign in this scenario.
_items = [];
_items ??= [];
}
}
Hey there, found a few little issues while migrating a project to .NET 8 today 😄
Here's some sample code:
And reformatted via the CSharpier CLI as follows:
The result is as follows:
Here's the same code with comments for each issue:
Any help is greatly appreciated Fotis