Skip to content

Add rules for enum cleanup #399

@Satyam1749

Description

@Satyam1749

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"
      }
   }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions