forked from databendlabs/databend
-
Notifications
You must be signed in to change notification settings - Fork 1
/
clippy.toml
40 lines (32 loc) · 2.64 KB
/
clippy.toml
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
38
39
40
disallowed-methods = [
{ path = "std::panic::catch_unwind", reason = "Please use `common_base::runtime::catch_unwind` instead." },
{ path = "futures::FutureExt::catch_unwind", reason = "Please use `common_base::runtime::CatchUnwindFuture` instead." },
{ path = "num_traits::sign::Signed::is_positive", reason = "This returns true for 0.0 but false for 0." },
{ path = "num_traits::sign::Signed::is_negative", reason = "This returns true for -0.0 but false for 0." },
{ path = "num_traits::sign::Signed::signum", reason = "This returns 1.0 for 0.0 but 0 for 0." },
{ path = "tokio::spawn", reason = "Please use `databend_common_base::runtime::spawn` instead." },
{ path = "tokio::task::spawn", reason = "Please use `databend_common_base::runtime::spawn` instead." },
{ path = "tokio::runtime::Handle::spawn", reason = "Please use `databend_common_base::runtime::spawn` instead." },
{ path = "tokio::runtime::Runtime::spawn", reason = "Please use `databend_common_base::runtime::Runtime::spawn` instead." },
{ path = "tokio::task::spawn_local", reason = "Please use `databend_common_base::runtime::spawn_local` instead." },
{ path = "tokio::runtime::Handle::block_on", reason = "Please use `databend_common_base::runtime::block_on` instead." },
# { path = "tokio::runtime::Runtime::block_on", reason = "Please use `databend_common_base::runtime::Runtime::block_on` instead." },
{ path = "tokio::task::spawn_blocking", reason = "Please use `databend_common_base::runtime::spawn_blocking` instead." },
{ path = "tokio::runtime::Handle::spawn_blocking", reason = "Please use `databend_common_base::runtime::spawn_blocking` instead." },
{ path = "tokio::runtime::Runtime::spawn_blocking", reason = "Please use `databend_common_base::runtime::Runtime::spawn_blocking` instead." },
{ path = "std::thread::spawn", reason = "Please use `databend_common_base::runtime::Thread::spawn` instead." },
]
disallowed-types = [
{ path = "once_cell::sync::Lazy", reason = "Please use `std::sync::LazyLock` instead." },
{ path = "tokio::task::Builder", reason = "Disallowed types, please remove it." },
{ path = "tokio::task::LocalSet", reason = "Disallowed types, please remove it." },
{ path = "tokio::task::join_set::JoinSet", reason = "Disallowed types, please remove it." },
{ path = "tokio::task::join_set::Builder", reason = "Disallowed types, please remove it." },
]
disallowed-macros = [
{ path = "lazy_static::lazy_static", reason = "Please use `std::sync::LazyLock` instead." },
]
avoid-breaking-exported-api = true
too-many-arguments-threshold = 10
upper-case-acronyms-aggressive = false
enum-variant-size-threshold = 200