Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

New rule proposal: Curly braces must not be omitted when parent expression spans multiple lines #1488

Copy link
Copy link
@alxru

Description

@alxru
Issue body actions

Category: Layout
Rule: Curly braces must not be omitted when parent expression spans multiple lines.
Rationale: Improve readability and maintainability of the code (when SA1503 is off).
See also: SA1503:CurlyBracketsMustNotBeOmitted and SA1519:CurlyBracketsMustNotBeOmittedFromMultiLineChildStatement

Bad:

if (alpha == beta &&
    beta == gamma)
    alpha = delta;

Good:

if (alpha == beta &&
    beta == gamma)
{
    alpha = delta;
}
jnm2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.