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

Update formatting and diagnostics #970

Merged
merged 1 commit into from
Feb 19, 2024

Conversation

erri120
Copy link
Member

@erri120 erri120 commented Feb 19, 2024

Closes #945.
Closes #944.

@erri120 erri120 requested a review from a team February 19, 2024 10:59
@erri120 erri120 self-assigned this Feb 19, 2024
@Al12rs
Copy link
Contributor

Al12rs commented Feb 19, 2024

I tried this out a bit, found this auto formatting:

        this.WhenActivated(d =>
        {
            this.WhenAnyValue(x => x.ViewModel!.Items)
                .BindTo(this, x => x.MenuItemsControl.Items)
                .DisposeWith(d);
        });

formatted to:

        this.WhenActivated(
            d =>
            {
                this.WhenAnyValue(x => x.ViewModel!.Items)
                    .BindTo(this, x => x.MenuItemsControl.Items)
                    .DisposeWith(d);
            }
        );

Do you think it can be avoided? Seems a bit pointless for labdas like that .
This happens for all multiline lambdas in subscriptions for example. You can test this in SpineViewModel.cs

@erri120
Copy link
Member Author

erri120 commented Feb 19, 2024

Do you think it can be avoided? Seems a bit pointless for labdas like that . This happens for all multiline lambdas in subscriptions for example. You can test this in SpineViewModel.cs

The formatter is somewhat limited when it comes to lambdas in invocations. You get this result because the setting for invocations was set to "chop if long or multiline", which chopped the lambda up like this.

@Al12rs
Copy link
Contributor

Al12rs commented Feb 19, 2024

Do you think it can be avoided? Seems a bit pointless for labdas like that . This happens for all multiline lambdas in subscriptions for example. You can test this in SpineViewModel.cs

The formatter is somewhat limited when it comes to lambdas in invocations. You get this result because the setting for invocations was set to "chop if long or multiline", which chopped the lambda up like this.

Still happens, should that commit have fixed it?
It is not the end of the world tbh

Copy link
Contributor

@Al12rs Al12rs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with this

@erri120 erri120 merged commit 0cfb2ff into Nexus-Mods:main Feb 19, 2024
1 check passed
@erri120 erri120 deleted the fix/945-formatting branch February 19, 2024 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants