-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
New Lint: blacklisted_method #6073
Comments
Should only the usage be blacklisted or also the definition? |
We were mostly looking at usage. I can pick it up too. |
Apparently we don't use the term "blacklist" anymore - #5896 . Maybe choose something else if you don't want someone to come along and rename it. |
Ok I vibe with that. Would |
The other PR used the term 'disallowed' so maybe go with |
Many thanks! I will go with that, then. |
What it does
Blacklist MethodDisallowed Method (see #5896)What does this lint do?
Disallows certain methods, as defined in
clippy.toml
Categories (optional)
Checks for method calls of specified methods
For example:
SomeStruct::bad_method
SomeTrait::bad_method
Drawbacks
This might take some significant overhead to implement (regex or some manual string parsing), and the main purpose would probably be to patch in temporary lints, so it might not be super useful.
Example
results in a lint
The text was updated successfully, but these errors were encountered: