We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8160d53 commit c903bfcCopy full SHA for c903bfc
run-tool-tests.sh
@@ -35,9 +35,9 @@ cd "$TOOL_DIR"
35
# Handle both path formats: with and without extra codacy-cli-v2
36
sed -i 's|file:///home/runner/work/codacy-cli-v2/|file:///|g' actual.sarif
37
38
-# Compare with expected output
39
-jq --sort-keys "." expected.sarif > expected.sorted.json
40
-jq --sort-keys "." actual.sarif > actual.sorted.json
+# Sort rules by ID in both files
+jq '.runs[0].tool.driver.rules |= sort_by(.id)' expected.sarif > expected.sorted.json
+jq '.runs[0].tool.driver.rules |= sort_by(.id)' actual.sarif > actual.sorted.json
41
42
# Run diff and capture its exit code
43
if ! diff expected.sorted.json actual.sorted.json; then
0 commit comments