Open jeffywu opened 3 years ago
This seems like a useful feature, and shouldn't be that hard to implement :+1:
Just a heads up for when someone picks this issue to work on it: the Solidity compiler will soon get a new severity level (info
) and SMTChecker will probably switch to using that for some of its messages (https://github.com/ethereum/solidity/issues/11508).
Overview
I'm experimenting with brownie and the SMT checker and one thing I'm noticing is that compiler warnings don't show (SMT checker errors seem to be returned as warnings rather than errors). It looks like this is occuring on these lines: https://github.com/iamdefinitelyahuman/py-solc-x/blob/master/solcx/main.py#L378
Not sure what happens to the return value after here: https://github.com/eth-brownie/brownie/blob/master/brownie/project/compiler/solidity.py#L64
But adding these lines to the above code:
Gives me some values where the severity = 'warning':
Would be nice to have an option to print compiler warnings and maybe fail on them. Happy to work on a PR if someone gives me some pointers on the best place to add such code.
Specification
Basically a cli flag and perhaps a config file parameter to show warnings and fail on warnings, maybe allowing the user to set the severity filter in solcx 🤷🏽 https://github.com/iamdefinitelyahuman/py-solc-x/blob/master/solcx/main.py#L378