calculate_complexity
Analyze code complexity metrics such as cyclomatic and cognitive complexity to assess maintainability and identify potential refactoring needs using Smart Code Reviewer.
Instructions
计算代码复杂度指标(圈复杂度、认知复杂度等)
Input Schema
Name | Required | Description | Default |
---|---|---|---|
code | Yes | 要分析的代码 | |
language | Yes | 编程语言 |
Input Schema (JSON Schema)
{
"properties": {
"code": {
"description": "要分析的代码",
"type": "string"
},
"language": {
"description": "编程语言",
"type": "string"
}
},
"required": [
"code",
"language"
],
"type": "object"
}