This gem holds shared RuboCop configuration for all of Codecademy's Ruby code bases.
Install this gem in the development and test groups
group :test, :development do
gem 'codecademy-style',
git: 'https://github.com/codecademy-engineering/codecademy-ruby-style.git',
tag: '0.1.5' # Or whatever version you want.
end
And then execute:
$ bundle install
At the top of you .rubocop.yml
add:
inherit_gem:
codecademy-style: default.yml
Your local Rubcop configuration will now inherit from the rules specified in default.yaml
in this repo. You may now run bundle exec rubocop
as you normally would.
To contribute to this gem:
- Bump the version number in
version.rb
and runbundle install
. - Open a pull request with your code changes and the version change, get approval, and merge to
main
. - Checkout
main
locally, pull from origin, and then create a tag. If your version number were1.0.4
, you would create the tag via the commandgit tag 1.0.4
. - Push your tag:
git push --tags
- Visit the releases page and create a new release for the new tag.