File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,9 +7,7 @@ RUN apk add --no-cache --virtual .build-deps g++ libffi-dev \
77 && pip install deepcode \
88 && apk del .build-deps
99
10- COPY dc/ /dc/
10+ COPY entrypoint.sh /deepcode/entrypoint.sh
11+ COPY deepcode_to_sarif.py /deepcode/deepcode_to_sarif.py
1112
12- RUN adduser -u 2004 -D docker
13- RUN chown -R docker:docker /dc
14-
15- CMD [ "bash" , "/dc/entrypoint.sh" ]
13+ CMD [ "bash" , "/deepcode/entrypoint.sh" ]
File renamed without changes.
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3- OUTPUT_FILE=" /dc/ output.json"
4- ANALYSIS_DIR=" /dc /src"
3+ OUTPUT_FILE=" output.json"
4+ ANALYSIS_DIR=" /deepcode /src"
55
66if ! [ -d " $GITHUB_WORKSPACE " ]
77then
@@ -25,7 +25,7 @@ echo "External environment variables: DEBUG=$DEBUG TIMEOUT=$TIMEOUT" >&3
2525
2626# SUPPORT FUNCTIONS
2727function load_src_files {
28- codacy_files =$( cd $GITHUB_WORKSPACE || exit ; find . -type f -exec echo {} \; | cut -c3-)
28+ files =$( cd $GITHUB_WORKSPACE || exit ; find . -type f -exec echo {} \; | cut -c3-)
2929}
3030
3131function create_symlink {
@@ -60,7 +60,7 @@ rm -rf "$ANALYSIS_DIR"
6060mkdir -p " $ANALYSIS_DIR "
6161while read -r file; do
6262 create_symlink " $file "
63- done <<< " $codacy_files "
63+ done <<< " $files "
6464
6565# Spawn a child process for the analysis
6666echo " Spawning analysis child process." >&3
@@ -103,10 +103,6 @@ if [ $analysis_exitcode -eq 0 ]; then
103103 exit 0
104104fi
105105
106-
107- # FORMAT OUTPUT
108- echo " Converting DeepCode output to Codacy format." >&3
109-
110106declare -A RULEMAP
111107
112108output=$( cat $OUTPUT_FILE )
135131
136132# cat $OUTPUT_FILE
137133
138- # TODO: make sure the following line does not throw an error
139- python /dc/deepcode_to_sarif.py $OUTPUT_FILE
134+ # TODO: make sure the following line does not throw an error and
135+ # handle this case properly with proper exit codes and messages
136+ python /deepcode/deepcode_to_sarif.py $OUTPUT_FILE
140137
141138echo " Success." >&3
142139exit 0
You can’t perform that action at this time.
0 commit comments