File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ TOOL_NAME=$1
1010TOOL_DIR=" plugins/tools/$TOOL_NAME /test/src"
1111TEST_DIR=" plugins/tools/$TOOL_NAME /test"
1212CLI_PATH=" $( pwd) /cli-v2"
13+ EXPECTED_SARIF=" $( pwd) /$TEST_DIR /expected.sarif"
1314
1415# Check if tool directory exists
1516if [ ! -d " $TOOL_DIR " ]; then
@@ -38,11 +39,11 @@ sed -i 's|file:///home/runner/work/codacy-cli-v2/|file:///|g' actual.sarif
3839
3940# Debug information
4041echo " Current directory: $( pwd) "
41- echo " Looking for expected.sarif in: $TEST_DIR /expected.sarif "
42- ls -la " $TEST_DIR /expected.sarif " || echo " File not found or not accessible"
42+ echo " Looking for expected.sarif in: $EXPECTED_SARIF "
43+ ls -la " $EXPECTED_SARIF " || echo " File not found or not accessible"
4344
4445# Sort all fields in both files, handling null rules array
45- 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
46+ 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
4647jq --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
4748
4849# Run diff and capture its exit code
You can’t perform that action at this time.
0 commit comments