-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Labels
T-featureType: featureType: featureT-needs-triageType: this issue needs to be labelledType: this issue needs to be labelled
Description
Component
Forge
Describe the feature you would like
The mixed-case-variable lint rule currently flags variables like marketID, optionID, userID as violations, suggesting they should use mixedCase.
However, keeping common abbreviations in uppercase (ID, URL, URI, API, etc.) is a widely accepted convention in camelCase/mixedCase naming. Writing marketId incorrectly suggests "Id" is a word rather than an abbreviation for "Identifier".
Proposed solution:
Add an exception list for common abbreviations that should remain uppercase when appearing at the end or middle of an identifier:
- ID
- URL
- URI
- API
- JSON, XML, HTML, HTTP, HTTPS
Additional context
Current lint output example:
note[mixed-case-variable]: mutable variables should use mixedCase
--> src/FPMMRouterV2.sol:35:11
|
35 | uint256 marketID,
| --------
This creates noise in lint output for codebases following the uppercase abbreviation convention.
Metadata
Metadata
Assignees
Labels
T-featureType: featureType: featureT-needs-triageType: this issue needs to be labelledType: this issue needs to be labelled
Type
Projects
Status
Backlog