-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy path.clippy.toml
More file actions
27 lines (24 loc) · 1.57 KB
/
.clippy.toml
File metadata and controls
27 lines (24 loc) · 1.57 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
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::fs::Dir instead" },
{ path = "std::fs::File::create_new", reason = "use tycho_storage::fs::Dir instead" },
{ path = "std::fs::File::open", reason = "use tycho_storage::fs::Dir instead" },
{ path = "std::fs::File::options", reason = "use tycho_storage::fs::Dir instead" },
{ path = "tycho_types::models::Block::load_info", reason = "use `BlockStuff::load_info` to avoid unnecessary deserialization" },
{ path = "tycho_types::models::Block::load_extra", reason = "use `BlockStuff::load_extra` to avoid unnecessary deserialization" },
{ path = "tycho_types::models::BlockExtra::load_custom", reason = "use `BlockStuff::load_custom` to avoid unnecessary deserialization" },
]
disallowed-types = [
{ path = "std::fs::OpenOptions", reason = "use tycho_storage::fs::Dir 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(|| {..})`"