The {“extends”: “solhint:recommended”} property in a configuration file enables this rule.
Explicitly mark visibility in function.
This rule accepts an array of options:
Index | Description | Default Value |
---|---|---|
0 | Rule severity. Must be one of “error”, “warn”, “off”. | warn |
1 | A JSON object with a single property “ignoreConstructors” specifying if the rule should ignore constructors. (Note: This is required to be true for Solidity >=0.7.0 and false for <0.7.0) | {“ignoreConstructors”:false} |
{
"rules": {
"func-visibility": ["warn",{"ignoreConstructors":false}]
}
}
function b() internal { }
function b() external { }
function b() private { }
function b() public { }
constructor() public { }
function b() { }
This rule was introduced in Solhint 2.0.0-alpha.0