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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
# Example debtmap configuration file
# Copy this to .debtmap.toml and customize for your project
# Configuration file version (for future compatibility)
= "1.0"
# ============================================================================
# Paths Configuration
# ============================================================================
[]
# Output file path (optional, defaults to stdout)
# path = "analysis-results.json"
# Coverage file for risk analysis (optional)
# coverage_file = "coverage.xml"
# Maximum files to analyze (0 = no limit)
# max_files = 1000
# ============================================================================
# Thresholds Configuration
# ============================================================================
[]
# Complexity threshold for flagging functions
= 50
# Duplication threshold (lines)
= 10
# Maximum file length (lines)
# max_file_length = 1000
# Maximum function length (lines)
# max_function_length = 50
# Maximum function parameters
# max_function_params = 4
# Maximum nesting depth
# max_nesting_depth = 4
# ============================================================================
# Scoring Weights Configuration
# ============================================================================
# All active weights must sum to 1.0
[]
# Coverage weight (how much test coverage affects score)
= 0.50
# Complexity weight (cyclomatic + cognitive complexity)
= 0.35
# Dependency weight (call graph complexity)
= 0.15
# Inactive weights (set to 0.0)
= 0.00
= 0.00
= 0.00
# ============================================================================
# Analysis Features
# ============================================================================
[]
# Enable context-aware risk analysis
= false
# Context providers to use (git, github, critical_path, dependency)
# context_providers = ["git", "github"]
# Disable specific context providers
# disable_context = []
# Enable semantic analysis
= false
# Disable pattern detection
= false
# Enabled patterns (observer, singleton, factory, strategy, callback, template_method)
# patterns = ["singleton", "factory"]
# Pattern confidence threshold (0.0 - 1.0)
= 0.7
# Enable AST-based functional composition analysis
= false
# Validate LOC consistency across analysis modes
= false
# ============================================================================
# Display Configuration
# ============================================================================
[]
# Output format (json, markdown, terminal, html)
= "terminal"
# Verbosity level (0-3)
# 0 = quiet, 1 = normal, 2 = verbose, 3 = debug
= 1
# Use compact output format
= false
# Use summary format with tiered priority display
= false
# Group output by debt category
= false
# Show complexity attribution details
= false
# Detail level (summary, standard, comprehensive, debug)
= "standard"
# Disable TUI progress visualization
= false
# Plain output mode (ASCII-only, no colors, no emoji)
= false
# ============================================================================
# Display Formatting
# ============================================================================
[]
# Show dependency information (callers/callees)
= false
# Maximum number of callers to display
= 5
# Maximum number of callees to display
= 5
# Show external crate calls in dependencies
= false
# Show standard library calls in dependencies
= false
# Show detailed module split recommendations
= false
# ============================================================================
# Filters
# ============================================================================
[]
# Minimum priority to display (low, medium, high, critical)
# min_priority = "medium"
# Minimum score threshold for filtering recommendations
= 3.0
# Filter by debt categories (comma-separated)
# filter_categories = ["complexity", "duplication"]
# Minimum number of problematic functions for file aggregation
# min_problematic = 3
# ============================================================================
# Performance Configuration
# ============================================================================
[]
# Enable parallel processing
= true
# Number of threads for parallel processing (0 = use all cores)
= 0
# Enable multi-pass analysis
= true
# Show only aggregated file-level scores
= false
# ============================================================================
# Debug Configuration
# ============================================================================
[]
# Show verbose macro parsing warnings
= false
# Show macro expansion statistics
= false
# Enable call graph debugging
= false
# Trace specific functions during call resolution
# trace_functions = ["function_name"]
# Show only call graph statistics
= false
# Show pattern warnings for uncertain detections
= false
# ============================================================================
# God Object Detection
# ============================================================================
[]
= true
# Rust-specific thresholds
[]
= 20
= 15
# Python-specific thresholds
[]
= 15
= 10
# JavaScript-specific thresholds
[]
= 15
= 20
# ============================================================================
# Language Configuration
# ============================================================================
[]
# Languages to analyze (rust, python, javascript)
= ["rust"]
# Aggregation method (weighted, sum, max)
# aggregation_method = "weighted"
# ============================================================================
# Ignore Patterns
# ============================================================================
[]
# Patterns to ignore during analysis (glob patterns)
= [
"tests/**/*",
"examples/**/*",
"benches/**/*",
"**/target/**",
"**/node_modules/**",
]
# ============================================================================
# External API Detection
# ============================================================================
[]
# Enable public API detection heuristics
= true
# Public API confidence threshold (0.0 - 1.0)
= 0.7
# ============================================================================
# Validation Thresholds (for CI/CD)
# ============================================================================
[]
# Maximum average complexity allowed
= 10.0
# Maximum debt density allowed (per 1000 LOC)
= 50.0
# Maximum codebase risk score
= 7.0
# Minimum coverage percentage
= 0.0
# Safety net - high ceiling for total debt
= 10000