KT.UNNECESSARY_INHERITANCE

Unnecessary super type

This rule reports unnecessary super types. Inheriting from Any or Object is unnecessary and should simply be removed.

Noncompliant Code

Copy
class A : Any()
class B : Object()

The content on this page is adapted from the Detekt Docs. Copyright ©2022 The Detekt Team. All rights reserved. https://detekt.dev/comments.html