Skip to content

Review c# 10 feature: attributes on lambdas #162

Open

Description

@bjornhellander

Review how the analyzers and code fixes handle attributes on lambdas, lambda parameters and lambda return values, e.g. [A] (x) => x and ([A] int x) => x.
See https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/lambda-expressions#attributes

Things to check:

  • Attribute rules: SA1133 (combined attributes), SA1134 (attributes on their own line, which probably shouldn't apply to inline lambdas), SA1137 indentation.
  • Spacing after ] before the parameter list (SA1008, SA1017).
  • SA1130 code fix and SA1206 with attributes present.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions