Enable RuboCop
- RuboCop version is locked to 0.81.0 which supports Ruby 2.3 Once Ransack bumps the required_ruby_version, RuboCop can be bumped. - `DisabledByDefault: true` not to apply all of default cops - Some Layout and Style cops are enabled to make initial changes small Other cops can be enabled later.
This commit is contained in:
parent
dc1c79ea74
commit
b74842a067
|
@ -0,0 +1,42 @@
|
|||
AllCops:
|
||||
# TargetRubyVersion value is based on `required_ruby_version = '>= 2.3'` in the ransack.gemspec
|
||||
TargetRubyVersion: 2.3
|
||||
|
||||
DisabledByDefault: true
|
||||
|
||||
Layout/EmptyLineAfterMagicComment:
|
||||
Enabled: true
|
||||
|
||||
Layout/EmptyLineBetweenDefs:
|
||||
Enabled: true
|
||||
|
||||
Layout/EmptyLines:
|
||||
Enabled: true
|
||||
|
||||
Layout/FirstArrayElementIndentation:
|
||||
EnforcedStyle: consistent
|
||||
|
||||
Layout/SpaceAfterComma:
|
||||
Enabled: true
|
||||
|
||||
Layout/SpaceInsideBlockBraces:
|
||||
Enabled: true
|
||||
|
||||
Layout/SpaceInsideHashLiteralBraces:
|
||||
Enabled: true
|
||||
|
||||
Layout/SpaceInsideParens:
|
||||
Enabled: true
|
||||
|
||||
Layout/TrailingEmptyLines:
|
||||
Enabled: true
|
||||
|
||||
Style/RedundantReturn:
|
||||
Enabled: true
|
||||
|
||||
Style/SelfAssignment:
|
||||
Enabled: true
|
||||
|
||||
Style/Semicolon:
|
||||
Enabled: true
|
||||
|
5
Gemfile
5
Gemfile
|
@ -49,3 +49,8 @@ group :test do
|
|||
gem 'rspec', '~> 3'
|
||||
gem 'simplecov', :require => false
|
||||
end
|
||||
|
||||
# RuboCop 0.81.0 is the last version which supports Ruby 2.3.
|
||||
# Once Ransack required_ruby_version is bumped, RuboCop version can be bumped.
|
||||
# https://github.com/rubocop-hq/rubocop/pull/7869
|
||||
gem 'rubocop', '=0.81.0', require: false
|
||||
|
|
Loading…
Reference in New Issue