Closed PaulRBerg closed 1 year ago
Two things to do here:
1) Update the parser (I already added support for named mapping parameters in it)
2) Open an issue about adding a new rule that suggests using named parameters. This rule will only make sense for solidity >=0.8.18
, so it should be disabled by default, and not included in the recommended preset config.
Agree, a rule would be cool. But I think until the rule gets added, just adding support for the parsing would be helpful.
Hey @fvictorio, do you have any updates on this? My github actions are failing because of this.
Would be great to get support for this!
Also would love this : )
Guys, I created a new rule for this in this PR https://github.com/protofire/solhint/pull/403
Looks like this issue can be closed now, since v3.4.0 includes support for named mapping params 🥳
https://github.com/protofire/solhint/blob/37d9b14883c4aac29fde19e4b0bf15996bda6953/CHANGELOG.md
Solidity v0.8.18 was released earlier this week, and one of the newly introduced features are named parameters in mappings. That means that we can now define mappings like this:
Solhint throws with the following error when it sees the code above: