CWE IDs mapped to Klocwork Kotlin checkers

ID Checker name and description
252

KT.IGNORED_RETURN_VALUE   Function, annotated with either @CheckReturnValue or @CheckResult returns value which is not used

396

KT.TOO_GENERIC_EXCEPTION_CAUGHT   Catch block for exceptions that have a type that is too generic

397

KT.TOO_GENERIC_EXCEPTION_THROWN   Thrown exception that have a type that is too generic

570

KT.EQUALS_ALWAYS_RETURNS_TRUE_OR_FALSE   Method equals() always return true or false

571

KT.EQUALS_ALWAYS_RETURNS_TRUE_OR_FALSE   Method equals() always return true or false

581

KT.EQUALS_WITH_HASH_CODE_EXIST   Method hashCode() is not overridden

584

KT.RETURN_FROM_FINALLY   Return statement in finally blocks

704

KT.SAFE_CAST   Casts should be replaced with safe casts

1069

KT.EMPTY_CATCH_BLOCK   Empty 'catch' block

1071

KT.EMPTY_CATCH_BLOCK   Empty 'catch' block

KT.EMPTY_CLASS_BLOCK   Empty class

KT.EMPTY_DEFAULT_CONSTRUCTOR   Empty default constructor

KT.EMPTY_DO_WHILE_BLOCK   Empty 'do/while' loop

KT.EMPTY_ELSE_BLOCK   Empty 'else' block

KT.EMPTY_FINALLY_BLOCK   Empty 'finally' block

KT.EMPTY_FOR_BLOCK   Empty 'for' loop

KT.EMPTY_FUNCTION_BLOCK   Empty function

KT.EMPTY_IF_BLOCK   Empty 'if' block

KT.EMPTY_INIT_BLOCK   Empty 'init' expression

KT.EMPTY_KT_FILE   Empty Kotlin (.kt) file

KT.EMPTY_SECONDARY_CONSTRUCTOR   Empty secondary constructor

KT.EMPTY_TRY_BLOCK   Empty 'try' block

KT.EMPTY_WHEN_BLOCK   Empty 'when' expression

KT.EMPTY_WHILE_BLOCK   Empty 'while' expression

1099

KT.CLASS_NAMING   Class or Object name does not follow the specified naming convention

KT.CONSTRUCTOR_PARAMETER_NAMING   Constructor parameter names do not follow the specified naming convention

KT.ENUM_NAMING   Enum name does not follow the specified naming convention

KT.FUNCTION_PARAMETER_NAMING   Function parameter names do not follow the specified naming convention

KT.LAMBDA_PARAMETER_NAMING   Lambda parameter names do not follow the specified naming convention

KT.OBJECT_PROPERTY_NAMING   Property names inside objects do not follow the specified naming convention

KT.TOP_LEVEL_PROPERTY_NAMING   Top level constant does not follow the specified naming convention

KT.VARIABLE_NAMING   Variable name does not follow the specified naming convention

1113

KT.COMMENT_OVER_PRIVATE_FUNCTION   Comments and documentation added to private functions

KT.COMMENT_OVER_PRIVATE_PROPERTY   Comments and documentation above private properties

KT.FORBIDDEN_COMMENT   Comment which is forbidden in the codebase

1114

KT.TRAILING_WHITESPACE   Line with trailing whitespace

1121

KT.COMPLEX_METHOD   Complex method with high Cyclomatic Complexity

1124

KT.NESTED_BLOCK_DEPTH   Excessive nesting depth in functions

KT.NESTED_SCOPE_FUNCTIONS   Nested scope functions