Back to all reviewers

Names express clear intent

JetBrains/kotlin
Based on 11 comments
Kotlin

Choose names that clearly express intent and follow established conventions. Prefer explicit, descriptive names over abbreviations or ambiguous terms. Align with platform-specific naming patterns and maintain consistency with existing codebase conventions.

Naming Conventions Kotlin

Reviewer Prompt

Choose names that clearly express intent and follow established conventions. Prefer explicit, descriptive names over abbreviations or ambiguous terms. Align with platform-specific naming patterns and maintain consistency with existing codebase conventions.

Key guidelines:

  • Use full descriptive names instead of abbreviations (e.g., BREADTH_FIRST over BFS)
  • Follow platform naming conventions (e.g., reifiedTypeParameters for properties, getReifiedTypeParameters() for functions in Kotlin)
  • Choose names that accurately reflect the variable’s purpose (e.g., argumentType instead of typeArgument)
  • Avoid terms that conflict with language keywords or have special meaning (e.g., use child instead of inner)
  • Maintain consistency with similar names in the codebase

Example:

// Incorrect
enum class WalkAlgorithm {
    BFS,  // Abbreviated
    DFS   // Abbreviated
}

// Correct
enum class WalkAlgorithm {
    BREADTH_FIRST,  // Explicit
    DEPTH_FIRST    // Explicit
}
11
Comments Analyzed
Kotlin
Primary Language
Naming Conventions
Category

Source Discussions