Commit 5e54ef3a authored by Rahix's avatar Rahix 🦀

Merge branch 'code-quality' into 'master'

Create clippy-based code quality report

See merge request engel-simulator-2020/game!50
parents d0f3643b 3a6ddc1b
......@@ -3,6 +3,7 @@ image: "engel-simulator-builder:latest"
stages:
- check
- build
- qa
- deploy
cache: &global_cache
......@@ -54,6 +55,26 @@ build-release:
- master
- tags
clippy:
stage: qa
cache:
# inherit all global cache settings
<<: *global_cache
key: merge-requests
before_script:
- apt-get install -y jq
- rustup component add clippy
script:
- RUSTFLAGS=-Dwarnings wasm-pack build --dev
- |
cargo clippy --message-format json | jq -s 'map(. | select(.reason == "compiler-message" and .message.code != null) | {description: .message.message, location: {path: .message.spans[0].file_name, lines: {begin: .message.spans[0].line_start}}, fingerprint: [.message.code, .message.spans, .message.message] | @base64, severity: "minor"})' >code-quality.json
artifacts:
reports:
codequality: code-quality.json
only:
- master
- merge_requests
deploy:
stage: deploy
tags:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment