-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclippy.toml
More file actions
26 lines (20 loc) · 989 Bytes
/
clippy.toml
File metadata and controls
26 lines (20 loc) · 989 Bytes
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
# Allow unwrap/expect/panic in test code — production code is restricted via lints
allow-expect-in-tests = true
allow-panic-in-tests = true
allow-unwrap-in-tests = true
# Panic safety — force explicit error handling
disallowed-macros = [
{ path = "std::unimplemented", reason = "Use a proper error type or todo! only in stubs that must not reach production" },
{ path = "std::todo", reason = "Remove all todo! before merging to main" },
]
disallowed-methods = [
{ path = "std::process::exit", reason = "Verify that it's okay to shut down the entire process without our normal shutdown logic" },
]
# Cognitive complexity limit — keeps logic reviewable
cognitive-complexity-threshold = 25
# Type complexity — flag deeply nested generics
type-complexity-threshold = 250
# Enforce API discipline during refactors
avoid-breaking-exported-api = false
# Warn on paths with 4+ segments — encourages use statements over deep inline paths
absolute-paths-max-segments = 3