Skip to content

Bad formatting of lambda with attribute #1548

@sbomer

Description

@sbomer

C# 10 allows lambda expressions to have attributes. dotnet-format seems to force the lambda to be unindented when putting a lambda attribute on a separate line:

Before:

var l =
    [MyAttr]
    () => 0;

After running dotnet-format:

var l =
    [MyAttr]
() => 0;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions