SonarSource/sonar-dotnet

New Rule T0032: Move the method body to the next line

Opened this issue · 0 comments

Coding style:

When using an arrow property or an arrow method, the => token must be on the same line as the declaration. Regarding the expression body:
for methods: it should be on the same line only for trivial cases: literal or simple identifier. Member access, indexer, invocation, and other complex structures should be on the following line.

public int Method() => lazy.Value; // Noncompliant

public int Method() => 
    lazy.Value; // Compliant