beechit/json-to-code-climate-subset-converter

一个 CLI 工具,可以将支持的 JSON 文件转换为 Code Climate JSON 格式的一个子集。

1.6.0 2021-07-02 06:50 UTC

This package is auto-updated.

Last update: 2024-08-29 05:00:56 UTC


README

GitHub Workflow Status GitHub Workflow Status GitHub Workflow Status GitHub Workflow Status GitHub Workflow Status GitHub Workflow Status GitHub Workflow Status

json-to-code-climate-subset-converter

一个 CLI 工具,可以将支持的 JSON 文件转换为 Code Climate JSON 格式的一个子集。输出文件 code-climate.json 可以用于 GitLab CI,通过报告工件来显示合并请求中的降级。有关更多信息,请参阅 GitLab 代码质量文档

支持的 JSON 文件

示例输入

[
    {
        "type": "issue",
        "type_id": 11007,
        "check_name": "PhanUndeclaredClassConstant",
        "description": "UndefError PhanUndeclaredClassConstant Reference to constant class from undeclared class \\PhpParser\\Node\\Stmt\\ClassMethod",
        "severity": 10,
        "location": {
            "path": "app/Class.php",
            "lines": {
                "begin": 32,
                "end": 34
            }
        }
    }
]

示例输出

[
    {
        "description": "(Phan) UndefError PhanUndeclaredClassConstant Reference to constant class from undeclared class \\PhpParser\\Node\\Stmt\\ClassMethod",
        "fingerprint": "fd46675f22771e90045b745429e46682",
        "location": {
            "path": "app/Class.php",
            "lines": {
                "begin": 32,
                "end": 34
            }
        }
    }
]

文档

请参阅项目的 WIKI 条目以获取文档: WIKI