Skip to content

Feature request: Enforce all blocks with brackets as optional configuration #988

@iainnash

Description

@iainnash

Some regard avoiding single-line implicit brackets for conditionals a good coding practice for solidity.

Eg:

/// undesirable
if (balance == 0) revert NoBalance();

// more clear
if (balance == 0) {
  revert NoBalance();
}

It would be great to make this an optional prettier solidity feature to force all single-line statements to use brackets for code readability.

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