Open michzio opened 3 years ago
Perhaps a special case for var body: some View
where import SwiftUI
is present? Similar to how ibOutlet
can be configured separately from instanceProperties
.
For example, at my company we'd want something like this:
type_contents_order:
order: [
["case"],
["type_alias", "associated_type", "subtype", "type_property", "instance_property"],
["ib_outlet"],
["ib_inspectable"],
["initializer", "deinitializer"],
["swiftui_body"], # <-------- NEW
["type_method"],
["subscript"],
["view_life_cycle_method"],
["ib_action"],
["other_method"]
]
Agreed, with SwiftUI taking off, and a natural evolution/upgrade to SwiftUI coming in WWDC around the corner, this would be a very timely update!
Any updates on this? This is a particularly annoying issue for my team. We like the rule and don’t want to disable it entirely, but having to mark our Views with disable comments every time is a bit annoying, especially since we have our scans set strict.
Still no update?
I think for SwiftUI views such order should be supported by default Or there should be possibility to exclude some content types from ordering like only initializers to enable random placing.