#gitlab #clippy #cli

bin+lib gitlab_clippy

Convert clippy warnings into GitLab Code Quality report

7 releases (4 stable)

1.0.3 Dec 10, 2021
1.0.2 May 13, 2021
1.0.1 Feb 18, 2021
1.0.0 Nov 5, 2020
0.1.2 Oct 21, 2020

#1619 in Command line utilities

Download history 716/week @ 2024-06-19 531/week @ 2024-06-26 596/week @ 2024-07-03 506/week @ 2024-07-10 391/week @ 2024-07-17 416/week @ 2024-07-24 326/week @ 2024-07-31 312/week @ 2024-08-07 358/week @ 2024-08-14 776/week @ 2024-08-21 713/week @ 2024-08-28 620/week @ 2024-09-04 507/week @ 2024-09-11 456/week @ 2024-09-18 560/week @ 2024-09-25 412/week @ 2024-10-02

1,968 downloads per month

MIT license

19KB
174 lines

GitLab Clippy

pipeline status coverage report

Convert clippy warnings into GitLab Code Quality report

Usage

GitLab CI example

clippy:
  stage: lint
  before_script:
    - rustup component add clippy
    - cargo install gitlab_clippy
  script:
    - cargo clippy
  after_script:
    - cargo clippy --message-format=json | gitlab-clippy > gl-code-quality-report.json
  artifacts:
    reports:
      codequality: gl-code-quality-report.json
    expire_in: 1 week
  rules:
    - if: '$CODE_QUALITY_DISABLED'
      when: never
    - if: '$CI_PIPELINE_SOURCE == "push"'

Demo of results showing inside a MR can be viewed here.

Locally

  1. Install with
cargo install gitlab_clippy
  1. Run with
cargo clippy --message-format=json | gitlab-clippy

Dependencies

~2.9–4MB
~75K SLoC