protofire / solhint

Solhint is an open-source project to provide a linting utility for Solidity code.
https://protofire.github.io/solhint/
MIT License
1.04k stars 160 forks source link

The `var-name-mixedcase` rule triggers when using `$` as a variable name #452

Closed ernestognw closed 1 year ago

ernestognw commented 1 year ago

Description

Given Solidity allows using a $ as a valid variable identifier, consider the following example:

contract A {
    function example() external pure returns (uint256) {
        uint256 $ = 1;
        return $;
    }
}

The variable $ is marked as Linter: Variable name must be in mixedCase [var-name-mixedcase].

Proposed solution

The library should not throw an error when the variable includes a $

dbale-altoros commented 1 year ago

This is solved in this PR https://github.com/protofire/solhint/pull/465