Skip to content

Indentation of non-finished one-line if-else #290

@gausby

Description

@gausby

Considering how we should indent non-finished one-line-def example:

def name,
  do: :foo

I think it would make sense if single-line-if-else indenting with the following behaviour:

# current
if condition,
do: :foo,
else: :bar

# expected
if condition,
  do: :foo,
  else: :bar

Am I correct in thinking so, or should splitting a one-line conditional like this result in the current behaviour?

I will provide a unit test for the expected behaviour in my example.

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