nicklockwood / SwiftFormat

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

Private Properties At The Top Of Class Definition #1604

Open yakushevichsv opened 6 months ago

yakushevichsv commented 6 months ago

Is there a way to declare private properties at the top? I mean I would like to have private properties at the top of class definition..

class A {
 //MARK: - Private
 private let item1: Int
 private let item2: Int

//MARK: - Life Cycle...

}

I don't want to see public methods at the top and private properties after that.

calda commented 6 months ago

This is a reasonable idea that I could imagine supporting in the organizeDeclarations rule, but it isn't currently supported