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
# Example .debtmap.toml configuration for a library project
[]
= 15
= 50
[]
# Weights for combining cyclomatic and cognitive complexity
# Must sum to 1.0. Default favors cognitive complexity (0.7) over cyclomatic (0.3)
# Research shows cognitive complexity correlates better with bug density
= 0.3
= 0.7
# Maximum values for normalization (0-100 scale)
# Adjust these based on your codebase characteristics
= 50.0
= 100.0
[]
# Enable external API detection for library projects
= true
# Explicitly mark specific functions as external APIs
# These won't be flagged as dead code even if they have no internal callers
= [
"parse", # Simple function name
"Parser::new", # Specific struct method
"client::connect", # Module-qualified function
"create_connection_pool", # Another API function
]
# Mark entire files as containing external APIs
# All public functions in these files will be treated as external APIs
= [
"src/lib.rs", # Main library interface
"src/api.rs", # Dedicated API module
"src/public/*.rs", # All files in public module (glob pattern)
"**/api/*.rs", # Any api directory (recursive glob)
]