diff --git a/site-modules/core/files/bin/codeclimate b/site-modules/core/files/bin/codeclimate new file mode 100755 index 0000000..5f666c8 --- /dev/null +++ b/site-modules/core/files/bin/codeclimate @@ -0,0 +1,11 @@ +#!/bin/bash +set -e + +docker run \ + --interactive --rm \ + --env CODECLIMATE_CODE="$PWD" \ + --env CODECLIMATE_DEBUG="$CODECLIMATE_DEBUG" \ + --volume "$PWD":/code \ + --volume /var/run/docker.sock:/var/run/docker.sock \ + --volume /tmp/cc:/tmp/cc \ + codeclimate/codeclimate $@ diff --git a/site-modules/core/files/bin/codeclimate-vimgrep b/site-modules/core/files/bin/codeclimate-vimgrep new file mode 100755 index 0000000..fc440c3 --- /dev/null +++ b/site-modules/core/files/bin/codeclimate-vimgrep @@ -0,0 +1,5 @@ +#! /bin/bash + +codeclimate analyze -f json $@ \ + | jq -r '.[] | "\(.location.path):\(.location.lines.begin): \(.description)"' \ + | grep -v '^null'