SwiftFormat icon indicating copy to clipboard operation
SwiftFormat copied to clipboard

Private Properties At The Top Of Class Definition

Open yakushevichsv opened this issue 2 years ago • 1 comments

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.

yakushevichsv avatar Jan 04 '24 17:01 yakushevichsv

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

calda avatar Jan 04 '24 19:01 calda