Choose clear, consistent, and non-redundant names for identifiers across the codebase. Follow these guidelines: 1. Use specific, descriptive names that clearly indicate purpose:
Choose clear, consistent, and non-redundant names for identifiers across the codebase. Follow these guidelines:
// Bad
type SegmentSize = u32;
// Good
type WalSegmentSize = u32; // Clearly indicates this is for WAL segments
// Bad: Mixing naming patterns
struct PostHogLocalEvaluationFlag {}
struct LocalEvaluationResponse {}
// Good: Consistent naming
struct LocalEvaluationFlag {}
struct LocalEvaluationResponse {}
// Bad: Redundant context
pub http_client: reqwest::Client // In HTTP-specific module
// Good: Clean, contextual naming
pub client: reqwest::Client
// Bad: Ambiguous naming
async fn from_request_parts(_: &mut Parts, state: &Arc<ComputeNode>)
// Good: Clear purpose
async fn from_request_parts(_: &mut Parts, compute: &Arc<ComputeNode>)
This standard helps maintain code readability and reduces confusion during code review and maintenance.
Enter the URL of a public GitHub repository