代码检查 CODEARTS CHECK-查询cmertrics缺陷概要:响应参数

时间:2023-11-13 14:37:46

响应参数

状态码: 200

表3 响应Body参数

参数

参数类型

描述

task_id

String

任务id

task_name

String

任务名字

creator_id

String

创建者id

git_url

String

代码仓地址

git_branch

String

代码仓分支

last_check_time

String

上一次检查时间

last_exec_time

String

上次执行时间

check_type

String

检查类型

created_at

String

创建时间

metric_info

MetricInfo object

度量项

表4 MetricInfo

参数

参数类型

描述

code_size

String

代码规模

raw_lines

String

原始代码行数

methods_total

String

函数总数

cyclomatic_complexity_total

String

圈复杂度总数

cyclomatic_complexity_per_method

String

平均圈复杂度

maximum_cyclomatic_complexity

String

最大圈复杂度

huge_cyclomatic_complexity_total

String

超大圈复杂度数

huge_cyclomatic_complexity_ratio

String

超大圈复杂度比例

cca_cyclomatic_complexity_total

String

cca圈复杂度总数

cca_cyclomatic_complexity_per_method

String

cca平均圈复杂度

maximum_cca_cyclomatic_complexity

String

cca最大圈复杂度

huge_cca_cyclomatic_complexity_total

String

超大圈复杂度函数总数

cyclomatic_complexity_adequacy

String

圈复杂度满足度

maximum_depth

String

最大深度

huge_depth_total

String

超大深度数

huge_depth_ratio

String

超大深度占比

method_lines

String

函数总行数

lines_per_method

String

函数平均代码行

huge_method_total

String

超大函数数

huge_method_ratio

String

超大函数占比

files_total

String

文件总数

folders_total

String

目录总数

lines_per_file

String

文件平均代码行

huge_headerfile_total

String

超大头文件数

huge_headerfile_ratio

String

超大头文件占比

huge_non_headerfile_total

String

超大源文件数

huge_non_headerfile_ratio

String

超大源文件占比

huge_folder_total

String

超大目录数

huge_folder_ratio

String

超大目录占比

file_duplication_total

String

重复文件数

file_duplication_ratio

String

文件重复率

non_hfile_duplication_total

String

重复源文件数

non_hfile_duplication_ratio

String

源文件重复率

code_duplication_total

String

代码重复数

code_duplication_ratio

String

代码重复率

non_hfile_code_duplication_total

String

源文件代码重复数

non_hfile_code_duplication_ratio

String

源文件代码重复率

unsafe_functions_total

String

危险函数总数

unsafe_functions_kloc

String

危险函数密度

redundant_code_total

String

冗余代码数

redundant_code_kloc

String

冗余代码块密度

warning_suppression_total

String

抑制告警数

warning_suppression_kloc

String

抑制告警密度

状态码: 400

表5 响应Body参数

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误描述

状态码: 401

表6 响应Body参数

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误描述

support.huaweicloud.com/api-codecheck/ShowTaskCmetrics.html