feat(shell): add codeclimate wrapper
There are two wrapper scripts for running codeclimate locally in docker. This script is adapted from their website. There is also a script that will output the results in vimgrep format, so they can be easily loaded into the quickfix list.
This commit is contained in:
parent
c6a4f619bf
commit
331e2ceaf9
2 changed files with 16 additions and 0 deletions
11
site-modules/core/files/bin/codeclimate
Executable file
11
site-modules/core/files/bin/codeclimate
Executable file
|
|
@ -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 $@
|
||||||
5
site-modules/core/files/bin/codeclimate-vimgrep
Executable file
5
site-modules/core/files/bin/codeclimate-vimgrep
Executable file
|
|
@ -0,0 +1,5 @@
|
||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
codeclimate analyze -f json $@ \
|
||||||
|
| jq -r '.[] | "\(.location.path):\(.location.lines.begin): \(.description)"' \
|
||||||
|
| grep -v '^null'
|
||||||
Loading…
Reference in a new issue