beechit / json-to-code-climate-subset-converter
CLI tool that'll convert supported JSON files to a subset of the Code Climate JSON format.
Installs: 35 066
Dependents: 0
Suggesters: 0
Security: 0
Stars: 19
Watchers: 3
Forks: 6
Open Issues: 7
pkg:composer/beechit/json-to-code-climate-subset-converter
Requires
- php: ^7.3|^8.0
- ext-json: *
- phlak/config: ^7.0
- symfony/console: ^4.0|^5.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- infection/infection: ^0.18.2
- overtrue/phplint: ^1.2
- phan/phan: ^4.0
- phpstan/phpstan: ^0.12.7
- phpunit/phpunit: ^9.0
- rregeer/phpunit-coverage-check: ^0.3.1
- squizlabs/php_codesniffer: ^3.5
- vimeo/psalm: ^3.8
README
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