0.0
The project is in a healthy, maintained state
Base RuboCop configuration files for Ruby projects at Medidata
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
 Dependencies

Development

~> 13.0
~> 3.11

Runtime

~> 1.0
 Project Readme

RuboCop Mdsol

This gem provides base RuboCop configuration files for Ruby projects at Medidata.

Installation

Add the following line to your application's Gemfile:

gem "rubocop-mdsol", "~> 0.3"

Usage

In your project's RuboCop configuration file, you need to import the files provided by this gem.

Additionally, if you installed this gem using Bundler you will need to run RuboCop using bundle exec rubocop.

Rails applications

From version 0.72.0, the Rails cops have been extracted to the rubocop-rails gem. You will need to add this gem to your Gemfile and in your RuboCop configuration require it alongside the Rails-specific yaml file:

require: rubocop-rails

inherit_gem:
  rubocop-mdsol:
    - rubocop.yml
    - rubocop-rails.yml

# your customizations here...

Plain ruby projects (gems, lambdas...)

Plain ruby projects only need to inherit from the base configuration file:

inherit_gem:
  rubocop-mdsol: rubocop.yml

# your customizations here...

RSpec

To lint RSpec files, add the rubocop-rpec gem to your Gemfile and in your RuboCop configuration require it alongside the RSpec-specific yaml file:

require: rubocop-rspec

inherit_gem:
  rubocop-mdsol:
    - rubocop.yml
    - rubocop-rspec.yml

# your customizations here...

Custom Cops

To activate the custom cops (mdsol/*) shipped with this Gem:

require: rubocop-mdsol

# or using the array notation to specify multiple extensions:

require:
  - rubocop-mdsol
  - rubocop-rails

All cops are located under lib/rubocop/cop/mdsol and contain examples/documentation.

Recommended customizations

String literals

The Style/StringLiterals is disabled by default. For the sake of consistency within your project, you definitely want to enable it with your preferred style:

Style/StringLiterals:
  Enabled: true
  EnforcedStyle: double_quotes
  # or
  # EnforcedStyle: single_quotes