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

CLI tool that'll convert supported JSON files to a subset of the Code Climate JSON format.

1.6.0 2021-07-02 06:50 UTC

This package is auto-updated.

Last update: 2024-10-29 05:47:16 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 tool that'll convert supported JSON files to a subset of the Code Climate JSON format. The output file code-climate.json can be used in GitLab CI to show degrations in merge requests via the report artifact. See GitLab Code Quality documentation for more information.

Supported JSON files

Example input

[
    {
        "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
            }
        }
    }
]

Example output

[
    {
        "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
            }
        }
    }
]

Documentation

Please refer to the project's WIKI entries for documentation: WIKI