forked from FuelLabs/data-systems
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.clippy.toml
30 lines (30 loc) · 1.86 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
allow-print-in-tests = true
allow-expect-in-tests = true
allow-unwrap-in-tests = true
allow-dbg-in-tests = true
disallowed-methods = [
{ path = "std::option::Option::map_or", reason = "prefer `map(..).unwrap_or(..)` for legibility" },
{ path = "std::option::Option::map_or_else", reason = "prefer `map(..).unwrap_or_else(..)` for legibility" },
{ path = "std::result::Result::map_or", reason = "prefer `map(..).unwrap_or(..)` for legibility" },
{ path = "std::result::Result::map_or_else", reason = "prefer `map(..).unwrap_or_else(..)` for legibility" },
{ path = "std::iter::Iterator::for_each", reason = "prefer `for` for side-effects" },
{ path = "std::iter::Iterator::try_for_each", reason = "prefer `for` for side-effects" },
]
disallowed-macros = [
# https://github.com/FuelLabs/fuel-core/issues/1327
# https://docs.rs/log/latest/log/#macros
{ reason = "Use tracing instead of log", path = "tracing::log::trace" },
{ reason = "Use tracing instead of log", path = "tracing::log::debug" },
{ reason = "Use tracing instead of log", path = "tracing::log::info" },
{ reason = "Use tracing instead of log", path = "tracing::log::warn" },
{ reason = "Use tracing instead of log", path = "tracing::log::error" },
{ reason = "Use tracing instead of log", path = "tracing::log::log" },
{ reason = "Use tracing instead of log", path = "tracing::log::log_enabled" },
{ reason = "Use tracing instead of log", path = "log::trace" },
{ reason = "Use tracing instead of log", path = "log::debug" },
{ reason = "Use tracing instead of log", path = "log::info" },
{ reason = "Use tracing instead of log", path = "log::warn" },
{ reason = "Use tracing instead of log", path = "log::error" },
{ reason = "Use tracing instead of log", path = "log::log" },
{ reason = "Use tracing instead of log", path = "log::log_enabled" },
]