{
"items": [
{
"location": {
"file": "src/example.rs",
"function": "complex_function",
"line": 45
},
"debt_type": {
"ComplexityHotspot": {
"cyclomatic": 8,
"cognitive": 15
}
},
"unified_score": {
"complexity_factor": 10.0,
"coverage_factor": 10.0,
"dependency_factor": 5.0,
"role_multiplier": 1.3,
"final_score": 95.8
},
"function_role": "PureLogic",
"recommendation": {
"primary_action": "Refactor to reduce nesting",
"rationale": "High cognitive complexity",
"implementation_steps": ["Extract nested logic"],
"related_items": []
},
"expected_impact": {
"coverage_improvement": 18.0,
"lines_reduction": 25,
"complexity_reduction": 15.0,
"risk_reduction": 10.5
},
"transitive_coverage": null,
"upstream_dependencies": 3,
"downstream_dependencies": 2,
"upstream_callers": [],
"downstream_callees": [],
"nesting_depth": 5,
"function_length": 52,
"cyclomatic_complexity": 8,
"cognitive_complexity": 15,
"entropy_details": null,
"is_pure": true,
"purity_confidence": 0.9,
"god_object_indicators": null
},
{
"location": {
"file": "src/new_module.rs",
"function": "unsafe_operation",
"line": 10
},
"debt_type": {
"ComplexityHotspot": {
"cyclomatic": 7,
"cognitive": 12
}
},
"unified_score": {
"complexity_factor": 7.0,
"coverage_factor": 10.0,
"dependency_factor": 3.0,
"role_multiplier": 1.2,
"final_score": 78.5
},
"function_role": "PureLogic",
"recommendation": {
"primary_action": "Add error handling",
"rationale": "Missing safety checks",
"implementation_steps": ["Add validation"],
"related_items": []
},
"expected_impact": {
"coverage_improvement": 12.0,
"lines_reduction": 10,
"complexity_reduction": 9.0,
"risk_reduction": 11.0
},
"transitive_coverage": null,
"upstream_dependencies": 1,
"downstream_dependencies": 1,
"upstream_callers": [],
"downstream_callees": [],
"nesting_depth": 3,
"function_length": 30,
"cyclomatic_complexity": 7,
"cognitive_complexity": 12,
"entropy_details": null,
"is_pure": true,
"purity_confidence": 0.85,
"god_object_indicators": null
}
],
"file_items": [],
"total_impact": {
"coverage_improvement": 30.0,
"lines_reduction": 35,
"complexity_reduction": 24.0,
"risk_reduction": 21.5
},
"total_debt_score": 174.3,
"debt_density": 2.12,
"total_lines_of_code": 82,
"call_graph": {
"nodes": {},
"edges": [],
"caller_index": {},
"callee_index": {}
},
"data_flow_graph": {
"call_graph": {
"nodes": {},
"edges": [],
"caller_index": {},
"callee_index": {}
},
"variable_deps": {},
"data_transformations": {},
"io_operations": {},
"purity_analysis": {},
"mutation_analysis": {}
},
"overall_coverage": null
}