-
Notifications
You must be signed in to change notification settings - Fork 207
Open
Labels
Milestone
Description
In swift, we use switch in enums to populate computed properties.Rules should be created to cleanup any enum entry from all such variables.
example:
Before
enum TestEnum {
case one
case two
case three
var v1: String {
switch self {
case .one:
return "one"
case .two:
return "two"
case .three:
return "three"
}
}
}
After
enum TestEnum {
case two
case three
var v1: String {
switch self {
case .two:
return "two"
case .three:
return "three"
}
}
}