An attempt at standardizing how we write code across all team members and projects.
- Propose - create a pull request proposing a change to the Rubocop rule(s) and request everyone to review it
- Discuss - argue, gloves come off, create alliances
- Vote - upvote/downvote with emojis 👍/👎 😍/🤮
- Merge - merge the pull request and create a new release with a version bump
Add to your Gemfile
and bundle
group :development, :test do
gem 'rubocop-performance', require: false
gem 'rubocop-rails', require: false
end
You don't need much to set this up now in .rubocop.yml
---
inherit_from:
- https://raw.githubusercontent.com/animikii/rubocop-akii/v1.0/.rubocop.yml
require:
- rubocop-performance
- rubocop-rails
bundle exec rubocop
bundle exec rubocop -a
bundle exec rubocop --auto-gen-config
Create a script in bin/travis-rubocop.sh
and add
#!/usr/bin/env bash
travis_fold start "rubocop"
echo "Running Rubocop"
bundle exec rubocop
travis_fold end "rubocop"
Then import travis_fold
and execute the script in .travis.yml
before_script:
- export -f travis_fold
script:
- ./bin/travis-rubocop.sh