feat: custom errors lint#12957
Closed
milosdjurica wants to merge 24 commits intofoundry-rs:masterfrom
Closed
Conversation
…i_contract_file_exceptions
Feat/linting interface naming
onbjerg
requested changes
Jan 2, 2026
Member
onbjerg
left a comment
There was a problem hiding this comment.
hi!
please bless the tests as described in the contributing guidelines so the .stderr files are up to date.
also, it seems like this pr has two features/changes which are unrelated, please split those up into other prs so we can review them independently. this should also make the overall diff smaller, making it easier to review.
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Add another linting rule suggesting use of custom errors over empty reverts and usage of strings in revert/require. Checked out from this branch/PR -> #12581
Solution
Not sure if the rule is too demanding, could make it configurable to choose which cases should be linted and which no. For example, lint only
revert(), or lint only reverts and requires when using strings, etc...PR Checklist