The main idea of the Code Climate CI gem is that you can implement it to your CI script.
Gem will compare code quality in current branch with master branch through CodeClimate API and if code in your branch become worse then ci script will be interrupted.
You can also compare code quality in your branch using this gem right from your console.
Add this line to your application's Gemfile:
gem 'codeclimate_ci'
And then execute:
bundle
Or install it yourself as:
gem install codeclimate_ci
Just type in your console:
codeclimate_ci --codeclimate-api-token CODECLIMATE_API_TOKEN --repo-id REPOSITORY_ID --branch_name BRANCH
- For codeclimate api token you need to go to codeclimate account settings in
Integrations
tab and there you can seeAPI Token
. - For repo id you need to go to your private repo and then you'll see it in you address string.
Invalid credentials given. Please check your codeclimate_api_token and repo_id.
Code in your branch became worse on %diff_point% points
Gpa score has improved to %diff_point% points. Go on...
bin/quality
based on RuboCop.rubocop.yml
describes active checks
bin/bootstrap
install gemsbin/build
check your specs and runs quality tools
- Fork it ( https://github.com/[my-github-username]/codeclimate_ci/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Code Climate CI is maintained by Ildar Safin. It was written by Flatstack with the help of our contributors.