Convert clippy warnings into GitLab Code Quality report
clippy:
stage: lint
before_script:
- rustup component add clippy
- cargo install gitlab_clippy
script:
- cargo clippy
after_script:
- cargo clippy --message-format=json &> clippy.txt || true
- gitlab-clippy clippy.txt
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.
cargo install gitlab_clippy
cargo clippy --message-format=json &> clippy.txt
gitlab-clippy clippy.txt