Repository navigation
Expand file tree
/
Copy pathclippy.toml
More file actions
31 lines (28 loc) · 1.94 KB
/
Copy pathclippy.toml
File metadata and controls
31 lines (28 loc) · 1.94 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
# Clippy configuration for minimald. Clippy reads the nearest clippy.toml
# above a crate's manifest and no other, so this file restates the
# workspace's keys (see /clippy.toml) and adds the daemon's own.
allow-unwrap-in-tests = true
allow-expect-in-tests = true
allow-panic-in-tests = true
allow-indexing-slicing-in-tests = true
allow-dbg-in-tests = true
# Restated from /clippy.toml: the metrics pipeline's per-function complexity
# thresholds, mirrored in metrics/thresholds.toml `[clippy]`.
cognitive-complexity-threshold = 25
too-many-lines-threshold = 100
too-many-arguments-threshold = 7
# Every task and blocking-pool call in minimald goes through `crate::traced`,
# which carries the caller's span into the task; a bare tokio spawn starts
# with no span and silently cuts its work out of the request's trace
# (TEL-022). `traced.rs` itself carries the one `expect` per wrapper. The
# text guard `traced::tests::no_direct_tokio_spawn_blocking` keeps checking
# the same files from the test lane, where clippy does not run.
disallowed-methods = [
{ path = "tokio::spawn", reason = "use crate::traced::spawn (or spawn_detached for a task that outlives its request)" },
{ path = "tokio::task::spawn", reason = "use crate::traced::spawn (or spawn_detached for a task that outlives its request)" },
{ path = "tokio::task::spawn_blocking", reason = "use crate::traced::spawn_blocking" },
# Restated from /clippy.toml: `Entry::unpack` resolves a hardlink's link
# name against the process CWD, not the destination root.
{ path = "tar::Entry::unpack", reason = "resolves hardlink targets against the process CWD, escaping the destination root; use `Archive::unpack` or intercept hardlinks (see `common::archive::extract_tar_impl`)" },
{ path = "async_tar::Entry::unpack", reason = "resolves hardlink targets against the process CWD, escaping the destination root; use `Archive::unpack` or intercept hardlinks (see `common::archive::extract_tar_impl`)" },
]