forked from commonwarexyz/monorepo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclippy.toml
More file actions
23 lines (22 loc) · 1.91 KB
/
clippy.toml
File metadata and controls
23 lines (22 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Disallow futures::channel types - use commonware_utils::channel instead
disallowed-types = [
{ path = "futures::channel::mpsc::Sender", reason = "prefer commonware_utils::channel", allow-invalid = true },
{ path = "futures::channel::mpsc::Receiver", reason = "prefer commonware_utils::channel", allow-invalid = true },
{ path = "futures::channel::mpsc::UnboundedSender", reason = "prefer commonware_utils::channel", allow-invalid = true },
{ path = "futures::channel::mpsc::UnboundedReceiver", reason = "prefer commonware_utils::channel", allow-invalid = true },
{ path = "futures::channel::oneshot::Sender", reason = "prefer commonware_utils::channel", allow-invalid = true },
{ path = "futures::channel::oneshot::Receiver", reason = "prefer commonware_utils::channel", allow-invalid = true },
{ path = "futures_channel::mpsc::Sender", reason = "prefer commonware_utils::channel", allow-invalid = true },
{ path = "futures_channel::mpsc::Receiver", reason = "prefer commonware_utils::channel", allow-invalid = true },
{ path = "futures_channel::mpsc::UnboundedSender", reason = "prefer commonware_utils::channel", allow-invalid = true },
{ path = "futures_channel::mpsc::UnboundedReceiver", reason = "prefer commonware_utils::channel", allow-invalid = true },
{ path = "futures_channel::oneshot::Sender", reason = "prefer commonware_utils::channel", allow-invalid = true },
{ path = "futures_channel::oneshot::Receiver", reason = "prefer commonware_utils::channel", allow-invalid = true },
]
# Disallow direct use of futures select macros - use commonware_macros::select! instead.
# tokio::select is not listed here because our select! macro expands to it, and clippy
# checks after macro expansion.
disallowed-macros = [
{ path = "futures::select", reason = "use commonware_macros::select! instead" },
{ path = "futures::select_biased", reason = "use commonware_macros::select! instead" },
]