-
Notifications
You must be signed in to change notification settings - Fork 11.3k
/
Copy path.clippy.toml
21 lines (20 loc) · 1.08 KB
/
.clippy.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# cyclomatic complexity is not always useful
cognitive-complexity-threshold = 100
# types are used for safety encoding
type-complexity-threshold = 10000
# big constructors
too-many-arguments-threshold = 20
disallowed-methods = [
{path = "anyhow", reason = "we prefer to use eyre"},
# we use tracing with the log feature instead of the log crate.
{ path = "log::info", reason = "use tracing::info instead" },
{ path = "log::debug", reason = "use tracing::debug instead" },
{ path = "log::error", reason = "use tracing::error instead" },
{ path = "log::warn", reason = "use tracing::warn instead" },
# known to cause blocking issues
{ path = "futures::executor::block_on", reason = "use tokio::runtime::runtime::Runtime::block_on instead"},
# unbounded channels are for expert use only
{ path = "tokio::sync::mpsc::unbounded_channel", reason = "use a bounded channel instead" },
{ path = "futures::channel::mpsc::unbounded", reason = "use a bounded channel instead" },
{ path = "futures_channel::mpsc::unbounded", reason = "use a bounded channel instead" },
]