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

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

响应示例

状态码: 200

Request succeeded!

{
  "task_id" : "435b58ecf7f54c45907c1384d01c94a6",
  "task_name" : " CS harp_02201119",
  "creator_id" : "ecadebb5041146cc96f9780f3d905e20",
  "git_url" : "git@****_02201119.git",
  "git_branch" : "master",
  "last_check_time" : "2020-02-20 11:37:46",
  "last_exec_time" : "2020-02-20 11:37:46",
  "check_type" : "source",
  "created_at" : "2020-02-20 11:21:11",
  "metric_info" : {
    "code_size" : "133426.00",
    "raw_lines" : "182082.00",
    "methods_total" : "6840.00",
    "cyclomatic_complexity_total" : "27435.00",
    "cyclomatic_complexity_per_method" : "7.43",
    "maximum_cyclomatic_complexity" : "346.00",
    "huge_cyclomatic_complexity_total" : "167.00",
    "huge_cyclomatic_complexity_ratio" : "4.13",
    "cca_cyclomatic_complexity_total" : "26693.00",
    "cca_cyclomatic_complexity_per_method" : "7.25",
    "maximum_cca_cyclomatic_complexity" : "342.00",
    "huge_cca_cyclomatic_complexity_total" : "148.00",
    "cyclomatic_complexity_adequacy" : "21.00",
    "maximum_depth" : "333.00",
    "huge_depth_total" : "8.85",
    "huge_depth_ratio" : "91546.00",
    "method_lines" : "24.91",
    "lines_per_method" : "8.04",
    "huge_method_total" : "12300",
    "huge_method_ratio" : "12300",
    "files_total" : "629.00",
    "folders_total" : "426.00",
    "lines_per_file" : "12300",
    "huge_headerfile_total" : "12300",
    "huge_headerfile_ratio" : "12300",
    "huge_non_headerfile_total" : "12300",
    "huge_non_headerfile_ratio" : "12300",
    "huge_folder_total" : "12300",
    "huge_folder_ratio" : "12300",
    "file_duplication_total" : "12300",
    "file_duplication_ratio" : "12300",
    "non_hfile_duplication_total" : "12300",
    "non_hfile_duplication_ratio" : "12300",
    "code_duplication_total" : "3.28",
    "code_duplication_ratio" : "11782.00",
    "non_hfile_code_duplication_total" : "8.59",
    "non_hfile_code_duplication_ratio" : "11782.00",
    "unsafe_functions_total" : "17.17",
    "unsafe_functions_kloc" : "0.00",
    "redundant_code_total" : "0.00",
    "redundant_code_kloc" : "674.00",
    "warning_suppression_total" : "17.00",
    "warning_suppression_kloc" : "0.45"
  }
}

状态码: 400

Bad Request

{
  "error_code" : "CC.00000000",
  "error_msg" : "网络繁忙,请稍后再试"
}

状态码: 401

Unauthorized

{
  "error_code" : "CC.00000003",
  "error_msg" : "认证信息过期"
}
support.huaweicloud.com/api-codecheck/ShowTaskCmetrics.html