-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathclippy.toml
More file actions
20 lines (18 loc) · 1.24 KB
/
clippy.toml
File metadata and controls
20 lines (18 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
allow-unwrap-in-tests = true
allow-expect-in-tests = true
allow-print-in-tests = true
await-holding-invalid-types = [
{ path = "bitwarden_crypto::KeyStoreContext", reason = """
Contains a RwLock guard that will limit concurrency and even deadlock when held across await points.
Instead, prefer to hold a reference to bitwarden_core::KeyStore and use its encrypt/decrypt methods directly.
If you require access to KeyStoreContext, create short-lived KeyStoreContext instances as needed.
""" },
{ path = "tracing::span::EnteredSpan", reason = """Holding a span across await points leads to incorrect traces. Instead, the instrument macro should be used or the span should be exited before the await and re-entered afterward.""" },
]
disallowed-macros = [
{ path = "log::trace", reason = "Use tracing for logging needs", replacement = "tracing::trace" },
{ path = "log::debug", reason = "Use tracing for logging needs", replacement = "tracing::debug" },
{ path = "log::info", reason = "Use tracing for logging needs", replacement = "tracing::info" },
{ path = "log::warn", reason = "Use tracing for logging needs", replacement = "tracing::warn" },
{ path = "log::error", reason = "Use tracing for logging needs", replacement = "tracing::error" },
]