-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request to support a "--cov-fail-under" option #610
Comments
Hi @pandichef There is a way. Coverage writes a
Agree this would be nice to have as a built-in option here though... |
Amazing! Thank you! Is there a way to limit |
I think this would need to be done by post-processing the It's a JSON object with outer level keys like: {
"contracts/Greeter.sol" : {
// data
},
"contracts/AnotherContract.sol": {
// etc
}
} You can also specify files and folders to ignore using solidity-coverage's |
Have added documentation about this in #834. I don't think this will be added as a built-in feature so closing for now. |
In pytest, I can add an option called --cov-fail-under that will throw an error to Linux if my test coverage isn't above some threshold. I use this to enforce a high test coverage percentage for CI (via Github Actions).
Can such an option be added to solidity-coverage? If this is currently possible to achieve in some other way, please advise.
I'm using the Hardhat plugin FWIW.
Thanks!
The text was updated successfully, but these errors were encountered: