Overview
This rule flags Apex code and metadata that do not follow consistent or standardized naming conventions across the org. While names may technically work, inconsistency in how classes, methods, fields, or other elements are named leads to confusion, poor developer experience, and increased risk of errors.
Clayton classifies this as a Warning because inconsistent naming doesn’t break functionality, but it undermines the clarity, structure, and maintainability of your codebase especially in collaborative or fast-scaling teams.
Why this matters
Inconsistent naming:
Reduces readability - making code harder to navigate and understand.
Slows down development - as teams spend time deciphering naming intent.
Leads to duplication - when developers unknowingly recreate similar objects or logic.
Impacts collaboration - especially across admins, developers, and architects
Makes onboarding harder - as naming patterns don’t clearly reflect purpose or context.
Standard naming acts as a contract across the team it communicates structure, intent, and ownership.
What Triggers This Rule
Code Reviews flags inconsistently named:
Apex Classes and Triggers – e.g., mixing
CamelCase,snake_case, or abbreviations.Methods – unclear names like
process1()or overly generic names likedoStuff().Test Classes – not using the
_Testsuffix or not matching the class they support.Variables – using shorthand, unclear prefixes, or inconsistent casing.
Custom Fields & Objects – missing suffixes like
__c, using unclear abbreviations, or inconsistent word order.Aura Properties – mismatched with their bound templates or controllers.
Recommended approach
Establish and enforce naming conventions across:
Apex - use
PascalCasefor class names (AccountService),camelCasefor variables and methods (calculateDiscount).Custom Metadata - use full words and consistent suffixes (
Renewal_Status__c).Test Classes - match the target class name and append
_Test(AccountService_Test).Triggers - use
ObjectTriggerformat (AccountTrigger).Objects - use descriptive names with consistent prefixing for custom apps or modules.
Use naming patterns that clearly indicate purpose, object, and action.
Summary
Consistent naming conventions reduce confusion and help your codebase scale with your team. Apply clear, standardized naming across all elements to improve readability, reduce duplication, and make collaboration smoother. Code Reviews flags inconsistencies as a Warning to promote a clean, well-structured Salesforce environment.

