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 Forrmatting of Field with lambda and generics #236

Closed
belav opened this issue May 28, 2021 · 2 comments · Fixed by #268
Closed

Improve Forrmatting of Field with lambda and generics #236

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

Comments

@belav
Copy link
Owner

belav commented May 28, 2021

I'm not sure how this should format, but I think this could be improved.

    private static readonly Func<
        SyntaxTrivia,
        bool
    > s_isVisualBasicCommentTrivia =
        (syntaxTrivia) => syntaxTrivia.IsKind(
            VisualBasic.SyntaxKind.CommentTrivia
        );
@belav belav added type:bug Something isn't working area:formatting labels May 28, 2021
@belav belav added this to the 0.9.5 milestone May 28, 2021
@respel
Copy link

respel commented May 28, 2021

Prettier does it like this

private static readonly Func<SyntaxTrivia, boolean> s_isVisualBasicCommentTrivia = (
  syntaxTrivia
) => syntaxTrivia.IsKind(VisualBasic.SyntaxKind.CommentTrivia);

@respel
Copy link

respel commented May 29, 2021

Some other references

// prettier-java
private static readonly Func<SyntaxTrivia, boolean> s_isVisualBasicCommentTrivia = (syntaxTrivia) => 
  syntaxTrivia.IsKind(VisualBasic.SyntaxKind.CommentTrivia);
// google-java-format
private static readonly Func<SyntaxTrivia, boolean> s_isVisualBasicCommentTrivia = 
    (syntaxTrivia) => syntaxTrivia.IsKind(VisualBasic.SyntaxKind.CommentTrivia);

@belav belav modified the milestones: 0.9.5, 0.9.6 May 31, 2021
@belav belav changed the title Field with lambda Improve Forrmatting of Field with lambda and generics 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