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

deal with comments and #if's in argument lists #831

Closed
wants to merge 2 commits into from
Closed

Conversation

belav
Copy link
Owner

@belav belav commented Feb 18, 2023

closes #410

Copy link
Collaborator

@shocklateboy92 shocklateboy92 left a comment

Choose a reason for hiding this comment

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

TBH, I'm not sure #831 should be a bug.
It's clear in this case that there's a comma that's in the #if.
But it doesn't really belong to the next parameter, and we've never absorbed that line break in any other circumstance.

IMHO I think the current behavior is better than putting the comma on the same line as the next argument. What do you think?

arguments
is [
{
Expression: ParenthesizedLambdaExpressionSyntax
Copy link
Collaborator

Choose a reason for hiding this comment

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

oooh. Fancy list pattern match syntax 🏖️

Copy link
Owner Author

Choose a reason for hiding this comment

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

that was all rider...

@belav
Copy link
Owner Author

belav commented Feb 25, 2023

I think I'm okay with just not doing this. I ran into it a couple times at work with our new multitargeting but it is super rare. I think there were ~30 instances of it across all of the code in https://github.com/belav/csharpier-repos. It's kinda ugly as is, but also weird with the preceding comma. So let's just not add extra code to deal with the super rare thing when the new formatting is debatable.

@belav belav closed this Feb 25, 2023
@belav belav deleted the if-commas branch February 25, 2023 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When #if starts with comma, it formats oddly
2 participants