-
Notifications
You must be signed in to change notification settings - Fork 1
/
.clippy.toml
25 lines (22 loc) · 1.57 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
allow-print-in-tests = true
allow-dbg-in-tests = true
# https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_methods
disallowed-methods = [
{ path = "std::fs::File::create", reason = "use tycho_storage::FileDb instead" },
{ path = "std::fs::File::create_new", reason = "use tycho_storage::FileDb instead" },
{ path = "std::fs::File::open", reason = "use tycho_storage::FileDb instead" },
{ path = "std::fs::File::options", reason = "use tycho_storage::FileDb instead" },
{ path = "everscale_types::models::Block::load_info", reason = "use `BlockStuff::load_info` to avoid unnecessary deserialization" },
{ path = "everscale_types::models::Block::load_extra", reason = "use `BlockStuff::load_extra` to avoid unnecessary deserialization" },
{ path = "everscale_types::models::BlockExtra::load_custom", reason = "use `BlockStuff::load_custom` to avoid unnecessary deserialization" },
]
disallowed-types = [{ path = "std::fs::OpenOptions", reason = "use tycho_storage::FileDb instead" }]
# https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_invalid_type
# until #[must_not_suspend] is stabilized https://github.com/rust-lang/rust/issues/83310
# as advised in (not merged) https://github.com/rust-lang/rust-clippy/pull/8434
[[await-holding-invalid-types]]
path = "tracing::span::Entered"
reason = "drop span guard before `.await` or place your code inside `span.in_scope(|| {..})`"
[[await-holding-invalid-types]]
path = "tracing::span::EnteredSpan"
reason = "drop span guard before `.await` or place your code inside `span.in_scope(|| {..})`"