Skip to content

Instantly share code, notes, and snippets.

@naps62
Created March 22, 2015 22:36
Show Gist options
  • Save naps62/df711385b0af6e2faa90 to your computer and use it in GitHub Desktop.
Save naps62/df711385b0af6e2faa90 to your computer and use it in GitHub Desktop.
[ESS @ UM] Rubocop setup
AllCops:
Include:
- '**/Rakefile'
- '**/config.ru'
Exclude:
- 'db/**/*'
- 'config/**/*'
- 'script/**/*'
- 'bin/**/*'
- 'vendor/**/*'
Metrics/LineLength:
Enabled: false
Style/AlignParameters:
EnforcedStyle: with_fixed_indentation
Style/ClassAndModuleChildren:
Enabled: false
Style/Documentation:
Enabled: false
Style/DotPosition:
EnforcedStyle: trailing
Style/IfUnlessModifier:
Enabled: false
Style/PredicateName:
NamePrefixBlacklist:
- is_
- have_
Style/RegexpLiteral:
MaxSlashes: 0
Style/NumericLiterals:
Enabled: false
Style/SingleLineBlockParams:
Enabled: false
group :test do
gem 'rubocop', require: false
gem 'rspec-rails'
end
require File.expand_path('../config/application', __FILE__)
Rails.application.load_tasks
if %w(development test).include? Rails.env
require 'rubocop/rake_task'
RuboCop::RakeTask.new
task(:default).clear
task default: [:rubocop, :spec]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment