solhint
solhint copied to clipboard
no-empty-blocks false positive in inherited constructor
Hello! I'm migrating from ethlint and found the same issue that I reported there some time ago :)
In an inherited contract, the constructor often just calls the base constructor, and its block is empty. This should be an exception from the no-empty-block rule, but now it causes a warning Code contains empty block.
Copied from the official example.
contract Base {
uint x;
constructor(uint _x) { x = _x; }
}
// or through a "modifier" of the derived constructor.
contract Derived2 is Base {
constructor(uint _y) Base(_y * _y) {}
}
Yes, this makes a lot of sense! Should be easy to implement. I can give you some pointers if you feel like giving this a shot. If not, I'll try to fix it soon.
same issue here.
Ethlint did address this issue duaraghav8/Ethlint/issues/264
Any thoughts on this one?
Same here as well.
@fvictorio any progress here?