nicklockwood / SwiftFormat

A command-line tool and Xcode Extension for formatting Swift code
MIT License
7.63k stars 623 forks source link

Format rule --allman false #1660

Closed CaramelHeaven closed 3 months ago

CaramelHeaven commented 3 months ago

What is the rule which format my brace at new line?

I have --allman false but this is not work, when I want to format my guard\if statement with 2+ conditions I will get { at new line, example

guard boolCondition,
      anotherCondition else
{
    return nil
}

If i have 1 condition everything is fine

guard boolCondition else {
    return nil
}

Also, I have --guardelse same-line

nicklockwood commented 3 months ago

This is the wrapMultilineStatementBraces rule. Use

--disable wrapMultilineStatementBraces

to turn it off.

CaramelHeaven commented 3 months ago

Thanks you very much, sir. Have a good day