GithubHelp home page GithubHelp logo

laurenttrk / flake8-gl-codeclimate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from awelzel/flake8-gl-codeclimate

0.0 1.0 0.0 20 KB

Flake8 formatter producing Gitlab Code Quality artifacts.

License: MIT License

Python 100.00%

flake8-gl-codeclimate's Introduction

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!

flake8-gl-codeclimate's People

Contributors

awelzel avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.