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
Add a lint for assert_throws and promise_rejects #21294
Conversation
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 with some nits (please address before landing)
What is the performance impact of this? Historically adding large numbers of items here has been problematic, given we scan through the entire list each time. |
I'm not sure although since @bzbarsky is actively working through the backlog, I'm also not that worried. I agree that the code here highly suboptimal… |
Basically, once #21286 merges I'll be able to put up my pr to get rid of most of the callsites for |
@jgraham With Boris' many changes over the last few days, I think the files added to the lint can be pared down significantly here now! :) |
So FWIW I measured the perf impact of this and we're so comically slow parsing HTML that nothing else makes a meaningful difference. With an updated list with bz's changes for |
96d610a
to
8521a82
Compare
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, though Boris may have changed your whitelist yet again with their latest promise_rejects PR ;)
This adds a rather large number of existing uses to the allow list
8521a82
to
beeae99
Compare
This adds a rather large number of existing uses to the allow list