File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -206,6 +206,7 @@ Found [Clone] 7 duplicated lines with 10 tokens:
206206 * ` --skip-uncommitted-files-check ` [ default: false] - Skip check for uncommitted files in the analysis directory
207207 * ` --upload ` [ default: false] - Request to push results to Codacy
208208 * ` --upload-batch-size ` [ default: 50000] - Maximum number of results in each batch to upload to Codacy
209+ * ` --skip-docker-test ` [ default: false] - Skip the test_docker_socket().
209210 * ` --skip-ssl-verification ` [ default: false] - Skip the SSL certificate verification when communicating with the Codacy API
210211 * ` --parallel ` [ default: 2] - Number of tools to run in parallel
211212 * ` --max-allowed-issues ` [ default: 0] - Maximum number of issues allowed for the analysis to succeed
Original file line number Diff line number Diff line change @@ -18,10 +18,12 @@ log_error() {
1818}
1919
2020test_docker_socket () {
21- if [ ! -S /var/run/docker.sock ]; then
22- log_error " /var/run/docker.sock must exist as a Unix domain socket"
23- elif [ -n " ${DOCKER_HOST} " ] && [ " ${DOCKER_HOST} " != " unix:///var/run/docker.sock" ]; then
24- log_error " invalid DOCKER_HOST=${DOCKER_HOST} , must be unset or unix:///var/run/docker.sock"
21+ if [ " ${SKIP_DOCKER_TEST} " == false ]; then
22+ if [ ! -S /var/run/docker.sock ]; then
23+ log_error " /var/run/docker.sock must exist as a Unix domain socket"
24+ elif [ -n " ${DOCKER_HOST} " ] && [ " ${DOCKER_HOST} " != " unix:///var/run/docker.sock" ]; then
25+ log_error " invalid DOCKER_HOST=${DOCKER_HOST} , must be unset or unix:///var/run/docker.sock"
26+ fi
2527 fi
2628}
2729
@@ -117,6 +119,14 @@ prep_args_with_output_absolute_path() {
117119 ARGUMENTS_WITH_ABSOLUTE_PATH_OUTPUT=" $new_args "
118120}
119121
122+ SKIP_DOCKER_TEST=false
123+ while [[ " $# " -gt 0 ]]; do
124+ case $1 in
125+ --skip-docker-test) SKIP_DOCKER_TEST=true ;;
126+ esac
127+ shift
128+ done
129+
120130test_docker_socket
121131
122132analysis_file " $@ "
You can’t perform that action at this time.
0 commit comments