`explicit-types` autofix issues
noisekit opened this issue · 3 comments
noisekit commented
After applying the rule to synthetix v3 codebase few issues were observed
- Parser crashes on syntax like
type(uint).max
andint(_price)
becausetypeNameNode.typeName
isundefined
in this bit of code:fixer.replaceTextRange( typeNameNode.typeName.range, this.isExplicit ? EXPLICIT_TYPES[configFileIndex] : IMPLICIT_TYPES[configFileIndex] )
- Arrays are getting lost:
uint[] memory result;
is transformed intouint256 memory result;
- Mappings are getting lost:
mapping(address => uint)
is transformed intouint256
Some of the manual rollbacks can be seen in this commit Synthetixio/synthetix-v3@4295243
dbale-altoros commented
thanks a lot @noisekit for this and sorry for the delay
I will take a look at this!
dbale-altoros commented
noisekit commented
Thanks. Will wait for the next release 🙏