Skip to main content

Gitlab Code Quality artifact Flake8 formatter

Project description

flake8-gl-codeclimate

Build Status

Flake8 formatter producing Gitlab Code Quality artifacts.

Usage

By default, Flake8 will print to standard output. However, the purpose of this formatter is to produce a JSON file that is then stored as Code Quality artifact by Gitlab (see below) - the output itself isn't very human-readable:

$ pip install flake8-gl-codeclimate
$ flake8 --format gl-codeclimate examples/trailing-whitespace.py
[
    {"type": "issue", "check_name": "pycodestyle", "description": "trailing whitespace [W291]", ... }
]

Adding it to Gitlab

To enable Code Quality reports based on Flake8 in Gitlab merge requests, add a configuration as follows to your projects gitlab-ci.yml file.

flake8:
  script:
    - pip install flake8-gl-codeclimate
    - flake8 --exit-zero --format gl-codeclimate --output-file gl-code-quality-report.json my_package/
  artifacts:
    reports:
      codequality: gl-code-quality-report.json

This will upload the gl-code-quality-report.json as Gitlab Code Quality artifact. Afterwards, code quality improvements and degradations should show up in merge requests on Gitlab.

Gitlab Code Quality artifacts are a subset of the Code Climate spec.

Have fun!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flake8_gl_codeclimate-0.2.2.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flake8_gl_codeclimate-0.2.2-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file flake8_gl_codeclimate-0.2.2.tar.gz.

File metadata

  • Download URL: flake8_gl_codeclimate-0.2.2.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for flake8_gl_codeclimate-0.2.2.tar.gz
Algorithm Hash digest
SHA256 273804c1bfc9c07e91ef4522cc340773aaf9b512bb2116a29d7f05725db57449
MD5 38d43806c191b9f35711f09ef05aa4f1
BLAKE2b-256 4156505f4a545d996bbf4ef5c4b73d25c1edd30f720f7d47de02eff226918697

See more details on using hashes here.

Provenance

The following attestation bundles were made for flake8_gl_codeclimate-0.2.2.tar.gz:

Publisher: publish-to-pypi.yml on awelzel/flake8-gl-codeclimate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flake8_gl_codeclimate-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for flake8_gl_codeclimate-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bc5ec8bbef82c40936a924a9bf8b236292c96037c322b8bc65954c1f782ca498
MD5 af00cd3df185adcf9882414f4ae183c8
BLAKE2b-256 3ecff7c3d2d7ccc28fd01a1ea7dc911dbb2f6393a4bbbc7734c7bde691f3691f

See more details on using hashes here.

Provenance

The following attestation bundles were made for flake8_gl_codeclimate-0.2.2-py3-none-any.whl:

Publisher: publish-to-pypi.yml on awelzel/flake8-gl-codeclimate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page