Back to all reviewers

Use descriptive names

gravitational/teleport
Based on 9 comments
Go

Choose names that clearly indicate their purpose and behavior rather than using generic or ambiguous terms. Avoid internal abbreviations in user-facing content, ensure function names accurately reflect what they do, and prefer specific descriptive terms over generic ones.

Naming Conventions Go

Reviewer Prompt

Choose names that clearly indicate their purpose and behavior rather than using generic or ambiguous terms. Avoid internal abbreviations in user-facing content, ensure function names accurately reflect what they do, and prefer specific descriptive terms over generic ones.

Examples of improvements:

  • handleWebsocketErrorlogWebsocketError (function only logs, doesn’t handle)
  • value boolcondition bool (more specific parameter meaning)
  • mcp-accessmcp-user (clarifies the actor/role purpose)
  • TeleportFlavor/TeleportPackageTeleportArtifact/TeleportDirectory (clearer distinction)
  • diagnostic.Diagnostic → avoid repetitive package/type names
  • awsicPluginNameHelp containing “AWSIC” → use full “AWS Identity Center integration”

This prevents confusion about functionality, makes code self-documenting, and improves maintainability by making the intent clear to future developers.

9
Comments Analyzed
Go
Primary Language
Naming Conventions
Category

Source Discussions