Code Quality For Dotnet

Hi.I use Gitlab CI for automation and I try to integrate Code Quality in my pipeline. After careful research and failure, I still don’t have answers. My projects are Dotnet based.Here stage fail by the:

$ docker run --env SOURCE_CODE="$PWD" --volume “$PWD”:/code --volume /var/run/docker.sock:/var/run/docker.sock “registry.gitlab.com/gitlab-org/ci-cd/codequality:$SP_VERSION” /code

46docker: invalid reference format.
This happens with this script:
code_quality:
stage: test
image: docker:stable
allow_failure: true
services:
- docker:stable-dind
variables:
DOCKER_DRIVER: overlay2
script:
- docker run
–env SOURCE_CODE="$PWD"
–volume “$PWD”:/code
–volume /var/run/docker.sock:/var/run/docker.sock
registry.gitlab.com/gitlab-org/security-products/codequality:11-8-stable” /code
artifacts:
paths: [gl-code-quality-report.json]
expire_in: 1 week
only:
- branches
- tags
except:
variables:
- $CODE_QUALITY_DISABLED
After this I try:
code_quality:
stage: test
image: docker:stable
allow_failure: true
services:
- docker:stable-dind
variables:
DOCKER_DRIVER: overlay2
script:
- |
if ! docker info &>/dev/null; then
if [ -z “$DOCKER_HOST” -a “$KUBERNETES_PORT” ]; then
export DOCKER_HOST=‘tcp://localhost:2375’
fi
fi
- docker run
–env SOURCE_CODE="$PWD"
–volume “$PWD”:/code
–volume /var/run/docker.sock:/var/run/docker.sock
registry.gitlab.com/gitlab-org/security-products/codequality:11-8-stable” /code
artifacts:
paths: [gl-code-quality-report.json]
expire_in: 1 week
only:
- branches
- tags
except:
variables:
- $CODE_QUALITY_DISABLED
But I gice this error:

$ docker run --env SOURCE_CODE="$PWD" --volume “$PWD”:/code --volume /var/run/docker.sock:/var/run/docker.sock “registry.gitlab.com/gitlab-org/ci-cd/codequality:$SP_VERSION” /code

46docker: invalid reference format.
If here normal way to make this.

After refactor code I give this error:

docker run volume "{PWD}":/code volume /var/run/docker.sock:/var/run/docker.sock “registry.gitlab.com/gitlab-org/security-products/codequality:11-8-stable” /code

44Unable to find image ‘volume:latest’ locally

45docker: Error response from daemon: pull access denied for volume, repository does not exist or may require ‘docker login’: denied: requested access to the resource is denied.

46See ‘docker run --help’.