KT.VARIABLE_NAMING

Variable name does not follow the specified naming convention

Reports variable names that do not follow the specified naming convention.

Options

  • variablePattern (default: [a-z][A-Za-z0-9]*)

    naming pattern

  • privateVariablePattern (default: (_)?[a-z][A-Za-z0-9]*)

    naming pattern

  • excludeClassPattern (default: $^)

    ignores variables in classes which match this regex

  • ignoreOverridden (default: True)

    ignores member properties that have the override modifier

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