-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathclippy.toml
More file actions
37 lines (32 loc) 路 2.64 KB
/
Copy pathclippy.toml
File metadata and controls
37 lines (32 loc) 路 2.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# https://doc.rust-lang.org/nightly/clippy/lint_configuration.html
absolute-paths-allowed-crates = ["diesel"]
absolute-paths-max-segments = 3
allow-dbg-in-tests = true
allow-unwrap-in-tests = true
allow-unwrap-types = []
allow-expect-in-tests = true
allow-indexing-slicing-in-tests = true
allow-panic-in-tests = true
cognitive-complexity-threshold = 25
disallowed-methods = [
# https://docs.rs/futures/latest/futures/channel/mpsc/fn.unbounded.html
{ path = "futures::channel::mpsc::unbounded", reason = "unbounded channels can lead to unbounded memory usage", replacement = "futures::channel::mpsc::channel", allow-invalid = true },
# https://docs.rs/futures-channel/latest/futures_channel/mpsc/fn.unbounded.html
{ path = "futures_channel::mpsc::unbounded", reason = "unbounded channels can lead to unbounded memory usage", replacement = "futures_channel::mpsc::channel", allow-invalid = true },
# https://doc.rust-lang.org/std/sync/mpsc/fn.channel.html
{ path = "std::sync::mpsc::channel", reason = "unbounded channels can lead to unbounded memory usage", replacement = "std::sync::mpsc::sync_channel", allow-invalid = true },
# https://docs.rs/tokio/latest/tokio/sync/mpsc/fn.unbounded_channel.html
{ path = "tokio::sync::mpsc::unbounded_channel", reason = "unbounded channels can lead to unbounded memory usage", replacement = "tokio::sync::mpsc::channel", allow-invalid = true },
]
disallowed-macros = [
# https://docs.rs/futures/latest/futures/macro.select.html
{ path = "futures::select", reason = "https://blog.yoshuawuyts.com/futures-concurrency-3", replacement = "futures_concurrency::stream::Merge::merge", allow-invalid = true },
# https://docs.rs/futures/latest/futures/macro.select_biased.html
{ path = "futures::select_biased", reason = "https://blog.yoshuawuyts.com/futures-concurrency-3", replacement = "futures_concurrency::stream::Merge::merge", allow-invalid = true },
# https://docs.rs/futures-util/latest/futures_util/macro.select.html
{ path = "futures_util::select", reason = "https://blog.yoshuawuyts.com/futures-concurrency-3", replacement = "futures_concurrency::stream::Merge::merge", allow-invalid = true },
# https://docs.rs/futures-util/latest/futures_util/macro.select_biased.html
{ path = "futures_util::select_biased", reason = "https://blog.yoshuawuyts.com/futures-concurrency-3", replacement = "futures_concurrency::stream::Merge::merge", allow-invalid = true },
# https://docs.rs/tokio/latest/tokio/macro.select.html
{ path = "tokio::select", reason = "https://blog.yoshuawuyts.com/futures-concurrency-3", replacement = "futures_concurrency::stream::Merge::merge", allow-invalid = true },
]