-
-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathclippy.toml
More file actions
62 lines (54 loc) · 1.89 KB
/
clippy.toml
File metadata and controls
62 lines (54 loc) · 1.89 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
# Clippy configuration for vtcode
# Based on best practices from https://rust-lang.github.io/rust-clippy/master/index.html
# Minimum supported Rust version
msrv = "1.88"
# Cognitive complexity threshold for functions
cognitive-complexity-threshold = 75
# Too many arguments threshold for functions
too-many-arguments-threshold = 9
# Disallow specific methods that should be avoided
disallowed-methods = [
{ path = "std::panic::panic_any", reason = "Use anyhow/thiserror for error handling instead" },
{ path = "std::iter::Iterator::for_each", reason = "prefer `for` for side-effects (F-COMBINATOR)" },
{ path = "std::iter::Iterator::try_for_each", reason = "prefer `for` for side-effects (F-COMBINATOR)" },
]
# Allow absolute paths from specific crates (for project structure)
absolute-paths-allowed-crates = [
"vtcode",
"vtcode-core",
"vtcode-commons",
"vtcode-config",
"vtcode-tui",
"vtcode-llm",
"vtcode-lmstudio",
"vtcode-markdown-store",
"vtcode-indexer",
"vtcode-tools",
"vtcode-bash-runner",
"vtcode-exec-events",
"vtcode-file-search",
"vtcode-acp",
"vtcode-process-hardening",
]
# Suppress arithmetic checks for specific types where overflow is expected
arithmetic-side-effects-allowed = [
"u8", "u16", "u32", "u64", "u128", "usize",
"i8", "i16", "i32", "i64", "i128", "isize",
]
# Allow specific types that may have interior mutability
ignore-interior-mutability = [
"std::sync::atomic::AtomicBool",
"std::sync::atomic::AtomicUsize",
"std::cell::RefCell",
"std::cell::Cell",
"parking_lot::Mutex",
"parking_lot::RwLock",
"tokio::sync::Mutex",
"tokio::sync::RwLock",
]
# Test-only relaxations that keep future stricter lint rollouts focused on production code.
allow-indexing-slicing-in-tests = true
allow-panic-in-tests = true
allow-unwrap-in-tests = true
allow-expect-in-tests = true
allow-dbg-in-tests = true