Convert black --diff output to a Code Climate report
Project description
black-codeclimate
Convert the output of black --diff
to a report conforming to the Code Climate spec. It is aimed at GitLab CI, for which it can generate a Code Quality report.
Usage
Pipe the output of black --diff
into black-codeclimate
:
black --diff src/ | black-codeclimate > black_report.json
Or specify a file to use as input:
black-codeclimate black.diff > black_report.json
You can also change the severity, description and check_name of the issues in the resulting report by specifying command line flags:
black-codeclimate --severity blocker --description "Would reformat" --check-name "black" black.diff > black_report.json
To include in GitLab CI:
lint:black:
stage: lint
script:
- # Install black and black-codeclimate...
- black --diff src/ | black-codeclimate > black_report.json
artifacts:
reports:
codequality: black_report.json
when: always
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for black_codeclimate-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23ee820029a4d388fa6a48ba0e4058460697dbf3fb74b7b94efe50615b25d262 |
|
MD5 | 00078ab70bd4150e97341e700b47e0fb |
|
BLAKE2b-256 | e994b9420e156834fae6d9c7b31b51b9189a1778dd0819fc41bc46f821c1a7af |