KT.UNNECESSARY_ABSTRACT_CLASS
Unnecessary abstract class
This rule inspects abstract classes. In case an abstract class does not have any concrete members it should be refactored into an interface. Abstract classes which do not define any abstract members should instead be refactored into concrete classes.
Noncompliant Code
Copy
abstract class OnlyAbstractMembersInAbstractClass { // violation: no concrete members
abstract val i: Int
abstract fun f()
}
abstract class OnlyConcreteMembersInAbstractClass { // violation: no abstract members
val i: Int = 0
fun f() { }
}