Back to all reviewers

Avoid generic suffixes

cline/cline
Based on 4 comments
Other

Avoid using generic suffixes like "Response", "Result", or "Request" in type names, especially for non-request types. Instead, use semantic names that describe the actual data structure and can be reused throughout the codebase.

Naming Conventions Other

Reviewer Prompt

Avoid using generic suffixes like “Response”, “Result”, or “Request” in type names, especially for non-request types. Instead, use semantic names that describe the actual data structure and can be reused throughout the codebase.

Generic suffixes make types less reusable and create unnecessary coupling to specific API contexts. Semantic names promote code reuse and better express the domain concepts.

Example:

// Avoid
message AvailableTerminalProfilesResponse {
  repeated string profiles = 1;
}

message StringArrayResponse {
  repeated string values = 1;
}

// Prefer
message TerminalProfiles {
  repeated string profiles = 1;
}

message StringArray {
  repeated string values = 1;
}

This approach makes types more generic and reusable across different parts of the codebase, not just in API handlers.

4
Comments Analyzed
Other
Primary Language
Naming Conventions
Category

Source Discussions