-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclippy.toml
More file actions
42 lines (30 loc) · 1.33 KB
/
clippy.toml
File metadata and controls
42 lines (30 loc) · 1.33 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
36
37
38
39
40
41
42
# Clippy configuration
# https://doc.rust-lang.org/clippy/configuration.html
# MSRV for lint compatibility (must match rust-version in Cargo.toml)
msrv = "1.90"
# Avoid suggesting breaking changes to public API
avoid-breaking-exported-api = true
# Accept lint allow comments above statements
accept-comment-above-statement = true
# Cognitive complexity threshold for functions
cognitive-complexity-threshold = 25
# Maximum number of lines in a function
too-many-lines-threshold = 200
# Maximum number of arguments for functions
too-many-arguments-threshold = 8
# Allowed names that would otherwise trigger `disallowed_names`
allowed-idents-below-min-chars = ["x", "y", "i", "id", "ok"]
# Documentation requirements
doc-valid-idents = ["TOML", "CLI", "API", "JSON", "MiniJinja", "Jinja2", "LLM", "UTF"]
# Type complexity threshold
type-complexity-threshold = 300
# Single char binding names to allow
single-char-binding-names-threshold = 5
# Large error type threshold (pairs with result_large_err lint)
large-error-threshold = 128
# Disallowed methods for safety
disallowed-methods = [
{ path = "std::env::set_var", reason = "not thread-safe in multi-threaded context" },
{ path = "std::env::remove_var", reason = "not thread-safe in multi-threaded context" },
{ path = "std::process::exit", reason = "use proper error handling instead" },
]