This commit is contained in:
2026-02-15 11:43:13 +01:00
parent 78561ae254
commit 3d3c36dc91
2 changed files with 6 additions and 7 deletions
+4 -5
View File
@@ -98,9 +98,8 @@ jobs:
output-file: merged.sarif
- name: Check merged SARIF file
run: |
runs=$(jq -r '.runs' merged.sarif)
echo "Runs:"
echo "$runs"
# check that there are two runs in the array
[ "$(echo "$runs" | jq 'length')" -eq 2 ] && echo "OK" || { echo "FAIL (got $(echo "$runs" | jq 'length'), expected 2)"; exit 1; }
run_count=$(jq '.runs | length' merged.sarif)
[ "$run_count" -eq 2 ] || { echo "FAIL: expected 2 runs, got $run_count"; exit 1; }
echo "Merged SARIF has $run_count runs."
jq -e '.version and .["$schema"] and (.runs | length > 0)' merged.sarif >/dev/null || { echo "FAIL: invalid SARIF structure"; exit 1; }
echo "All checks passed."