-
Notifications
You must be signed in to change notification settings - Fork 883
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
Match rule prefixes from external
codes setting in unused-noqa
#8177
Conversation
9379989
to
4ed19d6
Compare
PR Check ResultsEcosystem✅ ecosystem check detected no changes. |
|| settings | ||
.external | ||
.iter() | ||
.any(|external| code.starts_with(external)) |
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.
Since most codes won't match an external, I bet it's better to just do this iteration every time and skip the direct check, but obviously can't say for sure.
It's probably even better to just use a vector instead of a hash set, since we're doing this iteration every time, and the set of externals is gonna tend to be quite small.
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.
(Defer to you as to whether you want to change.)
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.
Okee
87874f2
to
42dce59
Compare
Supersedes #8176
Closes #8174
Test plan
Old snapshot contains the new / unmatched
V
codeNew snapshot contains no
V
prefixed codes