Commit c1e80e7a authored by Rahix's avatar Rahix 🦀

ci: code-quality: Only include relevant span info in the "hash"

Previously the "fingerprint" would include byte position information
which can change on unrelated changes to a file.
parent 5e54ef3a
......@@ -67,7 +67,7 @@ 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
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.message, (.message.spans | map([.file_name, .line_start, .line_end, .column_start, .column_end]))] | @base64, severity: "minor"})' >code-quality.json
artifacts:
reports:
codequality: code-quality.json
......
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