File tree 1 file changed +2
-1
lines changed
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 8
8
9
9
TOOL_NAME=$1
10
10
TOOL_DIR=" plugins/tools/$TOOL_NAME /test/src"
11
+ TEST_DIR=" plugins/tools/$TOOL_NAME /test"
11
12
CLI_PATH=" $( pwd) /cli-v2"
12
13
13
14
# Check if tool directory exists
@@ -36,7 +37,7 @@ cd "$TOOL_DIR"
36
37
sed -i ' s|file:///home/runner/work/codacy-cli-v2/|file:///|g' actual.sarif
37
38
38
39
# Sort all fields in both files, handling null rules array
39
- jq --sort-keys ' if .runs[0].tool.driver.rules == null then . else .runs[0].tool.driver.rules |= sort_by(.id) end' expected.sarif > expected.sorted.json
40
+ jq --sort-keys ' if .runs[0].tool.driver.rules == null then . else .runs[0].tool.driver.rules |= sort_by(.id) end' " $TEST_DIR / expected.sarif" > expected.sorted.json
40
41
jq --sort-keys ' if .runs[0].tool.driver.rules == null then . else .runs[0].tool.driver.rules |= sort_by(.id) end' actual.sarif > actual.sorted.json
41
42
42
43
# Run diff and capture its exit code
You can’t perform that action at this time.
0 commit comments