dotnet / codeformatter

Tool that uses Roslyn to automatically rewrite the source to follow our coding styles
MIT License
1.24k stars 244 forks source link

Codeformatter reformats getter-only auto properties weirdly #196

Open twsouthwick opened 9 years ago

twsouthwick commented 9 years ago

Is this expected behavior?

Before:

private static HashSet<string> Foo { get; } = new HashSet<string>(StringComparer.Ordinal)
{
    "item1",
    "item2"
};

After:

private static HashSet<string> Foo
{ get; }
= new HashSet<string>(StringComparer.Ordinal)
{
    "item1",
    "item2"
};