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 Normalize Whitespace for block lambdas #46661

Merged

Conversation

YairHalberstadt
Copy link
Contributor

Fixes #46656

@YairHalberstadt YairHalberstadt requested a review from a team as a code owner August 10, 2020 05:50
@@ -282,7 +282,8 @@ private static int LineBreaksAfterOpenBrace(SyntaxToken currentToken, SyntaxToke
private static int LineBreaksAfterCloseBrace(SyntaxToken currentToken, SyntaxToken nextToken)
{
if (currentToken.Parent is InitializerExpressionSyntax ||
currentToken.Parent.IsKind(SyntaxKind.Interpolation))
currentToken.Parent.IsKind(SyntaxKind.Interpolation) ||
currentToken.Parent?.Parent is ParenthesizedLambdaExpressionSyntax or SimpleLambdaExpressionSyntax)
Copy link
Member

Choose a reason for hiding this comment

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

What about anonymous methods?
Also, can just do is LambdaExpression

};
}
});");
}
Copy link
Member

Choose a reason for hiding this comment

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

Would prefer a theory here. That way if one fails it's trivial to just run that config

@YairHalberstadt YairHalberstadt requested review from CyrusNajmabadi and removed request for a team August 10, 2020 12:44
@333fred 333fred added Area-Compilers Community The pull request was submitted by a contributor who is not a Microsoft employee. labels Aug 12, 2020
@333fred
Copy link
Member

333fred commented Aug 12, 2020

@dotnet/roslyn-compiler for a second review.

@RikkiGibson RikkiGibson requested a review from a team August 15, 2020 21:56
Copy link
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

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

LGTM Thanks (iteration 3)

@jcouv jcouv self-assigned this Aug 17, 2020
@jcouv jcouv merged commit 1919454 into dotnet:master Aug 17, 2020
@ghost ghost added this to the Next milestone Aug 17, 2020
@jcouv
Copy link
Member

jcouv commented Aug 17, 2020

Merged/squashed. Thanks @YairHalberstadt!

@allisonchou allisonchou modified the milestones: Next, 16.8.P3 Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Community The pull request was submitted by a contributor who is not a Microsoft employee.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve NormalizeWhitespace for multi block lambdas
5 participants