-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
A-lintArea: New lintsArea: New lintsgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy
Description
What it does
Blacklist Method Disallowed Method (see #5896)
What does this lint do?
Disallows certain methods, as defined in clippy.toml
Categories (optional)
- Kind: Nursery
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
# clippy.toml
disallowed-methods = ["Foo::bar", "Baz::bar"]
...
let f = Foo::default();
f.bar();
...
results in a lint
michaelsproul
Metadata
Metadata
Assignees
Labels
A-lintArea: New lintsArea: New lintsgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy