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

Deprecate the term "blacklist" from lints #7582

Closed
rpbeltran opened this issue Aug 17, 2021 · 6 comments
Closed

Deprecate the term "blacklist" from lints #7582

rpbeltran opened this issue Aug 17, 2021 · 6 comments

Comments

@rpbeltran
Copy link

Many companies and open source projects have been transitioning phrases like "blacklist/whitelist" into "blocklist/allowlist" or similar. There is also precedent for this within Rust itself as in these changes in Rust Bindgen: rust-lang/rust-bindgen#1812.

With that in mind, the blacklisted_names lint seems like it could stand to be renamed to blocklisted_name. I'm not very familiar with the current strategy used for deprecation within this project, but it seems like introducing blocklisted_name as a synonym and modifying the warning messages to use this name would be a good approach for now that preserves backwards compatibility.

@ghost
Copy link

ghost commented Aug 17, 2021

We had a PR for this once that went stale - #5896 . It has instructions etc.

@rpbeltran
Copy link
Author

@mikerite thanks! That's super useful. I'll use that as a reference and try to get a new PR started soon.

@xFrednet
Copy link
Member

This seems like a reasonable change to me and would go along with changes in other repos. Most team members already stated their support in #5896, it should therefore be safe to continue with this.

@rpbeltran Could you mention the Clippy team in the PR once you created it? You can just add an cc: @rust-lang/clippy at the end of the PR description. 🙃

@jyn514
Copy link
Member

jyn514 commented Aug 26, 2021

With that in mind, the blacklisted_names lint seems like it could stand to be renamed to blocklisted_name.

The PR @mikerite mentioned used "disallowed_names" instead, I think that's both more clear and less likely to be controversial.

bors added a commit that referenced this issue Jul 29, 2022
…shearth

Remove "blacklist" terminology

Picking up where #5896 left off, this renames the `blacklisted_name` lint to `disallowed_names` (pluralised for compliance with naming conventions).  The old name is still available though is deprecated (both in the lint name, and in the TOML configuration file).

This has been proposed/requested a few times, most recently in #7582 where `@xFrednet` suggested pinging the Clippy team when a PR was created hence...

cc: `@rust-lang/clippy`

changelog: [`disallowed_names`] lint replaces `blacklisted_name`
@yerke
Copy link
Contributor

yerke commented Aug 1, 2022

I think this issue can be closed now that #8974 is merged.

@xFrednet
Copy link
Member

xFrednet commented Aug 1, 2022

Agreed. @yerke thank you for pointing that out and everyone else that participated. 🙃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants