Skip to content

Instantly share code, notes, and snippets.

@mapsi
Created July 19, 2019 10:32
Show Gist options
  • Save mapsi/d6e2d8c5ebc96c2784b18851d806a09b to your computer and use it in GitHub Desktop.
Save mapsi/d6e2d8c5ebc96c2784b18851d806a09b to your computer and use it in GitHub Desktop.
Code quality - Codeclimate check

Code Quality

Codeclimate check

https://gitlab.com/gitlab-org/gitlab-ce/issues/42293#note_175179950

Install the engines first... might take a while to run, so go get a coffee...

time docker run \
  --interactive --tty --rm \
  --env CODECLIMATE_CODE="$PWD" \
  --env CODECLIMATE_DEBUG=1 \
  --env CONTAINER_TIMEOUT_SECONDS=3600 \
  --volume "$PWD":/code \
  --volume /var/run/docker.sock:/var/run/docker.sock \
  --volume /tmp/cc:/tmp/cc \
  codeclimate/codeclimate engines:install

Analyze code...

time docker run \
  --interactive --tty --rm \
  --env CODECLIMATE_CODE="$PWD" \
  --env CONTAINER_TIMEOUT_SECONDS=3600 \
  --volume "$PWD":/code \
  --volume /var/run/docker.sock:/var/run/docker.sock \
  --volume /tmp/cc:/tmp/cc \
  codeclimate/codeclimate analyze -f html > result.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment