-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy path.clippy.toml
38 lines (36 loc) · 2.22 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
allow-dbg-in-tests = true
allow-expect-in-tests = true
allow-print-in-tests = true
allow-unwrap-in-tests = true
disallowed-macros = [
# https://github.com/FuelLabs/fuel-core/issues/1327
# https://docs.rs/log/latest/log/#macros
{ reason = "Use tracing instead of log", path = "log::debug" },
{ reason = "Use tracing instead of log", path = "log::error" },
{ reason = "Use tracing instead of log", path = "log::info" },
{ reason = "Use tracing instead of log", path = "log::log" },
{ reason = "Use tracing instead of log", path = "log::log_enabled" },
{ reason = "Use tracing instead of log", path = "log::trace" },
{ reason = "Use tracing instead of log", path = "log::warn" },
{ reason = "Use tracing instead of log", path = "tracing::log::debug" },
{ reason = "Use tracing instead of log", path = "tracing::log::error" },
{ reason = "Use tracing instead of log", path = "tracing::log::info" },
{ 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 = "tracing::log::trace" },
{ reason = "Use tracing instead of log", path = "tracing::log::warn" },
{ reason = "Do not commit TODOs in code", path = "std::todo" },
{ reason = "Do not commit debug prints", path = "std::dbg" },
{ reason = "Do not commit unimplemented blocks", path = "std::unimplemented" },
# Enforce pretty_assertions in tests
{ reason = "Use pretty_assertions::assert_eq instead", path = "std::assert_eq" },
{ reason = "Use pretty_assertions::assert_ne instead", path = "std::assert_ne" },
]
disallowed-methods = [
{ 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" },
{ 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" },
]