protocol_property_accessors_order - ApplebaumIan/BitbucketAPI GitHub Wiki
Protocol Property Accessors Order
When declaring properties in protocols, the order of accessors should be get set.
- Identifier: protocol_property_accessors_order
- Enabled by default: Enabled
- Supports autocorrection: Yes
- Kind: style
- Analyzer rule: No
- Minimum Swift compiler version: 3.0.0
- Default configuration: warning
Non Triggering Examples
protocol Foo {
var bar: String { get set }
}
protocol Foo {
var bar: String { get }
}
protocol Foo {
var bar: String { set }
}
Triggering Examples
protocol Foo {
var bar: String { ↓set get }
}