From 544b3f350f1f906579f974c9960c63912ba74e71 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Fri, 2 Sep 2016 18:43:28 -0700 Subject: [PATCH] Add codeclimate cli instructions. (#1043) * Add codeclimate cli instructions. Add the instructions for the users that want to mess around with the codeclimate cli. It is useful to test locally the config changes. Reviewers: * @mistercrunch * @ascott * @vera-liu * Update CONTRIBUTING.md * Update CONTRIBUTING.md --- CONTRIBUTING.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ff61ac831..15ba0d51b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -160,6 +160,30 @@ Lint the project with: # for javascript npm run lint +## Linting with codeclimate +Codeclimate is a service we use to measure code quality and test coverage. To get codeclimate's report on your branch, ideally before sending your PR, you can setup codeclimate against your Caravel fork. After you push to your fork, you should be able to get the report at http://codeclimate.com . Alternatively, if you prefer to work locally, you can install the codeclimate cli tool. + +*Install the codeclimate cli tool* +``` +curl -L https://github.com/docker/machine/releases/download/v0.7.0/docker-machine-`uname -s`-`uname -m` > /usr/local/bin/docker-machine && chmod +x /usr/local/bin/docker-machine +brew install docker +docker-machine create --driver virtual box default +docker-machine env default +eval "$(docker-machine env default)" +docker pull codeclimate/codeclimate +brew tap codeclimate/formulae +brew install codeclimate +``` + +*Run the lint command:* +``` +docker-machine start +eval "$(docker-machine env default)” +codeclimate analyze +``` +More info can be found here: https://docs.codeclimate.com/docs/open-source-free + + ## API documentation Generate the documentation with: