#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

#1611 in Command line utilities

Download history 362/week @ 2024-07-21 369/week @ 2024-07-28 351/week @ 2024-08-04 275/week @ 2024-08-11 402/week @ 2024-08-18 1122/week @ 2024-08-25 576/week @ 2024-09-01 493/week @ 2024-09-08 440/week @ 2024-09-15 533/week @ 2024-09-22 437/week @ 2024-09-29 414/week @ 2024-10-06 443/week @ 2024-10-13 831/week @ 2024-10-20 446/week @ 2024-10-27 658/week @ 2024-11-03

2,385 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.8–4MB
~73K SLoC