This is a basic extraction of common UserTesting ruby styles. For rails focused styles, see ut_rubocop_rails
Add the gem to your Gemfile in the dev/test group:
You don't need to add rubocop itself, this takes care of that.
group :test, :development do
...
gem "ut-rubocop", require: falseIn your .rubocop.yml file, add these lines near the top:
inherit_gem:
ut-rubocop:
- default.yml- Increase version number in
lib/ut/style_ruby/version.rbin your PR. - After merging to main, tag the current HEAD with the version number chosen:
git tag v0.0.x - Build the gem:
gem build .gemspec - Push gem to rubygems.org:
gem push ut-rubocop-0.0.x.gem
The gem is now updated on rubygems.org.
Note that you will need to be added as a maintainer of the gem to be able to push it.
bundle exec rubocop
MIT.
Library created by UserTesting
- Fork it ( https://github.com/usertesting/ut_rubocop/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
