Skip to content
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

Merged
merged 2 commits into from Oct 24, 2023

Conversation

zanieb
Copy link
Member

@zanieb zanieb commented Oct 24, 2023

Supersedes #8176
Closes #8174

Test plan

Old snapshot contains the new / unmatched V code
New snapshot contains no V prefixed codes

@zanieb zanieb added rule Implementing or modifying a lint rule configuration Related to settings and configuration labels Oct 24, 2023
@github-actions
Copy link

github-actions bot commented Oct 24, 2023

PR Check Results

Ecosystem

✅ ecosystem check detected no changes.

|| settings
.external
.iter()
.any(|external| code.starts_with(external))
Copy link
Member

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.

Copy link
Member

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.)

Copy link
Member Author

Choose a reason for hiding this comment

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

Okee

@zanieb zanieb enabled auto-merge (squash) October 24, 2023 22:18
@zanieb zanieb merged commit 6f31e9c into main Oct 24, 2023
15 checks passed
@zanieb zanieb deleted the zanie/external-prefix branch October 24, 2023 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration Related to settings and configuration rule Implementing or modifying a lint rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request: external also matching prefixes
2 participants