-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.clippy.toml
More file actions
35 lines (33 loc) · 2.24 KB
/
.clippy.toml
File metadata and controls
35 lines (33 loc) · 2.24 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
28
29
30
31
32
33
34
35
allow-dbg-in-tests = true
allow-expect-in-tests = true
allow-print-in-tests = true
allow-unwrap-in-tests = true
disallowed-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", allow-invalid = true },
{ reason = "Use tracing instead of log", path = "tracing::log::error", allow-invalid = true },
{ reason = "Use tracing instead of log", path = "tracing::log::info", allow-invalid = true },
{ reason = "Use tracing instead of log", path = "tracing::log::log", allow-invalid = true },
{ reason = "Use tracing instead of log", path = "tracing::log::log_enabled", allow-invalid = true },
{ reason = "Use tracing instead of log", path = "tracing::log::trace", allow-invalid = true },
{ reason = "Use tracing instead of log", path = "tracing::log::warn", allow-invalid = true },
{ 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" },
{ 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" },
]