The {“extends”: “solhint:recommended”} property in a configuration file enables this rule.
Ensure function return parameters are named
This rule accepts an array of options:
Index | Description | Default Value |
---|---|---|
0 | Rule severity. Must be one of “error”, “warn”, “off”. | warn |
1 | An integer specifying the max amount of return values a function can have while still allowing them to remain anonymous | 1 |
{
"rules": {
"named-return-values": ["warn",1]
}
}
function checkBalance(address wallet) external view returns(uint256 retBalance) {}
function checkBalance(address wallet) external view returns(uint256) {}
This rule was introduced in Solhint 3.7.0-rc02