-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
fix: exit check task with exit code 1 when solhint raises errors #5556
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: 570f79d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
I think we bump to version I think we leave off of replicating the cli behaviour around warnings. This can be added later if there is demand. |
33c1b60
to
cc79bd7
Compare
packages/hardhat-solhint/test/fixture-projects/no-errors-project/contracts/Greeter.sol
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is looking good. I left two requests:
- splitting the changeset into two parts
- updating the exit technique if there are errors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Congrats, your important contribution to this open-source project has earned you a GitPOAP! GitPOAP: 2024 Hardhat Contributor: Head to gitpoap.io & connect your GitHub account to mint! Learn more about GitPOAPs here. |
Resolves #5057
This PR modifies the
hardhat-solhint
plugin.It changes the
check
task behaviour. After the changes, whensolhint
reports any errors (note, this does not apply to warnings), the task exists with error code 1.The updated behaviour is in line with how
solhint
behaves as a standalone CLI tool.Please note that this is, currently, a breaking change since it's modifying solhint plugin/check task behaviour. I will update the changesets and mark the PR as "ready for review", once we align on the open questions I outline below.
Open Questions
Should we updateYessolhint
to the most recent versionv5.0.2
?Should we control the newly added behaviour via configuration? If so, we could also support failing the check task when a threshold of warnings is crossed. In solhint, this is controlled via command line options.No (not yet, at least)