Skip to content

If statement in one line is not being prettified #50

@fvictorio

Description

@fvictorio

A contract like this:

contract test {
  function fun(uint256 a) returns (address b) {
    if (a < 0) b = 0x67; else if (a == 0) b = 0x12; else b = 0x78;
  }
}

is prettified like this:

contract test {
  function fun(uint256 a) returns(address b) {
    if (a < 0) b = 0x67; else if (a == 0) b = 0x12; else b = 0x78;
  }
}

Almost no changes.

I'm not sure what is the best output here. Should we add the braces or is that too opinionated?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions