Skip to content

feat: custom errors lint#12957

Closed
milosdjurica wants to merge 24 commits intofoundry-rs:masterfrom
milosdjurica:feat/custom-errors-lint
Closed

feat: custom errors lint#12957
milosdjurica wants to merge 24 commits intofoundry-rs:masterfrom
milosdjurica:feat/custom-errors-lint

Conversation

@milosdjurica
Copy link
Contributor

@milosdjurica milosdjurica commented Dec 30, 2025

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

  • Added Tests
  • Added Documentation
  • Breaking changes

Copy link
Member

@onbjerg onbjerg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@milosdjurica
Copy link
Contributor Author

Hi @onbjerg , sorry for the late response. Opened a new PR containing only changes related to custom errors lint rule. You can check it out here: #13126

Closing this one in favor of that PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants