File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 88
99TOOL_NAME=$1
1010TOOL_DIR=" plugins/tools/$TOOL_NAME /test/src"
11+ CLI_PATH=" $( pwd) /cli-v2"
1112
1213# Check if tool directory exists
1314if [ ! -d " $TOOL_DIR " ]; then
1415 echo " Error: Tool directory $TOOL_DIR does not exist"
1516 exit 1
1617fi
1718
19+ # Check if CLI binary exists
20+ if [ ! -f " $CLI_PATH " ]; then
21+ echo " Error: CLI binary not found at $CLI_PATH "
22+ exit 1
23+ fi
24+
1825# Change to the tool's test directory
1926cd " $TOOL_DIR "
2027
2128# Install the tool
22- codacy-cli install
29+ " $CLI_PATH " install
2330
2431# Run analysis
25- codacy-cli analyze --tool $TOOL_NAME --format sarif --output actual.sarif
32+ " $CLI_PATH " analyze --tool $TOOL_NAME --format sarif --output actual.sarif
2633
2734# Convert absolute paths to relative paths in the output
2835sed -i ' s|file:///home/runner/work/codacy-cli-v2/codacy-cli-v2/|file:///|g' actual.sarif
You can’t perform that action at this time.
0 commit comments