Skip to content

0.30.2

Compare
Choose a tag to compare
@belav belav released this 22 Nov 16:56
· 133 commits to main since this release
384f7a1

What's Changed

CSharpier.MsBuild now uses DOTNET_HOST_PATH instead of just dotnet #1387

Use current dotnet binary from DOTNET_HOST_PATH instead of just dotnet.

Collection expression inside a dictionary adds unexpected new line #1390

// input & expected output
Dictionary<string, string[]> dictionary = new()
{
    {
        "Key",
        [
            "SomeValue__________________________________________",
            "SomeValue__________________________________________",
        ]
    },
};

// 0.30.1
Dictionary<string, string[]> dictionary = new()
{
    {
        "Key",

        [
            "SomeValue__________________________________________",
            "SomeValue__________________________________________",
        ]
    },
};

Failed syntax tree validation reported when trailing comma added before a trailing comment #1388

With the following code, CSharpier will add a trailing comma before the trailing comment.
CSharpier's syntax tree validation was incorrectly reporting this as a failure.

// input
var someObject = new SomeObject()
{
    Property1 = 1,
    Property2 = 2 // Trailing Comment
};

// output
var someObject = new SomeObject()
{
    Property1 = 1,
    Property2 = 2, // Trailing Comment
};

Full Changelog: 0.30.1...0.30.2