crates/lint/docs/mixed-case-variable.md
Severity: Info
ID: mixed-case-variable
Flags mutable variable names (locals, parameters, mutable state) that do not follow mixedCase.
Reports mutable variable identifiers that contain embedded underscores, start with an uppercase
letter, or otherwise deviate from mixedCase. Leading and trailing underscores are preserved, and
single-character names are not checked.
constant and immutable state variables are not flagged by this lint — see
screaming-snake-case-const and
screaming-snake-case-immutable.
The Solidity style guide recommends mixedCase for mutable variables. Consistent style makes
code easier to scan and review.
uint256 public total_supply;
address Owner;
uint256 public totalSupply;
address owner;
Set mixed_case_exceptions under [lint.lint_specific] in foundry.toml to replace the default
list of allowed uppercase patterns (ERC, URI, ID, URL, API, JSON, XML, HTML, HTTP,
and HTTPS):
[lint.lint_specific]
mixed_case_exceptions = ["ERC", "URI", "NFT"]