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 for Valknut
# Enforces high-quality Rust code standards
# Error tolerance - we want strict enforcement
msrv = "1.70.0" # Minimum Supported Rust Version
# Complexity thresholds
cognitive-complexity-threshold = 25
type-complexity-threshold = 100
too-many-arguments-threshold = 8
too-many-lines-threshold = 150
# Performance and efficiency settings
enum-variant-size-threshold = 200
trivial-copy-size-limit = 128
pass-by-value-size-limit = 256
vec-box-size-threshold = 4096
# Error handling standards
avoid-breaking-exported-api = true
# Safety and correctness
disallowed-methods = [
# Discourage panicking functions in library code
"std::panic::panic_any",
"std::process::exit",
# Note: unwrap/expect allowed in tests and examples
]
disallowed-types = [
# Note: Temporarily allowing common patterns for CI compatibility
]
# Allow certain patterns that are acceptable in our codebase
allowed-idents-below-min-chars = [
"i", "j", "k", "x", "y", "z", # Loop counters and coordinates
"id", "db", "io", "fs", "os", # Common abbreviations
"ast", "lsh", "pdg", "cfg", # Domain-specific terms
]
# Literal representations
literal-representation-threshold = 2048