Expand description
Naming-convention helpers shared by Solidity lints.
Each check_* returns Some(suggestion) when s violates the convention,
None when it already matches. Leading/trailing underscores are preserved.
Functionsยง
- check_
mixed_ case Some(suggestion)ifsis notmixedCase. Pure check โ domain exceptions (test-prefixes, allowed patterns, โฆ) live in the lint.- check_
pascal_ case Some(suggestion)ifsis notPascalCase.- check_
screaming_ snake_ case Some(suggestion)ifsis notSCREAMING_SNAKE_CASE.- emit_
rename - Emits
lintatspanwith a machine-applicable rename toexpected. - has_
acronym_ exception - True if
sis<pre><pattern><digits><post>for one of the configured acronympatterns(e.g.ERCinrescueERC20Tokens), wherepresatisfiespre_is_validandpostisUpperCamelCase. One preserved leading or trailing underscore is tolerated. - preserve_
underscores ๐ - suggest ๐
- Single-character names are exempt from every convention.