Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Formatting of object initialiser syntax #234

Closed
respel opened this issue May 26, 2021 · 2 comments · Fixed by #280
Closed

Improve Formatting of object initialiser syntax #234

respel opened this issue May 26, 2021 · 2 comments · Fixed by #280
Labels
area:formatting type:bug Something isn't working
Milestone

Comments

@respel
Copy link

respel commented May 26, 2021

// Is
var xxxOptions = new XXXOptions(
    false
)
{
    XXOptions = XXOptions,
    XXXXXXXXXXXXMode = XXXXXXXXXXXMode.Active,
};

// ShouldBe
var xxxOptions = new XXXOptions(false) {
    XXOptions = XXOptions,
    XXXXXXXXXXXXMode = XXXXXXXXXXXMode.Active,
};
@belav belav added type:bug Something isn't working area:formatting labels May 27, 2021
@belav
Copy link
Owner

belav commented Jun 1, 2021

Another related edge case that can probably be handled at the same time, the space brace wasn't consistent.

new Node(
    "keyD",
    "D inserted",
    new Node("keyB1", "D1") { IsNew = true }, // Matches an old key, but treated as new because we don't move between parents
    new Node("keyD2", "D2") { IsNew = true },
    new Node(null, "D3 unkeyed") { IsNew = true }
) {
    IsNew = true
},

@belav
Copy link
Owner

belav commented Jun 5, 2021

Another related edge case

        var reusedCommand = new Command(
            "reused"
        )
        {
            Handler = CommandHandler.Create(
                () =>
                {
                    doSomething();
                }
            )
        };

@belav belav closed this as completed in #280 Jun 9, 2021
@belav belav added this to the 0.9.6 milestone Jun 10, 2021
@belav belav changed the title Object initialiser syntax Improve Formatting of object initialiser syntax Jun 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:formatting type:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants