I like to have a single empty line in between logical blocks, and two empty lines in between functions, at the top of a class, and at the bottom of a class (between the last function and the class's closing bracket).
In order not to get the warning about having too much vertical whitespace, I had to customize to the rule to allow up to two lines, but that is of course not specific to inside and outside of functions, so SL won't catch such inconsistencies.
It would be nice to be able to customize this.
Example:
// MARK: Life Cycle
override func viewDidLoad() {
super.viewDidLoad()
let myButton = Button
let myTable = Table
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
let myButton = Button
let myTable = Table
}
That's absolutely something I'd be in favor of allowing configuring. Is this something you'd be interested in contributing yourself or are you asking for someone else to build this? I'm happy to point you in the right direction if you're unsure where to start.
I’m very interested in helping out and unsure where to start just as much 😄
Thanks
—
On Dec 24, 2018, at 5:09 AM, JP Simard notifications@github.com wrote:
That's absolutely something I'd be in favor of allowing configuring. Is this something you'd be interested in contributing yourself or are you asking for someone else to build this? I'm happy to point you in the right direction if you're unsure where to start.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/realm/SwiftLint/issues/2526#issuecomment-449683691, or mute the thread https://github.com/notifications/unsubscribe-auth/ASWtSUiH4hka4LCu-Fqrh_9Cctk1rGD2ks5u8FNvgaJpZM4ZgDhp.
Here's roughly the steps you'd take to build this:
vertical_whitespace rule are defined.This issue has been automatically marked as stale because it has not had any recent activity. Please comment to prevent this issue from being closed. Thank you for your contributions!
Commenting to avoid this issue from being closed since an issue I'm watching for a feature I'd love to have.
Most helpful comment
Commenting to avoid this issue from being closed since an issue I'm watching for a feature I'd love to have.