-
-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathclippy.toml
More file actions
76 lines (66 loc) · 1.99 KB
/
clippy.toml
File metadata and controls
76 lines (66 loc) · 1.99 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
cognitive-complexity-threshold = 20
excessive-nesting-threshold = 4
too-many-lines-threshold = 120
too-many-arguments-threshold = 7
type-complexity-threshold = 250
struct-field-name-threshold = 8
enum-variant-size-threshold = 200
single-char-binding-names-threshold = 4
min-ident-chars-threshold = 2
allowed-idents-below-min-chars = [
"i",
"j",
"k",
"x",
"y",
"z",
"w",
"n",
"e",
"v",
"f",
"_",
]
pass-by-value-size-limit = 128
trivial-copy-size-limit = 8
large-error-threshold = 128
avoid-breaking-exported-api = false
check-private-items = false
allow-dbg-in-tests = true
allow-print-in-tests = true
allow-unwrap-in-tests = true
allow-expect-in-tests = true
suppress-restriction-lint-in-const = true
literal-representation-threshold = 4
doc-valid-idents = [
"GitHub",
"GitLab",
"API",
"HTTP",
"HTTPS",
"JSON",
"UUID",
"Ethereum",
"EVM",
"WebSocket",
"OAuth",
"GraphQL",
"IPv4",
"IPv6",
"OpenAPI",
"TODO",
"FIXME",
"..",
]
disallowed-methods = [
{ path = "std::env::set_var", reason = "Not thread-safe; use a dedicated config struct" },
{ path = "std::env::remove_var", reason = "Not thread-safe; use a dedicated config struct" },
{ path = "std::mem::transmute", reason = "Use safe alternatives: from_bits, as_ptr, bytemuck" },
{ path = "std::mem::forget", reason = "Use ManuallyDrop instead of mem::forget" },
{ path = "std::process::exit", reason = "Unwinds nothing; return from main or use a Result" },
{ path = "std::thread::sleep", reason = "In async code use tokio::time::sleep; in sync code justify with #[allow]" },
]
# disallowed-types = [
# { path = "std::collections::HashMap", reason = "Use a hasher-explicit HashMap (e.g. ahash, foldhash, or std with BuildHasherDefault)", allow-invalid = true },
# { path = "std::collections::HashSet", reason = "Use a hasher-explicit HashSet (e.g. ahash, foldhash, or std with BuildHasherDefault)", allow-invalid = true },
# ]