Sha256: f1780f63d4998563baf8cab83dcebe52666de1c5d6d93c7588b86390e462f052
Contents?: true
Size: 1.59 KB
Versions: 5
Compression:
Stored size: 1.59 KB
Contents
# Rubocop::Bitcrowd The bitcrowd rubocop.yml as a gem. ## Installation Add this lines to your application's Gemfile: ```ruby gem 'rubocop' gem 'rubocop-bitcrowd' ``` And then execute: $ bundle ## Usage To use the configuration in your project create a .rubocop.yml with: ```yml inherit_gem: rubocop-bitcrowd: .rubocop.yml ``` # Using rubocop-rspec There is also a config file for rubocop-rspec. To use it add rubocop-rspec to your Gemfile. ```ruby gem 'rubocop-rspec' ``` ```yml inherit_gem: rubocop-bitcrowd: - .rubocop.yml - .rubocop-rspec.yml ``` ## Autofixing issues At bitcrowd we discovered it to be a very good practice to put each automatically fixable Cop into a single commit when initially adding rubocop into a bigger project. This gem provides a simple script, that can help you with this task: 1. Create your rubocop configuration (either with the instructions above or your own) 2. Create a rubocop_todo.yml with: `rubocop --auto-gen-config` 3. Make sure you have a clean state in git, since the script will make commits for you (you may want to commit your rubocop_todo.yml) 4. Run the script (may take a while, when you want to continue working on your project meanwhile run this in a separate checkout): `rubocop-autofix` 5. Review all commits made by the script and run your tests. You can now drop certain commits of cops you don't want. Often it may make some sense to run the script again with changed settings, since rebasing 100+ commits is no fun. ## License The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
rubocop-bitcrowd-1.2.1 | README.md |
rubocop-bitcrowd-1.2.0 | README.md |
rubocop-bitcrowd-1.1.2 | README.md |
rubocop-bitcrowd-1.1.1 | README.md |
rubocop-bitcrowd-1.1.0 | README.md |