Skip to content

any way to automatically add braces for single line statement? #56

@fyears

Description

@fyears

Any way to automatically add braces for single line code inside if or something like that?

For the source code like this:

if (TRUE)
  a = 1
b = 2

Current default result for tidy_source():

if (TRUE) a = 1
b = 2

Expected formatted result (of the requested feature):

if (TRUE) {
  a = 1
}
b = 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions