SwiftLint rule to prefer the use of implicit self where it can be used?

149 Views Asked by At

In SwiftLint there is a rule for explicit_self and a rule for redundant_self_in_closure.

But is there a rule would warn for overuse of self?

For instance in this example...

struct FooBar {
  let someValue: String

  func doSomething() {
    print(self.someValue)
  }
}

In this the self. should warn as it isn't preferred/required.

Thanks

0

There are 0 best solutions below