Skip to content

Commit 0620f43

Browse files
committed
fix sarifs
1 parent 839130f commit 0620f43

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

run-tool-tests.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ normalize_paths() {
2424
sort_sarif() {
2525
local input=$1
2626
local output=$2
27-
jq --sort-keys 'if .runs[0].tool.driver.rules == null then . else .runs[0].tool.driver.rules |= sort_by(.id) end' "$input" > "$output"
27+
# Use raw input mode to handle special characters
28+
jq -R -s 'fromjson? // empty' "$input" | jq --sort-keys '.' > "$output"
2829
}
2930

3031
# Check if tool name is provided

0 commit comments

Comments
 (0)