Public configuration files used by ruby apps
Due to the Github IP Allow-Listing project, Trailhead had to:
- Remove all public repositories from
devforce
- Move away from CodeClimate, due to SFCI migration
If you relied on any files in this repository to be public, please copy it into your own project.
We're using rubocop as linter to keep our ruby code with the same format.
gem 'rubocop-rails_config', '~> 0.2'
gem 'rubocop-rspec'
# Rubocop temporary files
.rubocop-https---*
prepare:
fetch:
- url: 'https://raw.githubusercontent.com/airbnb/ruby/master/rubocop-airbnb/config/rubocop-style.yml'
path: '.rubocop_airbnb.yml'
- url: 'https://raw.githubusercontent.com/devforce/dotfiles/master/rubocop/rubocop_trailhead.yml'
path: '.rubocop_trailhead.yml'
Code Climate configuration looks like this because rubocop is not allowed to follow links, so we download the file beforehand using the above.
inherit_from:
- .rubocop_airbnb.yml
- .rubocop_trailhead.yml
We inherit from a local file instead of directly from the remote so Codeclimate can read the file.
Metrics/LineLength:
Max: 42
inherit_from:
- https://raw.githubusercontent.com/airbnb/ruby/master/rubocop-airbnb/config/rubocop-style.yml
inherit_from:
- https://raw.githubusercontent.com/devforce/dotfiles/master/rubocop/rubocop_trailhead.yml
git status --porcelain | grep M | xargs bundle exec rubocop
Or for just rb files:
git status --porcelain | grep M | grep '\.rb' | xargs bundle exec rubocop