# Example .debtmap.toml configuration for a library project

[thresholds]
complexity = 15
duplication = 50

[complexity_weights]
# 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
cyclomatic = 0.3
cognitive = 0.7

# Maximum values for normalization (0-100 scale)
# Adjust these based on your codebase characteristics
max_cyclomatic = 50.0
max_cognitive = 100.0

[external_api]
# Enable external API detection for library projects
detect_external_api = true

# Explicitly mark specific functions as external APIs
# These won't be flagged as dead code even if they have no internal callers
api_functions = [
    "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
api_files = [
    "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)
]