facebook pixelKotlin Static Analysis Rules
BACK TO LIST

Kotlin rules

Codiga provides multiple set of rules for 12+ languages. Below we provide a link and a description for all the rules supported by our platform. Note that not all the rules are being listed and described below.

detekt.MemberNameEqualsClassName

Best practice
Medium

Name confusion

detekt.NestedBlockDepth

Best practice
Medium

Function nested too deeply.

detekt.ThrowsCount

Best practice
Medium

Too many throw statements in function.

detekt.TopLevelPropertyNaming

Best practice
Medium

Top level constant names should match the pattern: [A-Z][\_A-Z0-9]*

detekt.UnnecessaryAbstractClass

Best practice
Medium

An abstract class without a concrete member can be refactored to an interface.

detekt.EmptyInitBlock

Best practice
Medium

Reports empty init expressions. Empty blocks of code serve no purpose and should be removed.

Learn more

detekt.PrintStackTrace

Best practice
Medium

Instead of simply printing a stacktrace a better logging solution should be used.