#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

#1663 in Command line utilities

Download history 508/week @ 2024-09-26 445/week @ 2024-10-03 372/week @ 2024-10-10 755/week @ 2024-10-17 531/week @ 2024-10-24 601/week @ 2024-10-31 538/week @ 2024-11-07 514/week @ 2024-11-14 712/week @ 2024-11-21 932/week @ 2024-11-28 547/week @ 2024-12-05 587/week @ 2024-12-12 446/week @ 2024-12-19 194/week @ 2024-12-26 765/week @ 2025-01-02 744/week @ 2025-01-09

2,250 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