Choose specific, descriptive names for identifiers that accurately reflect their purpose and behavior. Avoid generic terms or ambiguous names that could lead to confusion. Names should be self-documenting and convey precise meaning.
Choose specific, descriptive names for identifiers that accurately reflect their purpose and behavior. Avoid generic terms or ambiguous names that could lead to confusion. Names should be self-documenting and convey precise meaning.
Key guidelines:
Example - Improving name specificity:
// โ Ambiguous or generic names
class AiRelatedInformation { }
function isPath(string: string) { }
interface SearchOptions { }
// โ
Specific, semantic names
class AiSearchSettingKeysProvider { }
function isPathLike(text: string) { }
interface RipgrepTextSearchOptions { }
This helps prevent confusion, makes code more self-documenting, and reduces the need for additional clarifying comments.
Enter the URL of a public GitHub repository