Skip to content

Commit c903bfc

Browse files
committed
[PLUTO-1411] Add script
1 parent 8160d53 commit c903bfc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

run-tool-tests.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ cd "$TOOL_DIR"
3535
# Handle both path formats: with and without extra codacy-cli-v2
3636
sed -i 's|file:///home/runner/work/codacy-cli-v2/|file:///|g' actual.sarif
3737

38-
# Compare with expected output
39-
jq --sort-keys "." expected.sarif > expected.sorted.json
40-
jq --sort-keys "." actual.sarif > actual.sorted.json
38+
# Sort rules by ID in both files
39+
jq '.runs[0].tool.driver.rules |= sort_by(.id)' expected.sarif > expected.sorted.json
40+
jq '.runs[0].tool.driver.rules |= sort_by(.id)' actual.sarif > actual.sorted.json
4141

4242
# Run diff and capture its exit code
4343
if ! diff expected.sorted.json actual.sorted.json; then

0 commit comments

Comments
 (0)