-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathclippy.toml
61 lines (54 loc) · 2.77 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Requires nightly Rust/Clippy.
# Allow-list for `clippy::multiple-crate-versions`.
# https://rust-lang.github.io/rust-clippy/master/index.html#multiple_crate_versions
# Check duplicates with `cargo +nightly tree --workspace --target all --duplicates`
allowed-duplicate-crates = [
"dirs",
"dirs-sys",
"redox_users",
"regex-automata",
"regex-syntax",
"thiserror",
"thiserror-impl",
"unicode-width",
"windows-sys",
"windows-targets",
"windows_aarch64_gnullvm",
"windows_aarch64_msvc",
"windows_i686_gnu",
"windows_i686_msvc",
"windows_x86_64_gnu",
"windows_x86_64_gnullvm",
"windows_x86_64_msvc",
]
# https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
allow-unwrap-in-tests = true
# https://rust-lang.github.io/rust-clippy/master/index.html#expect_used
allow-expect-in-tests = true
# https://rust-lang.github.io/rust-clippy/master/index.html#too_many_lines
too-many-lines-threshold = 200
# Macros that we shouldn't use in the codebase.
# https://rust-lang.github.io/rust-clippy/master/index.html#/disallowed_macros
disallowed-macros = [
# Disallow log:: crate things because they don't work with the test_log::test proc macro's tracing
# feature.
{ path = "log::log", reason = "use tracing crate instead" },
{ path = "log::error", reason = "use tracing::error!() instead" },
{ path = "log::warn", reason = "use tracing::warn!() instead" },
{ path = "log::info", reason = "use tracing::info!() instead" },
{ path = "log::debug", reason = "use tracing::debug!() instead" },
{ path = "log::trace", reason = "use tracing::trace!() instead" },
{ path = "core::assert_eq", reason = "See the `ensure_eq` function in tests/testutils/src/lib.rs for reasoning and replacement." },
{ path = "core::assert", reason = "Use ensure to ensure we return a result and destructors run." },
]
# Methods that we shouldn't use in the codebase.
# https://rust-lang.github.io/rust-clippy/master/index.html#/disallowed_methods
disallowed-methods = [
{ path = "duct::Expression::run", reason = "See the `.run_with()` function in src/exec.rs for reasoning and replacement." },
{ path = "assert_cmd::assert::Assert::success", reason = "See the `.eprint_stdout_stderr()` function in tests/testutils/src/lib.rs for reasoning and replacement." },
{ path = "assert_cmd::assert::Assert::stderr", reason = "See the `.eprint_stdout_stderr()` function in tests/testutils/src/lib.rs for reasoning and replacement." },
{ path = "assert_cmd::assert::Assert::stdout", reason = "See the `.eprint_stdout_stderr()` function in tests/testutils/src/lib.rs for reasoning and replacement." },
]
# Words that look like code but aren't, so shouldn't be surrounded by backticks in docstrings.
# Refs: https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
doc-valid-idents = [".."]