constructor-syntax
July 4, 2025 ยท View on GitHub
The {"extends": "solhint:recommended"} property in a configuration file enables this rule.
Description
Constructors should use the new constructor keyword.
Options
This rule accepts a string option for rule severity. Must be one of "error", "warn", "off". Defaults to warn.
Example Config
{
"rules": {
"constructor-syntax": "warn"
}
}
Examples
This rule does not have examples.
Version
This rule was introduced in Solhint 1.2.0