facebook pixelCodiga Analysis Kotlin Rules, category best practice
BACK TO LIST

Kotlin rules

Codiga provides multiple sets 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
Warning

Name confusion

detekt.NestedBlockDepth

Best practice
Warning

Function nested too deeply.

detekt.ReturnCount

Best practice
Informational

Function has 3 return statements which exceeds the limit of 2.

detekt.SpreadOperator

Best practice
Informational

In most cases using a spread operator causes a full copy of the array to be created before calling a method which has a very high performance penalty.

detekt.ThrowsCount

Best practice
Warning

Too many throw statements in function.

detekt.TopLevelPropertyNaming

Best practice
Warning

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

detekt.UnnecessaryAbstractClass

Best practice
Warning

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

detekt.EmptyInitBlock

Best practice
Warning

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

Learn more

detekt.UnusedPrivateMember

Best practice
Informational

Function parameter is unused

detekt.PrintStackTrace

Best practice
Warning

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

detekt.EqualsAlwaysReturnsTrueOrFalse

Best practice
Warning

Equals methods should always report if some other object is equal to the current object