Skip to content

Match rule prefixes from external codes setting in unused-noqa#8177

Merged
zanieb merged 2 commits intomainfrom
zanie/external-prefix
Oct 24, 2023
Merged

Match rule prefixes from external codes setting in unused-noqa#8177
zanieb merged 2 commits intomainfrom
zanie/external-prefix

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 force-pushed the zanie/external-prefix branch from 9379989 to 4ed19d6 Compare October 24, 2023 18:04
@zanieb zanieb added rule Implementing or modifying a lint rule configuration Related to settings and configuration labels Oct 24, 2023
@github-actions
Copy link
Contributor

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 force-pushed the zanie/external-prefix branch from 87874f2 to 42dce59 Compare October 24, 2023 22:18
@zanieb zanieb enabled auto-merge (squash) October 24, 2023 22:18
@zanieb zanieb merged commit 6f31e9c into main Oct 24, 2023
@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